@tencent-yb/sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +628 -0
- package/dist/index.d.ts +124 -0
- package/dist/yb-jssdk.es.js +1 -0
- package/dist/yb-jssdk.umd.js +1 -0
- package/package.json +29 -0
package/README.md
ADDED
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
# @tencent-yb/sdk 文档
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
YB-JSSDK 是元宝客户端提供的 JavaScript SDK,用于在 WebView 中与原生应用进行交互。本文档介绍所有对外开放的公共 API 接口。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @tencent-yb/sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 快速开始
|
|
14
|
+
|
|
15
|
+
使用任何 API 之前,先调用 `config` 方法完成鉴权:
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import YuanbaoSDK from '@tencent-yb/sdk';
|
|
19
|
+
|
|
20
|
+
await YuanbaoSDK.config({
|
|
21
|
+
appId: 'your_app_id',
|
|
22
|
+
nonceStr: 'random_string',
|
|
23
|
+
timestamp: 1700000000,
|
|
24
|
+
signature: 'computed_signature',
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> ⚠️ `appSecret` 仅可在服务端使用,严禁暴露到前端。签名计算规则为 `hash(appId + nonceStr + timestamp + appSecret)`。
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## API 分类
|
|
33
|
+
|
|
34
|
+
### 1. 核心配置
|
|
35
|
+
- [config](#config) - AK/SK 签名鉴权
|
|
36
|
+
|
|
37
|
+
### 2. App 模块
|
|
38
|
+
- [app.getTheme](#appgettheme) - 获取当前主题(深色/浅色)
|
|
39
|
+
- [app.getServerTimestamp](#appgetservertimestamp) - 获取服务端时间戳
|
|
40
|
+
- [app.setScreenCaptureEnabled](#appsetscreencaptureenabled) - 控制截屏录屏
|
|
41
|
+
|
|
42
|
+
### 3. Device 模块
|
|
43
|
+
- [device.getLocation](#devicegetlocation) - 获取地理位置
|
|
44
|
+
|
|
45
|
+
### 4. UI 模块
|
|
46
|
+
- [ui.toast](#uitoast) - Toast 提示
|
|
47
|
+
|
|
48
|
+
### 5. WebView 模块
|
|
49
|
+
- [webview.navigate](#webviewnavigate) - 页面导航跳转(支持 BottomSheetDialog WebView)
|
|
50
|
+
- [webview.navigateBack](#webviewnavigateback) - 返回上一页
|
|
51
|
+
- [webview.receiveData](#webviewreceivedata) - 父 WebView 监听子 WebView 数据
|
|
52
|
+
- [webview.sendData](#webviewsenddata) - 子 WebView 向父 WebView 发送数据
|
|
53
|
+
- [webview.onBackPressed](#webviewonbackpressed) - 拦截返回行为
|
|
54
|
+
|
|
55
|
+
### 6. Share 模块
|
|
56
|
+
- [share.shareTo](#shareshareto) - 三方分享
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 详细 API 文档
|
|
61
|
+
|
|
62
|
+
## config
|
|
63
|
+
|
|
64
|
+
配置 SDK 并完成鉴权。所有需要使用 JS-SDK 的页面必须先调用此方法,否则将无法调用其他 API。
|
|
65
|
+
|
|
66
|
+
### 接口定义
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
function config(options: ConfigOptions): Promise<Response>
|
|
70
|
+
|
|
71
|
+
interface ConfigOptions {
|
|
72
|
+
/** 开启调试模式,调用的所有 API 的返回值会在客户端 alert 出来 */
|
|
73
|
+
debug?: boolean;
|
|
74
|
+
/** 应用唯一标识(必填) */
|
|
75
|
+
appId: string;
|
|
76
|
+
/** 生成签名的时间戳(必填) */
|
|
77
|
+
timestamp: number;
|
|
78
|
+
/** 生成签名的随机串(必填) */
|
|
79
|
+
nonceStr: string;
|
|
80
|
+
/** 签名(必填) */
|
|
81
|
+
signature: string;
|
|
82
|
+
/** 需要使用的 JS 接口列表(必填) */
|
|
83
|
+
jsApiList: string[];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface Response {
|
|
87
|
+
/** 状态码,0 表示成功,非 0 表示失败 */
|
|
88
|
+
code: number;
|
|
89
|
+
/** 错误信息 */
|
|
90
|
+
errMsg: string;
|
|
91
|
+
/** 返回数据 */
|
|
92
|
+
data?: any;
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 示例
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import YuanbaoSDK from '@tencent-yb/sdk';
|
|
100
|
+
|
|
101
|
+
YuanbaoSDK.config({
|
|
102
|
+
appId: 'your_app_id',
|
|
103
|
+
nonceStr: 'random_string',
|
|
104
|
+
timestamp: 1700000000,
|
|
105
|
+
signature: 'computed_signature',
|
|
106
|
+
}).then(res => {
|
|
107
|
+
console.log('鉴权成功:', res);
|
|
108
|
+
}).catch(err => {
|
|
109
|
+
console.error('鉴权失败:', err);
|
|
110
|
+
});
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## app.getTheme
|
|
116
|
+
|
|
117
|
+
获取当前 App 主题(深色/浅色模式),确保页面与元宝主题风格一致。
|
|
118
|
+
|
|
119
|
+
### 接口定义
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
interface GetThemeData {
|
|
123
|
+
/** 主题类型 */
|
|
124
|
+
theme: 'dark' | 'light';
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function getTheme(): Promise<Response<GetThemeData>>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 示例
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
import { app } from '@tencent-yb/sdk';
|
|
134
|
+
|
|
135
|
+
const res = await app.getTheme();
|
|
136
|
+
if (res.code === 0) {
|
|
137
|
+
console.log('当前主题:', res.data.theme); // 'dark' | 'light'
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## app.getServerTimestamp
|
|
144
|
+
|
|
145
|
+
获取服务端校准时间,用于订单超时倒计时、限时优惠等时效性逻辑。
|
|
146
|
+
|
|
147
|
+
### 接口定义
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
enum TimestampType {
|
|
151
|
+
/** 毫秒级时间戳 */
|
|
152
|
+
timestampMsec = 'timestampMsec',
|
|
153
|
+
/** NTP 时间戳 */
|
|
154
|
+
timestampNtp = 'timestampNtp',
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface GetServerTimestampParams {
|
|
158
|
+
/** 时间戳类型 */
|
|
159
|
+
type: TimestampType;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface GetServerTimestampData {
|
|
163
|
+
/** 服务端时间戳(毫秒) */
|
|
164
|
+
timestampMsec?: number;
|
|
165
|
+
/** NTP 时间戳 */
|
|
166
|
+
timestampNtp?: number;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function getServerTimestamp(params: GetServerTimestampParams): Promise<Response<GetServerTimestampData>>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 示例
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
import { app, TimestampType } from '@tencent-yb/sdk';
|
|
176
|
+
|
|
177
|
+
// 获取毫秒级时间戳
|
|
178
|
+
const res = await app.getServerTimestamp({ type: TimestampType.timestampMsec });
|
|
179
|
+
if (res.code === 0) {
|
|
180
|
+
console.log('服务端时间戳:', res.data.timestampMsec);
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## app.setScreenCaptureEnabled
|
|
187
|
+
|
|
188
|
+
控制当前 WebView 是否允许截屏和录屏,用于支付密码等敏感页面的安全防护。
|
|
189
|
+
|
|
190
|
+
### 接口定义
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
interface SetScreenCaptureEnabledParams {
|
|
194
|
+
/** 是否允许截屏录屏,false 禁止,true 允许 */
|
|
195
|
+
enabled: boolean;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function setScreenCaptureEnabled(params: SetScreenCaptureEnabledParams): Promise<Response>
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### 注意事项
|
|
202
|
+
|
|
203
|
+
- 页面关闭(`navigateBack`)时客户端应自动恢复允许截屏录屏,防止影响后续页面。
|
|
204
|
+
|
|
205
|
+
### 示例
|
|
206
|
+
|
|
207
|
+
```typescript
|
|
208
|
+
import { app } from '@tencent-yb/sdk';
|
|
209
|
+
|
|
210
|
+
// 进入支付密码页面时禁止截屏录屏
|
|
211
|
+
app.setScreenCaptureEnabled({ enabled: false });
|
|
212
|
+
|
|
213
|
+
// 离开敏感页面后恢复
|
|
214
|
+
app.setScreenCaptureEnabled({ enabled: true });
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## device.getLocation
|
|
220
|
+
|
|
221
|
+
获取当前地理位置,返回经纬度、速度和精度信息。用于外卖配送地址、附近商家推荐。
|
|
222
|
+
|
|
223
|
+
### 接口定义
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
type LocationType = 'wgs84' | 'gcj02';
|
|
227
|
+
|
|
228
|
+
interface GetLocationParams {
|
|
229
|
+
/**
|
|
230
|
+
* 坐标类型,默认为 'wgs84'
|
|
231
|
+
* - wgs84: GPS 坐标
|
|
232
|
+
* - gcj02: 国测局坐标(火星坐标)
|
|
233
|
+
*/
|
|
234
|
+
type?: LocationType;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
interface LocationData {
|
|
238
|
+
/** 纬度,范围 -90 ~ 90 */
|
|
239
|
+
latitude: number;
|
|
240
|
+
/** 经度,范围 -180 ~ 180 */
|
|
241
|
+
longitude: number;
|
|
242
|
+
/** 速度,单位 m/s */
|
|
243
|
+
speed?: number;
|
|
244
|
+
/** 精度,单位 m */
|
|
245
|
+
accuracy?: number;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function getLocation(params?: GetLocationParams): Promise<Response<LocationData>>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### 示例
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
import { device } from '@tencent-yb/sdk';
|
|
255
|
+
|
|
256
|
+
const res = await device.getLocation({ type: 'gcj02' });
|
|
257
|
+
if (res.code === 0 && res.data) {
|
|
258
|
+
console.log('纬度:', res.data.latitude);
|
|
259
|
+
console.log('经度:', res.data.longitude);
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## ui.toast
|
|
266
|
+
|
|
267
|
+
弹出原生 Toast 提示,如"添加购物车成功"、"下单成功"等操作反馈。
|
|
268
|
+
|
|
269
|
+
### 接口定义
|
|
270
|
+
|
|
271
|
+
```typescript
|
|
272
|
+
interface ToastParams {
|
|
273
|
+
/** 提示文本 */
|
|
274
|
+
text: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function toast(params: ToastParams): Promise<Response>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### 示例
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
import { ui } from '@tencent-yb/sdk';
|
|
284
|
+
|
|
285
|
+
ui.toast({ text: '添加购物车成功' });
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## webview.navigate
|
|
291
|
+
|
|
292
|
+
页面导航跳转。支持通过 `ratio` 参数打开不同高度的 BottomSheetDialog WebView,可控制导航栏显隐。
|
|
293
|
+
|
|
294
|
+
### 接口定义
|
|
295
|
+
|
|
296
|
+
```typescript
|
|
297
|
+
/** WebView 展示高度比例(占屏幕高度的十分之几) */
|
|
298
|
+
type NavigateWebViewRatio = 9 | 7;
|
|
299
|
+
|
|
300
|
+
/** navigate 请求参数 */
|
|
301
|
+
type NavigateParams = {
|
|
302
|
+
/** 路由地址(直接传 route 字符串) */
|
|
303
|
+
route: string;
|
|
304
|
+
/** 跳转后是否关闭当前 webview */
|
|
305
|
+
closeSelf?: boolean;
|
|
306
|
+
} | {
|
|
307
|
+
/** 目标页面 URL */
|
|
308
|
+
url: string;
|
|
309
|
+
/** WebView 展示高度比例:9 表示 90% 屏幕高度(近全屏)、7 表示 70% 屏幕高度(半屏) */
|
|
310
|
+
ratio?: NavigateWebViewRatio;
|
|
311
|
+
/** 是否隐藏导航栏,默认 false */
|
|
312
|
+
navigationBarHidden?: boolean;
|
|
313
|
+
/** 跳转后是否关闭当前 webview */
|
|
314
|
+
closeSelf?: boolean;
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
function navigate(params: NavigateParams): Promise<Response>
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### 参数说明
|
|
321
|
+
|
|
322
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
323
|
+
|------|------|------|------|
|
|
324
|
+
| `url` | string | ✅ 是 | 目标页面 URL |
|
|
325
|
+
| `ratio` | `9` \| `7` | 否 | `9` 表示 90% 近全屏,`7` 表示 70% 半屏 |
|
|
326
|
+
| `navigationBarHidden` | boolean | 否 | 是否隐藏顶部导航栏 |
|
|
327
|
+
|
|
328
|
+
### 示例
|
|
329
|
+
|
|
330
|
+
```typescript
|
|
331
|
+
import { webview } from '@tencent-yb/sdk';
|
|
332
|
+
|
|
333
|
+
// 打开半屏 WebView(70% 高度)
|
|
334
|
+
webview.navigate({
|
|
335
|
+
url: 'https://meituan.com/shop/detail',
|
|
336
|
+
ratio: 7
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
// 打开近全屏 WebView 并隐藏导航栏
|
|
340
|
+
webview.navigate({
|
|
341
|
+
url: 'https://meituan.com/order/confirm',
|
|
342
|
+
ratio: 9,
|
|
343
|
+
navigationBarHidden: true
|
|
344
|
+
});
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## webview.navigateBack
|
|
350
|
+
|
|
351
|
+
关闭当前 WebView,返回上一级页面。
|
|
352
|
+
|
|
353
|
+
### 接口定义
|
|
354
|
+
|
|
355
|
+
```typescript
|
|
356
|
+
function navigateBack(): Promise<Response>
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
### 示例
|
|
360
|
+
|
|
361
|
+
```typescript
|
|
362
|
+
import { webview } from '@tencent-yb/sdk';
|
|
363
|
+
|
|
364
|
+
webview.navigateBack();
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## webview.receiveData
|
|
370
|
+
|
|
371
|
+
【父 WebView 调用】监听子 WebView 发送的数据。通过 `propertyId` 区分不同业务方的信道。
|
|
372
|
+
|
|
373
|
+
### 接口定义
|
|
374
|
+
|
|
375
|
+
```typescript
|
|
376
|
+
interface ReceiveDataParams {
|
|
377
|
+
/** 信道标识,需与子 WebView sendData 的 propertyId 一致 */
|
|
378
|
+
propertyId: string;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
interface WebviewDataPayload {
|
|
382
|
+
/** 业务状态码,0 表示成功 */
|
|
383
|
+
code: number;
|
|
384
|
+
/** 错误描述信息 */
|
|
385
|
+
errMsg: string;
|
|
386
|
+
/** 业务数据 */
|
|
387
|
+
data?: Record<string, unknown>;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function receiveData(
|
|
391
|
+
params: ReceiveDataParams,
|
|
392
|
+
callback: (payload: WebviewDataPayload) => void
|
|
393
|
+
): Promise<Response | null>
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### 示例
|
|
397
|
+
|
|
398
|
+
```typescript
|
|
399
|
+
import { webview } from '@tencent-yb/sdk';
|
|
400
|
+
|
|
401
|
+
// 父 WebView 注册监听
|
|
402
|
+
webview.receiveData({ propertyId: 'meituan' }, (payload) => {
|
|
403
|
+
if (payload.code === 0) {
|
|
404
|
+
console.log('收到子 WebView 数据:', payload.data);
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
// 然后打开子 WebView
|
|
409
|
+
webview.navigate({
|
|
410
|
+
url: 'https://meituan.com/order/confirm',
|
|
411
|
+
ratio: 9,
|
|
412
|
+
navigationBarHidden: true
|
|
413
|
+
});
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## webview.sendData
|
|
419
|
+
|
|
420
|
+
【子 WebView 调用】向父 WebView 发送数据。
|
|
421
|
+
|
|
422
|
+
### 接口定义
|
|
423
|
+
|
|
424
|
+
```typescript
|
|
425
|
+
interface SendDataParams extends WebviewDataPayload {
|
|
426
|
+
/** 信道标识,需与父 WebView receiveData 的 propertyId 一致 */
|
|
427
|
+
propertyId: string;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function sendData(params: SendDataParams): Promise<Response>
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### 示例
|
|
434
|
+
|
|
435
|
+
```typescript
|
|
436
|
+
import { webview } from '@tencent-yb/sdk';
|
|
437
|
+
|
|
438
|
+
// 子 WebView 发送数据
|
|
439
|
+
webview.sendData({
|
|
440
|
+
propertyId: 'meituan',
|
|
441
|
+
code: 0,
|
|
442
|
+
errMsg: 'ok',
|
|
443
|
+
data: { orderStatus: 'success', orderId: '123456' }
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
// 发送后可选择关闭自身
|
|
447
|
+
webview.navigateBack();
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
## webview.onBackPressed
|
|
453
|
+
|
|
454
|
+
拦截用户的左滑手势和导航栏返回按钮行为。页面注册拦截后,用户触发返回时不会直接关闭 WebView,而是触发回调由页面自行处理(如回到收银台首页)。
|
|
455
|
+
|
|
456
|
+
### 接口定义
|
|
457
|
+
|
|
458
|
+
```typescript
|
|
459
|
+
interface OnBackPressedParams {
|
|
460
|
+
/** 是否启用返回拦截,true 启用,false 取消拦截恢复默认行为 */
|
|
461
|
+
enabled: boolean;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
function onBackPressed(
|
|
465
|
+
params: OnBackPressedParams,
|
|
466
|
+
callback?: () => void
|
|
467
|
+
): Promise<Response | null>
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
### 参数说明
|
|
471
|
+
|
|
472
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
473
|
+
|------|------|------|------|
|
|
474
|
+
| `enabled` | boolean | ✅ 是 | `true` 启用拦截(需同时传入 callback),`false` 取消拦截 |
|
|
475
|
+
| `callback` | `() => void` | 否 | 拦截后的回调,`enabled` 为 `true` 时必传 |
|
|
476
|
+
|
|
477
|
+
### 示例
|
|
478
|
+
|
|
479
|
+
```typescript
|
|
480
|
+
import { webview } from '@tencent-yb/sdk';
|
|
481
|
+
|
|
482
|
+
// 启用返回拦截 —— 收银台二级流程页
|
|
483
|
+
webview.onBackPressed({ enabled: true }, () => {
|
|
484
|
+
// 用户点击返回时,回到收银台首页而不是关闭 WebView
|
|
485
|
+
router.push('/checkout');
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
// 取消返回拦截 —— 回到首页后恢复默认行为
|
|
489
|
+
webview.onBackPressed({ enabled: false });
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
---
|
|
493
|
+
|
|
494
|
+
## share.shareTo
|
|
495
|
+
|
|
496
|
+
支持将商家/商品/优惠信息分享给好友。
|
|
497
|
+
|
|
498
|
+
### 接口定义
|
|
499
|
+
|
|
500
|
+
```typescript
|
|
501
|
+
type ShareToScene = 'session' | 'timeline' | 'qq' | 'qzone' | 'weibo';
|
|
502
|
+
|
|
503
|
+
enum ShareToType {
|
|
504
|
+
webpage = 'webpage',
|
|
505
|
+
image = 'image',
|
|
506
|
+
video = 'video',
|
|
507
|
+
file = 'file',
|
|
508
|
+
text = 'text',
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
interface ShareToParams {
|
|
512
|
+
/** 分享场景 */
|
|
513
|
+
scene: ShareToScene;
|
|
514
|
+
/** 分享类型 */
|
|
515
|
+
type: ShareToType;
|
|
516
|
+
/** 分享数据 */
|
|
517
|
+
data: unknown;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
function shareTo(params: ShareToParams): Promise<Response>
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
### 示例
|
|
524
|
+
|
|
525
|
+
```typescript
|
|
526
|
+
import { share, ShareToType } from '@tencent-yb/sdk';
|
|
527
|
+
|
|
528
|
+
share.shareTo({
|
|
529
|
+
scene: 'session',
|
|
530
|
+
type: ShareToType.webpage,
|
|
531
|
+
data: {
|
|
532
|
+
url: 'https://meituan.com/shop/12345',
|
|
533
|
+
title: '霸王茶姬(科兴科学园店)',
|
|
534
|
+
description: '一起来点外卖吧!',
|
|
535
|
+
thumbUrl: 'https://example.com/shop-logo.jpg'
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
---
|
|
541
|
+
|
|
542
|
+
## 持久化存储
|
|
543
|
+
|
|
544
|
+
数据持久化直接使用浏览器原生 `localStorage`,无需通过 Bridge。
|
|
545
|
+
|
|
546
|
+
```typescript
|
|
547
|
+
// 写入数据(建议添加业务前缀避免冲突)
|
|
548
|
+
localStorage.setItem('meituan_cart_data', JSON.stringify({ items: [...] }));
|
|
549
|
+
|
|
550
|
+
// 读取数据
|
|
551
|
+
const cartData = JSON.parse(localStorage.getItem('meituan_cart_data') ?? 'null');
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## 完整业务流程示例
|
|
557
|
+
|
|
558
|
+
```typescript
|
|
559
|
+
import { config, app, device, webview, ui, share, TimestampType } from '@tencent-yb/sdk';
|
|
560
|
+
|
|
561
|
+
// 1. 鉴权
|
|
562
|
+
await config({
|
|
563
|
+
appId: 'your_app_id',
|
|
564
|
+
nonceStr: 'random_string',
|
|
565
|
+
timestamp: 1700000000,
|
|
566
|
+
signature: 'computed_signature',
|
|
567
|
+
jsApiList: [
|
|
568
|
+
'getTheme', 'getServerTimestamp', 'getLocation',
|
|
569
|
+
'toast', 'navigate', 'navigateBack',
|
|
570
|
+
'receiveData', 'sendData', 'onBackPressed',
|
|
571
|
+
'setScreenCaptureEnabled', 'shareTo'
|
|
572
|
+
]
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
// 2. 获取主题适配 UI
|
|
576
|
+
const themeRes = await app.getTheme();
|
|
577
|
+
const isDark = themeRes.data.theme === 'dark';
|
|
578
|
+
|
|
579
|
+
// 3. 获取位置推荐附近商家
|
|
580
|
+
const locRes = await device.getLocation({ type: 'gcj02' });
|
|
581
|
+
|
|
582
|
+
// 4. 父 WebView 注册数据监听
|
|
583
|
+
webview.receiveData({ propertyId: 'meituan' }, (payload) => {
|
|
584
|
+
if (payload.code === 0 && payload.data?.orderStatus === 'success') {
|
|
585
|
+
ui.toast({ text: '下单成功!' });
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
// 5. 打开订单确认页(近全屏 BottomSheetDialog)
|
|
590
|
+
webview.navigate({
|
|
591
|
+
url: 'https://meituan.com/order/confirm',
|
|
592
|
+
ratio: 9,
|
|
593
|
+
navigationBarHidden: true
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
// 6. 子 WebView 中:启用返回拦截
|
|
597
|
+
webview.onBackPressed({ enabled: true }, () => {
|
|
598
|
+
router.push('/checkout');
|
|
599
|
+
});
|
|
600
|
+
|
|
601
|
+
// 7. 子 WebView 中:进入支付页面前禁止截屏
|
|
602
|
+
app.setScreenCaptureEnabled({ enabled: false });
|
|
603
|
+
|
|
604
|
+
// 8. 子 WebView 中:支付完成后发送数据并返回
|
|
605
|
+
webview.sendData({
|
|
606
|
+
propertyId: 'meituan',
|
|
607
|
+
code: 0,
|
|
608
|
+
errMsg: 'ok',
|
|
609
|
+
data: { orderStatus: 'success', orderId: '123456', totalAmount: 29.9 }
|
|
610
|
+
});
|
|
611
|
+
webview.navigateBack();
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
---
|
|
615
|
+
|
|
616
|
+
## 类型定义
|
|
617
|
+
|
|
618
|
+
完整的 TypeScript 类型定义请参考 SDK 包中的类型声明文件。
|
|
619
|
+
|
|
620
|
+
---
|
|
621
|
+
|
|
622
|
+
## 版本说明
|
|
623
|
+
|
|
624
|
+
当前文档基于 YB-JSSDK v1.0.0 版本编写。
|
|
625
|
+
|
|
626
|
+
## 技术支持
|
|
627
|
+
|
|
628
|
+
如有问题,请联系技术支持团队。
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { config } from './methods/sdk';
|
|
2
|
+
import { ConfigOptions } from './types/core';
|
|
3
|
+
import { getLocation } from './methods/device/get-location';
|
|
4
|
+
import { GetLocationParams } from './methods/device/get-location';
|
|
5
|
+
import { getServerTimestamp } from './methods/app/get-server-timestamp';
|
|
6
|
+
import { GetServerTimestampData } from './methods/app/get-server-timestamp';
|
|
7
|
+
import { GetServerTimestampParams } from './methods/app/get-server-timestamp';
|
|
8
|
+
import { getTheme } from './methods/app/get-theme';
|
|
9
|
+
import { GetThemeData } from './methods/app/get-theme';
|
|
10
|
+
import { LocationData } from './methods/device/get-location';
|
|
11
|
+
import { LocationType } from './methods/device/get-location';
|
|
12
|
+
import { navigate } from './methods/webview/navigate';
|
|
13
|
+
import { navigateBack } from './methods/webview/navigate-back';
|
|
14
|
+
import { NavigateParams } from './methods/webview/navigate';
|
|
15
|
+
import { NavigateWebViewRatio } from './methods/webview/navigate';
|
|
16
|
+
import { onBackPressed } from './methods/webview/on-back-pressed';
|
|
17
|
+
import { OnBackPressedParams } from './methods/webview/on-back-pressed';
|
|
18
|
+
import { receiveData } from './methods/webview/receive-data';
|
|
19
|
+
import { ReceiveDataParams } from './methods/webview/receive-data';
|
|
20
|
+
import { Response as Response_2 } from './types/core';
|
|
21
|
+
import { sendData } from './methods/webview/send-data';
|
|
22
|
+
import { SendDataParams } from './methods/webview/send-data';
|
|
23
|
+
import { setScreenCaptureEnabled } from './methods/app/set-screen-capture-enabled';
|
|
24
|
+
import { SetScreenCaptureEnabledParams } from './methods/app/set-screen-capture-enabled';
|
|
25
|
+
import { shareTo } from './methods/share/share-to';
|
|
26
|
+
import { ShareToParams } from './methods/share/share-to';
|
|
27
|
+
import { ShareToScene } from './methods/share/share-to';
|
|
28
|
+
import { ShareToType } from './methods/share/share-to';
|
|
29
|
+
import { TimestampType } from './types/app';
|
|
30
|
+
import { toast } from './methods/ui/toast';
|
|
31
|
+
import { ToastParams } from './methods/ui/toast';
|
|
32
|
+
import { WebviewDataPayload } from './methods/webview/send-data';
|
|
33
|
+
|
|
34
|
+
export declare const app: {
|
|
35
|
+
getTheme: () => Promise<Response_2<GetThemeData>>;
|
|
36
|
+
getServerTimestamp: (params: GetServerTimestampParams) => Promise<Response_2<GetServerTimestampData>>;
|
|
37
|
+
setScreenCaptureEnabled: (params: SetScreenCaptureEnabledParams) => Promise<Response_2>;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { config }
|
|
41
|
+
|
|
42
|
+
export { ConfigOptions }
|
|
43
|
+
|
|
44
|
+
export declare const device: {
|
|
45
|
+
getLocation: (params?: GetLocationParams) => Promise<Response_2<LocationData>>;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { getLocation }
|
|
49
|
+
|
|
50
|
+
export { GetLocationParams }
|
|
51
|
+
|
|
52
|
+
export { getServerTimestamp }
|
|
53
|
+
|
|
54
|
+
export { GetServerTimestampData }
|
|
55
|
+
|
|
56
|
+
export { GetServerTimestampParams }
|
|
57
|
+
|
|
58
|
+
export { getTheme }
|
|
59
|
+
|
|
60
|
+
export { GetThemeData }
|
|
61
|
+
|
|
62
|
+
export { LocationData }
|
|
63
|
+
|
|
64
|
+
export { LocationType }
|
|
65
|
+
|
|
66
|
+
export { navigate }
|
|
67
|
+
|
|
68
|
+
export { navigateBack }
|
|
69
|
+
|
|
70
|
+
export { NavigateParams }
|
|
71
|
+
|
|
72
|
+
export { NavigateWebViewRatio }
|
|
73
|
+
|
|
74
|
+
export { onBackPressed }
|
|
75
|
+
|
|
76
|
+
export { OnBackPressedParams }
|
|
77
|
+
|
|
78
|
+
export { receiveData }
|
|
79
|
+
|
|
80
|
+
export { ReceiveDataParams }
|
|
81
|
+
|
|
82
|
+
export { Response_2 as Response }
|
|
83
|
+
|
|
84
|
+
export { sendData }
|
|
85
|
+
|
|
86
|
+
export { SendDataParams }
|
|
87
|
+
|
|
88
|
+
export { setScreenCaptureEnabled }
|
|
89
|
+
|
|
90
|
+
export { SetScreenCaptureEnabledParams }
|
|
91
|
+
|
|
92
|
+
export declare const share: {
|
|
93
|
+
shareTo: (params: ShareToParams) => Promise<Response_2>;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export { shareTo }
|
|
97
|
+
|
|
98
|
+
export { ShareToParams }
|
|
99
|
+
|
|
100
|
+
export { ShareToScene }
|
|
101
|
+
|
|
102
|
+
export { ShareToType }
|
|
103
|
+
|
|
104
|
+
export { TimestampType }
|
|
105
|
+
|
|
106
|
+
export { toast }
|
|
107
|
+
|
|
108
|
+
export { ToastParams }
|
|
109
|
+
|
|
110
|
+
export declare const ui: {
|
|
111
|
+
toast: (params: ToastParams) => Promise<Response_2>;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export declare const webview: {
|
|
115
|
+
navigate: (params: NavigateParams) => Promise<Response_2>;
|
|
116
|
+
navigateBack: () => Promise<Response_2>;
|
|
117
|
+
receiveData: (params: ReceiveDataParams, callback: (payload: WebviewDataPayload) => void) => Promise<Response_2 | null>;
|
|
118
|
+
sendData: (params: SendDataParams) => Promise<Response_2>;
|
|
119
|
+
onBackPressed: (params: OnBackPressedParams, callback?: () => void) => Promise<Response_2 | null>;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export { WebviewDataPayload }
|
|
123
|
+
|
|
124
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=/* @__PURE__ */(e=>(e.versionNotSupported="version not supported",e.notInApp="not in app",e))(e||{}),t=/* @__PURE__ */(e=>(e.INVOKE="invoke",e.ON_EVENT="onEvent",e.OFF_EVENT="offEvent",e))(t||{});function r(e){try{const t=navigator.userAgent.match(/YuanBao\/(\d*\.\d*\.\d*)/)?.[1]||"0.0.0",r=e.split(".").map(Number),n=t.split(".").map(Number),o=Math.max(r.length,n.length);for(let e=0;e<o;e++){const t=r[e]||0,o=n[e]||0;if(o>t)return!0;if(o<t)return!1}return!0}catch(t){return console.error("supportVersion error",t),!0}}const n=t=>navigator.userAgent.match(/YuanBao/)?.[0]?t&&!r(t)?{code:-1,errMsg:e.versionNotSupported}:null:{code:-1,errMsg:e.notInApp},o="undefined"==typeof window,i=()=>{let e={NODE_ENV:void 0,NEXT_PUBLIC_MODE:void 0,NEXT_PUBLIC_RUNTIME_ENV:void 0,NEXT_PUBLIC_NODE_AEGIS_ID:void 0,NEXT_PUBLIC_AEGIS_ID:void 0,NEXT_PUBLIC_VERSION:void 0,NEXT_PUBLIC_AEGIS_ENV:void 0,DISABLE_CONSOLE:void 0};try{"undefined"!=typeof window&&void 0===window.process&&(window.process={env:{}}),e={NODE_ENV:process.env.NODE_ENV,NEXT_PUBLIC_MODE:process.env.NEXT_PUBLIC_MODE,NEXT_PUBLIC_RUNTIME_ENV:process.env.NEXT_PUBLIC_RUNTIME_ENV,NEXT_PUBLIC_NODE_AEGIS_ID:process.env.NEXT_PUBLIC_NODE_AEGIS_ID,NEXT_PUBLIC_AEGIS_ID:process.env.NEXT_PUBLIC_AEGIS_ID,NEXT_PUBLIC_VERSION:process.env.NEXT_PUBLIC_VERSION,NEXT_PUBLIC_AEGIS_ENV:process.env.NEXT_PUBLIC_AEGIS_ENV,DISABLE_CONSOLE:process.env.DISABLE_CONSOLE}}catch(t){}return e};var a=/* @__PURE__ */(e=>(e.Test="1",e.Pre="3",e.Prod="0",e))(a||{});const s={1:"https://yuanbao.test.hunyuan.woa.com",3:"https://yuanbao.pre.hunyuan.woa.com",0:"https://yuanbao.tencent.com"};function c(){const e=function(e=""){return o?(e||console.warn("warning:在node端调用getUserAgent方法未传入ua参数,会导致node端识别ua不准确!"),e||""):e||window.navigator.userAgent||""}(),t=e.match(/env_type\/([^ ]+)/)?.[1];return t&&Object.values(a).includes(t)?t:a.Prod}function u(){const e=c();return s[e]}var p=/* @__PURE__ */(e=>(e.theme="theme",e.DevToolsBaseUrl="DevToolsBaseUrl",e.backTrackGuideCount="backTrackGuideCount",e))(p||{});const l="https://yuanbao.tencent.com";function f(){return`${function(){if(o)return"";const e=navigator.userAgent,t=e.match(/app_version\/(\d+\.\d+\.\d+)/)?.[1],r=e.match(/YuanBao\/(\d+\.\d+\.\d+)/)?.[1];return t||r||""}()||"0.1.0"}_${process.env.NEXT_PUBLIC_VERSION||""}_${process.env.BOT_COMMIT_ID||""}`}(()=>{if(o)return l;const e=i();if(!o&&("development"===e.NEXT_PUBLIC_MODE||"test"===e.NEXT_PUBLIC_MODE)){const e=window.localStorage.getItem(p.DevToolsBaseUrl)||u();if(e)return e}!o&&window.navigator.userAgent?.includes("has_devtools/1")&&u()})(),process.env.NEXT_PUBLIC_ENABLE_WEB_BRIDGE;const d=!o&&"1"===localStorage.getItem("__YB_UI_TEST__");!o&&window.navigator.webdriver&&!d&&window.navigator.userAgent.includes("YbScreenshot");var y=/* @__PURE__ */(e=>(e.PageId="page_id",e.ModId="mod_id",e.ButtonId="button_id",e.AgentId="agent_id",e.ChatId="cid",e.TraceId="traceid",e.UserId="user_id",e.Ext1="ext1",e.Ext2="ext2",e.Ext3="ext3",e.Ext4="ext4",e))(y||{});[["HY10","firstLogin",'是否首次登录\t"1": 是|"2": 否'],["HY21","openFrom","智能体打开来源\t1: app 2: 发现页"],["HY22","firstPrompt",'是否首次发送prompt\t"1": 是|"0": 否'],["HY24","uploadType",'点+号展开后的具体按钮\t上报名称, 例如1-文字,2-语音,3-"拍摄" 4-"相册",5-"文件"'],["HY27","shareTye",'分享类型\t"1": 图片 - 截图分享(百变AI和写真是图片本身)"2": 文本 - 默认3: 链接 - 复制链接'],["HY28","shareChannel","分享渠道\t1: 微信 2: 朋友圈 3:本地 4:复制链接"],["HY29","elementName","点击元素的名称"],["HY30","sourcePage","页面来源"],["HY31","boot_time","设备启动时间,单位s"],["HY32","country_code","国家"],["HY33","language","语言"],["HY34","device_name","设备名"],["HY35","system_version","系统版本"],["HY36","device_machine","设备machine"],["HY37","carrier_info","运营商"],["HY38","memory_capacity","物理内存容量"],["HY39","disk_capacity","硬盘容量"],["HY40","system_update_time","系统更新时间,单位s,精确到微秒"],["HY41","device_model","设备model"],["HY42","time_zone","时区"],["HY43","device_init_time","设备初始化时间"],["HY44","mnt_id","系统安装唯一id"],["HY45","idfv","iOS公共参数"],["HY46","turing_ticket","图灵盾"],["HY50",y.PageId,"页面id"],["HY51",y.ModId,"模块id"],["HY52",y.ButtonId,"按钮id"],["HY20",y.AgentId,"智能体id"],["HY54",y.ChatId,"会话id"],["HY55",y.TraceId,"traceId"],["HY56","refer","APP来源页"],["HY57","trid","活动染色ID,从活动、活动入口(含发现页banner)进入才会带上"],["HY58",y.Ext1,"扩展参数"],["HY59",y.Ext2,"扩展参数"],["HY60",y.Ext3,"扩展参数"],["HY70","ext4","扩展参数"],["HY62","platform","platform"],["HY63","device","device"],["HY64",y.UserId,"user_id"],["HY68","evt_id","活动id"],["HY72","goods_trace_id","推荐trace_id"],["HY71","ext5","扩展参数"],["HY73","env","当前环境,online-正式、pre-预发布、dev-开发"],["HY67","finger_id","指纹id"],["HY76","visitor_id","访客id"],["HY81","browser_scene","浏览器环境"],["HY77","exp_name","实验名称"],["HY78","exp_id","实验id"],["HY79","exp_group","实验组"],["HY85","ext6","扩展参数"],["HY86","ext7","扩展参数"],["HY87","ext8","扩展参数"],["HY88","ext9","扩展参数"],["HY89","ext10","扩展参数"],["HY150","ext11","扩展参数"],["HY91","model_id","模型id"],["HY105","accounttype","账号类型"],["HY152","ext13","扩展参数"]].reduce((e,t)=>({...e,[t[1]]:t[0]}),{});var h=/* @__PURE__ */(e=>(e[e.wxBrowser=1001]="wxBrowser",e[e.yuanbaoApp=1002]="yuanbaoApp",e[e.mobileBrowser=1003]="mobileBrowser",e[e.pcBrowser=1004]="pcBrowser",e[e.tenVideo=1005]="tenVideo",e[e.tenNews=1006]="tenNews",e[e.tenSports=1007]="tenSports",e[e.mpWebview=1008]="mpWebview",e))(h||{}),g=/* @__PURE__ */(e=>(e.appAdBanner="appAdBanner",e.shareAgentInfoPage="shareAgentInfoPage",e.shareAgentChatPage="shareAgentChatPage",e.adPage="adPage",e.shareClockInPage="shareClockInPage",e.ugcAgentChatPage="ugcAgentChatPage",e.offlineEvtPage="offlineEvtPage",e.promoPage="promoPage",e))(g||{});const m="undefined"==typeof window;var v,b,w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function E(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}function I(){return b?v:(b=1,v=TypeError)}const _=/* @__PURE__ */E(/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var O,A,P,k,x,D,j,N,T,B,C,R,L,U,M,H,F,Y,q,V,W,K,J,G,Q,$,z,X,Z,ee,te,re,ne,oe,ie,ae,se,ce,ue,pe,le,fe,de,ye,he,ge,me,ve,be,we,Se,Ee,Ie,_e,Oe,Ae,Pe,ke,xe,De,je,Ne,Te,Be,Ce,Re,Le,Ue,Me,He,Fe,Ye,qe,Ve,We,Ke,Je,Ge,Qe,$e,ze,Xe,Ze,et,tt,rt,nt,ot;function it(){if(A)return O;A=1;var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&"function"==typeof t.get?t.get:null,n=e&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&"function"==typeof i.get?i.get:null,s=o&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,u="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,l=Boolean.prototype.valueOf,f=Object.prototype.toString,d=Function.prototype.toString,y=String.prototype.match,h=String.prototype.slice,g=String.prototype.replace,m=String.prototype.toUpperCase,v=String.prototype.toLowerCase,b=RegExp.prototype.test,S=Array.prototype.concat,E=Array.prototype.join,I=Array.prototype.slice,P=Math.floor,k="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,N="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function C(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||b.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-P(-e):P(e);if(n!==e){var o=String(n),i=h.call(t,o.length+1);return g.call(o,r,"$&_")+"."+g.call(g.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return g.call(t,r,"$&_")}var R=_,L=R.custom,U=K(L)?L:null,M={__proto__:null,double:'"',single:"'"},H={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function F(e,t,r){var n=r.quoteStyle||t,o=M[n];return o+e+o}function Y(e){return g.call(String(e),/"/g,""")}function q(e){return!N||!("object"==typeof e&&(N in e||void 0!==e[N]))}function V(e){return"[object Array]"===Q(e)&&q(e)}function W(e){return"[object RegExp]"===Q(e)&&q(e)}function K(e){if(j)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!D)return!1;try{return D.call(e),!0}catch(t){}return!1}O=function e(t,o,i,f){var m=o||{};if(G(m,"quoteStyle")&&!G(M,m.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(m,"maxStringLength")&&("number"==typeof m.maxStringLength?m.maxStringLength<0&&m.maxStringLength!==1/0:null!==m.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var b=!G(m,"customInspect")||m.customInspect;if("boolean"!=typeof b&&"symbol"!==b)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(m,"indent")&&null!==m.indent&&"\t"!==m.indent&&!(parseInt(m.indent,10)===m.indent&&m.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(m,"numericSeparator")&&"boolean"!=typeof m.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=m.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return z(t,m);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var O=String(t);return _?C(t,O):O}if("bigint"==typeof t){var A=String(t)+"n";return _?C(t,A):A}var P=void 0===m.depth?5:m.depth;if(void 0===i&&(i=0),i>=P&&P>0&&"object"==typeof t)return V(t)?"[Array]":"[Object]";var x=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=E.call(Array(e.indent+1)," ")}return{base:r,prev:E.call(Array(t+1),r)}}(m,i);if(void 0===f)f=[];else if($(f,t)>=0)return"[Circular]";function L(t,r,n){if(r&&(f=I.call(f)).push(r),n){var o={depth:m.depth};return G(m,"quoteStyle")&&(o.quoteStyle=m.quoteStyle),e(t,o,i+1,f)}return e(t,m,i+1,f)}if("function"==typeof t&&!W(t)){var H=function(e){if(e.name)return e.name;var t=y.call(d.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),J=ne(t,L);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(J.length>0?" { "+E.call(J,", ")+" }":"")}if(K(t)){var X=j?g.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):D.call(t);return"object"!=typeof t||j?X:Z(X)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var oe="<"+v.call(String(t.nodeName)),ie=t.attributes||[],ae=0;ae<ie.length;ae++)oe+=" "+ie[ae].name+"="+F(Y(ie[ae].value),"double",m);return oe+=">",t.childNodes&&t.childNodes.length&&(oe+="..."),oe+="</"+v.call(String(t.nodeName))+">"}if(V(t)){if(0===t.length)return"[]";var se=ne(t,L);return x&&!function(e){for(var t=0;t<e.length;t++)if($(e[t],"\n")>=0)return!1;return!0}(se)?"["+re(se,x)+"]":"[ "+E.call(se,", ")+" ]"}if(function(e){return"[object Error]"===Q(e)&&q(e)}(t)){var ce=ne(t,L);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===ce.length?"["+String(t)+"]":"{ ["+String(t)+"] "+E.call(ce,", ")+" }":"{ ["+String(t)+"] "+E.call(S.call("[cause]: "+L(t.cause),ce),", ")+" }"}if("object"==typeof t&&b){if(U&&"function"==typeof t[U]&&R)return R(t,{depth:P-i});if("symbol"!==b&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!r||!e||"object"!=typeof e)return!1;try{r.call(e);try{a.call(e)}catch(oe){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ue=[];return n&&n.call(t,function(e,r){ue.push(L(r,t,!0)+" => "+L(e,t))}),te("Map",r.call(t),ue,x)}if(function(e){if(!a||!e||"object"!=typeof e)return!1;try{a.call(e);try{r.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var pe=[];return s&&s.call(t,function(e){pe.push(L(e,t))}),te("Set",a.call(t),pe,x)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e,c);try{u.call(e,u)}catch(oe){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return ee("WeakMap");if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{c.call(e,c)}catch(oe){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return ee("WeakSet");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return ee("WeakRef");if(function(e){return"[object Number]"===Q(e)&&q(e)}(t))return Z(L(Number(t)));if(function(e){if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(t){}return!1}(t))return Z(L(k.call(t)));if(function(e){return"[object Boolean]"===Q(e)&&q(e)}(t))return Z(l.call(t));if(function(e){return"[object String]"===Q(e)&&q(e)}(t))return Z(L(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==w&&t===w)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Q(e)&&q(e)}(t)&&!W(t)){var le=ne(t,L),fe=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",ye=!fe&&N&&Object(t)===t&&N in t?h.call(Q(t),8,-1):de?"Object":"",he=(fe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ye||de?"["+E.call(S.call([],ye||[],de||[]),": ")+"] ":"");return 0===le.length?he+"{}":x?he+"{"+re(le,x)+"}":he+"{ "+E.call(le,", ")+" }"}return String(t)};var J=Object.prototype.hasOwnProperty||function(e){return e in this};function G(e,t){return J.call(e,t)}function Q(e){return f.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function z(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return z(h.call(e,0,t.maxStringLength),t)+n}var o=H[t.quoteStyle||"single"];return o.lastIndex=0,F(g.call(g.call(e,o,"\\$1"),/[\x00-\x1f]/g,X),"single",t)}function X(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+m.call(t.toString(16))}function Z(e){return"Object("+e+")"}function ee(e){return e+" { ? }"}function te(e,t,r,n){return e+" ("+t+") {"+(n?re(r,n):E.call(r,", "))+"}"}function re(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+E.call(e,","+r)+"\n"+t.prev}function ne(e,t){var r=V(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=G(e,o)?t(e[o],e):""}var i,a="function"==typeof x?x(e):[];if(j){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)G(e,c)&&(r&&String(Number(c))===c&&c<e.length||j&&i["$"+c]instanceof Symbol||(b.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof x)for(var u=0;u<a.length;u++)T.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}return O}function at(){if(k)return P;k=1;var e=/* @__PURE__ */it(),t=/* @__PURE__ */I(),r=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n};return P=function(){var n,o={assert:function(r){if(!o.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(e){var t=n&&n.next,o=function(e,t){if(e)return r(e,t,!0)}(n,e);return o&&t&&t===o&&(n=void 0),!!o},get:function(e){return function(e,t){if(e){var n=r(e,t);return n&&n.value}}(n,e)},has:function(e){return function(e,t){return!!e&&!!r(e,t)}(n,e)},set:function(e,t){n||(n={next:void 0}),function(e,t,n){var o=r(e,t);o?o.value=n:e.next={key:t,next:e.next,value:n}}(n,e,t)}};return o}}function st(){return D?x:(D=1,x=Object)}function ct(){return N?j:(N=1,j=Error)}function ut(){return B?T:(B=1,T=EvalError)}function pt(){return R?C:(R=1,C=RangeError)}function lt(){return U?L:(U=1,L=ReferenceError)}function ft(){return H?M:(H=1,M=SyntaxError)}function dt(){return Y?F:(Y=1,F=URIError)}function yt(){return V?q:(V=1,q=Math.abs)}function ht(){return K?W:(K=1,W=Math.floor)}function gt(){return G?J:(G=1,J=Math.max)}function mt(){return $?Q:($=1,Q=Math.min)}function vt(){return X?z:(X=1,z=Math.pow)}function bt(){return ee?Z:(ee=1,Z=Math.round)}function wt(){return re?te:(re=1,te=Number.isNaN||function(e){return e!=e})}function St(){if(oe)return ne;oe=1;var e=/* @__PURE__ */wt();return ne=function(t){return e(t)||0===t?t:t<0?-1:1}}function Et(){return ae?ie:(ae=1,ie=Object.getOwnPropertyDescriptor)}function It(){if(ce)return se;ce=1;var e=/* @__PURE__ */Et();if(e)try{e([],"length")}catch(t){e=null}return se=e}function _t(){if(pe)return ue;pe=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return ue=e}function Ot(){if(ye)return de;ye=1;var e="undefined"!=typeof Symbol&&Symbol,t=fe?le:(fe=1,le=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return de=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function At(){return ge?he:(ge=1,he="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function Pt(){return ve?me:(ve=1,me=/* @__PURE__ */st().getPrototypeOf||null)}function kt(){if(Ee)return Se;Ee=1;var e=function(){if(we)return be;we=1;var e=Object.prototype.toString,t=Math.max,r=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};return be=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t}(arguments),s=t(0,o.length-a.length),c=[],u=0;u<s;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var e=o.apply(this,r(a,arguments));return Object(e)===e?e:this}return o.apply(n,r(a,arguments))}),o.prototype){var p=function(){};p.prototype=o.prototype,i.prototype=new p,p.prototype=null}return i},be}();return Se=Function.prototype.bind||e}function xt(){return _e?Ie:(_e=1,Ie=Function.prototype.call)}function Dt(){return Ae?Oe:(Ae=1,Oe=Function.prototype.apply)}function jt(){if(De)return xe;De=1;var e=kt(),t=Dt(),r=xt(),n=ke?Pe:(ke=1,Pe="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return xe=n||e.call(r,t)}function Nt(){if(Ne)return je;Ne=1;var e=kt(),t=/* @__PURE__ */I(),r=xt(),n=jt();return je=function(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o)}}function Tt(){if(Be)return Te;Be=1;var e,t=Nt(),r=/* @__PURE__ */It();try{e=[].__proto__===Array.prototype}catch(a){if(!a||"object"!=typeof a||!("code"in a)||"ERR_PROTO_ACCESS"!==a.code)throw a}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Te=n&&"function"==typeof n.get?t([n.get]):"function"==typeof i&&function(e){return i(null==e?e:o(e))}}function Bt(){if(Ue)return Le;Ue=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=kt();return Le=r.call(e,t)}function Ct(){if(He)return Me;var e;He=1;var t=/* @__PURE__ */st(),r=/* @__PURE__ */ct(),n=/* @__PURE__ */ut(),o=/* @__PURE__ */pt(),i=/* @__PURE__ */lt(),a=/* @__PURE__ */ft(),s=/* @__PURE__ */I(),c=/* @__PURE__ */dt(),u=/* @__PURE__ */yt(),p=/* @__PURE__ */ht(),l=/* @__PURE__ */gt(),f=/* @__PURE__ */mt(),d=/* @__PURE__ */vt(),y=/* @__PURE__ */bt(),h=/* @__PURE__ */St(),g=Function,m=function(e){try{return g('"use strict"; return ('+e+").constructor;")()}catch(t){}},v=/* @__PURE__ */It(),b=/* @__PURE__ */_t(),w=function(){throw new s},S=v?function(){try{return w}catch(e){try{return v(arguments,"callee").get}catch(t){return w}}}():w,E=Ot()(),_=function(){if(Re)return Ce;Re=1;var e=At(),t=Pt(),r=/* @__PURE__ */Tt();return Ce=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function(e){return r(e)}:null}(),O=Pt(),A=At(),P=Dt(),k=xt(),x={},D="undefined"!=typeof Uint8Array&&_?_(Uint8Array):e,j={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&_?_([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":x,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&_?_(_([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&_?_(/* @__PURE__ */(new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&_?_(/* @__PURE__ */(new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&_?_(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":S,"%TypedArray%":D,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":P,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":O,"%Math.abs%":u,"%Math.floor%":p,"%Math.max%":l,"%Math.min%":f,"%Math.pow%":d,"%Math.round%":y,"%Math.sign%":h,"%Reflect.getPrototypeOf%":A};if(_)try{null.error}catch(W){var N=_(_(W));j["%Error.prototype%"]=N}var T=function e(t){var r;if("%AsyncFunction%"===t)r=m("async function () {}");else if("%GeneratorFunction%"===t)r=m("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=m("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&_&&(r=_(o.prototype))}return j[t]=r,r},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=kt(),R=/* @__PURE__ */Bt(),L=C.call(k,Array.prototype.concat),U=C.call(P,Array.prototype.splice),M=C.call(k,String.prototype.replace),H=C.call(k,String.prototype.slice),F=C.call(k,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,V=function(e,t){var r,n=e;if(R(B,n)&&(n="%"+(r=B[n])[0]+"%"),R(j,n)){var o=j[n];if(o===x&&(o=T(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new a("intrinsic "+e+" does not exist!")};return Me=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===F(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return M(e,Y,function(e,t,r,o){n[n.length]=r?M(o,q,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=V("%"+n+"%",t),i=o.name,c=o.value,u=!1,p=o.alias;p&&(n=p[0],U(r,L([0,1],p)));for(var l=1,f=!0;l<r.length;l+=1){var d=r[l],y=H(d,0,1),h=H(d,-1);if(('"'===y||"'"===y||"`"===y||'"'===h||"'"===h||"`"===h)&&y!==h)throw new a("property names with quotes must have matching quotes");if("constructor"!==d&&f||(u=!0),R(j,i="%"+(n+="."+d)+"%"))c=j[i];else if(null!=c){if(!(d in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(v&&l+1>=r.length){var g=v(c,d);c=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[d]}else f=R(c,d),c=c[d];f&&!u&&(j[i]=c)}}return c},Me}function Rt(){if(Ye)return Fe;Ye=1;var e=/* @__PURE__ */Ct(),t=Nt(),r=t([e("%String.prototype.indexOf%")]);return Fe=function(n,o){var i=e(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?t([i]):i}}function Lt(){if(Ve)return qe;Ve=1;var e=/* @__PURE__ */Ct(),t=/* @__PURE__ */Rt(),r=/* @__PURE__ */it(),n=/* @__PURE__ */I(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),c=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return qe=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+r(e))},delete:function(t){if(e){var r=c(e,t);return 0===u(e)&&(e=void 0),r}return!1},get:function(t){if(e)return i(e,t)},has:function(t){return!!e&&s(e,t)},set:function(t,r){e||(e=new o),a(e,t,r)}};return t}}function Ut(){if(Ge)return Je;Ge=1;var e=/* @__PURE__ */I(),t=/* @__PURE__ */it(),r=at(),n=Lt(),o=function(){if(Ke)return We;Ke=1;var e=/* @__PURE__ */Ct(),t=/* @__PURE__ */Rt(),r=/* @__PURE__ */it(),n=Lt(),o=/* @__PURE__ */I(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return We=i?function(){var e,t,p={assert:function(e){if(!p.has(e))throw new o("Side channel does not contain "+r(e))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(e)return u(e,r)}else if(n&&t)return t.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&e?a(e,r):t&&t.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):!!t&&t.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new i),s(e,r,o)):n&&(t||(t=n()),t.set(r,o))}};return p}:n}(),i=o||n||r;return Je=function(){var r,n={assert:function(r){if(!n.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(e){return!!r&&r.delete(e)},get:function(e){return r&&r.get(e)},has:function(e){return!!r&&r.has(e)},set:function(e,t){r||(r=i()),r.set(e,t)}};return n}}function Mt(){if($e)return Qe;$e=1;var e=String.prototype.replace,t=/%20/g,r="RFC3986";return Qe={default:r,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}}function Ht(){if(Xe)return ze;Xe=1;var e=/* @__PURE__ */Mt(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},i=1024;return ze={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o<t.length;++o)for(var i=t[o],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],p=a[u];"object"==typeof p&&null!==p&&-1===n.indexOf(p)&&(t.push({obj:a,prop:u}),n.push(p))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(r(n)){for(var o=[],i=0;i<n.length;++i)void 0!==n[i]&&o.push(n[i]);t.obj[t.prop]=o}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(o){return n}},encode:function(t,r,o,a,s){if(0===t.length)return t;var c=t;if("symbol"==typeof t?c=Symbol.prototype.toString.call(t):"string"!=typeof t&&(c=String(t)),"iso-8859-1"===o)return escape(c).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var u="",p=0;p<c.length;p+=i){for(var l=c.length>=i?c.slice(p,p+i):c,f=[],d=0;d<l.length;++d){var y=l.charCodeAt(d);45===y||46===y||95===y||126===y||y>=48&&y<=57||y>=65&&y<=90||y>=97&&y<=122||s===e.RFC1738&&(40===y||41===y)?f[f.length]=l.charAt(d):y<128?f[f.length]=n[y]:y<2048?f[f.length]=n[192|y>>6]+n[128|63&y]:y<55296||y>=57344?f[f.length]=n[224|y>>12]+n[128|y>>6&63]+n[128|63&y]:(d+=1,y=65536+((1023&y)<<10|1023&l.charCodeAt(d)),f[f.length]=n[240|y>>18]+n[128|y>>12&63]+n[128|y>>6&63]+n[128|63&y])}u+=f.join("")}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(r(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(t(e[o]));return n}return t(e)},merge:function e(n,i,a){if(!i)return n;if("object"!=typeof i&&"function"!=typeof i){if(r(n))n.push(i);else{if(!n||"object"!=typeof n)return[n,i];(a&&(a.plainObjects||a.allowPrototypes)||!t.call(Object.prototype,i))&&(n[i]=!0)}return n}if(!n||"object"!=typeof n)return[n].concat(i);var s=n;return r(n)&&!r(i)&&(s=o(n,a)),r(n)&&r(i)?(i.forEach(function(r,o){if(t.call(n,o)){var i=n[o];i&&"object"==typeof i&&r&&"object"==typeof r?n[o]=e(i,r,a):n.push(r)}else n[o]=r}),n):Object.keys(i).reduce(function(r,n){var o=i[n];return t.call(r,n)?r[n]=e(r[n],o,a):r[n]=o,r},s)}}}function Ft(){if(et)return Ze;et=1;var e=Ut(),t=/* @__PURE__ */Ht(),r=/* @__PURE__ */Mt(),n=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Array.isArray,a=Array.prototype.push,s=function(e,t){a.apply(e,i(t)?t:[t])},c=Date.prototype.toISOString,u=r.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},l={},f=function r(n,o,a,c,u,f,d,y,h,g,m,v,b,w,S,E,I,_){for(var O,A=n,P=_,k=0,x=!1;void 0!==(P=P.get(l))&&!x;){var D=P.get(n);if(k+=1,void 0!==D){if(D===k)throw new RangeError("Cyclic object value");x=!0}void 0===P.get(l)&&(k=0)}if("function"==typeof g?A=g(o,A):A instanceof Date?A=b(A):"comma"===a&&i(A)&&(A=t.maybeMap(A,function(e){return e instanceof Date?b(e):e})),null===A){if(f)return h&&!E?h(o,p.encoder,I,"key",w):o;A=""}if("string"==typeof(O=A)||"number"==typeof O||"boolean"==typeof O||"symbol"==typeof O||"bigint"==typeof O||t.isBuffer(A))return h?[S(E?o:h(o,p.encoder,I,"key",w))+"="+S(h(A,p.encoder,I,"value",w))]:[S(o)+"="+S(String(A))];var j,N=[];if(void 0===A)return N;if("comma"===a&&i(A))E&&h&&(A=t.maybeMap(A,h)),j=[{value:A.length>0?A.join(",")||null:void 0}];else if(i(g))j=g;else{var T=Object.keys(A);j=m?T.sort(m):T}var B=y?String(o).replace(/\./g,"%2E"):String(o),C=c&&i(A)&&1===A.length?B+"[]":B;if(u&&i(A)&&0===A.length)return C+"[]";for(var R=0;R<j.length;++R){var L=j[R],U="object"==typeof L&&L&&void 0!==L.value?L.value:A[L];if(!d||null!==U){var M=v&&y?String(L).replace(/\./g,"%2E"):String(L),H=i(A)?"function"==typeof a?a(C,M):C:C+(v?"."+M:"["+M+"]");_.set(n,k);var F=e();F.set(l,_),s(N,r(U,H,a,c,u,f,d,y,"comma"===a&&E&&i(A)?null:h,g,m,v,b,w,S,E,I,F))}}return N};return Ze=function(t,a){var c,u=t,l=function(e){if(!e)return p;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=r.default;if(void 0!==e.format){if(!n.call(r.formatters,e.format))throw new TypeError("Unknown format option provided.");a=e.format}var s,c=r.formatters[a],u=p.filter;if(("function"==typeof e.filter||i(e.filter))&&(u=e.filter),s=e.arrayFormat in o?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=void 0===e.allowDots?!0===e.encodeDotInKeys||p.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:l,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:s,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:u,format:a,formatter:c,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(a);"function"==typeof l.filter?u=(0,l.filter)("",u):i(l.filter)&&(c=l.filter);var d=[];if("object"!=typeof u||null===u)return"";var y=o[l.arrayFormat],h="comma"===y&&l.commaRoundTrip;c||(c=Object.keys(u)),l.sort&&c.sort(l.sort);for(var g=e(),m=0;m<c.length;++m){var v=c[m],b=u[v];l.skipNulls&&null===b||s(d,f(b,v,y,h,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,g))}var w=d.join(l.delimiter),S=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),w.length>0?S+w:""}}function Yt(){if(rt)return tt;rt=1;var e=/* @__PURE__ */Ht(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},i=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},a=function(r,n,o,a){if(r){var s=o.allowDots?r.replace(/\.([^.[]+)/g,"[$1]"):r,c=/(\[[^[\]]*])/g,u=o.depth>0&&/(\[[^[\]]*])/.exec(s),p=u?s.slice(0,u.index):s,l=[];if(p){if(!o.plainObjects&&t.call(Object.prototype,p)&&!o.allowPrototypes)return;l.push(p)}for(var f=0;o.depth>0&&null!==(u=c.exec(s))&&f<o.depth;){if(f+=1,!o.plainObjects&&t.call(Object.prototype,u[1].slice(1,-1))&&!o.allowPrototypes)return;l.push(u[1])}if(u){if(!0===o.strictDepth)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");l.push("["+s.slice(u.index)+"]")}return function(t,r,n,o){var a=0;if(t.length>0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");a=Array.isArray(r)&&r[s]?r[s].length:0}for(var c=o?r:i(r,n,a),u=t.length-1;u>=0;--u){var p,l=t[u];if("[]"===l&&n.parseArrays)p=n.allowEmptyArrays&&(""===c||n.strictNullHandling&&null===c)?[]:e.combine([],c);else{p=n.plainObjects?{__proto__:null}:{};var f="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,d=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,y=parseInt(d,10);n.parseArrays||""!==d?!isNaN(y)&&l!==d&&String(y)===d&&y>=0&&n.parseArrays&&y<=n.arrayLimit?(p=[])[y]=c:"__proto__"!==d&&(p[d]=c):p={0:c}}c=p}return c}(l,n,o,a)}};return tt=function(s,c){var u=function(t){if(!t)return n;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===t.charset?n.charset:t.charset,o=void 0===t.duplicates?n.duplicates:t.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||n.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:n.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:n.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:n.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:n.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:n.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:n.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(c);if(""===s||null==s)return u.plainObjects?{__proto__:null}:{};for(var p="string"==typeof s?function(a,s){var c={__proto__:null},u=s.ignoreQueryPrefix?a.replace(/^\?/,""):a;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var p=s.parameterLimit===1/0?void 0:s.parameterLimit,l=u.split(s.delimiter,s.throwOnLimitExceeded?p+1:p);if(s.throwOnLimitExceeded&&l.length>p)throw new RangeError("Parameter limit exceeded. Only "+p+" parameter"+(1===p?"":"s")+" allowed.");var f,d=-1,y=s.charset;if(s.charsetSentinel)for(f=0;f<l.length;++f)0===l[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[f]?y="utf-8":"utf8=%26%2310003%3B"===l[f]&&(y="iso-8859-1"),d=f,f=l.length);for(f=0;f<l.length;++f)if(f!==d){var h,g,m=l[f],v=m.indexOf("]="),b=-1===v?m.indexOf("="):v+1;-1===b?(h=s.decoder(m,n.decoder,y,"key"),g=s.strictNullHandling?null:""):(h=s.decoder(m.slice(0,b),n.decoder,y,"key"),g=e.maybeMap(i(m.slice(b+1),s,r(c[h])?c[h].length:0),function(e){return s.decoder(e,n.decoder,y,"value")})),g&&s.interpretNumericEntities&&"iso-8859-1"===y&&(g=o(String(g))),m.indexOf("[]=")>-1&&(g=r(g)?[g]:g);var w=t.call(c,h);w&&"combine"===s.duplicates?c[h]=e.combine(c[h],g):w&&"last"!==s.duplicates||(c[h]=g)}return c}(s,u):s,l=u.plainObjects?{__proto__:null}:{},f=Object.keys(p),d=0;d<f.length;++d){var y=f[d],h=a(y,p[y],u,"string"==typeof s);l=e.merge(l,h,u)}return!0===u.allowSparse?l:e.compact(l)}}function qt(){if(ot)return nt;ot=1;var e=/* @__PURE__ */Ft(),t=/* @__PURE__ */Yt();return nt={formats:/* @__PURE__ */Mt(),parse:t,stringify:e}}m||/* @__PURE__ */S(/* @__PURE__ */qt()).parse(location.search,{ignoreQueryPrefix:!0,arrayLimit:100,allowDots:!0});const Vt="undefined"!=typeof window?window:"undefined"!=typeof global?global:{};h.mpWebview,h.wxBrowser,h.yuanbaoApp,h.tenVideo,h.tenNews,h.tenSports,h.mobileBrowser,h.pcBrowser,g.shareAgentInfoPage,g.shareAgentChatPage,g.shareAgentChatPage,g.adPage;let Wt;try{Wt=JSON.parse(function(e){try{return"undefined"!=typeof wx&&wx.getStorageSync?wx.getStorageSync(e):sessionStorage.getItem(e)||"{}"}catch(t){return"{}"}}("HY_TRID_STORE")||"{}")}catch(kr){Wt={}}Vt.HY_TRID_STORE=Vt.HY_TRID_STORE||Wt;var Kt,Jt={exports:{}};const Gt=/* @__PURE__ */S((Kt||(Kt=1,Jt.exports=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)},t=function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};function r(e,t,r,n){return new(r||(r=Promise))(function(t,o){function i(e){try{s(n.next(e))}catch(t){o(t)}}function a(e){try{s(n.throw(e))}catch(t){o(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r(function(e){e(n)})).then(i,a)}s((n=n.apply(e,[])).next())})}function n(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(c){s=[6,c],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}"function"==typeof SuppressedError&&SuppressedError;var o="__BEACON_",i="__BEACON_deviceId",a="last_report_time",s="sending_event_ids",c="beacon_config",u="beacon_config_request_time",p=/* @__PURE__ */new Set(["rqd_js_init","rqd_applaunched"]),l=function(){function e(){var e=this;this.emit=function(t,r){if(e){var n,o=e.__EventsList[t];if(null==o?void 0:o.length){o=o.slice();for(var i=0;i<o.length;i++){n=o[i];try{var a=n.callback.apply(e,[r]);if(1===n.type&&e.remove(t,n.callback),!1===a)break}catch(s){throw s}}}return e}},this.__EventsList={}}return e.prototype.indexOf=function(e,t){for(var r=0;r<e.length;r++)if(e[r].callback===t)return r;return-1},e.prototype.on=function(e,t,r){if(void 0===r&&(r=0),this){var n=this.__EventsList[e];if(n||(n=this.__EventsList[e]=[]),-1===this.indexOf(n,t)){var o={name:e,type:r||0,callback:t};return n.push(o),this}return this}},e.prototype.one=function(e,t){this.on(e,t,1)},e.prototype.remove=function(e,t){if(this){var r=this.__EventsList[e];if(!r)return null;if(!t){try{delete this.__EventsList[e]}catch(o){}return null}if(r.length){var n=this.indexOf(r,t);r.splice(n,1)}return this}},e}();function f(e,t){for(var r={},n=0,o=Object.keys(e);n<o.length;n++){var i=o[n],a=e[i];if("string"==typeof a)r[d(i)]=d(a);else{if(t)throw new Error("value mast be string !!!!");r[d(String(i))]=d(String(a))}}return r}function d(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(t){return""}}function y(e){return String(e.A99)+String(e.A100)}var h=function(){},g=function(){function e(e){var r=this;this.lifeCycle=new l,this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(e){if(!e||!e.reduce||!e.length)throw new TypeError("createPipeline 方法需要传入至少有一个 pipe 的数组");return 1===e.length?function(t,r){e[0](t,r||h)}:e.reduce(function(e,t){return function(r,n){return void 0===n&&(n=h),e(r,function(e){return null==t?void 0:t(e,n)})}})}([function(e){r.send({url:r.strategy.getUploadUrl(),data:e,method:"post",contentType:"application/json;charset=UTF-8"},function(){var t=r.config.onReportSuccess;"function"==typeof t&&t(JSON.stringify(e.events))},function(){var t=r.config.onReportFail;"function"==typeof t&&t(JSON.stringify(e.events))})}]),function(e,t){if(!e)throw t instanceof Error?t:new Error(t)}(Boolean(e.appkey),"appkey must be initial"),this.config=t(t({},e),{needReportRqdEvent:null==e.needReportRqdEvent||e.needReportRqdEvent})}return e.prototype.onUserAction=function(e,t){this.preReport(e,t,!1)},e.prototype.onDirectUserAction=function(e,t){this.preReport(e,t,!0)},e.prototype.preReport=function(e,t,r){e?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(e)||this.strategy.isSampleEvent(e)||!this.config.needReportRqdEvent&&p.has(e)||this.onReport(e,t,r)):this.errorReport.reportError("602"," no eventCode")},e.prototype.addAdditionalParams=function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];this.additionalParams[n]=e[n]}},e.prototype.setChannelId=function(e){this.commonInfo.channelID=String(e)},e.prototype.setOpenId=function(e){this.commonInfo.openid=String(e)},e.prototype.setUnionid=function(e){this.commonInfo.unid=String(e)},e.prototype.getDeviceId=function(){return this.commonInfo.deviceId},e.prototype.getCommonInfo=function(){return this.commonInfo},e.prototype.removeSendingId=function(e){try{var t=JSON.parse(this.storage.getItem(s)),r=t.indexOf(e);-1!=r&&(t.splice(r,1),this.storage.setItem(s,JSON.stringify(t)))}catch(n){}},e}(),m=function(){function e(e,t,r,n){this.requestParams={},this.network=n,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=e.appkey,this.requestParams.platform=r,this.requestParams.uin=t.deviceId,this.requestParams.model="",this.requestParams.os=r,this.requestParams.app_version=e.appVersion,this.requestParams.sdk_version=t.sdkVersion,this.requestParams.error_stack="",this.uploadUrl=e.isOversea?"https://htrace.wetvinfo.com/kv":"https://h.trace.qq.com/kv"}return e.prototype.reportError=function(e,t){this.requestParams._dc=Math.random(),this.requestParams.error_msg=t,this.requestParams.error_code=e,this.network.get(this.uploadUrl,{params:this.requestParams}).catch(function(e){})},e}(),v=function(){function e(e,t,r,n,o){this.strategy={isEventUpOnOff:!0,httpsUploadUrl:"https://otheve.beacon.qq.com/analytics/v2_upload",requestInterval:30,blacklist:[],samplelist:[]},this.realSample={},this.appkey="",this.needQueryConfig=!0,this.appkey=t.appkey,this.storage=n,this.needQueryConfig=e;try{var i=JSON.parse(this.storage.getItem(c));i&&this.processData(i)}catch(a){}t.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!t.isOversea&&this.needRequestConfig()&&this.requestConfig(t.appVersion,r,o)}return e.prototype.requestConfig=function(e,t,r){var n=this;this.storage.setItem(u,Date.now().toString()),r.post("https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:"undefined"==typeof wx?"3":"4",mainAppKey:this.appkey,appVersion:e,sdkVersion:t.sdkVersion,osVersion:t.userAgent,model:"",packageName:"",params:{A3:t.deviceId}}).then(function(e){if(0==e.data.ret)try{var t=JSON.parse(e.data.beaconConfig);t&&(n.processData(t),n.storage.setItem(c,e.data.beaconConfig))}catch(r){}else n.processData(null),n.storage.setItem(c,"")}).catch(function(e){})},e.prototype.processData=function(e){var t,r,n,o,i;this.strategy.isEventUpOnOff=null!==(t=null==e?void 0:e.isEventUpOnOff)&&void 0!==t?t:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=null!==(r=null==e?void 0:e.httpsUploadUrl)&&void 0!==r?r:this.strategy.httpsUploadUrl,this.strategy.requestInterval=null!==(n=null==e?void 0:e.requestInterval)&&void 0!==n?n:this.strategy.requestInterval,this.strategy.blacklist=null!==(o=null==e?void 0:e.blacklist)&&void 0!==o?o:this.strategy.blacklist,this.strategy.samplelist=null!==(i=null==e?void 0:e.samplelist)&&void 0!==i?i:this.strategy.samplelist;for(var a=0,s=this.strategy.samplelist;a<s.length;a++){var c=s[a].split(",");2==c.length&&(this.realSample[c[0]]=c[1])}},e.prototype.needRequestConfig=function(){if(!this.needQueryConfig)return!1;var e=Number(this.storage.getItem(u));return Date.now()-e>60*this.strategy.requestInterval*1e3},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e)},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]<Math.floor(Math.random()*Math.floor(1e4))},e}(),b="session_storage_key",w=function(){function e(e,t,r){this.getSessionStackDepth=0,this.beacon=r,this.storage=e,this.duration=t,this.appkey=r.config.appkey}return e.prototype.getSession=function(){this.getSessionStackDepth+=1;var e=this.storage.getItem(b);if(!e)return this.createSession();var t="",r=0;try{var n=JSON.parse(e)||{sessionId:void 0,sessionStart:void 0};if(!n.sessionId||!n.sessionStart)return this.createSession();var o=Number(this.storage.getItem(a));if(Date.now()-o>this.duration)return this.createSession();t=n.sessionId,r=n.sessionStart,this.getSessionStackDepth=0}catch(i){}return{sessionId:t,sessionStart:r}},e.prototype.createSession=function(){var e=Date.now(),t={sessionId:this.appkey+"_"+e.toString(),sessionStart:e};this.storage.setItem(b,JSON.stringify(t)),this.storage.setItem(a,e.toString());var r="is_new_user",n=this.storage.getItem(r);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:n?"N":"Y"}),this.storage.setItem(r,JSON.stringify(!1)),t},e}();function S(){var e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,r=e.indexOf("Edge")>-1&&!t,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){new RegExp("MSIE (\\d+\\.\\d+);").test(e);var o=parseFloat(RegExp.$1);return 7==o?7:8==o?8:9==o?9:10==o?10:6}return r?-2:n?11:-1}function E(e,t){var r,n;return(r="https://tun-cos-1258344701.file.myqcloud.com/fp.js",void 0===n&&(n=Date.now()+"-"+Math.random()),new Promise(function(e,t){if(document.getElementById(n))e(void 0);else{var o=document.getElementsByTagName("head")[0],i=document.createElement("script");i.onload=function(){return function(){i.onload=null,e(void 0)}},i.onerror=function(e){i.onerror=null,o.removeChild(i),t(e)},i.src=r,i.id=n,o.appendChild(i)}})).then(function(){(new Fingerprint).getQimei36(e,t)}).catch(function(e){}),""}var I=function(){function e(e,t){void 0===t&&(t=5e3),this.id="",this.queueKey="",this.maxLockTime=5e3,this.id=Math.random().toString(16).substring(2,9),this.queueKey="dt_task_lock_queue_"+e,this.maxLockTime=t,this.releaseLockWhenUnload()}return e.prototype.getLock=function(){var e,t=this;if(!window||!localStorage)return!1;try{var r=JSON.parse(localStorage.getItem(this.queueKey)||"[]");-1===(r=r.filter(function(e){return Date.now()-e.time<t.maxLockTime})).findIndex(function(e){return e.id===t.id})&&r.push({id:this.id,time:Date.now()});var n=!1;return(null===(e=r[0])||void 0===e?void 0:e.id)===this.id&&(r[0].time=Date.now(),n=!0),localStorage.setItem(this.queueKey,JSON.stringify(r)),n}catch(o){return!1}},e.prototype.releaseLock=function(){var e;if(window&&localStorage){var t=JSON.parse(localStorage.getItem(this.queueKey)||"[]");(null===(e=t[0])||void 0===e?void 0:e.id)===this.id&&(t.shift(),localStorage.setItem(this.queueKey,JSON.stringify(t)))}},e.prototype.isFirstInQue=function(){var e;return(null===(e=JSON.parse(localStorage.getItem(this.queueKey)||"[]")[0])||void 0===e?void 0:e.id)===this.id},e.prototype.releaseLockWhenUnload=function(){var e=this;window&&window.addEventListener("beforeunload",function(){e.releaseLock()})},e}(),_=function(){function e(e){this.config=e}return e.prototype.openDB=function(){var e=this;return new Promise(function(t,r){var n=e.config,o=n.name,i=n.version,a=n.stores,s=indexedDB.open(o,i);s.onsuccess=function(){e.db=s.result,t()},s.onerror=function(e){r(e)},s.onupgradeneeded=function(){e.db=s.result;try{null==a||a.forEach(function(t){e.createStore(t)})}catch(t){r(t)}}})},e.prototype.useStore=function(e){return this.storeName=e,this},e.prototype.deleteDB=function(){var e=this;return this.closeDB(),new Promise(function(t){var r=indexedDB.deleteDatabase(e.config.name);r.onsuccess=function(){return t()},r.onerror=function(e){return t()}})},e.prototype.closeDB=function(){var e;null===(e=this.db)||void 0===e||e.close(),this.db=null},e.prototype.getStoreCount=function(){var e=this;return new Promise(function(t){var r=e.getStore("readonly").count();r.onsuccess=function(){return t(r.result)},r.onerror=function(e){return t(0)}})},e.prototype.clearStore=function(){var e=this;return new Promise(function(t){var r=e.getStore("readwrite").clear();r.onsuccess=function(){return t()},r.onerror=function(e){return t()}})},e.prototype.put=function(e,t){var r=this;return new Promise(function(n){var o=r.getStore("readwrite").put(e,t);o.onsuccess=function(){n(o.result)},o.onerror=function(e){return n(void 0)}})},e.prototype.get=function(e,t){var r=this;return new Promise(function(n){var o=r.getStore().index(e).get(t);o.onsuccess=function(){n(o.result)},o.onerror=function(e){return n(void 0)}})},e.prototype.remove=function(e,t){var r=this;return new Promise(function(n){var o=r.getStore("readwrite").index(e).objectStore.delete(t);o.onsuccess=function(){n(o.result)},o.onerror=function(e){return n(void 0)}})},e.prototype.removeList=function(e,t){var r=this;return new Promise(function(n){var o=r.getStore("readwrite").index(e),i=[];t.forEach(function(e){o.objectStore.delete(e).onerror=function(){i.push(e)}}),n(i)})},e.prototype.getStoreAllData=function(e){var t=this;return void 0===e&&(e=1/0),new Promise(function(r){var n=t.getStore("readonly");if("function"==typeof n.getAll){var o=n.getAll(null,e);o.onsuccess=function(){r(o.result)},o.onerror=function(){return r([])}}else{var i=n.openCursor(),a=[];i.onsuccess=function(){var t=i.result;if(t&&a.length<e)try{t.value&&a.push(t.value),t.continue()}catch(n){r(a)}else r(a)},i.onerror=function(){return r([])}}})},e.prototype.removeDataByIndex=function(e,t,r,n,o){var i=this;return new Promise(function(a){var s=i.getStore("readwrite").index(e),c=IDBKeyRange.bound(t,r,n,o),u=s.openCursor(c);u.onerror=function(e){return a()},u.onsuccess=function(e){var t=e.target.result;t?(t.delete(),t.continue()):a()}})},e.prototype.createStore=function(e){var t=e.name,r=e.indexes,n=void 0===r?[]:r,o=e.options;if(this.db){this.db.objectStoreNames.contains(t)&&this.db.deleteObjectStore(t);var i=this.db.createObjectStore(t,o);n.forEach(function(e){i.createIndex(e.indexName,e.keyPath,e.options)})}},e.prototype.getStore=function(e){var t;return void 0===e&&(e="readonly"),null===(t=this.db)||void 0===t?void 0:t.transaction(this.storeName,e).objectStore(this.storeName)},e}(),O="event_table_v4",A="eventId",P="eventTime",k=function(){function e(e,t){this.isReady=!1,this.taskQueue=Promise.resolve(),this.db=new _({name:"Beacon_"+e+"_V4",version:1,stores:[{name:O,options:{keyPath:A},indexes:[{indexName:A,keyPath:A,options:{unique:!0}},{indexName:P,keyPath:"value.eventTime",options:{unique:!1}}]}]}),this.open(t)}return e.prototype.closeDB=function(){this.db.closeDB()},e.prototype.getCount=function(){var e=this;return this.readyExec(function(){return e.db.getStoreCount()})},e.prototype.setItem=function(e,t){var r=this;return this.readyExec(function(){return r.db.put({eventId:e,value:t})})},e.prototype.getItem=function(e){return r(this,void 0,void 0,function(){var t=this;return n(this,function(r){return[2,this.readyExec(function(){return t.db.get(e,A)})]})})},e.prototype.removeItem=function(e){var t=this;return this.readyExec(function(){return t.db.remove(A,e)})},e.prototype.removeItemList=function(e){var t=this;return this.readyExec(function(){return t.db.removeList(A,e)})},e.prototype.removeOutOfTimeData=function(e){var t=this;void 0===e&&(e=7);var r=/* @__PURE__ */(new Date).setHours(0,0,0,0)-24*e*60*60*1e3;return this.readyExec(function(){return t.db.removeDataByIndex(P,"0",r.toString())})},e.prototype.updateItem=function(e,t){var r=this;return this.readyExec(function(){return r.db.put({eventId:e,value:t})})},e.prototype.getAll=function(e){var t=this;return this.readyExec(function(){return t.db.getStoreAllData(e).then(function(e){return e}).catch(function(e){return[]})})},e.prototype.open=function(e){return r(this,void 0,void 0,function(){var t,r=this;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.taskQueue=this.taskQueue.then(function(){return r.db.openDB()}),[4,this.taskQueue];case 1:return n.sent(),this.isReady=!0,this.db.useStore(O),[3,3];case 2:return t=n.sent(),null==e||e.openDBFail(t),[3,3];case 3:return[2]}})})},e.prototype.readyExec=function(e){return this.isReady?e():(this.taskQueue=this.taskQueue.then(function(){return e()}),this.taskQueue)},e}(),x=function(){function e(e){this.keyObject={},this.storage=e}return e.prototype.getCount=function(){return this.storage.getStoreCount()},e.prototype.removeItem=function(e){this.storage.removeItem(e),delete this.keyObject[e]},e.prototype.removeItemList=function(e){var t=this;e.forEach(function(e){return t.removeItem(e)})},e.prototype.setItem=function(e,t){var r=JSON.stringify(t);this.storage.setItem(e,r),this.keyObject[e]=t},e.prototype.getAll=function(){for(var e=Object.keys(this.keyObject),t=[],r=0;r<e.length;r++){var n=this.storage.getItem(e[r]);t.push(JSON.parse(n))}return t},e.prototype.removeOutOfTimeData=function(e){return Promise.resolve()},e.prototype.closeDB=function(){},e}(),D=function(){function e(e,t){var r=this;this.dbEventCount=0;var n=S(),o=function(){r.store=new x(t),r.dbEventCount=r.store.getCount()};n>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?o():(this.store=new k(e,{openDBFail:function(e){o()}}),this.getCount().then(function(e){r.dbEventCount=e}).catch(function(e){}))}return e.prototype.getCount=function(){return r(this,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,e.sent()];case 2:return e.sent(),[2,Promise.reject()];case 3:return[2]}})})},e.prototype.insertEvent=function(e,t){return r(this,void 0,void 0,function(){var r,o;return n(this,function(n){switch(n.label){case 0:if(this.dbEventCount>=1e3)return[2,Promise.reject()];r=y(e.mapValue),n.label=1;case 1:return n.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(r,e)];case 2:return[2,n.sent()];case 3:return o=n.sent(),t&&t(o,e),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}})})},e.prototype.getEvents=function(e){return void 0===e&&(e=100),r(this,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.store.getAll(e)];case 1:return[2,t.sent().map(function(e){return e.value})];case 2:return t.sent(),[2,Promise.resolve([])];case 3:return[2]}})})},e.prototype.removeEvent=function(e){return r(this,void 0,void 0,function(){var t;return n(this,function(r){switch(r.label){case 0:t=y(e.mapValue),r.label=1;case 1:return r.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(t)];case 2:return[2,r.sent()];case 3:return r.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}})})},e.prototype.removeEventList=function(e){return r(this,void 0,void 0,function(){var t,r;return n(this,function(n){switch(n.label){case 0:t=e.map(function(e){return y(e.mapValue)}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.store.removeItemList(t)];case 2:return r=n.sent(),this.dbEventCount-=t.length-(null==r?void 0:r.length)||0,[3,4];case 3:return n.sent(),[2,Promise.reject()];case 4:return[2]}})})},e.prototype.closeDB=function(){this.store.closeDB()},e}();function j(e){var r,n="POST"===e.method?function(e){var r=e.url,n=e.method,o=e.body,i=e.beforeSend,a=o;if(i){var s=i({url:r,method:n,data:o});a=null==s?void 0:s.data}return t(t({},e),{body:a})}(e):e,o=n.url,i=n.method,a=void 0===i?"GET":i,s=n.headers,c=void 0===s?{}:s,u=n.body,p=n.timeout,l=void 0===p?3e3:p;if(c.Accept="application/json, text/plain, */*","GET"===a){if(n.params){var f=-1===o.indexOf("?")?"?":"&";o=o+f+function(e){if(URLSearchParams)return(t=new URLSearchParams(e)).toString();for(var t="",r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];t+=o+"="+e[o]+"&"}return t}(n.params)}u=null}else c["Content-type"]="application/json;charset=utf-8";if("undefined"!=typeof fetch&&"undefined"!=typeof AbortController){var d,y=new AbortController,h=setTimeout(function(){return y.abort()},l);return fetch(o,{method:a,headers:c,body:u?JSON.stringify(u):void 0,signal:y.signal}).then(function(e){return(d=e).json()}).then(function(e){return{data:e,status:d.status,statusText:d.statusText,headers:d.headers}}).catch(function(e){return Promise.reject(new Error("[fetch] "+e.message))}).finally(function(){return clearTimeout(h)})}return r=e,new Promise(function(e,t){var n=r.url,o=r.method,i=r.headers,a=r.body,s=r.timeout,c=void 0===s?3e3:s,u=new XMLHttpRequest;u.open(o,n,!0),u.timeout=c,i&&Object.entries(i).forEach(function(e){var t=e[0],r=e[1];return u.setRequestHeader(t,r)}),u.onload=function(){if(u.status>=200&&u.status<300)try{var r=JSON.parse(u.responseText);e({data:r,status:u.status,statusText:u.statusText,headers:u.getAllResponseHeaders()})}catch(n){t(new Error("解析 JSON 失败"))}else t(new Error("[XHR] "+u.status))},u.onerror=function(){return t(new Error("XHR 网络错误"))},u.ontimeout=function(){return t(new Error("XHR 超时"))},u.send(a?JSON.stringify(a):void 0)})}var N=function(){function e(e){this.beforeSend=e.onReportBeforeSend}return e.prototype.get=function(e,o){return r(this,void 0,void 0,function(){var r;return n(this,function(n){switch(n.label){case 0:return[4,j(t({url:e,method:"GET",beforeSend:this.beforeSend},o))];case 1:return r=n.sent(),[2,Promise.resolve(r)]}})})},e.prototype.post=function(e,o,i){return r(this,void 0,void 0,function(){var r;return n(this,function(n){switch(n.label){case 0:return[4,j(t({url:e,body:o,method:"POST",beforeSend:this.beforeSend},i))];case 1:return r=n.sent(),[2,Promise.resolve(r)]}})})},e}(),T=function(){function e(e){this.appkey=e}return e.prototype.getItem=function(e){try{return window.localStorage.getItem(this.getStoreKey(e))}catch(t){return""}},e.prototype.removeItem=function(e){try{window.localStorage.removeItem(this.getStoreKey(e))}catch(t){}},e.prototype.setItem=function(e,t){try{window.localStorage.setItem(this.getStoreKey(e),t)}catch(r){}},e.prototype.setSessionItem=function(e,t){try{window.sessionStorage.setItem(this.getStoreKey(e),t)}catch(r){}},e.prototype.getSessionItem=function(e){try{return window.sessionStorage.getItem(this.getStoreKey(e))}catch(t){return""}},e.prototype.getStoreKey=function(e){return o+this.appkey+"_"+e},e.prototype.createDeviceId=function(){try{var e=window.localStorage.getItem(i);return e||(e=function(e){for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",r="",n=0;n<e;n++)r+=t.charAt(Math.floor(51*Math.random()));return r}(32),window.localStorage.setItem(i,e)),e}catch(t){return""}},e.prototype.clear=function(){try{for(var e=window.localStorage.length,t=0;t<e;t++){var r=window.localStorage.key(t);(null==r?void 0:r.substr(0,9))==o&&window.localStorage.removeItem(r)}}catch(n){}},e.prototype.getStoreCount=function(){var e=0;try{e=window.localStorage.length}catch(t){}return e},e}(),B="logid_start",C="4.7.6-web";return function(r){function n(e){var t=r.call(this,e)||this;if(t.qimei36="",t.netFailNum=0,t.dbEmptyNum=0,t.lowFrequencyMode=!1,t.lsEnable=!0,t.networkTimeout=5e3,t.maxLockTime=1e4,t.isDebugMode=!1,t.throttleTimer=null,t.throttleBuffer=[],t.send=function(e,r,n){t.storage.setItem(a,Date.now().toString()),t.network.post(t.uploadUrl||t.strategy.getUploadUrl(),e.data,{timeout:t.networkTimeout}).then(function(n){var o;100==(null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.result)?t.delayTime=1e3*n.data.delayTime:t.delayTime=0,r&&r(e.data);var i=e.data.events;t.store.removeEventList(i).then(function(){i.forEach(function(e){return t.removeSendingId(y(e.mapValue))}),t.taskLock.releaseLock()}).catch(function(e){t.taskLock.releaseLock()}),t.doCustomCycleTask("net")}).catch(function(r){var o=e.data.events;t.errorReport.reportError(r.code?r.code.toString():"600",r.message),n&&n(e.data);var i=JSON.parse(t.storage.getItem(s));o.forEach(function(e){i&&-1!=i.indexOf(y(e))&&t.store.insertEvent(e,function(e,r){e&&t.errorReport.reportError("604","insertEvent fail!")}),t.removeSendingId(y(e))}),t.addLowFrequencyTag("net"),t.taskLock.releaseLock()})},!window.localStorage)return t.errorReport.reportError("605","no localStorage!"),t.lsEnable=!1,t;var n,o,i,c,u,p=S();return t.isUnderIE8=p>0&&p<8,t.isUnderIE8||(t.isUnderIE=p>0,e.needInitQimei&&E(e.appkey,function(e){t.qimei36=e.q36}),o=(n=navigator.userAgent).indexOf("compatible")>-1&&n.indexOf("MSIE")>-1,i=n.indexOf("Trident")>-1&&n.indexOf("rv:11.0")>-1,(o||i)&&(t.networkTimeout=1e4,t.maxLockTime=15e3),t.taskLock=new I(e.appkey,t.maxLockTime),t.network=new N(e),t.storage=new T(e.appkey),t.initCommonInfo(e),t.store=new D(e.appkey,t.storage),t.errorReport=new m(t.config,t.commonInfo,"web",t.network),t.strategy=new v(null==e.needQueryConfig||e.needQueryConfig,t.config,t.commonInfo,t.storage,t.network),t.logidStartTime=t.storage.getItem(B),t.logidStartTime||(t.logidStartTime=Date.now().toString(),t.storage.setItem(B,t.logidStartTime)),c=t.logidStartTime,u=Date.now()-Number.parseFloat(c),Math.floor(u/864e5)>=365&&t.storage.clear(),t.isDebugMode=t.isDebugIdLegal(e.debugId),t.debugId=e.debugId,t.appId=e.appId,t.initSession(e),t.onDirectUserAction("rqd_js_init",{}),setTimeout(function(){return t.lifeCycle.emit("init")},0),t.storage.setItem(s,"[]"),t.initDelayTime=e.delay?e.delay:1e3,t.cycleTask(t.initDelayTime)),t}return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}(n,r),n.prototype.initSession=function(e){var t=18e5;e.sessionDuration&&e.sessionDuration>3e4&&(t=e.sessionDuration),this.beaconSession=new w(this.storage,t,this)},n.prototype.initCommonInfo=function(e){var t=Number(this.storage.getItem(a));try{var r=JSON.parse(this.storage.getItem(s));(Date.now()-t>3e4||!r)&&this.storage.setItem(s,JSON.stringify([]))}catch(o){}e.uploadUrl&&(this.uploadUrl=e.uploadUrl+"?appkey="+e.appkey);var n=[window.screen.width,window.screen.height];window.devicePixelRatio&&n.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:n.join("*"),channelID:e.channelID?String(e.channelID):"",openid:e.openid?String(e.openid):"",unid:e.unionid?String(e.unionid):"",sdkVersion:C},this.config.appVersion=e.versionCode?String(e.versionCode):"",this.config.strictMode=e.strictMode},n.prototype.cycleTask=function(e){var t=this;this.intervalID=window.setInterval(function(){t.taskLock.getLock()&&t.store.getEvents().then(function(e){if(t.taskLock.isFirstInQue()){var r=[],n=JSON.parse(t.storage.getItem(s));if(n||(n=[]),e&&e.forEach(function(e){var t=y(e.mapValue);-1==n.indexOf(t)&&(r.push(e),n.push(t))}),n.length>1e3&&(n=[]),0==r.length)return t.addLowFrequencyTag("db"),void t.taskLock.releaseLock();t.storage.setItem(s,JSON.stringify(n)),t._normalLogPipeline(t.assembleData(r))}}).catch(function(e){t.taskLock.releaseLock()})},e)},n.prototype.thottleReport=function(e){var t,r=this;if((t=this.throttleBuffer).push.apply(t,e),this.throttleBuffer.length>=500){var n=this.throttleBuffer.slice(0);this.throttleBuffer.length=0,this._normalLogPipeline(this.assembleData(n))}else{if(this.throttleTimer)return;this.throttleTimer=setTimeout(function(){var e=r.throttleBuffer.slice(0);r.throttleBuffer.length=0,r._normalLogPipeline(r.assembleData(e)),r.throttleTimer=null},1e3)}},n.prototype.onReport=function(e,t,r){var n=this;if(this.lsEnable)if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{var o=this.generateData(e,t,r);if(r&&0==this.delayTime&&!this.lowFrequencyMode)this._normalLogPipeline(this.assembleData(o));else{var i=o.shift();i&&this.store.insertEvent(i,function(e){e&&n.errorReport.reportError("604","insertEvent fail!")}).then(function(){n.dbEmptyNum=0,n.doCustomCycleTask("db")}).catch(function(e){n.thottleReport([i])})}}},n.prototype.onSendBeacon=function(e,t){if(this.lsEnable)if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{var r=this.assembleData(this.generateData(e,t,!0));"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(r))}},n.prototype.generateData=function(e,r,n){var o=[],i=C+"_"+(n?"direct_log_id":"normal_log_id"),a=Number(this.storage.getItem(i));return a=a||1,r=t(t({},r),{A99:n?"Y":"N",A100:a.toString(),A72:C,A88:this.logidStartTime}),this.isDebugMode&&this.debugId&&(r.dt_debugid=this.debugId,r.dt_appid=this.appId),a++,this.storage.setItem(i,a.toString()),o.push({eventCode:e,eventTime:Date.now().toString(),mapValue:f(r,this.config.strictMode)}),o},n.prototype.assembleData=function(e){var r=this.beaconSession.getSession();return{appVersion:this.config.appVersion?d(this.config.appVersion):"",sdkId:"js",sdkVersion:C,mainAppKey:this.config.appkey,platformId:3,common:f(t(t({},this.additionalParams),{A2:this.commonInfo.deviceId,A8:this.commonInfo.openid,A12:this.commonInfo.language,A17:this.commonInfo.pixel,A23:this.commonInfo.channelID,A50:this.commonInfo.unid,A76:r.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:e}},n.prototype.addLowFrequencyTag=function(e){"net"===e&&this.netFailNum++,"db"===e&&this.dbEmptyNum++,(this.netFailNum>=10||this.dbEmptyNum>=10)&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.lowFrequencyMode=!0)},n.prototype.doCustomCycleTask=function(e){"net"===e&&(this.netFailNum=0),"db"===e&&(this.dbEmptyNum=0),this.netFailNum<10&&this.dbEmptyNum<10&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime),this.lowFrequencyMode=!1)},n.prototype.setQimei=function(e){this.qimei36=e},n.prototype.closeDB=function(){this.store.closeDB()},n.prototype.isDebugIdLegal=function(e){if(!e)return!1;if(e&&/^dt_[a-zA-Z0-9]{6,}_\d{10}$/.test(e)){var t=e.split("_"),r=1e3*parseInt(t[t.length-1],10);if(r>=Date.now()-36e5&&r<=Date.now())return!0}return!1},n}(g)}()),Jt.exports));const Qt=new class{constructor(){this.appId="unknown",this.version="",this.instance=null,this.isInitialized=!1}report(e,t){if(this.instance||this.init(),this.instance)try{this.instance.onUserAction(e,{...t,HY984:this.version})}catch(r){console.error("[PerfReporter] Beacon 上报失败:",r)}}init(){if(!this.isInitialized&&!this.instance&&"undefined"!=typeof window)try{this.version=f(),this.instance=new Gt({appkey:"0WEB06F5PZUCN4AJ",strictMode:!1,delay:1e3,sessionDuration:6e4,needInitQimei:!0,needQueryConfig:!0,needReportRqdEvent:!1}),this.isInitialized=!0}catch(e){console.error("[PerfReporter] Beacon 初始化失败:",e)}}};var $t={exports:{}};var zt,Xt={exports:{}};function Zt(){return zt||(zt=1,Xt.exports=(e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==w&&w.crypto&&(r=w.crypto),!r)try{r=_}catch(kr){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(kr){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(kr){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||/* @__PURE__ */function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},a=i.lib={},s=a.Base=/* @__PURE__ */function(){return{extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||p).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var a=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var s=0;s<o;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=i.enc={},p=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},l=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},f=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,o=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,p=e.min(4*u,i);if(u){for(var l=0;l<u;l+=a)this._doProcessBlock(o,l);r=o.splice(0,u),n.sigBytes-=p}return new c.init(r,p)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=d.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new y.HMAC.init(e,r).finalize(t)}}});var y=i.algo={};return i}(Math),e)),Xt.exports;var e}var er,tr;er||(er=1,$t.exports=(tr=Zt(),function(e){var t=tr,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var s=i.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,s=e[t+0],f=e[t+1],d=e[t+2],y=e[t+3],h=e[t+4],g=e[t+5],m=e[t+6],v=e[t+7],b=e[t+8],w=e[t+9],S=e[t+10],E=e[t+11],I=e[t+12],_=e[t+13],O=e[t+14],A=e[t+15],P=i[0],k=i[1],x=i[2],D=i[3];P=c(P,k,x,D,s,7,a[0]),D=c(D,P,k,x,f,12,a[1]),x=c(x,D,P,k,d,17,a[2]),k=c(k,x,D,P,y,22,a[3]),P=c(P,k,x,D,h,7,a[4]),D=c(D,P,k,x,g,12,a[5]),x=c(x,D,P,k,m,17,a[6]),k=c(k,x,D,P,v,22,a[7]),P=c(P,k,x,D,b,7,a[8]),D=c(D,P,k,x,w,12,a[9]),x=c(x,D,P,k,S,17,a[10]),k=c(k,x,D,P,E,22,a[11]),P=c(P,k,x,D,I,7,a[12]),D=c(D,P,k,x,_,12,a[13]),x=c(x,D,P,k,O,17,a[14]),P=u(P,k=c(k,x,D,P,A,22,a[15]),x,D,f,5,a[16]),D=u(D,P,k,x,m,9,a[17]),x=u(x,D,P,k,E,14,a[18]),k=u(k,x,D,P,s,20,a[19]),P=u(P,k,x,D,g,5,a[20]),D=u(D,P,k,x,S,9,a[21]),x=u(x,D,P,k,A,14,a[22]),k=u(k,x,D,P,h,20,a[23]),P=u(P,k,x,D,w,5,a[24]),D=u(D,P,k,x,O,9,a[25]),x=u(x,D,P,k,y,14,a[26]),k=u(k,x,D,P,b,20,a[27]),P=u(P,k,x,D,_,5,a[28]),D=u(D,P,k,x,d,9,a[29]),x=u(x,D,P,k,v,14,a[30]),P=p(P,k=u(k,x,D,P,I,20,a[31]),x,D,g,4,a[32]),D=p(D,P,k,x,b,11,a[33]),x=p(x,D,P,k,E,16,a[34]),k=p(k,x,D,P,O,23,a[35]),P=p(P,k,x,D,f,4,a[36]),D=p(D,P,k,x,h,11,a[37]),x=p(x,D,P,k,v,16,a[38]),k=p(k,x,D,P,S,23,a[39]),P=p(P,k,x,D,_,4,a[40]),D=p(D,P,k,x,s,11,a[41]),x=p(x,D,P,k,y,16,a[42]),k=p(k,x,D,P,m,23,a[43]),P=p(P,k,x,D,w,4,a[44]),D=p(D,P,k,x,I,11,a[45]),x=p(x,D,P,k,A,16,a[46]),P=l(P,k=p(k,x,D,P,d,23,a[47]),x,D,s,6,a[48]),D=l(D,P,k,x,v,10,a[49]),x=l(x,D,P,k,O,15,a[50]),k=l(k,x,D,P,g,21,a[51]),P=l(P,k,x,D,I,6,a[52]),D=l(D,P,k,x,y,10,a[53]),x=l(x,D,P,k,S,15,a[54]),k=l(k,x,D,P,f,21,a[55]),P=l(P,k,x,D,b,6,a[56]),D=l(D,P,k,x,A,10,a[57]),x=l(x,D,P,k,m,15,a[58]),k=l(k,x,D,P,_,21,a[59]),P=l(P,k,x,D,h,6,a[60]),D=l(D,P,k,x,E,10,a[61]),x=l(x,D,P,k,d,15,a[62]),k=l(k,x,D,P,w,21,a[63]),i[0]=i[0]+P|0,i[1]=i[1]+k|0,i[2]=i[2]+x|0,i[3]=i[3]+D|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;r[o>>>5]|=128<<24-o%32;var i=e.floor(n/4294967296),a=n;r[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),r[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var p=c[u];c[u]=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,o,i,a){var s=e+(t&r|~t&n)+o+a;return(s<<i|s>>>32-i)+t}function u(e,t,r,n,o,i,a){var s=e+(t&n|r&~n)+o+a;return(s<<i|s>>>32-i)+t}function p(e,t,r,n,o,i,a){var s=e+(t^r^n)+o+a;return(s<<i|s>>>32-i)+t}function l(e,t,r,n,o,i,a){var s=e+(r^(t|~n))+o+a;return(s<<i|s>>>32-i)+t}t.MD5=o._createHelper(s),t.HmacMD5=o._createHmacHelper(s)}(Math),tr.MD5));var rr=/* @__PURE__ */(e=>(e.begin="begin",e.end="end",e))(rr||{});const nr=new class{constructor(){this.sessionId=null,this.sessionKey="__perf_session_id__",this.sessionTimeout=18e5,this.lastActivityTime=0}clearSession(){this.sessionId=null,this.lastActivityTime=0;try{"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(this.sessionKey)}catch(e){}}getSessionId(){const e=Date.now();return this.sessionId&&e-this.lastActivityTime>this.sessionTimeout&&(this.sessionId=null),this.sessionId||(this.sessionId=this.loadFromStorage()||`${Date.now()}-${Math.random().toString(36).substring(2,9)}`,this.saveToStorage(this.sessionId)),this.lastActivityTime=e,this.sessionId}loadFromStorage(){try{if("undefined"!=typeof sessionStorage)return sessionStorage.getItem(this.sessionKey)}catch(e){}return null}saveToStorage(e){try{"undefined"!=typeof sessionStorage&&sessionStorage.setItem(this.sessionKey,e)}catch(t){}}};function or(e){"undefined"!=typeof fetch&&function(){const e=i();"development"===e.NEXT_PUBLIC_MODE||e.NODE_ENV}()}function ir(e,t){if("undefined"!=typeof window&&"undefined"!=typeof document&&e&&"string"==typeof e&&("begin"===t||"end"===t))try{"undefined"!=typeof performance&&performance.now?(performance.timeOrigin,performance.now()):Date.now(),nr.getSessionId(),"undefined"!=typeof window&&window.location&&window.location.href;or()}catch(r){}}ir.type=rr;const ar=()=>Sr.invoke({method:"getTheme"});var sr=/* @__PURE__ */(e=>(e.timestampMsec="timestampMsec",e.timestampNtp="timestampNtp",e))(sr||{});const cr=e=>Sr.invoke({method:"Common.getServerTimestamp",params:e}),ur=e=>Sr.invoke({method:"App.setScreenCaptureEnabled",params:e}),pr=e=>{if("url"in e){const{base:t="/im/halfScreenWebView",url:r,ratio:n,navigationBarHidden:o,closeSelf:i}=e,a=[`url=${encodeURIComponent(r)}`];void 0!==n&&a.push(`ratio=${n}`),void 0!==o&&a.push(`navigationBarHidden=${o}`);const s=`${t}?${a.join("&")}`;return Sr.invoke({method:"navigate",params:{route:s,closeSelf:i}})}return Sr.invoke({method:"navigate",params:e})},lr=()=>Sr.invoke({method:"navigateBack"}),fr=e=>Sr.invoke({method:"Webview.sendData",params:e}),dr=(e,t)=>Sr.onEvent({method:"Webview.receiveData",params:e,callback:e=>{t(e?.data?e.data:e)}}),yr=(e,t)=>e.enabled&&t?Sr.onEvent({method:"Webview.onBackPressed",params:e,callback:()=>{t()}}):Sr.invoke({method:"Webview.onBackPressed",params:{enabled:!1}}),hr=(e={type:"wgs84"})=>Sr.invoke({method:"Device.getLocation",params:e}),gr=e=>Sr.invoke({method:"toast",params:e});var mr=/* @__PURE__ */(e=>(e.webpage="webpage",e.image="image",e.video="video",e.file="file",e.text="text",e))(mr||{});const vr=e=>Sr.invoke({method:"shareTo",params:e}),br=(e,t,r,n,o)=>{if("Common.log"===t)return;if("jssdk_on_event"===e||"jssdk_off_event"===e)return;let i=r,a=n;"jssdk_invoke"===e&&o>=1e3&&r&&(i=!1,a="timeout"),i&&1e4*Math.random()>=1||Qt.report(e,{HY501:i?1:0,HY502:a,HY503:o,HY504:Qt.appId,HY505:"undefined"!=typeof window&&window.location?window.location.href:"",HY506:t})},wr=class e{constructor(){this.isJSBridgeReady=!1,this.pendingEvents=[],this.initJSBridgeListener()}static getInstance(){return null===e.instance&&(e.instance=new e),e.instance}invoke(e){const r=Date.now(),o=n(e.minVersion);if(o){const t=Date.now()-r;return br("jssdk_invoke",e.method,!1,o.errMsg||"preCheck failed",t),Promise.reject(o)}return new Promise((n,o)=>{"Common.log"!==e.method&&ir(`jsb/${e.method}`,ir.type.begin);const i={eventName:e.method,payload:e.params??null,callback:t=>{"Common.log"!==e.method&&ir(`jsb/${e.method}`,ir.type.end);const i=Date.now()-r;if("ok"===((e,t)=>{const r=e?.errMsg||`${t}:ok`,n=r?.lastIndexOf(":"),o=r?.substring(n+1);return o})(t,e.method))br("jssdk_invoke",e.method,!0,"success",i),n(t);else{const r=t?.errMsg||"unknown error";br("jssdk_invoke",e.method,!1,r,i),o(t)}}};this.handleEvent(t.INVOKE,i)})}onEvent(e){const r=Date.now();return new Promise((o,i)=>{const a=n(e.minVersion);if(a){const t=Date.now()-r;br("jssdk_on_event",e.method,!1,a.errMsg||"preCheck failed",t),i(a)}else{const n={eventName:e.method,payload:e.params??null,callback:e.callback??(()=>{}),bindCallback:t=>{const n=Date.now()-r;br("jssdk_on_event",e.method,!0,"success",n),o(t)}};this.handleEvent(t.ON_EVENT,n)}})}offEvent(e){const r=Date.now();return new Promise((o,i)=>{const a=n(e.minVersion);if(a){const t=Date.now()-r;br("jssdk_off_event",e.method,!1,a.errMsg||"preCheck failed",t),i(a)}else{const n={eventName:e.method,callback:e.callback??(()=>{}),bindCallback:t=>{const n=Date.now()-r;br("jssdk_off_event",e.method,!0,"success",n),o(t)}};this.handleEvent(t.OFF_EVENT,n)}})}initJSBridgeListener(){if("undefined"!=typeof window&&window.jsb)return this.isJSBridgeReady=!0,void this.processPendingEvents();"undefined"!=typeof document&&document.addEventListener("JSBridgeReady",()=>{this.isJSBridgeReady=!0,this.processPendingEvents()})}processPendingEvents(){for(;this.pendingEvents.length>0;){const e=this.pendingEvents.shift();e&&this.executeEvent(e.type,e)}}handleEvent(e,t){this.isJSBridgeReady&&"undefined"!=typeof window&&window.jsb?this.executeEvent(e,t):this.queueEvent(e,t)}executeEvent(e,r){const{eventName:n,callback:o,bindCallback:i=()=>{}}=r;switch(e){case t.INVOKE:{const e=r;window?.jsb?.invoke(n,e.payload,o);break}case t.ON_EVENT:{const e=r;window?.jsb?.onEvent(n,o,e.payload,i);break}case t.OFF_EVENT:window?.jsb?.offEvent(n,o,i)}}queueEvent(e,t){this.pendingEvents.push({type:e,...t})}};wr.instance=null;const Sr=wr.getInstance(),Er=async e=>{Qt.appId=e.appId;const t=Date.now();console.log("[yb-jsapi] config 调用开始",{appId:e.appId,timestamp:e.timestamp,startTime:t});let r=null;const n=new Promise((e,t)=>{r=setTimeout(()=>{r=null,t(new Error("config 调用超时"))},3e3)});try{const o=await Promise.race([Sr.invoke({method:"OpenSDK.config",params:{timestamp:Math.floor(Date.now()/1e3),nonceStr:Math.random().toString(36).substring(2),signature:"placeholderForSignature",jsApiList:["*"],...e}}),n]);r&&(clearTimeout(r),r=null);const i=Date.now()-t,a=0===o.code?1:0,s={HY501:a,HY502:e.appId,HY503:i,HY504:1===a?"success":o.errMsg||"unknown error"};return console.log("[yb-jsapi] config 调用成功",{...s,code:o.code,errMsg:o.errMsg,jsApiList:o.data?.jsApiList,domains:o.data?.domains}),Qt.report("jssdk_config",s),o}catch(o){r&&(clearTimeout(r),r=null);const n=Date.now()-t,i=o instanceof Error&&"config 调用超时"===o.message,a=(()=>{if(i)return"config 调用超时";if(o instanceof Error)return o.message;if(o&&"object"==typeof o){if("errMsg"in o&&o.errMsg)return String(o.errMsg);if("message"in o&&o.message)return String(o.message)}return"config 调用失败"})(),s={HY501:0,HY502:e.appId,HY503:n,HY504:a};return i?console.error("[yb-jsapi] config 调用超时",{...s,timeout:3e3}):console.error("[yb-jsapi] config 调用失败",{...s,error:o}),Qt.report("jssdk_config",s),{code:-1,errMsg:a}}},Ir={getTheme:ar,getServerTimestamp:cr,setScreenCaptureEnabled:ur},_r={getLocation:hr},Or={toast:gr},Ar={navigate:pr,navigateBack:lr,receiveData:dr,sendData:fr,onBackPressed:yr},Pr={shareTo:vr};export{mr as ShareToType,sr as TimestampType,Ir as app,Er as config,_r as device,hr as getLocation,cr as getServerTimestamp,ar as getTheme,pr as navigate,lr as navigateBack,yr as onBackPressed,dr as receiveData,fr as sendData,ur as setScreenCaptureEnabled,Pr as share,vr as shareTo,gr as toast,Or as ui,Ar as webview};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this;}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]";}),(_regenerator=function _regenerator(){return{w:i,m:f};})();}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine2(e,r,n,t);}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}!function(e,t){"object"==(typeof exports==="undefined"?"undefined":_typeof(exports))&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).yb={});}(this,function(e){"use strict";var t=function(e){return e.versionNotSupported="version not supported",e.notInApp="not in app",e;}(t||{}),r=function(e){return e.INVOKE="invoke",e.ON_EVENT="onEvent",e.OFF_EVENT="offEvent",e;}(r||{});function n(e){try{var _navigator$userAgent$;var _t2=((_navigator$userAgent$=navigator.userAgent.match(/YuanBao\/(\d*\.\d*\.\d*)/))===null||_navigator$userAgent$===void 0?void 0:_navigator$userAgent$[1])||"0.0.0",_r2=e.split(".").map(Number),_n=_t2.split(".").map(Number),_o=Math.max(_r2.length,_n.length);for(var _e2=0;_e2<_o;_e2++){var _t3=_r2[_e2]||0,_o2=_n[_e2]||0;if(_o2>_t3)return!0;if(_o2<_t3)return!1;}return!0;}catch(t){return console.error("supportVersion error",t),!0;}}var o=function o(e){var _navigator$userAgent$2;return(_navigator$userAgent$2=navigator.userAgent.match(/YuanBao/))!==null&&_navigator$userAgent$2!==void 0&&_navigator$userAgent$2[0]?e&&!n(e)?{code:-1,errMsg:t.versionNotSupported}:null:{code:-1,errMsg:t.notInApp};},i="undefined"==typeof window,a=function a(){var e={NODE_ENV:void 0,NEXT_PUBLIC_MODE:void 0,NEXT_PUBLIC_RUNTIME_ENV:void 0,NEXT_PUBLIC_NODE_AEGIS_ID:void 0,NEXT_PUBLIC_AEGIS_ID:void 0,NEXT_PUBLIC_VERSION:void 0,NEXT_PUBLIC_AEGIS_ENV:void 0,DISABLE_CONSOLE:void 0};try{"undefined"!=typeof window&&void 0===window.process&&(window.process={env:{}}),e={NODE_ENV:process.env.NODE_ENV,NEXT_PUBLIC_MODE:process.env.NEXT_PUBLIC_MODE,NEXT_PUBLIC_RUNTIME_ENV:process.env.NEXT_PUBLIC_RUNTIME_ENV,NEXT_PUBLIC_NODE_AEGIS_ID:process.env.NEXT_PUBLIC_NODE_AEGIS_ID,NEXT_PUBLIC_AEGIS_ID:process.env.NEXT_PUBLIC_AEGIS_ID,NEXT_PUBLIC_VERSION:process.env.NEXT_PUBLIC_VERSION,NEXT_PUBLIC_AEGIS_ENV:process.env.NEXT_PUBLIC_AEGIS_ENV,DISABLE_CONSOLE:process.env.DISABLE_CONSOLE};}catch(t){}return e;};var s=function(e){return e.Test="1",e.Pre="3",e.Prod="0",e;}(s||{});var c={1:"https://yuanbao.test.hunyuan.woa.com",3:"https://yuanbao.pre.hunyuan.woa.com",0:"https://yuanbao.tencent.com"};function u(){var _e$match;var e=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";return i?(e||console.warn("warning:在node端调用getUserAgent方法未传入ua参数,会导致node端识别ua不准确!"),e||""):e||window.navigator.userAgent||"";}(),t=(_e$match=e.match(/env_type\/([^ ]+)/))===null||_e$match===void 0?void 0:_e$match[1];return t&&Object.values(s).includes(t)?t:s.Prod;}function p(){var e=u();return c[e];}var l=function(e){return e.theme="theme",e.DevToolsBaseUrl="DevToolsBaseUrl",e.backTrackGuideCount="backTrackGuideCount",e;}(l||{});var f="https://yuanbao.tencent.com";function d(){return"".concat(function(_e$match2,_e$match3){if(i)return"";var e=navigator.userAgent,t=(_e$match2=e.match(/app_version\/(\d+\.\d+\.\d+)/))===null||_e$match2===void 0?void 0:_e$match2[1],r=(_e$match3=e.match(/YuanBao\/(\d+\.\d+\.\d+)/))===null||_e$match3===void 0?void 0:_e$match3[1];return t||r||"";}()||"0.1.0","_").concat(process.env.NEXT_PUBLIC_VERSION||"","_").concat(process.env.BOT_COMMIT_ID||"");}(function(_window$navigator$use){if(i)return f;var e=a();if(!i&&("development"===e.NEXT_PUBLIC_MODE||"test"===e.NEXT_PUBLIC_MODE)){var _e3=window.localStorage.getItem(l.DevToolsBaseUrl)||p();if(_e3)return _e3;}!i&&((_window$navigator$use=window.navigator.userAgent)===null||_window$navigator$use===void 0?void 0:_window$navigator$use.includes("has_devtools/1"))&&p();})(),process.env.NEXT_PUBLIC_ENABLE_WEB_BRIDGE;var y=!i&&"1"===localStorage.getItem("__YB_UI_TEST__");!i&&window.navigator.webdriver&&!y&&window.navigator.userAgent.includes("YbScreenshot");var h=function(e){return e.PageId="page_id",e.ModId="mod_id",e.ButtonId="button_id",e.AgentId="agent_id",e.ChatId="cid",e.TraceId="traceid",e.UserId="user_id",e.Ext1="ext1",e.Ext2="ext2",e.Ext3="ext3",e.Ext4="ext4",e;}(h||{});[["HY10","firstLogin",'是否首次登录\t"1": 是|"2": 否'],["HY21","openFrom","智能体打开来源\t1: app 2: 发现页"],["HY22","firstPrompt",'是否首次发送prompt\t"1": 是|"0": 否'],["HY24","uploadType",'点+号展开后的具体按钮\t上报名称, 例如1-文字,2-语音,3-"拍摄" 4-"相册",5-"文件"'],["HY27","shareTye",'分享类型\t"1": 图片 - 截图分享(百变AI和写真是图片本身)"2": 文本 - 默认3: 链接 - 复制链接'],["HY28","shareChannel","分享渠道\t1: 微信 2: 朋友圈 3:本地 4:复制链接"],["HY29","elementName","点击元素的名称"],["HY30","sourcePage","页面来源"],["HY31","boot_time","设备启动时间,单位s"],["HY32","country_code","国家"],["HY33","language","语言"],["HY34","device_name","设备名"],["HY35","system_version","系统版本"],["HY36","device_machine","设备machine"],["HY37","carrier_info","运营商"],["HY38","memory_capacity","物理内存容量"],["HY39","disk_capacity","硬盘容量"],["HY40","system_update_time","系统更新时间,单位s,精确到微秒"],["HY41","device_model","设备model"],["HY42","time_zone","时区"],["HY43","device_init_time","设备初始化时间"],["HY44","mnt_id","系统安装唯一id"],["HY45","idfv","iOS公共参数"],["HY46","turing_ticket","图灵盾"],["HY50",h.PageId,"页面id"],["HY51",h.ModId,"模块id"],["HY52",h.ButtonId,"按钮id"],["HY20",h.AgentId,"智能体id"],["HY54",h.ChatId,"会话id"],["HY55",h.TraceId,"traceId"],["HY56","refer","APP来源页"],["HY57","trid","活动染色ID,从活动、活动入口(含发现页banner)进入才会带上"],["HY58",h.Ext1,"扩展参数"],["HY59",h.Ext2,"扩展参数"],["HY60",h.Ext3,"扩展参数"],["HY70","ext4","扩展参数"],["HY62","platform","platform"],["HY63","device","device"],["HY64",h.UserId,"user_id"],["HY68","evt_id","活动id"],["HY72","goods_trace_id","推荐trace_id"],["HY71","ext5","扩展参数"],["HY73","env","当前环境,online-正式、pre-预发布、dev-开发"],["HY67","finger_id","指纹id"],["HY76","visitor_id","访客id"],["HY81","browser_scene","浏览器环境"],["HY77","exp_name","实验名称"],["HY78","exp_id","实验id"],["HY79","exp_group","实验组"],["HY85","ext6","扩展参数"],["HY86","ext7","扩展参数"],["HY87","ext8","扩展参数"],["HY88","ext9","扩展参数"],["HY89","ext10","扩展参数"],["HY150","ext11","扩展参数"],["HY91","model_id","模型id"],["HY105","accounttype","账号类型"],["HY152","ext13","扩展参数"]].reduce(function(e,t){return _objectSpread(_objectSpread({},e),{},_defineProperty({},t[1],t[0]));},{});var g=function(e){return e[e.wxBrowser=1001]="wxBrowser",e[e.yuanbaoApp=1002]="yuanbaoApp",e[e.mobileBrowser=1003]="mobileBrowser",e[e.pcBrowser=1004]="pcBrowser",e[e.tenVideo=1005]="tenVideo",e[e.tenNews=1006]="tenNews",e[e.tenSports=1007]="tenSports",e[e.mpWebview=1008]="mpWebview",e;}(g||{}),m=function(e){return e.appAdBanner="appAdBanner",e.shareAgentInfoPage="shareAgentInfoPage",e.shareAgentChatPage="shareAgentChatPage",e.adPage="adPage",e.shareClockInPage="shareClockInPage",e.ugcAgentChatPage="ugcAgentChatPage",e.offlineEvtPage="offlineEvtPage",e.promoPage="promoPage",e;}(m||{});var v="undefined"==typeof window;var b,w,S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;}function I(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e;}catch(_unused){}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments);};r.prototype=t.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function get(){return e[t];}});}),r;}function _(){return w?b:(w=1,b=TypeError);}var O=I(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var A,P,k,x,D,j,T,N,B,C,R,L,U,M,H,F,Y,q,V,W,K,J,G,Q,$,z,X,Z,ee,te,re,ne,oe,ie,ae,se,ce,ue,pe,le,fe,de,ye,he,ge,me,ve,be,we,Se,Ee,Ie,_e,Oe,Ae,Pe,ke,xe,De,je,Te,Ne,Be,Ce,Re,Le,Ue,Me,He,Fe,Ye,qe,Ve,We,Ke,Je,Ge,Qe,$e,ze,Xe,Ze,et,tt,rt,nt,ot,it;function at(){if(P)return A;P=1;var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&"function"==typeof t.get?t.get:null,n=e&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&"function"==typeof i.get?i.get:null,s=o&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,u="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,l=Boolean.prototype.valueOf,f=Object.prototype.toString,d=Function.prototype.toString,y=String.prototype.match,h=String.prototype.slice,g=String.prototype.replace,m=String.prototype.toUpperCase,v=String.prototype.toLowerCase,b=RegExp.prototype.test,w=Array.prototype.concat,E=Array.prototype.join,I=Array.prototype.slice,_=Math.floor,k="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,D="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==_typeof(Symbol.iterator),T="function"==typeof Symbol&&Symbol.toStringTag&&(_typeof(Symbol.toStringTag)===j||"symbol")?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,B=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__;}:null);function C(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||b.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-_(-e):_(e);if(n!==e){var o=String(n),i=h.call(t,o.length+1);return g.call(o,r,"$&_")+"."+g.call(g.call(i,/([0-9]{3})/g,"$&_"),/_$/,"");}}return g.call(t,r,"$&_");}var R=O,L=R.custom,U=K(L)?L:null,M={__proto__:null,double:'"',single:"'"},H={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function F(e,t,r){var n=r.quoteStyle||t,o=M[n];return o+e+o;}function Y(e){return g.call(String(e),/"/g,""");}function q(e){return!T||!("object"==_typeof(e)&&(T in e||void 0!==e[T]));}function V(e){return"[object Array]"===Q(e)&&q(e);}function W(e){return"[object RegExp]"===Q(e)&&q(e);}function K(e){if(j)return e&&"object"==_typeof(e)&&e instanceof Symbol;if("symbol"==_typeof(e))return!0;if(!e||"object"!=_typeof(e)||!D)return!1;try{return D.call(e),!0;}catch(t){}return!1;}A=function e(t,o,i,f){var m=o||{};if(G(m,"quoteStyle")&&!G(M,m.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(m,"maxStringLength")&&("number"==typeof m.maxStringLength?m.maxStringLength<0&&m.maxStringLength!==1/0:null!==m.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var b=!G(m,"customInspect")||m.customInspect;if("boolean"!=typeof b&&"symbol"!==b)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(m,"indent")&&null!==m.indent&&"\t"!==m.indent&&!(parseInt(m.indent,10)===m.indent&&m.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(m,"numericSeparator")&&"boolean"!=typeof m.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=m.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return z(t,m);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var O=String(t);return _?C(t,O):O;}if("bigint"==typeof t){var A=String(t)+"n";return _?C(t,A):A;}var P=void 0===m.depth?5:m.depth;if(void 0===i&&(i=0),i>=P&&P>0&&"object"==_typeof(t))return V(t)?"[Array]":"[Object]";var x=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=E.call(Array(e.indent+1)," ");}return{base:r,prev:E.call(Array(t+1),r)};}(m,i);if(void 0===f)f=[];else if($(f,t)>=0)return"[Circular]";function L(t,r,n){if(r&&(f=I.call(f)).push(r),n){var o={depth:m.depth};return G(m,"quoteStyle")&&(o.quoteStyle=m.quoteStyle),e(t,o,i+1,f);}return e(t,m,i+1,f);}if("function"==typeof t&&!W(t)){var H=function(e){if(e.name)return e.name;var t=y.call(d.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null;}(t),J=ne(t,L);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(J.length>0?" { "+E.call(J,", ")+" }":"");}if(K(t)){var X=j?g.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):D.call(t);return"object"!=_typeof(t)||j?X:Z(X);}if(function(e){if(!e||"object"!=_typeof(e))return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute;}(t)){for(var oe="<"+v.call(String(t.nodeName)),ie=t.attributes||[],ae=0;ae<ie.length;ae++)oe+=" "+ie[ae].name+"="+F(Y(ie[ae].value),"double",m);return oe+=">",t.childNodes&&t.childNodes.length&&(oe+="..."),oe+="</"+v.call(String(t.nodeName))+">";}if(V(t)){if(0===t.length)return"[]";var se=ne(t,L);return x&&!function(e){for(var t=0;t<e.length;t++)if($(e[t],"\n")>=0)return!1;return!0;}(se)?"["+re(se,x)+"]":"[ "+E.call(se,", ")+" ]";}if(function(e){return"[object Error]"===Q(e)&&q(e);}(t)){var ce=ne(t,L);return"cause"in Error.prototype||!("cause"in t)||N.call(t,"cause")?0===ce.length?"["+String(t)+"]":"{ ["+String(t)+"] "+E.call(ce,", ")+" }":"{ ["+String(t)+"] "+E.call(w.call("[cause]: "+L(t.cause),ce),", ")+" }";}if("object"==_typeof(t)&&b){if(U&&"function"==typeof t[U]&&R)return R(t,{depth:P-i});if("symbol"!==b&&"function"==typeof t.inspect)return t.inspect();}if(function(e){if(!r||!e||"object"!=_typeof(e))return!1;try{r.call(e);try{a.call(e);}catch(oe){return!0;}return e instanceof Map;}catch(t){}return!1;}(t)){var ue=[];return n&&n.call(t,function(e,r){ue.push(L(r,t,!0)+" => "+L(e,t));}),te("Map",r.call(t),ue,x);}if(function(e){if(!a||!e||"object"!=_typeof(e))return!1;try{a.call(e);try{r.call(e);}catch(t){return!0;}return e instanceof Set;}catch(n){}return!1;}(t)){var pe=[];return s&&s.call(t,function(e){pe.push(L(e,t));}),te("Set",a.call(t),pe,x);}if(function(e){if(!c||!e||"object"!=_typeof(e))return!1;try{c.call(e,c);try{u.call(e,u);}catch(oe){return!0;}return e instanceof WeakMap;}catch(t){}return!1;}(t))return ee("WeakMap");if(function(e){if(!u||!e||"object"!=_typeof(e))return!1;try{u.call(e,u);try{c.call(e,c);}catch(oe){return!0;}return e instanceof WeakSet;}catch(t){}return!1;}(t))return ee("WeakSet");if(function(e){if(!p||!e||"object"!=_typeof(e))return!1;try{return p.call(e),!0;}catch(t){}return!1;}(t))return ee("WeakRef");if(function(e){return"[object Number]"===Q(e)&&q(e);}(t))return Z(L(Number(t)));if(function(e){if(!e||"object"!=_typeof(e)||!k)return!1;try{return k.call(e),!0;}catch(t){}return!1;}(t))return Z(L(k.call(t)));if(function(e){return"[object Boolean]"===Q(e)&&q(e);}(t))return Z(l.call(t));if(function(e){return"[object String]"===Q(e)&&q(e);}(t))return Z(L(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==S&&t===S)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Q(e)&&q(e);}(t)&&!W(t)){var le=ne(t,L),fe=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",ye=!fe&&T&&Object(t)===t&&T in t?h.call(Q(t),8,-1):de?"Object":"",he=(fe||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ye||de?"["+E.call(w.call([],ye||[],de||[]),": ")+"] ":"");return 0===le.length?he+"{}":x?he+"{"+re(le,x)+"}":he+"{ "+E.call(le,", ")+" }";}return String(t);};var J=Object.prototype.hasOwnProperty||function(e){return e in this;};function G(e,t){return J.call(e,t);}function Q(e){return f.call(e);}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1;}function z(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return z(h.call(e,0,t.maxStringLength),t)+n;}var o=H[t.quoteStyle||"single"];return o.lastIndex=0,F(g.call(g.call(e,o,"\\$1"),/[\x00-\x1f]/g,X),"single",t);}function X(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+m.call(t.toString(16));}function Z(e){return"Object("+e+")";}function ee(e){return e+" { ? }";}function te(e,t,r,n){return e+" ("+t+") {"+(n?re(r,n):E.call(r,", "))+"}";}function re(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+E.call(e,","+r)+"\n"+t.prev;}function ne(e,t){var r=V(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=G(e,o)?t(e[o],e):"";}var i,a="function"==typeof x?x(e):[];if(j){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s];}for(var c in e)G(e,c)&&(r&&String(Number(c))===c&&c<e.length||j&&i["$"+c]instanceof Symbol||(b.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof x)for(var u=0;u<a.length;u++)N.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n;}return A;}function st(){if(x)return k;x=1;var e=at(),t=_(),r=function r(e,t,_r3){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,_r3||(n.next=e.next,e.next=n),n;};return k=function k(){var n,o={assert:function assert(r){if(!o.has(r))throw new t("Side channel does not contain "+e(r));},delete:function _delete(e){var t=n&&n.next,o=function(e,t){if(e)return r(e,t,!0);}(n,e);return o&&t&&t===o&&(n=void 0),!!o;},get:function get(e){return function(e,t){if(e){var n=r(e,t);return n&&n.value;}}(n,e);},has:function has(e){return function(e,t){return!!e&&!!r(e,t);}(n,e);},set:function set(e,t){n||(n={next:void 0}),function(e,t,n){var o=r(e,t);o?o.value=n:e.next={key:t,next:e.next,value:n};}(n,e,t);}};return o;};}function ct(){return j?D:(j=1,D=Object);}function ut(){return N?T:(N=1,T=Error);}function pt(){return C?B:(C=1,B=EvalError);}function lt(){return L?R:(L=1,R=RangeError);}function ft(){return M?U:(M=1,U=ReferenceError);}function dt(){return F?H:(F=1,H=SyntaxError);}function yt(){return q?Y:(q=1,Y=URIError);}function ht(){return W?V:(W=1,V=Math.abs);}function gt(){return J?K:(J=1,K=Math.floor);}function mt(){return Q?G:(Q=1,G=Math.max);}function vt(){return z?$:(z=1,$=Math.min);}function bt(){return Z?X:(Z=1,X=Math.pow);}function wt(){return te?ee:(te=1,ee=Math.round);}function St(){return ne?re:(ne=1,re=Number.isNaN||function(e){return e!=e;});}function Et(){if(ie)return oe;ie=1;var e=St();return oe=function oe(t){return e(t)||0===t?t:t<0?-1:1;};}function It(){return se?ae:(se=1,ae=Object.getOwnPropertyDescriptor);}function _t(){if(ue)return ce;ue=1;var e=It();if(e)try{e([],"length");}catch(t){e=null;}return ce=e;}function Ot(){if(le)return pe;le=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1});}catch(t){e=!1;}return pe=e;}function At(){if(he)return ye;he=1;var e="undefined"!=typeof Symbol&&Symbol,t=de?fe:(de=1,fe=function fe(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==_typeof(Symbol.iterator))return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1;}return!0;});return ye=function ye(){return"function"==typeof e&&"function"==typeof Symbol&&"symbol"==_typeof(e("foo"))&&"symbol"==_typeof(Symbol("bar"))&&t();};}function Pt(){return me?ge:(me=1,ge="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null);}function kt(){return be?ve:(be=1,ve=ct().getPrototypeOf||null);}function xt(){if(Ie)return Ee;Ie=1;var e=function(){if(Se)return we;Se=1;var e=Object.prototype.toString,t=Math.max,r=function r(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r;};return we=function we(n){var o=this;if("function"!=typeof o||"[object Function]"!==e.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t;}(arguments),s=t(0,o.length-a.length),c=[],u=0;u<s;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r;}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var e=o.apply(this,r(a,arguments));return Object(e)===e?e:this;}return o.apply(n,r(a,arguments));}),o.prototype){var p=function p(){};p.prototype=o.prototype,i.prototype=new p(),p.prototype=null;}return i;},we;}();return Ee=Function.prototype.bind||e;}function Dt(){return Oe?_e:(Oe=1,_e=Function.prototype.call);}function jt(){return Pe?Ae:(Pe=1,Ae=Function.prototype.apply);}function Tt(){if(je)return De;je=1;var e=xt(),t=jt(),r=Dt(),n=xe?ke:(xe=1,ke="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return De=n||e.call(r,t);}function Nt(){if(Ne)return Te;Ne=1;var e=xt(),t=_(),r=Dt(),n=Tt();return Te=function Te(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o);};}function Bt(){if(Ce)return Be;Ce=1;var e,t=Nt(),r=_t();try{e=[].__proto__===Array.prototype;}catch(a){if(!a||"object"!=_typeof(a)||!("code"in a)||"ERR_PROTO_ACCESS"!==a.code)throw a;}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Be=n&&"function"==typeof n.get?t([n.get]):"function"==typeof i&&function(e){return i(null==e?e:o(e));};}function Ct(){if(Me)return Ue;Me=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=xt();return Ue=r.call(e,t);}function Rt(){if(Fe)return He;var e;Fe=1;var t=ct(),r=ut(),n=pt(),o=lt(),i=ft(),a=dt(),s=_(),c=yt(),u=ht(),p=gt(),l=mt(),f=vt(),d=bt(),y=wt(),h=Et(),g=Function,m=function m(e){try{return g('"use strict"; return ('+e+").constructor;")();}catch(t){}},v=_t(),b=Ot(),w=function w(){throw new s();},S=v?function(){try{return w;}catch(e){try{return v(arguments,"callee").get;}catch(t){return w;}}}():w,E=At()(),I=function(){if(Le)return Re;Le=1;var e=Pt(),t=kt(),r=Bt();return Re=e?function(t){return e(t);}:t?function(e){if(!e||"object"!=_typeof(e)&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e);}:r?function(e){return r(e);}:null;}(),O=kt(),A=Pt(),P=jt(),k=Dt(),x={},D="undefined"!=typeof Uint8Array&&I?I(Uint8Array):e,j={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":E&&I?I([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":x,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&I?I(I([][Symbol.iterator]())):e,"%JSON%":"object"==(typeof JSON==="undefined"?"undefined":_typeof(JSON))?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&I?I(new Map()[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&I?I(new Set()[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&I?I(""[Symbol.iterator]()):e,"%Symbol%":E?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":S,"%TypedArray%":D,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":P,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":O,"%Math.abs%":u,"%Math.floor%":p,"%Math.max%":l,"%Math.min%":f,"%Math.pow%":d,"%Math.round%":y,"%Math.sign%":h,"%Reflect.getPrototypeOf%":A};if(I)try{null.error;}catch(W){var T=I(I(W));j["%Error.prototype%"]=T;}var N=function e(t){var r;if("%AsyncFunction%"===t)r=m("async function () {}");else if("%GeneratorFunction%"===t)r=m("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=m("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype);}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&I&&(r=I(o.prototype));}return j[t]=r,r;},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=xt(),R=Ct(),L=C.call(k,Array.prototype.concat),U=C.call(P,Array.prototype.splice),M=C.call(k,String.prototype.replace),H=C.call(k,String.prototype.slice),F=C.call(k,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,V=function V(e,t){var r,n=e;if(R(B,n)&&(n="%"+(r=B[n])[0]+"%"),R(j,n)){var o=j[n];if(o===x&&(o=N(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o};}throw new a("intrinsic "+e+" does not exist!");};return He=function He(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===F(/^%?[^%]*%?$/,e))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return M(e,Y,function(e,t,r,o){n[n.length]=r?M(o,q,"$1"):t||e;}),n;}(e),n=r.length>0?r[0]:"",o=V("%"+n+"%",t),i=o.name,c=o.value,u=!1,p=o.alias;p&&(n=p[0],U(r,L([0,1],p)));for(var l=1,f=!0;l<r.length;l+=1){var d=r[l],y=H(d,0,1),h=H(d,-1);if(('"'===y||"'"===y||"`"===y||'"'===h||"'"===h||"`"===h)&&y!==h)throw new a("property names with quotes must have matching quotes");if("constructor"!==d&&f||(u=!0),R(j,i="%"+(n+="."+d)+"%"))c=j[i];else if(null!=c){if(!(d in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return;}if(v&&l+1>=r.length){var g=v(c,d);c=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[d];}else f=R(c,d),c=c[d];f&&!u&&(j[i]=c);}}return c;},He;}function Lt(){if(qe)return Ye;qe=1;var e=Rt(),t=Nt(),r=t([e("%String.prototype.indexOf%")]);return Ye=function Ye(n,o){var i=e(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?t([i]):i;};}function Ut(){if(We)return Ve;We=1;var e=Rt(),t=Lt(),r=at(),n=_(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),c=t("Map.prototype.delete",!0),u=t("Map.prototype.size",!0);return Ve=!!o&&function(){var e,t={assert:function assert(e){if(!t.has(e))throw new n("Side channel does not contain "+r(e));},delete:function _delete(t){if(e){var r=c(e,t);return 0===u(e)&&(e=void 0),r;}return!1;},get:function get(t){if(e)return i(e,t);},has:function has(t){return!!e&&s(e,t);},set:function set(t,r){e||(e=new o()),a(e,t,r);}};return t;};}function Mt(){if(Qe)return Ge;Qe=1;var e=_(),t=at(),r=st(),n=Ut(),o=function(){if(Je)return Ke;Je=1;var e=Rt(),t=Lt(),r=at(),n=Ut(),o=_(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),c=t("WeakMap.prototype.has",!0),u=t("WeakMap.prototype.delete",!0);return Ke=i?function(){var e,t,p={assert:function assert(e){if(!p.has(e))throw new o("Side channel does not contain "+r(e));},delete:function _delete(r){if(i&&r&&("object"==_typeof(r)||"function"==typeof r)){if(e)return u(e,r);}else if(n&&t)return t.delete(r);return!1;},get:function get(r){return i&&r&&("object"==_typeof(r)||"function"==typeof r)&&e?a(e,r):t&&t.get(r);},has:function has(r){return i&&r&&("object"==_typeof(r)||"function"==typeof r)&&e?c(e,r):!!t&&t.has(r);},set:function set(r,o){i&&r&&("object"==_typeof(r)||"function"==typeof r)?(e||(e=new i()),s(e,r,o)):n&&(t||(t=n()),t.set(r,o));}};return p;}:n;}(),i=o||n||r;return Ge=function Ge(){var r,n={assert:function assert(r){if(!n.has(r))throw new e("Side channel does not contain "+t(r));},delete:function _delete(e){return!!r&&r.delete(e);},get:function get(e){return r&&r.get(e);},has:function has(e){return!!r&&r.has(e);},set:function set(e,t){r||(r=i()),r.set(e,t);}};return n;};}function Ht(){if(ze)return $e;ze=1;var e=String.prototype.replace,t=/%20/g,r="RFC3986";return $e={default:r,formatters:{RFC1738:function RFC1738(r){return e.call(r,t,"+");},RFC3986:function RFC3986(e){return String(e);}},RFC1738:"RFC1738",RFC3986:r};}function Ft(){if(Ze)return Xe;Ze=1;var e=Ht(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e;}(),o=function o(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r;},i=1024;return Xe={arrayToObject:o,assign:function assign(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e;},e);},combine:function combine(e,t){return[].concat(e,t);},compact:function compact(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o<t.length;++o)for(var i=t[o],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],p=a[u];"object"==_typeof(p)&&null!==p&&-1===n.indexOf(p)&&(t.push({obj:a,prop:u}),n.push(p));}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(r(n)){for(var o=[],i=0;i<n.length;++i)void 0!==n[i]&&o.push(n[i]);t.obj[t.prop]=o;}}}(t),e;},decode:function decode(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n);}catch(o){return n;}},encode:function encode(t,r,o,a,s){if(0===t.length)return t;var c=t;if("symbol"==_typeof(t)?c=Symbol.prototype.toString.call(t):"string"!=typeof t&&(c=String(t)),"iso-8859-1"===o)return escape(c).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B";});for(var u="",p=0;p<c.length;p+=i){for(var l=c.length>=i?c.slice(p,p+i):c,f=[],d=0;d<l.length;++d){var y=l.charCodeAt(d);45===y||46===y||95===y||126===y||y>=48&&y<=57||y>=65&&y<=90||y>=97&&y<=122||s===e.RFC1738&&(40===y||41===y)?f[f.length]=l.charAt(d):y<128?f[f.length]=n[y]:y<2048?f[f.length]=n[192|y>>6]+n[128|63&y]:y<55296||y>=57344?f[f.length]=n[224|y>>12]+n[128|y>>6&63]+n[128|63&y]:(d+=1,y=65536+((1023&y)<<10|1023&l.charCodeAt(d)),f[f.length]=n[240|y>>18]+n[128|y>>12&63]+n[128|y>>6&63]+n[128|63&y]);}u+=f.join("");}return u;},isBuffer:function isBuffer(e){return!(!e||"object"!=_typeof(e))&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e));},isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e);},maybeMap:function maybeMap(e,t){if(r(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(t(e[o]));return n;}return t(e);},merge:function e(n,i,a){if(!i)return n;if("object"!=_typeof(i)&&"function"!=typeof i){if(r(n))n.push(i);else{if(!n||"object"!=_typeof(n))return[n,i];(a&&(a.plainObjects||a.allowPrototypes)||!t.call(Object.prototype,i))&&(n[i]=!0);}return n;}if(!n||"object"!=_typeof(n))return[n].concat(i);var s=n;return r(n)&&!r(i)&&(s=o(n,a)),r(n)&&r(i)?(i.forEach(function(r,o){if(t.call(n,o)){var i=n[o];i&&"object"==_typeof(i)&&r&&"object"==_typeof(r)?n[o]=e(i,r,a):n.push(r);}else n[o]=r;}),n):Object.keys(i).reduce(function(r,n){var o=i[n];return t.call(r,n)?r[n]=e(r[n],o,a):r[n]=o,r;},s);}};}function Yt(){if(tt)return et;tt=1;var e=Mt(),t=Ft(),r=Ht(),n=Object.prototype.hasOwnProperty,o={brackets:function brackets(e){return e+"[]";},comma:"comma",indices:function indices(e,t){return e+"["+t+"]";},repeat:function repeat(e){return e;}},i=Array.isArray,a=Array.prototype.push,s=function s(e,t){a.apply(e,i(t)?t:[t]);},c=Date.prototype.toISOString,u=r.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function serializeDate(e){return c.call(e);},skipNulls:!1,strictNullHandling:!1},l={},f=function r(n,o,a,c,u,f,d,y,h,g,m,v,b,w,S,E,I,_){for(var O,A=n,P=_,k=0,x=!1;void 0!==(P=P.get(l))&&!x;){var D=P.get(n);if(k+=1,void 0!==D){if(D===k)throw new RangeError("Cyclic object value");x=!0;}void 0===P.get(l)&&(k=0);}if("function"==typeof g?A=g(o,A):A instanceof Date?A=b(A):"comma"===a&&i(A)&&(A=t.maybeMap(A,function(e){return e instanceof Date?b(e):e;})),null===A){if(f)return h&&!E?h(o,p.encoder,I,"key",w):o;A="";}if("string"==typeof(O=A)||"number"==typeof O||"boolean"==typeof O||"symbol"==_typeof(O)||"bigint"==typeof O||t.isBuffer(A))return h?[S(E?o:h(o,p.encoder,I,"key",w))+"="+S(h(A,p.encoder,I,"value",w))]:[S(o)+"="+S(String(A))];var j,T=[];if(void 0===A)return T;if("comma"===a&&i(A))E&&h&&(A=t.maybeMap(A,h)),j=[{value:A.length>0?A.join(",")||null:void 0}];else if(i(g))j=g;else{var N=Object.keys(A);j=m?N.sort(m):N;}var B=y?String(o).replace(/\./g,"%2E"):String(o),C=c&&i(A)&&1===A.length?B+"[]":B;if(u&&i(A)&&0===A.length)return C+"[]";for(var R=0;R<j.length;++R){var L=j[R],U="object"==_typeof(L)&&L&&void 0!==L.value?L.value:A[L];if(!d||null!==U){var M=v&&y?String(L).replace(/\./g,"%2E"):String(L),H=i(A)?"function"==typeof a?a(C,M):C:C+(v?"."+M:"["+M+"]");_.set(n,k);var F=e();F.set(l,_),s(T,r(U,H,a,c,u,f,d,y,"comma"===a&&E&&i(A)?null:h,g,m,v,b,w,S,E,I,F));}}return T;};return et=function et(t,a){var c,u=t,l=function(e){if(!e)return p;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=r.default;if(void 0!==e.format){if(!n.call(r.formatters,e.format))throw new TypeError("Unknown format option provided.");a=e.format;}var s,c=r.formatters[a],u=p.filter;if(("function"==typeof e.filter||i(e.filter))&&(u=e.filter),s=e.arrayFormat in o?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=void 0===e.allowDots?!0===e.encodeDotInKeys||p.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:l,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:s,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:u,format:a,formatter:c,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling};}(a);"function"==typeof l.filter?u=(0,l.filter)("",u):i(l.filter)&&(c=l.filter);var d=[];if("object"!=_typeof(u)||null===u)return"";var y=o[l.arrayFormat],h="comma"===y&&l.commaRoundTrip;c||(c=Object.keys(u)),l.sort&&c.sort(l.sort);for(var g=e(),m=0;m<c.length;++m){var v=c[m],b=u[v];l.skipNulls&&null===b||s(d,f(b,v,y,h,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,g));}var w=d.join(l.delimiter),S=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),w.length>0?S+w:"";};}function qt(){if(nt)return rt;nt=1;var e=Ft(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function o(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10));});},i=function i(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e;},a=function a(r,n,o,_a){if(r){var s=o.allowDots?r.replace(/\.([^.[]+)/g,"[$1]"):r,c=/(\[[^[\]]*])/g,u=o.depth>0&&/(\[[^[\]]*])/.exec(s),p=u?s.slice(0,u.index):s,l=[];if(p){if(!o.plainObjects&&t.call(Object.prototype,p)&&!o.allowPrototypes)return;l.push(p);}for(var f=0;o.depth>0&&null!==(u=c.exec(s))&&f<o.depth;){if(f+=1,!o.plainObjects&&t.call(Object.prototype,u[1].slice(1,-1))&&!o.allowPrototypes)return;l.push(u[1]);}if(u){if(!0===o.strictDepth)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");l.push("["+s.slice(u.index)+"]");}return function(t,r,n,o){var a=0;if(t.length>0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");a=Array.isArray(r)&&r[s]?r[s].length:0;}for(var c=o?r:i(r,n,a),u=t.length-1;u>=0;--u){var p,l=t[u];if("[]"===l&&n.parseArrays)p=n.allowEmptyArrays&&(""===c||n.strictNullHandling&&null===c)?[]:e.combine([],c);else{p=n.plainObjects?{__proto__:null}:{};var f="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,d=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,y=parseInt(d,10);n.parseArrays||""!==d?!isNaN(y)&&l!==d&&String(y)===d&&y>=0&&n.parseArrays&&y<=n.arrayLimit?(p=[])[y]=c:"__proto__"!==d&&(p[d]=c):p={0:c};}c=p;}return c;}(l,n,o,_a);}};return rt=function rt(s,c){var u=function(t){if(!t)return n;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===t.charset?n.charset:t.charset,o=void 0===t.duplicates?n.duplicates:t.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||n.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:n.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:n.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:n.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:n.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:n.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:n.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded};}(c);if(""===s||null==s)return u.plainObjects?{__proto__:null}:{};for(var p="string"==typeof s?function(a,s){var c={__proto__:null},u=s.ignoreQueryPrefix?a.replace(/^\?/,""):a;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var p=s.parameterLimit===1/0?void 0:s.parameterLimit,l=u.split(s.delimiter,s.throwOnLimitExceeded?p+1:p);if(s.throwOnLimitExceeded&&l.length>p)throw new RangeError("Parameter limit exceeded. Only "+p+" parameter"+(1===p?"":"s")+" allowed.");var f,d=-1,y=s.charset;if(s.charsetSentinel)for(f=0;f<l.length;++f)0===l[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[f]?y="utf-8":"utf8=%26%2310003%3B"===l[f]&&(y="iso-8859-1"),d=f,f=l.length);for(f=0;f<l.length;++f)if(f!==d){var h,g,m=l[f],v=m.indexOf("]="),b=-1===v?m.indexOf("="):v+1;-1===b?(h=s.decoder(m,n.decoder,y,"key"),g=s.strictNullHandling?null:""):(h=s.decoder(m.slice(0,b),n.decoder,y,"key"),g=e.maybeMap(i(m.slice(b+1),s,r(c[h])?c[h].length:0),function(e){return s.decoder(e,n.decoder,y,"value");})),g&&s.interpretNumericEntities&&"iso-8859-1"===y&&(g=o(String(g))),m.indexOf("[]=")>-1&&(g=r(g)?[g]:g);var w=t.call(c,h);w&&"combine"===s.duplicates?c[h]=e.combine(c[h],g):w&&"last"!==s.duplicates||(c[h]=g);}return c;}(s,u):s,l=u.plainObjects?{__proto__:null}:{},f=Object.keys(p),d=0;d<f.length;++d){var y=f[d],h=a(y,p[y],u,"string"==typeof s);l=e.merge(l,h,u);}return!0===u.allowSparse?l:e.compact(l);};}function Vt(){if(it)return ot;it=1;var e=Yt(),t=qt();return ot={formats:Ht(),parse:t,stringify:e};}v||E(Vt()).parse(location.search,{ignoreQueryPrefix:!0,arrayLimit:100,allowDots:!0});var Wt="undefined"!=typeof window?window:"undefined"!=typeof global?global:{};g.mpWebview,g.wxBrowser,g.yuanbaoApp,g.tenVideo,g.tenNews,g.tenSports,g.mobileBrowser,g.pcBrowser,m.shareAgentInfoPage,m.shareAgentChatPage,m.shareAgentChatPage,m.adPage;var Kt;try{Kt=JSON.parse(function(e){try{return"undefined"!=typeof wx&&wx.getStorageSync?wx.getStorageSync(e):sessionStorage.getItem(e)||"{}";}catch(t){return"{}";}}("HY_TRID_STORE")||"{}");}catch(xr){Kt={};}Wt.HY_TRID_STORE=Wt.HY_TRID_STORE||Kt;var Jt,Gt={exports:{}};var Qt=(Jt||(Jt=1,Gt.exports=function(){var _e4=function e(t,r){return(_e4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);})(t,r);},_t4=function t(){return _t4=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e;},_t4.apply(this,arguments);};function r(e,t,r,n){return new(r||(r=Promise))(function(t,o){function i(e){try{s(n.next(e));}catch(t){o(t);}}function a(e){try{s(n.throw(e));}catch(t){o(t);}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r(function(e){e(n);})).then(i,a);}s((n=n.apply(e,[])).next());});}function n(e,t){var r,n,o,i={label:0,sent:function sent(){if(1&o[0])throw o[1];return o[1];},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this;}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue;}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break;}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break;}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break;}o[2]&&i.ops.pop(),i.trys.pop();continue;}s=t.call(e,i);}catch(c){s=[6,c],n=0;}finally{r=o=0;}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0};}([s,c]);};}}"function"==typeof SuppressedError&&SuppressedError;var o="__BEACON_",i="__BEACON_deviceId",a="last_report_time",s="sending_event_ids",c="beacon_config",u="beacon_config_request_time",p=new Set(["rqd_js_init","rqd_applaunched"]),l=function(){function e(){var e=this;this.emit=function(t,r){if(e){var n,o=e.__EventsList[t];if(null==o?void 0:o.length){o=o.slice();for(var i=0;i<o.length;i++){n=o[i];try{var a=n.callback.apply(e,[r]);if(1===n.type&&e.remove(t,n.callback),!1===a)break;}catch(s){throw s;}}}return e;}},this.__EventsList={};}return e.prototype.indexOf=function(e,t){for(var r=0;r<e.length;r++)if(e[r].callback===t)return r;return-1;},e.prototype.on=function(e,t,r){if(void 0===r&&(r=0),this){var n=this.__EventsList[e];if(n||(n=this.__EventsList[e]=[]),-1===this.indexOf(n,t)){var o={name:e,type:r||0,callback:t};return n.push(o),this;}return this;}},e.prototype.one=function(e,t){this.on(e,t,1);},e.prototype.remove=function(e,t){if(this){var r=this.__EventsList[e];if(!r)return null;if(!t){try{delete this.__EventsList[e];}catch(o){}return null;}if(r.length){var n=this.indexOf(r,t);r.splice(n,1);}return this;}},e;}();function f(e,t){for(var r={},n=0,o=Object.keys(e);n<o.length;n++){var i=o[n],a=e[i];if("string"==typeof a)r[d(i)]=d(a);else{if(t)throw new Error("value mast be string !!!!");r[d(String(i))]=d(String(a));}}return r;}function d(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B");}catch(t){return"";}}function y(e){return String(e.A99)+String(e.A100);}var h=function h(){},g=function(){function e(e){var r=this;this.lifeCycle=new l(),this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(e){if(!e||!e.reduce||!e.length)throw new TypeError("createPipeline 方法需要传入至少有一个 pipe 的数组");return 1===e.length?function(t,r){e[0](t,r||h);}:e.reduce(function(e,t){return function(r,n){return void 0===n&&(n=h),e(r,function(e){return null==t?void 0:t(e,n);});};});}([function(e){r.send({url:r.strategy.getUploadUrl(),data:e,method:"post",contentType:"application/json;charset=UTF-8"},function(){var t=r.config.onReportSuccess;"function"==typeof t&&t(JSON.stringify(e.events));},function(){var t=r.config.onReportFail;"function"==typeof t&&t(JSON.stringify(e.events));});}]),function(e,t){if(!e)throw t instanceof Error?t:new Error(t);}(Boolean(e.appkey),"appkey must be initial"),this.config=_t4(_t4({},e),{needReportRqdEvent:null==e.needReportRqdEvent||e.needReportRqdEvent});}return e.prototype.onUserAction=function(e,t){this.preReport(e,t,!1);},e.prototype.onDirectUserAction=function(e,t){this.preReport(e,t,!0);},e.prototype.preReport=function(e,t,r){e?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(e)||this.strategy.isSampleEvent(e)||!this.config.needReportRqdEvent&&p.has(e)||this.onReport(e,t,r)):this.errorReport.reportError("602"," no eventCode");},e.prototype.addAdditionalParams=function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];this.additionalParams[n]=e[n];}},e.prototype.setChannelId=function(e){this.commonInfo.channelID=String(e);},e.prototype.setOpenId=function(e){this.commonInfo.openid=String(e);},e.prototype.setUnionid=function(e){this.commonInfo.unid=String(e);},e.prototype.getDeviceId=function(){return this.commonInfo.deviceId;},e.prototype.getCommonInfo=function(){return this.commonInfo;},e.prototype.removeSendingId=function(e){try{var t=JSON.parse(this.storage.getItem(s)),r=t.indexOf(e);-1!=r&&(t.splice(r,1),this.storage.setItem(s,JSON.stringify(t)));}catch(n){}},e;}(),m=function(){function e(e,t,r,n){this.requestParams={},this.network=n,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=e.appkey,this.requestParams.platform=r,this.requestParams.uin=t.deviceId,this.requestParams.model="",this.requestParams.os=r,this.requestParams.app_version=e.appVersion,this.requestParams.sdk_version=t.sdkVersion,this.requestParams.error_stack="",this.uploadUrl=e.isOversea?"https://htrace.wetvinfo.com/kv":"https://h.trace.qq.com/kv";}return e.prototype.reportError=function(e,t){this.requestParams._dc=Math.random(),this.requestParams.error_msg=t,this.requestParams.error_code=e,this.network.get(this.uploadUrl,{params:this.requestParams}).catch(function(e){});},e;}(),v=function(){function e(e,t,r,n,o){this.strategy={isEventUpOnOff:!0,httpsUploadUrl:"https://otheve.beacon.qq.com/analytics/v2_upload",requestInterval:30,blacklist:[],samplelist:[]},this.realSample={},this.appkey="",this.needQueryConfig=!0,this.appkey=t.appkey,this.storage=n,this.needQueryConfig=e;try{var i=JSON.parse(this.storage.getItem(c));i&&this.processData(i);}catch(a){}t.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!t.isOversea&&this.needRequestConfig()&&this.requestConfig(t.appVersion,r,o);}return e.prototype.requestConfig=function(e,t,r){var n=this;this.storage.setItem(u,Date.now().toString()),r.post("https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:"undefined"==typeof wx?"3":"4",mainAppKey:this.appkey,appVersion:e,sdkVersion:t.sdkVersion,osVersion:t.userAgent,model:"",packageName:"",params:{A3:t.deviceId}}).then(function(e){if(0==e.data.ret)try{var t=JSON.parse(e.data.beaconConfig);t&&(n.processData(t),n.storage.setItem(c,e.data.beaconConfig));}catch(r){}else n.processData(null),n.storage.setItem(c,"");}).catch(function(e){});},e.prototype.processData=function(e){var t,r,n,o,i;this.strategy.isEventUpOnOff=null!==(t=null==e?void 0:e.isEventUpOnOff)&&void 0!==t?t:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=null!==(r=null==e?void 0:e.httpsUploadUrl)&&void 0!==r?r:this.strategy.httpsUploadUrl,this.strategy.requestInterval=null!==(n=null==e?void 0:e.requestInterval)&&void 0!==n?n:this.strategy.requestInterval,this.strategy.blacklist=null!==(o=null==e?void 0:e.blacklist)&&void 0!==o?o:this.strategy.blacklist,this.strategy.samplelist=null!==(i=null==e?void 0:e.samplelist)&&void 0!==i?i:this.strategy.samplelist;for(var a=0,s=this.strategy.samplelist;a<s.length;a++){var c=s[a].split(",");2==c.length&&(this.realSample[c[0]]=c[1]);}},e.prototype.needRequestConfig=function(){if(!this.needQueryConfig)return!1;var e=Number(this.storage.getItem(u));return Date.now()-e>60*this.strategy.requestInterval*1e3;},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey;},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e);},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff;},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]<Math.floor(Math.random()*Math.floor(1e4));},e;}(),b="session_storage_key",w=function(){function e(e,t,r){this.getSessionStackDepth=0,this.beacon=r,this.storage=e,this.duration=t,this.appkey=r.config.appkey;}return e.prototype.getSession=function(){this.getSessionStackDepth+=1;var e=this.storage.getItem(b);if(!e)return this.createSession();var t="",r=0;try{var n=JSON.parse(e)||{sessionId:void 0,sessionStart:void 0};if(!n.sessionId||!n.sessionStart)return this.createSession();var o=Number(this.storage.getItem(a));if(Date.now()-o>this.duration)return this.createSession();t=n.sessionId,r=n.sessionStart,this.getSessionStackDepth=0;}catch(i){}return{sessionId:t,sessionStart:r};},e.prototype.createSession=function(){var e=Date.now(),t={sessionId:this.appkey+"_"+e.toString(),sessionStart:e};this.storage.setItem(b,JSON.stringify(t)),this.storage.setItem(a,e.toString());var r="is_new_user",n=this.storage.getItem(r);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:n?"N":"Y"}),this.storage.setItem(r,JSON.stringify(!1)),t;},e;}();function S(){var e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,r=e.indexOf("Edge")>-1&&!t,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){new RegExp("MSIE (\\d+\\.\\d+);").test(e);var o=parseFloat(RegExp.$1);return 7==o?7:8==o?8:9==o?9:10==o?10:6;}return r?-2:n?11:-1;}function E(e,t){var r,n;return(r="https://tun-cos-1258344701.file.myqcloud.com/fp.js",void 0===n&&(n=Date.now()+"-"+Math.random()),new Promise(function(e,t){if(document.getElementById(n))e(void 0);else{var o=document.getElementsByTagName("head")[0],i=document.createElement("script");i.onload=function(){return function(){i.onload=null,e(void 0);};},i.onerror=function(e){i.onerror=null,o.removeChild(i),t(e);},i.src=r,i.id=n,o.appendChild(i);}})).then(function(){new Fingerprint().getQimei36(e,t);}).catch(function(e){}),"";}var I=function(){function e(e,t){void 0===t&&(t=5e3),this.id="",this.queueKey="",this.maxLockTime=5e3,this.id=Math.random().toString(16).substring(2,9),this.queueKey="dt_task_lock_queue_"+e,this.maxLockTime=t,this.releaseLockWhenUnload();}return e.prototype.getLock=function(){var e,t=this;if(!window||!localStorage)return!1;try{var r=JSON.parse(localStorage.getItem(this.queueKey)||"[]");-1===(r=r.filter(function(e){return Date.now()-e.time<t.maxLockTime;})).findIndex(function(e){return e.id===t.id;})&&r.push({id:this.id,time:Date.now()});var n=!1;return(null===(e=r[0])||void 0===e?void 0:e.id)===this.id&&(r[0].time=Date.now(),n=!0),localStorage.setItem(this.queueKey,JSON.stringify(r)),n;}catch(o){return!1;}},e.prototype.releaseLock=function(){var e;if(window&&localStorage){var t=JSON.parse(localStorage.getItem(this.queueKey)||"[]");(null===(e=t[0])||void 0===e?void 0:e.id)===this.id&&(t.shift(),localStorage.setItem(this.queueKey,JSON.stringify(t)));}},e.prototype.isFirstInQue=function(){var e;return(null===(e=JSON.parse(localStorage.getItem(this.queueKey)||"[]")[0])||void 0===e?void 0:e.id)===this.id;},e.prototype.releaseLockWhenUnload=function(){var e=this;window&&window.addEventListener("beforeunload",function(){e.releaseLock();});},e;}(),_=function(){function e(e){this.config=e;}return e.prototype.openDB=function(){var e=this;return new Promise(function(t,r){var n=e.config,o=n.name,i=n.version,a=n.stores,s=indexedDB.open(o,i);s.onsuccess=function(){e.db=s.result,t();},s.onerror=function(e){r(e);},s.onupgradeneeded=function(){e.db=s.result;try{null==a||a.forEach(function(t){e.createStore(t);});}catch(t){r(t);}};});},e.prototype.useStore=function(e){return this.storeName=e,this;},e.prototype.deleteDB=function(){var e=this;return this.closeDB(),new Promise(function(t){var r=indexedDB.deleteDatabase(e.config.name);r.onsuccess=function(){return t();},r.onerror=function(e){return t();};});},e.prototype.closeDB=function(){var e;null===(e=this.db)||void 0===e||e.close(),this.db=null;},e.prototype.getStoreCount=function(){var e=this;return new Promise(function(t){var r=e.getStore("readonly").count();r.onsuccess=function(){return t(r.result);},r.onerror=function(e){return t(0);};});},e.prototype.clearStore=function(){var e=this;return new Promise(function(t){var r=e.getStore("readwrite").clear();r.onsuccess=function(){return t();},r.onerror=function(e){return t();};});},e.prototype.put=function(e,t){var r=this;return new Promise(function(n){var o=r.getStore("readwrite").put(e,t);o.onsuccess=function(){n(o.result);},o.onerror=function(e){return n(void 0);};});},e.prototype.get=function(e,t){var r=this;return new Promise(function(n){var o=r.getStore().index(e).get(t);o.onsuccess=function(){n(o.result);},o.onerror=function(e){return n(void 0);};});},e.prototype.remove=function(e,t){var r=this;return new Promise(function(n){var o=r.getStore("readwrite").index(e).objectStore.delete(t);o.onsuccess=function(){n(o.result);},o.onerror=function(e){return n(void 0);};});},e.prototype.removeList=function(e,t){var r=this;return new Promise(function(n){var o=r.getStore("readwrite").index(e),i=[];t.forEach(function(e){o.objectStore.delete(e).onerror=function(){i.push(e);};}),n(i);});},e.prototype.getStoreAllData=function(e){var t=this;return void 0===e&&(e=1/0),new Promise(function(r){var n=t.getStore("readonly");if("function"==typeof n.getAll){var o=n.getAll(null,e);o.onsuccess=function(){r(o.result);},o.onerror=function(){return r([]);};}else{var i=n.openCursor(),a=[];i.onsuccess=function(){var t=i.result;if(t&&a.length<e)try{t.value&&a.push(t.value),t.continue();}catch(n){r(a);}else r(a);},i.onerror=function(){return r([]);};}});},e.prototype.removeDataByIndex=function(e,t,r,n,o){var i=this;return new Promise(function(a){var s=i.getStore("readwrite").index(e),c=IDBKeyRange.bound(t,r,n,o),u=s.openCursor(c);u.onerror=function(e){return a();},u.onsuccess=function(e){var t=e.target.result;t?(t.delete(),t.continue()):a();};});},e.prototype.createStore=function(e){var t=e.name,r=e.indexes,n=void 0===r?[]:r,o=e.options;if(this.db){this.db.objectStoreNames.contains(t)&&this.db.deleteObjectStore(t);var i=this.db.createObjectStore(t,o);n.forEach(function(e){i.createIndex(e.indexName,e.keyPath,e.options);});}},e.prototype.getStore=function(e){var t;return void 0===e&&(e="readonly"),null===(t=this.db)||void 0===t?void 0:t.transaction(this.storeName,e).objectStore(this.storeName);},e;}(),O="event_table_v4",A="eventId",P="eventTime",k=function(){function e(e,t){this.isReady=!1,this.taskQueue=Promise.resolve(),this.db=new _({name:"Beacon_"+e+"_V4",version:1,stores:[{name:O,options:{keyPath:A},indexes:[{indexName:A,keyPath:A,options:{unique:!0}},{indexName:P,keyPath:"value.eventTime",options:{unique:!1}}]}]}),this.open(t);}return e.prototype.closeDB=function(){this.db.closeDB();},e.prototype.getCount=function(){var e=this;return this.readyExec(function(){return e.db.getStoreCount();});},e.prototype.setItem=function(e,t){var r=this;return this.readyExec(function(){return r.db.put({eventId:e,value:t});});},e.prototype.getItem=function(e){return r(this,void 0,void 0,function(){var t=this;return n(this,function(r){return[2,this.readyExec(function(){return t.db.get(e,A);})];});});},e.prototype.removeItem=function(e){var t=this;return this.readyExec(function(){return t.db.remove(A,e);});},e.prototype.removeItemList=function(e){var t=this;return this.readyExec(function(){return t.db.removeList(A,e);});},e.prototype.removeOutOfTimeData=function(e){var t=this;void 0===e&&(e=7);var r=new Date().setHours(0,0,0,0)-24*e*60*60*1e3;return this.readyExec(function(){return t.db.removeDataByIndex(P,"0",r.toString());});},e.prototype.updateItem=function(e,t){var r=this;return this.readyExec(function(){return r.db.put({eventId:e,value:t});});},e.prototype.getAll=function(e){var t=this;return this.readyExec(function(){return t.db.getStoreAllData(e).then(function(e){return e;}).catch(function(e){return[];});});},e.prototype.open=function(e){return r(this,void 0,void 0,function(){var t,r=this;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.taskQueue=this.taskQueue.then(function(){return r.db.openDB();}),[4,this.taskQueue];case 1:return n.sent(),this.isReady=!0,this.db.useStore(O),[3,3];case 2:return t=n.sent(),null==e||e.openDBFail(t),[3,3];case 3:return[2];}});});},e.prototype.readyExec=function(e){return this.isReady?e():(this.taskQueue=this.taskQueue.then(function(){return e();}),this.taskQueue);},e;}(),x=function(){function e(e){this.keyObject={},this.storage=e;}return e.prototype.getCount=function(){return this.storage.getStoreCount();},e.prototype.removeItem=function(e){this.storage.removeItem(e),delete this.keyObject[e];},e.prototype.removeItemList=function(e){var t=this;e.forEach(function(e){return t.removeItem(e);});},e.prototype.setItem=function(e,t){var r=JSON.stringify(t);this.storage.setItem(e,r),this.keyObject[e]=t;},e.prototype.getAll=function(){for(var e=Object.keys(this.keyObject),t=[],r=0;r<e.length;r++){var n=this.storage.getItem(e[r]);t.push(JSON.parse(n));}return t;},e.prototype.removeOutOfTimeData=function(e){return Promise.resolve();},e.prototype.closeDB=function(){},e;}(),D=function(){function e(e,t){var r=this;this.dbEventCount=0;var n=S(),o=function o(){r.store=new x(t),r.dbEventCount=r.store.getCount();};n>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?o():(this.store=new k(e,{openDBFail:function openDBFail(e){o();}}),this.getCount().then(function(e){r.dbEventCount=e;}).catch(function(e){}));}return e.prototype.getCount=function(){return r(this,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,e.sent()];case 2:return e.sent(),[2,Promise.reject()];case 3:return[2];}});});},e.prototype.insertEvent=function(e,t){return r(this,void 0,void 0,function(){var r,o;return n(this,function(n){switch(n.label){case 0:if(this.dbEventCount>=1e3)return[2,Promise.reject()];r=y(e.mapValue),n.label=1;case 1:return n.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(r,e)];case 2:return[2,n.sent()];case 3:return o=n.sent(),t&&t(o,e),this.dbEventCount--,[2,Promise.reject()];case 4:return[2];}});});},e.prototype.getEvents=function(e){return void 0===e&&(e=100),r(this,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.store.getAll(e)];case 1:return[2,t.sent().map(function(e){return e.value;})];case 2:return t.sent(),[2,Promise.resolve([])];case 3:return[2];}});});},e.prototype.removeEvent=function(e){return r(this,void 0,void 0,function(){var t;return n(this,function(r){switch(r.label){case 0:t=y(e.mapValue),r.label=1;case 1:return r.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(t)];case 2:return[2,r.sent()];case 3:return r.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2];}});});},e.prototype.removeEventList=function(e){return r(this,void 0,void 0,function(){var t,r;return n(this,function(n){switch(n.label){case 0:t=e.map(function(e){return y(e.mapValue);}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.store.removeItemList(t)];case 2:return r=n.sent(),this.dbEventCount-=t.length-(null==r?void 0:r.length)||0,[3,4];case 3:return n.sent(),[2,Promise.reject()];case 4:return[2];}});});},e.prototype.closeDB=function(){this.store.closeDB();},e;}();function j(e){var r,n="POST"===e.method?function(e){var r=e.url,n=e.method,o=e.body,i=e.beforeSend,a=o;if(i){var s=i({url:r,method:n,data:o});a=null==s?void 0:s.data;}return _t4(_t4({},e),{body:a});}(e):e,o=n.url,i=n.method,a=void 0===i?"GET":i,s=n.headers,c=void 0===s?{}:s,u=n.body,p=n.timeout,l=void 0===p?3e3:p;if(c.Accept="application/json, text/plain, */*","GET"===a){if(n.params){var f=-1===o.indexOf("?")?"?":"&";o=o+f+function(e){if(URLSearchParams)return(t=new URLSearchParams(e)).toString();for(var t="",r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];t+=o+"="+e[o]+"&";}return t;}(n.params);}u=null;}else c["Content-type"]="application/json;charset=utf-8";if("undefined"!=typeof fetch&&"undefined"!=typeof AbortController){var d,y=new AbortController(),h=setTimeout(function(){return y.abort();},l);return fetch(o,{method:a,headers:c,body:u?JSON.stringify(u):void 0,signal:y.signal}).then(function(e){return(d=e).json();}).then(function(e){return{data:e,status:d.status,statusText:d.statusText,headers:d.headers};}).catch(function(e){return Promise.reject(new Error("[fetch] "+e.message));}).finally(function(){return clearTimeout(h);});}return r=e,new Promise(function(e,t){var n=r.url,o=r.method,i=r.headers,a=r.body,s=r.timeout,c=void 0===s?3e3:s,u=new XMLHttpRequest();u.open(o,n,!0),u.timeout=c,i&&Object.entries(i).forEach(function(e){var t=e[0],r=e[1];return u.setRequestHeader(t,r);}),u.onload=function(){if(u.status>=200&&u.status<300)try{var r=JSON.parse(u.responseText);e({data:r,status:u.status,statusText:u.statusText,headers:u.getAllResponseHeaders()});}catch(n){t(new Error("解析 JSON 失败"));}else t(new Error("[XHR] "+u.status));},u.onerror=function(){return t(new Error("XHR 网络错误"));},u.ontimeout=function(){return t(new Error("XHR 超时"));},u.send(a?JSON.stringify(a):void 0);});}var T=function(){function e(e){this.beforeSend=e.onReportBeforeSend;}return e.prototype.get=function(e,o){return r(this,void 0,void 0,function(){var r;return n(this,function(n){switch(n.label){case 0:return[4,j(_t4({url:e,method:"GET",beforeSend:this.beforeSend},o))];case 1:return r=n.sent(),[2,Promise.resolve(r)];}});});},e.prototype.post=function(e,o,i){return r(this,void 0,void 0,function(){var r;return n(this,function(n){switch(n.label){case 0:return[4,j(_t4({url:e,body:o,method:"POST",beforeSend:this.beforeSend},i))];case 1:return r=n.sent(),[2,Promise.resolve(r)];}});});},e;}(),N=function(){function e(e){this.appkey=e;}return e.prototype.getItem=function(e){try{return window.localStorage.getItem(this.getStoreKey(e));}catch(t){return"";}},e.prototype.removeItem=function(e){try{window.localStorage.removeItem(this.getStoreKey(e));}catch(t){}},e.prototype.setItem=function(e,t){try{window.localStorage.setItem(this.getStoreKey(e),t);}catch(r){}},e.prototype.setSessionItem=function(e,t){try{window.sessionStorage.setItem(this.getStoreKey(e),t);}catch(r){}},e.prototype.getSessionItem=function(e){try{return window.sessionStorage.getItem(this.getStoreKey(e));}catch(t){return"";}},e.prototype.getStoreKey=function(e){return o+this.appkey+"_"+e;},e.prototype.createDeviceId=function(){try{var e=window.localStorage.getItem(i);return e||(e=function(e){for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",r="",n=0;n<e;n++)r+=t.charAt(Math.floor(51*Math.random()));return r;}(32),window.localStorage.setItem(i,e)),e;}catch(t){return"";}},e.prototype.clear=function(){try{for(var e=window.localStorage.length,t=0;t<e;t++){var r=window.localStorage.key(t);(null==r?void 0:r.substr(0,9))==o&&window.localStorage.removeItem(r);}}catch(n){}},e.prototype.getStoreCount=function(){var e=0;try{e=window.localStorage.length;}catch(t){}return e;},e;}(),B="logid_start",C="4.7.6-web";return function(r){function n(e){var t=r.call(this,e)||this;if(t.qimei36="",t.netFailNum=0,t.dbEmptyNum=0,t.lowFrequencyMode=!1,t.lsEnable=!0,t.networkTimeout=5e3,t.maxLockTime=1e4,t.isDebugMode=!1,t.throttleTimer=null,t.throttleBuffer=[],t.send=function(e,r,n){t.storage.setItem(a,Date.now().toString()),t.network.post(t.uploadUrl||t.strategy.getUploadUrl(),e.data,{timeout:t.networkTimeout}).then(function(n){var o;100==(null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.result)?t.delayTime=1e3*n.data.delayTime:t.delayTime=0,r&&r(e.data);var i=e.data.events;t.store.removeEventList(i).then(function(){i.forEach(function(e){return t.removeSendingId(y(e.mapValue));}),t.taskLock.releaseLock();}).catch(function(e){t.taskLock.releaseLock();}),t.doCustomCycleTask("net");}).catch(function(r){var o=e.data.events;t.errorReport.reportError(r.code?r.code.toString():"600",r.message),n&&n(e.data);var i=JSON.parse(t.storage.getItem(s));o.forEach(function(e){i&&-1!=i.indexOf(y(e))&&t.store.insertEvent(e,function(e,r){e&&t.errorReport.reportError("604","insertEvent fail!");}),t.removeSendingId(y(e));}),t.addLowFrequencyTag("net"),t.taskLock.releaseLock();});},!window.localStorage)return t.errorReport.reportError("605","no localStorage!"),t.lsEnable=!1,t;var n,o,i,c,u,p=S();return t.isUnderIE8=p>0&&p<8,t.isUnderIE8||(t.isUnderIE=p>0,e.needInitQimei&&E(e.appkey,function(e){t.qimei36=e.q36;}),o=(n=navigator.userAgent).indexOf("compatible")>-1&&n.indexOf("MSIE")>-1,i=n.indexOf("Trident")>-1&&n.indexOf("rv:11.0")>-1,(o||i)&&(t.networkTimeout=1e4,t.maxLockTime=15e3),t.taskLock=new I(e.appkey,t.maxLockTime),t.network=new T(e),t.storage=new N(e.appkey),t.initCommonInfo(e),t.store=new D(e.appkey,t.storage),t.errorReport=new m(t.config,t.commonInfo,"web",t.network),t.strategy=new v(null==e.needQueryConfig||e.needQueryConfig,t.config,t.commonInfo,t.storage,t.network),t.logidStartTime=t.storage.getItem(B),t.logidStartTime||(t.logidStartTime=Date.now().toString(),t.storage.setItem(B,t.logidStartTime)),c=t.logidStartTime,u=Date.now()-Number.parseFloat(c),Math.floor(u/864e5)>=365&&t.storage.clear(),t.isDebugMode=t.isDebugIdLegal(e.debugId),t.debugId=e.debugId,t.appId=e.appId,t.initSession(e),t.onDirectUserAction("rqd_js_init",{}),setTimeout(function(){return t.lifeCycle.emit("init");},0),t.storage.setItem(s,"[]"),t.initDelayTime=e.delay?e.delay:1e3,t.cycleTask(t.initDelayTime)),t;}return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t;}_e4(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n());}(n,r),n.prototype.initSession=function(e){var t=18e5;e.sessionDuration&&e.sessionDuration>3e4&&(t=e.sessionDuration),this.beaconSession=new w(this.storage,t,this);},n.prototype.initCommonInfo=function(e){var t=Number(this.storage.getItem(a));try{var r=JSON.parse(this.storage.getItem(s));(Date.now()-t>3e4||!r)&&this.storage.setItem(s,JSON.stringify([]));}catch(o){}e.uploadUrl&&(this.uploadUrl=e.uploadUrl+"?appkey="+e.appkey);var n=[window.screen.width,window.screen.height];window.devicePixelRatio&&n.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:n.join("*"),channelID:e.channelID?String(e.channelID):"",openid:e.openid?String(e.openid):"",unid:e.unionid?String(e.unionid):"",sdkVersion:C},this.config.appVersion=e.versionCode?String(e.versionCode):"",this.config.strictMode=e.strictMode;},n.prototype.cycleTask=function(e){var t=this;this.intervalID=window.setInterval(function(){t.taskLock.getLock()&&t.store.getEvents().then(function(e){if(t.taskLock.isFirstInQue()){var r=[],n=JSON.parse(t.storage.getItem(s));if(n||(n=[]),e&&e.forEach(function(e){var t=y(e.mapValue);-1==n.indexOf(t)&&(r.push(e),n.push(t));}),n.length>1e3&&(n=[]),0==r.length)return t.addLowFrequencyTag("db"),void t.taskLock.releaseLock();t.storage.setItem(s,JSON.stringify(n)),t._normalLogPipeline(t.assembleData(r));}}).catch(function(e){t.taskLock.releaseLock();});},e);},n.prototype.thottleReport=function(e){var t,r=this;if((t=this.throttleBuffer).push.apply(t,e),this.throttleBuffer.length>=500){var n=this.throttleBuffer.slice(0);this.throttleBuffer.length=0,this._normalLogPipeline(this.assembleData(n));}else{if(this.throttleTimer)return;this.throttleTimer=setTimeout(function(){var e=r.throttleBuffer.slice(0);r.throttleBuffer.length=0,r._normalLogPipeline(r.assembleData(e)),r.throttleTimer=null;},1e3);}},n.prototype.onReport=function(e,t,r){var n=this;if(this.lsEnable)if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{var o=this.generateData(e,t,r);if(r&&0==this.delayTime&&!this.lowFrequencyMode)this._normalLogPipeline(this.assembleData(o));else{var i=o.shift();i&&this.store.insertEvent(i,function(e){e&&n.errorReport.reportError("604","insertEvent fail!");}).then(function(){n.dbEmptyNum=0,n.doCustomCycleTask("db");}).catch(function(e){n.thottleReport([i]);});}}},n.prototype.onSendBeacon=function(e,t){if(this.lsEnable)if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{var r=this.assembleData(this.generateData(e,t,!0));"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(r));}},n.prototype.generateData=function(e,r,n){var o=[],i=C+"_"+(n?"direct_log_id":"normal_log_id"),a=Number(this.storage.getItem(i));return a=a||1,r=_t4(_t4({},r),{A99:n?"Y":"N",A100:a.toString(),A72:C,A88:this.logidStartTime}),this.isDebugMode&&this.debugId&&(r.dt_debugid=this.debugId,r.dt_appid=this.appId),a++,this.storage.setItem(i,a.toString()),o.push({eventCode:e,eventTime:Date.now().toString(),mapValue:f(r,this.config.strictMode)}),o;},n.prototype.assembleData=function(e){var r=this.beaconSession.getSession();return{appVersion:this.config.appVersion?d(this.config.appVersion):"",sdkId:"js",sdkVersion:C,mainAppKey:this.config.appkey,platformId:3,common:f(_t4(_t4({},this.additionalParams),{A2:this.commonInfo.deviceId,A8:this.commonInfo.openid,A12:this.commonInfo.language,A17:this.commonInfo.pixel,A23:this.commonInfo.channelID,A50:this.commonInfo.unid,A76:r.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:e};},n.prototype.addLowFrequencyTag=function(e){"net"===e&&this.netFailNum++,"db"===e&&this.dbEmptyNum++,(this.netFailNum>=10||this.dbEmptyNum>=10)&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.lowFrequencyMode=!0);},n.prototype.doCustomCycleTask=function(e){"net"===e&&(this.netFailNum=0),"db"===e&&(this.dbEmptyNum=0),this.netFailNum<10&&this.dbEmptyNum<10&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime),this.lowFrequencyMode=!1);},n.prototype.setQimei=function(e){this.qimei36=e;},n.prototype.closeDB=function(){this.store.closeDB();},n.prototype.isDebugIdLegal=function(e){if(!e)return!1;if(e&&/^dt_[a-zA-Z0-9]{6,}_\d{10}$/.test(e)){var t=e.split("_"),r=1e3*parseInt(t[t.length-1],10);if(r>=Date.now()-36e5&&r<=Date.now())return!0;}return!1;},n;}(g);}()),Gt.exports);var $t=E(Qt);var zt=new(/*#__PURE__*/function(){function _class(){_classCallCheck(this,_class);this.appId="unknown",this.version="",this.instance=null,this.isInitialized=!1;}return _createClass(_class,[{key:"report",value:function report(e,t){if(this.instance||this.init(),this.instance)try{this.instance.onUserAction(e,_objectSpread(_objectSpread({},t),{},{HY984:this.version}));}catch(r){console.error("[PerfReporter] Beacon 上报失败:",r);}}},{key:"init",value:function init(){if(!this.isInitialized&&!this.instance&&"undefined"!=typeof window)try{this.version=d(),this.instance=new $t({appkey:"0WEB06F5PZUCN4AJ",strictMode:!1,delay:1e3,sessionDuration:6e4,needInitQimei:!0,needQueryConfig:!0,needReportRqdEvent:!1}),this.isInitialized=!0;}catch(e){console.error("[PerfReporter] Beacon 初始化失败:",e);}}}]);}())();var Xt={exports:{}};var Zt,er={exports:{}};function tr(){return Zt||(Zt=1,er.exports=(e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==S&&S.crypto&&(r=S.crypto),!r)try{r=O;}catch(xr){}var n=function n(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0];}catch(xr){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE();}catch(xr){}}throw new Error("Native crypto module could not be used to get secure random number.");},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e(),e.prototype=null,r;};}(),i={},a=i.lib={},s=a.Base=function(){return{extend:function extend(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments);}),t.init.prototype=t,t.$super=this,t;},create:function create(){var e=this.extend();return e.init.apply(e,arguments),e;},init:function init(){},mixIn:function mixIn(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString);},clone:function clone(){return this.init.prototype.extend(this);}};}(),c=a.WordArray=s.extend({init:function init(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length;},toString:function toString(e){return(e||p).stringify(this);},concat:function concat(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var a=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8;}else for(var s=0;s<o;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=o,this;},clamp:function clamp(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4);},clone:function clone(){var e=s.clone.call(this);return e.words=this.words.slice(0),e;},random:function random(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e);}}),u=i.enc={},p=u.Hex={stringify:function stringify(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16));}return n.join("");},parse:function parse(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2);}},l=u.Latin1={stringify:function stringify(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i));}return n.join("");},parse:function parse(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t);}},f=u.Utf8={stringify:function stringify(e){try{return decodeURIComponent(escape(l.stringify(e)));}catch(t){throw new Error("Malformed UTF-8 data");}},parse:function parse(e){return l.parse(unescape(encodeURIComponent(e)));}},d=a.BufferedBlockAlgorithm=s.extend({reset:function reset(){this._data=new c.init(),this._nDataBytes=0;},_append:function _append(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes;},_process:function _process(t){var r,n=this._data,o=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,p=e.min(4*u,i);if(u){for(var l=0;l<u;l+=a)this._doProcessBlock(o,l);r=o.splice(0,u),n.sigBytes-=p;}return new c.init(r,p);},clone:function clone(){var e=s.clone.call(this);return e._data=this._data.clone(),e;},_minBufferSize:0});a.Hasher=d.extend({cfg:s.extend(),init:function init(e){this.cfg=this.cfg.extend(e),this.reset();},reset:function reset(){d.reset.call(this),this._doReset();},update:function update(e){return this._append(e),this._process(),this;},finalize:function finalize(e){return e&&this._append(e),this._doFinalize();},blockSize:16,_createHelper:function _createHelper(e){return function(t,r){return new e.init(r).finalize(t);};},_createHmacHelper:function _createHmacHelper(e){return function(t,r){return new y.HMAC.init(e,r).finalize(t);};}});var y=i.algo={};return i;}(Math),e)),er.exports;var e;}var rr,nr;rr||(rr=1,Xt.exports=(nr=tr(),function(e){var t=nr,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0;}();var s=i.MD5=o.extend({_doReset:function _doReset(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878]);},_doProcessBlock:function _doProcessBlock(e,t){for(var r=0;r<16;r++){var n=t+r,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);}var i=this._hash.words,s=e[t+0],f=e[t+1],d=e[t+2],y=e[t+3],h=e[t+4],g=e[t+5],m=e[t+6],v=e[t+7],b=e[t+8],w=e[t+9],S=e[t+10],E=e[t+11],I=e[t+12],_=e[t+13],O=e[t+14],A=e[t+15],P=i[0],k=i[1],x=i[2],D=i[3];P=c(P,k,x,D,s,7,a[0]),D=c(D,P,k,x,f,12,a[1]),x=c(x,D,P,k,d,17,a[2]),k=c(k,x,D,P,y,22,a[3]),P=c(P,k,x,D,h,7,a[4]),D=c(D,P,k,x,g,12,a[5]),x=c(x,D,P,k,m,17,a[6]),k=c(k,x,D,P,v,22,a[7]),P=c(P,k,x,D,b,7,a[8]),D=c(D,P,k,x,w,12,a[9]),x=c(x,D,P,k,S,17,a[10]),k=c(k,x,D,P,E,22,a[11]),P=c(P,k,x,D,I,7,a[12]),D=c(D,P,k,x,_,12,a[13]),x=c(x,D,P,k,O,17,a[14]),P=u(P,k=c(k,x,D,P,A,22,a[15]),x,D,f,5,a[16]),D=u(D,P,k,x,m,9,a[17]),x=u(x,D,P,k,E,14,a[18]),k=u(k,x,D,P,s,20,a[19]),P=u(P,k,x,D,g,5,a[20]),D=u(D,P,k,x,S,9,a[21]),x=u(x,D,P,k,A,14,a[22]),k=u(k,x,D,P,h,20,a[23]),P=u(P,k,x,D,w,5,a[24]),D=u(D,P,k,x,O,9,a[25]),x=u(x,D,P,k,y,14,a[26]),k=u(k,x,D,P,b,20,a[27]),P=u(P,k,x,D,_,5,a[28]),D=u(D,P,k,x,d,9,a[29]),x=u(x,D,P,k,v,14,a[30]),P=p(P,k=u(k,x,D,P,I,20,a[31]),x,D,g,4,a[32]),D=p(D,P,k,x,b,11,a[33]),x=p(x,D,P,k,E,16,a[34]),k=p(k,x,D,P,O,23,a[35]),P=p(P,k,x,D,f,4,a[36]),D=p(D,P,k,x,h,11,a[37]),x=p(x,D,P,k,v,16,a[38]),k=p(k,x,D,P,S,23,a[39]),P=p(P,k,x,D,_,4,a[40]),D=p(D,P,k,x,s,11,a[41]),x=p(x,D,P,k,y,16,a[42]),k=p(k,x,D,P,m,23,a[43]),P=p(P,k,x,D,w,4,a[44]),D=p(D,P,k,x,I,11,a[45]),x=p(x,D,P,k,A,16,a[46]),P=l(P,k=p(k,x,D,P,d,23,a[47]),x,D,s,6,a[48]),D=l(D,P,k,x,v,10,a[49]),x=l(x,D,P,k,O,15,a[50]),k=l(k,x,D,P,g,21,a[51]),P=l(P,k,x,D,I,6,a[52]),D=l(D,P,k,x,y,10,a[53]),x=l(x,D,P,k,S,15,a[54]),k=l(k,x,D,P,f,21,a[55]),P=l(P,k,x,D,b,6,a[56]),D=l(D,P,k,x,A,10,a[57]),x=l(x,D,P,k,m,15,a[58]),k=l(k,x,D,P,_,21,a[59]),P=l(P,k,x,D,h,6,a[60]),D=l(D,P,k,x,E,10,a[61]),x=l(x,D,P,k,d,15,a[62]),k=l(k,x,D,P,w,21,a[63]),i[0]=i[0]+P|0,i[1]=i[1]+k|0,i[2]=i[2]+x|0,i[3]=i[3]+D|0;},_doFinalize:function _doFinalize(){var t=this._data,r=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;r[o>>>5]|=128<<24-o%32;var i=e.floor(n/4294967296),a=n;r[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),r[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var p=c[u];c[u]=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8);}return s;},clone:function clone(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e;}});function c(e,t,r,n,o,i,a){var s=e+(t&r|~t&n)+o+a;return(s<<i|s>>>32-i)+t;}function u(e,t,r,n,o,i,a){var s=e+(t&n|r&~n)+o+a;return(s<<i|s>>>32-i)+t;}function p(e,t,r,n,o,i,a){var s=e+(t^r^n)+o+a;return(s<<i|s>>>32-i)+t;}function l(e,t,r,n,o,i,a){var s=e+(r^(t|~n))+o+a;return(s<<i|s>>>32-i)+t;}t.MD5=o._createHelper(s),t.HmacMD5=o._createHmacHelper(s);}(Math),nr.MD5));var or=function(e){return e.begin="begin",e.end="end",e;}(or||{});var ir=new(/*#__PURE__*/function(){function _class2(){_classCallCheck(this,_class2);this.sessionId=null,this.sessionKey="__perf_session_id__",this.sessionTimeout=18e5,this.lastActivityTime=0;}return _createClass(_class2,[{key:"clearSession",value:function clearSession(){this.sessionId=null,this.lastActivityTime=0;try{"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(this.sessionKey);}catch(e){}}},{key:"getSessionId",value:function getSessionId(){var e=Date.now();return this.sessionId&&e-this.lastActivityTime>this.sessionTimeout&&(this.sessionId=null),this.sessionId||(this.sessionId=this.loadFromStorage()||"".concat(Date.now(),"-").concat(Math.random().toString(36).substring(2,9)),this.saveToStorage(this.sessionId)),this.lastActivityTime=e,this.sessionId;}},{key:"loadFromStorage",value:function loadFromStorage(){try{if("undefined"!=typeof sessionStorage)return sessionStorage.getItem(this.sessionKey);}catch(e){}return null;}},{key:"saveToStorage",value:function saveToStorage(e){try{"undefined"!=typeof sessionStorage&&sessionStorage.setItem(this.sessionKey,e);}catch(t){}}}]);}())();function ar(e){"undefined"!=typeof fetch&&function(){var e=a();"development"===e.NEXT_PUBLIC_MODE||e.NODE_ENV;}();}function sr(e,t){if("undefined"!=typeof window&&"undefined"!=typeof document&&e&&"string"==typeof e&&("begin"===t||"end"===t))try{"undefined"!=typeof performance&&performance.now?(performance.timeOrigin,performance.now()):Date.now(),ir.getSessionId(),"undefined"!=typeof window&&window.location&&window.location.href;ar();}catch(r){}}sr.type=or;var cr=function cr(){return Ir.invoke({method:"getTheme"});};var ur=function(e){return e.timestampMsec="timestampMsec",e.timestampNtp="timestampNtp",e;}(ur||{});var pr=function pr(e){return Ir.invoke({method:"Common.getServerTimestamp",params:e});},lr=function lr(e){return Ir.invoke({method:"App.setScreenCaptureEnabled",params:e});},fr=function fr(e){if("url"in e){var _e$base=e.base,_t5=_e$base===void 0?"/im/halfScreenWebView":_e$base,_r4=e.url,_n2=e.ratio,_o3=e.navigationBarHidden,_i=e.closeSelf,_a2=["url=".concat(encodeURIComponent(_r4))];void 0!==_n2&&_a2.push("ratio=".concat(_n2)),void 0!==_o3&&_a2.push("navigationBarHidden=".concat(_o3));var _s="".concat(_t5,"?").concat(_a2.join("&"));return Ir.invoke({method:"navigate",params:{route:_s,closeSelf:_i}});}return Ir.invoke({method:"navigate",params:e});},dr=function dr(){return Ir.invoke({method:"navigateBack"});},yr=function yr(e){return Ir.invoke({method:"Webview.sendData",params:e});},hr=function hr(e,t){return Ir.onEvent({method:"Webview.receiveData",params:e,callback:function callback(e){t(e!==null&&e!==void 0&&e.data?e.data:e);}});},gr=function gr(e,t){return e.enabled&&t?Ir.onEvent({method:"Webview.onBackPressed",params:e,callback:function callback(){t();}}):Ir.invoke({method:"Webview.onBackPressed",params:{enabled:!1}});},mr=function mr(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{type:"wgs84"};return Ir.invoke({method:"Device.getLocation",params:e});},vr=function vr(e){return Ir.invoke({method:"toast",params:e});};var br=function(e){return e.webpage="webpage",e.image="image",e.video="video",e.file="file",e.text="text",e;}(br||{});var wr=function wr(e){return Ir.invoke({method:"shareTo",params:e});},Sr=function Sr(e,t,r,n,o){if("Common.log"===t)return;if("jssdk_on_event"===e||"jssdk_off_event"===e)return;var i=r,a=n;"jssdk_invoke"===e&&o>=1e3&&r&&(i=!1,a="timeout"),i&&1e4*Math.random()>=1||zt.report(e,{HY501:i?1:0,HY502:a,HY503:o,HY504:zt.appId,HY505:"undefined"!=typeof window&&window.location?window.location.href:"",HY506:t});},Er=/*#__PURE__*/function(){function e(){_classCallCheck(this,e);this.isJSBridgeReady=!1,this.pendingEvents=[],this.initJSBridgeListener();}return _createClass(e,[{key:"invoke",value:function invoke(_e5){var _this=this;var t=Date.now(),n=o(_e5.minVersion);if(n){var _r5=Date.now()-t;return Sr("jssdk_invoke",_e5.method,!1,n.errMsg||"preCheck failed",_r5),Promise.reject(n);}return new Promise(function(n,o){var _e5$params;"Common.log"!==_e5.method&&sr("jsb/".concat(_e5.method),sr.type.begin);var i={eventName:_e5.method,payload:(_e5$params=_e5.params)!==null&&_e5$params!==void 0?_e5$params:null,callback:function callback(r){"Common.log"!==_e5.method&&sr("jsb/".concat(_e5.method),sr.type.end);var i=Date.now()-t;if("ok"===function(_e6,t){var r=(_e6===null||_e6===void 0?void 0:_e6.errMsg)||"".concat(t,":ok"),n=r===null||r===void 0?void 0:r.lastIndexOf(":"),o=r===null||r===void 0?void 0:r.substring(n+1);return o;}(r,_e5.method))Sr("jssdk_invoke",_e5.method,!0,"success",i),n(r);else{var _t6=(r===null||r===void 0?void 0:r.errMsg)||"unknown error";Sr("jssdk_invoke",_e5.method,!1,_t6,i),o(r);}}};_this.handleEvent(r.INVOKE,i);});}},{key:"onEvent",value:function onEvent(_e7){var _this2=this;var t=Date.now();return new Promise(function(n,i){var a=o(_e7.minVersion);if(a){var _r6=Date.now()-t;Sr("jssdk_on_event",_e7.method,!1,a.errMsg||"preCheck failed",_r6),i(a);}else{var _e7$params,_e7$callback;var _o4={eventName:_e7.method,payload:(_e7$params=_e7.params)!==null&&_e7$params!==void 0?_e7$params:null,callback:(_e7$callback=_e7.callback)!==null&&_e7$callback!==void 0?_e7$callback:function(){},bindCallback:function bindCallback(r){var o=Date.now()-t;Sr("jssdk_on_event",_e7.method,!0,"success",o),n(r);}};_this2.handleEvent(r.ON_EVENT,_o4);}});}},{key:"offEvent",value:function offEvent(_e8){var _this3=this;var t=Date.now();return new Promise(function(n,i){var a=o(_e8.minVersion);if(a){var _r7=Date.now()-t;Sr("jssdk_off_event",_e8.method,!1,a.errMsg||"preCheck failed",_r7),i(a);}else{var _e8$callback;var _o5={eventName:_e8.method,callback:(_e8$callback=_e8.callback)!==null&&_e8$callback!==void 0?_e8$callback:function(){},bindCallback:function bindCallback(r){var o=Date.now()-t;Sr("jssdk_off_event",_e8.method,!0,"success",o),n(r);}};_this3.handleEvent(r.OFF_EVENT,_o5);}});}},{key:"initJSBridgeListener",value:function initJSBridgeListener(){var _this4=this;if("undefined"!=typeof window&&window.jsb)return this.isJSBridgeReady=!0,void this.processPendingEvents();"undefined"!=typeof document&&document.addEventListener("JSBridgeReady",function(){_this4.isJSBridgeReady=!0,_this4.processPendingEvents();});}},{key:"processPendingEvents",value:function processPendingEvents(){for(;this.pendingEvents.length>0;){var _e9=this.pendingEvents.shift();_e9&&this.executeEvent(_e9.type,_e9);}}},{key:"handleEvent",value:function handleEvent(_e0,t){this.isJSBridgeReady&&"undefined"!=typeof window&&window.jsb?this.executeEvent(_e0,t):this.queueEvent(_e0,t);}},{key:"executeEvent",value:function executeEvent(_e1,t){var _window3;var n=t.eventName,o=t.callback,_t$bindCallback=t.bindCallback,i=_t$bindCallback===void 0?function(){}:_t$bindCallback;switch(_e1){case r.INVOKE:{var _window;var _e10=t;(_window=window)===null||_window===void 0||(_window=_window.jsb)===null||_window===void 0||_window.invoke(n,_e10.payload,o);break;}case r.ON_EVENT:{var _window2;var _e11=t;(_window2=window)===null||_window2===void 0||(_window2=_window2.jsb)===null||_window2===void 0||_window2.onEvent(n,o,_e11.payload,i);break;}case r.OFF_EVENT:(_window3=window)===null||_window3===void 0||(_window3=_window3.jsb)===null||_window3===void 0||_window3.offEvent(n,o,i);}}},{key:"queueEvent",value:function queueEvent(_e12,t){this.pendingEvents.push(_objectSpread({type:_e12},t));}}],[{key:"getInstance",value:function getInstance(){return null===e.instance&&(e.instance=new e()),e.instance;}}]);}();Er.instance=null;var Ir=Er.getInstance(),_r={getTheme:cr,getServerTimestamp:pr,setScreenCaptureEnabled:lr},Or={getLocation:mr},Ar={toast:vr},Pr={navigate:fr,navigateBack:dr,receiveData:hr,sendData:yr,onBackPressed:gr},kr={shareTo:wr};e.ShareToType=br,e.TimestampType=ur,e.app=_r,e.config=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(e){var t,r,n,_o6$data,_o6$data2,_o6,_i2,_a3,_s2,_n3,_i3,_a4,_s3,_t7;return _regenerator().w(function(_context){while(1)switch(_context.p=_context.n){case 0:zt.appId=e.appId;t=Date.now();console.log("[yb-jsapi] config 调用开始",{appId:e.appId,timestamp:e.timestamp,startTime:t});r=null;n=new Promise(function(e,t){r=setTimeout(function(){r=null,t(new Error("config 调用超时"));},3e3);});_context.p=1;_context.n=2;return Promise.race([Ir.invoke({method:"OpenSDK.config",params:_objectSpread({timestamp:Math.floor(Date.now()/1e3),nonceStr:Math.random().toString(36).substring(2),signature:"placeholderForSignature",jsApiList:["*"]},e)}),n]);case 2:_o6=_context.v;r&&(clearTimeout(r),r=null);_i2=Date.now()-t,_a3=0===_o6.code?1:0,_s2={HY501:_a3,HY502:e.appId,HY503:_i2,HY504:1===_a3?"success":_o6.errMsg||"unknown error"};return _context.a(2,(console.log("[yb-jsapi] config 调用成功",_objectSpread(_objectSpread({},_s2),{},{code:_o6.code,errMsg:_o6.errMsg,jsApiList:(_o6$data=_o6.data)===null||_o6$data===void 0?void 0:_o6$data.jsApiList,domains:(_o6$data2=_o6.data)===null||_o6$data2===void 0?void 0:_o6$data2.domains})),zt.report("jssdk_config",_s2),_o6));case 3:_context.p=3;_t7=_context.v;r&&(clearTimeout(r),r=null);_n3=Date.now()-t,_i3=_t7 instanceof Error&&"config 调用超时"===_t7.message,_a4=function(){if(_i3)return"config 调用超时";if(_t7 instanceof Error)return _t7.message;if(_t7&&"object"==_typeof(_t7)){if("errMsg"in _t7&&_t7.errMsg)return String(_t7.errMsg);if("message"in _t7&&_t7.message)return String(_t7.message);}return"config 调用失败";}(),_s3={HY501:0,HY502:e.appId,HY503:_n3,HY504:_a4};return _context.a(2,(_i3?console.error("[yb-jsapi] config 调用超时",_objectSpread(_objectSpread({},_s3),{},{timeout:3e3})):console.error("[yb-jsapi] config 调用失败",_objectSpread(_objectSpread({},_s3),{},{error:_t7})),zt.report("jssdk_config",_s3),{code:-1,errMsg:_a4}));}},_callee,null,[[1,3]]);}));return function(_x){return _ref.apply(this,arguments);};}(),e.device=Or,e.getLocation=mr,e.getServerTimestamp=pr,e.getTheme=cr,e.navigate=fr,e.navigateBack=dr,e.onBackPressed=gr,e.receiveData=hr,e.sendData=yr,e.setScreenCaptureEnabled=lr,e.share=kr,e.shareTo=wr,e.toast=vr,e.ui=Ar,e.webview=Pr,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});});})();
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tencent-yb/sdk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "元宝客户端 JS SDK — 对外版本",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "dist/yb-jssdk.umd.js",
|
|
8
|
+
"module": "dist/yb-jssdk.es.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/yb-jssdk.es.js",
|
|
14
|
+
"require": "./dist/yb-jssdk.umd.js",
|
|
15
|
+
"default": "./dist/yb-jssdk.es.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"unpkg": "dist/yb-jssdk.umd.js",
|
|
19
|
+
"jsdelivr": "dist/yb-jssdk.umd.js",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"yuanbao",
|
|
25
|
+
"jssdk",
|
|
26
|
+
"webview",
|
|
27
|
+
"jsbridge"
|
|
28
|
+
]
|
|
29
|
+
}
|