lite-pos-wx-plugin-mate 1.0.3
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/.babelrc +11 -0
- package/.eslintrc.js +102 -0
- package/LICENSE +21 -0
- package/README-PRIVATE.md +129 -0
- package/README.md +10 -0
- package/gulpfile.js +26 -0
- package/miniprogram_dist/index.js +1 -0
- package/miniprogram_dist/index.json +6 -0
- package/miniprogram_dist/index.wxml +1 -0
- package/miniprogram_dist/index.wxss +4 -0
- package/miniprogram_dist/utils.js +1 -0
- package/package.json +72 -0
- package/project.config.json +45 -0
- package/project.private.config.json +8 -0
- package/src/apiService.js +22 -0
- package/src/constants.js +9 -0
- package/src/fp-wx.min.js +2 -0
- package/src/index.js +4 -0
- package/src/index.json +6 -0
- package/src/index.wxml +1 -0
- package/src/index.wxss +4 -0
- package/src/request.js +58 -0
- package/src/utils.js +72 -0
- package/tsconfig.json +25 -0
package/.babelrc
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'extends': [
|
|
3
|
+
'airbnb-base',
|
|
4
|
+
'plugin:promise/recommended'
|
|
5
|
+
],
|
|
6
|
+
'parser': '@typescript-eslint/parser',
|
|
7
|
+
'plugins': ['@typescript-eslint'],
|
|
8
|
+
'parserOptions': {
|
|
9
|
+
'ecmaVersion': 9,
|
|
10
|
+
'ecmaFeatures': {
|
|
11
|
+
'jsx': false
|
|
12
|
+
},
|
|
13
|
+
'sourceType': 'module'
|
|
14
|
+
},
|
|
15
|
+
'env': {
|
|
16
|
+
'es6': true,
|
|
17
|
+
'node': true,
|
|
18
|
+
'jest': true
|
|
19
|
+
},
|
|
20
|
+
'plugins': [
|
|
21
|
+
'import',
|
|
22
|
+
'node',
|
|
23
|
+
'promise'
|
|
24
|
+
],
|
|
25
|
+
'rules': {
|
|
26
|
+
'arrow-parens': 'off',
|
|
27
|
+
'comma-dangle': [
|
|
28
|
+
'error',
|
|
29
|
+
'only-multiline'
|
|
30
|
+
],
|
|
31
|
+
'complexity': ['error', 20],
|
|
32
|
+
'func-names': 'off',
|
|
33
|
+
'global-require': 'off',
|
|
34
|
+
'handle-callback-err': [
|
|
35
|
+
'error',
|
|
36
|
+
'^(err|error)$'
|
|
37
|
+
],
|
|
38
|
+
'camelcase': 'off',
|
|
39
|
+
'import/no-unresolved': [
|
|
40
|
+
'error',
|
|
41
|
+
{
|
|
42
|
+
'caseSensitive': true,
|
|
43
|
+
'commonjs': true,
|
|
44
|
+
'ignore': ['^[^.]']
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
'import/prefer-default-export': 'off',
|
|
48
|
+
'linebreak-style': 'off',
|
|
49
|
+
'no-catch-shadow': 'error',
|
|
50
|
+
'no-continue': 'off',
|
|
51
|
+
'no-div-regex': 'warn',
|
|
52
|
+
'no-else-return': 'off',
|
|
53
|
+
'no-param-reassign': 'off',
|
|
54
|
+
'no-plusplus': 'off',
|
|
55
|
+
'no-shadow': 'off',
|
|
56
|
+
'no-multi-assign': 'off',
|
|
57
|
+
'no-underscore-dangle': 'off',
|
|
58
|
+
'node/no-deprecated-api': 'error',
|
|
59
|
+
'node/process-exit-as-throw': 'error',
|
|
60
|
+
'object-curly-spacing': [
|
|
61
|
+
'error',
|
|
62
|
+
'never'
|
|
63
|
+
],
|
|
64
|
+
'operator-linebreak': [
|
|
65
|
+
'error',
|
|
66
|
+
'after',
|
|
67
|
+
{
|
|
68
|
+
'overrides': {
|
|
69
|
+
':': 'before',
|
|
70
|
+
'?': 'before'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
'prefer-arrow-callback': 'off',
|
|
75
|
+
'prefer-destructuring': 'off',
|
|
76
|
+
'prefer-template': 'off',
|
|
77
|
+
'quote-props': [
|
|
78
|
+
1,
|
|
79
|
+
'as-needed',
|
|
80
|
+
{
|
|
81
|
+
'unnecessary': true
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
'semi': [
|
|
85
|
+
'error',
|
|
86
|
+
'never'
|
|
87
|
+
],
|
|
88
|
+
'no-await-in-loop': 'off',
|
|
89
|
+
'no-restricted-syntax': 'off',
|
|
90
|
+
'promise/always-return': 'off',
|
|
91
|
+
},
|
|
92
|
+
'globals': {
|
|
93
|
+
'window': true,
|
|
94
|
+
'document': true,
|
|
95
|
+
'App': true,
|
|
96
|
+
'Page': true,
|
|
97
|
+
'Component': true,
|
|
98
|
+
'Behavior': true,
|
|
99
|
+
'wx': true,
|
|
100
|
+
'getCurrentPages': true,
|
|
101
|
+
}
|
|
102
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 nhy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# lite-pos-wx-plugin-mate
|
|
2
|
+
|
|
3
|
+
轻POS收银台插件协同库:
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## 开发
|
|
7
|
+
|
|
8
|
+
1. 安装依赖:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
2. 执行命令:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
npm run dev
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
默认会在包根目录下生成 miniprogram\_dev 目录,src 中的源代码会被构建并生成到 miniprogram\_dev/components 目录下。如果需要监听文件变化动态构建,则可以执行命令:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
npm run watch
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> ps: 如果 minirpogram\_dev 目录下已存在小程序 demo,执行`npm run dev`则不会再将 tools 下的 demo 拷贝到此目录下。而执行`npm run watch`则会监听 tools 目录下的 demo 变动并进行拷贝。
|
|
27
|
+
|
|
28
|
+
3. 生成的 miniprogram\_dev 目录是一个小程序项目目录,以此目录作为小程序项目目录在开发者工具中打开即可查看自定义组件被使用的效果。
|
|
29
|
+
|
|
30
|
+
4. 进阶:
|
|
31
|
+
|
|
32
|
+
* 如果有额外的构建需求,可自行修改 tools 目录中的构建脚本。
|
|
33
|
+
* 内置支持 webpack、less 语法、sourcemap 等功能,默认关闭。如若需要可以自行修改 tools/config.js 配置文件中相关配置。
|
|
34
|
+
* 内置支持多入口构建,如若需要可自行调整 tools/config.js 配置文件的 entry 字段。
|
|
35
|
+
* 默认开启 eslint,可自行调整规则或在 tools/config.js 中注释掉 eslint-loader 行来关闭此功能。
|
|
36
|
+
|
|
37
|
+
## 开发参考
|
|
38
|
+
|
|
39
|
+
* 使用[命令行工具](https://github.com/wechat-miniprogram/miniprogram-cli)进行初始化
|
|
40
|
+
* 直接从 github 上 clone 下来
|
|
41
|
+
|
|
42
|
+
## 发布
|
|
43
|
+
> ### 发布前确认代码是否存在缺陷
|
|
44
|
+
- [ ] 是: 先本地调试:`npm link` 为依赖项创建全局软链,`npm link lite-pos-plugin-mate` 告诉应用程序使用全局软链lite-pos-plugin-mate。
|
|
45
|
+
- 否: 参考下方发布
|
|
46
|
+
|
|
47
|
+
> ps: 发布前得确保已经执行构建,小程序 npm 包只有构建出来的目录是真正被使用到的。
|
|
48
|
+
|
|
49
|
+
1. 如果还没有 npm 帐号,可以到[ npm 官网](https://www.npmjs.com/)注册一个 npm 帐号。
|
|
50
|
+
2. 在本地登录 npm 帐号,在本地执行:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
npm adduser
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
或者
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
npm login
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
3. 在已完成编写的 npm 包根目录下执行:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
npm publish
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
到此,npm 包就成功发布到 npm 平台了。
|
|
69
|
+
|
|
70
|
+
> PS:一些开发者在开发过程中可能修改过 npm 的源,所以当进行登录或发布时需要注意要将源切回 npm 的源。
|
|
71
|
+
|
|
72
|
+
## 目录结构
|
|
73
|
+
|
|
74
|
+
以下为推荐使用的目录结构,如果有必要开发者也可以自行做一些调整:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
|--miniprogram_dev // 开发环境构建目录
|
|
78
|
+
|--miniprogram_dist // 生产环境构建目录
|
|
79
|
+
|--src // 源码
|
|
80
|
+
| |--components // 通用自定义组件
|
|
81
|
+
| |--images // 图片资源
|
|
82
|
+
| |
|
|
83
|
+
| |--xxx.js/xxx.wxml/xxx.json/xxx.wxss // 暴露的 js 模块/自定义组件入口文件
|
|
84
|
+
|
|
|
85
|
+
|--test // 测试用例
|
|
86
|
+
|--tools // 构建相关代码
|
|
87
|
+
| |--demo // demo 小程序目录,开发环境下会被拷贝生成到 miniprogram_dev 目录中
|
|
88
|
+
| |--config.js // 构建相关配置文件
|
|
89
|
+
|
|
|
90
|
+
|--gulpfile.js
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
> PS:对外暴露的 js 模块/自定义组件请放在 src 目录下,不宜放置在过深的目录。另外新增的暴露模块需要在 tools/config.js 的 entry 字段中补充,不然不会进行构建。
|
|
94
|
+
|
|
95
|
+
## 测试
|
|
96
|
+
|
|
97
|
+
* 执行测试用例:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
npm run test
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
* 执行测试用例并进入 node inspect 调试:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
npm run test-debug
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
* 检测覆盖率:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
npm run coverage
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
测试用例放在 test 目录下,使用 **miniprogram-simulate** 工具集进行测试,[点击此处查看](https://github.com/wechat-miniprogram/miniprogram-simulate/blob/master/README.md)使用方法。在测试中可能需要变更或调整工具集中的一些方法,可在 test/utils 下自行实现。
|
|
116
|
+
|
|
117
|
+
## 其他命令
|
|
118
|
+
|
|
119
|
+
* 清空 miniprogram_dist 目录:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
npm run clean
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
* 清空 miniprogam_dev 目录:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
npm run clean-dev
|
|
129
|
+
```
|
package/README.md
ADDED
package/gulpfile.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const gulp = require('gulp')
|
|
2
|
+
const clean = require('gulp-clean')
|
|
3
|
+
|
|
4
|
+
const config = require('./tools/config')
|
|
5
|
+
const BuildTask = require('./tools/build')
|
|
6
|
+
const id = require('./package.json').name || 'miniprogram-custom-component'
|
|
7
|
+
|
|
8
|
+
// 构建任务实例
|
|
9
|
+
// eslint-disable-next-line no-new
|
|
10
|
+
new BuildTask(id, config.entry)
|
|
11
|
+
|
|
12
|
+
// 清空生成目录和文件
|
|
13
|
+
gulp.task('clean', gulp.series(() => gulp.src(config.distPath, {read: false, allowEmpty: true}).pipe(clean()), done => {
|
|
14
|
+
if (config.isDev) {
|
|
15
|
+
return gulp.src(config.demoDist, {read: false, allowEmpty: true})
|
|
16
|
+
.pipe(clean())
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return done()
|
|
20
|
+
}))
|
|
21
|
+
// 监听文件变化并进行开发模式构建
|
|
22
|
+
gulp.task('watch', gulp.series(`${id}-watch`))
|
|
23
|
+
// 开发模式构建
|
|
24
|
+
gulp.task('dev', gulp.series(`${id}-dev`))
|
|
25
|
+
// 生产模式构建
|
|
26
|
+
gulp.task('default', gulp.series(`${id}-default`))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports=(r=>{var n={};function o(e){var t;return(n[e]||(t=n[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,o),t.l=!0,t)).exports}return o.m=r,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)})([function(e,t,r){Component({})}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<view>入口文件</view>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports=(n=>{var r={};function i(t){var e;return(r[t]||(e=r[t]={i:t,l:!1,exports:{}},n[t].call(e.exports,e,e.exports,i),e.l=!0,e)).exports}return i.m=n,i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)})([,function(t,e,n){function r(){return s.apply(this,arguments)}var i,s,o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};i=regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return h(),t.next=3,a.getDeviceId();case 3:return e=t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}},t,this)}),s=function(){var a=i.apply(this,arguments);return new Promise(function(s,o){return function e(t,n){try{var r=a[t](n),i=r.value}catch(t){return void o(t)}if(!r.done)return Promise.resolve(i).then(function(t){e("next",t)},function(t){e("throw",t)});s(i)}("next")})};var a=n(2);function h(){a.initConf({organization:"Zsq0kDhtR4d2Y9ZwcSBm",publicKey:"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfU0WDsoTcsFJIbConxfegYWQ4VuTHrlnXlb/rOi/itqd0MGPOgRRTnKqgRhmH0sCd9m3h/xQ52IuSIEYA/N63iLznB6bWT5wLqCu537ygMuNbDWGEsHYWp+RMhvMx5H/LoXAqJuErCli8fXrwLcK8Jw4lDkBVz6J14wenZyJuPwIDAQAB"})}t.exports={wxPay:function(t,e,n){wx.requestPayment(o({},t,{success:function(t){return e(t)},fail:function(t){return n(t)}}))},initSMSdk:h,getSMDeviceId:r}},function(N,M,V){var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function h(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function j(t,e){return t&e}function H(t,e){return t|e}function q(t,e){return t^e}function L(t,e){return t&~e}var F,U="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function K(t){for(var e,n="",r=0;r+3<=t.length;r+=3)e=parseInt(t.substring(r,r+3),16),n+=U.charAt(e>>6)+U.charAt(63&e);for(r+1==t.length?(e=parseInt(t.substring(r,r+1),16),n+=U.charAt(e<<2)):r+2==t.length&&(e=parseInt(t.substring(r,r+2),16),n+=U.charAt(e>>2)+U.charAt((3&e)<<4));0<(3&n.length);)n+="=";return n}function W(t){for(var e="",n=0,r=0,i=0;i<t.length&&"="!=t.charAt(i);++i){var s=U.indexOf(t.charAt(i));s<0||(n=0==n?(e+=h(s>>2),r=3&s,1):1==n?(e+=h(r<<2|s>>4),r=15&s,2):2==n?(e=(e+=h(r))+h(s>>2),r=3&s,3):(e=(e+=h(r<<2|s>>4))+h(15&s),0))}return 1==n&&(e+=h(r<<2)),e}var Z,G={decode:function(t){if(void 0===Z){for(Z=Object.create(null),i=0;i<64;++i)Z["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i)]=i;for(Z["-"]=62,Z._=63,i=0;i<9;++i)Z["= \f\n\r\t \u2028\u2029".charAt(i)]=-1}for(var e=[],n=0,r=0,i=0;i<t.length;++i){var s=t.charAt(i);if("="==s)break;if(-1!=(s=Z[s])){if(void 0===s)throw new Error("Illegal character at offset "+i);n|=s,4<=++r?(e[e.length]=n>>16,e[e.length]=n>>8&255,e[e.length]=255&n,r=n=0):n<<=6}}switch(r){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:e[e.length]=n>>10;break;case 3:e[e.length]=n>>16,e[e.length]=n>>8&255}return e},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=G.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return G.decode(t)}},J=1e13,Y=(tt.prototype.mulAdd=function(t,e){for(var n,r=this.buf,i=r.length,s=0;s<i;++s)(n=r[s]*t+e)<J?e=0:n-=(e=0|n/J)*J,r[s]=n;0<e&&(r[s]=e)},tt.prototype.sub=function(t){for(var e,n=this.buf,r=n.length,i=0;i<r;++i)t=(e=n[i]-t)<0?(e+=J,1):0,n[i]=e;for(;0===n[n.length-1];)n.pop()},tt.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),r=e.length-2;0<=r;--r)n+=(J+e[r]).toString().substring(1);return n},tt.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;0<=n;--n)e=e*J+t[n];return e},tt.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},tt),X=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,Q=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function tt(t){this.buf=[+t||0]}function et(t,e){return t=t.length>e?t.substring(0,e)+"…":t}n.prototype.get=function(t){if((t=void 0===t?this.pos++:t)>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},n.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},n.prototype.hexDump=function(t,e,n){for(var r="",i=t;i<e;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},n.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var r=this.get(n);if(r<32||176<r)return!1}return!0},n.prototype.parseStringISO=function(t,e){for(var n="",r=t;r<e;++r)n+=String.fromCharCode(this.get(r));return n},n.prototype.parseStringUTF=function(t,e){for(var n="",r=t;r<e;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):191<i&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},n.prototype.parseStringBMP=function(t,e){for(var n,r,i="",s=t;s<e;)n=this.get(s++),r=this.get(s++),i+=String.fromCharCode(n<<8|r);return i},n.prototype.parseTime=function(t,e,n){t=this.parseStringISO(t,e),e=(n?X:Q).exec(t);return e?(n&&(e[1]=+e[1],e[1]+=+e[1]<70?2e3:1900),t=e[1]+"-"+e[2]+"-"+e[3]+" "+e[4],e[5]&&(t+=":"+e[5],e[6])&&(t+=":"+e[6],e[7])&&(t+="."+e[7]),e[8]&&(t+=" UTC","Z"!=e[8])&&(t+=e[8],e[9])&&(t+=":"+e[9]),t):"Unrecognized time: "+t},n.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),i=127<r,s=i?255:0,o="";r==s&&++t<e;)r=this.get(t);if(0==(n=e-t))return i?-1:0;if(4<n){for(o=r,n<<=3;0==(128&(+o^s));)o=+o<<1,--n;o="("+n+" bit)\n"}i&&(r-=256);for(var a=new Y(r),h=t+1;h<e;++h)a.mulAdd(256,this.get(h));return o+a.toString()},n.prototype.parseBitString=function(t,e,n){for(var r=this.get(t),i="("+((e-t-1<<3)-r)+" bit)\n",s="",o=t+1;o<e;++o){for(var a=this.get(o),h=o==e-1?r:0,u=7;h<=u;--u)s+=a>>u&1?"1":"0";if(s.length>n)return i+et(s,n)}return i+s},n.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return et(this.parseStringISO(t,e),n);var r=e-t,i="("+r+" byte)\n";r>(n/=2)&&(e=t+n);for(var s=t;s<e;++s)i+=this.hexByte(this.get(s));return n<r&&(i+="…"),i},n.prototype.parseOID=function(t,e,n){for(var r="",i=new Y,s=0,o=t;o<e;++o){var a=this.get(o);if(i.mulAdd(128,127&a),s+=7,!(128&a)){if(""===r?r=(i=i.simplify())instanceof Y?(i.sub(80),"2."+i.toString()):(a=i<80?i<40?0:1:2)+"."+(i-40*a):r+="."+i.toString(),r.length>n)return et(r,n);i=new Y,s=0}}return 0<s&&(r+=".incomplete"),r};var nt=n,rt=(f.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},f.prototype.content=function(t){if(void 0!==this.tag){void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return et(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return et(this.stream.parseStringISO(e,e+n),t);case 30:return et(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}}return null},f.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},f.prototype.toPrettyString=function(t){var e=(t=void 0===t?"":t)+this.typeName()+" @"+this.stream.pos;if(0<=this.length&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;n<r;++n)e+=this.sub[n].toPrettyString(t)}return e},f.prototype.posStart=function(){return this.stream.pos},f.prototype.posContent=function(){return this.stream.pos+this.header},f.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},f.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},f.decodeLength=function(t){var e=127&(n=t.get());if(e==n)return e;if(6<e)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0==e)return null;for(var n=0,r=0;r<e;++r)n=256*n+t.get();return n},f.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},f.decode=function(t){function e(){var t=[];if(null!==i){for(var e=s+i;r.pos<e;)t[t.length]=f.decode(r);if(r.pos!=e)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var n=f.decode(r);if(n.tag.isEOC())break;t[t.length]=n}i=s-r.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return t}var r=t instanceof nt?t:new nt(t,0),t=new nt(r),n=new it(r),i=f.decodeLength(r),s=r.pos,o=s-t.pos,a=null;if(n.tagConstructed)a=e();else if(n.isUniversal()&&(3==n.tagNumber||4==n.tagNumber))try{if(3==n.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");for(var a=e(),h=0;h<a.length;++h)if(a[h].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){a=null}if(null===a){if(null===i)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);r.pos=s+Math.abs(i)}return new f(t,o,i,n,a)},f),it=(dt.prototype.isUniversal=function(){return 0===this.tagClass},dt.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},dt),u=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],st=(1<<26)/u[u.length-1],c=(y.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,s="",o=this.t,a=this.DB-o*this.DB%e;if(0<o--)for(a<this.DB&&0<(n=this[o]>>a)&&(i=!0,s=h(n));0<=o;)a<e?(n=(this[o]&(1<<a)-1)<<e-a,n|=this[--o]>>(a+=this.DB-e)):(n=this[o]>>(a-=e)&r,a<=0&&(a+=this.DB,--o)),(i=0<n?!0:i)&&(s+=h(n));return i?s:"0"},y.prototype.negate=function(){var t=v();return y.ZERO.subTo(this,t),t},y.prototype.abs=function(){return this.s<0?this.negate():this},y.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;0<=--n;)if(0!=(e=this[n]-t[n]))return e;return 0},y.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+_t(this[this.t-1]^this.s&this.DM)},y.prototype.mod=function(t){var e=v();return this.abs().divRemTo(t,null,e),this.s<0&&0<e.compareTo(y.ZERO)&&t.subTo(e,e),e},y.prototype.modPowInt=function(t,e){e=new(t<256||e.isEven()?at:ht)(e);return this.exp(t,e)},y.prototype.clone=function(){var t=v();return this.copyTo(t),t},y.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},y.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},y.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},y.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},y.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(0<t--)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);0<=t;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(0<i||n!=this.s)&&(e[i++]=n);return e},y.prototype.equals=function(t){return 0==this.compareTo(t)},y.prototype.min=function(t){return this.compareTo(t)<0?this:t},y.prototype.max=function(t){return 0<this.compareTo(t)?this:t},y.prototype.and=function(t){var e=v();return this.bitwiseTo(t,j,e),e},y.prototype.or=function(t){var e=v();return this.bitwiseTo(t,H,e),e},y.prototype.xor=function(t){var e=v();return this.bitwiseTo(t,q,e),e},y.prototype.andNot=function(t){var e=v();return this.bitwiseTo(t,L,e),e},y.prototype.not=function(){for(var t=v(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},y.prototype.shiftLeft=function(t){var e=v();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},y.prototype.shiftRight=function(t){var e=v();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},y.prototype.getLowestSetBit=function(){for(var t,e,n=0;n<this.t;++n)if(0!=this[n])return n*this.DB+(t=this[n],e=void 0,0==t?-1:((e=0)==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e));return this.s<0?this.t*this.DB:-1},y.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=(t=>{for(var e=0;0!=t;)t&=t-1,++e;return e})(this[n]^e);return t},y.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},y.prototype.setBit=function(t){return this.changeBit(t,H)},y.prototype.clearBit=function(t){return this.changeBit(t,L)},y.prototype.flipBit=function(t){return this.changeBit(t,q)},y.prototype.add=function(t){var e=v();return this.addTo(t,e),e},y.prototype.subtract=function(t){var e=v();return this.subTo(t,e),e},y.prototype.multiply=function(t){var e=v();return this.multiplyTo(t,e),e},y.prototype.divide=function(t){var e=v();return this.divRemTo(t,e,null),e},y.prototype.remainder=function(t){var e=v();return this.divRemTo(t,null,e),e},y.prototype.divideAndRemainder=function(t){var e=v(),n=v();return this.divRemTo(t,e,n),[e,n]},y.prototype.modPow=function(t,e){var n=t.bitLength(),r=vt(1);if(n<=0)return r;var i=n<18?1:n<48?3:n<144?4:n<768?5:6,s=new(n<8?at:e.isEven()?ut:ht)(e),o=[],a=3,h=i-1,u=(1<<i)-1;if(o[1]=s.convert(this),1<i){var c=v();for(s.sqrTo(o[1],c);a<=u;)o[a]=v(),s.mulTo(c,o[a-2],o[a]),a+=2}for(var f,l,p=t.t-1,d=!0,g=v(),n=_t(t[p])-1;0<=p;){for(h<=n?f=t[p]>>n-h&u:(f=(t[p]&(1<<n+1)-1)<<h-n,0<p&&(f|=t[p-1]>>this.DB+n-h)),a=i;0==(1&f);)f>>=1,--a;if((n-=a)<0&&(n+=this.DB,--p),d)o[f].copyTo(r),d=!1;else{for(;1<a;)s.sqrTo(r,g),s.sqrTo(g,r),a-=2;0<a?s.sqrTo(r,g):(l=r,r=g,g=l),s.mulTo(g,o[f],r)}for(;0<=p&&0==(t[p]&1<<n);)s.sqrTo(r,g),l=r,r=g,g=l,--n<0&&(n=this.DB-1,--p)}return s.revert(r)},y.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return y.ZERO;for(var n=t.clone(),r=this.clone(),i=vt(1),s=vt(0),o=vt(0),a=vt(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(t,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);0<=n.compareTo(r)?(n.subTo(r,n),e&&i.subTo(o,i),s.subTo(a,s)):(r.subTo(n,r),e&&o.subTo(i,o),a.subTo(s,a))}return 0!=r.compareTo(y.ONE)?y.ZERO:0<=a.compareTo(t)?a.subtract(t):a.signum()<0&&(a.addTo(t,a),a.signum()<0)?a.add(t):a},y.prototype.pow=function(t){return this.exp(t,new ot)},y.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone(),r=(e.compareTo(n)<0&&(t=e,e=n,n=t),e.getLowestSetBit()),t=n.getLowestSetBit();if(t<0)return e;for(0<(t=r<t?r:t)&&(e.rShiftTo(t,e),n.rShiftTo(t,n));0<e.signum();)0<(r=e.getLowestSetBit())&&e.rShiftTo(r,e),0<(r=n.getLowestSetBit())&&n.rShiftTo(r,n),0<=e.compareTo(n)?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return 0<t&&n.lShiftTo(t,n),n},y.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=u[u.length-1]){for(e=0;e<u.length;++e)if(n[0]==u[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<u.length;){for(var r=u[e],i=e+1;i<u.length&&r<st;)r*=u[i++];for(r=n.modInt(r);e<i;)if(r%u[e++]==0)return!1}return n.millerRabin(t)},y.prototype.copyTo=function(t){for(var e=this.t-1;0<=e;--e)t[e]=this[e];t.t=this.t,t.s=this.s},y.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,0<t?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},y.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var r=t.length,i=!1,s=0;0<=--r;){var o=8==n?255&+t[r]:yt(t,r);o<0?"-"==t.charAt(r)&&(i=!0):(i=!1,0==s?this[this.t++]=o:s+n>this.DB?(this[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this[this.t++]=o>>this.DB-s):this[this.t-1]|=o<<s,(s+=n)>=this.DB&&(s-=this.DB))}8==n&&0!=(128&+t[0])&&(this.s=-1,0<s)&&(this[this.t-1]|=(1<<this.DB-s)-1<<s),this.clamp(),i&&y.ZERO.subTo(this,this)},y.prototype.clamp=function(){for(var t=this.s&this.DM;0<this.t&&this[this.t-1]==t;)--this.t},y.prototype.dlShiftTo=function(t,e){for(var n=this.t-1;0<=n;--n)e[n+t]=this[n];for(n=t-1;0<=n;--n)e[n]=0;e.t=this.t+t,e.s=this.s},y.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},y.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,s=Math.floor(t/this.DB),o=this.s<<n&this.DM,a=this.t-1;0<=a;--a)e[a+s+1]=this[a]>>r|o,o=(this[a]&i)<<n;for(a=s-1;0<=a;--a)e[a]=0;e[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},y.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,s=(1<<r)-1;e[0]=this[n]>>r;for(var o=n+1;o<this.t;++o)e[o-n-1]|=(this[o]&s)<<i,e[o-n]=this[o]>>r;0<r&&(e[this.t-n-1]|=(this.s&s)<<i),e.t=this.t-n,e.clamp()}},y.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:0<r&&(e[n++]=r),e.t=n,e.clamp()},y.prototype.multiplyTo=function(t,e){var n=this.abs(),r=t.abs(),i=n.t;for(e.t=i+r.t;0<=--i;)e[i]=0;for(i=0;i<r.t;++i)e[i+n.t]=n.am(0,r[i],e,i,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&y.ZERO.subTo(e,e)},y.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;0<=--n;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}0<t.t&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},y.prototype.divRemTo=function(t,e,n){var r=t.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)null!=e&&e.fromInt(0),null!=n&&this.copyTo(n);else{null==n&&(n=v());var s=v(),o=this.s,t=t.s,a=this.DB-_t(r[r.t-1]),h=(0<a?(r.lShiftTo(a,s),i.lShiftTo(a,n)):(r.copyTo(s),i.copyTo(n)),s.t),u=s[h-1];if(0!=u){var r=u*(1<<this.F1)+(1<h?s[h-2]>>this.F2:0),c=this.FV/r,f=(1<<this.F1)/r,l=1<<this.F2,p=n.t,d=p-h,g=null==e?v():e;for(s.dlShiftTo(d,g),0<=n.compareTo(g)&&(n[n.t++]=1,n.subTo(g,n)),y.ONE.dlShiftTo(h,g),g.subTo(s,s);s.t<h;)s[s.t++]=0;for(;0<=--d;){var m=n[--p]==u?this.DM:Math.floor(n[p]*c+(n[p-1]+l)*f);if((n[p]+=s.am(0,m,n,d,0,h))<m)for(s.dlShiftTo(d,g),n.subTo(g,n);n[p]<--m;)n.subTo(g,n)}null!=e&&(n.drShiftTo(h,e),o!=t)&&y.ZERO.subTo(e,e),n.t=h,n.clamp(),0<a&&n.rShiftTo(a,n),o<0&&y.ZERO.subTo(n,n)}}}},y.prototype.invDigit=function(){var t,e;return this.t<1||0==(1&(t=this[0]))?0:0<(e=(e=(e=(e=(e=3&t)*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)?this.DV-e:-e},y.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},y.prototype.exp=function(t,e){if(4294967295<t||t<1)return y.ONE;var n,r=v(),i=v(),s=e.convert(this),o=_t(t)-1;for(s.copyTo(r);0<=--o;)e.sqrTo(r,i),0<(t&1<<o)?e.mulTo(i,s,r):(n=r,r=i,i=n);return e.revert(r)},y.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},y.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||36<t)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=vt(n),i=v(),s=v(),o="";for(this.divRemTo(r,i,s);0<i.signum();)o=(n+s.intValue()).toString(t).substr(1)+o,i.divRemTo(r,i,s);return s.intValue().toString(t)+o},y.prototype.fromRadix=function(t,e){this.fromInt(0);for(var n=this.chunkSize(e=null==e?10:e),r=Math.pow(e,n),i=!1,s=0,o=0,a=0;a<t.length;++a){var h=yt(t,a);h<0?"-"==t.charAt(a)&&0==this.signum()&&(i=!0):(o=e*o+h,++s>=n&&(this.dMultiply(r),this.dAddOffset(o,0),o=s=0))}0<s&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(o,0)),i&&y.ZERO.subTo(this,this)},y.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(y.ONE.shiftLeft(t-1),H,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(y.ONE.shiftLeft(t-1),this);else{var n=[],r=7&t;n.length=1+(t>>3),e.nextBytes(n),0<r?n[0]&=(1<<r)-1:n[0]=0,this.fromString(n,256)}},y.prototype.bitwiseTo=function(t,e,n){for(var r,i=Math.min(t.t,this.t),s=0;s<i;++s)n[s]=e(this[s],t[s]);if(t.t<this.t){for(r=t.s&this.DM,s=i;s<this.t;++s)n[s]=e(this[s],r);n.t=this.t}else{for(r=this.s&this.DM,s=i;s<t.t;++s)n[s]=e(r,t[s]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},y.prototype.changeBit=function(t,e){t=y.ONE.shiftLeft(t);return this.bitwiseTo(t,e,t),t},y.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,0<r?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},y.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},y.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},y.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;0<r;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},y.prototype.multiplyUpperTo=function(t,e,n){var r=n.t=this.t+t.t- --e;for(n.s=0;0<=--r;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},y.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(0<this.t)if(0==e)n=this[0]%t;else for(var r=this.t-1;0<=r;--r)n=(e*n+this[r])%t;return n},y.prototype.millerRabin=function(t){var e=this.subtract(y.ONE),n=e.getLowestSetBit();if(n<=0)return!1;var r=e.shiftRight(n);(t=t+1>>1)>u.length&&(t=u.length);for(var i=v(),s=0;s<t;++s){i.fromInt(u[Math.floor(Math.random()*u.length)]);var o=i.modPow(r,this);if(0!=o.compareTo(y.ONE)&&0!=o.compareTo(e)){for(var a=1;a++<n&&0!=o.compareTo(e);)if(0==(o=o.modPowInt(2,this)).compareTo(y.ONE))return!1;if(0!=o.compareTo(e))return!1}}return!0},y.prototype.square=function(){var t=v();return this.squareTo(t),t},y.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone(),i=(n.compareTo(r)<0&&(t=n,n=r,r=t),n.getLowestSetBit()),s=r.getLowestSetBit();s<0?e(n):(0<(s=i<s?i:s)&&(n.rShiftTo(s,n),r.rShiftTo(s,r)),setTimeout(function t(){0<(i=n.getLowestSetBit())&&n.rShiftTo(i,n),0<(i=r.getLowestSetBit())&&r.rShiftTo(i,r),0<=n.compareTo(r)?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),0<n.signum()?setTimeout(t,0):(0<s&&r.lShiftTo(s,r),setTimeout(function(){e(r)},0))},10))},y.prototype.fromNumberAsync=function(e,n,t,r){var i,s;"number"==typeof n?e<2?this.fromInt(1):(this.fromNumber(e,t),this.testBit(e-1)||this.bitwiseTo(y.ONE.shiftLeft(e-1),H,this),this.isEven()&&this.dAddOffset(1,0),i=this,setTimeout(function t(){i.dAddOffset(2,0),i.bitLength()>e&&i.subTo(y.ONE.shiftLeft(e-1),i),i.isProbablePrime(n)?setTimeout(function(){r()},0):setTimeout(t,0)},0)):(t=7&e,(s=[]).length=1+(e>>3),n.nextBytes(s),0<t?s[0]&=(1<<t)-1:s[0]=0,this.fromString(s,256))},y),ot=(pt.prototype.convert=function(t){return t},pt.prototype.revert=function(t){return t},pt.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},pt.prototype.sqrTo=function(t,e){t.squareTo(e)},pt),at=(lt.prototype.convert=function(t){return t.s<0||0<=t.compareTo(this.m)?t.mod(this.m):t},lt.prototype.revert=function(t){return t},lt.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},lt.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},lt.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},lt),ht=(ft.prototype.convert=function(t){var e=v();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&0<e.compareTo(c.ZERO)&&this.m.subTo(e,e),e},ft.prototype.revert=function(t){var e=v();return t.copyTo(e),this.reduce(e),e},ft.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)},ft.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},ft.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},ft),ut=(ct.prototype.convert=function(t){var e;return t.s<0||t.t>2*this.m.t?t.mod(this.m):t.compareTo(this.m)<0?t:(e=v(),t.copyTo(e),this.reduce(e),e)},ct.prototype.revert=function(t){return t},ct.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);0<=t.compareTo(this.m);)t.subTo(this.m,t)},ct.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},ct.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},ct);function ct(t){this.m=t,this.r2=v(),this.q3=v(),c.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}function ft(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function lt(t){this.m=t}function pt(){}function y(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function dt(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){for(var n=new Y;e=t.get(),n.mulAdd(128,127&e),128&e;);this.tagNumber=n.simplify()}}function f(t,e,n,r,i){if(!(r instanceof it))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}function n(t,e){this.hexDigits="0123456789ABCDEF",t instanceof n?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=e)}function v(){return new c(null)}function l(t,e){return new c(t,e)}var t="undefined"!=typeof navigator,t=t&&"Microsoft Internet Explorer"==navigator.appName?(c.prototype.am=function(t,e,n,r,i,s){for(var o=32767&e,a=e>>15;0<=--s;){var h=32767&this[t],u=this[t++]>>15,c=a*h+u*o;i=((h=o*h+((32767&c)<<15)+n[r]+(1073741823&i))>>>30)+(c>>>15)+a*u+(i>>>30),n[r++]=1073741823&h}return i},30):t&&"Netscape"!=navigator.appName?(c.prototype.am=function(t,e,n,r,i,s){for(;0<=--s;){var o=e*this[t++]+n[r]+i;i=Math.floor(o/67108864),n[r++]=67108863&o}return i},26):(c.prototype.am=function(t,e,n,r,i,s){for(var o=16383&e,a=e>>14;0<=--s;){var h=16383&this[t],u=this[t++]>>14,c=a*h+u*o;i=((h=o*h+((16383&c)<<14)+n[r]+i)>>28)+(c>>14)+a*u,n[r++]=268435455&h}return i},28);c.prototype.DB=t,c.prototype.DM=(1<<t)-1,c.prototype.DV=1<<t,c.prototype.FV=Math.pow(2,52),c.prototype.F1=52-t,c.prototype.F2=2*t-52;for(var gt=[],mt="0".charCodeAt(0),e=0;e<=9;++e)gt[mt++]=e;for(mt="a".charCodeAt(0),e=10;e<36;++e)gt[mt++]=e;for(mt="A".charCodeAt(0),e=10;e<36;++e)gt[mt++]=e;function yt(t,e){t=gt[t.charCodeAt(e)];return null==t?-1:t}function vt(t){var e=v();return e.fromInt(t),e}function _t(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}c.ZERO=vt(0),c.ONE=vt(1);wt.prototype.init=function(t){for(var e,n,r=0;r<256;++r)this.S[r]=r;for(r=e=0;r<256;++r)e=e+this.S[r]+t[r%t.length]&255,n=this.S[r],this.S[r]=this.S[e],this.S[e]=n;this.i=0,this.j=0},wt.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var bt=wt;function wt(){this.i=0,this.j=0,this.S=[]}var St,xt,Tt=null;null==Tt&&(Tt=[],xt=0);Dt.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=(()=>{if(null==St){for(St=new bt;xt<256;){var t=Math.floor(65536*Math.random());Tt[xt++]=255&t}for(St.init(Tt),xt=0;xt<Tt.length;++xt)Tt[xt]=0;xt=0}return St.next()})()};var Et=Dt;function Dt(){}r.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},r.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},r.prototype.setPublic=function(t,e){null!=t&&null!=e&&0<t.length&&0<e.length&&(this.n=l(t,16),this.e=parseInt(e,16))},r.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,t=((t,e)=>{if(e<t.length+11)return null;for(var n=[],r=t.length-1;0<=r&&0<e;){var i=t.charCodeAt(r--);i<128?n[--e]=i:127<i&&i<2048?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var s=new Et,o=[];2<e;){for(o[0]=0;0==o[0];)s.nextBytes(o);n[--e]=o[0]}return n[--e]=2,n[--e]=0,new c(n)})(t,e);if(null==t)return null;t=this.doPublic(t);if(null==t)return null;for(var n=t.toString(16),r=n.length,i=0;i<2*e-r;i++)n="0"+n;return n},r.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&0<t.length&&0<e.length&&(this.n=l(t,16),this.e=parseInt(e,16),this.d=l(n,16))},r.prototype.setPrivateEx=function(t,e,n,r,i,s,o,a){null!=t&&null!=e&&0<t.length&&0<e.length&&(this.n=l(t,16),this.e=parseInt(e,16),this.d=l(n,16),this.p=l(r,16),this.q=l(i,16),this.dmp1=l(s,16),this.dmq1=l(o,16),this.coeff=l(a,16))},r.prototype.generate=function(t,e){var n=new Et,r=t>>1;this.e=parseInt(e,16);for(var i=new c(e,16);;){for(;this.p=new c(t-r,1,n),0!=this.p.subtract(c.ONE).gcd(i).compareTo(c.ONE)||!this.p.isProbablePrime(10););for(;this.q=new c(r,1,n),0!=this.q.subtract(c.ONE).gcd(i).compareTo(c.ONE)||!this.q.isProbablePrime(10););this.p.compareTo(this.q)<=0&&(s=this.p,this.p=this.q,this.q=s);var s=this.p.subtract(c.ONE),o=this.q.subtract(c.ONE),a=s.multiply(o);if(0==a.gcd(i).compareTo(c.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(a),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(o),this.coeff=this.q.modInverse(this.p);break}}},r.prototype.decrypt=function(t){t=l(t,16),t=this.doPrivate(t);if(null==t)return null;for(var e=this.n.bitLength()+7>>3,n=t.toByteArray(),r=0;r<n.length&&0==n[r];)++r;if(n.length-r!=e-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var i="";++r<n.length;){var s=255&n[r];s<128?i+=String.fromCharCode(s):191<s&&s<224?(i+=String.fromCharCode((31&s)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&s)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i},r.prototype.generateAsync=function(t,e,i){var s=new Et,o=t>>1,a=(this.e=parseInt(e,16),new c(e,16)),h=this;setTimeout(function r(){function n(){h.q=v(),h.q.fromNumberAsync(o,1,s,function(){h.q.subtract(c.ONE).gcda(a,function(t){0==t.compareTo(c.ONE)&&h.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(n,0)})})}var e=function(){h.p.compareTo(h.q)<=0&&(t=h.p,h.p=h.q,h.q=t);var t=h.p.subtract(c.ONE),e=h.q.subtract(c.ONE),n=t.multiply(e);0==n.gcd(a).compareTo(c.ONE)?(h.n=h.p.multiply(h.q),h.d=a.modInverse(n),h.dmp1=h.d.mod(t),h.dmq1=h.d.mod(e),h.coeff=h.q.modInverse(h.p),setTimeout(function(){i()},0)):setTimeout(r,0)};setTimeout(function e(){h.p=v(),h.p.fromNumberAsync(t-o,1,s,function(){h.p.subtract(c.ONE).gcda(a,function(t){0==t.compareTo(c.ONE)&&h.p.isProbablePrime(10)?setTimeout(n,0):setTimeout(e,0)})})},0)},0)},r.prototype.sign=function(t,e,n){n=((t,e)=>{if(e<t.length+22)return null;for(var n=e-t.length-6,r="",i=0;i<n;i+=2)r+="ff";return l("0001"+r+"00"+t,16)})((Bt[n]||"")+e(t).toString(),this.n.bitLength()/4);return null==n||null==(e=this.doPrivate(n))?null:0==(1&(t=e.toString(16)).length)?t:"0"+t},r.prototype.verify=function(t,e,n){e=l(e,16),e=this.doPublic(e);return null==e?null:(t=>{for(var e in Bt)if(Bt.hasOwnProperty(e)){var e=Bt[e],n=e.length;if(t.substr(0,n)==e)return t.substr(n)}return t})(e.toString(16).replace(/^1f+00/,""))==n(t).toString()},r.prototype.encryptLong=function(t){var e=this,n="",r=(this.n.bitLength()+7>>3)-11;return this.setSplitChn(t,r).forEach(function(t){n+=e.encrypt(t)}),n},r.prototype.decryptLong=function(t){var e="",n=this.n.bitLength()+7>>3,r=2*n;if(t.length>r){for(var i=t.match(new RegExp(".{1,"+r+"}","g"))||[],s=[],o=0;o<i.length;o++){var a=l(i[o],16),a=this.doPrivate(a);if(null==a)return null;s.push(a)}e=((t,e)=>{for(var n=[],r=0;r<t.length;r++){for(var i=t[r].toByteArray(),s=0;s<i.length&&0==i[s];)++s;if(i.length-s!=e-1||2!=i[s])return null;for(++s;0!=i[s];)if(++s>=i.length)return null;n=n.concat(i.slice(s+1))}for(var o=n,a=-1,h="";++a<o.length;){var u=255&o[a];u<128?h+=String.fromCharCode(u):191<u&&u<224?(h+=String.fromCharCode((31&u)<<6|63&o[a+1]),++a):(h+=String.fromCharCode((15&u)<<12|(63&o[a+1])<<6|63&o[a+2]),a+=2)}return h})(s,n)}else e=this.decrypt(t);return e},r.prototype.setSplitChn=function(t,e,n){void 0===n&&(n=[]);for(var r=t.split(""),i=0,s=0;s<r.length;s++){var o=r[s].charCodeAt(0);if((i+=o<=127?1:o<=2047?2:o<=65535?3:4)>e)return o=t.substring(0,s),n.push(o),this.setSplitChn(t.substring(s),e,n)}return n.push(t),n};t=r;function r(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}var Bt={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},i={lang:{extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");function r(){}if(r.prototype=e.prototype,t.prototype=new r,(t.prototype.constructor=t).superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){for(var i in n)t.prototype[i]=n[i];var e=function(){},s=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(e=function(t,e){for(i=0;i<s.length;i+=1){var n=s[i],r=e[n];"function"==typeof r&&r!=Object.prototype[n]&&(t[n]=r)}})}catch(t){}e(t.prototype,n)}}}},T={};void 0!==T.asn1&&T.asn1||(T.asn1={}),T.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){t=t.toString(16);return t=t.length%2==1?"0"+t:t},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1).length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";e=new c(r,16).xor(t).add(c.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=T.asn1,n=e.DERBoolean,r=e.DERInteger,i=e.DERBitString,s=e.DEROctetString,o=e.DERNull,a=e.DERObjectIdentifier,h=e.DEREnumerated,u=e.DERUTF8String,c=e.DERNumericString,f=e.DERPrintableString,l=e.DERTeletexString,p=e.DERIA5String,d=e.DERUTCTime,g=e.DERGeneralizedTime,m=e.DERSequence,y=e.DERSet,v=e.DERTaggedObject,_=e.ASN1Util.newObject,e=Object.keys(t);if(1!=e.length)throw"key of param shall be only one.";e=e[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+e+":"))throw"undefined key: "+e;if("bool"==e)return new n(t[e]);if("int"==e)return new r(t[e]);if("bitstr"==e)return new i(t[e]);if("octstr"==e)return new s(t[e]);if("null"==e)return new o(t[e]);if("oid"==e)return new a(t[e]);if("enum"==e)return new h(t[e]);if("utf8str"==e)return new u(t[e]);if("numstr"==e)return new c(t[e]);if("prnstr"==e)return new f(t[e]);if("telstr"==e)return new l(t[e]);if("ia5str"==e)return new p(t[e]);if("utctime"==e)return new d(t[e]);if("gentime"==e)return new g(t[e]);if("seq"==e){for(var b=t[e],w=[],S=0;S<b.length;S++){var x=_(b[S]);w.push(x)}return new m({array:w})}if("set"==e){for(b=t[e],w=[],S=0;S<b.length;S++)x=_(b[S]),w.push(x);return new y({array:w})}if("tag"==e){n=t[e];if("[object Array]"===Object.prototype.toString.call(n)&&3==n.length)return r=_(n[2]),new v({tag:n[0],explicit:n[1],obj:r});i={};if(void 0!==n.explicit&&(i.explicit=n.explicit),void 0!==n.tag&&(i.tag=n.tag),void 0===n.obj)throw"obj shall be specified for 'tag'.";return i.obj=_(n.obj),new v(i)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},T.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),r=(e=Math.floor(n/40)+"."+n%40,""),i=2;i<t.length;i+=2){var s=("00000000"+parseInt(t.substr(i,2),16).toString(2)).slice(-8);r+=s.substr(1,7),"0"==s.substr(0,1)&&(e=e+"."+new c(r,2).toString(10),r="")}return e},T.asn1.ASN1Util.oidIntToHex=function(t){function a(t){return t=1==(t=t.toString(16)).length?"0"+t:t}if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var e="",n=t.split("."),t=40*parseInt(n[0])+parseInt(n[1]);e+=a(t),n.splice(0,2);for(var r=0;r<n.length;r++)e+=(t=>{var e="",n=new c(t,10).toString(2),r=7-n.length%7;7==r&&(r=0);for(var i="",s=0;s<r;s++)i+="0";for(n=i+n,s=0;s<n.length-1;s+=7){var o=n.substr(s,7);s!=n.length-7&&(o="1"+o),e+=a(parseInt(o,2))}return e})(n[r]);return e},T.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(15<n)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+n).toString(16)+e},this.getEncodedHex=function(){return null!=this.hTLV&&!this.isModified||(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},T.asn1.DERAbstractString=function(t){T.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},i.lang.extend(T.asn1.DERAbstractString,T.asn1.ASN1Object),T.asn1.DERAbstractTime=function(t){T.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,n){var r=this.zeroPadding,t=this.localDateToUTC(t),i=String(t.getFullYear()),e=(i="utc"==e?i.substr(2,2):i)+r(String(t.getMonth()+1),2)+r(String(t.getDate()),2)+r(String(t.getHours()),2)+r(String(t.getMinutes()),2)+r(String(t.getSeconds()),2);return(e=!0===n&&0!=(i=t.getMilliseconds())?e+"."+r(String(i),3).replace(/[0]+$/,""):e)+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,s){t=new Date(Date.UTC(t,e-1,n,r,i,s,0));this.setByDate(t)},this.getFreshValueHex=function(){return this.hV}},i.lang.extend(T.asn1.DERAbstractTime,T.asn1.ASN1Object),T.asn1.DERAbstractStructured=function(t){T.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},i.lang.extend(T.asn1.DERAbstractStructured,T.asn1.ASN1Object),T.asn1.DERBoolean=function(){T.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},i.lang.extend(T.asn1.DERBoolean,T.asn1.ASN1Object),T.asn1.DERInteger=function(t){T.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=T.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){t=new c(String(t),10);this.setByBigInteger(t)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},i.lang.extend(T.asn1.DERInteger,T.asn1.ASN1Object),T.asn1.DERBitString=function(t){var e;void 0!==t&&void 0!==t.obj&&(e=T.asn1.ASN1Util.newObject(t.obj),t.hex="00"+e.getEncodedHex()),T.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;t="0"+t;this.hTLV=null,this.isModified=!0,this.hV=t+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";for(var r="",n=0;n<t.length-1;n+=8){var i=t.substr(n,8),i=parseInt(i,2).toString(16);r+=i=1==i.length?"0"+i:i}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)e+=1==t[n]?"1":"0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},i.lang.extend(T.asn1.DERBitString,T.asn1.ASN1Object),T.asn1.DEROctetString=function(t){var e;void 0!==t&&void 0!==t.obj&&(e=T.asn1.ASN1Util.newObject(t.obj),t.hex=e.getEncodedHex()),T.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},i.lang.extend(T.asn1.DEROctetString,T.asn1.DERAbstractString),T.asn1.DERNull=function(){T.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},i.lang.extend(T.asn1.DERNull,T.asn1.ASN1Object),T.asn1.DERObjectIdentifier=function(t){var a=function(t){return t=1==(t=t.toString(16)).length?"0"+t:t};T.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var e="",n=t.split("."),t=40*parseInt(n[0])+parseInt(n[1]);e+=a(t),n.splice(0,2);for(var r=0;r<n.length;r++)e+=(t=>{var e="",n=new c(t,10).toString(2),r=7-n.length%7;7==r&&(r=0);for(var i="",s=0;s<r;s++)i+="0";for(n=i+n,s=0;s<n.length-1;s+=7){var o=n.substr(s,7);s!=n.length-7&&(o="1"+o),e+=a(parseInt(o,2))}return e})(n[r]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueName=function(t){var e=T.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},i.lang.extend(T.asn1.DERObjectIdentifier,T.asn1.ASN1Object),T.asn1.DEREnumerated=function(t){T.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=T.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){t=new c(String(t),10);this.setByBigInteger(t)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},i.lang.extend(T.asn1.DEREnumerated,T.asn1.ASN1Object),T.asn1.DERUTF8String=function(t){T.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},i.lang.extend(T.asn1.DERUTF8String,T.asn1.DERAbstractString),T.asn1.DERNumericString=function(t){T.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},i.lang.extend(T.asn1.DERNumericString,T.asn1.DERAbstractString),T.asn1.DERPrintableString=function(t){T.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},i.lang.extend(T.asn1.DERPrintableString,T.asn1.DERAbstractString),T.asn1.DERTeletexString=function(t){T.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},i.lang.extend(T.asn1.DERTeletexString,T.asn1.DERAbstractString),T.asn1.DERIA5String=function(t){T.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},i.lang.extend(T.asn1.DERIA5String,T.asn1.DERAbstractString),T.asn1.DERUTCTime=function(t){T.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},i.lang.extend(T.asn1.DERUTCTime,T.asn1.DERAbstractTime),T.asn1.DERGeneralizedTime=function(t){T.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis)&&(this.withMillis=!0)},i.lang.extend(T.asn1.DERGeneralizedTime,T.asn1.DERAbstractTime),T.asn1.DERSequence=function(t){T.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++)t+=this.asn1Array[e].getEncodedHex();return this.hV=t,this.hV}},i.lang.extend(T.asn1.DERSequence,T.asn1.DERAbstractStructured),T.asn1.DERSet=function(t){T.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},i.lang.extend(T.asn1.DERSet,T.asn1.DERAbstractStructured),T.asn1.DERTaggedObject=function(t){T.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj)&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object))},i.lang.extend(T.asn1.DERTaggedObject,T.asn1.ASN1Object);At=function(t,e){return(At=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};var At,It=(n=>{function r(t){var e=n.call(this)||this;return t&&("string"==typeof t?e.parseKey(t):(r.hasPrivateKeyProperty(t)||r.hasPublicKeyProperty(t))&&e.parsePropertiesFrom(t)),e}var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}return At(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i),r.prototype.parseKey=function(t){try{var e=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?(t=>{if(void 0===F){var e="0123456789ABCDEF";for(F={},s=0;s<16;++s)F[e.charAt(s)]=s;for(e=e.toLowerCase(),s=10;s<16;++s)F[e.charAt(s)]=s;for(s=0;s<8;++s)F[" \f\n\r\t \u2028\u2029".charAt(s)]=-1}for(var n=[],r=0,i=0,s=0;s<t.length;++s){var o=t.charAt(s);if("="==o)break;if(-1!=(o=F[o])){if(void 0===o)throw new Error("Illegal character at offset "+s);r|=o,2<=++i?(n[n.length]=r,i=r=0):r<<=4}}if(i)throw new Error("Hex encoding incomplete: 4 bits missing");return n})(t):G.unarmor(t),i=rt.decode(r);if(9===(i=3===i.sub.length?i.sub[2].sub[0]:i).sub.length){e=i.sub[1].getHexStringValue(),this.n=l(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var s=i.sub[3].getHexStringValue(),o=(this.d=l(s,16),i.sub[4].getHexStringValue()),a=(this.p=l(o,16),i.sub[5].getHexStringValue()),h=(this.q=l(a,16),i.sub[6].getHexStringValue()),u=(this.dmp1=l(h,16),i.sub[7].getHexStringValue()),c=(this.dmq1=l(u,16),i.sub[8].getHexStringValue());this.coeff=l(c,16)}else{if(2!==i.sub.length)return!1;var f=i.sub[1].sub[0],e=f.sub[0].getHexStringValue();this.n=l(e,16),n=f.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},r.prototype.getPrivateBaseKey=function(){var t={array:[new T.asn1.DERInteger({int:0}),new T.asn1.DERInteger({bigint:this.n}),new T.asn1.DERInteger({int:this.e}),new T.asn1.DERInteger({bigint:this.d}),new T.asn1.DERInteger({bigint:this.p}),new T.asn1.DERInteger({bigint:this.q}),new T.asn1.DERInteger({bigint:this.dmp1}),new T.asn1.DERInteger({bigint:this.dmq1}),new T.asn1.DERInteger({bigint:this.coeff})]};return new T.asn1.DERSequence(t).getEncodedHex()},r.prototype.getPrivateBaseKeyB64=function(){return K(this.getPrivateBaseKey())},r.prototype.getPublicBaseKey=function(){var t=new T.asn1.DERSequence({array:[new T.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new T.asn1.DERNull]}),e=new T.asn1.DERSequence({array:[new T.asn1.DERInteger({bigint:this.n}),new T.asn1.DERInteger({int:this.e})]}),e=new T.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new T.asn1.DERSequence({array:[t,e]}).getEncodedHex()},r.prototype.getPublicBaseKeyB64=function(){return K(this.getPublicBaseKey())},r.wordwrap=function(t,e){return t&&(e="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})",t.match(RegExp(e,"g")).join("\n"))},r.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return(t+=r.wordwrap(this.getPrivateBaseKeyB64())+"\n")+"-----END RSA PRIVATE KEY-----"},r.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return(t+=r.wordwrap(this.getPublicBaseKeyB64())+"\n")+"-----END PUBLIC KEY-----"},r.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},r.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},r.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},r})(t),Ot=(s.prototype.setKey=function(t){this.log&&this.key,this.key=new It(t)},s.prototype.setPrivateKey=function(t){this.setKey(t)},s.prototype.setPublicKey=function(t){this.setKey(t)},s.prototype.decrypt=function(t){try{return this.getKey().decrypt(W(t))}catch(t){return!1}},s.prototype.encrypt=function(t){try{return K(this.getKey().encrypt(t))}catch(t){return!1}},s.prototype.encryptLong=function(t){try{return K(this.getKey().encryptLong(t))}catch(t){return!1}},s.prototype.decryptLong=function(t){try{return this.getKey().decryptLong(W(t))}catch(t){return!1}},s.prototype.sign=function(t,e,n){try{return K(this.getKey().sign(t,e,n))}catch(t){return!1}},s.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,W(e),n)}catch(t){return!1}},s.prototype.getKey=function(t){if(!this.key){if(this.key=new It,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},s.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},s.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},s.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},s.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},s.version="3.2.1",s);function s(t){this.default_key_size=(t=(t=void 0===t?{}:t)||{}).default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}function kt(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function zt(t,e,n,r,i,s){return kt((e=kt(kt(e,t),kt(r,s)))<<i|e>>>32-i,n)}function p(t,e,n,r,i,s,o){return zt(e&n|~e&r,t,e,i,s,o)}function g(t,e,n,r,i,s,o){return zt(e&r|n&~r,t,e,i,s,o)}function m(t,e,n,r,i,s,o){return zt(e^n^r,t,e,i,s,o)}function _(t,e,n,r,i,s,o){return zt(n^(e|~r),t,e,i,s,o)}function Rt(t,e){for(var n,r,i,s,o=void 0,a=(t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e,1732584193),h=-271733879,u=-1732584194,c=271733878,o=0;o<t.length;o+=16)a=p(n=a,r=h,i=u,s=c,t[o],7,-680876936),c=p(c,a,h,u,t[o+1],12,-389564586),u=p(u,c,a,h,t[o+2],17,606105819),h=p(h,u,c,a,t[o+3],22,-1044525330),a=p(a,h,u,c,t[o+4],7,-176418897),c=p(c,a,h,u,t[o+5],12,1200080426),u=p(u,c,a,h,t[o+6],17,-1473231341),h=p(h,u,c,a,t[o+7],22,-45705983),a=p(a,h,u,c,t[o+8],7,1770035416),c=p(c,a,h,u,t[o+9],12,-1958414417),u=p(u,c,a,h,t[o+10],17,-42063),h=p(h,u,c,a,t[o+11],22,-1990404162),a=p(a,h,u,c,t[o+12],7,1804603682),c=p(c,a,h,u,t[o+13],12,-40341101),u=p(u,c,a,h,t[o+14],17,-1502002290),a=g(a,h=p(h,u,c,a,t[o+15],22,1236535329),u,c,t[o+1],5,-165796510),c=g(c,a,h,u,t[o+6],9,-1069501632),u=g(u,c,a,h,t[o+11],14,643717713),h=g(h,u,c,a,t[o],20,-373897302),a=g(a,h,u,c,t[o+5],5,-701558691),c=g(c,a,h,u,t[o+10],9,38016083),u=g(u,c,a,h,t[o+15],14,-660478335),h=g(h,u,c,a,t[o+4],20,-405537848),a=g(a,h,u,c,t[o+9],5,568446438),c=g(c,a,h,u,t[o+14],9,-1019803690),u=g(u,c,a,h,t[o+3],14,-187363961),h=g(h,u,c,a,t[o+8],20,1163531501),a=g(a,h,u,c,t[o+13],5,-1444681467),c=g(c,a,h,u,t[o+2],9,-51403784),u=g(u,c,a,h,t[o+7],14,1735328473),a=m(a,h=g(h,u,c,a,t[o+12],20,-1926607734),u,c,t[o+5],4,-378558),c=m(c,a,h,u,t[o+8],11,-2022574463),u=m(u,c,a,h,t[o+11],16,1839030562),h=m(h,u,c,a,t[o+14],23,-35309556),a=m(a,h,u,c,t[o+1],4,-1530992060),c=m(c,a,h,u,t[o+4],11,1272893353),u=m(u,c,a,h,t[o+7],16,-155497632),h=m(h,u,c,a,t[o+10],23,-1094730640),a=m(a,h,u,c,t[o+13],4,681279174),c=m(c,a,h,u,t[o],11,-358537222),u=m(u,c,a,h,t[o+3],16,-722521979),h=m(h,u,c,a,t[o+6],23,76029189),a=m(a,h,u,c,t[o+9],4,-640364487),c=m(c,a,h,u,t[o+12],11,-421815835),u=m(u,c,a,h,t[o+15],16,530742520),a=_(a,h=m(h,u,c,a,t[o+2],23,-995338651),u,c,t[o],6,-198630844),c=_(c,a,h,u,t[o+7],10,1126891415),u=_(u,c,a,h,t[o+14],15,-1416354905),h=_(h,u,c,a,t[o+5],21,-57434055),a=_(a,h,u,c,t[o+12],6,1700485571),c=_(c,a,h,u,t[o+3],10,-1894986606),u=_(u,c,a,h,t[o+10],15,-1051523),h=_(h,u,c,a,t[o+1],21,-2054922799),a=_(a,h,u,c,t[o+8],6,1873313359),c=_(c,a,h,u,t[o+15],10,-30611744),u=_(u,c,a,h,t[o+6],15,-1560198380),h=_(h,u,c,a,t[o+13],21,1309151649),a=_(a,h,u,c,t[o+4],6,-145523070),c=_(c,a,h,u,t[o+11],10,-1120210379),u=_(u,c,a,h,t[o+2],15,718787259),h=_(h,u,c,a,t[o+9],21,-343485551),a=kt(a,n),h=kt(h,r),u=kt(u,i),c=kt(c,s);return[a,h,u,c]}function Pt(t){for(var e=void 0,n="",r=32*t.length,e=0;e<r;e+=8)n+=String.fromCharCode(t[e>>5]>>>e%32&255);return n}function Ct(t){var e=void 0,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;for(var r=8*t.length,e=0;e<r;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function Nt(t){for(var e,n=void 0,r="0123456789abcdef",i="",n=0;n<t.length;n+=1)e=t.charCodeAt(n),i+=r.charAt(e>>>4&15)+r.charAt(15&e);return i}function Mt(t){return unescape(encodeURIComponent(t))}function Vt(t){return Pt(Rt(Ct(t=Mt(t)),8*t.length))}function jt(t,e){var t=Mt(t),e=Mt(e),n=void 0,r=Ct(t),i=[],s=[];for(i[15]=s[15]=void 0,16<r.length&&(r=Rt(r,8*t.length)),n=0;n<16;n+=1)i[n]=909522486^r[n],s[n]=1549556828^r[n];return t=Rt(i.concat(Ct(e)),512+8*e.length),Pt(Rt(s.concat(t),640))}function Ht(t,e,n){return e?n?jt(e,t):Nt(jt(e,t)):n?Vt(t):Nt(Vt(t))}var qt,Lt,Ft,Ut,Kt,Wt,Zt,Gt,$t,Jt,Yt,Xt,Qt,te,ee,ne,re,ie,se,b=b||(Lt=Math,t=(i={}).lib={},Ft=t.Base={extend:function(t){oe.prototype=this;var e=new oe;return t&&e.mixIn(t),e.hasOwnProperty("init")||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},Ut=t.WordArray=Ft.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||Kt).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes;if(t=t.sigBytes,this.clamp(),r%4)for(var i=0;i<t;i++)e[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<t;i+=4)e[r+i>>>2]=n[i>>>2];else e.push.apply(e,n);return this.sigBytes+=t,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=Lt.ceil(e/4)},clone:function(){var t=Ft.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(4294967296*Lt.random()|0);return new Ut.init(e,t)}}),he=i.enc={},Kt=he.Hex={stringify:function(t){var e=t.words;t=t.sigBytes;for(var n=[],r=0;r<t;r++){var i=e[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new Ut.init(n,e/2)}},Wt=he.Latin1={stringify:function(t){var e=t.words;t=t.sigBytes;for(var n=[],r=0;r<t;r++)n.push(String.fromCharCode(e[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new Ut.init(n,e)}},Zt=he.Utf8={stringify:function(t){try{return decodeURIComponent(escape(Wt.stringify(t)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(t){return Wt.parse(unescape(encodeURIComponent(t)))}},Gt=t.BufferedBlockAlgorithm=Ft.extend({reset:function(){this._data=new Ut.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=Zt.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,n=e.words,r=e.sigBytes,i=this.blockSize,s=r/(4*i);if(t=(t?Lt.ceil(s):Lt.max((0|s)-this._minBufferSize,0))*i,r=Lt.min(4*t,r),t){for(var o=0;o<t;o+=i)this._doProcessBlock(n,o);o=n.splice(0,t),e.sigBytes-=r}return new Ut.init(o,r)},clone:function(){var t=Ft.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),t.Hasher=Gt.extend({cfg:Ft.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){Gt.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(n){return function(t,e){return new n.init(e).finalize(t)}},_createHmacHelper:function(n){return function(t,e){return new $t.HMAC.init(n,e).finalize(t)}}}),$t=i.algo={},i);function oe(){}qt=b.lib.WordArray,b.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp(),t=[];for(var i=0;i<n;i+=3)for(var s=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,o=0;o<4&&i+.75*o<n;o++)t.push(r.charAt(s>>>6*(3-o)&63));if(e=r.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var e=t.length,n=this._map;(s=n.charAt(64))&&-1!=(s=t.indexOf(s))&&(e=s);for(var r,i,s=[],o=0,a=0;a<e;a++)a%4&&(r=n.indexOf(t.charAt(a-1))<<a%4*2,i=n.indexOf(t.charAt(a))>>>6-a%4*2,s[o>>>2]|=(r|i)<<24-o%4*8,o++);return qt.create(s,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};var ae=Math;function x(t,e,n,r,i,s,o){return((t=t+(e&n|~e&r)+i+o)<<s|t>>>32-s)+e}function E(t,e,n,r,i,s,o){return((t=t+(e&r|n&~r)+i+o)<<s|t>>>32-s)+e}function D(t,e,n,r,i,s,o){return((t=t+(e^n^r)+i+o)<<s|t>>>32-s)+e}function B(t,e,n,r,i,s,o){return((t=t+(n^(e|~r))+i+o)<<s|t>>>32-s)+e}for(var he=b,ue=(t=he.lib).WordArray,ce=t.Hasher,t=he.algo,A=[],fe=0;fe<64;fe++)A[fe]=4294967296*ae.abs(ae.sin(fe+1))|0;t=t.MD5=ce.extend({_doReset:function(){this._hash=new ue.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=t[i=e+n];t[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var n=this._hash.words,i=t[e+0],s=t[e+2],o=t[e+3],a=t[e+4],h=t[e+5],u=t[e+6],c=t[e+7],f=t[e+8],l=t[e+9],p=t[e+10],d=t[e+11],g=t[e+12],m=t[e+13],y=t[e+14],v=t[e+15],_=x(n[0],S=n[1],w=n[2],b=n[3],i,7,A[0]),b=x(b,_,S,w,r=t[e+1],12,A[1]),w=x(w,b,_,S,s,17,A[2]),S=x(S,w,b,_,o,22,A[3]),_=x(_,S,w,b,a,7,A[4]),b=x(b,_,S,w,h,12,A[5]),w=x(w,b,_,S,u,17,A[6]),S=x(S,w,b,_,c,22,A[7]);_=x(_,S,w,b,f,7,A[8]),b=x(b,_,S,w,l,12,A[9]),w=x(w,b,_,S,p,17,A[10]),S=x(S,w,b,_,d,22,A[11]),_=x(_,S,w,b,g,7,A[12]),b=x(b,_,S,w,m,12,A[13]),w=x(w,b,_,S,y,17,A[14]),_=E(_,S=x(S,w,b,_,v,22,A[15]),w,b,r,5,A[16]),b=E(b,_,S,w,u,9,A[17]),w=E(w,b,_,S,d,14,A[18]),S=E(S,w,b,_,i,20,A[19]),_=E(_,S,w,b,h,5,A[20]),b=E(b,_,S,w,p,9,A[21]),w=E(w,b,_,S,v,14,A[22]),S=E(S,w,b,_,a,20,A[23]),_=E(_,S,w,b,l,5,A[24]),b=E(b,_,S,w,y,9,A[25]),w=E(w,b,_,S,o,14,A[26]),S=E(S,w,b,_,f,20,A[27]),_=E(_,S,w,b,m,5,A[28]),b=E(b,_,S,w,s,9,A[29]),w=E(w,b,_,S,c,14,A[30]),_=D(_,S=E(S,w,b,_,g,20,A[31]),w,b,h,4,A[32]),b=D(b,_,S,w,f,11,A[33]),w=D(w,b,_,S,d,16,A[34]),S=D(S,w,b,_,y,23,A[35]),_=D(_,S,w,b,r,4,A[36]),b=D(b,_,S,w,a,11,A[37]),w=D(w,b,_,S,c,16,A[38]),S=D(S,w,b,_,p,23,A[39]),_=D(_,S,w,b,m,4,A[40]),b=D(b,_,S,w,i,11,A[41]),w=D(w,b,_,S,o,16,A[42]),S=D(S,w,b,_,u,23,A[43]),_=D(_,S,w,b,l,4,A[44]),b=D(b,_,S,w,g,11,A[45]),w=D(w,b,_,S,v,16,A[46]),_=B(_,S=D(S,w,b,_,s,23,A[47]),w,b,i,6,A[48]),b=B(b,_,S,w,c,10,A[49]),w=B(w,b,_,S,y,15,A[50]),S=B(S,w,b,_,h,21,A[51]),_=B(_,S,w,b,g,6,A[52]),b=B(b,_,S,w,o,10,A[53]),w=B(w,b,_,S,p,15,A[54]),S=B(S,w,b,_,r,21,A[55]),_=B(_,S,w,b,f,6,A[56]),b=B(b,_,S,w,v,10,A[57]),w=B(w,b,_,S,u,15,A[58]),S=B(S,w,b,_,m,21,A[59]),_=B(_,S,w,b,a,6,A[60]),b=B(b,_,S,w,d,10,A[61]),w=B(w,b,_,S,s,15,A[62]),S=B(S,w,b,_,l,21,A[63]),n[0]=n[0]+_|0,n[1]=n[1]+S|0,n[2]=n[2]+w|0,n[3]=n[3]+b|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes,i=(e[r>>>5]|=128<<24-r%32,ae.floor(n/4294967296));for(e[15+(64+r>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e[14+(64+r>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process(),e=(t=this._hash).words,n=0;n<4;n++)r=e[n],e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);return t},clone:function(){var t=ce.clone.call(this);return t._hash=this._hash.clone(),t}}),he.MD5=ce._createHelper(t),he.HmacMD5=ce._createHmacHelper(t),O=(t=(i=b).lib).Base,ie=t.WordArray,se=(t=i.algo).EvpKDF=O.extend({cfg:O.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=(o=this.cfg).hasher.create(),r=ie.create(),i=r.words,s=o.keySize,o=o.iterations;i.length<s;){a&&n.update(a);var a=n.update(t).finalize(e);n.reset();for(var h=1;h<o;h++)a=n.finalize(a),n.reset();r.concat(a)}return r.sigBytes=4*s,r}}),i.EvpKDF=function(t,e,n){return se.create(n).compute(t,e)},b.lib.Cipher||(t=(O=b).lib,i=t.Base,Jt=t.WordArray,Yt=t.BufferedBlockAlgorithm,Xt=O.enc.Base64,Qt=O.algo.EvpKDF,te=t.Cipher=Yt.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){Yt.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(r){return{encrypt:function(t,e,n){return("string"==typeof e?re:ne).encrypt(r,t,e,n)},decrypt:function(t,e,n){return("string"==typeof e?re:ne).decrypt(r,t,e,n)}}}}),t.StreamCipher=te.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),le=O.mode={},(o=(t.BlockCipherMode=i.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}})).extend()).Encryptor=o.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize;Ie.call(this,t,e,r),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+r)}}),o.Decryptor=o.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=t.slice(e,e+r);n.decryptBlock(t,e),Ie.call(this,t,e,r),this._prevBlock=i}}),le=le.CBC=o,o=(O.pad={}).Pkcs7={pad:function(t,e){for(var n,r=(n=(n=4*e)-t.sigBytes%n)<<24|n<<16|n<<8|n,i=[],s=0;s<n;s+=4)i.push(r);n=Jt.create(i,n),t.concat(n)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},t.BlockCipher=te.extend({cfg:te.cfg.extend({mode:le,padding:o}),reset:function(){te.reset.call(this);var t,e=(n=this.cfg).iv,n=n.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode=t.call(n,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),ee=t.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),le=(O.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return((t=t.salt)?Jt.create([1398893684,1701076831]).concat(t).concat(e):e).toString(Xt)},parse:function(t){var e,n=(t=Xt.parse(t)).words;return 1398893684==n[0]&&1701076831==n[1]&&(e=Jt.create(n.slice(2,4)),n.splice(0,4),t.sigBytes-=16),ee.create({ciphertext:t,salt:e})}},ne=t.SerializableCipher=i.extend({cfg:i.extend({format:le}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r);return e=i.finalize(e),i=i.cfg,ee.create({ciphertext:e,key:n,iv:i.iv,algorithm:t,mode:i.mode,padding:i.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),O=(O.kdf={}).OpenSSL={execute:function(t,e,n,r){return r=r||Jt.random(8),t=Qt.create({keySize:e+n}).compute(t,r),n=Jt.create(t.words.slice(e),4*n),t.sigBytes=4*e,ee.create({key:t,iv:n,salt:r})}},re=t.PasswordBasedCipher=ne.extend({cfg:ne.cfg.extend({kdf:O}),encrypt:function(t,e,n,r){return n=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize),r.iv=n.iv,(t=ne.encrypt.call(this,t,e,n.key,r)).mixIn(n),t},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),n=r.kdf.execute(n,t.keySize,t.ivSize,e.salt),r.iv=n.iv,ne.decrypt.call(this,t,e,n.key,r)}}));for(var o=b,i=o.lib.BlockCipher,le=o.algo,a=[],pe=[],de=[],ge=[],me=[],ye=[],ve=[],_e=[],be=[],we=[],w=[],Se=0;Se<256;Se++)w[Se]=Se<128?Se<<1:Se<<1^283;for(var S=0,xe=0,Se=0;Se<256;Se++){var Te=(Te=xe^xe<<1^xe<<2^xe<<3^xe<<4)>>>8^255&Te^99,Ee=w[pe[a[S]=Te]=S],De=w[Ee],Be=w[De],I=257*w[Te]^16843008*Te;de[S]=I<<24|I>>>8,ge[S]=I<<16|I>>>16,me[S]=I<<8|I>>>24,ye[S]=I,ve[Te]=(I=16843009*Be^65537*De^257*Ee^16843008*S)<<24|I>>>8,_e[Te]=I<<16|I>>>16,be[Te]=I<<8|I>>>24,we[Te]=I,S?(S=Ee^w[w[w[Be^Ee]]],xe^=w[w[xe]]):S=xe=1}var Ae=[0,1,2,4,8,16,32,64,128,27,54],le=le.AES=i.extend({_doReset:function(){for(var t,e=(r=this._key).words,n=r.sigBytes/4,r=4*((this._nRounds=n+6)+1),i=this._keySchedule=[],s=0;s<r;s++)s<n?i[s]=e[s]:(t=i[s-1],s%n?6<n&&4==s%n&&(t=a[t>>>24]<<24|a[t>>>16&255]<<16|a[t>>>8&255]<<8|a[255&t]):(t=a[(t=t<<8|t>>>24)>>>24]<<24|a[t>>>16&255]<<16|a[t>>>8&255]<<8|a[255&t],t^=Ae[s/n|0]<<24),i[s]=i[s-n]^t);for(e=this._invKeySchedule=[],n=0;n<r;n++)s=r-n,t=n%4?i[s]:i[s-4],e[n]=n<4||s<=4?t:ve[a[t>>>24]]^_e[a[t>>>16&255]]^be[a[t>>>8&255]]^we[a[255&t]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,de,ge,me,ye,a)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,ve,_e,be,we,pe),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,s,o,a){for(var h=this._nRounds,u=t[e]^n[0],c=t[e+1]^n[1],f=t[e+2]^n[2],l=t[e+3]^n[3],p=4,d=1;d<h;d++)var g=r[u>>>24]^i[c>>>16&255]^s[f>>>8&255]^o[255&l]^n[p++],m=r[c>>>24]^i[f>>>16&255]^s[l>>>8&255]^o[255&u]^n[p++],y=r[f>>>24]^i[l>>>16&255]^s[u>>>8&255]^o[255&c]^n[p++],l=r[l>>>24]^i[u>>>16&255]^s[c>>>8&255]^o[255&f]^n[p++],u=g,c=m,f=y;g=(a[u>>>24]<<24|a[c>>>16&255]<<16|a[f>>>8&255]<<8|a[255&l])^n[p++],m=(a[c>>>24]<<24|a[f>>>16&255]<<16|a[l>>>8&255]<<8|a[255&u])^n[p++],y=(a[f>>>24]<<24|a[l>>>16&255]<<16|a[u>>>8&255]<<8|a[255&c])^n[p++],l=(a[l>>>24]<<24|a[u>>>16&255]<<16|a[c>>>8&255]<<8|a[255&f])^n[p++],t[e]=g,t[e+1]=m,t[e+2]=y,t[e+3]=l},keySize:8});function Ie(t,e,n){var r=this._iv;r?this._iv=void 0:r=this._prevBlock;for(var i=0;i<n;i++)t[e+i]^=r[i]}o.AES=i._createHelper(le);var Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function ke(t){this.message=t}function ze(t){for(var e,n,r=String(t),i=0,s=Oe,o="";r.charAt(0|i)||(s="=",i%1);o+=s.charAt(63&e>>8-i%1*8)){if(255<(n=r.charCodeAt(i+=.75)))throw new ke("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return o}(ke.prototype=new Error).name="InvalidCharacterError";t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Re(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var O={exports:{}},Pe=(O.exports=function n(r,i,s){function o(e,t){if(!i[e]){if(!r[e]){if(!t&&Re)return Re(e);if(a)return a(e,!0);t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t=i[e]={exports:{}};r[e][0].call(t.exports,function(t){return o(r[e][1][t]||t)},t,t.exports,n,r,i,s)}return i[e].exports}for(var a=Re,t=0;t<s.length;t++)o(s[t]);return o}({1:[function(t,e,n){var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array,i=(n.assign=function(t){for(var e,n=Array.prototype.slice.call(arguments,1);n.length;){var r=n.shift();if(r){if("object"!=(void 0===r?"undefined":d(r)))throw new TypeError(r+"must be non-object");for(var i in r)e=i,Object.prototype.hasOwnProperty.call(r,e)&&(t[i]=r[i])}}return t},n.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)},{arraySet:function(t,e,n,r,i){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+r),i);else for(var s=0;s<r;s++)t[i+s]=e[n+s]},flattenChunks:function(t){for(var e,n,r,i,s=e=0,o=t.length;s<o;s++)e+=t[s].length;for(i=new Uint8Array(e),s=n=0,o=t.length;s<o;s++)r=t[s],i.set(r,n),n+=r.length;return i}}),s={arraySet:function(t,e,n,r,i){for(var s=0;s<r;s++)t[i+s]=e[n+s]},flattenChunks:function(t){return[].concat.apply([],t)}};n.setTyped=function(t){t?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,s))},n.setTyped(r)},{}],2:[function(t,e,n){var h=t("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var u=new h.Buf8(256),r=0;r<256;r++)u[r]=252<=r?6:248<=r?5:240<=r?4:224<=r?3:192<=r?2:1;function c(t,e){if(e<65534&&(t.subarray&&s||!t.subarray&&i))return String.fromCharCode.apply(null,h.shrinkBuf(t,e));for(var n="",r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n}u[254]=u[254]=1,n.string2buf=function(t){for(var e,n,r,i,s=t.length,o=0,a=0;a<s;a++)55296==(64512&(n=t.charCodeAt(a)))&&a+1<s&&56320==(64512&(r=t.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(r-56320),a++),o+=n<128?1:n<2048?2:n<65536?3:4;for(e=new h.Buf8(o),a=i=0;i<o;a++)55296==(64512&(n=t.charCodeAt(a)))&&a+1<s&&56320==(64512&(r=t.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(r-56320),a++),n<128?e[i++]=n:(n<2048?e[i++]=192|n>>>6:(n<65536?e[i++]=224|n>>>12:(e[i++]=240|n>>>18,e[i++]=128|n>>>12&63),e[i++]=128|n>>>6&63),e[i++]=128|63&n);return e},n.buf2binstring=function(t){return c(t,t.length)},n.binstring2buf=function(t){for(var e=new h.Buf8(t.length),n=0,r=e.length;n<r;n++)e[n]=t.charCodeAt(n);return e},n.buf2string=function(t,e){for(var n,r,i,s=e||t.length,o=new Array(2*s),a=n=0;a<s;)if((r=t[a++])<128)o[n++]=r;else if(4<(i=u[r]))o[n++]=65533,a+=i-1;else{for(r&=2===i?31:3===i?15:7;1<i&&a<s;)r=r<<6|63&t[a++],i--;1<i?o[n++]=65533:r<65536?o[n++]=r:(r-=65536,o[n++]=55296|r>>10&1023,o[n++]=56320|1023&r)}return c(o,n)},n.utf8border=function(t,e){for(var n=(e=(e=e||t.length)>t.length?t.length:e)-1;0<=n&&128==(192&t[n]);)n--;return!(n<0||0===n)&&n+u[t[n]]>e?n:e}},{"./common":1}],3:[function(t,e,n){e.exports=function(t,e,n,r){for(var i=65535&t|0,s=t>>>16&65535|0,o=0;0!==n;){for(n-=o=2e3<n?2e3:n;s=s+(i=i+e[r++]|0)|0,--o;);i%=65521,s%=65521}return i|s<<16|0}},{}],4:[function(t,e,n){var a=(()=>{for(var t=[],e=0;e<256;e++){for(var n=e,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;t[e]=n}return t})();e.exports=function(t,e,n,r){var i=a,s=r+n;t^=-1;for(var o=r;o<s;o++)t=t>>>8^i[255&(t^e[o])];return-1^t}},{}],5:[function(t,N,e){var a,f=t("../utils/common"),h=t("./trees"),l=t("./adler32"),p=t("./crc32"),n=t("./messages"),u=0,c=0,d=-2,r=2,g=8,i=286,s=30,o=19,M=2*i+1,V=15,m=3,y=258,v=y+m+1,_=42,b=113;function w(t,e){return t.msg=n[e],e}function S(t){return(t<<1)-(4<t?9:0)}function x(t){for(var e=t.length;0<=--e;)t[e]=0}function T(t){var e=t.state,n=e.pending;0!==(n=t.avail_out<n?t.avail_out:n)&&(f.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending)&&(e.pending_out=0)}function E(t,e){h._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,T(t.strm)}function D(t,e){t.pending_buf[t.pending++]=e}function B(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function A(t,e){var n,r,i=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,h=t.w_size-v<t.strstart?t.strstart-(t.w_size-v):0,u=t.window,c=t.w_mask,f=t.prev,l=t.strstart+y,p=u[s+o-1],d=u[s+o];t.good_match<=t.prev_length&&(i>>=2),t.lookahead<a&&(a=t.lookahead);do{if(u[(n=e)+o]===d&&u[n+o-1]===p&&u[n]===u[s]&&u[++n]===u[s+1]){for(s+=2,n++;u[++s]===u[++n]&&u[++s]===u[++n]&&u[++s]===u[++n]&&u[++s]===u[++n]&&u[++s]===u[++n]&&u[++s]===u[++n]&&u[++s]===u[++n]&&u[++s]===u[++n]&&s<l;);if(r=y-(l-s),s=l-y,o<r){if(t.match_start=e,a<=(o=r))break;p=u[s+o-1],d=u[s+o]}}}while((e=f[e&c])>h&&0!=--i);return o<=t.lookahead?o:t.lookahead}function I(t){var e,n,r,i,s,o,a,h,u,c=t.w_size;do{if(h=t.window_size-t.lookahead-t.strstart,c+(c-v)<=t.strstart){for(f.arraySet(t.window,t.window,c,c,0),t.match_start-=c,t.strstart-=c,t.block_start-=c,e=n=t.hash_size;r=t.head[--e],t.head[e]=c<=r?r-c:0,--n;);for(e=n=c;r=t.prev[--e],t.prev[e]=c<=r?r-c:0,--n;);h+=c}if(0===t.strm.avail_in)break;if(o=t.window,a=t.strstart+t.lookahead,u=void 0,n=0===(u=(h=h)<(u=(s=t.strm).avail_in)?h:u)?0:(s.avail_in-=u,f.arraySet(o,s.input,s.next_in,u,a),1===s.state.wrap?s.adler=l(s.adler,o,u,a):2===s.state.wrap&&(s.adler=p(s.adler,o,u,a)),s.next_in+=u,s.total_in+=u,u),t.lookahead+=n,m<=t.lookahead+t.insert)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+m-1])&t.hash_mask,t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<m)););}while(t.lookahead<v&&0!==t.strm.avail_in)}function O(t,e){for(var n,r;;){if(t.lookahead<v){if(I(t),t.lookahead<v&&e===u)return 1;if(0===t.lookahead)break}if(n=0,m<=t.lookahead&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+m-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-v&&(t.match_length=A(t,n)),m<=t.match_length)if(r=h._tr_tally(t,t.strstart-t.match_start,t.match_length-m),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=m){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+m-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else r=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(E(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<m-1?t.strstart:m-1,4===e?(E(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(E(t,!1),0===t.strm.avail_out)?1:2}function k(t,e){for(var n,r,i;;){if(t.lookahead<v){if(I(t),t.lookahead<v&&e===u)return 1;if(0===t.lookahead)break}if(n=0,m<=t.lookahead&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+m-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=m-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-v&&(t.match_length=A(t,n),t.match_length<=5)&&(1===t.strategy||t.match_length===m&&4096<t.strstart-t.match_start)&&(t.match_length=m-1),m<=t.prev_length&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-m,r=h._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-m),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+m-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=m-1,t.strstart++,r&&(E(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((r=h._tr_tally(t,0,t.window[t.strstart-1]))&&E(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=h._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<m-1?t.strstart:m-1,4===e?(E(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(E(t,!1),0===t.strm.avail_out)?1:2}function z(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}function j(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new f.Buf16(2*M),this.dyn_dtree=new f.Buf16(2*(2*s+1)),this.bl_tree=new f.Buf16(2*(2*o+1)),x(this.dyn_ltree),x(this.dyn_dtree),x(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new f.Buf16(V+1),this.heap=new f.Buf16(2*i+1),x(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new f.Buf16(2*i+1),x(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function R(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=r,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?_:b,t.adler=2===e.wrap?0:1,e.last_flush=u,h._tr_init(e),c):w(t,d)}function P(t){var e=R(t);return e===c&&((t=t.state).window_size=2*t.w_size,x(t.head),t.max_lazy_match=a[t.level].max_lazy,t.good_match=a[t.level].good_length,t.nice_match=a[t.level].nice_length,t.max_chain_length=a[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=m-1,t.match_available=0,t.ins_h=0),e}function C(t,e,n,r,i,s){if(!t)return d;var o=1;if(-1===e&&(e=6),r<0?(o=0,r=-r):15<r&&(o=2,r-=16),i<1||9<i||n!==g||r<8||15<r||e<0||9<e||s<0||4<s)return w(t,d);8===r&&(r=9);var a=new j;return(t.state=a).strm=t,a.wrap=o,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+m-1)/m),a.window=new f.Buf8(2*a.w_size),a.head=new f.Buf16(a.hash_size),a.prev=new f.Buf16(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new f.Buf8(a.pending_buf_size),a.d_buf=+a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=e,a.strategy=s,a.method=n,P(t)}a=[new z(0,0,0,0,function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(I(t),0===t.lookahead&&e===u)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,E(t,!1),0===t.strm.avail_out))return 1;if(t.w_size-v<=t.strstart-t.block_start&&(E(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(E(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(E(t,!1),t.strm.avail_out),1)}),new z(4,4,8,4,O),new z(4,5,16,8,O),new z(4,6,32,32,O),new z(4,4,16,16,k),new z(8,16,32,32,k),new z(8,16,128,128,k),new z(8,32,128,256,k),new z(32,128,258,1024,k),new z(32,258,258,4096,k)],e.deflateInit=function(t,e){return C(t,e,g,15,8,0)},e.deflateInit2=C,e.deflateReset=P,e.deflateResetKeep=R,e.deflateSetHeader=function(t,e){return!t||!t.state||2!==t.state.wrap?d:(t.state.gzhead=e,c)},e.deflate=function(t,e){var n,r,i,s;if(!t||!t.state||5<e||e<0)return t?w(t,d):d;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return w(t,0===t.avail_out?-5:d);if(r.strm=t,n=r.last_flush,r.last_flush=e,r.status===_&&(2===r.wrap?(t.adler=0,D(r,31),D(r,139),D(r,8),r.gzhead?(D(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),D(r,255&r.gzhead.time),D(r,r.gzhead.time>>8&255),D(r,r.gzhead.time>>16&255),D(r,r.gzhead.time>>24&255),D(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),D(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(D(r,255&r.gzhead.extra.length),D(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=p(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(D(r,0),D(r,0),D(r,0),D(r,0),D(r,0),D(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),D(r,3),r.status=b)):(o=g+(r.w_bits-8<<4)<<8,o|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(o|=32),o+=31-o%31,r.status=b,B(r,o),0!==r.strstart&&(B(r,t.adler>>>16),B(r,65535&t.adler)),t.adler=1)),69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(t.adler=p(t.adler,r.pending_buf,r.pending-i,i)),T(t),i=r.pending,r.pending!==r.pending_buf_size));)D(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(t.adler=p(t.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(t.adler=p(t.adler,r.pending_buf,r.pending-i,i)),T(t),i=r.pending,r.pending===r.pending_buf_size)){s=1;break}}while(D(r,s=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0),0!==s);r.gzhead.hcrc&&r.pending>i&&(t.adler=p(t.adler,r.pending_buf,r.pending-i,i)),0===s&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(t.adler=p(t.adler,r.pending_buf,r.pending-i,i)),T(t),i=r.pending,r.pending===r.pending_buf_size)){s=1;break}}while(D(r,s=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0),0!==s);r.gzhead.hcrc&&r.pending>i&&(t.adler=p(t.adler,r.pending_buf,r.pending-i,i)),0===s&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&T(t),r.pending+2<=r.pending_buf_size&&(D(r,255&t.adler),D(r,t.adler>>8&255),t.adler=0,r.status=b)):r.status=b),0!==r.pending){if(T(t),0===t.avail_out)return r.last_flush=-1,c}else if(0===t.avail_in&&S(e)<=S(n)&&4!==e)return w(t,-5);if(666===r.status&&0!==t.avail_in)return w(t,-5);if(0!==t.avail_in||0!==r.lookahead||e!==u&&666!==r.status){var o=2===r.strategy?((t,e)=>{for(var n;;){if(0===t.lookahead&&(I(t),0===t.lookahead)){if(e===u)return 1;break}if(t.match_length=0,n=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(E(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(E(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(E(t,!1),0===t.strm.avail_out)?1:2})(r,e):3===r.strategy?((t,e)=>{for(var n,r,i,s,o=t.window;;){if(t.lookahead<=y){if(I(t),t.lookahead<=y&&e===u)return 1;if(0===t.lookahead)break}if(t.match_length=0,m<=t.lookahead&&0<t.strstart&&(r=o[i=t.strstart-1])===o[++i]&&r===o[++i]&&r===o[++i]){for(s=t.strstart+y;r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<s;);t.match_length=y-(s-i),t.lookahead<t.match_length&&(t.match_length=t.lookahead)}if(m<=t.match_length?(n=h._tr_tally(t,1,t.match_length-m),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(E(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(E(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(E(t,!1),0===t.strm.avail_out)?1:2})(r,e):a[r.level].func(r,e);if(3!==o&&4!==o||(r.status=666),1===o||3===o)return 0===t.avail_out&&(r.last_flush=-1),c;if(2===o&&(1===e?h._tr_align(r):5!==e&&(h._tr_stored_block(r,0,0,!1),3===e)&&(x(r.head),0===r.lookahead)&&(r.strstart=0,r.block_start=0,r.insert=0),T(t),0===t.avail_out))return r.last_flush=-1,c}return 4!==e||!(r.wrap<=0)&&(2===r.wrap?(D(r,255&t.adler),D(r,t.adler>>8&255),D(r,t.adler>>16&255),D(r,t.adler>>24&255),D(r,255&t.total_in),D(r,t.total_in>>8&255),D(r,t.total_in>>16&255),D(r,t.total_in>>24&255)):(B(r,t.adler>>>16),B(r,65535&t.adler)),T(t),0<r.wrap&&(r.wrap=-r.wrap),0!==r.pending)?c:1},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==_&&69!==e&&73!==e&&91!==e&&103!==e&&e!==b&&666!==e?w(t,d):(t.state=null,e===b?w(t,-3):c):d},e.deflateSetDictionary=function(t,e){var n,r,i,s,o,a,h,u=e.length;if(!t||!t.state)return d;if(2===(s=(n=t.state).wrap)||1===s&&n.status!==_||n.lookahead)return d;for(1===s&&(t.adler=l(t.adler,e,u,0)),n.wrap=0,n.w_size<=u&&(0===s&&(x(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new f.Buf8(n.w_size),f.arraySet(h,e,u-n.w_size,n.w_size,0),e=h,u=n.w_size),h=t.avail_in,o=t.next_in,a=t.input,t.avail_in=u,t.next_in=0,t.input=e,I(n);n.lookahead>=m;){for(r=n.strstart,i=n.lookahead-(m-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+m-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--i;);n.strstart=r,n.lookahead=m-1,I(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=m-1,n.match_available=0,t.next_in=o,t.input=a,t.avail_in=h,n.wrap=s,c},e.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(t,e,n){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],7:[function(t,N,e){var i=t("../utils/common");function n(t){for(var e=t.length;0<=--e;)t[e]=0}var r=16,h=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576),l=(n(f),new Array(60)),p=(n(l),new Array(512)),d=(n(p),new Array(256)),g=(n(d),new Array(29));n(g);var m,y,v,_=new Array(30);function b(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function S(t){return t<256?p[t]:p[256+(t>>>7)]}function s(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function x(t,e,n){t.bi_valid>r-n?(t.bi_buf|=e<<t.bi_valid&65535,s(t,t.bi_buf),t.bi_buf=e>>r-t.bi_valid,t.bi_valid+=n-r):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function T(t,e,n){x(t,n[2*e],n[2*e+1])}function E(t,e){for(var n=0;n|=1&t,t>>>=1,n<<=1,0<--e;);return n>>>1}function D(t,e,n){for(var r,i=new Array(16),s=0,o=1;o<=15;o++)i[o]=s=s+n[o-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=E(i[a]++,a))}}function B(t){for(var e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function A(t){8<t.bi_valid?s(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function o(t,e,n,r){var i=2*e,s=2*n;return t[i]<t[s]||t[i]===t[s]&&r[e]<=r[n]}function I(t,e,n){for(var r=t.heap[n],i=n<<1;i<=t.heap_len&&(i<t.heap_len&&o(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!o(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r}function O(t,e,n){var r,i,s,o,a=0;if(0!==t.last_lit)for(;r=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],i=t.pending_buf[t.l_buf+a],a++,0==r?T(t,i,e):(T(t,(s=d[i])+256+1,e),0!==(o=h[s])&&x(t,i-=g[s],o),T(t,s=S(--r),n),0!==(o=u[s])&&x(t,r-=_[s],o)),a<t.last_lit;);T(t,256,e)}function k(t,e){var n,r,i,s=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.has_stree,h=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=573,n=0;n<h;n++)0!==s[2*n]?(t.heap[++t.heap_len]=u=n,t.depth[n]=0):s[2*n+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=u<2?++u:0)]=1,t.depth[i]=0,t.opt_len--,a&&(t.static_len-=o[2*i+1]);for(e.max_code=u,n=t.heap_len>>1;1<=n;n--)I(t,s,n);for(i=h;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,s,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,s[2*i]=s[2*n]+s[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,s[2*n+1]=s[2*r+1]=i,t.heap[1]=i++,I(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1];for(var c,f,l,p,d,g=t,m=e.dyn_tree,y=e.max_code,v=e.stat_desc.static_tree,_=e.stat_desc.has_stree,b=e.stat_desc.extra_bits,w=e.stat_desc.extra_base,S=e.stat_desc.max_length,x=0,T=0;T<=15;T++)g.bl_count[T]=0;for(m[2*g.heap[g.heap_max]+1]=0,c=g.heap_max+1;c<573;c++)S<(T=m[2*m[2*(f=g.heap[c])+1]+1]+1)&&(T=S,x++),m[2*f+1]=T,y<f||(g.bl_count[T]++,p=0,w<=f&&(p=b[f-w]),d=m[2*f],g.opt_len+=d*(T+p),_&&(g.static_len+=d*(v[2*f+1]+p)));if(0!==x){do{for(T=S-1;0===g.bl_count[T];)T--}while(g.bl_count[T]--,g.bl_count[T+1]+=2,g.bl_count[S]--,0<(x-=2));for(T=S;0!==T;T--)for(f=g.bl_count[T];0!==f;)y<(l=g.heap[--c])||(m[2*l+1]!==T&&(g.opt_len+=(T-m[2*l+1])*m[2*l],m[2*l+1]=T),f--)}D(s,u,t.bl_count)}function z(t,e,n){var r,i,s=-1,o=e[1],a=0,h=7,u=4;for(0===o&&(h=138,u=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=e[2*(r+1)+1],++a<h&&i===o||(a<u?t.bl_tree[2*i]+=a:0!==i?(i!==s&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=i,u=(a=0)===o?(h=138,3):i===o?(h=6,3):(h=7,4))}function R(t,e,n){var r,i,s=-1,o=e[1],a=0,h=7,u=4;for(0===o&&(h=138,u=3),r=0;r<=n;r++)if(i=o,o=e[2*(r+1)+1],!(++a<h&&i===o)){if(a<u)for(;T(t,i,t.bl_tree),0!=--a;);else 0!==i?(i!==s&&(T(t,i,t.bl_tree),a--),T(t,16,t.bl_tree),x(t,a-3,2)):a<=10?(T(t,17,t.bl_tree),x(t,a-3,3)):(T(t,18,t.bl_tree),x(t,a-11,7));s=i,u=(a=0)===o?(h=138,3):i===o?(h=6,3):(h=7,4)}}n(_);var P=!1;function C(t,e,n,r){x(t,0+(r?1:0),3),r=e,e=n,A(n=t),s(n,e),s(n,~e),i.arraySet(n.pending_buf,n.window,r,e,n.pending),n.pending+=e}e._tr_init=function(t){if(!P){for(var e,n,r,i,s=new Array(16),o=r=0;o<28;o++)for(g[o]=r,e=0;e<1<<h[o];e++)d[r++]=o;for(d[r-1]=o,o=i=0;o<16;o++)for(_[o]=i,e=0;e<1<<u[o];e++)p[i++]=o;for(i>>=7;o<30;o++)for(_[o]=i<<7,e=0;e<1<<u[o]-7;e++)p[256+i++]=o;for(n=0;n<=15;n++)s[n]=0;for(e=0;e<=143;)f[2*e+1]=8,e++,s[8]++;for(;e<=255;)f[2*e+1]=9,e++,s[9]++;for(;e<=279;)f[2*e+1]=7,e++,s[7]++;for(;e<=287;)f[2*e+1]=8,e++,s[8]++;for(D(f,287,s),e=0;e<30;e++)l[2*e+1]=5,l[2*e]=E(e,5);m=new b(f,h,257,286,15),y=new b(l,u,0,30,15),v=new b(new Array(0),a,0,19,7),P=!0}t.l_desc=new w(t.dyn_ltree,m),t.d_desc=new w(t.dyn_dtree,y),t.bl_desc=new w(t.bl_tree,v),t.bi_buf=0,t.bi_valid=0,B(t)},e._tr_stored_block=C,e._tr_flush_block=function(t,e,n,r){var i,s,o,a=0;if(0<t.level?(2===t.strm.data_type&&(t.strm.data_type=(t=>{for(var e=4093624447,n=0;n<=31;n++,e>>>=1)if(1&e&&0!==t.dyn_ltree[2*n])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(n=32;n<256;n++)if(0!==t.dyn_ltree[2*n])return 1;return 0})(t)),k(t,t.l_desc),k(t,t.d_desc),a=(t=>{var e;for(z(t,t.dyn_ltree,t.l_desc.max_code),z(t,t.dyn_dtree,t.d_desc.max_code),k(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),(s=t.static_len+3+7>>>3)<=(i=t.opt_len+3+7>>>3)&&(i=s)):i=s=n+5,n+4<=i&&-1!==e)C(t,e,n,r);else if(4===t.strategy||s===i)x(t,2+(r?1:0),3),O(t,f,l);else{x(t,4+(r?1:0),3);var h=t,u=(e=t.l_desc.max_code+1,n=t.d_desc.max_code+1,a+1);for(x(h,e-257,5),x(h,n-1,5),x(h,u-4,4),o=0;o<u;o++)x(h,h.bl_tree[2*c[o]+1],3);R(h,h.dyn_ltree,e-1),R(h,h.dyn_dtree,n-1),O(t,t.dyn_ltree,t.dyn_dtree)}B(t),r&&A(t)},e._tr_tally=function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(d[n]+256+1)]++,t.dyn_dtree[2*S(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){x(t,2,3),T(t,256,f),16===(t=t).bi_valid?(s(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":1}],8:[function(t,e,n){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,n){var o=t("./zlib/deflate"),a=t("./utils/common"),h=t("./utils/strings"),r=t("./zlib/messages"),i=t("./zlib/zstream"),u=Object.prototype.toString;function s(t){if(!(this instanceof s))return new s(t);this.options=a.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var t=this.options,e=(t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0,o.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy));if(0!==e)throw new Error(r[e]);if(t.header&&o.deflateSetHeader(this.strm,t.header),t.dictionary){t="string"==typeof t.dictionary?h.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary;if(0!==(e=o.deflateSetDictionary(this.strm,t)))throw new Error(r[e]);this._dict_set=!0}}function c(t,e){e=new s(e);if(e.push(t,!0),e.err)throw e.msg||r[e.err];return e.result}s.prototype.push=function(t,e){var n,r,i=this.strm,s=this.options.chunkSize;if(this.ended)return!1;r=e===~~e?e:!0===e?4:0,"string"==typeof t?i.input=h.string2buf(t):"[object ArrayBuffer]"===u.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new a.Buf8(s),i.next_out=0,i.avail_out=s),1!==(n=o.deflate(i,r))&&0!==n)return this.onEnd(n),!(this.ended=!0)}while(0!==i.avail_out&&(0!==i.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(h.buf2binstring(a.shrinkBuf(i.output,i.next_out))):this.onData(a.shrinkBuf(i.output,i.next_out))),(0<i.avail_in||0===i.avail_out)&&1!==n);return 4===r?(n=o.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==r||(this.onEnd(0),!(i.avail_out=0))},s.prototype.onData=function(t){this.chunks.push(t)},s.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},n.Deflate=s,n.deflate=c,n.deflateRaw=function(t,e){return(e=e||{}).raw=!0,c(t,e)},n.gzip=function(t,e){return(e=e||{}).gzip=!0,c(t,e)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js"),O.exports);function Ce(t,e){var n=new Ot;return n.setPublicKey(e),n.encryptLong(t)}function Ne(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Ze&&Ze in Object(t)?We(t):Ke.call(t)}function Me(t){return"symbol"==(void 0===t?"undefined":d(t))||null!=(e=t)&&"object"==(void 0===e?"undefined":d(e))&&"[object Symbol]"==Ge(t);var e}function Ve(t,e){return e=e,t=null==(t=t)?void 0:t[e],!an(e=t)||on(e)||!(sn(e)?cn:un).test(hn(e))?void 0:t}function je(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function He(t){var e,n=this.__data__;return ln?"__lodash_hash_undefined__"===(e=n[t])?void 0:e:pn.call(n,t)?n[t]:void 0}var qe={appId:"default",channel:"",organization:"",apiHost:"fp-it.fengkongcloud.com",apiPath:"/deviceprofile/v4",apiProtocol:"https",publicKey:""},i=Array.isArray,O="object"==(void 0===t?"undefined":d(t))&&t&&t.Object===Object&&t,t="object"==("undefined"==typeof self?"undefined":d(self))&&self&&self.Object===Object&&self,O=O||t||Function("return this")(),t=O.Symbol,k=Object.prototype,Le=k.hasOwnProperty,Fe=k.toString,Ue=t?t.toStringTag:void 0,Ke=Object.prototype.toString,We=function(t){var e=Le.call(t,Ue),n=t[Ue];try{var r=!(t[Ue]=void 0)}catch(t){}var i=Fe.call(t);return r&&(e?t[Ue]=n:delete t[Ue]),i},Ze=t?t.toStringTag:void 0,Ge=Ne,$e=i,Je=Me,Ye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xe=/^\w*$/,Qe=function(t){var e=void 0===t?"undefined":d(t);return null!=t&&("object"==e||"function"==e)},tn=Ne,en=Qe,k=O["__core-js_shared__"],nn=(k=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",rn=Function.prototype.toString,sn=function(t){return!!en(t)&&("[object Function]"==(t=tn(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)},on=function(t){return!!nn&&nn in t},an=Qe,hn=function(t){if(null!=t){try{return rn.call(t)}catch(t){}try{return t+""}catch(t){}}return""},un=/^\[object .+?Constructor\]$/,k=Object.prototype,z=Function.prototype.toString,k=k.hasOwnProperty,cn=RegExp("^"+z.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),z=Ve(Object,"create"),fn=z,ln=z,pn=Object.prototype.hasOwnProperty,dn=z,gn=Object.prototype.hasOwnProperty,mn=z;function yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}yn.prototype.clear=function(){this.__data__=fn?fn(null):{},this.size=0},yn.prototype.delete=je,yn.prototype.get=He,yn.prototype.has=function(t){var e=this.__data__;return dn?void 0!==e[t]:gn.call(e,t)},yn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=mn&&void 0===e?"__lodash_hash_undefined__":e,this};function vn(t,e){for(var n,r,i=t.length;i--;)if((n=t[i][0])===(r=e)||n!=n&&r!=r)return i;return-1}var k=yn,_n=vn,bn=Array.prototype.splice,wn=vn,Sn=vn,xn=vn;function Tn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(t){var e=this.__data__,t=_n(e,t);return!(t<0||(t==e.length-1?e.pop():bn.call(e,t,1),--this.size,0))},Tn.prototype.get=function(t){var e=this.__data__,t=wn(e,t);return t<0?void 0:e[t][1]},Tn.prototype.has=function(t){return-1<Sn(this.__data__,t)},Tn.prototype.set=function(t,e){var n=this.__data__,r=xn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function En(t,e){var n,r,t=t.__data__;return("string"==(r=void 0===(n=e)?"undefined":d(n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?t["string"==typeof e?"string":"hash"]:t.map}var z=Tn,O=Ve(O,"Map"),Dn=k,Bn=z,An=O,In=En,On=En,kn=En,zn=En;function Rn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(An||Bn),string:new Dn}},Rn.prototype.delete=function(t){t=In(this,t).delete(t);return this.size-=t?1:0,t},Rn.prototype.get=function(t){return On(this,t).get(t)},Rn.prototype.has=function(t){return kn(this,t).has(t)},Rn.prototype.set=function(t,e){var n=zn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Pn=Rn;function Cn(r,i){if("function"!=typeof r||null!=i&&"function"!=typeof i)throw new TypeError("Expected a function");function s(){var t=arguments,e=i?i.apply(this,t):t[0],n=s.cache;return n.has(e)?n.get(e):(t=r.apply(this,t),s.cache=n.set(e,t)||n,t)}return s.cache=new(Cn.Cache||Pn),s}Cn.Cache=Pn;var Nn,Mn,Vn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jn=/\\(\\)?/g,z=(Nn=(k=Cn(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(Vn,function(t,e,n,r){i.push(n?r.replace(jn,"$1"):e||t)}),i},function(t){return 500===Nn.size&&Nn.clear(),t})).cache,k),Hn=i,qn=Me,O=t?t.prototype:void 0,Ln=O?O.toString:void 0,Fn=function t(e){var n;return"string"==typeof e?e:Hn(e)?((t,e)=>{for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i})(e,t)+"":qn(e)?Ln?Ln.call(e):"":"0"==(n=e+"")&&1/e==-1/0?"-0":n},Un=i,Kn=function(t,e){var n;return!$e(t)&&(!("number"!=(n=void 0===t?"undefined":d(t))&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Je(t))||Xe.test(t)||!Ye.test(t)||null!=e&&t in Object(e))},Wn=z,Zn=function(t){return null==t?"":Fn(t)},Gn=Me,$n=function(t,e){return Un(t)?t:Kn(t,e)?[t]:Wn(Zn(t))},Jn=function(t){var e;return"string"==typeof t||Gn(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e},Yn=function(t,e){for(var n=0,r=(e=$n(e,t)).length;null!=t&&n<r;)t=t[Jn(e[n++])];return n&&n==r?t:void 0},Xn=function(t,e,n){t=null==t?void 0:Yn(t,e);return void 0===t?n:t},t=((k=Mn=Mn||{}).wx="wx",k.qq="qq",k.tt="tt",k.my="my",k.taobao="taobao","wx"),R={isWx:t===Mn.wx,isQq:t===Mn.qq,isTt:t===Mn.tt,isAli:t===Mn.my,isTaobao:t===Mn.taobao},P=wx,Qn={exports:{}},C=(i=(O=Qn).exports,z=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function h(t){this.message=t}return(h.prototype=new Error).name="InvalidCharacterError",{btoa:function(t){for(var e,n,r=String(t),i=0,s=a,o="";r.charAt(0|i)||(s="=",i%1);o+=s.charAt(63&e>>8-i%1*8)){if(255<(n=r.charCodeAt(i+=.75)))throw new h("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return o},atob:function(t){var e=String(t).replace(/[=]+$/,"");if(e.length%4==1)throw new h("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,s=0,o="";r=e.charAt(s++);~r&&(n=i%4?64*n+r:r,i++%4)&&(o+=String.fromCharCode(255&n>>(-2*i&6))))r=a.indexOf(r);return o}}},null!=i&&"number"!=typeof i.nodeType?O.exports=z():(z=z(),"function"!=typeof(i="undefined"!=typeof self?self:$.global).btoa&&(i.btoa=z.btoa),"function"!=typeof i.atob&&(i.atob=z.atob)),tr.prototype.getSmInfo=function(t){return this.smInfo[t]},tr.prototype.setSmInfo=function(t,e){this.smInfo[t]=e},tr.prototype.getUserAuthInfo=function(t){return this.userAuthInfo[t]},tr.prototype.setUserAuthInfo=function(t,e){this.userAuthInfo[t]=e},new tr);function tr(){this.smInfo={storageName:"",SMID:"",smData:"",smEncryptedData:"",priId:"",ep:"",uid:"",retryCnt:0,isNeedStop:!1,smAesData:""},this.userAuthInfo={openId:"",unionId:""},this.smFpParams={}}function er(){var t=[new Promise(function(n){var r={screenBright:-1};try{P.getScreenBrightness({success:function(t){try{var e=R.isAli||R.isTaobao?t.brightness:t.value;n({screenBright:e})}catch(t){n(r)}},fail:function(){n(r)}})}catch(t){n(r)}}),new Promise(function(e){var n={networkType:"",signalStrength:0,hasSystemProxy:!1};try{P.getNetworkType({success:function(t){try{t.networkType&&(n.networkType=t.networkType),t.signalStrength&&(n.signalStrength=t.signalStrength),t.hasSystemProxy&&(n.hasSystemProxy=t.hasSystemProxy),e(n)}catch(t){e(n)}},fail:function(){e(n)}})}catch(t){e(n)}}),(()=>{try{return P.getSystemInfoSync()}catch(t){return{}}})()];return(R.isWx||R.isTt)&&t.push(new Promise(function(e){var n={connectedWifi:{}};try{R.isWx?P.startWifi({success:function(){P.getConnectedWifi({complete:function(t){try{e(t.wifi?{connectedWifi:t.wifi}:n)}catch(t){e(n)}}})},fail:function(){e(n)}}):R.isTt&&P.getConnectedWifi({complete:function(t){try{e(t?{connectedWifi:t}:n)}catch(t){e(n)}}})}catch(t){e(n)}})),R.isQq||(R.isTt||t.push(new Promise(function(t){try{var e=P.createOffscreenCanvas({type:"2d",width:200,height:200}).getContext("2d"),n="http://www.ishumei.com",r=(e.font="24px 'Arial'",e.fillStyle="#e88",e.fillRect(120,1,60,22),e.fillStyle="#f99",e.fillText(n,2,15),e.fillStyle="rgba(120, 180, 0, 0.7)",e.fillText(n,4,17),e.canvas.toDataURL().replace("data:image/png;base64,",""));t({canvas:(t=>{for(var e,n="",r=0,i=(t+="").length;r<i;r++)n+=(e=t.charCodeAt(r).toString(16)).length<2?"0"+e:e;return n})(Qn.exports.atob(r).slice(-16,-12))})}catch(e){t({canvas:""})}})),R.isTaobao||t.push(new Promise(function(t){try{var e=R.isAli||R.isTaobao?"getDeviceBaseInfo":"getDeviceInfo",n=(R.isTt&&(e="getDeviceInfoSync"),P[e]());n.model&&delete n.model,t(n)}catch(e){t({})}})),R.isTt)||t.push(new Promise(function(e){try{var t=R.isAli||R.isTaobao?"checkIsSupportIfaaAuthentication":"checkIsSupportSoterAuthentication";P[t]({success:function(t){t=t.supportMode;e({fingerPrintSupport:t.includes("fingerPrint")?"1":"0",facialSupport:t.includes("facial")?"1":"0"})},fail:function(t){e({fingerPrintSupport:"-1",facialSupport:"-1"})}})}catch(t){e({fingerPrintSupport:"-1",facialSupport:"-1"})}})),R.isWx&&(!1!==Xn(C.smConf,"authConf.nfc",!0)&&t.push(new Promise(function(e){try{var t=P.getNFCAdapter();t.startDiscovery({success:function(){e({nfc:"1"}),t.stopDiscovery()},fail:function(t){e({nfc:"0",nfcErrorMsg:t.errMsg})}})}catch(t){e({nfc:"-1"})}})),t.push(new Promise(function(e){var n={HCE:"0"};try{P.getHCEState({success:function(){try{e({HCE:"1"})}catch(t){e(n)}},fail:function(){e(n)}})}catch(t){e(n)}})),t.push(new Promise(function(e){var n={wifiip:{localip:"",errMsg:"",netmask:""}};try{P.getLocalIPAddress({success:function(t){try{t.errMsg&&(n.wifiip.errMsg=t.errMsg),t.netmask&&(n.wifiip.netmask=t.netmask),t.localip&&(n.wifiip.localip=t.localip),e(n)}catch(t){e(n)}},fail:function(t){t.errMsg&&(n.wifiip.errMsg=t.errMsg),e(n)}})}catch(t){e(n)}})),t.push((()=>{try{return{accountInfo:P.getAccountInfoSync()}}catch(t){return{}}})()),t.push(new Promise(function(e){var t={userAgent:""};P.getRendererUserAgent().then(function(t){e({userAgent:t})}).catch(function(){e(t)}),setTimeout(function(){return e({userAgent:"userAgent获取超时"})},3e3)})),t.push(new Promise(function(e){try{e({performance:P.getPerformance()})}catch(t){e({performance:{}})}})),t.push(new Promise(function(e){try{var n={};P.getBatteryInfo({success:function(t){try{e({batteryInfo:t})}catch(t){e(n)}},fail:function(){e(n)}})}catch(n){e({batteryInfo:{}})}})),t.push(new Promise(function(e){try{var n={};P.getSetting({success:function(t){try{e({setting:t})}catch(t){e(n)}},fail:function(){e(n)}})}catch(n){e({setting:{}})}})),t.push(new Promise(function(e){try{var n={};P.getAvailableAudioSources({success:function(t){try{e({availableAudioSources:t})}catch(t){e(n)}},fail:function(){e(n)}})}catch(n){e({availableAudioSources:{}})}}))),t.push({t:(new Date).getTime()}),Promise.all(t)}var nr=function(){return(nr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function rr(t,e,n,r){try{var i={url:t,data:e,method:"POST",responseType:"text",success:n,fail:r};try{P.request({url:i.url,data:JSON.stringify(i.data),header:i.header,method:i.method||"POST",responseType:i.responseType||"json",success:i.success||function(){},fail:i.fail||function(){}})}catch(t){i.fail()}}catch(t){}}var ir="3.0.0",sr="1.0.0";function or(t,e){try{P.setStorage({key:t,data:e})}catch(t){}}function ar(t){try{return R.isAli||R.isTaobao?P.getStorageSync({key:t}).data:P.getStorageSync(t)}catch(t){}}function hr(t,e){try{P.getFileSystemManager().writeFile({filePath:"".concat(P.env.USER_DATA_PATH,"/").concat(t,".txt"),data:e,encoding:"utf8",success:function(){},fail:function(){}})}catch(t){}}function ur(t){try{var e="".concat(P.env.USER_DATA_PATH,"/").concat(t,".txt"),n=P.getFileSystemManager().readFileSync(e,"utf8");return R.isAli||R.isTaobao?n.data:n}catch(t){}}function cr(t){C.setSmInfo("SMID",t);var e=C.smInfo.storageName;or(e,t),hr(e,t)}function fr(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function lr(t){return Ht(function e(n){var r;return Qe(n)?(r="",Object.keys(n).sort().forEach(function(t){r+=e(n[t])}),r):n?n.toString().replace(/,/g,""):""}(t))}function pr(){var t,e=ar("smidV2")||ur("SMFP");return e||(or("smidV2",t=(e=(e=new Date).getFullYear().toString()+((t=(e.getMonth()+1).toString())<=9?"0"+t:t)+((t=e.getDate().toString())<=9?"0"+t:t)+((t=e.getHours().toString())<=9?"0"+t:t)+((t=e.getMinutes().toString())<=9?"0"+t:t)+((t=e.getSeconds().toString())<=9?"0"+t:t)+Ht(fr())+"00")+Ht("smsk_weapp_"+e).substr(0,14)+0),hr("SMFP",t),t)}var dr={timer:null,timeStamp:0},gr=+new Date,mr=+new Date+"-"+Math.floor(1e8*Math.random());function yr(t){var e=C.smConf,e=e.apiProtocol+"://"+e.apiHost+e.apiPath,t=vr(t),n=t.errObj;C.setSmInfo("smEncryptedData",t.encrypedData),rr(e,n)}function vr(t){var e=C.smConf,n=e.appId,e=e.organization,r=C.smInfo,i=r.SMID,r=r.ep,i={appId:n,organization:e,os:"weapp",version:ir,sdkVer:sr,rtype:"exception",smid:pr(),box:i,gBox:"",tn:"",e:t},t={appId:n,organization:e,ep:r,data:ze(JSON.stringify(i)),os:"weapp",encode:1,compress:0};return{errObj:t,encrypedData:ze(JSON.stringify(t))}}function _r(t){var e=C.smConf,e=e.apiProtocol+"://"+e.apiHost+e.apiPath,t=Sr(t);C.setSmInfo("smEncryptedData",ze(JSON.stringify(t))),rr(e,t,br,br)}function br(t){var e;1100===Xn(t,"data.code")?(clearTimeout(dr.timer),C.setSmInfo("retryCnt",0),cr(Xn(t,"data.detail.deviceId",""))):(12<(e=C.getSmInfo("retryCnt"))?dr.timeStamp=3e4:9<e?dr.timeStamp=15e3:6<e?dr.timeStamp=5e3:3<e&&(dr.timeStamp=2e3),dr.timer=setTimeout(function(){e++,C.setSmInfo("retryCnt",e),1902===Xn(t,"data.code")&&e<4?er().then(function(t){t=wr(t);C.smInfo.isNeedStop||_r(t)}):_r()},dr.timeStamp))}function wr(t){for(var e=C.smConf,n=e.appId,r=e.organization,e=e.channel,i=C.smInfo,s=i.SMID,i=i.priId,o=+new Date-gr,a={},h=0;h<t.length;h++)Object.assign(a,t[h]);var u,c,f,l=C.getUserAuthInfo("openId"),p=C.getUserAuthInfo("unionId");Object.assign(a,nr({organization:r,appId:n,os:"weapp",version:ir,sdkVer:sr,rtype:"all",smid:pr(),gBox:"",box:s,res:"".concat(a.screenWidth,"_").concat(a.screenHeight),channel:e,time:o,sessionId:mr,subVersion:sr,weAppVerion:a.version,launchOptions:(()=>{try{return P.getLaunchOptionsSync()}catch(t){return{}}})()},R.isWx?{openId:l,unionId:p}:{})),Object.assign(a,{tn:lr(a)}),C.setSmInfo("smData",a);try{a=ze(a=(t=>(t=JSON.stringify(t),Pe.gzip(t,{to:"string"})))(a))}catch(t){return yr("gzip_failed"),void C.setSmInfo("isNeedStop",!0)}try{u=a,c=i,b.pad.ZeroPadding={pad:function(t,e){e*=4;t.clamp(),t.sigBytes+=e-(t.sigBytes%e||e)},unpad:function(t){for(var e=t.words,n=t.sigBytes-1;!(e[n>>>2]>>>24-n%4*8&255);)n--;t.sigBytes=n+1}},f=b.enc.Utf8.parse("0102030405060708"),c=b.enc.Utf8.parse(c),u="object"==(void 0===u?"undefined":d(u))?JSON.stringify(u):u,a=b.AES.encrypt(u,c,{iv:f,mode:b.mode.CBC,padding:b.pad.ZeroPadding}).ciphertext.toString(),C.setSmInfo("smAesData",a)}catch(t){return yr("aes_failed"),void C.setSmInfo("isNeedStop",!0)}return a}function Sr(t){var e=C.smConf,n=e.appId,r=C.smInfo,i=r.ep;return nr({appId:n,organization:e.organization,ep:i,data:t||r.smAesData,os:"weapp",encode:6,compress:2},R.isWx?{tn:(()=>{var t=C.smConf,e=t.appId,n=t.organization,r=t.publicKey,i=(s=C.smInfo).ep,s=s.smData;if(""===e||""===i||""===n||""===JSON.stringify(s))return"OUTTER_TN_IN_EMPTY";s=JSON.stringify(s)+i+n+e+"sm_tn";try{return ze(Ce(Ht(s),r))}catch(t){return"OUTTER_TN_RSA_FAILED"}})()}:{})}N.exports={initConf:function(t){var e=t,n=(C.smConf=Object.assign({},qe,e),e||(yr("config_empty"),C.setSmInfo("isNeedStop",!0)),(t=C.smConf).publicKey),t=t.organization,r=(""===n&&(yr("publicKey_empty"),C.setSmInfo("isNeedStop",!0)),""===t&&(yr("organization_empty"),C.setSmInfo("isNeedStop",!0)),fr()),i=(C.setSmInfo("uid",r),Ht(r).slice(0,16)),t=".thumbcache_".concat(Ht(t));C.setSmInfo("priId",i),C.setSmInfo("storageName",t);try{var s=Ce(r,n);C.setSmInfo("ep",s)}catch(e){yr("rsa_failed"),C.setSmInfo("isNeedStop",!0)}t=(i=C.getSmInfo("SMID"))||ar(i=C.smInfo.storageName)||ur(i);t&&cr(t),er().then(function(t){t&&t.length&&(t[t.length-1].collectCost=(new Date).getTime()-t[t.length-1].t);var e,t=wr(t);C.smInfo.isNeedStop||(R.isTaobao?(e=Sr(t),C.smFpParams=JSON.stringify(e),e=ze(C.smFpParams),C.setSmInfo("smEncryptedData",e)):_r(t))})},getDeviceId:function(){return new Promise(function(e){function n(){var t;return(t=(t=C.getSmInfo("SMID"))?"B"+t:(t=C.getSmInfo("smEncryptedData"))?"D"+t:"")&&(e(t),t)}n()||(er().then(function(t){n()||(t&&t.length&&(t[t.length-1].collectCost=(new Date).getTime()-t[t.length-1].t),t=Sr(wr(t)),t=ze(JSON.stringify(t)),C.setSmInfo("smEncryptedData",t),e("D"+t))}),setTimeout(function(){var t=vr("getDeviceId_timeout").encrypedData;e("D"+t)},1500))})},getDeviceParams:function(){return new Promise(function(e){var t=C.smFpParams;t.os&&e(t),er().then(function(t){t&&t.length&&(t[t.length-1].collectCost=(new Date).getTime()-t[t.length-1].t);t=Sr(wr(t));e(JSON.stringify(t))})})},setDeviceIdInTaobao:function(t){cr(t=void 0===t?"":t)},setOpenId:function(t){C.setUserAuthInfo("openId",t=void 0===t?"":t)},setUnionId:function(t){C.setUserAuthInfo("unionId",t=void 0===t?"":t)}}}]);
|