lite-pos-wx-plugin-mate 1.3.2 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -123
- 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 +3 -1
- package/package.json +63 -30
- package/miniprogram_dist/components/loading/loading.js +0 -2
- package/miniprogram_dist/components/loading/loading.json +0 -3
- package/miniprogram_dist/components/loading/loading.wxml +0 -1
- package/miniprogram_dist/components/loading/loading.wxss +0 -1
- package/miniprogram_dist/components/wx-b2b-auth-bridge/index.js +0 -16
- package/miniprogram_dist/components/wx-b2b-auth-bridge/index.json +0 -7
- package/miniprogram_dist/components/wx-b2b-auth-bridge/index.wxml +0 -1
- package/miniprogram_dist/components/wx-b2b-auth-bridge/index.wxss +0 -1
package/README.md
CHANGED
|
@@ -1,124 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# lite-pos-wx-plugin-mate 轻POS收银台
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## 安装步骤
|
|
6
|
-
|
|
7
|
-
### 1. 初始化项目
|
|
8
|
-
|
|
9
|
-
如果项目中还没有 `package.json` 文件,需要先初始化:
|
|
10
|
-
|
|
11
|
-
在项目终端输入:
|
|
12
|
-
```bash
|
|
13
|
-
npm init
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
按提示填写相关信息,生成 `package.json` 文件。
|
|
17
|
-
|
|
18
|
-
### 2. 安装依赖
|
|
19
|
-
|
|
20
|
-
安装轻pos插件所需的 npm 包:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm install lite-pos-wx-plugin-mate
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
安装完成后,确保自己项目目录中存在 `node_modules` 文件夹。如果没有的话,重启微信开发工具。
|
|
27
|
-
|
|
28
|
-
### 3. 构建 npm 包
|
|
29
|
-
|
|
30
|
-
将安装的包构建到小程序可用的目录:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
# 在微信开发者工具中点击 "工具" -> "构建 npm"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
构建完成后,确保项目目录中存在 `miniprogram_npm` 文件夹。
|
|
37
|
-
|
|
38
|
-
## 使用说明
|
|
39
|
-
|
|
40
|
-
### 1. 配置轻pos插件
|
|
41
|
-
|
|
42
|
-
在项目的 `app.json` 中声明需要使用的插件:
|
|
43
|
-
|
|
44
|
-
```json
|
|
45
|
-
{
|
|
46
|
-
"plugins": {
|
|
47
|
-
"lite-pos-plugin": {
|
|
48
|
-
"version": "x.x.x",
|
|
49
|
-
"provider": "xxxxxx",
|
|
50
|
-
"export": "miniprogram_npm/lite-pos-wx-plugin-mate/utils.js"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### 2. B2B 支付配置
|
|
57
|
-
|
|
58
|
-
#### 2.1 版本要求
|
|
59
|
-
确保使用的版本包为指定版本>=1.3.0
|
|
60
|
-
|
|
61
|
-
#### 2.2 添加微信认证插件
|
|
62
|
-
在 `app.json` 中添加微信认证插件配置:
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{
|
|
66
|
-
"plugins": {
|
|
67
|
-
"wx-auth-plugin": {
|
|
68
|
-
"version": "latest",
|
|
69
|
-
"provider": "wx69b7451feb427f0e"
|
|
70
|
-
},
|
|
71
|
-
"lite-pos-plugin": {
|
|
72
|
-
"version": "x.x.x",
|
|
73
|
-
"provider": "xxxxxx",
|
|
74
|
-
"export": "miniprogram_npm/lite-pos-wx-plugin-mate/utils.js"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
#### 2.3 创建微信认证页面
|
|
81
|
-
|
|
82
|
-
1. 创建页面文件,例如:`/pages/wxAuth/wxAuth`
|
|
83
|
-
|
|
84
|
-
2. 页面的JSON:
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"usingComponents": {
|
|
88
|
-
"wxb2b-authBridge": "/miniprogram_npm/lite-pos-wx-plugin-mate/components/wx-b2b-auth-bridge/index"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
3. 页面 WXML 中使用组件:
|
|
94
|
-
```html
|
|
95
|
-
<wxb2b-authBridge></wxb2b-authBridge>
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
#### 2.4 跳转收银台需新增参数
|
|
99
|
-
|
|
100
|
-
在跳转到收银台时,需要新增 wxauth_url参数、b2b_pay_key参数:
|
|
101
|
-
|
|
102
|
-
```javascript
|
|
103
|
-
wx.navigateTo({
|
|
104
|
-
url: `plugin://lite-pos-plugin/cashierV2?token=${token}&appid=${appid}&openid=${openid}&wxauth_url=${encodeURIComponent("/pages/wxAuth/wxAuth")}&b2b_pay_key=${b2bPayKey}`
|
|
105
|
-
})
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
##### 跳转参数说明
|
|
109
|
-
|
|
110
|
-
| 参数名 | 必填 | 说明 |
|
|
111
|
-
|--------|------|------|
|
|
112
|
-
| wxauth_url | 是 | 2.3 中创建的页面的 path |
|
|
113
|
-
| b2b_pay_key | 是 | base64 编码后的微信小程序的 session_key,具体技术询问收钱吧技术支持 |
|
|
114
|
-
|
|
115
|
-
## 注意事项
|
|
116
|
-
|
|
117
|
-
1. 确保已正确安装和构建 npm 包
|
|
118
|
-
2. 检查插件版本号是否正确
|
|
119
|
-
3. 确保页面路径配置正确
|
|
120
|
-
4. 注意参数传递的完整性
|
|
121
|
-
|
|
122
|
-
## 许可证
|
|
123
|
-
|
|
124
|
-
MIT
|
|
3
|
+
#### *使用方式请参阅插件说明文档
|
|
4
|
+
https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wx7903bb295ac26ac7&token=402384240&lang=zh_CN
|
|
@@ -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>
|
|
@@ -1 +1,3 @@
|
|
|
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(P,M,V){
|
|
2
|
+
/*! 数美-fp-wx */
|
|
3
|
+
var j=function(){return(j=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 U(t,o,a,h){return new(a=a||Promise)(function(n,e){function r(t){try{s(h.next(t))}catch(t){e(t)}}function i(t){try{s(h.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(r,i)}s((h=h.apply(t,o||[])).next())})}function L(r,i){var s,o,a,h={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function t(n){return function(t){var e=[n,t];if(s)throw new TypeError("Generator is already executing.");for(;h=u&&e[u=0]?0:h;)try{if(s=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return h.label++,{value:e[1],done:!1};case 5:h.label++,o=e[1],e=[0];continue;case 7:e=h.ops.pop(),h.trys.pop();continue;default:if(!((a=0<(a=h.trys).length&&a[a.length-1])||6!==e[0]&&2!==e[0])){h=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))h.label=e[1];else if(6===e[0]&&h.label<a[1])h.label=a[1],a=e;else{if(!(a&&h.label<a[2])){a[2]&&h.ops.pop(),h.trys.pop();continue}h.label=a[2],h.ops.push(e)}}e=i.call(r,h)}catch(t){e=[6,t],o=0}finally{s=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}}function q(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function H(t,e){return t&e}function F(t,e){return t|e}function K(t,e){return t^e}function W(t,e){return t&~e}var G,Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function X(t){for(var e,n="",r=0;r+3<=t.length;r+=3)e=parseInt(t.substring(r,r+3),16),n+=Z.charAt(e>>6)+Z.charAt(63&e);for(r+1==t.length?(e=parseInt(t.substring(r,r+1),16),n+=Z.charAt(e<<2)):r+2==t.length&&(e=parseInt(t.substring(r,r+2),16),n+=Z.charAt(e>>2)+Z.charAt((3&e)<<4));0<(3&n.length);)n+="=";return n}function J(t){for(var e="",n=0,r=0,i=0;i<t.length&&"="!=t.charAt(i);++i){var s=Z.indexOf(t.charAt(i));s<0||(n=0==n?(e+=q(s>>2),r=3&s,1):1==n?(e+=q(r<<2|s>>4),r=15&s,2):2==n?(e=(e+=q(r))+q(s>>2),r=3&s,3):(e=(e+=q(r<<2|s>>4))+q(15&s),0))}return 1==n&&(e+=q(r<<2)),e}var Y,Q={decode:function(t){if(void 0===Y){for(Y=Object.create(null),i=0;i<64;++i)Y["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i)]=i;for(Y["-"]=62,Y._=63,i=0;i<9;++i)Y["= \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=Y[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=Q.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 Q.decode(t)}},tt=1e13,et=(it.prototype.mulAdd=function(t,e){for(var n,r=this.buf,i=r.length,s=0;s<i;++s)(n=r[s]*t+e)<tt?e=0:n-=(e=0|n/tt)*tt,r[s]=n;0<e&&(r[s]=e)},it.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+=tt,1):0,n[i]=e;for(;0===n[n.length-1];)n.pop()},it.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+=(tt+e[r]).toString().substring(1);return n},it.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;0<=n;--n)e=e*tt+t[n];return e},it.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},it),nt=/^(\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)?)?$/,rt=/^(\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 it(t){this.buf=[+t||0]}function st(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?nt:rt).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 et(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+st(s,n)}return i+s},n.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return st(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 et,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 et?(i.sub(80),"2."+i.toString()):(a=i<80?i<40?0:1:2)+"."+(i-40*a):r+="."+i.toString(),r.length>n)return st(r,n);i=new et,s=0}}return 0<s&&(r+=".incomplete"),r};var ot=n,at=(u.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()}},u.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 st(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return st(this.stream.parseStringISO(e,e+n),t);case 30:return st(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}}return null},u.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},u.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},u.prototype.posStart=function(){return this.stream.pos},u.prototype.posContent=function(){return this.stream.pos+this.header},u.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},u.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},u.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},u.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},u.decode=function(t){function e(){var t=[];if(null!==i){for(var e=s+i;r.pos<e;)t[t.length]=u.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=u.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 ot?t:new ot(t,0),t=new ot(r),n=new ht(r),i=u.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 u(t,o,i,n,a)},u),ht=(vt.prototype.isUniversal=function(){return 0===this.tagClass},vt.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},vt),h=[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],ut=(1<<26)/h[h.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=q(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+=q(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)+xt(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()?lt:ft)(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,H,e),e},y.prototype.or=function(t){var e=v();return this.bitwiseTo(t,F,e),e},y.prototype.xor=function(t){var e=v();return this.bitwiseTo(t,K,e),e},y.prototype.andNot=function(t){var e=v();return this.bitwiseTo(t,W,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,F)},y.prototype.clearBit=function(t){return this.changeBit(t,W)},y.prototype.flipBit=function(t){return this.changeBit(t,K)},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=wt(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?lt:e.isEven()?dt:ft)(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 l,f,d=t.t-1,p=!0,g=v(),n=xt(t[d])-1;0<=d;){for(h<=n?l=t[d]>>n-h&u:(l=(t[d]&(1<<n+1)-1)<<h-n,0<d&&(l|=t[d-1]>>this.DB+n-h)),a=i;0==(1&l);)l>>=1,--a;if((n-=a)<0&&(n+=this.DB,--d),p)o[l].copyTo(r),p=!1;else{for(;1<a;)s.sqrTo(r,g),s.sqrTo(g,r),a-=2;0<a?s.sqrTo(r,g):(f=r,r=g,g=f),s.mulTo(g,o[l],r)}for(;0<=d&&0==(t[d]&1<<n);)s.sqrTo(r,g),f=r,r=g,g=f,--n<0&&(n=this.DB-1,--d)}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=wt(1),s=wt(0),o=wt(0),a=wt(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 ct)},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]<=h[h.length-1]){for(e=0;e<h.length;++e)if(n[0]==h[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<h.length;){for(var r=h[e],i=e+1;i<h.length&&r<ut;)r*=h[i++];for(r=n.modInt(r);e<i;)if(r%h[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]:St(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-xt(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,l=(1<<this.F1)/r,f=1<<this.F2,d=n.t,p=d-h,g=null==e?v():e;for(s.dlShiftTo(p,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<=--p;){var m=n[--d]==u?this.DM:Math.floor(n[d]*c+(n[d-1]+f)*l);if((n[d]+=s.am(0,m,n,p,0,h))<m)for(s.dlShiftTo(p,g),n.subTo(g,n);n[d]<--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=xt(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=wt(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=St(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),F,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)>h.length&&(t=h.length);for(var i=v(),s=0;s<t;++s){i.fromInt(h[Math.floor(Math.random()*h.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,r=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone(),s=(r.compareTo(i)<0&&(t=r,r=i,i=t),r.getLowestSetBit()),o=i.getLowestSetBit();o<0?e(r):(0<(o=s<o?s:o)&&(r.rShiftTo(o,r),i.rShiftTo(o,i)),n=function(){0<(s=r.getLowestSetBit())&&r.rShiftTo(s,r),0<(s=i.getLowestSetBit())&&i.rShiftTo(s,i),0<=r.compareTo(i)?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),0<r.signum()?setTimeout(n,0):(0<o&&i.lShiftTo(o,i),setTimeout(function(){e(i)},0))},setTimeout(n,10))},y.prototype.fromNumberAsync=function(t,e,n,r){var i,s,o;"number"==typeof e?t<2?this.fromInt(1):(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(y.ONE.shiftLeft(t-1),F,this),this.isEven()&&this.dAddOffset(1,0),i=this,s=function(){i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(y.ONE.shiftLeft(t-1),i),i.isProbablePrime(e)?setTimeout(function(){r()},0):setTimeout(s,0)},setTimeout(s,0)):(n=7&t,(o=[]).length=1+(t>>3),e.nextBytes(o),0<n?o[0]&=(1<<n)-1:o[0]=0,this.fromString(o,256))},y),ct=(yt.prototype.convert=function(t){return t},yt.prototype.revert=function(t){return t},yt.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},yt.prototype.sqrTo=function(t,e){t.squareTo(e)},yt),lt=(mt.prototype.convert=function(t){return t.s<0||0<=t.compareTo(this.m)?t.mod(this.m):t},mt.prototype.revert=function(t){return t},mt.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},mt.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},mt.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},mt),ft=(gt.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},gt.prototype.revert=function(t){var e=v();return t.copyTo(e),this.reduce(e),e},gt.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)},gt.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},gt.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},gt),dt=(pt.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)},pt.prototype.revert=function(t){return t},pt.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)},pt.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},pt.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},pt);function pt(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 gt(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 mt(t){this.m=t}function yt(){}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 vt(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 et;e=t.get(),n.mulAdd(128,127&e),128&e;);this.tagNumber=n.simplify()}}function u(t,e,n,r,i){if(!(r instanceof ht))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 f(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 _t=[],bt="0".charCodeAt(0),e=0;e<=9;++e)_t[bt++]=e;for(bt="a".charCodeAt(0),e=10;e<36;++e)_t[bt++]=e;for(bt="A".charCodeAt(0),e=10;e<36;++e)_t[bt++]=e;function St(t,e){t=_t[t.charCodeAt(e)];return null==t?-1:t}function wt(t){var e=v();return e.fromInt(t),e}function xt(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=wt(0),c.ONE=wt(1);Et.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},Et.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 Tt=Et;function Et(){this.i=0,this.j=0,this.S=[]}var Dt,Bt,It=null;null==It&&(It=[],Bt=0);Ot.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=(()=>{if(null==Dt){for(Dt=new Tt;Bt<256;){var t=Math.floor(65536*Math.random());It[Bt++]=255&t}for(Dt.init(It),Bt=0;Bt<It.length;++Bt)It[Bt]=0;Bt=0}return Dt.next()})()};var At=Ot;function Ot(){}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=f(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 At,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=f(t,16),this.e=parseInt(e,16),this.d=f(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=f(t,16),this.e=parseInt(e,16),this.d=f(n,16),this.p=f(r,16),this.q=f(i,16),this.dmp1=f(s,16),this.dmq1=f(o,16),this.coeff=f(a,16))},r.prototype.generate=function(t,e){var n=new At,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=f(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 At,o=t>>1,a=(this.e=parseInt(e,16),new c(e,16)),h=this,u=function(){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(r,0):setTimeout(e,0)})})}var n=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(u,0)},r=function(){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(n,0):setTimeout(r,0)})})};setTimeout(e,0)};setTimeout(u,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 f("0001"+r+"00"+t,16)})((kt[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=f(e,16),e=this.doPublic(e);return null==e?null:(t=>{for(var e in kt)if(kt.hasOwnProperty(e)){var e=kt[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=f(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 kt={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,l=e.DERPrintableString,f=e.DERTeletexString,d=e.DERIA5String,p=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 l(t[e]);if("telstr"==e)return new f(t[e]);if("ia5str"==e)return new d(t[e]);if("utctime"==e)return new p(t[e]);if("gentime"==e)return new g(t[e]);if("seq"==e){for(var b=t[e],S=[],w=0;w<b.length;w++){var x=_(b[w]);S.push(x)}return new m({array:S})}if("set"==e){for(b=t[e],S=[],w=0;w<b.length;w++)x=_(b[w]),S.push(x);return new y({array:S})}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){t=t.toString(16);return t=1==t.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);Rt=function(t,e){return(Rt=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 Rt,Ct=(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 Rt(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===G){var e="0123456789ABCDEF";for(G={},s=0;s<16;++s)G[e.charAt(s)]=s;for(e=e.toLowerCase(),s=10;s<16;++s)G[e.charAt(s)]=s;for(s=0;s<8;++s)G[" \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=G[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):Q.unarmor(t),i=at.decode(r);if(9===(i=3===i.sub.length?i.sub[2].sub[0]:i).sub.length){e=i.sub[1].getHexStringValue(),this.n=f(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var s=i.sub[3].getHexStringValue(),o=(this.d=f(s,16),i.sub[4].getHexStringValue()),a=(this.p=f(o,16),i.sub[5].getHexStringValue()),h=(this.q=f(a,16),i.sub[6].getHexStringValue()),u=(this.dmp1=f(h,16),i.sub[7].getHexStringValue()),c=(this.dmq1=f(u,16),i.sub[8].getHexStringValue());this.coeff=f(c,16)}else{if(2!==i.sub.length)return!1;var l=i.sub[1].sub[0],e=l.sub[0].getHexStringValue();this.n=f(e,16),n=l.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 X(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 X(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),zt=(s.prototype.setKey=function(t){this.log&&this.key,this.key=new Ct(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(J(t))}catch(t){return!1}},s.prototype.encrypt=function(t){try{return X(this.getKey().encrypt(t))}catch(t){return!1}},s.prototype.encryptLong=function(t){try{return X(this.getKey().encryptLong(t))}catch(t){return!1}},s.prototype.decryptLong=function(t){try{return this.getKey().decryptLong(J(t))}catch(t){return!1}},s.prototype.sign=function(t,e,n){try{return X(this.getKey().sign(t,e,n))}catch(t){return!1}},s.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,J(e),n)}catch(t){return!1}},s.prototype.getKey=function(t){if(!this.key){if(this.key=new Ct,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 Nt(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function Pt(t,e,n,r,i,s){return Nt((e=Nt(Nt(e,t),Nt(r,s)))<<i|e>>>32-i,n)}function l(t,e,n,r,i,s,o){return Pt(e&n|~e&r,t,e,i,s,o)}function d(t,e,n,r,i,s,o){return Pt(e&r|n&~r,t,e,i,s,o)}function p(t,e,n,r,i,s,o){return Pt(e^n^r,t,e,i,s,o)}function g(t,e,n,r,i,s,o){return Pt(n^(e|~r),t,e,i,s,o)}function Mt(t,e){let n,r,i,s,o,a=(t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e,1732584193),h=-271733879,u=-1732584194,c=271733878;for(n=0;n<t.length;n+=16)r=a,i=h,s=u,o=c,a=l(a,h,u,c,t[n],7,-680876936),c=l(c,a,h,u,t[n+1],12,-389564586),u=l(u,c,a,h,t[n+2],17,606105819),h=l(h,u,c,a,t[n+3],22,-1044525330),a=l(a,h,u,c,t[n+4],7,-176418897),c=l(c,a,h,u,t[n+5],12,1200080426),u=l(u,c,a,h,t[n+6],17,-1473231341),h=l(h,u,c,a,t[n+7],22,-45705983),a=l(a,h,u,c,t[n+8],7,1770035416),c=l(c,a,h,u,t[n+9],12,-1958414417),u=l(u,c,a,h,t[n+10],17,-42063),h=l(h,u,c,a,t[n+11],22,-1990404162),a=l(a,h,u,c,t[n+12],7,1804603682),c=l(c,a,h,u,t[n+13],12,-40341101),u=l(u,c,a,h,t[n+14],17,-1502002290),h=l(h,u,c,a,t[n+15],22,1236535329),a=d(a,h,u,c,t[n+1],5,-165796510),c=d(c,a,h,u,t[n+6],9,-1069501632),u=d(u,c,a,h,t[n+11],14,643717713),h=d(h,u,c,a,t[n],20,-373897302),a=d(a,h,u,c,t[n+5],5,-701558691),c=d(c,a,h,u,t[n+10],9,38016083),u=d(u,c,a,h,t[n+15],14,-660478335),h=d(h,u,c,a,t[n+4],20,-405537848),a=d(a,h,u,c,t[n+9],5,568446438),c=d(c,a,h,u,t[n+14],9,-1019803690),u=d(u,c,a,h,t[n+3],14,-187363961),h=d(h,u,c,a,t[n+8],20,1163531501),a=d(a,h,u,c,t[n+13],5,-1444681467),c=d(c,a,h,u,t[n+2],9,-51403784),u=d(u,c,a,h,t[n+7],14,1735328473),h=d(h,u,c,a,t[n+12],20,-1926607734),a=p(a,h,u,c,t[n+5],4,-378558),c=p(c,a,h,u,t[n+8],11,-2022574463),u=p(u,c,a,h,t[n+11],16,1839030562),h=p(h,u,c,a,t[n+14],23,-35309556),a=p(a,h,u,c,t[n+1],4,-1530992060),c=p(c,a,h,u,t[n+4],11,1272893353),u=p(u,c,a,h,t[n+7],16,-155497632),h=p(h,u,c,a,t[n+10],23,-1094730640),a=p(a,h,u,c,t[n+13],4,681279174),c=p(c,a,h,u,t[n],11,-358537222),u=p(u,c,a,h,t[n+3],16,-722521979),h=p(h,u,c,a,t[n+6],23,76029189),a=p(a,h,u,c,t[n+9],4,-640364487),c=p(c,a,h,u,t[n+12],11,-421815835),u=p(u,c,a,h,t[n+15],16,530742520),h=p(h,u,c,a,t[n+2],23,-995338651),a=g(a,h,u,c,t[n],6,-198630844),c=g(c,a,h,u,t[n+7],10,1126891415),u=g(u,c,a,h,t[n+14],15,-1416354905),h=g(h,u,c,a,t[n+5],21,-57434055),a=g(a,h,u,c,t[n+12],6,1700485571),c=g(c,a,h,u,t[n+3],10,-1894986606),u=g(u,c,a,h,t[n+10],15,-1051523),h=g(h,u,c,a,t[n+1],21,-2054922799),a=g(a,h,u,c,t[n+8],6,1873313359),c=g(c,a,h,u,t[n+15],10,-30611744),u=g(u,c,a,h,t[n+6],15,-1560198380),h=g(h,u,c,a,t[n+13],21,1309151649),a=g(a,h,u,c,t[n+4],6,-145523070),c=g(c,a,h,u,t[n+11],10,-1120210379),u=g(u,c,a,h,t[n+2],15,718787259),h=g(h,u,c,a,t[n+9],21,-343485551),a=Nt(a,r),h=Nt(h,i),u=Nt(u,s),c=Nt(c,o);return[a,h,u,c]}function Vt(t){let e,n="",r=32*t.length;for(e=0;e<r;e+=8)n+=String.fromCharCode(t[e>>5]>>>e%32&255);return n}function jt(t){let e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var r=8*t.length;for(e=0;e<r;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function Ut(t){let e,n,r="0123456789abcdef",i="";for(n=0;n<t.length;n+=1)e=t.charCodeAt(n),i+=r.charAt(e>>>4&15)+r.charAt(15&e);return i}function Lt(t){return unescape(encodeURIComponent(t))}function qt(t){return Vt(Mt(jt(t=Lt(t)),8*t.length))}function Ht(s,o){{s=Lt(s),o=Lt(o);let t,e,n=jt(s),r=[],i=[];for(r[15]=i[15]=void 0,16<n.length&&(n=Mt(n,8*s.length)),t=0;t<16;t+=1)r[t]=909522486^n[t],i[t]=1549556828^n[t];return e=Mt(r.concat(jt(o)),512+8*o.length),Vt(Mt(i.concat(e),640))}}function m(t,e,n){return e?n?Ht(e,t):Ut(Ht(e,t)):n?qt(t):Ut(qt(t))}Kt=Math,t=(i={}).lib={},Wt=t.Base={extend:function(t){ue.prototype=this;var e=new ue;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)}},Gt=t.WordArray=Wt.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||Zt).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=Kt.ceil(e/4)},clone:function(){var t=Wt.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*Kt.random()|0);return new Gt.init(e,t)}}),o=i.enc={},Zt=o.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 Gt.init(n,e/2)}},Xt=o.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 Gt.init(n,e)}},Jt=o.Utf8={stringify:function(t){try{return decodeURIComponent(escape(Xt.stringify(t)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(t){return Xt.parse(unescape(encodeURIComponent(t)))}},$t=t.BufferedBlockAlgorithm=Wt.extend({reset:function(){this._data=new Gt.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=Jt.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?Kt.ceil(s):Kt.max((0|s)-this._minBufferSize,0))*i,r=Kt.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 Gt.init(o,r)},clone:function(){var t=Wt.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),t.Hasher=$t.extend({cfg:Wt.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){$t.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 Yt.HMAC.init(n,e).finalize(t)}}}),Yt=i.algo={};var Ft,Kt,Wt,Gt,Zt,Xt,Jt,$t,Yt,Qt,te,ee,ne,re,ie,se,oe,ae,he,o=i;function ue(){}Ft=o.lib.WordArray,o.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 Ft.create(s,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};var ce=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 t=o,le=(i=t.lib).WordArray,fe=i.Hasher,i=t.algo,I=[],de=0;de<64;de++)I[de]=4294967296*ce.abs(ce.sin(de+1))|0;i=i.MD5=fe.extend({_doReset:function(){this._hash=new le.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],l=t[e+8],f=t[e+9],d=t[e+10],p=t[e+11],g=t[e+12],m=t[e+13],y=t[e+14],v=t[e+15],_=x(n[0],w=n[1],S=n[2],b=n[3],i,7,I[0]),b=x(b,_,w,S,r=t[e+1],12,I[1]),S=x(S,b,_,w,s,17,I[2]),w=x(w,S,b,_,o,22,I[3]),_=x(_,w,S,b,a,7,I[4]),b=x(b,_,w,S,h,12,I[5]),S=x(S,b,_,w,u,17,I[6]),w=x(w,S,b,_,c,22,I[7]);_=x(_,w,S,b,l,7,I[8]),b=x(b,_,w,S,f,12,I[9]),S=x(S,b,_,w,d,17,I[10]),w=x(w,S,b,_,p,22,I[11]),_=x(_,w,S,b,g,7,I[12]),b=x(b,_,w,S,m,12,I[13]),S=x(S,b,_,w,y,17,I[14]),_=E(_,w=x(w,S,b,_,v,22,I[15]),S,b,r,5,I[16]),b=E(b,_,w,S,u,9,I[17]),S=E(S,b,_,w,p,14,I[18]),w=E(w,S,b,_,i,20,I[19]),_=E(_,w,S,b,h,5,I[20]),b=E(b,_,w,S,d,9,I[21]),S=E(S,b,_,w,v,14,I[22]),w=E(w,S,b,_,a,20,I[23]),_=E(_,w,S,b,f,5,I[24]),b=E(b,_,w,S,y,9,I[25]),S=E(S,b,_,w,o,14,I[26]),w=E(w,S,b,_,l,20,I[27]),_=E(_,w,S,b,m,5,I[28]),b=E(b,_,w,S,s,9,I[29]),S=E(S,b,_,w,c,14,I[30]),_=D(_,w=E(w,S,b,_,g,20,I[31]),S,b,h,4,I[32]),b=D(b,_,w,S,l,11,I[33]),S=D(S,b,_,w,p,16,I[34]),w=D(w,S,b,_,y,23,I[35]),_=D(_,w,S,b,r,4,I[36]),b=D(b,_,w,S,a,11,I[37]),S=D(S,b,_,w,c,16,I[38]),w=D(w,S,b,_,d,23,I[39]),_=D(_,w,S,b,m,4,I[40]),b=D(b,_,w,S,i,11,I[41]),S=D(S,b,_,w,o,16,I[42]),w=D(w,S,b,_,u,23,I[43]),_=D(_,w,S,b,f,4,I[44]),b=D(b,_,w,S,g,11,I[45]),S=D(S,b,_,w,v,16,I[46]),_=B(_,w=D(w,S,b,_,s,23,I[47]),S,b,i,6,I[48]),b=B(b,_,w,S,c,10,I[49]),S=B(S,b,_,w,y,15,I[50]),w=B(w,S,b,_,h,21,I[51]),_=B(_,w,S,b,g,6,I[52]),b=B(b,_,w,S,o,10,I[53]),S=B(S,b,_,w,d,15,I[54]),w=B(w,S,b,_,r,21,I[55]),_=B(_,w,S,b,l,6,I[56]),b=B(b,_,w,S,v,10,I[57]),S=B(S,b,_,w,u,15,I[58]),w=B(w,S,b,_,m,21,I[59]),_=B(_,w,S,b,a,6,I[60]),b=B(b,_,w,S,p,10,I[61]),S=B(S,b,_,w,s,15,I[62]),w=B(w,S,b,_,f,21,I[63]),n[0]=n[0]+_|0,n[1]=n[1]+w|0,n[2]=n[2]+S|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,ce.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=fe.clone.call(this);return t._hash=this._hash.clone(),t}}),t.MD5=fe._createHelper(i),t.HmacMD5=fe._createHmacHelper(i),A=(i=(t=o).lib).Base,ae=i.WordArray,he=(i=t.algo).EvpKDF=A.extend({cfg:A.extend({keySize:4,hasher:i.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=ae.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}}),t.EvpKDF=function(t,e,n){return he.create(n).compute(t,e)},o.lib.Cipher||(i=(A=o).lib,t=i.Base,Qt=i.WordArray,te=i.BufferedBlockAlgorithm,ee=A.enc.Base64,ne=A.algo.EvpKDF,re=i.Cipher=te.extend({cfg:t.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(){te.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?oe:se).encrypt(r,t,e,n)},decrypt:function(t,e,n){return("string"==typeof e?oe:se).decrypt(r,t,e,n)}}}}),i.StreamCipher=re.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),pe=A.mode={},(a=(i.BlockCipherMode=t.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=a.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize;ke.call(this,t,e,r),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+r)}}),a.Decryptor=a.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=t.slice(e,e+r);n.decryptBlock(t,e),ke.call(this,t,e,r),this._prevBlock=i}}),pe=pe.CBC=a,a=(A.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=Qt.create(i,n),t.concat(n)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},i.BlockCipher=re.extend({cfg:re.cfg.extend({mode:pe,padding:a}),reset:function(){re.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}),ie=i.CipherParams=t.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),pe=(A.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return((t=t.salt)?Qt.create([1398893684,1701076831]).concat(t).concat(e):e).toString(ee)},parse:function(t){var e,n=(t=ee.parse(t)).words;return 1398893684==n[0]&&1701076831==n[1]&&(e=Qt.create(n.slice(2,4)),n.splice(0,4),t.sigBytes-=16),ie.create({ciphertext:t,salt:e})}},se=i.SerializableCipher=t.extend({cfg:t.extend({format:pe}),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,ie.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}}),A=(A.kdf={}).OpenSSL={execute:function(t,e,n,r){return r=r||Qt.random(8),t=ne.create({keySize:e+n}).compute(t,r),n=Qt.create(t.words.slice(e),4*n),t.sigBytes=4*e,ie.create({key:t,iv:n,salt:r})}},oe=i.PasswordBasedCipher=se.extend({cfg:se.cfg.extend({kdf:A}),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=se.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,se.decrypt.call(this,t,e,n.key,r)}}));for(var a=o,t=a.lib.BlockCipher,pe=a.algo,_=[],ge=[],me=[],ye=[],ve=[],_e=[],be=[],Se=[],we=[],xe=[],b=[],Te=0;Te<256;Te++)b[Te]=Te<128?Te<<1:Te<<1^283;for(var S=0,Ee=0,Te=0;Te<256;Te++){var De=(De=Ee^Ee<<1^Ee<<2^Ee<<3^Ee<<4)>>>8^255&De^99,Be=b[ge[_[S]=De]=S],Ie=b[Be],Ae=b[Ie],w=257*b[De]^16843008*De;me[S]=w<<24|w>>>8,ye[S]=w<<16|w>>>16,ve[S]=w<<8|w>>>24,_e[S]=w,be[De]=(w=16843009*Ae^65537*Ie^257*Be^16843008*S)<<24|w>>>8,Se[De]=w<<16|w>>>16,we[De]=w<<8|w>>>24,xe[De]=w,S?(S=Be^b[b[b[Ae^Be]]],Ee^=b[b[Ee]]):S=Ee=1}var Oe=[0,1,2,4,8,16,32,64,128,27,54],pe=pe.AES=t.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=_[t>>>24]<<24|_[t>>>16&255]<<16|_[t>>>8&255]<<8|_[255&t]):(t=_[(t=t<<8|t>>>24)>>>24]<<24|_[t>>>16&255]<<16|_[t>>>8&255]<<8|_[255&t],t^=Oe[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:be[_[t>>>24]]^Se[_[t>>>16&255]]^we[_[t>>>8&255]]^xe[_[255&t]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,me,ye,ve,_e,_)},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,be,Se,we,xe,ge),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],l=t[e+2]^n[2],f=t[e+3]^n[3],d=4,p=1;p<h;p++)var g=r[u>>>24]^i[c>>>16&255]^s[l>>>8&255]^o[255&f]^n[d++],m=r[c>>>24]^i[l>>>16&255]^s[f>>>8&255]^o[255&u]^n[d++],y=r[l>>>24]^i[f>>>16&255]^s[u>>>8&255]^o[255&c]^n[d++],f=r[f>>>24]^i[u>>>16&255]^s[c>>>8&255]^o[255&l]^n[d++],u=g,c=m,l=y;g=(a[u>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^n[d++],m=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&u])^n[d++],y=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[u>>>8&255]<<8|a[255&c])^n[d++],f=(a[f>>>24]<<24|a[u>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],t[e]=g,t[e+1]=m,t[e+2]=y,t[e+3]=f},keySize:8});function ke(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]}a.AES=t._createHelper(pe);var Re=o;let Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function ze(t){this.message=t}function Ne(t){for(var e,n,r=String(t),i=0,s=Ce,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 ze("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return o}(ze.prototype=new Error).name="InvalidCharacterError";i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Pe(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 A={exports:{}},Me=(A.exports=function n(r,i,s){function o(e,t){if(!i[e]){if(!r[e]){if(!t&&Pe)return Pe(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=Pe,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,r=Array.prototype.slice.call(arguments,1);r.length;){var i=r.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var s in i)e=i,n=s,Object.prototype.hasOwnProperty.call(e,n)&&(t[s]=i[s])}}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,P,e){var a,l=t("../utils/common"),h=t("./trees"),f=t("./adler32"),d=t("./crc32"),n=t("./messages"),u=0,c=0,p=-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 S(t,e){return t.msg=n[e],e}function w(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)&&(l.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 I(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,l=t.prev,f=t.strstart+y,d=u[s+o-1],p=u[s+o];t.good_match<=t.prev_length&&(i>>=2),t.lookahead<a&&(a=t.lookahead);do{if(u[(n=e)+o]===p&&u[n+o-1]===d&&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<f;);if(r=y-(f-s),s=f-y,o<r){if(t.match_start=e,a<=(o=r))break;d=u[s+o-1],p=u[s+o]}}}while((e=l[e&c])>h&&0!=--i);return o<=t.lookahead?o:t.lookahead}function A(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(l.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,l.arraySet(o,s.input,s.next_in,u,a),1===s.state.wrap?s.adler=f(s.adler,o,u,a):2===s.state.wrap&&(s.adler=d(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(A(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=I(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(A(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=I(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 R(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 l.Buf16(2*M),this.dyn_dtree=new l.Buf16(2*(2*s+1)),this.bl_tree=new l.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 l.Buf16(V+1),this.heap=new l.Buf16(2*i+1),x(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new l.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 C(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):S(t,p)}function z(t){var e=C(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 N(t,e,n,r,i,s){if(!t)return p;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 S(t,p);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 l.Buf8(2*a.w_size),a.head=new l.Buf16(a.hash_size),a.prev=new l.Buf16(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new l.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,z(t)}a=[new R(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(A(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 R(4,4,8,4,O),new R(4,5,16,8,O),new R(4,6,32,32,O),new R(4,4,16,16,k),new R(8,16,32,32,k),new R(8,16,128,128,k),new R(8,32,128,256,k),new R(32,128,258,1024,k),new R(32,258,258,4096,k)],e.deflateInit=function(t,e){return N(t,e,g,15,8,0)},e.deflateInit2=N,e.deflateReset=z,e.deflateResetKeep=C,e.deflateSetHeader=function(t,e){return!t||!t.state||2!==t.state.wrap?p:(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?S(t,p):p;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return S(t,0===t.avail_out?-5:p);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=d(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=d(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=d(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=d(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=d(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=d(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=d(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&&w(e)<=w(n)&&4!==e)return S(t,-5);if(666===r.status&&0!==t.avail_in)return S(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&&(A(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(A(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?S(t,p):(t.state=null,e===b?S(t,-3):c):p},e.deflateSetDictionary=function(t,e){var n,r,i,s,o,a,h,u=e.length;if(!t||!t.state)return p;if(2===(s=(n=t.state).wrap)||1===s&&n.status!==_||n.lookahead)return p;for(1===s&&(t.adler=f(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 l.Buf8(n.w_size),l.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,A(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,A(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,P,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],l=new Array(576),f=(n(l),new Array(60)),d=(n(f),new Array(512)),p=(n(d),new Array(256)),g=(n(p),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 S(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?d[t]:d[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 I(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 A(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=p[i])+256+1,e),0!==(o=h[s])&&x(t,i-=g[s],o),T(t,s=w(--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--)A(t,s,n);for(i=h;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(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++,A(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1];for(var c,l,f,d,p,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,S=e.stat_desc.extra_base,w=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++)w<(T=m[2*m[2*(l=g.heap[c])+1]+1]+1)&&(T=w,x++),m[2*l+1]=T,y<l||(g.bl_count[T]++,d=0,S<=l&&(d=b[l-S]),p=m[2*l],g.opt_len+=p*(T+d),_&&(g.static_len+=p*(v[2*l+1]+d)));if(0!==x){do{for(T=w-1;0===g.bl_count[T];)T--}while(g.bl_count[T]--,g.bl_count[T+1]+=2,g.bl_count[w]--,0<(x-=2));for(T=w;0!==T;T--)for(l=g.bl_count[T];0!==l;)y<(f=g.heap[--c])||(m[2*f+1]!==T&&(g.opt_len+=(T-m[2*f+1])*m[2*f],m[2*f+1]=T),l--)}D(s,u,t.bl_count)}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),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 C(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 z=!1;function N(t,e,n,r){x(t,0+(r?1:0),3),r=e,e=n,I(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(!z){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++)p[r++]=o;for(p[r-1]=o,o=i=0;o<16;o++)for(_[o]=i,e=0;e<1<<u[o];e++)d[i++]=o;for(i>>=7;o<30;o++)for(_[o]=i<<7,e=0;e<1<<u[o]-7;e++)d[256+i++]=o;for(n=0;n<=15;n++)s[n]=0;for(e=0;e<=143;)l[2*e+1]=8,e++,s[8]++;for(;e<=255;)l[2*e+1]=9,e++,s[9]++;for(;e<=279;)l[2*e+1]=7,e++,s[7]++;for(;e<=287;)l[2*e+1]=8,e++,s[8]++;for(D(l,287,s),e=0;e<30;e++)f[2*e+1]=5,f[2*e]=E(e,5);m=new b(l,h,257,286,15),y=new b(f,u,0,30,15),v=new b(new Array(0),a,0,19,7),z=!0}t.l_desc=new S(t.dyn_ltree,m),t.d_desc=new S(t.dyn_dtree,y),t.bl_desc=new S(t.bl_tree,v),t.bi_buf=0,t.bi_valid=0,B(t)},e._tr_stored_block=N,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(R(t,t.dyn_ltree,t.l_desc.max_code),R(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)N(t,e,n,r);else if(4===t.strategy||s===i)x(t,2+(r?1:0),3),O(t,l,f);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);C(h,h.dyn_ltree,e-1),C(h,h.dyn_dtree,n-1),O(t,t.dyn_ltree,t.dyn_dtree)}B(t),r&&I(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*(p[n]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){x(t,2,3),T(t,256,l),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"),A.exports);function Ve(t,e){Re.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}};var n=Re.enc.Utf8.parse("0102030405060708"),e=Re.enc.Utf8.parse(e),t="object"==typeof t?JSON.stringify(t):t;return Re.AES.encrypt(t,e,{iv:n,mode:Re.mode.CBC,padding:Re.pad.ZeroPadding}).ciphertext.toString()}function je(t){t=JSON.stringify(t);return Me.gzip(t,{to:"string"})}function Ue(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Ye&&Ye in Object(t)?$e(t):Je.call(t)}function Le(t){return"symbol"==typeof t||null!=(e=t)&&"object"==typeof e&&"[object Symbol]"==Qe(t);var e}function qe(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function He(t,e){return e=e,t=null==(t=t)?void 0:t[e],!fn(e=t)||ln(e)||!(cn(e)?gn:pn).test(dn(e))?void 0:t}function Fe(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function Ke(t){var e,n=this.__data__;return yn?"__lodash_hash_undefined__"===(e=n[t])?void 0:e:vn.call(n,t)?n[t]:void 0}var We={appId:"default",channel:"",organization:"",apiHost:"fp-it.fengkongcloud.com",apiPath:"/deviceprofile/v4",apiProtocol:"https",publicKey:""},t=Array.isArray,o="object"==typeof i&&i&&i.Object===Object&&i,A="object"==typeof self&&self&&self.Object===Object&&self,i=o||A||Function("return this")(),o=i.Symbol,A=Object.prototype,Ge=A.hasOwnProperty,Ze=A.toString,Xe=o?o.toStringTag:void 0,Je=Object.prototype.toString,$e=function(t){var e=Ge.call(t,Xe),n=t[Xe];try{var r=!(t[Xe]=void 0)}catch(t){}var i=Ze.call(t);return r&&(e?t[Xe]=n:delete t[Xe]),i},Ye=o?o.toStringTag:void 0,Qe=Ue,tn=t,en=Le,nn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,sn=qe,on=Ue,an=qe,A=i["__core-js_shared__"],hn=(A=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",un=Function.prototype.toString,cn=function(t){return!!an(t)&&("[object Function]"==(t=on(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)},ln=function(t){return!!hn&&hn in t},fn=qe,dn=function(t){if(null!=t){try{return un.call(t)}catch(t){}try{return t+""}catch(t){}}return""},pn=/^\[object .+?Constructor\]$/,A=Object.prototype,O=Function.prototype.toString,A=A.hasOwnProperty,gn=RegExp("^"+O.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=He(Object,"create"),mn=O,yn=O,vn=Object.prototype.hasOwnProperty,_n=O,bn=Object.prototype.hasOwnProperty,Sn=O;function wn(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])}}wn.prototype.clear=function(){this.__data__=mn?mn(null):{},this.size=0},wn.prototype.delete=Fe,wn.prototype.get=Ke,wn.prototype.has=function(t){var e=this.__data__;return _n?void 0!==e[t]:bn.call(e,t)},wn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Sn&&void 0===e?"__lodash_hash_undefined__":e,this};function xn(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 A=wn,Tn=xn,En=Array.prototype.splice,Dn=xn,Bn=xn,In=xn;function An(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])}}An.prototype.clear=function(){this.__data__=[],this.size=0},An.prototype.delete=function(t){var e=this.__data__,t=Tn(e,t);return!(t<0||(t==e.length-1?e.pop():En.call(e,t,1),--this.size,0))},An.prototype.get=function(t){var e=this.__data__,t=Dn(e,t);return t<0?void 0:e[t][1]},An.prototype.has=function(t){return-1<Bn(this.__data__,t)},An.prototype.set=function(t,e){var n=this.__data__,r=In(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function On(t,e){var n,r,t=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?t["string"==typeof e?"string":"hash"]:t.map}var O=An,i=He(i,"Map"),kn=A,Rn=O,Cn=i,zn=On,Nn=On,Pn=On,Mn=On;function Vn(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])}}Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new kn,map:new(Cn||Rn),string:new kn}},Vn.prototype.delete=function(t){t=zn(this,t).delete(t);return this.size-=t?1:0,t},Vn.prototype.get=function(t){return Nn(this,t).get(t)},Vn.prototype.has=function(t){return Pn(this,t).has(t)},Vn.prototype.set=function(t,e){var n=Mn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var jn=Vn;function Un(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(Un.Cache||jn),s}Un.Cache=jn;var Ln,qn,Hn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,O=(Ln=(A=Un(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(Hn,function(t,e,n,r){i.push(n?r.replace(Fn,"$1"):e||t)}),i},function(t){return 500===Ln.size&&Ln.clear(),t})).cache,A),Kn=t,Wn=Le,i=o?o.prototype:void 0,Gn=i?i.toString:void 0,Zn=function t(e){var n;return"string"==typeof e?e:Kn(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)+"":Wn(e)?Gn?Gn.call(e):"":"0"==(n=e+"")&&1/e==-1/0?"-0":n},Xn=t,Jn=function(t,e){var n;return!tn(t)&&(!("number"!=(n=typeof t)&&"symbol"!=n&&"boolean"!=n&&null!=t&&!en(t))||rn.test(t)||!nn.test(t)||null!=e&&t in Object(e))},$n=O,Yn=function(t){return null==t?"":Zn(t)},Qn=Le,tr=function(t,e){return Xn(t)?t:Jn(t,e)?[t]:$n(Yn(t))},er=function(t){var e;return"string"==typeof t||Qn(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e},nr=function(t,e){for(var n=0,r=(e=tr(e,t)).length;null!=t&&n<r;)t=t[er(e[n++])];return n&&n==r?t:void 0},rr=function(t,e,n){t=null==t?void 0:nr(t,e);return void 0===t?n:t},o=((A=qn=qn||{}).wx="wx",A.qq="qq",A.tt="tt",A.my="my",A.taobao="taobao",A.xhs="xhs","wx"),k={isWx:o===qn.wx,isQq:o===qn.qq,isTt:o===qn.tt,isAli:o===qn.my,isTaobao:o===qn.taobao,isXhs:o===qn.xhs},R=wx,ir={exports:{}},C=(t=(i=ir).exports,O=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!=t&&"number"!=typeof t.nodeType?i.exports=O():(O=O(),"function"!=typeof(t="undefined"!=typeof self?self:$.global).btoa&&(t.btoa=O.btoa),"function"!=typeof t.atob&&(t.atob=O.atob)),sr.prototype.getSmInfo=function(t){return this.smInfo[t]},sr.prototype.setSmInfo=function(t,e){this.smInfo[t]=e},sr.prototype.getUserAuthInfo=function(t){return this.userAuthInfo[t]},sr.prototype.setUserAuthInfo=function(t,e){this.userAuthInfo[t]=e},new sr);function sr(){this.smInfo={storageName:"",SMID:"",smData:"",smEncryptedData:"",priId:"",ep:"",uid:"",retryCnt:0,isNeedStop:!1,smAesData:"",autoRetryCnt:0,isUaidParamsCorrect:!1},this.userAuthInfo={openId:"",unionId:""},this.smFpParams={}}function or(){var t=[new Promise(function(n){var r={screenBright:-1};try{R.getScreenBrightness({success:function(t){try{var e=k.isAli||k.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:""};try{R.getNetworkType({success:function(t){try{e({networkType:t.networkType})}catch(t){e(n)}},fail:function(){e(n)}})}catch(t){e(n)}}),(()=>{try{return R.getSystemInfoSync()}catch(t){return{}}})()];return(k.isWx||k.isTt)&&t.push(new Promise(function(e){var n={connectedWifi:{}};try{k.isWx?R.startWifi({success:function(){R.getConnectedWifi({complete:function(t){try{e(t.wifi?{connectedWifi:t.wifi}:n)}catch(t){e(n)}}})},fail:function(){e(n)}}):k.isTt&&R.getConnectedWifi({complete:function(t){try{e(t?{connectedWifi:t}:n)}catch(t){e(n)}}})}catch(t){e(n)}})),k.isQq||(k.isTt||t.push(new Promise(function(t){try{var e=R.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})(ir.exports.atob(r).slice(-16,-12))})}catch(e){t({canvas:""})}})),k.isTaobao)||t.push(new Promise(function(t){try{var e=k.isAli||k.isTaobao?"getDeviceBaseInfo":"getDeviceInfo",n=(k.isTt&&(e="getDeviceInfoSync"),R[e]());n.model&&delete n.model,t(n)}catch(e){t({})}})),k.isWx&&!1!==rr(C.smConf,"authConf.nfc",!0)&&t.push(new Promise(function(e){try{var t=R.getNFCAdapter();t.startDiscovery({success:function(){e({nfc:"1"}),t.stopDiscovery()},fail:function(t){e({nfc:"0",nfcErrorMsg:t.errMsg})}})}catch(t){e({nfc:"-1"})}})),Promise.all(t)}var ar=function(e){return void 0!==e&&"function"==typeof e?function(t){try{e(t)}catch(t){}}:function(){}},hr="3.0.0",ur="1.0.0",z={NO_NETWORK:-1,NETWORK_ERROR:-2,BUSINESS_ERROR:-3,UNKNOWN_ERROR:-4};function cr(t,e,n,r){try{var i={url:t,data:e,method:"POST",responseType:"text",success:n,fail:r};try{R.request({url:i.url,data:k.isXhs?i.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){C&&C.smConf&&C.smConf.onError&&ar(C.smConf.onError)(z.NO_NETWORK)}}function lr(e){var n=e.callbackName,t=e.url,r=e.method,r=void 0===r?"GET":r,i=e.header,s=e.responseType,s=void 0===s?"text":s,o=e.paramsNeedCallback,a=e.successCallback,h=void 0===a?function(){}:a,a=e.errorCallback,a=void 0===a?function(){}:a,o=void 0===o||o?"".concat(t,"&callback=").concat(n):"".concat(t);try{R.request({url:o,header:i,method:r,responseType:s,success:function(t){var e=j({},t),t=(t=null==(t=null==t?void 0:t.data)?void 0:t.replace("".concat(n,"("),"")).replace(/\)[^(]*$/,"");try{e.data=JSON.parse(t)}catch(t){e.data={}}h(e)},fail:a})}catch(t){e.fail()}}function fr(t,e){try{R.setStorage({key:t,data:e})}catch(t){}}function dr(t){try{return k.isAli||k.isTaobao?R.getStorageSync({key:t}).data:R.getStorageSync(t)}catch(t){}}function pr(t,e){try{(k.isXhs?R.fs:R.getFileSystemManager()).writeFile({filePath:"".concat(R.env.USER_DATA_PATH,"/").concat(t,".txt"),data:e,encoding:"utf8",success:function(){},fail:function(){}})}catch(t){}}function gr(t){try{var e="".concat(R.env.USER_DATA_PATH,"/").concat(t,".txt"),n=R.getFileSystemManager().readFileSync(e,"utf8");return k.isAli||k.isTaobao?n.data:n}catch(t){}}function mr(t){C.setSmInfo("SMID",t);var e=C.smInfo.storageName;fr(e,t),pr(e,t)}function yr(){var t,e=C.getSmInfo("SMID");return e||(dr(t=C.smInfo.storageName)?e=dr(t):k.isXhs||(e=gr(t))),e}function vr(){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 _r(t){return m(function e(n){var r;return sn(n)?(r="",Object.keys(n).sort().forEach(function(t){r+=e(n[t])}),r):n?n.toString().replace(/,/g,""):""}(t))}function br(){var t,e="smidV2";return(t=k.isXhs?dr(e):dr(e)||gr("SMFP"))||(fr(e,e=(t=(t=new Date).getFullYear().toString()+((e=(t.getMonth()+1).toString())<=9?"0"+e:e)+((e=t.getDate().toString())<=9?"0"+e:e)+((e=t.getHours().toString())<=9?"0"+e:e)+((e=t.getMinutes().toString())<=9?"0"+e:e)+((e=t.getSeconds().toString())<=9?"0"+e:e)+m(vr())+"00")+m("smsk_weapp_"+t).substr(0,14)+0),pr("SMFP",e),e)}var Sr,wr=function(t,e){void 0===e&&(e=function(){});var n=t&&t.data&&t.data.code,t=t&&(t.statusCode||t.status);n?1100!==n&&e(z.BUSINESS_ERROR):!t||k.isAli&&-1003===t?e(z.NO_NETWORK):e(z.NETWORK_ERROR)},xr=function(t){var e=Math.floor(+new Date/1e3);return!!t&&e<Number(t)},Tr=function(){var t=C.smConf.organization,e=".uaidcache_".concat(m(t));try{var n=dr(e)||"",r=JSON.parse(n)||{},i=r.uaid;return xr(r.uaidTimeout)&&i&&"string"==typeof i?i:""}catch(t){return""}},Er={timer:null,timeStamp:0},Dr=+new Date,Br=+new Date+"-"+Math.floor(1e8*Math.random());function Ir(t){var e,n,r=C.smConf,r=r.apiProtocol+"://"+r.apiHost+r.apiPath,i=(t=t,s=C.smConf,i=s.appId,s=s.organization,e=C.smInfo,n=e.SMID,e=e.ep,n={appId:i,organization:s,os:"weapp",version:hr,sdkVer:ur,rtype:"exception",smid:br(),box:n,gBox:"",tn:"",e:t},{errObj:t={appId:i,organization:s,ep:e,data:Ne(JSON.stringify(n)),os:"weapp",encode:1,compress:0},encrypedData:Ne(JSON.stringify(t))}),s=i.errObj;C.setSmInfo("smEncryptedData",i.encrypedData),cr(r,s)}function Ar(t){var e=C.smConf,e=e.apiProtocol+"://"+e.apiHost+e.apiPath,t=Rr(t);C.setSmInfo("smEncryptedData",Ne(JSON.stringify(t))),cr(e,t,Or,Or)}function Or(t){if(Sr=Sr||ar(C.smConf.onError),wr(t,Sr),1100===rr(t,"data.code"))clearTimeout(Er.timer),C.setSmInfo("retryCnt",0),C.setSmInfo("autoRetryCnt",0),mr(rr(t,"data.detail.deviceId",""));else{var e=C.getSmInfo("autoRetryCnt");if(e<2)1902===rr(t,"data.code")?or().then(function(t){t=kr(t);C.smInfo.isNeedStop||(e++,C.setSmInfo("autoRetryCnt",e),Ar(t))}):(e++,C.setSmInfo("autoRetryCnt",e),Ar());else if(1902!==rr(t,"data.code")){var n=C.getSmInfo("retryCnt");switch(n){case 0:Er.timeStamp=2e3;break;case 1:Er.timeStamp=5e3;break;case 2:Er.timeStamp=15e3;break;default:Er.timeStamp=3e4}Er.timer=setTimeout(function(){n++,C.setSmInfo("retryCnt",n),Ar()},Er.timeStamp)}}}function kr(t){var e=C.smConf,n=e.appId,r=e.organization,e=e.channel,i=C.smInfo,s=i.SMID,i=i.priId,o=(Sr=Sr||ar(C.smConf.onError),+new Date-Dr),a={},h=Tr();h&&Object.assign(a,{uaid:h});for(var u=0;u<t.length;u++)Object.assign(a,t[u]);var c,l,f,h=C.getUserAuthInfo("openId"),d=C.getUserAuthInfo("unionId");Object.assign(a,j({organization:r,appId:n,os:"weapp",version:hr,sdkVer:ur,rtype:"all",smid:br(),gBox:"",box:s,res:"".concat(a.screenWidth,"_").concat(a.screenHeight),channel:e,time:o,sessionId:Br,subVersion:ur,weAppVerion:a.version,launchOptions:(()=>{try{return R.getLaunchOptionsSync()}catch(t){return{}}})()},k.isWx?{openId:h,unionId:d}:{})),Object.assign(a,{tn:_r(a)}),C.setSmInfo("smData",a),C.smConf.useShortBox&&(c=a,l=["time","pixelRatio","statusBarHeight","albumAuthorized","cameraAuthorized","locationAuthorized","microphoneAuthorized","notificationAuthorized","notificationAlertAuthorized","notificationBadgeAuthorized","notificationSoundAuthorized","phoneCalendarAuthorized","bluetoothEnabled","locationEnabled","wifiEnabled","safeArea","locationReducedAccuracy","theme","enableDebug","fingerPrintSupport","facialSupport","nfc","deviceOrientation","connectedWifi","wifiList","res","sessionId","gBox","screenWidth","screenHeight","windowWidth","windowHeight","language","system","fontSizeSetting","benchmarkLevel","host","screenBright"],f={},Object.keys(c).map(function(t){l.includes(t)||(f[t]=c[t])}),a=f);try{a=Ne(a=je(a))}catch(t){return Sr(z.UNKNOWN_ERROR),Ir("gzip_failed"),void C.setSmInfo("isNeedStop",!0)}try{a=Ve(a,i),C.setSmInfo("smAesData",a)}catch(t){return Sr(z.UNKNOWN_ERROR),Ir("aes_failed"),void C.setSmInfo("isNeedStop",!0)}return a}function Rr(t){var e=C.smConf,n=e.appId,r=C.smInfo;return{appId:n,organization:e.organization,ep:r.ep,data:t||r.smAesData,os:"weapp",encode:6,compress:2}}function Cr(n,r){U(void 0,void 0,void 0,function(){var e;return L(this,function(t){switch(t.label){case 0:return[4,Pr(j({rtype:"uaidtoken"},n||{}))];case 1:return e=t.sent(),C.getSmInfo("isUaidParamsCorrect")?null!=r&&r():Nr(e,r),[2]}})})}var zr=function(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/[x]/g,function(){return(16*Math.random()|0).toString(16)})},Nr=function(t,s){var e=C.smConf;cr(e.apiProtocol+"://"+e.apiHost+e.apiPath,t,function(t){var e=1100==(null==(e=null==t?void 0:t.data)?void 0:e.code),n=null==(n=null==(n=null==t?void 0:t.data)?void 0:n.detail)?void 0:n.uaid,r=null==(r=null==(r=null==t?void 0:t.data)?void 0:r.detail)?void 0:r.uaidTimeout,t="000000"==(null==(t=null==(t=null==t?void 0:t.data)?void 0:t.detail)?void 0:t.resultCode);if(e&&n&&r&&t&&xr(r)){var i={uaid:n,uaidTimeout:r},e=C.smConf.organization,e=".uaidcache_".concat(m(e));try{fr(e,JSON.stringify(i))}catch(i){}null!=s&&s({uaid:n,uaidTimeout:r})}else null!=s&&s()},function(){return null==s?void 0:s()})},Pr=function(s){return U(void 0,void 0,void 0,function(){var e,n,r,i;return L(this,function(t){return n=C.smConf,e=n.appId,n=n.organization,r=C.getSmInfo("ep"),i={os:"weapp",rtype:"uaidtoken",organization:n},i=Object.assign(i,s||{}),i=(t=>{var e=C.getSmInfo("priId");try{t=Ne(t=je(t))}catch(t){return void C.setSmInfo("isUaidParamsCorrect",!0)}try{t=Ve(t,e)}catch(t){return void C.setSmInfo("isUaidParamsCorrect",!0)}return t})(i),[2,{appId:e,organization:n,ep:r,data:i||"",os:"weapp",encode:6,compress:2}]})})};function Mr(){var t=new Date,e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0"),t=String(t.getMilliseconds()).padStart(3,"0");return"".concat(e).concat(n).concat(r).concat(i).concat(s).concat(o).concat(t)}function Vr(){return U(void 0,void 0,void 0,function(){var e,n,r,i;return L(this,function(t){switch(t.label){case 0:return e=C.smConf.uaidTokenParams,r=(e=e||{}).appId,e=e.appKey,r={traceId:zr(),appId:r,appKey:e},e=[Lr(r),Fr(r),Wr(r)],n=[N.YD,N.LT,N.DX],[4,Promise.all(e)];case 1:return(r=t.sent())&&r.map(function(t,e){e=n[e]||n[0],t=(t||{})[e];t&&(i={uaidToken:t,uaidtoken_operator:e})}),i?[2,Promise.resolve(i)]:[2,Promise.resolve()]}})})}function jr(s,o){return U(void 0,void 0,void 0,function(){var e,n,r,i;return L(this,function(t){switch(t.label){case 0:return e=(r=s||{}).handleFpData,n=r.smid,C.getSmInfo("isUaidParamsCorrect")?(null!=o&&o(),[2]):n?(Vr().then(function(t){t?Cr(Object.assign(t,{box:n}),o):null!=o&&o()}),[3,3]):[3,1];case 1:return r=new Promise(function(n){null!=e&&e(function(t){var e;1100==(null==(e=null==t?void 0:t.data)?void 0:e.code)?(e=(null==(t=null==(e=null==t?void 0:t.data)?void 0:e.detail)?void 0:t.deviceId)||"",n(e)):n()},n)}),i=[r,Vr()],[4,Promise.all(i)];case 2:(i=t.sent())&&i[0]&&i[1]?Cr(Object.assign(i[1],{box:i[0]}),o):null!=o&&o(),t.label=3;case 3:return[2]}})})}var Ur=function(t){var e=(t=void 0===t?{}:t)||{},n={traceId:e.traceId||zr(),appId:e.appId,msgId:zr(),businessType:"3",version:"1.0",timestamp:Mr()},e=(e.expandParams&&(n.expandParams=(e=>{try{return encodeURI(e)}catch(t){return e}})(e.expandParams)),n.appId+n.businessType+n.msgId+n.timestamp+n.traceId+n.version+e.appKey);try{return n.sign=m(e),n}catch(t){return n}},Lr=function(t){var e=Ur(t=void 0===t?{}:t);return new Promise(function(n){cr("https://msg.cmpassport.com/h5/getMobile",e,function(t){var e=null==(e=null==(e=null==t?void 0:t.data)?void 0:e.body)?void 0:e.resultCode,t=null==(t=null==(t=null==t?void 0:t.data)?void 0:t.body)?void 0:t.token;n("103000"==e&&t?((e={})[N.YD]=t,e):((t={})[N.YD]="",t))},function(){var t;return n(((t={})[N.YD]="",t))})})},qr=function(t){var e,n=[];for(e in t){var r=t[e];n.push("".concat(e,"=").concat(r))}return n.join("&")},Hr=function(t,n,r,s){cr("https://ua.cmpassport.com/api/h5/uaidGetCTCUToken",((t,e)=>{var n=(s||{}).appId,r=zr(),i=Mr(),e={header:{appId:n,msgId:r,timestamp:i,version:"1.0"},body:j({businessType:"3",requestType:"1",operType:e?"CU":"CT",userInformation:""},e?{data:JSON.stringify(t)}:{data:t.data||"",paramKey:t.encryKeyA||""})},t=n+"3"+e.body.data+r+e.body.operType+(e.body.paramKey||"")+i+e.body.userInformation+e.header.version;try{return e.body.sign=m(t).toUpperCase(),e}catch(t){return e}})(t,n===N.LT),function(t){var e=null==(e=null==(e=null==t?void 0:t.data)?void 0:e.body)?void 0:e.resultCode,t=null==(t=null==(t=null==t?void 0:t.data)?void 0:t.body)?void 0:t.token;r("000000"==e&&t?((e={})[n]=t,e):((t={})[n]="",t))},function(){var t;r(((t={})[n]="",t))})},Fr=function(i){void 0===i&&(i={});var t=(()=>{var t=((void 0===i?{}:i)||{}).appId,e=zr(),n=Mr(),r={header:{appId:t,msgId:e,timestamp:n,version:"1.0"},body:{businessType:"3",requestType:"1"}},t=t+r.body.businessType+e+n+r.header.version;try{return r.body.sign=m(t).toUpperCase(),r}catch(t){return r}})();return new Promise(function(r){cr("https://ua.cmpassport.com/api/h5/uaidGetCUAddress",t,function(t){var e=null==(e=null==(e=null==t?void 0:t.data)?void 0:e.body)?void 0:e.resultCode,n=null==(n=null==(n=null==t?void 0:t.data)?void 0:n.body)?void 0:n.reqUrl,t=null==(t=null==(t=null==t?void 0:t.data)?void 0:t.body)?void 0:t.appIdCU;"000000"==e&&n&&t?Kr(n,{appId:t},r,i):r(((e={})[N.LT]="",e))},function(){var t;r(((t={})[N.LT]="",t))})})},Kr=function(t,e,n,s){lr({url:(t=void 0===t?"":t)+"?"+qr(e=void 0===e?{}:e),paramsNeedCallback:!0,callbackName:"getUnicomUaidAuthUrl",successCallback:function(t){var r,i,t=(t.data||{}).authurl;t&&e&&n?(r=n,i=s,lr({url:(t=void 0===(t=t+"/api?")?"":t)+qr(void 0===e?{}:e),paramsNeedCallback:!0,callbackName:"getUnicomUaidAuthData",successCallback:function(t){var t=t.data,e=t||{},n=e.code;n&&e.province&&"-2"!=n?Hr(t||{},N.LT,r,i):null!=r&&r(((e={})[N.LT]="",e))},errorCallback:function(){var t;null!=r&&r(((t={})[N.LT]="",t))}})):null!=n&&n(((t={})[N.LT]="",t))},errorCallback:function(){var t;null!=n&&n(((t={})[N.LT]="",t))}})},Wr=function(h){var t=(()=>{var t=(h||{}).appId,e=zr(),n=Mr(),r={header:{appId:t,msgId:e,timestamp:n,version:"1.0"},body:{clientType:"1",format:"jsonp",businessType:"3",requestType:"1",callback:"getTelecomUaidToken"}},t=t+r.body.businessType+r.body.callback+r.body.clientType+r.body.format+e+n+r.header.version;try{return r.body.sign=m(t).toUpperCase(),r}catch(t){return r}})();return new Promise(function(a){cr("https://ua.cmpassport.com/api/h5/uaidGetCTAddress",t,function(t){var e=null==(e=null==(e=null==t?void 0:t.data)?void 0:e.body)?void 0:e.resultCode,n=null==(n=null==(n=null==t?void 0:t.data)?void 0:n.body)?void 0:n.reqUrl,r=null==(r=null==(r=null==t?void 0:t.data)?void 0:r.body)?void 0:r.appIdCT,i=null==(i=null==(i=null==t?void 0:t.data)?void 0:i.body)?void 0:i.paramKey,s=null==(s=null==(s=null==t?void 0:t.data)?void 0:s.body)?void 0:s.paramStr,o=null==(o=null==(o=null==t?void 0:t.data)?void 0:o.body)?void 0:o.sign,t=null==(t=null==(t=null==t?void 0:t.data)?void 0:t.body)?void 0:t.encryKeyA;"000000"==e&&n&&r?Gr(n,{appId:r,paramKey:i,paramStr:s,sign:o,version:"1.1",clientType:"10010",format:"jsonp"},a,h,t):a(((e={})[N.DX]="",e))},function(){var t;a(((t={})[N.DX]="",t))})})},Gr=function(t,e,n,r,i){lr({url:(t=void 0===t?"":t)+"?"+qr(e=void 0===e?{}:e),paramsNeedCallback:!1,callbackName:"getTelecomUaidToken",successCallback:function(t){var t=t.data,e=t||{};e.data&&"0"==e.result?(e=Object.assign(t||{},{encryKeyA:i}),Hr(e,N.DX,n,r)):n(((t={})[N.DX]="",t))},errorCallback:function(){var t;n(((t={})[N.DX]="",t))}})},N={YD:"mobile",LT:"unicom",DX:"telecom"};function Zr(t){C.smConf=Object.assign({},We,t);var e,n,r,i,s=ar(C.smConf.onError),o=(t||(s(z.BUSINESS_ERROR),Ir("config_empty"),C.setSmInfo("isNeedStop",!0)),C.smConf),a=o.publicKey,o=o.organization,h=(""===a&&(s(z.BUSINESS_ERROR),Ir("publicKey_empty"),C.setSmInfo("isNeedStop",!0)),""===o&&(s(z.BUSINESS_ERROR),Ir("organization_empty"),C.setSmInfo("isNeedStop",!0)),vr()),u=(C.setSmInfo("uid",h),m(h).slice(0,16)),o=".thumbcache_".concat(m(o));C.setSmInfo("priId",u),C.setSmInfo("storageName",o);try{n=h,r=a,(i=new zt).setPublicKey(r),e=i.encryptLong(n),C.setSmInfo("ep",e)}catch(t){s(z.UNKNOWN_ERROR),Ir("rsa_failed"),C.setSmInfo("isNeedStop",!0)}}function Xr(i,s){or().then(function(t){var e,n,r,t=kr(t);C.smInfo.isNeedStop||(k.isTaobao?(r=Rr(t),C.smFpParams=JSON.stringify(r),r=Ne(C.smFpParams),C.setSmInfo("smEncryptedData",r)):(e=i,n=s,r=(r=C.smConf).apiProtocol+"://"+r.apiHost+r.apiPath,t=Rr(t),C.setSmInfo("smEncryptedData",Ne(JSON.stringify(t))),cr(r,t,function(t){Or(t),null!=e&&e(t)},function(t){Or(t),null!=n&&n()})))})}P.exports={initConf:function(t){var e,n=(t||{}).uaidTokenParams;null!=n&&n.appId?(Zr(t),n=yr(),e=Tr(),n&&mr(n),e?Xr():(n&&Xr(),jr({handleFpData:Xr,smid:n}))):(Zr(t),(e=yr())&&mr(e),or().then(function(t){var e,t=kr(t);C.smInfo.isNeedStop||(k.isTaobao?(e=Rr(t),C.smFpParams=JSON.stringify(e),e=Ne(C.smFpParams),C.setSmInfo("smEncryptedData",e)):Ar(t))}))},getDeviceId:function(){return new Promise(function(e){function n(){var t=(t=C.getSmInfo("SMID"))?"B"+t:(t=C.getSmInfo("smEncryptedData"))?"D"+t:"";return t&&(e(t),t)}n()||or().then(function(t){n()||(t=Rr(kr(t)),t=Ne(JSON.stringify(t)),C.setSmInfo("smEncryptedData",t),e("D"+t))})})},getDeviceParams:function(){return new Promise(function(e){var t=C.smFpParams;t.os&&e(t),or().then(function(t){t=Rr(kr(t));e(JSON.stringify(t))})})},setDeviceIdInTaobao:function(t){mr(t=void 0===t?"":t)},getCurrentUaid:function(){var s;return U(this,void 0,void 0,function(){var e,n,r,i;return L(this,function(t){switch(t.label){case 0:return null!=(s=C.smConf)&&s.appId?(n=Tr())?[2,n]:(e=yr(),[4,new Promise(function(t){return jr({handleFpData:Xr,smid:e},t)})]):[2];case 1:return n=t.sent(),r=(i=n||{}).uaidTimeout,i=i.uaid,r&&i&&xr(r)?[2,i]:[2,""]}})})},setOpenId:function(t){C.setUserAuthInfo("openId",t=void 0===t?"":t)},setUnionId:function(t){C.setUserAuthInfo("unionId",t=void 0===t?"":t)}}}]);
|
package/package.json
CHANGED
|
@@ -1,43 +1,76 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lite-pos-wx-plugin-mate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "miniprogram_dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"miniprogram_dist",
|
|
8
|
+
"README.md"
|
|
9
|
+
],
|
|
6
10
|
"scripts": {
|
|
7
|
-
"dev": "gulp dev",
|
|
11
|
+
"dev": "gulp dev --develop",
|
|
12
|
+
"watch": "gulp watch --develop --watch",
|
|
8
13
|
"build": "gulp",
|
|
9
|
-
"
|
|
14
|
+
"dist": "npm run build",
|
|
15
|
+
"clean-dev": "gulp clean --develop",
|
|
16
|
+
"clean": "gulp clean",
|
|
17
|
+
"test": "jest --bail",
|
|
18
|
+
"test-debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --bail",
|
|
19
|
+
"coverage": "jest ./test/* --coverage --bail",
|
|
20
|
+
"lint": "eslint \"src/**/*.js\" --fix",
|
|
21
|
+
"lint-tools": "eslint \"tools/**/*.js\" --rule \"import/no-extraneous-dependencies: false\" --fix"
|
|
10
22
|
},
|
|
11
|
-
"keywords": [
|
|
12
|
-
"weixin",
|
|
13
|
-
"miniprogram",
|
|
14
|
-
"ui",
|
|
15
|
-
"components"
|
|
16
|
-
],
|
|
17
|
-
"author": "",
|
|
18
|
-
"license": "MIT",
|
|
19
23
|
"miniprogram": "miniprogram_dist",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
24
|
+
"jest": {
|
|
25
|
+
"testEnvironment": "jsdom",
|
|
26
|
+
"testURL": "https://jest.test",
|
|
27
|
+
"collectCoverageFrom": [
|
|
28
|
+
"miniprogram_dist/**/*.js"
|
|
29
|
+
],
|
|
30
|
+
"moduleDirectories": [
|
|
31
|
+
"node_modules",
|
|
32
|
+
"miniprogram_dist"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": ""
|
|
38
|
+
},
|
|
39
|
+
"author": "nhy",
|
|
40
|
+
"license": "MIT",
|
|
23
41
|
"devDependencies": {
|
|
24
|
-
"@babel/core": "^7.
|
|
25
|
-
"@babel/preset-env": "^7.
|
|
26
|
-
"
|
|
42
|
+
"@babel/core": "^7.18.10",
|
|
43
|
+
"@babel/preset-env": "^7.18.10",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^2.28.0",
|
|
45
|
+
"@typescript-eslint/parser": "^2.28.0",
|
|
46
|
+
"babel-loader": "^7.1.5",
|
|
47
|
+
"babel-plugin-module-resolver": "^3.2.0",
|
|
27
48
|
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
|
28
49
|
"babel-preset-env": "^1.7.0",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
50
|
+
"colors": "^1.3.1",
|
|
51
|
+
"eslint": "^5.14.1",
|
|
52
|
+
"eslint-config-airbnb-base": "13.1.0",
|
|
53
|
+
"eslint-loader": "^2.1.2",
|
|
54
|
+
"eslint-plugin-import": "^2.16.0",
|
|
55
|
+
"eslint-plugin-node": "^7.0.1",
|
|
56
|
+
"eslint-plugin-promise": "^3.8.0",
|
|
57
|
+
"gulp": "^4.0.0",
|
|
31
58
|
"gulp-clean": "^0.4.0",
|
|
32
|
-
"gulp-
|
|
33
|
-
"gulp-
|
|
34
|
-
"gulp-
|
|
35
|
-
"gulp-
|
|
36
|
-
"gulp-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
59
|
+
"gulp-if": "^2.0.2",
|
|
60
|
+
"gulp-install": "^1.1.0",
|
|
61
|
+
"gulp-less": "^4.0.1",
|
|
62
|
+
"gulp-rename": "^1.4.0",
|
|
63
|
+
"gulp-sourcemaps": "^2.6.5",
|
|
64
|
+
"jest": "^23.5.0",
|
|
65
|
+
"miniprogram-api-typings": "^2.10.3-1",
|
|
66
|
+
"miniprogram-simulate": "^1.2.5",
|
|
67
|
+
"thread-loader": "^2.1.3",
|
|
68
|
+
"through2": "^2.0.3",
|
|
69
|
+
"ts-loader": "^7.0.0",
|
|
70
|
+
"typescript": "^3.8.3",
|
|
71
|
+
"uglifyjs-webpack-plugin": "^2.2.0",
|
|
72
|
+
"vinyl": "^2.2.0",
|
|
73
|
+
"webpack": "^4.29.5",
|
|
74
|
+
"webpack-node-externals": "^1.7.2"
|
|
75
|
+
}
|
|
43
76
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<view class="sqb-loading-wrap"><view class="sqb-load-blocks-wrapper"><view class="sqb-load-block-wrapper"><view class="sqb-load-block-wrap1"><view class="sqb-load-block1"></view></view><view class="sqb-load-block-wrap1 sqb-load-block-wrap2"><view class="sqb-load-block1"></view></view><view class="sqb-load-block-wrap1 sqb-load-block-wrap3"><view class="sqb-load-block1"></view></view><view class="sqb-load-block-wrap1 sqb-load-block-wrap4"><view class="sqb-load-block1"></view></view></view></view><view class="sqb-load-text">加载中,请稍等···</view></view>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.sqb-loading-wrap{width:100vw;text-align:center;padding-top:400rpx}.sqb-load-blocks-wrapper{display:flex;align-items:center;justify-content:space-around;width:100%}.sqb-load-block-wrapper{margin:0 auto;display:flex;align-items:center}.sqb-load-block-wrap1{display:flex;align-items:center;height:100rpx;width:42rpx;overflow:hidden;justify-content:space-around;animation:.8s infinite loadAnimation1}.sqb-load-block1{height:120rpx;width:26rpx;background-color:#e0e0e0;transform:rotate(7deg)}.sqb-load-text{margin-top:100rpx;color:#262626;font-size:30rpx;line-height:44rpx;font-weight:500}.sqb-load-block-wrap2{animation:.8s infinite sqb-loadAnimation2}@keyframes sqb-loadAnimation2{0%{transform:scale(.8);opacity:.8}16.6%{transform:scale(.6);opacity:.6}33.3%{transform:scale(.5);opacity:.5}50%{transform:scale(.6);opacity:.6}66.7%{transform:scale(.8);opacity:.8}83.3%{transform:scale(1);opacity:1}100%{transform:scale(.8);opacity:.8}}.sqb-load-block-wrap3{animation:.8s infinite sqb-loadAnimation3}@keyframes sqb-loadAnimation3{0%{transform:scale(.6);opacity:.6}16.6%{transform:scale(.5);opacity:.5}33.3%{transform:scale(.6);opacity:.6}50%{transform:scale(.8);opacity:.8}66.7%{transform:scale(1);opacity:1}83.3%{transform:scale(.8);opacity:.8}100%{transform:scale(.6);opacity:.6}}.sqb-load-block-wrap4{animation:.8s infinite sqb-loadAnimation4}@keyframes sqb-loadAnimation4{0%{transform:scale(.5);opacity:.5}16.6%{transform:scale(.6);opacity:.6}33.3%{transform:scale(.8);opacity:.8}50%{transform:scale(1);opacity:1}66.7%{transform:scale(.8);opacity:.8}83.3%{transform:scale(.6);opacity:.6}100%{transform:scale(.5);opacity:.5}}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* global requirePlugin */Component({properties:{wxpluginName:String,themeColor:{type:Object,value:{bg_color:"#262626",fg_color:"#ffffff"}},themeButton:{type:Object,value:{button_radius:0}}},data:{isGoAuth:!1,
|
|
3
|
-
// 是否已经去过微信授权的插件
|
|
4
|
-
isShowUI:"loading",
|
|
5
|
-
// 是否展示ui
|
|
6
|
-
wxAuthplugin:null},pageLifetimes:{show:function show(){var t=this;
|
|
7
|
-
// 检查是否已经导入插件
|
|
8
|
-
if(console.log("pageLifetimes ==== show",this.properties.themeColor,this.data.themeButton,this.data.wxpluginName),!this.data.wxAuthplugin){
|
|
9
|
-
// 如果未导入,则导入插件
|
|
10
|
-
var i=requirePlugin(this.properties.wxpluginName||"wx-auth-plugin");this.setData({wxAuthplugin:i})}
|
|
11
|
-
// 使用已导入的插件
|
|
12
|
-
this.data.wxAuthplugin.getRetailInfo({success:function success(i){console.log("wxAuthplugin.getRetailInfo===",i,t.data.isGoAuth),i.status||t.data.isGoAuth?i.status?(t.setData({isShowUI:"success"}),t.data.isGoAuth&&wx.navigateBack()):t.setData({isShowUI:"fail"}):(wx.navigateTo({url:"plugin://"+(t.properties.wxpluginName||"wx-auth-plugin")+"/info-regist"}),t.setData({isGoAuth:!0,isShowUI:"loading"}))}})}},methods:{onClickGoAuthBtn:function onClickGoAuthBtn(){
|
|
13
|
-
// 确保插件已导入
|
|
14
|
-
if(!this.data.wxAuthplugin){var t=requirePlugin(this.properties.wxpluginName||"wx-auth-plugin");this.setData({wxAuthplugin:t})}wx.navigateTo({url:"plugin://"+(this.properties.wxpluginName||"wx-auth-plugin")+"/info-regist"})},onClickLitePosBtn:function onClickLitePosBtn(){
|
|
15
|
-
// console.log('onClickLitePosBtn')
|
|
16
|
-
wx.navigateBack()}},observers:{"themeColor, themeButton":function themeColor_themeButton(t,i){console.log("属性变化:",t,i)}},attached:function attached(){console.log("组件属性:",this.properties)}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<view class="wx-b2b-auth-bridge-wrap" wx:if="{{isShowUI === 'fail'}}"><view class="b2b-auth-img-wrap"><image class="b2b-auth-img" mode="aspectFit" src="https://wosai-images.oss-cn-hangzhou.aliyuncs.com/litepos/wx-un-auth-store.png" alt=""/></view><view class="b2b-auth-txt">您的门店认证尚未完成</view><view class="b2b-auth-btn-wrap"><view class="b2b-auth-btn" style="background-color:{{themeColor.bg_color || '#262626'}}; color: {{themeColor.fg_color || '#ffffff'}}; border-radius: {{themeButton.button_radius ? themeButton.button_radius + 'px': '0'}};" bind:tap="onClickGoAuthBtn">继续认证</view><view class="b2b-auth-hollow-btn" style="border-color:{{themeColor.bg_color || '#262626'}}; color: {{themeColor.bg_color || '#262626'}}; border-radius: {{themeButton.button_radius ? themeButton.button_radius + 'px': '0'}};" bind:tap="onClickLitePosBtn">更换支付方式</view></view></view><view class="wx-b2b-auth-bridge-wrap" wx:if="{{isShowUI === 'success'}}"><view class="b2b-auth-img-wrap"><image class="b2b-auth-img" mode="aspectFit" src="https://wosai-images.oss-cn-hangzhou.aliyuncs.com/litepos/wx-authed-store.png" alt=""/></view><view class="b2b-auth-txt">您的门店认证已完成,请返回查看</view><view class="b2b-auth-btn-wrap"><view class="b2b-auth-btn" style="background-color:{{themeColor.bg_color || '#262626'}}; color: {{themeColor.fg_color || '#ffffff'}}; border-radius: {{themeButton.button_radius ? themeButton.button_radius + 'px': '0'}};" bind:tap="onClickGoAuthBtn">重新认证</view><view class="b2b-auth-hollow-btn" style="border-color:{{themeColor.bg_color || '#262626'}}; color: {{themeColor.bg_color || '#262626'}}; border-radius: {{themeButton.button_radius ? themeButton.button_radius + 'px': '0'}};" bind:tap="onClickLitePosBtn">返回</view></view></view><sqb-loading wx:else></sqb-loading>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.wx-b2b-auth-bridge-wrap{width:100vw;height:100vh;background-color:#fff;padding-top:236rpx;box-sizing:border-box}.b2b-auth-img-wrap{display:flex;justify-content:center;align-items:center}.b2b-auth-img{height:132rpx;width:132rpx}.b2b-auth-txt{margin-top:66rpx;color:#262626;font-size:30rpx;line-height:54rpx;text-align:center}.b2b-auth-btn-wrap{position:fixed;bottom:96rpx;width:100%}.b2b-auth-btn{height:96rpx;width:calc(100% - 128rpx);border-radius:0;line-height:96rpx;color:#fff;background-color:#262626;font-size:32rpx;text-align:center;margin:0 auto 42rpx;font-weight:700}.b2b-auth-hollow-btn{height:96rpx;width:calc(100% - 128rpx);border-radius:0;line-height:92rpx;color:#262626;border:1px solid #262626;background-color:#fff;font-size:32rpx;text-align:center;margin:0 auto;font-weight:700;box-sizing:border-box}
|