gc_mobile 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/main.js +22 -22
- package/libs/main.umd.cjs +6 -6
- package/package.json +1 -1
- package/src/index.js +2 -1
- package/src/modules/dd.js +5 -4
package/libs/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t0, { mapKeys as $e, isEmpty as C0, includes as Pe, sortBy as Se, map as Oe, isArray as rt, toLower as et, mapValues as tt, keys as nt, compact as xt, forEach as at, get as Mr, isString as ot, toString as Ur, now as it, random as st } from "lodash-es";
|
|
2
2
|
import * as e0 from "dingtalk-jsapi";
|
|
3
3
|
import w0, { stringify as ct } from "qs";
|
|
4
4
|
import m0 from "axios";
|
|
@@ -26,7 +26,7 @@ const ht = [
|
|
|
26
26
|
name: "钉钉",
|
|
27
27
|
value: /DingTalk/i.test(R0)
|
|
28
28
|
}
|
|
29
|
-
], ut = (x) => x.value, Tr =
|
|
29
|
+
], ut = (x) => x.value, Tr = t0.find(ht, ut);
|
|
30
30
|
Tr ? Er = Tr : ft() && (Er = {
|
|
31
31
|
code: "h5",
|
|
32
32
|
name: "H5"
|
|
@@ -1381,8 +1381,8 @@ function je() {
|
|
|
1381
1381
|
var wr = i[o0 - 15], v0 = wr.high, D0 = wr.low, Ue = (v0 >>> 1 | D0 << 31) ^ (v0 >>> 8 | D0 << 24) ^ v0 >>> 7, Hr = (D0 >>> 1 | v0 << 31) ^ (D0 >>> 8 | v0 << 24) ^ (D0 >>> 7 | v0 << 25), Pr = i[o0 - 2], p0 = Pr.high, g0 = Pr.low, Te = (p0 >>> 19 | g0 << 13) ^ (p0 << 3 | g0 >>> 29) ^ p0 >>> 6, Sr = (g0 >>> 19 | p0 << 13) ^ (g0 << 3 | p0 >>> 29) ^ (g0 >>> 6 | p0 << 26), Or = i[o0 - 7], Ge = Or.high, Le = Or.low, kr = i[o0 - 16], Qe = kr.high, zr = kr.low;
|
|
1382
1382
|
a0 = Hr + Le, f0 = Ue + Ge + (a0 >>> 0 < Hr >>> 0 ? 1 : 0), a0 = a0 + Sr, f0 = f0 + Te + (a0 >>> 0 < Sr >>> 0 ? 1 : 0), a0 = a0 + zr, f0 = f0 + Qe + (a0 >>> 0 < zr >>> 0 ? 1 : 0), S0.high = f0, S0.low = a0;
|
|
1383
1383
|
}
|
|
1384
|
-
var Ve = K & x0 ^ ~K & P0, jr = Y & s0 ^ ~Y & E0, We = T & W ^ T & $ ^ W & $, Ke = M & q ^ M & r0 ^ q & r0, Ye = (T >>> 28 | M << 4) ^ (T << 30 | M >>> 2) ^ (T << 25 | M >>> 7), Nr = (M >>> 28 | T << 4) ^ (M << 30 | T >>> 2) ^ (M << 25 | T >>> 7), Ze = (K >>> 14 | Y << 18) ^ (K >>> 18 | Y << 14) ^ (K << 23 | Y >>> 9), Xe = (Y >>> 14 | K << 18) ^ (Y >>> 18 | K << 14) ^ (Y << 23 | K >>> 9), Rr = B[o0], Je = Rr.high, qr = Rr.low,
|
|
1385
|
-
N0 = P0, F0 = E0, P0 = x0, E0 = s0, x0 = K, s0 = Y, Y = X +
|
|
1384
|
+
var Ve = K & x0 ^ ~K & P0, jr = Y & s0 ^ ~Y & E0, We = T & W ^ T & $ ^ W & $, Ke = M & q ^ M & r0 ^ q & r0, Ye = (T >>> 28 | M << 4) ^ (T << 30 | M >>> 2) ^ (T << 25 | M >>> 7), Nr = (M >>> 28 | T << 4) ^ (M << 30 | T >>> 2) ^ (M << 25 | T >>> 7), Ze = (K >>> 14 | Y << 18) ^ (K >>> 18 | Y << 14) ^ (K << 23 | Y >>> 9), Xe = (Y >>> 14 | K << 18) ^ (Y >>> 18 | K << 14) ^ (Y << 23 | K >>> 9), Rr = B[o0], Je = Rr.high, qr = Rr.low, n0 = F0 + Xe, h0 = N0 + Ze + (n0 >>> 0 < F0 >>> 0 ? 1 : 0), n0 = n0 + jr, h0 = h0 + Ve + (n0 >>> 0 < jr >>> 0 ? 1 : 0), n0 = n0 + qr, h0 = h0 + Je + (n0 >>> 0 < qr >>> 0 ? 1 : 0), n0 = n0 + a0, h0 = h0 + f0 + (n0 >>> 0 < a0 >>> 0 ? 1 : 0), Ir = Nr + Ke, _e = Ye + We + (Ir >>> 0 < Nr >>> 0 ? 1 : 0);
|
|
1385
|
+
N0 = P0, F0 = E0, P0 = x0, E0 = s0, x0 = K, s0 = Y, Y = X + n0 | 0, K = Z + h0 + (Y >>> 0 < X >>> 0 ? 1 : 0) | 0, Z = $, X = r0, $ = W, r0 = q, W = T, q = M, M = n0 + Ir | 0, T = h0 + _e + (M >>> 0 < n0 >>> 0 ? 1 : 0) | 0;
|
|
1386
1386
|
}
|
|
1387
1387
|
C = D.low = C + M, D.high = z + T + (C >>> 0 < M >>> 0 ? 1 : 0), k = a.low = k + q, a.high = y + W + (k >>> 0 < q >>> 0 ? 1 : 0), N = s.low = N + r0, s.high = O + $ + (N >>> 0 < r0 >>> 0 ? 1 : 0), I = v.low = I + X, v.high = R + Z + (I >>> 0 < X >>> 0 ? 1 : 0), L = F.low = L + Y, F.high = Q + K + (L >>> 0 < Y >>> 0 ? 1 : 0), j = g.low = j + s0, g.high = V + x0 + (j >>> 0 < s0 >>> 0 ? 1 : 0), H = m.low = H + E0, m.high = b + P0 + (H >>> 0 < E0 >>> 0 ? 1 : 0), P = w.low = P + F0, w.high = S + N0 + (P >>> 0 < F0 >>> 0 ? 1 : 0);
|
|
1388
1388
|
},
|
|
@@ -5363,7 +5363,7 @@ var He;
|
|
|
5363
5363
|
const Vt = w0.parse(
|
|
5364
5364
|
(He = location.search) != null && He.endsWith("/") ? location.search.slice(0, -1) : location.search,
|
|
5365
5365
|
{ ignoreQueryPrefix: !0 }
|
|
5366
|
-
), Br =
|
|
5366
|
+
), Br = t0.get(Vt, "corpId"), Wt = async ({
|
|
5367
5367
|
appCode: x,
|
|
5368
5368
|
apiPrefix: h,
|
|
5369
5369
|
manual: r = !1,
|
|
@@ -5381,22 +5381,22 @@ const Vt = w0.parse(
|
|
|
5381
5381
|
authCode: E,
|
|
5382
5382
|
corpId: Br
|
|
5383
5383
|
}
|
|
5384
|
-
), d =
|
|
5385
|
-
if (d &&
|
|
5386
|
-
const t =
|
|
5387
|
-
|
|
5388
|
-
onSuccess: async function(
|
|
5389
|
-
|
|
5384
|
+
), d = t0.get(n, e.dataPath, n);
|
|
5385
|
+
if (d && t0.get(d, "result") === 0) {
|
|
5386
|
+
const t = t0.get(d, "retVal", n), o = t0.get(d, "thirdBiz"), { ucToken: B } = t;
|
|
5387
|
+
t0.isEmpty(B) ? e0.biz.realm.getUserExclusiveInfo({
|
|
5388
|
+
onSuccess: async function(i) {
|
|
5389
|
+
i.isExclusiveApp === 0 && !r ? await Ne({ apiPrefix: h, appCode: x, map: e, userInfo: t, thirdBiz: o }) : u({ userInfo: t, thirdBiz: o });
|
|
5390
5390
|
},
|
|
5391
|
-
onFail: function(
|
|
5392
|
-
u({ userInfo: t });
|
|
5391
|
+
onFail: function(i) {
|
|
5392
|
+
u({ userInfo: t, thirdBiz: o });
|
|
5393
5393
|
}
|
|
5394
|
-
}) : u({ userInfo: t });
|
|
5394
|
+
}) : u({ userInfo: t, thirdBiz: o });
|
|
5395
5395
|
} else
|
|
5396
5396
|
console.log("error:response", d), e0.showToast({
|
|
5397
5397
|
type: "fail",
|
|
5398
5398
|
duration: 2e3,
|
|
5399
|
-
content:
|
|
5399
|
+
content: t0.get(d, "msg") || "未知错误",
|
|
5400
5400
|
complete: () => {
|
|
5401
5401
|
}
|
|
5402
5402
|
}), u({ res: n });
|
|
@@ -5419,7 +5419,7 @@ const Vt = w0.parse(
|
|
|
5419
5419
|
appCode: r
|
|
5420
5420
|
});
|
|
5421
5421
|
if (u) {
|
|
5422
|
-
const E =
|
|
5422
|
+
const E = t0.get(t0.get(u, e.dataPath, u), "retVal");
|
|
5423
5423
|
let n = Qt;
|
|
5424
5424
|
for (const t in E)
|
|
5425
5425
|
if (E.hasOwnProperty(t)) {
|
|
@@ -5470,8 +5470,8 @@ const Vt = w0.parse(
|
|
|
5470
5470
|
console.log("加密后的密码:", D.toString()), e0.showLoading({ content: "绑定中..." });
|
|
5471
5471
|
const a = await m0.post(`${p}/api/auth/normalBindThird`, {
|
|
5472
5472
|
appCode: r,
|
|
5473
|
-
unitCode:
|
|
5474
|
-
username:
|
|
5473
|
+
unitCode: t0.toUpper(f),
|
|
5474
|
+
username: t0.toUpper(c),
|
|
5475
5475
|
password: D.toString(),
|
|
5476
5476
|
userId: B,
|
|
5477
5477
|
corpId: i
|
|
@@ -5497,8 +5497,8 @@ const Vt = w0.parse(
|
|
|
5497
5497
|
appCode: x,
|
|
5498
5498
|
userId: p,
|
|
5499
5499
|
corpId: u
|
|
5500
|
-
}), t =
|
|
5501
|
-
t &&
|
|
5500
|
+
}), t = t0.get(d, e.dataPath, d);
|
|
5501
|
+
t && t0.get(t, "result") === 0 ? n(!0) : n(!1);
|
|
5502
5502
|
});
|
|
5503
5503
|
}, Yt = {
|
|
5504
5504
|
bind: Ne,
|
|
@@ -6179,8 +6179,8 @@ class Jn {
|
|
|
6179
6179
|
}
|
|
6180
6180
|
async init() {
|
|
6181
6181
|
try {
|
|
6182
|
-
const h = await this.js.login(this.config), { userInfo: r } = h;
|
|
6183
|
-
this.userInfo = r, this.userInfo.unBind = this.unBind.bind(this), this.userInfo.bind = this.bind.bind(this);
|
|
6182
|
+
const h = await this.js.login(this.config), { userInfo: r, thirdBiz: e } = h;
|
|
6183
|
+
this.userInfo = r, this.thirdBiz = e, this.userInfo.unBind = this.unBind.bind(this), this.userInfo.bind = this.bind.bind(this);
|
|
6184
6184
|
} catch (h) {
|
|
6185
6185
|
console.log(h);
|
|
6186
6186
|
}
|
package/libs/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(o0,U){typeof exports=="object"&&typeof module<"u"?U(exports,require("lodash-es"),require("dingtalk-jsapi"),require("qs"),require("axios")):typeof define=="function"&&define.amd?define(["exports","lodash-es","dingtalk-jsapi","qs","axios"],U):(o0=typeof globalThis<"u"?globalThis:o0||self,U(o0.Main={},o0._,o0.dd$1,o0.qs,o0.axios))})(this,function(o0,U,Ne,p0,F0){"use strict";var De;function Re(x){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(x){for(const r in x)if(r!=="default"){const e=Object.getOwnPropertyDescriptor(x,r);Object.defineProperty(f,r,e.get?e:{enumerable:!0,get:()=>x[r]})}}return f.default=x,Object.freeze(f)}const t0=Re(Ne),N0=window.navigator.userAgent.toLowerCase();let R0={code:"",name:"未知"};function qe(){return typeof window<"u"&&typeof document<"u"&&typeof document.querySelector=="function"&&typeof navigator<"u"&&typeof XMLHttpRequest=="function"}const Ie=[{code:"weixin",name:"微信",value:/MicroMessenger/i.test(N0)},{code:"wxmp",name:"微信小程序",value:/miniProgram/i.test(N0)||window.__wxjs_environment==="miniprogram"},{code:"dd",name:"钉钉",value:/DingTalk/i.test(N0)}],Me=x=>x.value,wr=U.find(Ie,Me);wr?R0=wr:qe()&&(R0={code:"h5",name:"H5"});const q0=R0,I0=x=>x=="dev"?"https://test.ihotel.cn/gw/v1/platform-gcding":x=="prod"?"https://smart.ihotel.cn/guardian/gw/v1/platform-gcding":x||"https://test.ihotel.cn/gw/v1/platform-gcding";var T=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function D0(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}function Ue(x){if(x.__esModule)return x;var f=x.default;if(typeof f=="function"){var r=function e(){return this instanceof e?Reflect.construct(f,arguments,this.constructor):f.apply(this,arguments)};r.prototype=f.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(x).forEach(function(e){var p=Object.getOwnPropertyDescriptor(x,e);Object.defineProperty(r,e,p.get?p:{enumerable:!0,get:function(){return x[e]}})}),r}var Hr={exports:{}};function Te(x){throw new Error('Could not dynamically require "'+x+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var M0={exports:{}};const Ge=Ue(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Pr;function L(){return Pr||(Pr=1,function(x,f){(function(r,e){x.exports=e()})(T,function(){var r=r||function(e,p){var u;if(typeof window<"u"&&window.crypto&&(u=window.crypto),typeof self<"u"&&self.crypto&&(u=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(u=globalThis.crypto),!u&&typeof window<"u"&&window.msCrypto&&(u=window.msCrypto),!u&&typeof T<"u"&&T.crypto&&(u=T.crypto),!u&&typeof Te=="function")try{u=Ge}catch{}var E=function(){if(u){if(typeof u.getRandomValues=="function")try{return u.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof u.randomBytes=="function")try{return u.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function a(){}return function(s){var v;return a.prototype=s,v=new a,a.prototype=null,v}}(),d={},t=d.lib={},o=t.Base=function(){return{extend:function(a){var s=n(this);return a&&s.mixIn(a),(!s.hasOwnProperty("init")||this.init===s.init)&&(s.init=function(){s.$super.init.apply(this,arguments)}),s.init.prototype=s,s.$super=this,s},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var s in a)a.hasOwnProperty(s)&&(this[s]=a[s]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),B=t.WordArray=o.extend({init:function(a,s){a=this.words=a||[],s!=p?this.sigBytes=s:this.sigBytes=a.length*4},toString:function(a){return(a||h).stringify(this)},concat:function(a){var s=this.words,v=a.words,F=this.sigBytes,g=a.sigBytes;if(this.clamp(),F%4)for(var m=0;m<g;m++){var w=v[m>>>2]>>>24-m%4*8&255;s[F+m>>>2]|=w<<24-(F+m)%4*8}else for(var z=0;z<g;z+=4)s[F+z>>>2]=v[z>>>2];return this.sigBytes+=g,this},clamp:function(){var a=this.words,s=this.sigBytes;a[s>>>2]&=4294967295<<32-s%4*8,a.length=e.ceil(s/4)},clone:function(){var a=o.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var s=[],v=0;v<a;v+=4)s.push(E());return new B.init(s,a)}}),i=d.enc={},h=i.Hex={stringify:function(a){for(var s=a.words,v=a.sigBytes,F=[],g=0;g<v;g++){var m=s[g>>>2]>>>24-g%4*8&255;F.push((m>>>4).toString(16)),F.push((m&15).toString(16))}return F.join("")},parse:function(a){for(var s=a.length,v=[],F=0;F<s;F+=2)v[F>>>3]|=parseInt(a.substr(F,2),16)<<24-F%8*4;return new B.init(v,s/2)}},c=i.Latin1={stringify:function(a){for(var s=a.words,v=a.sigBytes,F=[],g=0;g<v;g++){var m=s[g>>>2]>>>24-g%4*8&255;F.push(String.fromCharCode(m))}return F.join("")},parse:function(a){for(var s=a.length,v=[],F=0;F<s;F++)v[F>>>2]|=(a.charCodeAt(F)&255)<<24-F%4*8;return new B.init(v,s)}},A=i.Utf8={stringify:function(a){try{return decodeURIComponent(escape(c.stringify(a)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(a){return c.parse(unescape(encodeURIComponent(a)))}},l=t.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new B.init,this._nDataBytes=0},_append:function(a){typeof a=="string"&&(a=A.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var s,v=this._data,F=v.words,g=v.sigBytes,m=this.blockSize,w=m*4,z=g/w;a?z=e.ceil(z):z=e.max((z|0)-this._minBufferSize,0);var C=z*m,y=e.min(C*4,g);if(C){for(var k=0;k<C;k+=m)this._doProcessBlock(F,k);s=F.splice(0,C),v.sigBytes-=y}return new B.init(s,y)},clone:function(){var a=o.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});t.Hasher=l.extend({cfg:o.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var s=this._doFinalize();return s},blockSize:16,_createHelper:function(a){return function(s,v){return new a.init(v).finalize(s)}},_createHmacHelper:function(a){return function(s,v){return new D.HMAC.init(a,v).finalize(s)}}});var D=d.algo={};return d}(Math);return r})}(M0)),M0.exports}var U0={exports:{}},Sr;function P0(){return Sr||(Sr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(e){var p=r,u=p.lib,E=u.Base,n=u.WordArray,d=p.x64={};d.Word=E.extend({init:function(t,o){this.high=t,this.low=o}}),d.WordArray=E.extend({init:function(t,o){t=this.words=t||[],o!=e?this.sigBytes=o:this.sigBytes=t.length*8},toX32:function(){for(var t=this.words,o=t.length,B=[],i=0;i<o;i++){var h=t[i];B.push(h.high),B.push(h.low)}return n.create(B,this.sigBytes)},clone:function(){for(var t=E.clone.call(this),o=t.words=this.words.slice(0),B=o.length,i=0;i<B;i++)o[i]=o[i].clone();return t}})}(),r})}(U0)),U0.exports}var T0={exports:{}},Or;function Le(){return Or||(Or=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){if(typeof ArrayBuffer=="function"){var e=r,p=e.lib,u=p.WordArray,E=u.init,n=u.init=function(d){if(d instanceof ArrayBuffer&&(d=new Uint8Array(d)),(d instanceof Int8Array||typeof Uint8ClampedArray<"u"&&d instanceof Uint8ClampedArray||d instanceof Int16Array||d instanceof Uint16Array||d instanceof Int32Array||d instanceof Uint32Array||d instanceof Float32Array||d instanceof Float64Array)&&(d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength)),d instanceof Uint8Array){for(var t=d.byteLength,o=[],B=0;B<t;B++)o[B>>>2]|=d[B]<<24-B%4*8;E.call(this,o,t)}else E.apply(this,arguments)};n.prototype=u}}(),r.lib.WordArray})}(T0)),T0.exports}var G0={exports:{}},kr;function Qe(){return kr||(kr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=e.enc;E.Utf16=E.Utf16BE={stringify:function(d){for(var t=d.words,o=d.sigBytes,B=[],i=0;i<o;i+=2){var h=t[i>>>2]>>>16-i%4*8&65535;B.push(String.fromCharCode(h))}return B.join("")},parse:function(d){for(var t=d.length,o=[],B=0;B<t;B++)o[B>>>1]|=d.charCodeAt(B)<<16-B%2*16;return u.create(o,t*2)}},E.Utf16LE={stringify:function(d){for(var t=d.words,o=d.sigBytes,B=[],i=0;i<o;i+=2){var h=n(t[i>>>2]>>>16-i%4*8&65535);B.push(String.fromCharCode(h))}return B.join("")},parse:function(d){for(var t=d.length,o=[],B=0;B<t;B++)o[B>>>1]|=n(d.charCodeAt(B)<<16-B%2*16);return u.create(o,t*2)}};function n(d){return d<<8&4278255360|d>>>8&16711935}}(),r.enc.Utf16})}(G0)),G0.exports}var L0={exports:{}},zr;function h0(){return zr||(zr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=e.enc;E.Base64={stringify:function(d){var t=d.words,o=d.sigBytes,B=this._map;d.clamp();for(var i=[],h=0;h<o;h+=3)for(var c=t[h>>>2]>>>24-h%4*8&255,A=t[h+1>>>2]>>>24-(h+1)%4*8&255,l=t[h+2>>>2]>>>24-(h+2)%4*8&255,D=c<<16|A<<8|l,a=0;a<4&&h+a*.75<o;a++)i.push(B.charAt(D>>>6*(3-a)&63));var s=B.charAt(64);if(s)for(;i.length%4;)i.push(s);return i.join("")},parse:function(d){var t=d.length,o=this._map,B=this._reverseMap;if(!B){B=this._reverseMap=[];for(var i=0;i<o.length;i++)B[o.charCodeAt(i)]=i}var h=o.charAt(64);if(h){var c=d.indexOf(h);c!==-1&&(t=c)}return n(d,t,B)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function n(d,t,o){for(var B=[],i=0,h=0;h<t;h++)if(h%4){var c=o[d.charCodeAt(h-1)]<<h%4*2,A=o[d.charCodeAt(h)]>>>6-h%4*2,l=c|A;B[i>>>2]|=l<<24-i%4*8,i++}return u.create(B,i)}}(),r.enc.Base64})}(L0)),L0.exports}var Q0={exports:{}},jr;function Ve(){return jr||(jr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=e.enc;E.Base64url={stringify:function(d,t){t===void 0&&(t=!0);var o=d.words,B=d.sigBytes,i=t?this._safe_map:this._map;d.clamp();for(var h=[],c=0;c<B;c+=3)for(var A=o[c>>>2]>>>24-c%4*8&255,l=o[c+1>>>2]>>>24-(c+1)%4*8&255,D=o[c+2>>>2]>>>24-(c+2)%4*8&255,a=A<<16|l<<8|D,s=0;s<4&&c+s*.75<B;s++)h.push(i.charAt(a>>>6*(3-s)&63));var v=i.charAt(64);if(v)for(;h.length%4;)h.push(v);return h.join("")},parse:function(d,t){t===void 0&&(t=!0);var o=d.length,B=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var h=0;h<B.length;h++)i[B.charCodeAt(h)]=h}var c=B.charAt(64);if(c){var A=d.indexOf(c);A!==-1&&(o=A)}return n(d,o,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function n(d,t,o){for(var B=[],i=0,h=0;h<t;h++)if(h%4){var c=o[d.charCodeAt(h-1)]<<h%4*2,A=o[d.charCodeAt(h)]>>>6-h%4*2,l=c|A;B[i>>>2]|=l<<24-i%4*8,i++}return u.create(B,i)}}(),r.enc.Base64url})}(Q0)),Q0.exports}var V0={exports:{}},Nr;function u0(){return Nr||(Nr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(e){var p=r,u=p.lib,E=u.WordArray,n=u.Hasher,d=p.algo,t=[];(function(){for(var A=0;A<64;A++)t[A]=e.abs(e.sin(A+1))*4294967296|0})();var o=d.MD5=n.extend({_doReset:function(){this._hash=new E.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(A,l){for(var D=0;D<16;D++){var a=l+D,s=A[a];A[a]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}var v=this._hash.words,F=A[l+0],g=A[l+1],m=A[l+2],w=A[l+3],z=A[l+4],C=A[l+5],y=A[l+6],k=A[l+7],O=A[l+8],N=A[l+9],R=A[l+10],I=A[l+11],V=A[l+12],Q=A[l+13],W=A[l+14],j=A[l+15],b=v[0],H=v[1],S=v[2],P=v[3];b=B(b,H,S,P,F,7,t[0]),P=B(P,b,H,S,g,12,t[1]),S=B(S,P,b,H,m,17,t[2]),H=B(H,S,P,b,w,22,t[3]),b=B(b,H,S,P,z,7,t[4]),P=B(P,b,H,S,C,12,t[5]),S=B(S,P,b,H,y,17,t[6]),H=B(H,S,P,b,k,22,t[7]),b=B(b,H,S,P,O,7,t[8]),P=B(P,b,H,S,N,12,t[9]),S=B(S,P,b,H,R,17,t[10]),H=B(H,S,P,b,I,22,t[11]),b=B(b,H,S,P,V,7,t[12]),P=B(P,b,H,S,Q,12,t[13]),S=B(S,P,b,H,W,17,t[14]),H=B(H,S,P,b,j,22,t[15]),b=i(b,H,S,P,g,5,t[16]),P=i(P,b,H,S,y,9,t[17]),S=i(S,P,b,H,I,14,t[18]),H=i(H,S,P,b,F,20,t[19]),b=i(b,H,S,P,C,5,t[20]),P=i(P,b,H,S,R,9,t[21]),S=i(S,P,b,H,j,14,t[22]),H=i(H,S,P,b,z,20,t[23]),b=i(b,H,S,P,N,5,t[24]),P=i(P,b,H,S,W,9,t[25]),S=i(S,P,b,H,w,14,t[26]),H=i(H,S,P,b,O,20,t[27]),b=i(b,H,S,P,Q,5,t[28]),P=i(P,b,H,S,m,9,t[29]),S=i(S,P,b,H,k,14,t[30]),H=i(H,S,P,b,V,20,t[31]),b=h(b,H,S,P,C,4,t[32]),P=h(P,b,H,S,O,11,t[33]),S=h(S,P,b,H,I,16,t[34]),H=h(H,S,P,b,W,23,t[35]),b=h(b,H,S,P,g,4,t[36]),P=h(P,b,H,S,z,11,t[37]),S=h(S,P,b,H,k,16,t[38]),H=h(H,S,P,b,R,23,t[39]),b=h(b,H,S,P,Q,4,t[40]),P=h(P,b,H,S,F,11,t[41]),S=h(S,P,b,H,w,16,t[42]),H=h(H,S,P,b,y,23,t[43]),b=h(b,H,S,P,N,4,t[44]),P=h(P,b,H,S,V,11,t[45]),S=h(S,P,b,H,j,16,t[46]),H=h(H,S,P,b,m,23,t[47]),b=c(b,H,S,P,F,6,t[48]),P=c(P,b,H,S,k,10,t[49]),S=c(S,P,b,H,W,15,t[50]),H=c(H,S,P,b,C,21,t[51]),b=c(b,H,S,P,V,6,t[52]),P=c(P,b,H,S,w,10,t[53]),S=c(S,P,b,H,R,15,t[54]),H=c(H,S,P,b,g,21,t[55]),b=c(b,H,S,P,O,6,t[56]),P=c(P,b,H,S,j,10,t[57]),S=c(S,P,b,H,y,15,t[58]),H=c(H,S,P,b,Q,21,t[59]),b=c(b,H,S,P,z,6,t[60]),P=c(P,b,H,S,I,10,t[61]),S=c(S,P,b,H,m,15,t[62]),H=c(H,S,P,b,N,21,t[63]),v[0]=v[0]+b|0,v[1]=v[1]+H|0,v[2]=v[2]+S|0,v[3]=v[3]+P|0},_doFinalize:function(){var A=this._data,l=A.words,D=this._nDataBytes*8,a=A.sigBytes*8;l[a>>>5]|=128<<24-a%32;var s=e.floor(D/4294967296),v=D;l[(a+64>>>9<<4)+15]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,l[(a+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,A.sigBytes=(l.length+1)*4,this._process();for(var F=this._hash,g=F.words,m=0;m<4;m++){var w=g[m];g[m]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return F},clone:function(){var A=n.clone.call(this);return A._hash=this._hash.clone(),A}});function B(A,l,D,a,s,v,F){var g=A+(l&D|~l&a)+s+F;return(g<<v|g>>>32-v)+l}function i(A,l,D,a,s,v,F){var g=A+(l&a|D&~a)+s+F;return(g<<v|g>>>32-v)+l}function h(A,l,D,a,s,v,F){var g=A+(l^D^a)+s+F;return(g<<v|g>>>32-v)+l}function c(A,l,D,a,s,v,F){var g=A+(D^(l|~a))+s+F;return(g<<v|g>>>32-v)+l}p.MD5=n._createHelper(o),p.HmacMD5=n._createHmacHelper(o)}(Math),r.MD5})}(V0)),V0.exports}var W0={exports:{}},Rr;function qr(){return Rr||(Rr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=p.Hasher,n=e.algo,d=[],t=n.SHA1=E.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,B){for(var i=this._hash.words,h=i[0],c=i[1],A=i[2],l=i[3],D=i[4],a=0;a<80;a++){if(a<16)d[a]=o[B+a]|0;else{var s=d[a-3]^d[a-8]^d[a-14]^d[a-16];d[a]=s<<1|s>>>31}var v=(h<<5|h>>>27)+D+d[a];a<20?v+=(c&A|~c&l)+1518500249:a<40?v+=(c^A^l)+1859775393:a<60?v+=(c&A|c&l|A&l)-1894007588:v+=(c^A^l)-899497514,D=l,l=A,A=c<<30|c>>>2,c=h,h=v}i[0]=i[0]+h|0,i[1]=i[1]+c|0,i[2]=i[2]+A|0,i[3]=i[3]+l|0,i[4]=i[4]+D|0},_doFinalize:function(){var o=this._data,B=o.words,i=this._nDataBytes*8,h=o.sigBytes*8;return B[h>>>5]|=128<<24-h%32,B[(h+64>>>9<<4)+14]=Math.floor(i/4294967296),B[(h+64>>>9<<4)+15]=i,o.sigBytes=B.length*4,this._process(),this._hash},clone:function(){var o=E.clone.call(this);return o._hash=this._hash.clone(),o}});e.SHA1=E._createHelper(t),e.HmacSHA1=E._createHmacHelper(t)}(),r.SHA1})}(W0)),W0.exports}var K0={exports:{}},Ir;function S0(){return Ir||(Ir=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(e){var p=r,u=p.lib,E=u.WordArray,n=u.Hasher,d=p.algo,t=[],o=[];(function(){function h(D){for(var a=e.sqrt(D),s=2;s<=a;s++)if(!(D%s))return!1;return!0}function c(D){return(D-(D|0))*4294967296|0}for(var A=2,l=0;l<64;)h(A)&&(l<8&&(t[l]=c(e.pow(A,1/2))),o[l]=c(e.pow(A,1/3)),l++),A++})();var B=[],i=d.SHA256=n.extend({_doReset:function(){this._hash=new E.init(t.slice(0))},_doProcessBlock:function(h,c){for(var A=this._hash.words,l=A[0],D=A[1],a=A[2],s=A[3],v=A[4],F=A[5],g=A[6],m=A[7],w=0;w<64;w++){if(w<16)B[w]=h[c+w]|0;else{var z=B[w-15],C=(z<<25|z>>>7)^(z<<14|z>>>18)^z>>>3,y=B[w-2],k=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;B[w]=C+B[w-7]+k+B[w-16]}var O=v&F^~v&g,N=l&D^l&a^D&a,R=(l<<30|l>>>2)^(l<<19|l>>>13)^(l<<10|l>>>22),I=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),V=m+I+O+o[w]+B[w],Q=R+N;m=g,g=F,F=v,v=s+V|0,s=a,a=D,D=l,l=V+Q|0}A[0]=A[0]+l|0,A[1]=A[1]+D|0,A[2]=A[2]+a|0,A[3]=A[3]+s|0,A[4]=A[4]+v|0,A[5]=A[5]+F|0,A[6]=A[6]+g|0,A[7]=A[7]+m|0},_doFinalize:function(){var h=this._data,c=h.words,A=this._nDataBytes*8,l=h.sigBytes*8;return c[l>>>5]|=128<<24-l%32,c[(l+64>>>9<<4)+14]=e.floor(A/4294967296),c[(l+64>>>9<<4)+15]=A,h.sigBytes=c.length*4,this._process(),this._hash},clone:function(){var h=n.clone.call(this);return h._hash=this._hash.clone(),h}});p.SHA256=n._createHelper(i),p.HmacSHA256=n._createHmacHelper(i)}(Math),r.SHA256})}(K0)),K0.exports}var Y0={exports:{}},Mr;function We(){return Mr||(Mr=1,function(x,f){(function(r,e,p){x.exports=e(L(),S0())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=e.algo,n=E.SHA256,d=E.SHA224=n.extend({_doReset:function(){this._hash=new u.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=n._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=n._createHelper(d),e.HmacSHA224=n._createHmacHelper(d)}(),r.SHA224})}(Y0)),Y0.exports}var Z0={exports:{}},Ur;function Tr(){return Ur||(Ur=1,function(x,f){(function(r,e,p){x.exports=e(L(),P0())})(T,function(r){return function(){var e=r,p=e.lib,u=p.Hasher,E=e.x64,n=E.Word,d=E.WordArray,t=e.algo;function o(){return n.create.apply(n,arguments)}var B=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],i=[];(function(){for(var c=0;c<80;c++)i[c]=o()})();var h=t.SHA512=u.extend({_doReset:function(){this._hash=new d.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(c,A){for(var l=this._hash.words,D=l[0],a=l[1],s=l[2],v=l[3],F=l[4],g=l[5],m=l[6],w=l[7],z=D.high,C=D.low,y=a.high,k=a.low,O=s.high,N=s.low,R=v.high,I=v.low,V=F.high,Q=F.low,W=g.high,j=g.low,b=m.high,H=m.low,S=w.high,P=w.low,G=z,M=C,K=y,q=k,r0=O,e0=N,X=R,_=I,Y=V,Z=Q,x0=W,f0=j,z0=b,m0=H,yr=S,y0=P,i0=0;i0<80;i0++){var a0,d0,j0=i[i0];if(i0<16)d0=j0.high=c[A+i0*2]|0,a0=j0.low=c[A+i0*2+1]|0;else{var ge=i[i0-15],C0=ge.high,w0=ge.low,dn=(C0>>>1|w0<<31)^(C0>>>8|w0<<24)^C0>>>7,be=(w0>>>1|C0<<31)^(w0>>>8|C0<<24)^(w0>>>7|C0<<25),me=i[i0-2],E0=me.high,H0=me.low,vn=(E0>>>19|H0<<13)^(E0<<3|H0>>>29)^E0>>>6,ye=(H0>>>19|E0<<13)^(H0<<3|E0>>>29)^(H0>>>6|E0<<26),we=i[i0-7],pn=we.high,An=we.low,He=i[i0-16],Bn=He.high,Pe=He.low;a0=be+An,d0=dn+pn+(a0>>>0<be>>>0?1:0),a0=a0+ye,d0=d0+vn+(a0>>>0<ye>>>0?1:0),a0=a0+Pe,d0=d0+Bn+(a0>>>0<Pe>>>0?1:0),j0.high=d0,j0.low=a0}var Cn=Y&x0^~Y&z0,Se=Z&f0^~Z&m0,En=G&K^G&r0^K&r0,Fn=M&q^M&e0^q&e0,Dn=(G>>>28|M<<4)^(G<<30|M>>>2)^(G<<25|M>>>7),Oe=(M>>>28|G<<4)^(M<<30|G>>>2)^(M<<25|G>>>7),gn=(Y>>>14|Z<<18)^(Y>>>18|Z<<14)^(Y<<23|Z>>>9),bn=(Z>>>14|Y<<18)^(Z>>>18|Y<<14)^(Z<<23|Y>>>9),ke=B[i0],mn=ke.high,ze=ke.low,n0=y0+bn,v0=yr+gn+(n0>>>0<y0>>>0?1:0),n0=n0+Se,v0=v0+Cn+(n0>>>0<Se>>>0?1:0),n0=n0+ze,v0=v0+mn+(n0>>>0<ze>>>0?1:0),n0=n0+a0,v0=v0+d0+(n0>>>0<a0>>>0?1:0),je=Oe+Fn,yn=Dn+En+(je>>>0<Oe>>>0?1:0);yr=z0,y0=m0,z0=x0,m0=f0,x0=Y,f0=Z,Z=_+n0|0,Y=X+v0+(Z>>>0<_>>>0?1:0)|0,X=r0,_=e0,r0=K,e0=q,K=G,q=M,M=n0+je|0,G=v0+yn+(M>>>0<n0>>>0?1:0)|0}C=D.low=C+M,D.high=z+G+(C>>>0<M>>>0?1:0),k=a.low=k+q,a.high=y+K+(k>>>0<q>>>0?1:0),N=s.low=N+e0,s.high=O+r0+(N>>>0<e0>>>0?1:0),I=v.low=I+_,v.high=R+X+(I>>>0<_>>>0?1:0),Q=F.low=Q+Z,F.high=V+Y+(Q>>>0<Z>>>0?1:0),j=g.low=j+f0,g.high=W+x0+(j>>>0<f0>>>0?1:0),H=m.low=H+m0,m.high=b+z0+(H>>>0<m0>>>0?1:0),P=w.low=P+y0,w.high=S+yr+(P>>>0<y0>>>0?1:0)},_doFinalize:function(){var c=this._data,A=c.words,l=this._nDataBytes*8,D=c.sigBytes*8;A[D>>>5]|=128<<24-D%32,A[(D+128>>>10<<5)+30]=Math.floor(l/4294967296),A[(D+128>>>10<<5)+31]=l,c.sigBytes=A.length*4,this._process();var a=this._hash.toX32();return a},clone:function(){var c=u.clone.call(this);return c._hash=this._hash.clone(),c},blockSize:1024/32});e.SHA512=u._createHelper(h),e.HmacSHA512=u._createHmacHelper(h)}(),r.SHA512})}(Z0)),Z0.exports}var X0={exports:{}},Gr;function Ke(){return Gr||(Gr=1,function(x,f){(function(r,e,p){x.exports=e(L(),P0(),Tr())})(T,function(r){return function(){var e=r,p=e.x64,u=p.Word,E=p.WordArray,n=e.algo,d=n.SHA512,t=n.SHA384=d.extend({_doReset:function(){this._hash=new E.init([new u.init(3418070365,3238371032),new u.init(1654270250,914150663),new u.init(2438529370,812702999),new u.init(355462360,4144912697),new u.init(1731405415,4290775857),new u.init(2394180231,1750603025),new u.init(3675008525,1694076839),new u.init(1203062813,3204075428)])},_doFinalize:function(){var o=d._doFinalize.call(this);return o.sigBytes-=16,o}});e.SHA384=d._createHelper(t),e.HmacSHA384=d._createHmacHelper(t)}(),r.SHA384})}(X0)),X0.exports}var J0={exports:{}},Lr;function Ye(){return Lr||(Lr=1,function(x,f){(function(r,e,p){x.exports=e(L(),P0())})(T,function(r){return function(e){var p=r,u=p.lib,E=u.WordArray,n=u.Hasher,d=p.x64,t=d.Word,o=p.algo,B=[],i=[],h=[];(function(){for(var l=1,D=0,a=0;a<24;a++){B[l+5*D]=(a+1)*(a+2)/2%64;var s=D%5,v=(2*l+3*D)%5;l=s,D=v}for(var l=0;l<5;l++)for(var D=0;D<5;D++)i[l+5*D]=D+(2*l+3*D)%5*5;for(var F=1,g=0;g<24;g++){for(var m=0,w=0,z=0;z<7;z++){if(F&1){var C=(1<<z)-1;C<32?w^=1<<C:m^=1<<C-32}F&128?F=F<<1^113:F<<=1}h[g]=t.create(m,w)}})();var c=[];(function(){for(var l=0;l<25;l++)c[l]=t.create()})();var A=o.SHA3=n.extend({cfg:n.cfg.extend({outputLength:512}),_doReset:function(){for(var l=this._state=[],D=0;D<25;D++)l[D]=new t.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(l,D){for(var a=this._state,s=this.blockSize/2,v=0;v<s;v++){var F=l[D+2*v],g=l[D+2*v+1];F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;var m=a[v];m.high^=g,m.low^=F}for(var w=0;w<24;w++){for(var z=0;z<5;z++){for(var C=0,y=0,k=0;k<5;k++){var m=a[z+5*k];C^=m.high,y^=m.low}var O=c[z];O.high=C,O.low=y}for(var z=0;z<5;z++)for(var N=c[(z+4)%5],R=c[(z+1)%5],I=R.high,V=R.low,C=N.high^(I<<1|V>>>31),y=N.low^(V<<1|I>>>31),k=0;k<5;k++){var m=a[z+5*k];m.high^=C,m.low^=y}for(var Q=1;Q<25;Q++){var C,y,m=a[Q],W=m.high,j=m.low,b=B[Q];b<32?(C=W<<b|j>>>32-b,y=j<<b|W>>>32-b):(C=j<<b-32|W>>>64-b,y=W<<b-32|j>>>64-b);var H=c[i[Q]];H.high=C,H.low=y}var S=c[0],P=a[0];S.high=P.high,S.low=P.low;for(var z=0;z<5;z++)for(var k=0;k<5;k++){var Q=z+5*k,m=a[Q],G=c[Q],M=c[(z+1)%5+5*k],K=c[(z+2)%5+5*k];m.high=G.high^~M.high&K.high,m.low=G.low^~M.low&K.low}var m=a[0],q=h[w];m.high^=q.high,m.low^=q.low}},_doFinalize:function(){var l=this._data,D=l.words;this._nDataBytes*8;var a=l.sigBytes*8,s=this.blockSize*32;D[a>>>5]|=1<<24-a%32,D[(e.ceil((a+1)/s)*s>>>5)-1]|=128,l.sigBytes=D.length*4,this._process();for(var v=this._state,F=this.cfg.outputLength/8,g=F/8,m=[],w=0;w<g;w++){var z=v[w],C=z.high,y=z.low;C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,m.push(y),m.push(C)}return new E.init(m,F)},clone:function(){for(var l=n.clone.call(this),D=l._state=this._state.slice(0),a=0;a<25;a++)D[a]=D[a].clone();return l}});p.SHA3=n._createHelper(A),p.HmacSHA3=n._createHmacHelper(A)}(Math),r.SHA3})}(J0)),J0.exports}var _0={exports:{}},Qr;function Ze(){return Qr||(Qr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){/** @preserve
|
|
1
|
+
(function(o0,M){typeof exports=="object"&&typeof module<"u"?M(exports,require("lodash-es"),require("dingtalk-jsapi"),require("qs"),require("axios")):typeof define=="function"&&define.amd?define(["exports","lodash-es","dingtalk-jsapi","qs","axios"],M):(o0=typeof globalThis<"u"?globalThis:o0||self,M(o0.Main={},o0._,o0.dd$1,o0.qs,o0.axios))})(this,function(o0,M,Ne,p0,F0){"use strict";var De;function Re(x){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(x){for(const r in x)if(r!=="default"){const e=Object.getOwnPropertyDescriptor(x,r);Object.defineProperty(f,r,e.get?e:{enumerable:!0,get:()=>x[r]})}}return f.default=x,Object.freeze(f)}const t0=Re(Ne),N0=window.navigator.userAgent.toLowerCase();let R0={code:"",name:"未知"};function qe(){return typeof window<"u"&&typeof document<"u"&&typeof document.querySelector=="function"&&typeof navigator<"u"&&typeof XMLHttpRequest=="function"}const Ie=[{code:"weixin",name:"微信",value:/MicroMessenger/i.test(N0)},{code:"wxmp",name:"微信小程序",value:/miniProgram/i.test(N0)||window.__wxjs_environment==="miniprogram"},{code:"dd",name:"钉钉",value:/DingTalk/i.test(N0)}],Me=x=>x.value,wr=M.find(Ie,Me);wr?R0=wr:qe()&&(R0={code:"h5",name:"H5"});const q0=R0,I0=x=>x=="dev"?"https://test.ihotel.cn/gw/v1/platform-gcding":x=="prod"?"https://smart.ihotel.cn/guardian/gw/v1/platform-gcding":x||"https://test.ihotel.cn/gw/v1/platform-gcding";var T=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function D0(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}function Ue(x){if(x.__esModule)return x;var f=x.default;if(typeof f=="function"){var r=function e(){return this instanceof e?Reflect.construct(f,arguments,this.constructor):f.apply(this,arguments)};r.prototype=f.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(x).forEach(function(e){var p=Object.getOwnPropertyDescriptor(x,e);Object.defineProperty(r,e,p.get?p:{enumerable:!0,get:function(){return x[e]}})}),r}var Hr={exports:{}};function Te(x){throw new Error('Could not dynamically require "'+x+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var M0={exports:{}};const Ge=Ue(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Pr;function L(){return Pr||(Pr=1,function(x,f){(function(r,e){x.exports=e()})(T,function(){var r=r||function(e,p){var u;if(typeof window<"u"&&window.crypto&&(u=window.crypto),typeof self<"u"&&self.crypto&&(u=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(u=globalThis.crypto),!u&&typeof window<"u"&&window.msCrypto&&(u=window.msCrypto),!u&&typeof T<"u"&&T.crypto&&(u=T.crypto),!u&&typeof Te=="function")try{u=Ge}catch{}var E=function(){if(u){if(typeof u.getRandomValues=="function")try{return u.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof u.randomBytes=="function")try{return u.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function a(){}return function(s){var v;return a.prototype=s,v=new a,a.prototype=null,v}}(),d={},t=d.lib={},o=t.Base=function(){return{extend:function(a){var s=n(this);return a&&s.mixIn(a),(!s.hasOwnProperty("init")||this.init===s.init)&&(s.init=function(){s.$super.init.apply(this,arguments)}),s.init.prototype=s,s.$super=this,s},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var s in a)a.hasOwnProperty(s)&&(this[s]=a[s]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),B=t.WordArray=o.extend({init:function(a,s){a=this.words=a||[],s!=p?this.sigBytes=s:this.sigBytes=a.length*4},toString:function(a){return(a||h).stringify(this)},concat:function(a){var s=this.words,v=a.words,F=this.sigBytes,g=a.sigBytes;if(this.clamp(),F%4)for(var m=0;m<g;m++){var w=v[m>>>2]>>>24-m%4*8&255;s[F+m>>>2]|=w<<24-(F+m)%4*8}else for(var z=0;z<g;z+=4)s[F+z>>>2]=v[z>>>2];return this.sigBytes+=g,this},clamp:function(){var a=this.words,s=this.sigBytes;a[s>>>2]&=4294967295<<32-s%4*8,a.length=e.ceil(s/4)},clone:function(){var a=o.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var s=[],v=0;v<a;v+=4)s.push(E());return new B.init(s,a)}}),i=d.enc={},h=i.Hex={stringify:function(a){for(var s=a.words,v=a.sigBytes,F=[],g=0;g<v;g++){var m=s[g>>>2]>>>24-g%4*8&255;F.push((m>>>4).toString(16)),F.push((m&15).toString(16))}return F.join("")},parse:function(a){for(var s=a.length,v=[],F=0;F<s;F+=2)v[F>>>3]|=parseInt(a.substr(F,2),16)<<24-F%8*4;return new B.init(v,s/2)}},c=i.Latin1={stringify:function(a){for(var s=a.words,v=a.sigBytes,F=[],g=0;g<v;g++){var m=s[g>>>2]>>>24-g%4*8&255;F.push(String.fromCharCode(m))}return F.join("")},parse:function(a){for(var s=a.length,v=[],F=0;F<s;F++)v[F>>>2]|=(a.charCodeAt(F)&255)<<24-F%4*8;return new B.init(v,s)}},A=i.Utf8={stringify:function(a){try{return decodeURIComponent(escape(c.stringify(a)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(a){return c.parse(unescape(encodeURIComponent(a)))}},l=t.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new B.init,this._nDataBytes=0},_append:function(a){typeof a=="string"&&(a=A.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var s,v=this._data,F=v.words,g=v.sigBytes,m=this.blockSize,w=m*4,z=g/w;a?z=e.ceil(z):z=e.max((z|0)-this._minBufferSize,0);var C=z*m,y=e.min(C*4,g);if(C){for(var k=0;k<C;k+=m)this._doProcessBlock(F,k);s=F.splice(0,C),v.sigBytes-=y}return new B.init(s,y)},clone:function(){var a=o.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});t.Hasher=l.extend({cfg:o.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var s=this._doFinalize();return s},blockSize:16,_createHelper:function(a){return function(s,v){return new a.init(v).finalize(s)}},_createHmacHelper:function(a){return function(s,v){return new D.HMAC.init(a,v).finalize(s)}}});var D=d.algo={};return d}(Math);return r})}(M0)),M0.exports}var U0={exports:{}},Sr;function P0(){return Sr||(Sr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(e){var p=r,u=p.lib,E=u.Base,n=u.WordArray,d=p.x64={};d.Word=E.extend({init:function(t,o){this.high=t,this.low=o}}),d.WordArray=E.extend({init:function(t,o){t=this.words=t||[],o!=e?this.sigBytes=o:this.sigBytes=t.length*8},toX32:function(){for(var t=this.words,o=t.length,B=[],i=0;i<o;i++){var h=t[i];B.push(h.high),B.push(h.low)}return n.create(B,this.sigBytes)},clone:function(){for(var t=E.clone.call(this),o=t.words=this.words.slice(0),B=o.length,i=0;i<B;i++)o[i]=o[i].clone();return t}})}(),r})}(U0)),U0.exports}var T0={exports:{}},Or;function Le(){return Or||(Or=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){if(typeof ArrayBuffer=="function"){var e=r,p=e.lib,u=p.WordArray,E=u.init,n=u.init=function(d){if(d instanceof ArrayBuffer&&(d=new Uint8Array(d)),(d instanceof Int8Array||typeof Uint8ClampedArray<"u"&&d instanceof Uint8ClampedArray||d instanceof Int16Array||d instanceof Uint16Array||d instanceof Int32Array||d instanceof Uint32Array||d instanceof Float32Array||d instanceof Float64Array)&&(d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength)),d instanceof Uint8Array){for(var t=d.byteLength,o=[],B=0;B<t;B++)o[B>>>2]|=d[B]<<24-B%4*8;E.call(this,o,t)}else E.apply(this,arguments)};n.prototype=u}}(),r.lib.WordArray})}(T0)),T0.exports}var G0={exports:{}},kr;function Qe(){return kr||(kr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=e.enc;E.Utf16=E.Utf16BE={stringify:function(d){for(var t=d.words,o=d.sigBytes,B=[],i=0;i<o;i+=2){var h=t[i>>>2]>>>16-i%4*8&65535;B.push(String.fromCharCode(h))}return B.join("")},parse:function(d){for(var t=d.length,o=[],B=0;B<t;B++)o[B>>>1]|=d.charCodeAt(B)<<16-B%2*16;return u.create(o,t*2)}},E.Utf16LE={stringify:function(d){for(var t=d.words,o=d.sigBytes,B=[],i=0;i<o;i+=2){var h=n(t[i>>>2]>>>16-i%4*8&65535);B.push(String.fromCharCode(h))}return B.join("")},parse:function(d){for(var t=d.length,o=[],B=0;B<t;B++)o[B>>>1]|=n(d.charCodeAt(B)<<16-B%2*16);return u.create(o,t*2)}};function n(d){return d<<8&4278255360|d>>>8&16711935}}(),r.enc.Utf16})}(G0)),G0.exports}var L0={exports:{}},zr;function h0(){return zr||(zr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=e.enc;E.Base64={stringify:function(d){var t=d.words,o=d.sigBytes,B=this._map;d.clamp();for(var i=[],h=0;h<o;h+=3)for(var c=t[h>>>2]>>>24-h%4*8&255,A=t[h+1>>>2]>>>24-(h+1)%4*8&255,l=t[h+2>>>2]>>>24-(h+2)%4*8&255,D=c<<16|A<<8|l,a=0;a<4&&h+a*.75<o;a++)i.push(B.charAt(D>>>6*(3-a)&63));var s=B.charAt(64);if(s)for(;i.length%4;)i.push(s);return i.join("")},parse:function(d){var t=d.length,o=this._map,B=this._reverseMap;if(!B){B=this._reverseMap=[];for(var i=0;i<o.length;i++)B[o.charCodeAt(i)]=i}var h=o.charAt(64);if(h){var c=d.indexOf(h);c!==-1&&(t=c)}return n(d,t,B)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function n(d,t,o){for(var B=[],i=0,h=0;h<t;h++)if(h%4){var c=o[d.charCodeAt(h-1)]<<h%4*2,A=o[d.charCodeAt(h)]>>>6-h%4*2,l=c|A;B[i>>>2]|=l<<24-i%4*8,i++}return u.create(B,i)}}(),r.enc.Base64})}(L0)),L0.exports}var Q0={exports:{}},jr;function Ve(){return jr||(jr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=e.enc;E.Base64url={stringify:function(d,t){t===void 0&&(t=!0);var o=d.words,B=d.sigBytes,i=t?this._safe_map:this._map;d.clamp();for(var h=[],c=0;c<B;c+=3)for(var A=o[c>>>2]>>>24-c%4*8&255,l=o[c+1>>>2]>>>24-(c+1)%4*8&255,D=o[c+2>>>2]>>>24-(c+2)%4*8&255,a=A<<16|l<<8|D,s=0;s<4&&c+s*.75<B;s++)h.push(i.charAt(a>>>6*(3-s)&63));var v=i.charAt(64);if(v)for(;h.length%4;)h.push(v);return h.join("")},parse:function(d,t){t===void 0&&(t=!0);var o=d.length,B=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var h=0;h<B.length;h++)i[B.charCodeAt(h)]=h}var c=B.charAt(64);if(c){var A=d.indexOf(c);A!==-1&&(o=A)}return n(d,o,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function n(d,t,o){for(var B=[],i=0,h=0;h<t;h++)if(h%4){var c=o[d.charCodeAt(h-1)]<<h%4*2,A=o[d.charCodeAt(h)]>>>6-h%4*2,l=c|A;B[i>>>2]|=l<<24-i%4*8,i++}return u.create(B,i)}}(),r.enc.Base64url})}(Q0)),Q0.exports}var V0={exports:{}},Nr;function u0(){return Nr||(Nr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(e){var p=r,u=p.lib,E=u.WordArray,n=u.Hasher,d=p.algo,t=[];(function(){for(var A=0;A<64;A++)t[A]=e.abs(e.sin(A+1))*4294967296|0})();var o=d.MD5=n.extend({_doReset:function(){this._hash=new E.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(A,l){for(var D=0;D<16;D++){var a=l+D,s=A[a];A[a]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}var v=this._hash.words,F=A[l+0],g=A[l+1],m=A[l+2],w=A[l+3],z=A[l+4],C=A[l+5],y=A[l+6],k=A[l+7],O=A[l+8],N=A[l+9],R=A[l+10],I=A[l+11],V=A[l+12],Q=A[l+13],W=A[l+14],j=A[l+15],b=v[0],H=v[1],S=v[2],P=v[3];b=B(b,H,S,P,F,7,t[0]),P=B(P,b,H,S,g,12,t[1]),S=B(S,P,b,H,m,17,t[2]),H=B(H,S,P,b,w,22,t[3]),b=B(b,H,S,P,z,7,t[4]),P=B(P,b,H,S,C,12,t[5]),S=B(S,P,b,H,y,17,t[6]),H=B(H,S,P,b,k,22,t[7]),b=B(b,H,S,P,O,7,t[8]),P=B(P,b,H,S,N,12,t[9]),S=B(S,P,b,H,R,17,t[10]),H=B(H,S,P,b,I,22,t[11]),b=B(b,H,S,P,V,7,t[12]),P=B(P,b,H,S,Q,12,t[13]),S=B(S,P,b,H,W,17,t[14]),H=B(H,S,P,b,j,22,t[15]),b=i(b,H,S,P,g,5,t[16]),P=i(P,b,H,S,y,9,t[17]),S=i(S,P,b,H,I,14,t[18]),H=i(H,S,P,b,F,20,t[19]),b=i(b,H,S,P,C,5,t[20]),P=i(P,b,H,S,R,9,t[21]),S=i(S,P,b,H,j,14,t[22]),H=i(H,S,P,b,z,20,t[23]),b=i(b,H,S,P,N,5,t[24]),P=i(P,b,H,S,W,9,t[25]),S=i(S,P,b,H,w,14,t[26]),H=i(H,S,P,b,O,20,t[27]),b=i(b,H,S,P,Q,5,t[28]),P=i(P,b,H,S,m,9,t[29]),S=i(S,P,b,H,k,14,t[30]),H=i(H,S,P,b,V,20,t[31]),b=h(b,H,S,P,C,4,t[32]),P=h(P,b,H,S,O,11,t[33]),S=h(S,P,b,H,I,16,t[34]),H=h(H,S,P,b,W,23,t[35]),b=h(b,H,S,P,g,4,t[36]),P=h(P,b,H,S,z,11,t[37]),S=h(S,P,b,H,k,16,t[38]),H=h(H,S,P,b,R,23,t[39]),b=h(b,H,S,P,Q,4,t[40]),P=h(P,b,H,S,F,11,t[41]),S=h(S,P,b,H,w,16,t[42]),H=h(H,S,P,b,y,23,t[43]),b=h(b,H,S,P,N,4,t[44]),P=h(P,b,H,S,V,11,t[45]),S=h(S,P,b,H,j,16,t[46]),H=h(H,S,P,b,m,23,t[47]),b=c(b,H,S,P,F,6,t[48]),P=c(P,b,H,S,k,10,t[49]),S=c(S,P,b,H,W,15,t[50]),H=c(H,S,P,b,C,21,t[51]),b=c(b,H,S,P,V,6,t[52]),P=c(P,b,H,S,w,10,t[53]),S=c(S,P,b,H,R,15,t[54]),H=c(H,S,P,b,g,21,t[55]),b=c(b,H,S,P,O,6,t[56]),P=c(P,b,H,S,j,10,t[57]),S=c(S,P,b,H,y,15,t[58]),H=c(H,S,P,b,Q,21,t[59]),b=c(b,H,S,P,z,6,t[60]),P=c(P,b,H,S,I,10,t[61]),S=c(S,P,b,H,m,15,t[62]),H=c(H,S,P,b,N,21,t[63]),v[0]=v[0]+b|0,v[1]=v[1]+H|0,v[2]=v[2]+S|0,v[3]=v[3]+P|0},_doFinalize:function(){var A=this._data,l=A.words,D=this._nDataBytes*8,a=A.sigBytes*8;l[a>>>5]|=128<<24-a%32;var s=e.floor(D/4294967296),v=D;l[(a+64>>>9<<4)+15]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,l[(a+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,A.sigBytes=(l.length+1)*4,this._process();for(var F=this._hash,g=F.words,m=0;m<4;m++){var w=g[m];g[m]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return F},clone:function(){var A=n.clone.call(this);return A._hash=this._hash.clone(),A}});function B(A,l,D,a,s,v,F){var g=A+(l&D|~l&a)+s+F;return(g<<v|g>>>32-v)+l}function i(A,l,D,a,s,v,F){var g=A+(l&a|D&~a)+s+F;return(g<<v|g>>>32-v)+l}function h(A,l,D,a,s,v,F){var g=A+(l^D^a)+s+F;return(g<<v|g>>>32-v)+l}function c(A,l,D,a,s,v,F){var g=A+(D^(l|~a))+s+F;return(g<<v|g>>>32-v)+l}p.MD5=n._createHelper(o),p.HmacMD5=n._createHmacHelper(o)}(Math),r.MD5})}(V0)),V0.exports}var W0={exports:{}},Rr;function qr(){return Rr||(Rr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=p.Hasher,n=e.algo,d=[],t=n.SHA1=E.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,B){for(var i=this._hash.words,h=i[0],c=i[1],A=i[2],l=i[3],D=i[4],a=0;a<80;a++){if(a<16)d[a]=o[B+a]|0;else{var s=d[a-3]^d[a-8]^d[a-14]^d[a-16];d[a]=s<<1|s>>>31}var v=(h<<5|h>>>27)+D+d[a];a<20?v+=(c&A|~c&l)+1518500249:a<40?v+=(c^A^l)+1859775393:a<60?v+=(c&A|c&l|A&l)-1894007588:v+=(c^A^l)-899497514,D=l,l=A,A=c<<30|c>>>2,c=h,h=v}i[0]=i[0]+h|0,i[1]=i[1]+c|0,i[2]=i[2]+A|0,i[3]=i[3]+l|0,i[4]=i[4]+D|0},_doFinalize:function(){var o=this._data,B=o.words,i=this._nDataBytes*8,h=o.sigBytes*8;return B[h>>>5]|=128<<24-h%32,B[(h+64>>>9<<4)+14]=Math.floor(i/4294967296),B[(h+64>>>9<<4)+15]=i,o.sigBytes=B.length*4,this._process(),this._hash},clone:function(){var o=E.clone.call(this);return o._hash=this._hash.clone(),o}});e.SHA1=E._createHelper(t),e.HmacSHA1=E._createHmacHelper(t)}(),r.SHA1})}(W0)),W0.exports}var K0={exports:{}},Ir;function S0(){return Ir||(Ir=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){return function(e){var p=r,u=p.lib,E=u.WordArray,n=u.Hasher,d=p.algo,t=[],o=[];(function(){function h(D){for(var a=e.sqrt(D),s=2;s<=a;s++)if(!(D%s))return!1;return!0}function c(D){return(D-(D|0))*4294967296|0}for(var A=2,l=0;l<64;)h(A)&&(l<8&&(t[l]=c(e.pow(A,1/2))),o[l]=c(e.pow(A,1/3)),l++),A++})();var B=[],i=d.SHA256=n.extend({_doReset:function(){this._hash=new E.init(t.slice(0))},_doProcessBlock:function(h,c){for(var A=this._hash.words,l=A[0],D=A[1],a=A[2],s=A[3],v=A[4],F=A[5],g=A[6],m=A[7],w=0;w<64;w++){if(w<16)B[w]=h[c+w]|0;else{var z=B[w-15],C=(z<<25|z>>>7)^(z<<14|z>>>18)^z>>>3,y=B[w-2],k=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;B[w]=C+B[w-7]+k+B[w-16]}var O=v&F^~v&g,N=l&D^l&a^D&a,R=(l<<30|l>>>2)^(l<<19|l>>>13)^(l<<10|l>>>22),I=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),V=m+I+O+o[w]+B[w],Q=R+N;m=g,g=F,F=v,v=s+V|0,s=a,a=D,D=l,l=V+Q|0}A[0]=A[0]+l|0,A[1]=A[1]+D|0,A[2]=A[2]+a|0,A[3]=A[3]+s|0,A[4]=A[4]+v|0,A[5]=A[5]+F|0,A[6]=A[6]+g|0,A[7]=A[7]+m|0},_doFinalize:function(){var h=this._data,c=h.words,A=this._nDataBytes*8,l=h.sigBytes*8;return c[l>>>5]|=128<<24-l%32,c[(l+64>>>9<<4)+14]=e.floor(A/4294967296),c[(l+64>>>9<<4)+15]=A,h.sigBytes=c.length*4,this._process(),this._hash},clone:function(){var h=n.clone.call(this);return h._hash=this._hash.clone(),h}});p.SHA256=n._createHelper(i),p.HmacSHA256=n._createHmacHelper(i)}(Math),r.SHA256})}(K0)),K0.exports}var Y0={exports:{}},Mr;function We(){return Mr||(Mr=1,function(x,f){(function(r,e,p){x.exports=e(L(),S0())})(T,function(r){return function(){var e=r,p=e.lib,u=p.WordArray,E=e.algo,n=E.SHA256,d=E.SHA224=n.extend({_doReset:function(){this._hash=new u.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=n._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=n._createHelper(d),e.HmacSHA224=n._createHmacHelper(d)}(),r.SHA224})}(Y0)),Y0.exports}var Z0={exports:{}},Ur;function Tr(){return Ur||(Ur=1,function(x,f){(function(r,e,p){x.exports=e(L(),P0())})(T,function(r){return function(){var e=r,p=e.lib,u=p.Hasher,E=e.x64,n=E.Word,d=E.WordArray,t=e.algo;function o(){return n.create.apply(n,arguments)}var B=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],i=[];(function(){for(var c=0;c<80;c++)i[c]=o()})();var h=t.SHA512=u.extend({_doReset:function(){this._hash=new d.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(c,A){for(var l=this._hash.words,D=l[0],a=l[1],s=l[2],v=l[3],F=l[4],g=l[5],m=l[6],w=l[7],z=D.high,C=D.low,y=a.high,k=a.low,O=s.high,N=s.low,R=v.high,I=v.low,V=F.high,Q=F.low,W=g.high,j=g.low,b=m.high,H=m.low,S=w.high,P=w.low,G=z,U=C,K=y,q=k,r0=O,e0=N,X=R,_=I,Y=V,Z=Q,x0=W,f0=j,z0=b,m0=H,yr=S,y0=P,i0=0;i0<80;i0++){var a0,d0,j0=i[i0];if(i0<16)d0=j0.high=c[A+i0*2]|0,a0=j0.low=c[A+i0*2+1]|0;else{var ge=i[i0-15],C0=ge.high,w0=ge.low,dn=(C0>>>1|w0<<31)^(C0>>>8|w0<<24)^C0>>>7,be=(w0>>>1|C0<<31)^(w0>>>8|C0<<24)^(w0>>>7|C0<<25),me=i[i0-2],E0=me.high,H0=me.low,vn=(E0>>>19|H0<<13)^(E0<<3|H0>>>29)^E0>>>6,ye=(H0>>>19|E0<<13)^(H0<<3|E0>>>29)^(H0>>>6|E0<<26),we=i[i0-7],pn=we.high,An=we.low,He=i[i0-16],Bn=He.high,Pe=He.low;a0=be+An,d0=dn+pn+(a0>>>0<be>>>0?1:0),a0=a0+ye,d0=d0+vn+(a0>>>0<ye>>>0?1:0),a0=a0+Pe,d0=d0+Bn+(a0>>>0<Pe>>>0?1:0),j0.high=d0,j0.low=a0}var Cn=Y&x0^~Y&z0,Se=Z&f0^~Z&m0,En=G&K^G&r0^K&r0,Fn=U&q^U&e0^q&e0,Dn=(G>>>28|U<<4)^(G<<30|U>>>2)^(G<<25|U>>>7),Oe=(U>>>28|G<<4)^(U<<30|G>>>2)^(U<<25|G>>>7),gn=(Y>>>14|Z<<18)^(Y>>>18|Z<<14)^(Y<<23|Z>>>9),bn=(Z>>>14|Y<<18)^(Z>>>18|Y<<14)^(Z<<23|Y>>>9),ke=B[i0],mn=ke.high,ze=ke.low,n0=y0+bn,v0=yr+gn+(n0>>>0<y0>>>0?1:0),n0=n0+Se,v0=v0+Cn+(n0>>>0<Se>>>0?1:0),n0=n0+ze,v0=v0+mn+(n0>>>0<ze>>>0?1:0),n0=n0+a0,v0=v0+d0+(n0>>>0<a0>>>0?1:0),je=Oe+Fn,yn=Dn+En+(je>>>0<Oe>>>0?1:0);yr=z0,y0=m0,z0=x0,m0=f0,x0=Y,f0=Z,Z=_+n0|0,Y=X+v0+(Z>>>0<_>>>0?1:0)|0,X=r0,_=e0,r0=K,e0=q,K=G,q=U,U=n0+je|0,G=v0+yn+(U>>>0<n0>>>0?1:0)|0}C=D.low=C+U,D.high=z+G+(C>>>0<U>>>0?1:0),k=a.low=k+q,a.high=y+K+(k>>>0<q>>>0?1:0),N=s.low=N+e0,s.high=O+r0+(N>>>0<e0>>>0?1:0),I=v.low=I+_,v.high=R+X+(I>>>0<_>>>0?1:0),Q=F.low=Q+Z,F.high=V+Y+(Q>>>0<Z>>>0?1:0),j=g.low=j+f0,g.high=W+x0+(j>>>0<f0>>>0?1:0),H=m.low=H+m0,m.high=b+z0+(H>>>0<m0>>>0?1:0),P=w.low=P+y0,w.high=S+yr+(P>>>0<y0>>>0?1:0)},_doFinalize:function(){var c=this._data,A=c.words,l=this._nDataBytes*8,D=c.sigBytes*8;A[D>>>5]|=128<<24-D%32,A[(D+128>>>10<<5)+30]=Math.floor(l/4294967296),A[(D+128>>>10<<5)+31]=l,c.sigBytes=A.length*4,this._process();var a=this._hash.toX32();return a},clone:function(){var c=u.clone.call(this);return c._hash=this._hash.clone(),c},blockSize:1024/32});e.SHA512=u._createHelper(h),e.HmacSHA512=u._createHmacHelper(h)}(),r.SHA512})}(Z0)),Z0.exports}var X0={exports:{}},Gr;function Ke(){return Gr||(Gr=1,function(x,f){(function(r,e,p){x.exports=e(L(),P0(),Tr())})(T,function(r){return function(){var e=r,p=e.x64,u=p.Word,E=p.WordArray,n=e.algo,d=n.SHA512,t=n.SHA384=d.extend({_doReset:function(){this._hash=new E.init([new u.init(3418070365,3238371032),new u.init(1654270250,914150663),new u.init(2438529370,812702999),new u.init(355462360,4144912697),new u.init(1731405415,4290775857),new u.init(2394180231,1750603025),new u.init(3675008525,1694076839),new u.init(1203062813,3204075428)])},_doFinalize:function(){var o=d._doFinalize.call(this);return o.sigBytes-=16,o}});e.SHA384=d._createHelper(t),e.HmacSHA384=d._createHmacHelper(t)}(),r.SHA384})}(X0)),X0.exports}var J0={exports:{}},Lr;function Ye(){return Lr||(Lr=1,function(x,f){(function(r,e,p){x.exports=e(L(),P0())})(T,function(r){return function(e){var p=r,u=p.lib,E=u.WordArray,n=u.Hasher,d=p.x64,t=d.Word,o=p.algo,B=[],i=[],h=[];(function(){for(var l=1,D=0,a=0;a<24;a++){B[l+5*D]=(a+1)*(a+2)/2%64;var s=D%5,v=(2*l+3*D)%5;l=s,D=v}for(var l=0;l<5;l++)for(var D=0;D<5;D++)i[l+5*D]=D+(2*l+3*D)%5*5;for(var F=1,g=0;g<24;g++){for(var m=0,w=0,z=0;z<7;z++){if(F&1){var C=(1<<z)-1;C<32?w^=1<<C:m^=1<<C-32}F&128?F=F<<1^113:F<<=1}h[g]=t.create(m,w)}})();var c=[];(function(){for(var l=0;l<25;l++)c[l]=t.create()})();var A=o.SHA3=n.extend({cfg:n.cfg.extend({outputLength:512}),_doReset:function(){for(var l=this._state=[],D=0;D<25;D++)l[D]=new t.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(l,D){for(var a=this._state,s=this.blockSize/2,v=0;v<s;v++){var F=l[D+2*v],g=l[D+2*v+1];F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;var m=a[v];m.high^=g,m.low^=F}for(var w=0;w<24;w++){for(var z=0;z<5;z++){for(var C=0,y=0,k=0;k<5;k++){var m=a[z+5*k];C^=m.high,y^=m.low}var O=c[z];O.high=C,O.low=y}for(var z=0;z<5;z++)for(var N=c[(z+4)%5],R=c[(z+1)%5],I=R.high,V=R.low,C=N.high^(I<<1|V>>>31),y=N.low^(V<<1|I>>>31),k=0;k<5;k++){var m=a[z+5*k];m.high^=C,m.low^=y}for(var Q=1;Q<25;Q++){var C,y,m=a[Q],W=m.high,j=m.low,b=B[Q];b<32?(C=W<<b|j>>>32-b,y=j<<b|W>>>32-b):(C=j<<b-32|W>>>64-b,y=W<<b-32|j>>>64-b);var H=c[i[Q]];H.high=C,H.low=y}var S=c[0],P=a[0];S.high=P.high,S.low=P.low;for(var z=0;z<5;z++)for(var k=0;k<5;k++){var Q=z+5*k,m=a[Q],G=c[Q],U=c[(z+1)%5+5*k],K=c[(z+2)%5+5*k];m.high=G.high^~U.high&K.high,m.low=G.low^~U.low&K.low}var m=a[0],q=h[w];m.high^=q.high,m.low^=q.low}},_doFinalize:function(){var l=this._data,D=l.words;this._nDataBytes*8;var a=l.sigBytes*8,s=this.blockSize*32;D[a>>>5]|=1<<24-a%32,D[(e.ceil((a+1)/s)*s>>>5)-1]|=128,l.sigBytes=D.length*4,this._process();for(var v=this._state,F=this.cfg.outputLength/8,g=F/8,m=[],w=0;w<g;w++){var z=v[w],C=z.high,y=z.low;C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,m.push(y),m.push(C)}return new E.init(m,F)},clone:function(){for(var l=n.clone.call(this),D=l._state=this._state.slice(0),a=0;a<25;a++)D[a]=D[a].clone();return l}});p.SHA3=n._createHelper(A),p.HmacSHA3=n._createHmacHelper(A)}(Math),r.SHA3})}(J0)),J0.exports}var _0={exports:{}},Qr;function Ze(){return Qr||(Qr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){/** @preserve
|
|
2
2
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
3
3
|
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
8
|
|
|
9
9
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
10
|
-
*/return function(e){var p=r,u=p.lib,E=u.WordArray,n=u.Hasher,d=p.algo,t=E.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=E.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),B=E.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),i=E.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=E.create([0,1518500249,1859775393,2400959708,2840853838]),c=E.create([1352829926,1548603684,1836072691,2053994217,0]),A=d.RIPEMD160=n.extend({_doReset:function(){this._hash=E.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(g,m){for(var w=0;w<16;w++){var z=m+w,C=g[z];g[z]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var y=this._hash.words,k=h.words,O=c.words,N=t.words,R=o.words,I=B.words,V=i.words,Q,W,j,b,H,S,P,G,M,K;S=Q=y[0],P=W=y[1],G=j=y[2],M=b=y[3],K=H=y[4];for(var q,w=0;w<80;w+=1)q=Q+g[m+N[w]]|0,w<16?q+=l(W,j,b)+k[0]:w<32?q+=D(W,j,b)+k[1]:w<48?q+=a(W,j,b)+k[2]:w<64?q+=s(W,j,b)+k[3]:q+=v(W,j,b)+k[4],q=q|0,q=F(q,I[w]),q=q+H|0,Q=H,H=b,b=F(j,10),j=W,W=q,q=S+g[m+R[w]]|0,w<16?q+=v(P,G,M)+O[0]:w<32?q+=s(P,G,M)+O[1]:w<48?q+=a(P,G,M)+O[2]:w<64?q+=D(P,G,M)+O[3]:q+=l(P,G,M)+O[4],q=q|0,q=F(q,V[w]),q=q+K|0,S=K,K=M,M=F(G,10),G=P,P=q;q=y[1]+j+M|0,y[1]=y[2]+b+K|0,y[2]=y[3]+H+S|0,y[3]=y[4]+Q+P|0,y[4]=y[0]+W+G|0,y[0]=q},_doFinalize:function(){var g=this._data,m=g.words,w=this._nDataBytes*8,z=g.sigBytes*8;m[z>>>5]|=128<<24-z%32,m[(z+64>>>9<<4)+14]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,g.sigBytes=(m.length+1)*4,this._process();for(var C=this._hash,y=C.words,k=0;k<5;k++){var O=y[k];y[k]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}return C},clone:function(){var g=n.clone.call(this);return g._hash=this._hash.clone(),g}});function l(g,m,w){return g^m^w}function D(g,m,w){return g&m|~g&w}function a(g,m,w){return(g|~m)^w}function s(g,m,w){return g&w|m&~w}function v(g,m,w){return g^(m|~w)}function F(g,m){return g<<m|g>>>32-m}p.RIPEMD160=n._createHelper(A),p.HmacRIPEMD160=n._createHmacHelper(A)}(),r.RIPEMD160})}(_0)),_0.exports}var $0={exports:{}},Vr;function O0(){return Vr||(Vr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){(function(){var e=r,p=e.lib,u=p.Base,E=e.enc,n=E.Utf8,d=e.algo;d.HMAC=u.extend({init:function(t,o){t=this._hasher=new t.init,typeof o=="string"&&(o=n.parse(o));var B=t.blockSize,i=B*4;o.sigBytes>i&&(o=t.finalize(o)),o.clamp();for(var h=this._oKey=o.clone(),c=this._iKey=o.clone(),A=h.words,l=c.words,D=0;D<B;D++)A[D]^=1549556828,l[D]^=909522486;h.sigBytes=c.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var o=this._hasher,B=o.finalize(t);o.reset();var i=o.finalize(this._oKey.clone().concat(B));return i}})})()})}($0)),$0.exports}var rr={exports:{}},Wr;function Xe(){return Wr||(Wr=1,function(x,f){(function(r,e,p){x.exports=e(L(),S0(),O0())})(T,function(r){return function(){var e=r,p=e.lib,u=p.Base,E=p.WordArray,n=e.algo,d=n.SHA256,t=n.HMAC,o=n.PBKDF2=u.extend({cfg:u.extend({keySize:128/32,hasher:d,iterations:25e4}),init:function(B){this.cfg=this.cfg.extend(B)},compute:function(B,i){for(var h=this.cfg,c=t.create(h.hasher,B),A=E.create(),l=E.create([1]),D=A.words,a=l.words,s=h.keySize,v=h.iterations;D.length<s;){var F=c.update(i).finalize(l);c.reset();for(var g=F.words,m=g.length,w=F,z=1;z<v;z++){w=c.finalize(w),c.reset();for(var C=w.words,y=0;y<m;y++)g[y]^=C[y]}A.concat(F),a[0]++}return A.sigBytes=s*4,A}});e.PBKDF2=function(B,i,h){return o.create(h).compute(B,i)}}(),r.PBKDF2})}(rr)),rr.exports}var er={exports:{}},Kr;function l0(){return Kr||(Kr=1,function(x,f){(function(r,e,p){x.exports=e(L(),qr(),O0())})(T,function(r){return function(){var e=r,p=e.lib,u=p.Base,E=p.WordArray,n=e.algo,d=n.MD5,t=n.EvpKDF=u.extend({cfg:u.extend({keySize:128/32,hasher:d,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,B){for(var i,h=this.cfg,c=h.hasher.create(),A=E.create(),l=A.words,D=h.keySize,a=h.iterations;l.length<D;){i&&c.update(i),i=c.update(o).finalize(B),c.reset();for(var s=1;s<a;s++)i=c.finalize(i),c.reset();A.concat(i)}return A.sigBytes=D*4,A}});e.EvpKDF=function(o,B,i){return t.create(i).compute(o,B)}}(),r.EvpKDF})}(er)),er.exports}var tr={exports:{}},Yr;function J(){return Yr||(Yr=1,function(x,f){(function(r,e,p){x.exports=e(L(),l0())})(T,function(r){r.lib.Cipher||function(e){var p=r,u=p.lib,E=u.Base,n=u.WordArray,d=u.BufferedBlockAlgorithm,t=p.enc;t.Utf8;var o=t.Base64,B=p.algo,i=B.EvpKDF,h=u.Cipher=d.extend({cfg:E.extend(),createEncryptor:function(C,y){return this.create(this._ENC_XFORM_MODE,C,y)},createDecryptor:function(C,y){return this.create(this._DEC_XFORM_MODE,C,y)},init:function(C,y,k){this.cfg=this.cfg.extend(k),this._xformMode=C,this._key=y,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(C){return this._append(C),this._process()},finalize:function(C){C&&this._append(C);var y=this._doFinalize();return y},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function C(y){return typeof y=="string"?z:g}return function(y){return{encrypt:function(k,O,N){return C(O).encrypt(y,k,O,N)},decrypt:function(k,O,N){return C(O).decrypt(y,k,O,N)}}}}()});u.StreamCipher=h.extend({_doFinalize:function(){var C=this._process(!0);return C},blockSize:1});var c=p.mode={},A=u.BlockCipherMode=E.extend({createEncryptor:function(C,y){return this.Encryptor.create(C,y)},createDecryptor:function(C,y){return this.Decryptor.create(C,y)},init:function(C,y){this._cipher=C,this._iv=y}}),l=c.CBC=function(){var C=A.extend();C.Encryptor=C.extend({processBlock:function(k,O){var N=this._cipher,R=N.blockSize;y.call(this,k,O,R),N.encryptBlock(k,O),this._prevBlock=k.slice(O,O+R)}}),C.Decryptor=C.extend({processBlock:function(k,O){var N=this._cipher,R=N.blockSize,I=k.slice(O,O+R);N.decryptBlock(k,O),y.call(this,k,O,R),this._prevBlock=I}});function y(k,O,N){var R,I=this._iv;I?(R=I,this._iv=e):R=this._prevBlock;for(var V=0;V<N;V++)k[O+V]^=R[V]}return C}(),D=p.pad={},a=D.Pkcs7={pad:function(C,y){for(var k=y*4,O=k-C.sigBytes%k,N=O<<24|O<<16|O<<8|O,R=[],I=0;I<O;I+=4)R.push(N);var V=n.create(R,O);C.concat(V)},unpad:function(C){var y=C.words[C.sigBytes-1>>>2]&255;C.sigBytes-=y}};u.BlockCipher=h.extend({cfg:h.cfg.extend({mode:l,padding:a}),reset:function(){var C;h.reset.call(this);var y=this.cfg,k=y.iv,O=y.mode;this._xformMode==this._ENC_XFORM_MODE?C=O.createEncryptor:(C=O.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==C?this._mode.init(this,k&&k.words):(this._mode=C.call(O,this,k&&k.words),this._mode.__creator=C)},_doProcessBlock:function(C,y){this._mode.processBlock(C,y)},_doFinalize:function(){var C,y=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(y.pad(this._data,this.blockSize),C=this._process(!0)):(C=this._process(!0),y.unpad(C)),C},blockSize:128/32});var s=u.CipherParams=E.extend({init:function(C){this.mixIn(C)},toString:function(C){return(C||this.formatter).stringify(this)}}),v=p.format={},F=v.OpenSSL={stringify:function(C){var y,k=C.ciphertext,O=C.salt;return O?y=n.create([1398893684,1701076831]).concat(O).concat(k):y=k,y.toString(o)},parse:function(C){var y,k=o.parse(C),O=k.words;return O[0]==1398893684&&O[1]==1701076831&&(y=n.create(O.slice(2,4)),O.splice(0,4),k.sigBytes-=16),s.create({ciphertext:k,salt:y})}},g=u.SerializableCipher=E.extend({cfg:E.extend({format:F}),encrypt:function(C,y,k,O){O=this.cfg.extend(O);var N=C.createEncryptor(k,O),R=N.finalize(y),I=N.cfg;return s.create({ciphertext:R,key:k,iv:I.iv,algorithm:C,mode:I.mode,padding:I.padding,blockSize:C.blockSize,formatter:O.format})},decrypt:function(C,y,k,O){O=this.cfg.extend(O),y=this._parse(y,O.format);var N=C.createDecryptor(k,O).finalize(y.ciphertext);return N},_parse:function(C,y){return typeof C=="string"?y.parse(C,this):C}}),m=p.kdf={},w=m.OpenSSL={execute:function(C,y,k,O,N){if(O||(O=n.random(64/8)),N)var R=i.create({keySize:y+k,hasher:N}).compute(C,O);else var R=i.create({keySize:y+k}).compute(C,O);var I=n.create(R.words.slice(y),k*4);return R.sigBytes=y*4,s.create({key:R,iv:I,salt:O})}},z=u.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:w}),encrypt:function(C,y,k,O){O=this.cfg.extend(O);var N=O.kdf.execute(k,C.keySize,C.ivSize,O.salt,O.hasher);O.iv=N.iv;var R=g.encrypt.call(this,C,y,N.key,O);return R.mixIn(N),R},decrypt:function(C,y,k,O){O=this.cfg.extend(O),y=this._parse(y,O.format);var N=O.kdf.execute(k,C.keySize,C.ivSize,y.salt,O.hasher);O.iv=N.iv;var R=g.decrypt.call(this,C,y,N.key,O);return R}})}()})}(tr)),tr.exports}var nr={exports:{}},Zr;function Je(){return Zr||(Zr=1,function(x,f){(function(r,e,p){x.exports=e(L(),J())})(T,function(r){return r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:function(u,E){var n=this._cipher,d=n.blockSize;p.call(this,u,E,d,n),this._prevBlock=u.slice(E,E+d)}}),e.Decryptor=e.extend({processBlock:function(u,E){var n=this._cipher,d=n.blockSize,t=u.slice(E,E+d);p.call(this,u,E,d,n),this._prevBlock=t}});function p(u,E,n,d){var t,o=this._iv;o?(t=o.slice(0),this._iv=void 0):t=this._prevBlock,d.encryptBlock(t,0);for(var B=0;B<n;B++)u[E+B]^=t[B]}return e}(),r.mode.CFB})}(nr)),nr.exports}var xr={exports:{}},Xr;function _e(){return Xr||(Xr=1,function(x,f){(function(r,e,p){x.exports=e(L(),J())})(T,function(r){return r.mode.CTR=function(){var e=r.lib.BlockCipherMode.extend(),p=e.Encryptor=e.extend({processBlock:function(u,E){var n=this._cipher,d=n.blockSize,t=this._iv,o=this._counter;t&&(o=this._counter=t.slice(0),this._iv=void 0);var B=o.slice(0);n.encryptBlock(B,0),o[d-1]=o[d-1]+1|0;for(var i=0;i<d;i++)u[E+i]^=B[i]}});return e.Decryptor=p,e}(),r.mode.CTR})}(xr)),xr.exports}var ar={exports:{}},Jr;function $e(){return Jr||(Jr=1,function(x,f){(function(r,e,p){x.exports=e(L(),J())})(T,function(r){/** @preserve
|
|
10
|
+
*/return function(e){var p=r,u=p.lib,E=u.WordArray,n=u.Hasher,d=p.algo,t=E.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=E.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),B=E.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),i=E.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=E.create([0,1518500249,1859775393,2400959708,2840853838]),c=E.create([1352829926,1548603684,1836072691,2053994217,0]),A=d.RIPEMD160=n.extend({_doReset:function(){this._hash=E.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(g,m){for(var w=0;w<16;w++){var z=m+w,C=g[z];g[z]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var y=this._hash.words,k=h.words,O=c.words,N=t.words,R=o.words,I=B.words,V=i.words,Q,W,j,b,H,S,P,G,U,K;S=Q=y[0],P=W=y[1],G=j=y[2],U=b=y[3],K=H=y[4];for(var q,w=0;w<80;w+=1)q=Q+g[m+N[w]]|0,w<16?q+=l(W,j,b)+k[0]:w<32?q+=D(W,j,b)+k[1]:w<48?q+=a(W,j,b)+k[2]:w<64?q+=s(W,j,b)+k[3]:q+=v(W,j,b)+k[4],q=q|0,q=F(q,I[w]),q=q+H|0,Q=H,H=b,b=F(j,10),j=W,W=q,q=S+g[m+R[w]]|0,w<16?q+=v(P,G,U)+O[0]:w<32?q+=s(P,G,U)+O[1]:w<48?q+=a(P,G,U)+O[2]:w<64?q+=D(P,G,U)+O[3]:q+=l(P,G,U)+O[4],q=q|0,q=F(q,V[w]),q=q+K|0,S=K,K=U,U=F(G,10),G=P,P=q;q=y[1]+j+U|0,y[1]=y[2]+b+K|0,y[2]=y[3]+H+S|0,y[3]=y[4]+Q+P|0,y[4]=y[0]+W+G|0,y[0]=q},_doFinalize:function(){var g=this._data,m=g.words,w=this._nDataBytes*8,z=g.sigBytes*8;m[z>>>5]|=128<<24-z%32,m[(z+64>>>9<<4)+14]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,g.sigBytes=(m.length+1)*4,this._process();for(var C=this._hash,y=C.words,k=0;k<5;k++){var O=y[k];y[k]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}return C},clone:function(){var g=n.clone.call(this);return g._hash=this._hash.clone(),g}});function l(g,m,w){return g^m^w}function D(g,m,w){return g&m|~g&w}function a(g,m,w){return(g|~m)^w}function s(g,m,w){return g&w|m&~w}function v(g,m,w){return g^(m|~w)}function F(g,m){return g<<m|g>>>32-m}p.RIPEMD160=n._createHelper(A),p.HmacRIPEMD160=n._createHmacHelper(A)}(),r.RIPEMD160})}(_0)),_0.exports}var $0={exports:{}},Vr;function O0(){return Vr||(Vr=1,function(x,f){(function(r,e){x.exports=e(L())})(T,function(r){(function(){var e=r,p=e.lib,u=p.Base,E=e.enc,n=E.Utf8,d=e.algo;d.HMAC=u.extend({init:function(t,o){t=this._hasher=new t.init,typeof o=="string"&&(o=n.parse(o));var B=t.blockSize,i=B*4;o.sigBytes>i&&(o=t.finalize(o)),o.clamp();for(var h=this._oKey=o.clone(),c=this._iKey=o.clone(),A=h.words,l=c.words,D=0;D<B;D++)A[D]^=1549556828,l[D]^=909522486;h.sigBytes=c.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var o=this._hasher,B=o.finalize(t);o.reset();var i=o.finalize(this._oKey.clone().concat(B));return i}})})()})}($0)),$0.exports}var rr={exports:{}},Wr;function Xe(){return Wr||(Wr=1,function(x,f){(function(r,e,p){x.exports=e(L(),S0(),O0())})(T,function(r){return function(){var e=r,p=e.lib,u=p.Base,E=p.WordArray,n=e.algo,d=n.SHA256,t=n.HMAC,o=n.PBKDF2=u.extend({cfg:u.extend({keySize:128/32,hasher:d,iterations:25e4}),init:function(B){this.cfg=this.cfg.extend(B)},compute:function(B,i){for(var h=this.cfg,c=t.create(h.hasher,B),A=E.create(),l=E.create([1]),D=A.words,a=l.words,s=h.keySize,v=h.iterations;D.length<s;){var F=c.update(i).finalize(l);c.reset();for(var g=F.words,m=g.length,w=F,z=1;z<v;z++){w=c.finalize(w),c.reset();for(var C=w.words,y=0;y<m;y++)g[y]^=C[y]}A.concat(F),a[0]++}return A.sigBytes=s*4,A}});e.PBKDF2=function(B,i,h){return o.create(h).compute(B,i)}}(),r.PBKDF2})}(rr)),rr.exports}var er={exports:{}},Kr;function l0(){return Kr||(Kr=1,function(x,f){(function(r,e,p){x.exports=e(L(),qr(),O0())})(T,function(r){return function(){var e=r,p=e.lib,u=p.Base,E=p.WordArray,n=e.algo,d=n.MD5,t=n.EvpKDF=u.extend({cfg:u.extend({keySize:128/32,hasher:d,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,B){for(var i,h=this.cfg,c=h.hasher.create(),A=E.create(),l=A.words,D=h.keySize,a=h.iterations;l.length<D;){i&&c.update(i),i=c.update(o).finalize(B),c.reset();for(var s=1;s<a;s++)i=c.finalize(i),c.reset();A.concat(i)}return A.sigBytes=D*4,A}});e.EvpKDF=function(o,B,i){return t.create(i).compute(o,B)}}(),r.EvpKDF})}(er)),er.exports}var tr={exports:{}},Yr;function J(){return Yr||(Yr=1,function(x,f){(function(r,e,p){x.exports=e(L(),l0())})(T,function(r){r.lib.Cipher||function(e){var p=r,u=p.lib,E=u.Base,n=u.WordArray,d=u.BufferedBlockAlgorithm,t=p.enc;t.Utf8;var o=t.Base64,B=p.algo,i=B.EvpKDF,h=u.Cipher=d.extend({cfg:E.extend(),createEncryptor:function(C,y){return this.create(this._ENC_XFORM_MODE,C,y)},createDecryptor:function(C,y){return this.create(this._DEC_XFORM_MODE,C,y)},init:function(C,y,k){this.cfg=this.cfg.extend(k),this._xformMode=C,this._key=y,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(C){return this._append(C),this._process()},finalize:function(C){C&&this._append(C);var y=this._doFinalize();return y},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function C(y){return typeof y=="string"?z:g}return function(y){return{encrypt:function(k,O,N){return C(O).encrypt(y,k,O,N)},decrypt:function(k,O,N){return C(O).decrypt(y,k,O,N)}}}}()});u.StreamCipher=h.extend({_doFinalize:function(){var C=this._process(!0);return C},blockSize:1});var c=p.mode={},A=u.BlockCipherMode=E.extend({createEncryptor:function(C,y){return this.Encryptor.create(C,y)},createDecryptor:function(C,y){return this.Decryptor.create(C,y)},init:function(C,y){this._cipher=C,this._iv=y}}),l=c.CBC=function(){var C=A.extend();C.Encryptor=C.extend({processBlock:function(k,O){var N=this._cipher,R=N.blockSize;y.call(this,k,O,R),N.encryptBlock(k,O),this._prevBlock=k.slice(O,O+R)}}),C.Decryptor=C.extend({processBlock:function(k,O){var N=this._cipher,R=N.blockSize,I=k.slice(O,O+R);N.decryptBlock(k,O),y.call(this,k,O,R),this._prevBlock=I}});function y(k,O,N){var R,I=this._iv;I?(R=I,this._iv=e):R=this._prevBlock;for(var V=0;V<N;V++)k[O+V]^=R[V]}return C}(),D=p.pad={},a=D.Pkcs7={pad:function(C,y){for(var k=y*4,O=k-C.sigBytes%k,N=O<<24|O<<16|O<<8|O,R=[],I=0;I<O;I+=4)R.push(N);var V=n.create(R,O);C.concat(V)},unpad:function(C){var y=C.words[C.sigBytes-1>>>2]&255;C.sigBytes-=y}};u.BlockCipher=h.extend({cfg:h.cfg.extend({mode:l,padding:a}),reset:function(){var C;h.reset.call(this);var y=this.cfg,k=y.iv,O=y.mode;this._xformMode==this._ENC_XFORM_MODE?C=O.createEncryptor:(C=O.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==C?this._mode.init(this,k&&k.words):(this._mode=C.call(O,this,k&&k.words),this._mode.__creator=C)},_doProcessBlock:function(C,y){this._mode.processBlock(C,y)},_doFinalize:function(){var C,y=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(y.pad(this._data,this.blockSize),C=this._process(!0)):(C=this._process(!0),y.unpad(C)),C},blockSize:128/32});var s=u.CipherParams=E.extend({init:function(C){this.mixIn(C)},toString:function(C){return(C||this.formatter).stringify(this)}}),v=p.format={},F=v.OpenSSL={stringify:function(C){var y,k=C.ciphertext,O=C.salt;return O?y=n.create([1398893684,1701076831]).concat(O).concat(k):y=k,y.toString(o)},parse:function(C){var y,k=o.parse(C),O=k.words;return O[0]==1398893684&&O[1]==1701076831&&(y=n.create(O.slice(2,4)),O.splice(0,4),k.sigBytes-=16),s.create({ciphertext:k,salt:y})}},g=u.SerializableCipher=E.extend({cfg:E.extend({format:F}),encrypt:function(C,y,k,O){O=this.cfg.extend(O);var N=C.createEncryptor(k,O),R=N.finalize(y),I=N.cfg;return s.create({ciphertext:R,key:k,iv:I.iv,algorithm:C,mode:I.mode,padding:I.padding,blockSize:C.blockSize,formatter:O.format})},decrypt:function(C,y,k,O){O=this.cfg.extend(O),y=this._parse(y,O.format);var N=C.createDecryptor(k,O).finalize(y.ciphertext);return N},_parse:function(C,y){return typeof C=="string"?y.parse(C,this):C}}),m=p.kdf={},w=m.OpenSSL={execute:function(C,y,k,O,N){if(O||(O=n.random(64/8)),N)var R=i.create({keySize:y+k,hasher:N}).compute(C,O);else var R=i.create({keySize:y+k}).compute(C,O);var I=n.create(R.words.slice(y),k*4);return R.sigBytes=y*4,s.create({key:R,iv:I,salt:O})}},z=u.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:w}),encrypt:function(C,y,k,O){O=this.cfg.extend(O);var N=O.kdf.execute(k,C.keySize,C.ivSize,O.salt,O.hasher);O.iv=N.iv;var R=g.encrypt.call(this,C,y,N.key,O);return R.mixIn(N),R},decrypt:function(C,y,k,O){O=this.cfg.extend(O),y=this._parse(y,O.format);var N=O.kdf.execute(k,C.keySize,C.ivSize,y.salt,O.hasher);O.iv=N.iv;var R=g.decrypt.call(this,C,y,N.key,O);return R}})}()})}(tr)),tr.exports}var nr={exports:{}},Zr;function Je(){return Zr||(Zr=1,function(x,f){(function(r,e,p){x.exports=e(L(),J())})(T,function(r){return r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:function(u,E){var n=this._cipher,d=n.blockSize;p.call(this,u,E,d,n),this._prevBlock=u.slice(E,E+d)}}),e.Decryptor=e.extend({processBlock:function(u,E){var n=this._cipher,d=n.blockSize,t=u.slice(E,E+d);p.call(this,u,E,d,n),this._prevBlock=t}});function p(u,E,n,d){var t,o=this._iv;o?(t=o.slice(0),this._iv=void 0):t=this._prevBlock,d.encryptBlock(t,0);for(var B=0;B<n;B++)u[E+B]^=t[B]}return e}(),r.mode.CFB})}(nr)),nr.exports}var xr={exports:{}},Xr;function _e(){return Xr||(Xr=1,function(x,f){(function(r,e,p){x.exports=e(L(),J())})(T,function(r){return r.mode.CTR=function(){var e=r.lib.BlockCipherMode.extend(),p=e.Encryptor=e.extend({processBlock:function(u,E){var n=this._cipher,d=n.blockSize,t=this._iv,o=this._counter;t&&(o=this._counter=t.slice(0),this._iv=void 0);var B=o.slice(0);n.encryptBlock(B,0),o[d-1]=o[d-1]+1|0;for(var i=0;i<d;i++)u[E+i]^=B[i]}});return e.Decryptor=p,e}(),r.mode.CTR})}(xr)),xr.exports}var ar={exports:{}},Jr;function $e(){return Jr||(Jr=1,function(x,f){(function(r,e,p){x.exports=e(L(),J())})(T,function(r){/** @preserve
|
|
11
11
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
12
12
|
* derived from CryptoJS.mode.CTR
|
|
13
13
|
* Jan Hruby jhruby.web@gmail.com
|
|
@@ -322,11 +322,11 @@
|
|
|
322
322
|
<\/script>
|
|
323
323
|
</body>
|
|
324
324
|
</html>
|
|
325
|
-
`,pt=p0.parse((De=location.search)!=null&&De.endsWith("/")?location.search.slice(0,-1):location.search,{ignoreQueryPrefix:!0}),Er=U.get(pt,"corpId"),At=async({appCode:x,apiPrefix:f,manual:r=!1,map:e={dataPath:"data"}})=>{const p=I0(f);return new Promise(async u=>{if(Er){const{code:E}=await t0.getAuthCode({corpId:Er}),n=await F0.post(`${p}/api/auth/queryAuthNoExternalCompatible`,{appCode:x,authCode:E,corpId:Er}),d=U.get(n,e.dataPath,n);if(d&&U.get(d,"result")===0){const t=U.get(d,"retVal",n),{ucToken:o}=t;U.isEmpty(o)?t0.biz.realm.getUserExclusiveInfo({onSuccess:async function(B){B.isExclusiveApp===0&&!r?await ue({apiPrefix:f,appCode:x,map:e,userInfo:t}):u({userInfo:t})},onFail:function(B){u({userInfo:t})}}):u({userInfo:t})}else console.log("error:response",d),t0.showToast({type:"fail",duration:2e3,content:U.get(d,"msg")||"未知错误",complete:()=>{}}),u({res:n})}else t0.showToast({type:"fail",duration:2e3,content:"未配置参数:corpId",complete:()=>{}})})},ue=async({apiPrefix:x,userInfo:f,appCode:r,map:e={dataPath:"data"}})=>{const p=I0(x),u=await F0.post(`${p}/api/appByAppCode`,{appCode:r});if(u){const E=U.get(U.get(u,e.dataPath,u),"retVal");let n=vt;for(const t in E)if(E.hasOwnProperty(t)){const o=new RegExp(`{{\\s*${t}\\s*}}`,"g");n=n.replace(o,E[t])}const d=document.body;if(d){d.innerHTML=n,t0.setNavigationTitle({title:"账号绑定"}),t0.hideLoading();const t=d.getElementsByTagName("script");for(let o=0;o<t.length;o++){const B=document.createElement("script");B.textContent=t[o].textContent,document.head.appendChild(B)}document.addEventListener("bindFormSubmit",async function(o){console.log("接收到表单提交事件:");const{userId:B,corpId:i}=f,{unitCode:h,username:c,password:A}=o.detail;if(h===""){t0.showToast({type:"fail",duration:1e3,content:"请输入单位代码"});return}if(c===""){t0.showToast({type:"fail",duration:1e3,content:"请输入用户名"});return}if(A===""){t0.showToast({type:"fail",duration:1e3,content:"请输入密码"});return}var l=g0.enc.Utf8.parse("9A938078F7F24DD995E0671F6B253CDF"),D=g0.AES.encrypt(g0.enc.Utf8.parse(A),l,{mode:g0.mode.ECB,padding:g0.pad.Pkcs7});console.log("加密后的密码:",D.toString()),t0.showLoading({content:"绑定中..."});const a=await F0.post(`${p}/api/auth/normalBindThird`,{appCode:r,unitCode:U.toUpper(h),username:U.toUpper(c),password:D.toString(),userId:B,corpId:i});t0.hideLoading(),a.status&&a.data&&a.data.result===0?window.location.reload():t0.showToast({type:"fail",duration:1e3,content:a.data.msg})})}}t0.hideLoading()},Bt={dd:{bind:ue,unBind:async({appCode:x,apiPrefix:f,userInfo:r,map:e={dataPath:"data"}})=>{const{userId:p,corpId:u}=r,E=I0(f);return new Promise(async n=>{const d=await F0.post(`${E}/api/auth/normalUnbindThird`,{appCode:x,userId:p,corpId:u}),t=U.get(d,e.dataPath,d);t&&U.get(t,"result")===0?n(!0):n(!1)})},login:At,dd:t0},h5:{login:()=>new Promise(async x=>{const{token:f}=p0.parse(location.search,{ignoreQueryPrefix:!0});x(f?{userInfo:{ucToken:f}}:{userInfo:null})})},wxmp:{login:()=>new Promise(x=>{const{token:f}=p0.parse(location.search,{ignoreQueryPrefix:!0});x(f?{userInfo:{ucToken:f}}:{userInfo:null})})},weixin:{login:()=>new Promise(x=>{const{token:f}=p0.parse(location.search,{ignoreQueryPrefix:!0});x(f?{userInfo:{ucToken:f}}:{userInfo:null})})}},Ct={setNavigationBarTitle:x=>{q0.code==="dd"?t0.setNavigationTitle(x):q0.code==="weixin"?wx.setNavigationBarTitle(x):document.title=x.title}},Et=x=>{let f="";return U.mapKeys(x,(r,e)=>{e&&(U.isEmpty(r)?f+="&"+e:f+="&"+e+"="+r)}),f},Ft=(x,f)=>U.isEmpty(f)?x:(U.includes(x,"?")?x:x+"?")+f.substring(1),Dt=(x,f)=>U.isEmpty(f)?x:`${x}?${p0.stringify(f)}`;var Fr=Object.prototype.hasOwnProperty,A0=Array.isArray,s0=function(){for(var x=[],f=0;f<256;++f)x.push("%"+((f<16?"0":"")+f.toString(16)).toUpperCase());return x}(),gt=function(f){for(;f.length>1;){var r=f.pop(),e=r.obj[r.prop];if(A0(e)){for(var p=[],u=0;u<e.length;++u)typeof e[u]<"u"&&p.push(e[u]);r.obj[r.prop]=p}}},le=function(f,r){for(var e=r&&r.plainObjects?Object.create(null):{},p=0;p<f.length;++p)typeof f[p]<"u"&&(e[p]=f[p]);return e},bt=function x(f,r,e){if(!r)return f;if(typeof r!="object"){if(A0(f))f.push(r);else if(f&&typeof f=="object")(e&&(e.plainObjects||e.allowPrototypes)||!Fr.call(Object.prototype,r))&&(f[r]=!0);else return[f,r];return f}if(!f||typeof f!="object")return[f].concat(r);var p=f;return A0(f)&&!A0(r)&&(p=le(f,e)),A0(f)&&A0(r)?(r.forEach(function(u,E){if(Fr.call(f,E)){var n=f[E];n&&typeof n=="object"&&u&&typeof u=="object"?f[E]=x(n,u,e):f.push(u)}else f[E]=u}),f):Object.keys(r).reduce(function(u,E){var n=r[E];return Fr.call(u,E)?u[E]=x(u[E],n,e):u[E]=n,u},p)},mt=function(f,r){return Object.keys(r).reduce(function(e,p){return e[p]=r[p],e},f)},yt=function(x,f,r){var e=x.replace(/\+/g," ");if(r==="iso-8859-1")return e.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(e)}catch{return e}},wt=function(f,r,e){if(f.length===0)return f;var p=f;if(typeof f=="symbol"?p=Symbol.prototype.toString.call(f):typeof f!="string"&&(p=String(f)),e==="iso-8859-1")return escape(p).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var u="",E=0;E<p.length;++E){var n=p.charCodeAt(E);if(n===45||n===46||n===95||n===126||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){u+=p.charAt(E);continue}if(n<128){u=u+s0[n];continue}if(n<2048){u=u+(s0[192|n>>6]+s0[128|n&63]);continue}if(n<55296||n>=57344){u=u+(s0[224|n>>12]+s0[128|n>>6&63]+s0[128|n&63]);continue}E+=1,n=65536+((n&1023)<<10|p.charCodeAt(E)&1023),u+=s0[240|n>>18]+s0[128|n>>12&63]+s0[128|n>>6&63]+s0[128|n&63]}return u},Ht=function(f){for(var r=[{obj:{o:f},prop:"o"}],e=[],p=0;p<r.length;++p)for(var u=r[p],E=u.obj[u.prop],n=Object.keys(E),d=0;d<n.length;++d){var t=n[d],o=E[t];typeof o=="object"&&o!==null&&e.indexOf(o)===-1&&(r.push({obj:E,prop:t}),e.push(o))}return gt(r),f},Pt=function(f){return Object.prototype.toString.call(f)==="[object RegExp]"},St=function(f){return!f||typeof f!="object"?!1:!!(f.constructor&&f.constructor.isBuffer&&f.constructor.isBuffer(f))},Ot=function(f,r){return[].concat(f,r)},kt={arrayToObject:le,assign:mt,combine:Ot,compact:Ht,decode:yt,encode:wt,isBuffer:St,isRegExp:Pt,merge:bt},b0=kt,Dr=Object.prototype.hasOwnProperty,zt=Array.isArray,$={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:b0.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},jt=function(x){return x.replace(/&#(\d+);/g,function(f,r){return String.fromCharCode(parseInt(r,10))})},Nt="utf8=%26%2310003%3B",Rt="utf8=%E2%9C%93",qt=function(f,r){var e={},p=r.ignoreQueryPrefix?f.replace(/^\?/,""):f,u=r.parameterLimit===1/0?void 0:r.parameterLimit,E=p.split(r.delimiter,u),n=-1,d,t=r.charset;if(r.charsetSentinel)for(d=0;d<E.length;++d)E[d].indexOf("utf8=")===0&&(E[d]===Rt?t="utf-8":E[d]===Nt&&(t="iso-8859-1"),n=d,d=E.length);for(d=0;d<E.length;++d)if(d!==n){var o=E[d],B=o.indexOf("]="),i=B===-1?o.indexOf("="):B+1,h,c;i===-1?(h=r.decoder(o,$.decoder,t,"key"),c=r.strictNullHandling?null:""):(h=r.decoder(o.slice(0,i),$.decoder,t,"key"),c=r.decoder(o.slice(i+1),$.decoder,t,"value")),c&&r.interpretNumericEntities&&t==="iso-8859-1"&&(c=jt(c)),c&&typeof c=="string"&&r.comma&&c.indexOf(",")>-1&&(c=c.split(",")),o.indexOf("[]=")>-1&&(c=zt(c)?[c]:c),Dr.call(e,h)?e[h]=b0.combine(e[h],c):e[h]=c}return e},It=function(x,f,r){for(var e=f,p=x.length-1;p>=0;--p){var u,E=x[p];if(E==="[]"&&r.parseArrays)u=[].concat(e);else{u=r.plainObjects?Object.create(null):{};var n=E.charAt(0)==="["&&E.charAt(E.length-1)==="]"?E.slice(1,-1):E,d=parseInt(n,10);!r.parseArrays&&n===""?u={0:e}:!isNaN(d)&&E!==n&&String(d)===n&&d>=0&&r.parseArrays&&d<=r.arrayLimit?(u=[],u[d]=e):u[n]=e}e=u}return e},Mt=function(f,r,e){if(f){var p=e.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,u=/(\[[^[\]]*])/,E=/(\[[^[\]]*])/g,n=e.depth>0&&u.exec(p),d=n?p.slice(0,n.index):p,t=[];if(d){if(!e.plainObjects&&Dr.call(Object.prototype,d)&&!e.allowPrototypes)return;t.push(d)}for(var o=0;e.depth>0&&(n=E.exec(p))!==null&&o<e.depth;){if(o+=1,!e.plainObjects&&Dr.call(Object.prototype,n[1].slice(1,-1))&&!e.allowPrototypes)return;t.push(n[1])}return n&&t.push("["+p.slice(n.index)+"]"),It(t,r,e)}},Ut=function(f){if(!f)return $;if(f.decoder!==null&&f.decoder!==void 0&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof f.charset>"u"?$.charset:f.charset;return{allowDots:typeof f.allowDots>"u"?$.allowDots:!!f.allowDots,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:$.allowPrototypes,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:$.arrayLimit,charset:r,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:$.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:$.comma,decoder:typeof f.decoder=="function"?f.decoder:$.decoder,delimiter:typeof f.delimiter=="string"||b0.isRegExp(f.delimiter)?f.delimiter:$.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:$.depth,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:$.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:$.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:$.plainObjects,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:$.strictNullHandling}},Tt=function(x,f){var r=Ut(f);if(x===""||x===null||typeof x>"u")return r.plainObjects?Object.create(null):{};for(var e=typeof x=="string"?qt(x,r):x,p=r.plainObjects?Object.create(null):{},u=Object.keys(e),E=0;E<u.length;++E){var n=u[E],d=Mt(n,e[n],r);p=b0.merge(p,d,r)}return b0.compact(p)};const Gt=D0(Tt);var k0={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */k0.exports,function(x,f){(function(r){var e=f&&!f.nodeType&&f,p=x&&!x.nodeType&&x,u=typeof T=="object"&&T;(u.global===u||u.window===u||u.self===u)&&(r=u);var E,n=2147483647,d=36,t=1,o=26,B=38,i=700,h=72,c=128,A="-",l=/^xn--/,D=/[^\x20-\x7E]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,s={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=d-t,F=Math.floor,g=String.fromCharCode,m;function w(j){throw new RangeError(s[j])}function z(j,b){for(var H=j.length,S=[];H--;)S[H]=b(j[H]);return S}function C(j,b){var H=j.split("@"),S="";H.length>1&&(S=H[0]+"@",j=H[1]),j=j.replace(a,".");var P=j.split("."),G=z(P,b).join(".");return S+G}function y(j){for(var b=[],H=0,S=j.length,P,G;H<S;)P=j.charCodeAt(H++),P>=55296&&P<=56319&&H<S?(G=j.charCodeAt(H++),(G&64512)==56320?b.push(((P&1023)<<10)+(G&1023)+65536):(b.push(P),H--)):b.push(P);return b}function k(j){return z(j,function(b){var H="";return b>65535&&(b-=65536,H+=g(b>>>10&1023|55296),b=56320|b&1023),H+=g(b),H}).join("")}function O(j){return j-48<10?j-22:j-65<26?j-65:j-97<26?j-97:d}function N(j,b){return j+22+75*(j<26)-((b!=0)<<5)}function R(j,b,H){var S=0;for(j=H?F(j/i):j>>1,j+=F(j/b);j>v*o>>1;S+=d)j=F(j/v);return F(S+(v+1)*j/(j+B))}function I(j){var b=[],H=j.length,S,P=0,G=c,M=h,K,q,r0,e0,X,_,Y,Z,x0;for(K=j.lastIndexOf(A),K<0&&(K=0),q=0;q<K;++q)j.charCodeAt(q)>=128&&w("not-basic"),b.push(j.charCodeAt(q));for(r0=K>0?K+1:0;r0<H;){for(e0=P,X=1,_=d;r0>=H&&w("invalid-input"),Y=O(j.charCodeAt(r0++)),(Y>=d||Y>F((n-P)/X))&&w("overflow"),P+=Y*X,Z=_<=M?t:_>=M+o?o:_-M,!(Y<Z);_+=d)x0=d-Z,X>F(n/x0)&&w("overflow"),X*=x0;S=b.length+1,M=R(P-e0,S,e0==0),F(P/S)>n-G&&w("overflow"),G+=F(P/S),P%=S,b.splice(P++,0,G)}return k(b)}function V(j){var b,H,S,P,G,M,K,q,r0,e0,X,_=[],Y,Z,x0,f0;for(j=y(j),Y=j.length,b=c,H=0,G=h,M=0;M<Y;++M)X=j[M],X<128&&_.push(g(X));for(S=P=_.length,P&&_.push(A);S<Y;){for(K=n,M=0;M<Y;++M)X=j[M],X>=b&&X<K&&(K=X);for(Z=S+1,K-b>F((n-H)/Z)&&w("overflow"),H+=(K-b)*Z,b=K,M=0;M<Y;++M)if(X=j[M],X<b&&++H>n&&w("overflow"),X==b){for(q=H,r0=d;e0=r0<=G?t:r0>=G+o?o:r0-G,!(q<e0);r0+=d)f0=q-e0,x0=d-e0,_.push(g(N(e0+f0%x0,0))),q=F(f0/x0);_.push(g(N(q,0))),G=R(H,Z,S==P),H=0,++S}++H,++b}return _.join("")}function Q(j){return C(j,function(b){return l.test(b)?I(b.slice(4).toLowerCase()):b})}function W(j){return C(j,function(b){return D.test(b)?"xn--"+V(b):b})}if(E={version:"1.4.1",ucs2:{decode:y,encode:k},decode:I,encode:V,toASCII:W,toUnicode:Q},e&&p)if(x.exports==e)p.exports=E;else for(m in E)E.hasOwnProperty(m)&&(e[m]=E[m]);else r.punycode=E})(T)}(k0,k0.exports);var Lt=k0.exports,Qt=Lt;function c0(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Vt=/^([a-z0-9.+-]+:)/i,Wt=/:[0-9]*$/,Kt=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Yt=["<",">",'"',"`"," ","\r",`
|
|
326
|
-
`," "],Zt=["{","}","|","\\","^","`"].concat(Yt),gr=["'"].concat(Zt),de=["%","/","?",";","#"].concat(gr),ve=["/","?","#"],Xt=255,pe=/^[+a-z0-9A-Z_-]{0,63}$/,Jt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_t={javascript:!0,"javascript:":!0},br={javascript:!0,"javascript:":!0},B0={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},mr=p0;function Ae(x,f,r){if(x&&typeof x=="object"&&x instanceof c0)return x;var e=new c0;return e.parse(x,f,r),e}c0.prototype.parse=function(x,f,r){if(typeof x!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var e=x.indexOf("?"),p=e!==-1&&e<x.indexOf("#")?"?":"#",u=x.split(p),E=/\\/g;u[0]=u[0].replace(E,"/"),x=u.join(p);var n=x;if(n=n.trim(),!r&&x.split("#").length===1){var d=Kt.exec(n);if(d)return this.path=n,this.href=n,this.pathname=d[1],d[2]?(this.search=d[2],f?this.query=mr.parse(this.search.substr(1)):this.query=this.search.substr(1)):f&&(this.search="",this.query={}),this}var t=Vt.exec(n);if(t){t=t[0];var o=t.toLowerCase();this.protocol=o,n=n.substr(t.length)}if(r||t||n.match(/^\/\/[^@/]+@[^@/]+/)){var B=n.substr(0,2)==="//";B&&!(t&&br[t])&&(n=n.substr(2),this.slashes=!0)}if(!br[t]&&(B||t&&!B0[t])){for(var i=-1,h=0;h<ve.length;h++){var c=n.indexOf(ve[h]);c!==-1&&(i===-1||c<i)&&(i=c)}var A,l;i===-1?l=n.lastIndexOf("@"):l=n.lastIndexOf("@",i),l!==-1&&(A=n.slice(0,l),n=n.slice(l+1),this.auth=decodeURIComponent(A)),i=-1;for(var h=0;h<de.length;h++){var c=n.indexOf(de[h]);c!==-1&&(i===-1||c<i)&&(i=c)}i===-1&&(i=n.length),this.host=n.slice(0,i),n=n.slice(i),this.parseHost(),this.hostname=this.hostname||"";var D=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!D)for(var a=this.hostname.split(/\./),h=0,s=a.length;h<s;h++){var v=a[h];if(v&&!v.match(pe)){for(var F="",g=0,m=v.length;g<m;g++)v.charCodeAt(g)>127?F+="x":F+=v[g];if(!F.match(pe)){var w=a.slice(0,h),z=a.slice(h+1),C=v.match(Jt);C&&(w.push(C[1]),z.unshift(C[2])),z.length&&(n="/"+z.join(".")+n),this.hostname=w.join(".");break}}}this.hostname.length>Xt?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=Qt.toASCII(this.hostname));var y=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+y,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),n[0]!=="/"&&(n="/"+n))}if(!_t[o])for(var h=0,s=gr.length;h<s;h++){var O=gr[h];if(n.indexOf(O)!==-1){var N=encodeURIComponent(O);N===O&&(N=escape(O)),n=n.split(O).join(N)}}var R=n.indexOf("#");R!==-1&&(this.hash=n.substr(R),n=n.slice(0,R));var I=n.indexOf("?");if(I!==-1?(this.search=n.substr(I),this.query=n.substr(I+1),f&&(this.query=mr.parse(this.query)),n=n.slice(0,I)):f&&(this.search="",this.query={}),n&&(this.pathname=n),B0[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var y=this.pathname||"",V=this.search||"";this.path=y+V}return this.href=this.format(),this},c0.prototype.format=function(){var x=this.auth||"";x&&(x=encodeURIComponent(x),x=x.replace(/%3A/i,":"),x+="@");var f=this.protocol||"",r=this.pathname||"",e=this.hash||"",p=!1,u="";this.host?p=x+this.host:this.hostname&&(p=x+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(p+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(u=mr.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var E=this.search||u&&"?"+u||"";return f&&f.substr(-1)!==":"&&(f+=":"),this.slashes||(!f||B0[f])&&p!==!1?(p="//"+(p||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):p||(p=""),e&&e.charAt(0)!=="#"&&(e="#"+e),E&&E.charAt(0)!=="?"&&(E="?"+E),r=r.replace(/[?#]/g,function(n){return encodeURIComponent(n)}),E=E.replace("#","%23"),f+p+r+E+e},c0.prototype.resolve=function(x){return this.resolveObject(Ae(x,!1,!0)).format()},c0.prototype.resolveObject=function(x){if(typeof x=="string"){var f=new c0;f.parse(x,!1,!0),x=f}for(var r=new c0,e=Object.keys(this),p=0;p<e.length;p++){var u=e[p];r[u]=this[u]}if(r.hash=x.hash,x.href==="")return r.href=r.format(),r;if(x.slashes&&!x.protocol){for(var E=Object.keys(x),n=0;n<E.length;n++){var d=E[n];d!=="protocol"&&(r[d]=x[d])}return B0[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(x.protocol&&x.protocol!==r.protocol){if(!B0[x.protocol]){for(var t=Object.keys(x),o=0;o<t.length;o++){var B=t[o];r[B]=x[B]}return r.href=r.format(),r}if(r.protocol=x.protocol,!x.host&&!br[x.protocol]){for(var s=(x.pathname||"").split("/");s.length&&!(x.host=s.shift()););x.host||(x.host=""),x.hostname||(x.hostname=""),s[0]!==""&&s.unshift(""),s.length<2&&s.unshift(""),r.pathname=s.join("/")}else r.pathname=x.pathname;if(r.search=x.search,r.query=x.query,r.host=x.host||"",r.auth=x.auth,r.hostname=x.hostname||x.host,r.port=x.port,r.pathname||r.search){var i=r.pathname||"",h=r.search||"";r.path=i+h}return r.slashes=r.slashes||x.slashes,r.href=r.format(),r}var c=r.pathname&&r.pathname.charAt(0)==="/",A=x.host||x.pathname&&x.pathname.charAt(0)==="/",l=A||c||r.host&&x.pathname,D=l,a=r.pathname&&r.pathname.split("/")||[],s=x.pathname&&x.pathname.split("/")||[],v=r.protocol&&!B0[r.protocol];if(v&&(r.hostname="",r.port=null,r.host&&(a[0]===""?a[0]=r.host:a.unshift(r.host)),r.host="",x.protocol&&(x.hostname=null,x.port=null,x.host&&(s[0]===""?s[0]=x.host:s.unshift(x.host)),x.host=null),l=l&&(s[0]===""||a[0]==="")),A)r.host=x.host||x.host===""?x.host:r.host,r.hostname=x.hostname||x.hostname===""?x.hostname:r.hostname,r.search=x.search,r.query=x.query,a=s;else if(s.length)a||(a=[]),a.pop(),a=a.concat(s),r.search=x.search,r.query=x.query;else if(x.search!=null){if(v){r.host=a.shift(),r.hostname=r.host;var F=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;F&&(r.auth=F.shift(),r.hostname=F.shift(),r.host=r.hostname)}return r.search=x.search,r.query=x.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!a.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var g=a.slice(-1)[0],m=(r.host||x.host||a.length>1)&&(g==="."||g==="..")||g==="",w=0,z=a.length;z>=0;z--)g=a[z],g==="."?a.splice(z,1):g===".."?(a.splice(z,1),w++):w&&(a.splice(z,1),w--);if(!l&&!D)for(;w--;w)a.unshift("..");l&&a[0]!==""&&(!a[0]||a[0].charAt(0)!=="/")&&a.unshift(""),m&&a.join("/").substr(-1)!=="/"&&a.push("");var C=a[0]===""||a[0]&&a[0].charAt(0)==="/";if(v){r.hostname=C?"":a.length?a.shift():"",r.host=r.hostname;var F=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;F&&(r.auth=F.shift(),r.hostname=F.shift(),r.host=r.hostname)}return l=l||r.host&&a.length,l&&!C&&a.unshift(""),a.length>0?r.pathname=a.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=x.auth||r.auth,r.slashes=r.slashes||x.slashes,r.href=r.format(),r},c0.prototype.parseHost=function(){var x=this.host,f=Wt.exec(x);f&&(f=f[0],f!==":"&&(this.port=f.substr(1)),x=x.substr(0,x.length-f.length)),x&&(this.hostname=x)};var $t=Ae,Be={exports:{}};(function(x,f){(function(r,e,p){x.exports=e(L(),S0(),O0())})(T,function(r){return r.HmacSHA256})})(Be);var rn=Be.exports;const en=D0(rn);var tn=h0();const Ce=D0(tn);var nn=u0();const xn=D0(nn),Ee={sign:(x,f)=>Ce.stringify(en(x,f)),md5Content:x=>
|
|
327
|
-
`,p?e+=u.key:e+=","+u.key,p=!1}),{transformHeader:r,transformHeaderKeys:e}},cn="application/x-www-form-urlencoded",fn=(x,{appkey:f,appsecret:r,originQuery:e})=>{try{if(f&&r){const{method:p,url:u}=x;let E=e?Dt(u,e):u,n=
|
|
325
|
+
`,pt=p0.parse((De=location.search)!=null&&De.endsWith("/")?location.search.slice(0,-1):location.search,{ignoreQueryPrefix:!0}),Er=M.get(pt,"corpId"),At=async({appCode:x,apiPrefix:f,manual:r=!1,map:e={dataPath:"data"}})=>{const p=I0(f);return new Promise(async u=>{if(Er){const{code:E}=await t0.getAuthCode({corpId:Er}),n=await F0.post(`${p}/api/auth/queryAuthNoExternalCompatible`,{appCode:x,authCode:E,corpId:Er}),d=M.get(n,e.dataPath,n);if(d&&M.get(d,"result")===0){const t=M.get(d,"retVal",n),o=M.get(d,"thirdBiz"),{ucToken:B}=t;M.isEmpty(B)?t0.biz.realm.getUserExclusiveInfo({onSuccess:async function(i){i.isExclusiveApp===0&&!r?await ue({apiPrefix:f,appCode:x,map:e,userInfo:t,thirdBiz:o}):u({userInfo:t,thirdBiz:o})},onFail:function(i){u({userInfo:t,thirdBiz:o})}}):u({userInfo:t,thirdBiz:o})}else console.log("error:response",d),t0.showToast({type:"fail",duration:2e3,content:M.get(d,"msg")||"未知错误",complete:()=>{}}),u({res:n})}else t0.showToast({type:"fail",duration:2e3,content:"未配置参数:corpId",complete:()=>{}})})},ue=async({apiPrefix:x,userInfo:f,appCode:r,map:e={dataPath:"data"}})=>{const p=I0(x),u=await F0.post(`${p}/api/appByAppCode`,{appCode:r});if(u){const E=M.get(M.get(u,e.dataPath,u),"retVal");let n=vt;for(const t in E)if(E.hasOwnProperty(t)){const o=new RegExp(`{{\\s*${t}\\s*}}`,"g");n=n.replace(o,E[t])}const d=document.body;if(d){d.innerHTML=n,t0.setNavigationTitle({title:"账号绑定"}),t0.hideLoading();const t=d.getElementsByTagName("script");for(let o=0;o<t.length;o++){const B=document.createElement("script");B.textContent=t[o].textContent,document.head.appendChild(B)}document.addEventListener("bindFormSubmit",async function(o){console.log("接收到表单提交事件:");const{userId:B,corpId:i}=f,{unitCode:h,username:c,password:A}=o.detail;if(h===""){t0.showToast({type:"fail",duration:1e3,content:"请输入单位代码"});return}if(c===""){t0.showToast({type:"fail",duration:1e3,content:"请输入用户名"});return}if(A===""){t0.showToast({type:"fail",duration:1e3,content:"请输入密码"});return}var l=g0.enc.Utf8.parse("9A938078F7F24DD995E0671F6B253CDF"),D=g0.AES.encrypt(g0.enc.Utf8.parse(A),l,{mode:g0.mode.ECB,padding:g0.pad.Pkcs7});console.log("加密后的密码:",D.toString()),t0.showLoading({content:"绑定中..."});const a=await F0.post(`${p}/api/auth/normalBindThird`,{appCode:r,unitCode:M.toUpper(h),username:M.toUpper(c),password:D.toString(),userId:B,corpId:i});t0.hideLoading(),a.status&&a.data&&a.data.result===0?window.location.reload():t0.showToast({type:"fail",duration:1e3,content:a.data.msg})})}}t0.hideLoading()},Bt={dd:{bind:ue,unBind:async({appCode:x,apiPrefix:f,userInfo:r,map:e={dataPath:"data"}})=>{const{userId:p,corpId:u}=r,E=I0(f);return new Promise(async n=>{const d=await F0.post(`${E}/api/auth/normalUnbindThird`,{appCode:x,userId:p,corpId:u}),t=M.get(d,e.dataPath,d);t&&M.get(t,"result")===0?n(!0):n(!1)})},login:At,dd:t0},h5:{login:()=>new Promise(async x=>{const{token:f}=p0.parse(location.search,{ignoreQueryPrefix:!0});x(f?{userInfo:{ucToken:f}}:{userInfo:null})})},wxmp:{login:()=>new Promise(x=>{const{token:f}=p0.parse(location.search,{ignoreQueryPrefix:!0});x(f?{userInfo:{ucToken:f}}:{userInfo:null})})},weixin:{login:()=>new Promise(x=>{const{token:f}=p0.parse(location.search,{ignoreQueryPrefix:!0});x(f?{userInfo:{ucToken:f}}:{userInfo:null})})}},Ct={setNavigationBarTitle:x=>{q0.code==="dd"?t0.setNavigationTitle(x):q0.code==="weixin"?wx.setNavigationBarTitle(x):document.title=x.title}},Et=x=>{let f="";return M.mapKeys(x,(r,e)=>{e&&(M.isEmpty(r)?f+="&"+e:f+="&"+e+"="+r)}),f},Ft=(x,f)=>M.isEmpty(f)?x:(M.includes(x,"?")?x:x+"?")+f.substring(1),Dt=(x,f)=>M.isEmpty(f)?x:`${x}?${p0.stringify(f)}`;var Fr=Object.prototype.hasOwnProperty,A0=Array.isArray,s0=function(){for(var x=[],f=0;f<256;++f)x.push("%"+((f<16?"0":"")+f.toString(16)).toUpperCase());return x}(),gt=function(f){for(;f.length>1;){var r=f.pop(),e=r.obj[r.prop];if(A0(e)){for(var p=[],u=0;u<e.length;++u)typeof e[u]<"u"&&p.push(e[u]);r.obj[r.prop]=p}}},le=function(f,r){for(var e=r&&r.plainObjects?Object.create(null):{},p=0;p<f.length;++p)typeof f[p]<"u"&&(e[p]=f[p]);return e},bt=function x(f,r,e){if(!r)return f;if(typeof r!="object"){if(A0(f))f.push(r);else if(f&&typeof f=="object")(e&&(e.plainObjects||e.allowPrototypes)||!Fr.call(Object.prototype,r))&&(f[r]=!0);else return[f,r];return f}if(!f||typeof f!="object")return[f].concat(r);var p=f;return A0(f)&&!A0(r)&&(p=le(f,e)),A0(f)&&A0(r)?(r.forEach(function(u,E){if(Fr.call(f,E)){var n=f[E];n&&typeof n=="object"&&u&&typeof u=="object"?f[E]=x(n,u,e):f.push(u)}else f[E]=u}),f):Object.keys(r).reduce(function(u,E){var n=r[E];return Fr.call(u,E)?u[E]=x(u[E],n,e):u[E]=n,u},p)},mt=function(f,r){return Object.keys(r).reduce(function(e,p){return e[p]=r[p],e},f)},yt=function(x,f,r){var e=x.replace(/\+/g," ");if(r==="iso-8859-1")return e.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(e)}catch{return e}},wt=function(f,r,e){if(f.length===0)return f;var p=f;if(typeof f=="symbol"?p=Symbol.prototype.toString.call(f):typeof f!="string"&&(p=String(f)),e==="iso-8859-1")return escape(p).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var u="",E=0;E<p.length;++E){var n=p.charCodeAt(E);if(n===45||n===46||n===95||n===126||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){u+=p.charAt(E);continue}if(n<128){u=u+s0[n];continue}if(n<2048){u=u+(s0[192|n>>6]+s0[128|n&63]);continue}if(n<55296||n>=57344){u=u+(s0[224|n>>12]+s0[128|n>>6&63]+s0[128|n&63]);continue}E+=1,n=65536+((n&1023)<<10|p.charCodeAt(E)&1023),u+=s0[240|n>>18]+s0[128|n>>12&63]+s0[128|n>>6&63]+s0[128|n&63]}return u},Ht=function(f){for(var r=[{obj:{o:f},prop:"o"}],e=[],p=0;p<r.length;++p)for(var u=r[p],E=u.obj[u.prop],n=Object.keys(E),d=0;d<n.length;++d){var t=n[d],o=E[t];typeof o=="object"&&o!==null&&e.indexOf(o)===-1&&(r.push({obj:E,prop:t}),e.push(o))}return gt(r),f},Pt=function(f){return Object.prototype.toString.call(f)==="[object RegExp]"},St=function(f){return!f||typeof f!="object"?!1:!!(f.constructor&&f.constructor.isBuffer&&f.constructor.isBuffer(f))},Ot=function(f,r){return[].concat(f,r)},kt={arrayToObject:le,assign:mt,combine:Ot,compact:Ht,decode:yt,encode:wt,isBuffer:St,isRegExp:Pt,merge:bt},b0=kt,Dr=Object.prototype.hasOwnProperty,zt=Array.isArray,$={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:b0.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},jt=function(x){return x.replace(/&#(\d+);/g,function(f,r){return String.fromCharCode(parseInt(r,10))})},Nt="utf8=%26%2310003%3B",Rt="utf8=%E2%9C%93",qt=function(f,r){var e={},p=r.ignoreQueryPrefix?f.replace(/^\?/,""):f,u=r.parameterLimit===1/0?void 0:r.parameterLimit,E=p.split(r.delimiter,u),n=-1,d,t=r.charset;if(r.charsetSentinel)for(d=0;d<E.length;++d)E[d].indexOf("utf8=")===0&&(E[d]===Rt?t="utf-8":E[d]===Nt&&(t="iso-8859-1"),n=d,d=E.length);for(d=0;d<E.length;++d)if(d!==n){var o=E[d],B=o.indexOf("]="),i=B===-1?o.indexOf("="):B+1,h,c;i===-1?(h=r.decoder(o,$.decoder,t,"key"),c=r.strictNullHandling?null:""):(h=r.decoder(o.slice(0,i),$.decoder,t,"key"),c=r.decoder(o.slice(i+1),$.decoder,t,"value")),c&&r.interpretNumericEntities&&t==="iso-8859-1"&&(c=jt(c)),c&&typeof c=="string"&&r.comma&&c.indexOf(",")>-1&&(c=c.split(",")),o.indexOf("[]=")>-1&&(c=zt(c)?[c]:c),Dr.call(e,h)?e[h]=b0.combine(e[h],c):e[h]=c}return e},It=function(x,f,r){for(var e=f,p=x.length-1;p>=0;--p){var u,E=x[p];if(E==="[]"&&r.parseArrays)u=[].concat(e);else{u=r.plainObjects?Object.create(null):{};var n=E.charAt(0)==="["&&E.charAt(E.length-1)==="]"?E.slice(1,-1):E,d=parseInt(n,10);!r.parseArrays&&n===""?u={0:e}:!isNaN(d)&&E!==n&&String(d)===n&&d>=0&&r.parseArrays&&d<=r.arrayLimit?(u=[],u[d]=e):u[n]=e}e=u}return e},Mt=function(f,r,e){if(f){var p=e.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,u=/(\[[^[\]]*])/,E=/(\[[^[\]]*])/g,n=e.depth>0&&u.exec(p),d=n?p.slice(0,n.index):p,t=[];if(d){if(!e.plainObjects&&Dr.call(Object.prototype,d)&&!e.allowPrototypes)return;t.push(d)}for(var o=0;e.depth>0&&(n=E.exec(p))!==null&&o<e.depth;){if(o+=1,!e.plainObjects&&Dr.call(Object.prototype,n[1].slice(1,-1))&&!e.allowPrototypes)return;t.push(n[1])}return n&&t.push("["+p.slice(n.index)+"]"),It(t,r,e)}},Ut=function(f){if(!f)return $;if(f.decoder!==null&&f.decoder!==void 0&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof f.charset>"u"?$.charset:f.charset;return{allowDots:typeof f.allowDots>"u"?$.allowDots:!!f.allowDots,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:$.allowPrototypes,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:$.arrayLimit,charset:r,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:$.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:$.comma,decoder:typeof f.decoder=="function"?f.decoder:$.decoder,delimiter:typeof f.delimiter=="string"||b0.isRegExp(f.delimiter)?f.delimiter:$.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:$.depth,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:$.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:$.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:$.plainObjects,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:$.strictNullHandling}},Tt=function(x,f){var r=Ut(f);if(x===""||x===null||typeof x>"u")return r.plainObjects?Object.create(null):{};for(var e=typeof x=="string"?qt(x,r):x,p=r.plainObjects?Object.create(null):{},u=Object.keys(e),E=0;E<u.length;++E){var n=u[E],d=Mt(n,e[n],r);p=b0.merge(p,d,r)}return b0.compact(p)};const Gt=D0(Tt);var k0={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */k0.exports,function(x,f){(function(r){var e=f&&!f.nodeType&&f,p=x&&!x.nodeType&&x,u=typeof T=="object"&&T;(u.global===u||u.window===u||u.self===u)&&(r=u);var E,n=2147483647,d=36,t=1,o=26,B=38,i=700,h=72,c=128,A="-",l=/^xn--/,D=/[^\x20-\x7E]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,s={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=d-t,F=Math.floor,g=String.fromCharCode,m;function w(j){throw new RangeError(s[j])}function z(j,b){for(var H=j.length,S=[];H--;)S[H]=b(j[H]);return S}function C(j,b){var H=j.split("@"),S="";H.length>1&&(S=H[0]+"@",j=H[1]),j=j.replace(a,".");var P=j.split("."),G=z(P,b).join(".");return S+G}function y(j){for(var b=[],H=0,S=j.length,P,G;H<S;)P=j.charCodeAt(H++),P>=55296&&P<=56319&&H<S?(G=j.charCodeAt(H++),(G&64512)==56320?b.push(((P&1023)<<10)+(G&1023)+65536):(b.push(P),H--)):b.push(P);return b}function k(j){return z(j,function(b){var H="";return b>65535&&(b-=65536,H+=g(b>>>10&1023|55296),b=56320|b&1023),H+=g(b),H}).join("")}function O(j){return j-48<10?j-22:j-65<26?j-65:j-97<26?j-97:d}function N(j,b){return j+22+75*(j<26)-((b!=0)<<5)}function R(j,b,H){var S=0;for(j=H?F(j/i):j>>1,j+=F(j/b);j>v*o>>1;S+=d)j=F(j/v);return F(S+(v+1)*j/(j+B))}function I(j){var b=[],H=j.length,S,P=0,G=c,U=h,K,q,r0,e0,X,_,Y,Z,x0;for(K=j.lastIndexOf(A),K<0&&(K=0),q=0;q<K;++q)j.charCodeAt(q)>=128&&w("not-basic"),b.push(j.charCodeAt(q));for(r0=K>0?K+1:0;r0<H;){for(e0=P,X=1,_=d;r0>=H&&w("invalid-input"),Y=O(j.charCodeAt(r0++)),(Y>=d||Y>F((n-P)/X))&&w("overflow"),P+=Y*X,Z=_<=U?t:_>=U+o?o:_-U,!(Y<Z);_+=d)x0=d-Z,X>F(n/x0)&&w("overflow"),X*=x0;S=b.length+1,U=R(P-e0,S,e0==0),F(P/S)>n-G&&w("overflow"),G+=F(P/S),P%=S,b.splice(P++,0,G)}return k(b)}function V(j){var b,H,S,P,G,U,K,q,r0,e0,X,_=[],Y,Z,x0,f0;for(j=y(j),Y=j.length,b=c,H=0,G=h,U=0;U<Y;++U)X=j[U],X<128&&_.push(g(X));for(S=P=_.length,P&&_.push(A);S<Y;){for(K=n,U=0;U<Y;++U)X=j[U],X>=b&&X<K&&(K=X);for(Z=S+1,K-b>F((n-H)/Z)&&w("overflow"),H+=(K-b)*Z,b=K,U=0;U<Y;++U)if(X=j[U],X<b&&++H>n&&w("overflow"),X==b){for(q=H,r0=d;e0=r0<=G?t:r0>=G+o?o:r0-G,!(q<e0);r0+=d)f0=q-e0,x0=d-e0,_.push(g(N(e0+f0%x0,0))),q=F(f0/x0);_.push(g(N(q,0))),G=R(H,Z,S==P),H=0,++S}++H,++b}return _.join("")}function Q(j){return C(j,function(b){return l.test(b)?I(b.slice(4).toLowerCase()):b})}function W(j){return C(j,function(b){return D.test(b)?"xn--"+V(b):b})}if(E={version:"1.4.1",ucs2:{decode:y,encode:k},decode:I,encode:V,toASCII:W,toUnicode:Q},e&&p)if(x.exports==e)p.exports=E;else for(m in E)E.hasOwnProperty(m)&&(e[m]=E[m]);else r.punycode=E})(T)}(k0,k0.exports);var Lt=k0.exports,Qt=Lt;function c0(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Vt=/^([a-z0-9.+-]+:)/i,Wt=/:[0-9]*$/,Kt=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Yt=["<",">",'"',"`"," ","\r",`
|
|
326
|
+
`," "],Zt=["{","}","|","\\","^","`"].concat(Yt),gr=["'"].concat(Zt),de=["%","/","?",";","#"].concat(gr),ve=["/","?","#"],Xt=255,pe=/^[+a-z0-9A-Z_-]{0,63}$/,Jt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_t={javascript:!0,"javascript:":!0},br={javascript:!0,"javascript:":!0},B0={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},mr=p0;function Ae(x,f,r){if(x&&typeof x=="object"&&x instanceof c0)return x;var e=new c0;return e.parse(x,f,r),e}c0.prototype.parse=function(x,f,r){if(typeof x!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var e=x.indexOf("?"),p=e!==-1&&e<x.indexOf("#")?"?":"#",u=x.split(p),E=/\\/g;u[0]=u[0].replace(E,"/"),x=u.join(p);var n=x;if(n=n.trim(),!r&&x.split("#").length===1){var d=Kt.exec(n);if(d)return this.path=n,this.href=n,this.pathname=d[1],d[2]?(this.search=d[2],f?this.query=mr.parse(this.search.substr(1)):this.query=this.search.substr(1)):f&&(this.search="",this.query={}),this}var t=Vt.exec(n);if(t){t=t[0];var o=t.toLowerCase();this.protocol=o,n=n.substr(t.length)}if(r||t||n.match(/^\/\/[^@/]+@[^@/]+/)){var B=n.substr(0,2)==="//";B&&!(t&&br[t])&&(n=n.substr(2),this.slashes=!0)}if(!br[t]&&(B||t&&!B0[t])){for(var i=-1,h=0;h<ve.length;h++){var c=n.indexOf(ve[h]);c!==-1&&(i===-1||c<i)&&(i=c)}var A,l;i===-1?l=n.lastIndexOf("@"):l=n.lastIndexOf("@",i),l!==-1&&(A=n.slice(0,l),n=n.slice(l+1),this.auth=decodeURIComponent(A)),i=-1;for(var h=0;h<de.length;h++){var c=n.indexOf(de[h]);c!==-1&&(i===-1||c<i)&&(i=c)}i===-1&&(i=n.length),this.host=n.slice(0,i),n=n.slice(i),this.parseHost(),this.hostname=this.hostname||"";var D=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!D)for(var a=this.hostname.split(/\./),h=0,s=a.length;h<s;h++){var v=a[h];if(v&&!v.match(pe)){for(var F="",g=0,m=v.length;g<m;g++)v.charCodeAt(g)>127?F+="x":F+=v[g];if(!F.match(pe)){var w=a.slice(0,h),z=a.slice(h+1),C=v.match(Jt);C&&(w.push(C[1]),z.unshift(C[2])),z.length&&(n="/"+z.join(".")+n),this.hostname=w.join(".");break}}}this.hostname.length>Xt?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=Qt.toASCII(this.hostname));var y=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+y,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),n[0]!=="/"&&(n="/"+n))}if(!_t[o])for(var h=0,s=gr.length;h<s;h++){var O=gr[h];if(n.indexOf(O)!==-1){var N=encodeURIComponent(O);N===O&&(N=escape(O)),n=n.split(O).join(N)}}var R=n.indexOf("#");R!==-1&&(this.hash=n.substr(R),n=n.slice(0,R));var I=n.indexOf("?");if(I!==-1?(this.search=n.substr(I),this.query=n.substr(I+1),f&&(this.query=mr.parse(this.query)),n=n.slice(0,I)):f&&(this.search="",this.query={}),n&&(this.pathname=n),B0[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var y=this.pathname||"",V=this.search||"";this.path=y+V}return this.href=this.format(),this},c0.prototype.format=function(){var x=this.auth||"";x&&(x=encodeURIComponent(x),x=x.replace(/%3A/i,":"),x+="@");var f=this.protocol||"",r=this.pathname||"",e=this.hash||"",p=!1,u="";this.host?p=x+this.host:this.hostname&&(p=x+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(p+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(u=mr.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var E=this.search||u&&"?"+u||"";return f&&f.substr(-1)!==":"&&(f+=":"),this.slashes||(!f||B0[f])&&p!==!1?(p="//"+(p||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):p||(p=""),e&&e.charAt(0)!=="#"&&(e="#"+e),E&&E.charAt(0)!=="?"&&(E="?"+E),r=r.replace(/[?#]/g,function(n){return encodeURIComponent(n)}),E=E.replace("#","%23"),f+p+r+E+e},c0.prototype.resolve=function(x){return this.resolveObject(Ae(x,!1,!0)).format()},c0.prototype.resolveObject=function(x){if(typeof x=="string"){var f=new c0;f.parse(x,!1,!0),x=f}for(var r=new c0,e=Object.keys(this),p=0;p<e.length;p++){var u=e[p];r[u]=this[u]}if(r.hash=x.hash,x.href==="")return r.href=r.format(),r;if(x.slashes&&!x.protocol){for(var E=Object.keys(x),n=0;n<E.length;n++){var d=E[n];d!=="protocol"&&(r[d]=x[d])}return B0[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(x.protocol&&x.protocol!==r.protocol){if(!B0[x.protocol]){for(var t=Object.keys(x),o=0;o<t.length;o++){var B=t[o];r[B]=x[B]}return r.href=r.format(),r}if(r.protocol=x.protocol,!x.host&&!br[x.protocol]){for(var s=(x.pathname||"").split("/");s.length&&!(x.host=s.shift()););x.host||(x.host=""),x.hostname||(x.hostname=""),s[0]!==""&&s.unshift(""),s.length<2&&s.unshift(""),r.pathname=s.join("/")}else r.pathname=x.pathname;if(r.search=x.search,r.query=x.query,r.host=x.host||"",r.auth=x.auth,r.hostname=x.hostname||x.host,r.port=x.port,r.pathname||r.search){var i=r.pathname||"",h=r.search||"";r.path=i+h}return r.slashes=r.slashes||x.slashes,r.href=r.format(),r}var c=r.pathname&&r.pathname.charAt(0)==="/",A=x.host||x.pathname&&x.pathname.charAt(0)==="/",l=A||c||r.host&&x.pathname,D=l,a=r.pathname&&r.pathname.split("/")||[],s=x.pathname&&x.pathname.split("/")||[],v=r.protocol&&!B0[r.protocol];if(v&&(r.hostname="",r.port=null,r.host&&(a[0]===""?a[0]=r.host:a.unshift(r.host)),r.host="",x.protocol&&(x.hostname=null,x.port=null,x.host&&(s[0]===""?s[0]=x.host:s.unshift(x.host)),x.host=null),l=l&&(s[0]===""||a[0]==="")),A)r.host=x.host||x.host===""?x.host:r.host,r.hostname=x.hostname||x.hostname===""?x.hostname:r.hostname,r.search=x.search,r.query=x.query,a=s;else if(s.length)a||(a=[]),a.pop(),a=a.concat(s),r.search=x.search,r.query=x.query;else if(x.search!=null){if(v){r.host=a.shift(),r.hostname=r.host;var F=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;F&&(r.auth=F.shift(),r.hostname=F.shift(),r.host=r.hostname)}return r.search=x.search,r.query=x.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!a.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var g=a.slice(-1)[0],m=(r.host||x.host||a.length>1)&&(g==="."||g==="..")||g==="",w=0,z=a.length;z>=0;z--)g=a[z],g==="."?a.splice(z,1):g===".."?(a.splice(z,1),w++):w&&(a.splice(z,1),w--);if(!l&&!D)for(;w--;w)a.unshift("..");l&&a[0]!==""&&(!a[0]||a[0].charAt(0)!=="/")&&a.unshift(""),m&&a.join("/").substr(-1)!=="/"&&a.push("");var C=a[0]===""||a[0]&&a[0].charAt(0)==="/";if(v){r.hostname=C?"":a.length?a.shift():"",r.host=r.hostname;var F=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;F&&(r.auth=F.shift(),r.hostname=F.shift(),r.host=r.hostname)}return l=l||r.host&&a.length,l&&!C&&a.unshift(""),a.length>0?r.pathname=a.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=x.auth||r.auth,r.slashes=r.slashes||x.slashes,r.href=r.format(),r},c0.prototype.parseHost=function(){var x=this.host,f=Wt.exec(x);f&&(f=f[0],f!==":"&&(this.port=f.substr(1)),x=x.substr(0,x.length-f.length)),x&&(this.hostname=x)};var $t=Ae,Be={exports:{}};(function(x,f){(function(r,e,p){x.exports=e(L(),S0(),O0())})(T,function(r){return r.HmacSHA256})})(Be);var rn=Be.exports;const en=D0(rn);var tn=h0();const Ce=D0(tn);var nn=u0();const xn=D0(nn),Ee={sign:(x,f)=>Ce.stringify(en(x,f)),md5Content:x=>M.isEmpty(x)?"":Ce.stringify(xn(x))},an=x=>{const f=M.sortBy(Object.keys(x));let r={};return M.map(f,e=>{M.isEmpty(x[e])?r[e]=null:M.isArray(x[e])?r[e]=x[e][0]:r[e]=x[e]}),r},on={map:M.map,keys:M.keys,compact:M.compact,sortBy:M.sortBy,forEach:M.forEach},sn=x=>{let f=x,r=M.mapValues(on,p=>(...u)=>(f=p(f,...u),e));const e=Object.assign(r,{value:()=>f});return e},Fe=x=>{const f=["X-Gw-Signature","X-Gw-Signature-headers","Accept","Content-MD5","Content-Type","Date"];let r="",e="",p=!0;return sn(x).keys(x).map(u=>!M.includes(f,u)&&{value:x[u],key:M.toLower(u)}).compact().sortBy(u=>u.key).forEach(u=>{r+=`${u.key}:${u.value}
|
|
327
|
+
`,p?e+=u.key:e+=","+u.key,p=!1}),{transformHeader:r,transformHeaderKeys:e}},cn="application/x-www-form-urlencoded",fn=(x,{appkey:f,appsecret:r,originQuery:e})=>{try{if(f&&r){const{method:p,url:u}=x;let E=e?Dt(u,e):u,n=M.get(x,"headers")||M.get(x,"header");const{Accept:d}=n,t=$t(E,!0),o=t.query;let B="",i=o;if(n["Content-Type"]||(n["Content-Type"]="application/json"),n.Accept||(n.Accept="*/*"),x.body&&n["Content-Type"].indexOf(cn)===-1)B=Ee.md5Content(x.body),n["Content-MD5"]=B;else{let l=x.body;if(M.isString(l)){const D=Gt(l);M.isEmpty(i)?i=D:i=Object.assign({},i,D)}}const h=Ft(t.pathname,Et(an(i))),c=n["Content-Type"]?n["Content-Type"]:"";n["X-Gw-Key"]=f,n["X-Gw-Timestamp"]=M.toString(M.now()),n["X-Gw-Nonce"]=M.toString(M.random(1e12,9999999999999));const A=`${p}
|
|
328
328
|
${d||"*/*"}
|
|
329
329
|
${B}
|
|
330
330
|
${c}
|
|
331
331
|
|
|
332
|
-
${Fe(n).transformHeader}${decodeURIComponent(h)}`;return console.log("==============",h,"======================"),console.log(A),console.log("==============",h,"======================"),n["X-Gw-Signature"]=Ee.sign(A,r),n["X-Gw-Signature-Headers"]=Fe(n).transformHeaderKeys,x}else console.warn("检查appkey和appsecret")}catch(p){console.log("error",p)}},hn=x=>{F0.interceptors.request.use(f=>(f.method=f.method.toUpperCase(),fn(f,x),f),f=>(console.log(f),Promise.reject(f)))};class un{constructor(f){this.config=f,this.env=q0,this.js=Bt[this.env.code],this.userInfo=null;const{gc_rsa:r}=f;console.log("网关配置:",r),r&&hn(r)}async init(){try{const f=await this.js.login(this.config),{userInfo:r}=f;this.userInfo=r,this.userInfo.unBind=this.unBind.bind(this),this.userInfo.bind=this.bind.bind(this)}catch(f){console.log(f)}}async unBind(){return this.js.unBind({...this.config,userInfo:this.userInfo})}async bind(){return this.js.bind({...this.config,userInfo:this.userInfo})}}async function ln(x){const f=new un(x);return await f.init(),f}o0.default=ln,o0.utils=Ct,Object.defineProperties(o0,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
332
|
+
${Fe(n).transformHeader}${decodeURIComponent(h)}`;return console.log("==============",h,"======================"),console.log(A),console.log("==============",h,"======================"),n["X-Gw-Signature"]=Ee.sign(A,r),n["X-Gw-Signature-Headers"]=Fe(n).transformHeaderKeys,x}else console.warn("检查appkey和appsecret")}catch(p){console.log("error",p)}},hn=x=>{F0.interceptors.request.use(f=>(f.method=f.method.toUpperCase(),fn(f,x),f),f=>(console.log(f),Promise.reject(f)))};class un{constructor(f){this.config=f,this.env=q0,this.js=Bt[this.env.code],this.userInfo=null;const{gc_rsa:r}=f;console.log("网关配置:",r),r&&hn(r)}async init(){try{const f=await this.js.login(this.config),{userInfo:r,thirdBiz:e}=f;this.userInfo=r,this.thirdBiz=e,this.userInfo.unBind=this.unBind.bind(this),this.userInfo.bind=this.bind.bind(this)}catch(f){console.log(f)}}async unBind(){return this.js.unBind({...this.config,userInfo:this.userInfo})}async bind(){return this.js.bind({...this.config,userInfo:this.userInfo})}}async function ln(x){const f=new un(x);return await f.init(),f}o0.default=ln,o0.utils=Ct,Object.defineProperties(o0,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -19,8 +19,9 @@ class Mobile {
|
|
|
19
19
|
async init() {
|
|
20
20
|
try {
|
|
21
21
|
const res = await this.js.login(this.config);
|
|
22
|
-
const { userInfo } = res;
|
|
22
|
+
const { userInfo, thirdBiz } = res;
|
|
23
23
|
this.userInfo = userInfo;
|
|
24
|
+
this.thirdBiz = thirdBiz;
|
|
24
25
|
this.userInfo.unBind = this.unBind.bind(this);
|
|
25
26
|
this.userInfo.bind = this.bind.bind(this);
|
|
26
27
|
} catch (error) {
|
package/src/modules/dd.js
CHANGED
|
@@ -36,22 +36,23 @@ export const login = async ({
|
|
|
36
36
|
const response = _.get(res, map.dataPath, res);
|
|
37
37
|
if (response && _.get(response, "result") === 0) {
|
|
38
38
|
const userInfo = _.get(response, "retVal", res);
|
|
39
|
+
const thirdBiz = _.get(response, "thirdBiz");
|
|
39
40
|
const { ucToken } = userInfo;
|
|
40
41
|
if (!_.isEmpty(ucToken)) {
|
|
41
|
-
resolve({ userInfo });
|
|
42
|
+
resolve({ userInfo, thirdBiz });
|
|
42
43
|
} else {
|
|
43
44
|
dd.biz.realm.getUserExclusiveInfo({
|
|
44
45
|
onSuccess: async function (result) {
|
|
45
46
|
// 导入 HTML 文件
|
|
46
47
|
if (result.isExclusiveApp === 0 && !manual) {
|
|
47
48
|
//如果是普通钉钉并且开了跳转
|
|
48
|
-
await bind({ apiPrefix, appCode, map, userInfo });
|
|
49
|
+
await bind({ apiPrefix, appCode, map, userInfo, thirdBiz });
|
|
49
50
|
} else {
|
|
50
|
-
resolve({ userInfo });
|
|
51
|
+
resolve({ userInfo, thirdBiz });
|
|
51
52
|
}
|
|
52
53
|
},
|
|
53
54
|
onFail: function (err) {
|
|
54
|
-
resolve({ userInfo });
|
|
55
|
+
resolve({ userInfo, thirdBiz });
|
|
55
56
|
}
|
|
56
57
|
});
|
|
57
58
|
}
|