某航的 webpack 逆向技术交流

某航采用多文件webpack,webpack需要加载器,把分拆的文件集合起来。
主要组件有:

  • 加载器
  • 函数数组
  • 函数字典

加密函数获取:
1、先找到列表价格信息。
2、再找到对应的api
3、然后根据api搜索到加密函数

定义加载器 loaddata.js

self = global
wqx = {}
!function () {
    "use strict";
    var e = {}
        , t = {};
    function a(n) {
        var f = t[n];
        if (void 0 !== f)
            return f.exports;
        var r = t[n] = {
            id: n,
            loaded: !1,
            exports: {}
        }
            , c = !0;
        try {
            e[n].call(r.exports, r, r.exports, a),
                c = !1
        } finally {
            c && delete t[n]
        }
        return r.loaded = !0,
            r.exports
    }
    wqx = a
    a.m = e,
        a.amdO = {},
        function () {
            var e = [];
            a.O = function (t, n, f, r) {
                if (!n) {
                    var c = 1 / 0;
                    for (u = 0; u < e.length; u++) {
                        n = e[u][0],
                            f = e[u][1],
                            r = e[u][2];
                        for (var d = !0, o = 0; o < n.length; o++)
                            (!1 & r || c >= r) && Object.keys(a.O).every((function (e) {
                                return a.O[e](n[o])
                            }
                            )) ? n.splice(o--, 1) : (d = !1,
                                r < c && (c = r));
                        if (d) {
                            e.splice(u--, 1);
                            var i = f();
                            void 0 !== i && (t = i)
                        }
                    }
                    return t
                }
                r = r || 0;
                for (var u = e.length; u > 0 && e[u - 1][2] > r; u--)
                    e[u] = e[u - 1];
                e[u] = [n, f, r]
            }
        }(),
        a.n = function (e) {
            var t = e && e.__esModule ? function () {
                return e.default
            }
                : function () {
                    return e
                }
                ;
            return a.d(t, {
                a: t
            }),
                t
        }
        ,
        a.d = function (e, t) {
            for (var n in t)
                a.o(t, n) && !a.o(e, n) && Object.defineProperty(e, n, {
                    enumerable: !0,
                    get: t[n]
                })
        }
        ,
        a.f = {},
        a.e = function (e) {
            return Promise.all(Object.keys(a.f).reduce((function (t, n) {
                return a.f[n](e, t),
                    t
            }
            ), []))
        }
        ,
        a.u = function (e) {
            return 1400 === e ? "static/chunks/1400.a345fabf9d39e244.js" : 646 === e ? "static/chunks/646.fb15087cbb9b2ed3.js" : 4983 === e ? "static/chunks/4983.7c00e3a76bc23d2e.js" : "static/chunks/" + e + "-" + {
                342: "27254005eea2461a",
                2174: "60a8d9f294439b72",
                2397: "b500902e4068efd6",
                3566: "08051f9ad3a0eb97",
                4178: "734a4f91d913f5c9",
                4877: "95d790fbc6e059ff",
                5555: "2e6e07b17a1cd38a",
                5790: "2c0bdfd902cf83ba",
                6163: "8c2535ff06b475d8",
                7819: "3b497bbf2c417c4c",
                8936: "f8a5d6a9f5b5270e",
                9252: "63e259bf2abacea5"
            }[e] + ".js"
        }
        ,
        a.miniCssF = function (e) {
            return "static/css/" + {
                89: "fac8b51350d6d8fe",
                91: "e2e6fa3eded704a9",
                103: "5d747fc8f5197917",
                105: "fc7189e9c95cbbf2",
                342: "ac90bec5dd62cd2a",
                415: "838ef5adfbe51352",
                502: "2837a4b91d35406a",
                507: "b226d13edec17969",
                636: "0340154e19613d6a",
                646: "112edec6f77cfcd3",
                662: "73c387ee9022bdb4",
                702: "4227289d7699a5a2",
                844: "7b684555aefbdc5b",
                1057: "28e810fd00443e5f",
                1214: "7ee1440e3022e64c",
                1400: "8c6744619217c316",
                1415: "14a8e64202ca5728",
                1552: "90990c93cc717b50",
                1624: "10a0cc81a86583eb",
                1676: "916495b30b6e53d2",
                2104: "a2d229dedcc7d0ff",
                2197: "7d8691141c293495",
                2437: "f0bf2c7ed3ae071d",
                2503: "78423b8a0fb8c35d",
                2523: "15bcd9339ceae13c",
                2705: "94b91e2b18f70eaf",
                2888: "a2f02b1f015f1c31",
                2889: "c6fa9af309ff703f",
                2943: "b9faf9dbd6ab3ece",
                3072: "2bc9c678e266f5d1",
                3226: "913dd9dc51b3fca9",
                3239: "6e7ec7702b239582",
                3270: "aa1031242a5be13e",
                3320: "284109c66968746b",
                3770: "e39e06d1434c07db",
                3897: "2b449b0dccaa30f2",
                3998: "4781d5f8ab7d1528",
                4053: "75a3157c7579e5f5",
                4136: "fbbc9d8b7bfe789d",
                4159: "15c0f1803c5b89f8",
                4285: "355cb4e3e829a1ba",
                4413: "2a2a73e4499ba62b",
                4429: "200643aef5b36e5d",
                4581: "9fd0d9a116ceeecc",
                4726: "26f8ca2d751810fd",
                4745: "45d209c9e8ec6011",
                4752: "9f8bf72bc0c0995f",
                4820: "83aa3348664cc7b4",
                4983: "fd85590764b6ea47",
                5397: "2bf4e86efb4fe716",
                5405: "e29a6ed1988971d8",
                5555: "aa4edffdc20d1db7",
                5703: "281235c066670244",
                6147: "07738364507eacf9",
                6401: "d6916727326d55c6",
                6467: "916495b30b6e53d2",
                6607: "566d16580505a623",
                6642: "fd23c7aa7f5e136e",
                6680: "e11816814739fc62",
                6697: "4c1df4b54b12b220",
                7087: "b50e6a6af32a410f",
                7162: "512ba70d452d8207",
                7568: "65efbb810b6472f8",
                7591: "a967a56881625113",
                7654: "864cc39323fef3b2",
                7691: "140533a36179f168",
                7783: "2c6ef54efa9c16e4",
                7801: "c14c98948ff46dbe",
                8079: "ce0266c87139f570",
                8180: "99e1891ef1707bfe",
                8460: "e555eea26c7cacee",
                8469: "f67d32c123e6972c",
                8620: "bb251ccf211890b4",
                8735: "34c5f1323d3a2f8a",
                8852: "1416d170d73745d1",
                8998: "5576b6d99683c588",
                9203: "e4eefb636d3f1666",
                9319: "e7b0240f8d805595",
                9601: "b015e9a3a2fd8c00",
                9892: "298f965ae04c282a"
            }[e] + ".css"
        }
        ,
        a.g = function () {
            if ("object" === typeof globalThis)
                return globalThis;
            try {
                return this || new Function("return this")()
            } catch (e) {
                if ("object" === typeof window)
                    return window
            }
        }(),
        a.o = function (e, t) {
            return Object.prototype.hasOwnProperty.call(e, t)
        }
        ,
        function () {
            var e = {}
                , t = "_N_E:";
            a.l = function (n, f, r, c) {
                if (e[n])
                    e[n].push(f);
                else {
                    var d, o;
                    if (void 0 !== r)
                        for (var i = document.getElementsByTagName("script"), u = 0; u < i.length; u++) {
                            var b = i[u];
                            if (b.getAttribute("src") == n || b.getAttribute("data-webpack") == t + r) {
                                d = b;
                                break
                            }
                        }
                    d || (o = !0,
                        (d = document.createElement("script")).charset = "utf-8",
                        d.timeout = 120,
                        a.nc && d.setAttribute("nonce", a.nc),
                        d.setAttribute("data-webpack", t + r),
                        d.src = n),
                        e[n] = [f];
                    var l = function (t, a) {
                        d.onerror = d.onload = null,
                            clearTimeout(s);
                        var f = e[n];
                        if (delete e[n],
                            d.parentNode && d.parentNode.removeChild(d),
                            f && f.forEach((function (e) {
                                return e(a)
                            }
                            )),
                            t)
                            return t(a)
                    }
                        , s = setTimeout(l.bind(null, void 0, {
                            type: "timeout",
                            target: d
                        }), 12e4);
                    d.onerror = l.bind(null, d.onerror),
                        d.onload = l.bind(null, d.onload),
                        o && document.head.appendChild(d)
                }
            }
        }(),
        a.r = function (e) {
            "undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
                value: "Module"
            }),
                Object.defineProperty(e, "__esModule", {
                    value: !0
                })
        }
        ,
        a.nmd = function (e) {
            return e.paths = [],
                e.children || (e.children = []),
                e
        }
        ,
        a.p = "",
        function () {
            var e = function (e) {
                return new Promise((function (t, n) {
                    var f = a.miniCssF(e)
                        , r = a.p + f;
                    if (function (e, t) {
                        for (var a = document.getElementsByTagName("link"), n = 0; n < a.length; n++) {
                            var f = (c = a[n]).getAttribute("data-href") || c.getAttribute("href");
                            if ("stylesheet" === c.rel && (f === e || f === t))
                                return c
                        }
                        var r = document.getElementsByTagName("style");
                        for (n = 0; n < r.length; n++) {
                            var c;
                            if ((f = (c = r[n]).getAttribute("data-href")) === e || f === t)
                                return c
                        }
                    }(f, r))
                        return t();
                    !function (e, t, a, n) {
                        var f = document.createElement("link");
                        f.rel = "stylesheet",
                            f.type = "text/css",
                            f.onerror = f.onload = function (r) {
                                if (f.onerror = f.onload = null,
                                    "load" === r.type)
                                    a();
                                else {
                                    var c = r && ("load" === r.type ? "missing" : r.type)
                                        , d = r && r.target && r.target.href || t
                                        , o = new Error("Loading CSS chunk " + e + " failed.\n(" + d + ")");
                                    o.code = "CSS_CHUNK_LOAD_FAILED",
                                        o.type = c,
                                        o.request = d,
                                        f.parentNode.removeChild(f),
                                        n(o)
                                }
                            }
                            ,
                            f.href = t,
                            document.head.appendChild(f)
                    }(e, r, t, n)
                }
                ))
            }
                , t = {
                    2272: 0
                };
            a.f.miniCss = function (a, n) {
                t[a] ? n.push(t[a]) : 0 !== t[a] && {
                    342: 1,
                    646: 1,
                    1400: 1,
                    4983: 1,
                    5555: 1
                }[a] && n.push(t[a] = e(a).then((function () {
                    t[a] = 0
                }
                ), (function (e) {
                    throw delete t[a],
                    e
                }
                )))
            }
        }(),
        function () {
            var e = {
                2272: 0,
                844: 0,
                7691: 0,
                2437: 0,
                6680: 0,
                103: 0
            };
            a.f.j = function (t, n) {
                var f = a.o(e, t) ? e[t] : void 0;
                if (0 !== f)
                    if (f)
                        n.push(f[2]);
                    else if (/^(103|2272|2437|6680|7691|844)$/.test(t))
                        e[t] = 0;
                    else {
                        var r = new Promise((function (a, n) {
                            f = e[t] = [a, n]
                        }
                        ));
                        n.push(f[2] = r);
                        var c = a.p + a.u(t)
                            , d = new Error;
                        a.l(c, (function (n) {
                            if (a.o(e, t) && (0 !== (f = e[t]) && (e[t] = void 0),
                                f)) {
                                var r = n && ("load" === n.type ? "missing" : n.type)
                                    , c = n && n.target && n.target.src;
                                d.message = "Loading chunk " + t + " failed.\n(" + r + ": " + c + ")",
                                    d.name = "ChunkLoadError",
                                    d.type = r,
                                    d.request = c,
                                    f[1](d)
                            }
                        }
                        ), "chunk-" + t, t)
                    }
            }
                ,
                a.O.j = function (t) {
                    return 0 === e[t]
                }
                ;
            var t = function (t, n) {
                var f, r, c = n[0], d = n[1], o = n[2], i = 0;
                if (c.some((function (t) {
                    return 0 !== e[t]
                }
                ))) {
                    for (f in d)
                        a.o(d, f) && (a.m[f] = d[f]);
                    if (o)
                        var u = o(a)
                }
                for (t && t(n); i < c.length; i++)
                    r = c[i],
                        a.o(e, r) && e[r] && e[r][0](),
                        e[r] = 0;
                return a.O(u)
            }
                , n = self.webpackChunk_N_E = self.webpackChunk_N_E || [];
            n.forEach(t.bind(null, 0)),
                n.push = t.bind(null, n.push.bind(n))
        }()
}();

定义字典 dict_func.js

(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([[2888], {
    36077: function (e, t) {
        (function () {
            var t;
            function n(e, t, n) {
                null != e && ("number" == typeof e ? this.fromNumber(e, t, n) : null == t && "string" != typeof e ? this.fromString(e, 256) : this.fromString(e, t))
            }
            function r() {
                return new n(null)
            }
            var i = "undefined" !== typeof navigator;
            i && "Microsoft Internet Explorer" == navigator.appName ? (n.prototype.am = function (e, t, n, r, i, a) {
                for (var o = 32767 & t, s = t >> 15; --a >= 0;) {
                    var c = 32767 & this[e]
                        , l = this[e++] >> 15
                        , u = s * c + l * o;
                    i = ((c = o * c + ((32767 & u) << 15) + n[r] + (1073741823 & i)) >>> 30) + (u >>> 15) + s * l + (i >>> 30),
                        n[r++] = 1073741823 & c
                }
                return i
            }
                ,
                t = 30) : i && "Netscape" != navigator.appName ? (n.prototype.am = function (e, t, n, r, i, a) {
                    for (; --a >= 0;) {
                        var o = t * this[e++] + n[r] + i;
                        i = Math.floor(o / 67108864),
                            n[r++] = 67108863 & o
                    }
                    return i
                }
                    ,
                    t = 26) : (n.prototype.am = function (e, t, n, r, i, a) {
                        for (var o = 16383 & t, s = t >> 14; --a >= 0;) {
                            var c = 16383 & this[e]
                                , l = this[e++] >> 14
                                , u = s * c + l * o;
                            i = ((c = o * c + ((16383 & u) << 14) + n[r] + i) >> 28) + (u >> 14) + s * l,
                                n[r++] = 268435455 & c
                        }
                        return i
                    }
                        ,
                        t = 28),
                n.prototype.DB = t,
                n.prototype.DM = (1 << t) - 1,
                n.prototype.DV = 1 << t;
            n.prototype.FV = Math.pow(2, 52),
                n.prototype.F1 = 52 - t,
                n.prototype.F2 = 2 * t - 52;
            var a, o, s = new Array;
            for (a = "0".charCodeAt(0),
                o = 0; o <= 9; ++o)
                s[a++] = o;
            for (a = "a".charCodeAt(0),
                o = 10; o < 36; ++o)
                s[a++] = o;
            for (a = "A".charCodeAt(0),
                o = 10; o < 36; ++o)
                s[a++] = o;
            function c(e) {
                return "0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)
            }
            function l(e, t) {
                var n = s[e.charCodeAt(t)];
                return null == n ? -1 : n
            }
            function u(e) {
                var t = r();
                return t.fromInt(e),
                    t
            }
            function h(e) {
                var t, n = 1;
                return 0 != (t = e >>> 16) && (e = t,
                    n += 16),
                    0 != (t = e >> 8) && (e = t,
                        n += 8),
                    0 != (t = e >> 4) && (e = t,
                        n += 4),
                    0 != (t = e >> 2) && (e = t,
                        n += 2),
                    0 != (t = e >> 1) && (e = t,
                        n += 1),
                    n
            }
            function d(e) {
                this.m = e
            }
            function f(e) {
                this.m = e,
                    this.mp = e.invDigit(),
                    this.mpl = 32767 & this.mp,
                    this.mph = this.mp >> 15,
                    this.um = (1 << e.DB - 15) - 1,
                    this.mt2 = 2 * e.t
            }
            function p(e, t) {
                return e & t
            }
            function g(e, t) {
                return e | t
            }
            function m(e, t) {
                return e ^ t
            }
            function y(e, t) {
                return e & ~t
            }
            function _(e) {
                if (0 == e)
                    return -1;
                var t = 0;
                return 0 == (65535 & e) && (e >>= 16,
                    t += 16),
                    0 == (255 & e) && (e >>= 8,
                        t += 8),
                    0 == (15 & e) && (e >>= 4,
                        t += 4),
                    0 == (3 & e) && (e >>= 2,
                        t += 2),
                    0 == (1 & e) && ++t,
                    t
            }
            function v(e) {
                for (var t = 0; 0 != e;)
                    e &= e - 1,
                        ++t;
                return t
            }
            function b() { }
            function E(e) {
                return e
            }
            function x(e) {
                this.r2 = r(),
                    this.q3 = r(),
                    n.ONE.dlShiftTo(2 * e.t, this.r2),
                    this.mu = this.r2.divide(e),
                    this.m = e
            }
            d.prototype.convert = function (e) {
                return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e
            }
                ,
                d.prototype.revert = function (e) {
                    return e
                }
                ,
                d.prototype.reduce = function (e) {
                    e.divRemTo(this.m, null, e)
                }
                ,
                d.prototype.mulTo = function (e, t, n) {
                    e.multiplyTo(t, n),
                        this.reduce(n)
                }
                ,
                d.prototype.sqrTo = function (e, t) {
                    e.squareTo(t),
                        this.reduce(t)
                }
                ,
                f.prototype.convert = function (e) {
                    var t = r();
                    return e.abs().dlShiftTo(this.m.t, t),
                        t.divRemTo(this.m, null, t),
                        e.s < 0 && t.compareTo(n.ZERO) > 0 && this.m.subTo(t, t),
                        t
                }
                ,
                f.prototype.revert = function (e) {
                    var t = r();
                    return e.copyTo(t),
                        this.reduce(t),
                        t
                }
                ,
                f.prototype.reduce = function (e) {
                    for (; e.t <= this.mt2;)
                        e[e.t++] = 0;
                    for (var t = 0; t < this.m.t; ++t) {
                        var n = 32767 & e[t]
                            , r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
                        for (e[n = t + this.m.t] += this.m.am(0, r, e, t, 0, this.m.t); e[n] >= e.DV;)
                            e[n] -= e.DV,
                                e[++n]++
                    }
                    e.clamp(),
                        e.drShiftTo(this.m.t, e),
                        e.compareTo(this.m) >= 0 && e.subTo(this.m, e)
                }
                ,
                f.prototype.mulTo = function (e, t, n) {
                    e.multiplyTo(t, n),
                        this.reduce(n)
                }
                ,
                f.prototype.sqrTo = function (e, t) {
                    e.squareTo(t),
                        this.reduce(t)
                }
                ,
                n.prototype.copyTo = function (e) {
                    for (var t = this.t - 1; t >= 0; --t)
                        e[t] = this[t];
                    e.t = this.t,
                        e.s = this.s
                }
                ,
                n.prototype.fromInt = function (e) {
                    this.t = 1,
                        this.s = e < 0 ? -1 : 0,
                        e > 0 ? this[0] = e : e < -1 ? this[0] = e + this.DV : this.t = 0
                }
                ,
                n.prototype.fromString = function (e, t) {
                    var r;
                    if (16 == t)
                        r = 4;
                    else if (8 == t)
                        r = 3;
                    else if (256 == t)
                        r = 8;
                    else if (2 == t)
                        r = 1;
                    else if (32 == t)
                        r = 5;
                    else {
                        if (4 != t)
                            return void this.fromRadix(e, t);
                        r = 2
                    }
                    this.t = 0,
                        this.s = 0;
                    for (var i = e.length, a = !1, o = 0; --i >= 0;) {
                        var s = 8 == r ? 255 & e[i] : l(e, i);
                        s < 0 ? "-" == e.charAt(i) && (a = !0) : (a = !1,
                            0 == o ? this[this.t++] = s : o + r > this.DB ? (this[this.t - 1] |= (s & (1 << this.DB - o) - 1) << o,
                                this[this.t++] = s >> this.DB - o) : this[this.t - 1] |= s << o,
                            (o += r) >= this.DB && (o -= this.DB))
                    }
                    8 == r && 0 != (128 & e[0]) && (this.s = -1,
                        o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)),
                        this.clamp(),
                        a && n.ZERO.subTo(this, this)
                }
                ,
                n.prototype.clamp = function () {
                    for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e;)
                        --this.t
                }
                ,
                n.prototype.dlShiftTo = function (e, t) {
                    var n;
                    for (n = this.t - 1; n >= 0; --n)
                        t[n + e] = this[n];
                    for (n = e - 1; n >= 0; --n)
                        t[n] = 0;
                    t.t = this.t + e,
                        t.s = this.s
                }
                ,
                n.prototype.drShiftTo = function (e, t) {
                    for (var n = e; n < this.t; ++n)
                        t[n - e] = this[n];
                    t.t = Math.max(this.t - e, 0),
                        t.s = this.s
                }
                ,
                n.prototype.lShiftTo = function (e, t) {
                    var n, r = e % this.DB, i = this.DB - r, a = (1 << i) - 1, o = Math.floor(e / this.DB), s = this.s << r & this.DM;
                    for (n = this.t - 1; n >= 0; --n)
                        t[n + o + 1] = this[n] >> i | s,
                            s = (this[n] & a) << r;
                    for (n = o - 1; n >= 0; --n)
                        t[n] = 0;
                    t[o] = s,
                        t.t = this.t + o + 1,
                        t.s = this.s,
                        t.clamp()
                }
                ,
                n.prototype.rShiftTo = function (e, t) {
                    t.s = this.s;
                    var n = Math.floor(e / this.DB);
                    if (n >= this.t)
                        t.t = 0;
                    else {
                        var r = e % this.DB
                            , i = this.DB - r
                            , a = (1 << r) - 1;
                        t[0] = this[n] >> r;
                        for (var o = n + 1; o < this.t; ++o)
                            t[o - n - 1] |= (this[o] & a) << i,
                                t[o - n] = this[o] >> r;
                        r > 0 && (t[this.t - n - 1] |= (this.s & a) << i),
                            t.t = this.t - n,
                            t.clamp()
                    }
                }
                ,
                n.prototype.subTo = function (e, t) {
                    for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;)
                        r += this[n] - e[n],
                            t[n++] = r & this.DM,
                            r >>= this.DB;
                    if (e.t < this.t) {
                        for (r -= e.s; n < this.t;)
                            r += this[n],
                                t[n++] = r & this.DM,
                                r >>= this.DB;
                        r += this.s
                    } else {
                        for (r += this.s; n < e.t;)
                            r -= e[n],
                                t[n++] = r & this.DM,
                                r >>= this.DB;
                        r -= e.s
                    }
                    t.s = r < 0 ? -1 : 0,
                        r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r),
                        t.t = n,
                        t.clamp()
                }
                ,
                n.prototype.multiplyTo = function (e, t) {
                    var r = this.abs()
                        , i = e.abs()
                        , a = r.t;
                    for (t.t = a + i.t; --a >= 0;)
                        t[a] = 0;
                    for (a = 0; a < i.t; ++a)
                        t[a + r.t] = r.am(0, i[a], t, a, 0, r.t);
                    t.s = 0,
                        t.clamp(),
                        this.s != e.s && n.ZERO.subTo(t, t)
                }
                ,
                n.prototype.squareTo = function (e) {
                    for (var t = this.abs(), n = e.t = 2 * t.t; --n >= 0;)
                        e[n] = 0;
                    for (n = 0; n < t.t - 1; ++n) {
                        var r = t.am(n, t[n], e, 2 * n, 0, 1);
                        (e[n + t.t] += t.am(n + 1, 2 * t[n], e, 2 * n + 1, r, t.t - n - 1)) >= t.DV && (e[n + t.t] -= t.DV,
                            e[n + t.t + 1] = 1)
                    }
                    e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)),
                        e.s = 0,
                        e.clamp()
                }
                ,
                n.prototype.divRemTo = function (e, t, i) {
                    var a = e.abs();
                    if (!(a.t <= 0)) {
                        var o = this.abs();
                        if (o.t < a.t)
                            return null != t && t.fromInt(0),
                                void (null != i && this.copyTo(i));
                        null == i && (i = r());
                        var s = r()
                            , c = this.s
                            , l = e.s
                            , u = this.DB - h(a[a.t - 1]);
                        u > 0 ? (a.lShiftTo(u, s),
                            o.lShiftTo(u, i)) : (a.copyTo(s),
                                o.copyTo(i));
                        var d = s.t
                            , f = s[d - 1];
                        if (0 != f) {
                            var p = f * (1 << this.F1) + (d > 1 ? s[d - 2] >> this.F2 : 0)
                                , g = this.FV / p
                                , m = (1 << this.F1) / p
                                , y = 1 << this.F2
                                , _ = i.t
                                , v = _ - d
                                , b = null == t ? r() : t;
                            for (s.dlShiftTo(v, b),
                                i.compareTo(b) >= 0 && (i[i.t++] = 1,
                                    i.subTo(b, i)),
                                n.ONE.dlShiftTo(d, b),
                                b.subTo(s, s); s.t < d;)
                                s[s.t++] = 0;
                            for (; --v >= 0;) {
                                var E = i[--_] == f ? this.DM : Math.floor(i[_] * g + (i[_ - 1] + y) * m);
                                if ((i[_] += s.am(0, E, i, v, 0, d)) < E)
                                    for (s.dlShiftTo(v, b),
                                        i.subTo(b, i); i[_] < --E;)
                                        i.subTo(b, i)
                            }
                            null != t && (i.drShiftTo(d, t),
                                c != l && n.ZERO.subTo(t, t)),
                                i.t = d,
                                i.clamp(),
                                u > 0 && i.rShiftTo(u, i),
                                c < 0 && n.ZERO.subTo(i, i)
                        }
                    }
                }
                ,
                n.prototype.invDigit = function () {
                    if (this.t < 1)
                        return 0;
                    var e = this[0];
                    if (0 == (1 & e))
                        return 0;
                    var t = 3 & e;
                    return (t = (t = (t = (t = t * (2 - (15 & e) * t) & 15) * (2 - (255 & e) * t) & 255) * (2 - ((65535 & e) * t & 65535)) & 65535) * (2 - e * t % this.DV) % this.DV) > 0 ? this.DV - t : -t
                }
                ,
                n.prototype.isEven = function () {
                    return 0 == (this.t > 0 ? 1 & this[0] : this.s)
                }
                ,
                n.prototype.exp = function (e, t) {
                    if (e > 4294967295 || e < 1)
                        return n.ONE;
                    var i = r()
                        , a = r()
                        , o = t.convert(this)
                        , s = h(e) - 1;
                    for (o.copyTo(i); --s >= 0;)
                        if (t.sqrTo(i, a),
                            (e & 1 << s) > 0)
                            t.mulTo(a, o, i);
                        else {
                            var c = i;
                            i = a,
                                a = c
                        }
                    return t.revert(i)
                }
                ,
                n.prototype.toString = function (e) {
                    if (this.s < 0)
                        return "-" + this.negate().toString(e);
                    var t;
                    if (16 == e)
                        t = 4;
                    else if (8 == e)
                        t = 3;
                    else if (2 == e)
                        t = 1;
                    else if (32 == e)
                        t = 5;
                    else {
                        if (4 != e)
                            return this.toRadix(e);
                        t = 2
                    }
                    var n, r = (1 << t) - 1, i = !1, a = "", o = this.t, s = this.DB - o * this.DB % t;
                    if (o-- > 0)
                        for (s < this.DB && (n = this[o] >> s) > 0 && (i = !0,
                            a = c(n)); o >= 0;)
                            s < t ? (n = (this[o] & (1 << s) - 1) << t - s,
                                n |= this[--o] >> (s += this.DB - t)) : (n = this[o] >> (s -= t) & r,
                                    s <= 0 && (s += this.DB,
                                        --o)),
                                n > 0 && (i = !0),
                                i && (a += c(n));
                    return i ? a : "0"
                }
                ,
                n.prototype.negate = function () {
                    var e = r();
                    return n.ZERO.subTo(this, e),
                        e
                }
                ,
                n.prototype.abs = function () {
                    return this.s < 0 ? this.negate() : this
                }
                ,
                n.prototype.compareTo = function (e) {
                    var t = this.s - e.s;
                    if (0 != t)
                        return t;
                    var n = this.t;
                    if (0 != (t = n - e.t))
                        return this.s < 0 ? -t : t;
                    for (; --n >= 0;)
                        if (0 != (t = this[n] - e[n]))
                            return t;
                    return 0
                }
                ,
                n.prototype.bitLength = function () {
                    return this.t <= 0 ? 0 : this.DB * (this.t - 1) + h(this[this.t - 1] ^ this.s & this.DM)
                }
                ,
                n.prototype.mod = function (e) {
                    var t = r();
                    return this.abs().divRemTo(e, null, t),
                        this.s < 0 && t.compareTo(n.ZERO) > 0 && e.subTo(t, t),
                        t
                }
                ,
                n.prototype.modPowInt = function (e, t) {
                    var n;
                    return n = e < 256 || t.isEven() ? new d(t) : new f(t),
                        this.exp(e, n)
                }
                ,
                n.ZERO = u(0),
                n.ONE = u(1),
                b.prototype.convert = E,
                b.prototype.revert = E,
                b.prototype.mulTo = function (e, t, n) {
                    e.multiplyTo(t, n)
                }
                ,
                b.prototype.sqrTo = function (e, t) {
                    e.squareTo(t)
                }
                ,
                x.prototype.convert = function (e) {
                    if (e.s < 0 || e.t > 2 * this.m.t)
                        return e.mod(this.m);
                    if (e.compareTo(this.m) < 0)
                        return e;
                    var t = r();
                    return e.copyTo(t),
                        this.reduce(t),
                        t
                }
                ,
                x.prototype.revert = function (e) {
                    return e
                }
                ,
                x.prototype.reduce = function (e) {
                    for (e.drShiftTo(this.m.t - 1, this.r2),
                        e.t > this.m.t + 1 && (e.t = this.m.t + 1,
                            e.clamp()),
                        this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3),
                        this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;)
                        e.dAddOffset(1, this.m.t + 1);
                    for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;)
                        e.subTo(this.m, e)
                }
                ,
                x.prototype.mulTo = function (e, t, n) {
                    e.multiplyTo(t, n),
                        this.reduce(n)
                }
                ,
                x.prototype.sqrTo = function (e, t) {
                    e.squareTo(t),
                        this.reduce(t)
                }
                ;
            var A, w, S, k = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], C = (1 << 26) / k[k.length - 1];
            function P() {
                var e;
                e = (new Date).getTime(),
                    w[S++] ^= 255 & e,
                    w[S++] ^= e >> 8 & 255,
                    w[S++] ^= e >> 16 & 255,
                    w[S++] ^= e >> 24 & 255,
                    S >= z && (S -= z)
            }
            if (n.prototype.chunkSize = function (e) {
                return Math.floor(Math.LN2 * this.DB / Math.log(e))
            }
                ,
                n.prototype.toRadix = function (e) {
                    if (null == e && (e = 10),
                        0 == this.signum() || e < 2 || e > 36)
                        return "0";
                    var t = this.chunkSize(e)
                        , n = Math.pow(e, t)
                        , i = u(n)
                        , a = r()
                        , o = r()
                        , s = "";
                    for (this.divRemTo(i, a, o); a.signum() > 0;)
                        s = (n + o.intValue()).toString(e).substr(1) + s,
                            a.divRemTo(i, a, o);
                    return o.intValue().toString(e) + s
                }
                ,
                n.prototype.fromRadix = function (e, t) {
                    this.fromInt(0),
                        null == t && (t = 10);
                    for (var r = this.chunkSize(t), i = Math.pow(t, r), a = !1, o = 0, s = 0, c = 0; c < e.length; ++c) {
                        var u = l(e, c);
                        u < 0 ? "-" == e.charAt(c) && 0 == this.signum() && (a = !0) : (s = t * s + u,
                            ++o >= r && (this.dMultiply(i),
                                this.dAddOffset(s, 0),
                                o = 0,
                                s = 0))
                    }
                    o > 0 && (this.dMultiply(Math.pow(t, o)),
                        this.dAddOffset(s, 0)),
                        a && n.ZERO.subTo(this, this)
                }
                ,
                n.prototype.fromNumber = function (e, t, r) {
                    if ("number" == typeof t)
                        if (e < 2)
                            this.fromInt(1);
                        else
                            for (this.fromNumber(e, r),
                                this.testBit(e - 1) || this.bitwiseTo(n.ONE.shiftLeft(e - 1), g, this),
                                this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);)
                                this.dAddOffset(2, 0),
                                    this.bitLength() > e && this.subTo(n.ONE.shiftLeft(e - 1), this);
                    else {
                        var i = new Array
                            , a = 7 & e;
                        i.length = 1 + (e >> 3),
                            t.nextBytes(i),
                            a > 0 ? i[0] &= (1 << a) - 1 : i[0] = 0,
                            this.fromString(i, 256)
                    }
                }
                ,
                n.prototype.bitwiseTo = function (e, t, n) {
                    var r, i, a = Math.min(e.t, this.t);
                    for (r = 0; r < a; ++r)
                        n[r] = t(this[r], e[r]);
                    if (e.t < this.t) {
                        for (i = e.s & this.DM,
                            r = a; r < this.t; ++r)
                            n[r] = t(this[r], i);
                        n.t = this.t
                    } else {
                        for (i = this.s & this.DM,
                            r = a; r < e.t; ++r)
                            n[r] = t(i, e[r]);
                        n.t = e.t
                    }
                    n.s = t(this.s, e.s),
                        n.clamp()
                }
                ,
                n.prototype.changeBit = function (e, t) {
                    var r = n.ONE.shiftLeft(e);
                    return this.bitwiseTo(r, t, r),
                        r
                }
                ,
                n.prototype.addTo = function (e, t) {
                    for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;)
                        r += this[n] + e[n],
                            t[n++] = r & this.DM,
                            r >>= this.DB;
                    if (e.t < this.t) {
                        for (r += e.s; n < this.t;)
                            r += this[n],
                                t[n++] = r & this.DM,
                                r >>= this.DB;
                        r += this.s
                    } else {
                        for (r += this.s; n < e.t;)
                            r += e[n],
                                t[n++] = r & this.DM,
                                r >>= this.DB;
                        r += e.s
                    }
                    t.s = r < 0 ? -1 : 0,
                        r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r),
                        t.t = n,
                        t.clamp()
                }
                ,
                n.prototype.dMultiply = function (e) {
                    this[this.t] = this.am(0, e - 1, this, 0, 0, this.t),
                        ++this.t,
                        this.clamp()
                }
                ,
                n.prototype.dAddOffset = function (e, t) {
                    if (0 != e) {
                        for (; this.t <= t;)
                            this[this.t++] = 0;
                        for (this[t] += e; this[t] >= this.DV;)
                            this[t] -= this.DV,
                                ++t >= this.t && (this[this.t++] = 0),
                                ++this[t]
                    }
                }
                ,
                n.prototype.multiplyLowerTo = function (e, t, n) {
                    var r, i = Math.min(this.t + e.t, t);
                    for (n.s = 0,
                        n.t = i; i > 0;)
                        n[--i] = 0;
                    for (r = n.t - this.t; i < r; ++i)
                        n[i + this.t] = this.am(0, e[i], n, i, 0, this.t);
                    for (r = Math.min(e.t, t); i < r; ++i)
                        this.am(0, e[i], n, i, 0, t - i);
                    n.clamp()
                }
                ,
                n.prototype.multiplyUpperTo = function (e, t, n) {
                    --t;
                    var r = n.t = this.t + e.t - t;
                    for (n.s = 0; --r >= 0;)
                        n[r] = 0;
                    for (r = Math.max(t - this.t, 0); r < e.t; ++r)
                        n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
                    n.clamp(),
                        n.drShiftTo(1, n)
                }
                ,
                n.prototype.modInt = function (e) {
                    if (e <= 0)
                        return 0;
                    var t = this.DV % e
                        , n = this.s < 0 ? e - 1 : 0;
                    if (this.t > 0)
                        if (0 == t)
                            n = this[0] % e;
                        else
                            for (var r = this.t - 1; r >= 0; --r)
                                n = (t * n + this[r]) % e;
                    return n
                }
                ,
                n.prototype.millerRabin = function (e) {
                    var t = this.subtract(n.ONE)
                        , i = t.getLowestSetBit();
                    if (i <= 0)
                        return !1;
                    var a = t.shiftRight(i);
                    (e = e + 1 >> 1) > k.length && (e = k.length);
                    for (var o = r(), s = 0; s < e; ++s) {
                        o.fromInt(k[Math.floor(Math.random() * k.length)]);
                        var c = o.modPow(a, this);
                        if (0 != c.compareTo(n.ONE) && 0 != c.compareTo(t)) {
                            for (var l = 1; l++ < i && 0 != c.compareTo(t);)
                                if (0 == (c = c.modPowInt(2, this)).compareTo(n.ONE))
                                    return !1;
                            if (0 != c.compareTo(t))
                                return !1
                        }
                    }
                    return !0
                }
                ,
                n.prototype.clone = function () {
                    var e = r();
                    return this.copyTo(e),
                        e
                }
                ,
                n.prototype.intValue = function () {
                    if (this.s < 0) {
                        if (1 == this.t)
                            return this[0] - this.DV;
                        if (0 == this.t)
                            return -1
                    } else {
                        if (1 == this.t)
                            return this[0];
                        if (0 == this.t)
                            return 0
                    }
                    return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]
                }
                ,
                n.prototype.byteValue = function () {
                    return 0 == this.t ? this.s : this[0] << 24 >> 24
                }
                ,
                n.prototype.shortValue = function () {
                    return 0 == this.t ? this.s : this[0] << 16 >> 16
                }
                ,
                n.prototype.signum = function () {
                    return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1
                }
                ,
                n.prototype.toByteArray = function () {
                    var e = this.t
                        , t = new Array;
                    t[0] = this.s;
                    var n, r = this.DB - e * this.DB % 8, i = 0;
                    if (e-- > 0)
                        for (r < this.DB && (n = this[e] >> r) != (this.s & this.DM) >> r && (t[i++] = n | this.s << this.DB - r); e >= 0;)
                            r < 8 ? (n = (this[e] & (1 << r) - 1) << 8 - r,
                                n |= this[--e] >> (r += this.DB - 8)) : (n = this[e] >> (r -= 8) & 255,
                                    r <= 0 && (r += this.DB,
                                        --e)),
                                0 != (128 & n) && (n |= -256),
                                0 == i && (128 & this.s) != (128 & n) && ++i,
                                (i > 0 || n != this.s) && (t[i++] = n);
                    return t
                }
                ,
                n.prototype.equals = function (e) {
                    return 0 == this.compareTo(e)
                }
                ,
                n.prototype.min = function (e) {
                    return this.compareTo(e) < 0 ? this : e
                }
                ,
                n.prototype.max = function (e) {
                    return this.compareTo(e) > 0 ? this : e
                }
                ,
                n.prototype.and = function (e) {
                    var t = r();
                    return this.bitwiseTo(e, p, t),
                        t
                }
                ,
                n.prototype.or = function (e) {
                    var t = r();
                    return this.bitwiseTo(e, g, t),
                        t
                }
                ,
                n.prototype.xor = function (e) {
                    var t = r();
                    return this.bitwiseTo(e, m, t),
                        t
                }
                ,
                n.prototype.andNot = function (e) {
                    var t = r();
                    return this.bitwiseTo(e, y, t),
                        t
                }
                ,
                n.prototype.not = function () {
                    for (var e = r(), t = 0; t < this.t; ++t)
                        e[t] = this.DM & ~this[t];
                    return e.t = this.t,
                        e.s = ~this.s,
                        e
                }
                ,
                n.prototype.shiftLeft = function (e) {
                    var t = r();
                    return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t),
                        t
                }
                ,
                n.prototype.shiftRight = function (e) {
                    var t = r();
                    return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t),
                        t
                }
                ,
                n.prototype.getLowestSetBit = function () {
                    for (var e = 0; e < this.t; ++e)
                        if (0 != this[e])
                            return e * this.DB + _(this[e]);
                    return this.s < 0 ? this.t * this.DB : -1
                }
                ,
                n.prototype.bitCount = function () {
                    for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n)
                        e += v(this[n] ^ t);
                    return e
                }
                ,
                n.prototype.testBit = function (e) {
                    var t = Math.floor(e / this.DB);
                    return t >= this.t ? 0 != this.s : 0 != (this[t] & 1 << e % this.DB)
                }
                ,
                n.prototype.setBit = function (e) {
                    return this.changeBit(e, g)
                }
                ,
                n.prototype.clearBit = function (e) {
                    return this.changeBit(e, y)
                }
                ,
                n.prototype.flipBit = function (e) {
                    return this.changeBit(e, m)
                }
                ,
                n.prototype.add = function (e) {
                    var t = r();
                    return this.addTo(e, t),
                        t
                }
                ,
                n.prototype.subtract = function (e) {
                    var t = r();
                    return this.subTo(e, t),
                        t
                }
                ,
                n.prototype.multiply = function (e) {
                    var t = r();
                    return this.multiplyTo(e, t),
                        t
                }
                ,
                n.prototype.divide = function (e) {
                    var t = r();
                    return this.divRemTo(e, t, null),
                        t
                }
                ,
                n.prototype.remainder = function (e) {
                    var t = r();
                    return this.divRemTo(e, null, t),
                        t
                }
                ,
                n.prototype.divideAndRemainder = function (e) {
                    var t = r()
                        , n = r();
                    return this.divRemTo(e, t, n),
                        new Array(t, n)
                }
                ,
                n.prototype.modPow = function (e, t) {
                    var n, i, a = e.bitLength(), o = u(1);
                    if (a <= 0)
                        return o;
                    n = a < 18 ? 1 : a < 48 ? 3 : a < 144 ? 4 : a < 768 ? 5 : 6,
                        i = a < 8 ? new d(t) : t.isEven() ? new x(t) : new f(t);
                    var s = new Array
                        , c = 3
                        , l = n - 1
                        , p = (1 << n) - 1;
                    if (s[1] = i.convert(this),
                        n > 1) {
                        var g = r();
                        for (i.sqrTo(s[1], g); c <= p;)
                            s[c] = r(),
                                i.mulTo(g, s[c - 2], s[c]),
                                c += 2
                    }
                    var m, y, _ = e.t - 1, v = !0, b = r();
                    for (a = h(e[_]) - 1; _ >= 0;) {
                        for (a >= l ? m = e[_] >> a - l & p : (m = (e[_] & (1 << a + 1) - 1) << l - a,
                            _ > 0 && (m |= e[_ - 1] >> this.DB + a - l)),
                            c = n; 0 == (1 & m);)
                            m >>= 1,
                                --c;
                        if ((a -= c) < 0 && (a += this.DB,
                            --_),
                            v)
                            s[m].copyTo(o),
                                v = !1;
                        else {
                            for (; c > 1;)
                                i.sqrTo(o, b),
                                    i.sqrTo(b, o),
                                    c -= 2;
                            c > 0 ? i.sqrTo(o, b) : (y = o,
                                o = b,
                                b = y),
                                i.mulTo(b, s[m], o)
                        }
                        for (; _ >= 0 && 0 == (e[_] & 1 << a);)
                            i.sqrTo(o, b),
                                y = o,
                                o = b,
                                b = y,
                                --a < 0 && (a = this.DB - 1,
                                    --_)
                    }
                    return i.revert(o)
                }
                ,
                n.prototype.modInverse = function (e) {
                    var t = e.isEven();
                    if (this.isEven() && t || 0 == e.signum())
                        return n.ZERO;
                    for (var r = e.clone(), i = this.clone(), a = u(1), o = u(0), s = u(0), c = u(1); 0 != r.signum();) {
                        for (; r.isEven();)
                            r.rShiftTo(1, r),
                                t ? (a.isEven() && o.isEven() || (a.addTo(this, a),
                                    o.subTo(e, o)),
                                    a.rShiftTo(1, a)) : o.isEven() || o.subTo(e, o),
                                o.rShiftTo(1, o);
                        for (; i.isEven();)
                            i.rShiftTo(1, i),
                                t ? (s.isEven() && c.isEven() || (s.addTo(this, s),
                                    c.subTo(e, c)),
                                    s.rShiftTo(1, s)) : c.isEven() || c.subTo(e, c),
                                c.rShiftTo(1, c);
                        r.compareTo(i) >= 0 ? (r.subTo(i, r),
                            t && a.subTo(s, a),
                            o.subTo(c, o)) : (i.subTo(r, i),
                                t && s.subTo(a, s),
                                c.subTo(o, c))
                    }
                    return 0 != i.compareTo(n.ONE) ? n.ZERO : c.compareTo(e) >= 0 ? c.subtract(e) : c.signum() < 0 ? (c.addTo(e, c),
                        c.signum() < 0 ? c.add(e) : c) : c
                }
                ,
                n.prototype.pow = function (e) {
                    return this.exp(e, new b)
                }
                ,
                n.prototype.gcd = function (e) {
                    var t = this.s < 0 ? this.negate() : this.clone()
                        , n = e.s < 0 ? e.negate() : e.clone();
                    if (t.compareTo(n) < 0) {
                        var r = t;
                        t = n,
                            n = r
                    }
                    var i = t.getLowestSetBit()
                        , a = n.getLowestSetBit();
                    if (a < 0)
                        return t;
                    for (i < a && (a = i),
                        a > 0 && (t.rShiftTo(a, t),
                            n.rShiftTo(a, n)); t.signum() > 0;)
                        (i = t.getLowestSetBit()) > 0 && t.rShiftTo(i, t),
                            (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n),
                            t.compareTo(n) >= 0 ? (t.subTo(n, t),
                                t.rShiftTo(1, t)) : (n.subTo(t, n),
                                    n.rShiftTo(1, n));
                    return a > 0 && n.lShiftTo(a, n),
                        n
                }
                ,
                n.prototype.isProbablePrime = function (e) {
                    var t, n = this.abs();
                    if (1 == n.t && n[0] <= k[k.length - 1]) {
                        for (t = 0; t < k.length; ++t)
                            if (n[0] == k[t])
                                return !0;
                        return !1
                    }
                    if (n.isEven())
                        return !1;
                    for (t = 1; t < k.length;) {
                        for (var r = k[t], i = t + 1; i < k.length && r < C;)
                            r *= k[i++];
                        for (r = n.modInt(r); t < i;)
                            if (r % k[t++] == 0)
                                return !1
                    }
                    return n.millerRabin(e)
                }
                ,
                n.prototype.square = function () {
                    var e = r();
                    return this.squareTo(e),
                        e
                }
                ,
                n.prototype.Barrett = x,
                null == w) {
                var O;
                if (w = new Array,
                    S = 0,
                    "undefined" !== typeof window && window.crypto)
                    if (window.crypto.getRandomValues) {
                        var T = new Uint8Array(32);
                        for (window.crypto.getRandomValues(T),
                            O = 0; O < 32; ++O)
                            w[S++] = T[O]
                    } else if ("Netscape" == navigator.appName && navigator.appVersion < "5") {
                        var D = window.crypto.random(32);
                        for (O = 0; O < D.length; ++O)
                            w[S++] = 255 & D.charCodeAt(O)
                    }
                for (; S < z;)
                    O = Math.floor(65536 * Math.random()),
                        w[S++] = O >>> 8,
                        w[S++] = 255 & O;
                S = 0,
                    P()
            }
            function I() {
                if (null == A) {
                    for (P(),
                        (A = new R).init(w),
                        S = 0; S < w.length; ++S)
                        w[S] = 0;
                    S = 0
                }
                return A.next()
            }
            function j() { }
            function R() {
                this.i = 0,
                    this.j = 0,
                    this.S = new Array
            }
            j.prototype.nextBytes = function (e) {
                var t;
                for (t = 0; t < e.length; ++t)
                    e[t] = I()
            }
                ,
                R.prototype.init = function (e) {
                    var t, n, r;
                    for (t = 0; t < 256; ++t)
                        this.S[t] = t;
                    for (n = 0,
                        t = 0; t < 256; ++t)
                        n = n + this.S[t] + e[t % e.length] & 255,
                            r = this.S[t],
                            this.S[t] = this.S[n],
                            this.S[n] = r;
                    this.i = 0,
                        this.j = 0
                }
                ,
                R.prototype.next = function () {
                    var e;
                    return this.i = this.i + 1 & 255,
                        this.j = this.j + this.S[this.i] & 255,
                        e = this.S[this.i],
                        this.S[this.i] = this.S[this.j],
                        this.S[this.j] = e,
                        this.S[e + this.S[this.i] & 255]
                }
                ;
            var z = 256;
            e.exports = {
                default: n,
                BigInteger: n,
                SecureRandom: j
            }
        }
        ).call(this)
    },
    70686: function (e, t, n) {
        e.exports = function (e) {
            var t = {};
            function n(r) {
                if (t[r])
                    return t[r].exports;
                var i = t[r] = {
                    i: r,
                    l: !1,
                    exports: {}
                };
                return e[r].call(i.exports, i, i.exports, n),
                    i.l = !0,
                    i.exports
            }
            return n.m = e,
                n.c = t,
                n.d = function (e, t, r) {
                    n.o(e, t) || Object.defineProperty(e, t, {
                        enumerable: !0,
                        get: r
                    })
                }
                ,
                n.r = function (e) {
                    "undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
                        value: "Module"
                    }),
                        Object.defineProperty(e, "__esModule", {
                            value: !0
                        })
                }
                ,
                n.t = function (e, t) {
                    if (1 & t && (e = n(e)),
                        8 & t)
                        return e;
                    if (4 & t && "object" === typeof e && e && e.__esModule)
                        return e;
                    var r = Object.create(null);
                    if (n.r(r),
                        Object.defineProperty(r, "default", {
                            enumerable: !0,
                            value: e
                        }),
                        2 & t && "string" != typeof e)
                        for (var i in e)
                            n.d(r, i, function (t) {
                                return e[t]
                            }
                                .bind(null, i));
                    return r
                }
                ,
                n.n = function (e) {
                    var t = e && e.__esModule ? function () {
                        return e.default
                    }
                        : function () {
                            return e
                        }
                        ;
                    return n.d(t, "a", t),
                        t
                }
                ,
                n.o = function (e, t) {
                    return Object.prototype.hasOwnProperty.call(e, t)
                }
                ,
                n.p = "",
                n(n.s = 2)
        }([function (e, t) {
            e.exports = n(36077)
        }
            , function (e, t, n) {
                "use strict";
                var r = new Uint32Array(68)
                    , i = new Uint32Array(64);
                function a(e, t) {
                    var n = 31 & t;
                    return e << n | e >>> 32 - n
                }
                function o(e, t) {
                    for (var n = [], r = e.length - 1; r >= 0; r--)
                        n[r] = 255 & (e[r] ^ t[r]);
                    return n
                }
                function s(e) {
                    return e ^ a(e, 9) ^ a(e, 17)
                }
                function c(e) {
                    var t = 8 * e.length
                        , n = t % 512;
                    n = n >= 448 ? 512 - n % 448 - 1 : 448 - n - 1;
                    for (var o = new Array((n - 7) / 8), c = new Array(8), l = 0, u = o.length; l < u; l++)
                        o[l] = 0;
                    for (var h = 0, d = c.length; h < d; h++)
                        c[h] = 0;
                    t = t.toString(2);
                    for (var f = 7; f >= 0; f--)
                        if (t.length > 8) {
                            var p = t.length - 8;
                            c[f] = parseInt(t.substr(p), 2),
                                t = t.substr(0, p)
                        } else
                            t.length > 0 && (c[f] = parseInt(t, 2),
                                t = "");
                    for (var g, m = new Uint8Array([].concat(e, [128], o, c)), y = new DataView(m.buffer, 0), _ = m.length / 64, v = new Uint32Array([1937774191, 1226093241, 388252375, 3666478592, 2842636476, 372324522, 3817729613, 2969243214]), b = 0; b < _; b++) {
                        r.fill(0),
                            i.fill(0);
                        for (var E = 16 * b, x = 0; x < 16; x++)
                            r[x] = y.getUint32(4 * (E + x), !1);
                        for (var A = 16; A < 68; A++)
                            r[A] = (g = r[A - 16] ^ r[A - 9] ^ a(r[A - 3], 15)) ^ a(g, 15) ^ a(g, 23) ^ a(r[A - 13], 7) ^ r[A - 6];
                        for (var w = 0; w < 64; w++)
                            i[w] = r[w] ^ r[w + 4];
                        for (var S = v[0], k = v[1], C = v[2], P = v[3], O = v[4], T = v[5], D = v[6], I = v[7], j = void 0, R = void 0, z = void 0, M = void 0, N = 0; N < 64; N++)
                            M = N >= 0 && N <= 15 ? 2043430169 : 2055708042,
                                R = (N >= 0 && N <= 15 ? S ^ k ^ C : S & k | S & C | k & C) + P + ((j = a(a(S, 12) + O + a(M, N), 7)) ^ a(S, 12)) + i[N],
                                z = (N >= 0 && N <= 15 ? O ^ T ^ D : O & T | ~O & D) + I + j + r[N],
                                P = C,
                                C = a(k, 9),
                                k = S,
                                S = R,
                                I = D,
                                D = a(T, 19),
                                T = O,
                                O = s(z);
                        v[0] ^= S,
                            v[1] ^= k,
                            v[2] ^= C,
                            v[3] ^= P,
                            v[4] ^= O,
                            v[5] ^= T,
                            v[6] ^= D,
                            v[7] ^= I
                    }
                    for (var F = [], L = 0, B = v.length; L < B; L++) {
                        var G = v[L];
                        F.push((4278190080 & G) >>> 24, (16711680 & G) >>> 16, (65280 & G) >>> 8, 255 & G)
                    }
                    return F
                }
                for (var l = new Uint8Array(64), u = new Uint8Array(64), h = 0; h < 64; h++)
                    l[h] = 54,
                        u[h] = 92;
                e.exports = {
                    sm3: c,
                    hmac: function (e, t) {
                        for (t.length > 64 && (t = c(t)); t.length < 64;)
                            t.push(0);
                        var n = o(t, l)
                            , r = o(t, u)
                            , i = c([].concat(n, e));
                        return c([].concat(r, i))
                    }
                }
            }
            , function (e, t, n) {
                "use strict";
                e.exports = {
                    sm2: n(3),
                    sm3: n(7),
                    sm4: n(8)
                }
            }
            , function (e, t, n) {
                "use strict";
                var r = n(0).BigInteger
                    , i = n(4)
                    , a = i.encodeDer
                    , o = i.decodeDer
                    , s = n(5)
                    , c = n(1).sm3
                    , l = s.generateEcparam()
                    , u = l.G
                    , h = l.curve
                    , d = l.n;
                function f(e, t) {
                    var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "1234567812345678";
                    n = s.utf8ToHex(n);
                    var r = s.leftPad(u.curve.a.toBigInteger().toRadix(16), 64)
                        , i = s.leftPad(u.curve.b.toBigInteger().toRadix(16), 64)
                        , a = s.leftPad(u.getX().toBigInteger().toRadix(16), 64)
                        , o = s.leftPad(u.getY().toBigInteger().toRadix(16), 64)
                        , l = void 0
                        , h = void 0;
                    if (128 === t.length)
                        l = t.substr(0, 64),
                            h = t.substr(64, 64);
                    else {
                        var d = u.curve.decodePointHex(t);
                        l = s.leftPad(d.getX().toBigInteger().toRadix(16), 64),
                            h = s.leftPad(d.getY().toBigInteger().toRadix(16), 64)
                    }
                    var f = s.hexToArray(n + r + i + a + o + l + h)
                        , p = 4 * n.length;
                    f.unshift(255 & p),
                        f.unshift(p >> 8 & 255);
                    var g = c(f);
                    return s.arrayToHex(c(g.concat(s.hexToArray(e))))
                }
                function p(e) {
                    var t = u.multiply(new r(e, 16));
                    return "04" + s.leftPad(t.getX().toBigInteger().toString(16), 64) + s.leftPad(t.getY().toBigInteger().toString(16), 64)
                }
                function g() {
                    var e = s.generateKeyPairHex()
                        , t = h.decodePointHex(e.publicKey);
                    return e.k = new r(e.privateKey, 16),
                        e.x1 = t.getX().toBigInteger(),
                        e
                }
                e.exports = {
                    generateKeyPairHex: s.generateKeyPairHex,
                    compressPublicKeyHex: s.compressPublicKeyHex,
                    comparePublicKeyHex: s.comparePublicKeyHex,
                    doEncrypt: function (e, t) {
                        var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
                        e = "string" === typeof e ? s.hexToArray(s.utf8ToHex(e)) : Array.prototype.slice.call(e),
                            t = s.getGlobalCurve().decodePointHex(t);
                        var i = s.generateKeyPairHex()
                            , a = new r(i.privateKey, 16)
                            , o = i.publicKey;
                        o.length > 128 && (o = o.substr(o.length - 128));
                        var l = t.multiply(a)
                            , u = s.hexToArray(s.leftPad(l.getX().toBigInteger().toRadix(16), 64))
                            , h = s.hexToArray(s.leftPad(l.getY().toBigInteger().toRadix(16), 64))
                            , d = s.arrayToHex(c([].concat(u, e, h)))
                            , f = 1
                            , p = 0
                            , g = []
                            , m = [].concat(u, h)
                            , y = function () {
                                g = c([].concat(m, [f >> 24 & 255, f >> 16 & 255, f >> 8 & 255, 255 & f])),
                                    f++,
                                    p = 0
                            };
                        y();
                        for (var _ = 0, v = e.length; _ < v; _++)
                            p === g.length && y(),
                                e[_] ^= 255 & g[p++];
                        var b = s.arrayToHex(e);
                        return 0 === n ? o + b + d : o + d + b
                    },
                    doDecrypt: function (e, t) {
                        var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1
                            , i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}
                            , a = i.output
                            , o = void 0 === a ? "string" : a;
                        t = new r(t, 16);
                        var l = e.substr(128, 64)
                            , u = e.substr(192);
                        0 === n && (l = e.substr(e.length - 64),
                            u = e.substr(128, e.length - 128 - 64));
                        var h = s.hexToArray(u)
                            , d = s.getGlobalCurve().decodePointHex("04" + e.substr(0, 128))
                            , f = d.multiply(t)
                            , p = s.hexToArray(s.leftPad(f.getX().toBigInteger().toRadix(16), 64))
                            , g = s.hexToArray(s.leftPad(f.getY().toBigInteger().toRadix(16), 64))
                            , m = 1
                            , y = 0
                            , _ = []
                            , v = [].concat(p, g)
                            , b = function () {
                                _ = c([].concat(v, [m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, 255 & m])),
                                    m++,
                                    y = 0
                            };
                        b();
                        for (var E = 0, x = h.length; E < x; E++)
                            y === _.length && b(),
                                h[E] ^= 255 & _[y++];
                        var A = s.arrayToHex(c([].concat(p, h, g)));
                        return A === l.toLowerCase() ? "array" === o ? h : s.arrayToUtf8(h) : "array" === o ? [] : ""
                    },
                    doSignature: function (e, t) {
                        var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}
                            , i = n.pointPool
                            , o = n.der
                            , c = n.hash
                            , l = n.publicKey
                            , u = n.userId
                            , h = "string" === typeof e ? s.utf8ToHex(e) : s.arrayToHex(e);
                        c && (h = f(h, l = l || p(t), u));
                        var m = new r(t, 16)
                            , y = new r(h, 16)
                            , _ = null
                            , v = null
                            , b = null;
                        do {
                            do {
                                var E = void 0;
                                _ = (E = i && i.length ? i.pop() : g()).k,
                                    v = y.add(E.x1).mod(d)
                            } while (v.equals(r.ZERO) || v.add(_).equals(d));
                            b = m.add(r.ONE).modInverse(d).multiply(_.subtract(v.multiply(m))).mod(d)
                        } while (b.equals(r.ZERO));
                        return o ? a(v, b) : s.leftPad(v.toString(16), 64) + s.leftPad(b.toString(16), 64)
                    },
                    doVerifySignature: function (e, t, n) {
                        var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}
                            , a = i.der
                            , c = i.hash
                            , l = i.userId
                            , p = "string" === typeof e ? s.utf8ToHex(e) : s.arrayToHex(e);
                        c && (p = f(p, n, l));
                        var g = void 0
                            , m = void 0;
                        if (a) {
                            var y = o(t);
                            g = y.r,
                                m = y.s
                        } else
                            g = new r(t.substring(0, 64), 16),
                                m = new r(t.substring(64), 16);
                        var _ = h.decodePointHex(n)
                            , v = new r(p, 16)
                            , b = g.add(m).mod(d);
                        if (b.equals(r.ZERO))
                            return !1;
                        var E = u.multiply(m).add(_.multiply(b))
                            , x = v.add(E.getX().toBigInteger()).mod(d);
                        return g.equals(x)
                    },
                    getPublicKeyFromPrivateKey: p,
                    getPoint: g,
                    verifyPublicKey: s.verifyPublicKey
                }
            }
            , function (e, t, n) {
                "use strict";
                function r(e, t) {
                    if (!e)
                        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
                    return !t || "object" !== typeof t && "function" !== typeof t ? e : t
                }
                function i(e, t) {
                    if ("function" !== typeof t && null !== t)
                        throw new TypeError("Super expression must either be null or a function, not " + typeof t);
                    e.prototype = Object.create(t && t.prototype, {
                        constructor: {
                            value: e,
                            enumerable: !1,
                            writable: !0,
                            configurable: !0
                        }
                    }),
                        t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
                }
                function a(e, t) {
                    if (!(e instanceof t))
                        throw new TypeError("Cannot call a class as a function")
                }
                var o = n(0).BigInteger;
                var s = function () {
                    function e() {
                        a(this, e),
                            this.tlv = null,
                            this.t = "00",
                            this.l = "00",
                            this.v = ""
                    }
                    return e.prototype.getEncodedHex = function () {
                        return this.tlv || (this.v = this.getValue(),
                            this.l = this.getLength(),
                            this.tlv = this.t + this.l + this.v),
                            this.tlv
                    }
                        ,
                        e.prototype.getLength = function () {
                            var e = this.v.length / 2
                                , t = e.toString(16);
                            return t.length % 2 === 1 && (t = "0" + t),
                                e < 128 ? t : (128 + t.length / 2).toString(16) + t
                        }
                        ,
                        e.prototype.getValue = function () {
                            return ""
                        }
                        ,
                        e
                }()
                    , c = function (e) {
                        function t(n) {
                            a(this, t);
                            var i = r(this, e.call(this));
                            return i.t = "02",
                                n && (i.v = function (e) {
                                    var t = e.toString(16);
                                    if ("-" !== t[0])
                                        t.length % 2 === 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
                                    else {
                                        var n = (t = t.substr(1)).length;
                                        n % 2 === 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
                                        for (var r = "", i = 0; i < n; i++)
                                            r += "f";
                                        t = (t = (r = new o(r, 16)).xor(e).add(o.ONE)).toString(16).replace(/^-/, "")
                                    }
                                    return t
                                }(n)),
                                i
                        }
                        return i(t, e),
                            t.prototype.getValue = function () {
                                return this.v
                            }
                            ,
                            t
                    }(s)
                    , l = function (e) {
                        function t(n) {
                            a(this, t);
                            var i = r(this, e.call(this));
                            return i.t = "30",
                                i.asn1Array = n,
                                i
                        }
                        return i(t, e),
                            t.prototype.getValue = function () {
                                return this.v = this.asn1Array.map((function (e) {
                                    return e.getEncodedHex()
                                }
                                )).join(""),
                                    this.v
                            }
                            ,
                            t
                    }(s);
                function u(e, t) {
                    return +e[t + 2] < 8 ? 1 : 128 & +e.substr(t + 2, 2)
                }
                function h(e, t) {
                    var n = u(e, t)
                        , r = e.substr(t + 2, 2 * n);
                    return r ? (+r[0] < 8 ? new o(r, 16) : new o(r.substr(2), 16)).intValue() : -1
                }
                function d(e, t) {
                    return t + 2 * (u(e, t) + 1)
                }
                e.exports = {
                    encodeDer: function (e, t) {
                        var n = new c(e)
                            , r = new c(t);
                        return new l([n, r]).getEncodedHex()
                    },
                    decodeDer: function (e) {
                        var t = d(e, 0)
                            , n = d(e, t)
                            , r = h(e, t)
                            , i = e.substr(n, 2 * r)
                            , a = n + i.length
                            , s = d(e, a)
                            , c = h(e, a)
                            , l = e.substr(s, 2 * c);
                        return {
                            r: new o(i, 16),
                            s: new o(l, 16)
                        }
                    }
                }
            }
            , function (e, t, n) {
                "use strict";
                var r = n(0)
                    , i = r.BigInteger
                    , a = r.SecureRandom
                    , o = n(6).ECCurveFp
                    , s = new a
                    , c = d()
                    , l = c.curve
                    , u = c.G
                    , h = c.n;
                function d() {
                    var e = new i("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF", 16)
                        , t = new i("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC", 16)
                        , n = new i("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93", 16)
                        , r = new o(e, t, n)
                        , a = r.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");
                    return {
                        curve: r,
                        G: a,
                        n: new i("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123", 16)
                    }
                }
                function f(e, t) {
                    return e.length >= t ? e : new Array(t - e.length + 1).join("0") + e
                }
                e.exports = {
                    getGlobalCurve: function () {
                        return l
                    },
                    generateEcparam: d,
                    generateKeyPairHex: function (e, t, n) {
                        var r = (e ? new i(e, t, n) : new i(h.bitLength(), s)).mod(h.subtract(i.ONE)).add(i.ONE)
                            , a = f(r.toString(16), 64)
                            , o = u.multiply(r);
                        return {
                            privateKey: a,
                            publicKey: "04" + f(o.getX().toBigInteger().toString(16), 64) + f(o.getY().toBigInteger().toString(16), 64)
                        }
                    },
                    compressPublicKeyHex: function (e) {
                        if (130 !== e.length)
                            throw new Error("Invalid public key to compress");
                        var t = (e.length - 2) / 2
                            , n = e.substr(2, t)
                            , r = "03";
                        return new i(e.substr(t + 2, t), 16).mod(new i("2")).equals(i.ZERO) && (r = "02"),
                            r + n
                    },
                    utf8ToHex: function (e) {
                        for (var t = (e = unescape(encodeURIComponent(e))).length, n = [], r = 0; r < t; r++)
                            n[r >>> 2] |= (255 & e.charCodeAt(r)) << 24 - r % 4 * 8;
                        for (var i = [], a = 0; a < t; a++) {
                            var o = n[a >>> 2] >>> 24 - a % 4 * 8 & 255;
                            i.push((o >>> 4).toString(16)),
                                i.push((15 & o).toString(16))
                        }
                        return i.join("")
                    },
                    leftPad: f,
                    arrayToHex: function (e) {
                        return e.map((function (e) {
                            return 1 === (e = e.toString(16)).length ? "0" + e : e
                        }
                        )).join("")
                    },
                    arrayToUtf8: function (e) {
                        for (var t = [], n = 0, r = 0; r < 2 * e.length; r += 2)
                            t[r >>> 3] |= parseInt(e[n], 10) << 24 - r % 8 * 4,
                                n++;
                        try {
                            for (var i = [], a = 0; a < e.length; a++) {
                                var o = t[a >>> 2] >>> 24 - a % 4 * 8 & 255;
                                i.push(String.fromCharCode(o))
                            }
                            return decodeURIComponent(escape(i.join("")))
                        } catch (s) {
                            throw new Error("Malformed UTF-8 data")
                        }
                    },
                    hexToArray: function (e) {
                        var t = []
                            , n = e.length;
                        n % 2 !== 0 && (e = f(e, n + 1)),
                            n = e.length;
                        for (var r = 0; r < n; r += 2)
                            t.push(parseInt(e.substr(r, 2), 16));
                        return t
                    },
                    verifyPublicKey: function (e) {
                        var t = l.decodePointHex(e);
                        if (!t)
                            return !1;
                        var n = t.getX();
                        return t.getY().square().equals(n.multiply(n.square()).add(n.multiply(l.a)).add(l.b))
                    },
                    comparePublicKeyHex: function (e, t) {
                        var n = l.decodePointHex(e);
                        if (!n)
                            return !1;
                        var r = l.decodePointHex(t);
                        return !!r && n.equals(r)
                    }
                }
            }
            , function (e, t, n) {
                "use strict";
                function r(e, t) {
                    if (!(e instanceof t))
                        throw new TypeError("Cannot call a class as a function")
                }
                var i = n(0).BigInteger
                    , a = new i("2")
                    , o = new i("3")
                    , s = function () {
                        function e(t, n) {
                            r(this, e),
                                this.x = n,
                                this.q = t
                        }
                        return e.prototype.equals = function (e) {
                            return e === this || this.q.equals(e.q) && this.x.equals(e.x)
                        }
                            ,
                            e.prototype.toBigInteger = function () {
                                return this.x
                            }
                            ,
                            e.prototype.negate = function () {
                                return new e(this.q, this.x.negate().mod(this.q))
                            }
                            ,
                            e.prototype.add = function (t) {
                                return new e(this.q, this.x.add(t.toBigInteger()).mod(this.q))
                            }
                            ,
                            e.prototype.subtract = function (t) {
                                return new e(this.q, this.x.subtract(t.toBigInteger()).mod(this.q))
                            }
                            ,
                            e.prototype.multiply = function (t) {
                                return new e(this.q, this.x.multiply(t.toBigInteger()).mod(this.q))
                            }
                            ,
                            e.prototype.divide = function (t) {
                                return new e(this.q, this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))
                            }
                            ,
                            e.prototype.square = function () {
                                return new e(this.q, this.x.square().mod(this.q))
                            }
                            ,
                            e
                    }()
                    , c = function () {
                        function e(t, n, a, o) {
                            r(this, e),
                                this.curve = t,
                                this.x = n,
                                this.y = a,
                                this.z = null == o ? i.ONE : o,
                                this.zinv = null
                        }
                        return e.prototype.getX = function () {
                            return null === this.zinv && (this.zinv = this.z.modInverse(this.curve.q)),
                                this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))
                        }
                            ,
                            e.prototype.getY = function () {
                                return null === this.zinv && (this.zinv = this.z.modInverse(this.curve.q)),
                                    this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))
                            }
                            ,
                            e.prototype.equals = function (e) {
                                return e === this || (this.isInfinity() ? e.isInfinity() : e.isInfinity() ? this.isInfinity() : !!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(i.ZERO) && e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(i.ZERO))
                            }
                            ,
                            e.prototype.isInfinity = function () {
                                return null === this.x && null === this.y || this.z.equals(i.ZERO) && !this.y.toBigInteger().equals(i.ZERO)
                            }
                            ,
                            e.prototype.negate = function () {
                                return new e(this.curve, this.x, this.y.negate(), this.z)
                            }
                            ,
                            e.prototype.add = function (t) {
                                if (this.isInfinity())
                                    return t;
                                if (t.isInfinity())
                                    return this;
                                var n = this.x.toBigInteger()
                                    , r = this.y.toBigInteger()
                                    , a = this.z
                                    , o = t.x.toBigInteger()
                                    , s = t.y.toBigInteger()
                                    , c = t.z
                                    , l = this.curve.q
                                    , u = n.multiply(c).mod(l)
                                    , h = o.multiply(a).mod(l)
                                    , d = u.subtract(h)
                                    , f = r.multiply(c).mod(l)
                                    , p = s.multiply(a).mod(l)
                                    , g = f.subtract(p);
                                if (i.ZERO.equals(d))
                                    return i.ZERO.equals(g) ? this.twice() : this.curve.infinity;
                                var m = u.add(h)
                                    , y = a.multiply(c).mod(l)
                                    , _ = d.square().mod(l)
                                    , v = d.multiply(_).mod(l)
                                    , b = y.multiply(g.square()).subtract(m.multiply(_)).mod(l)
                                    , E = d.multiply(b).mod(l)
                                    , x = g.multiply(_.multiply(u).subtract(b)).subtract(f.multiply(v)).mod(l)
                                    , A = v.multiply(y).mod(l);
                                return new e(this.curve, this.curve.fromBigInteger(E), this.curve.fromBigInteger(x), A)
                            }
                            ,
                            e.prototype.twice = function () {
                                if (this.isInfinity())
                                    return this;
                                if (!this.y.toBigInteger().signum())
                                    return this.curve.infinity;
                                var t = this.x.toBigInteger()
                                    , n = this.y.toBigInteger()
                                    , r = this.z
                                    , i = this.curve.q
                                    , a = this.curve.a.toBigInteger()
                                    , s = t.square().multiply(o).add(a.multiply(r.square())).mod(i)
                                    , c = n.shiftLeft(1).multiply(r).mod(i)
                                    , l = n.square().mod(i)
                                    , u = l.multiply(t).multiply(r).mod(i)
                                    , h = c.square().mod(i)
                                    , d = s.square().subtract(u.shiftLeft(3)).mod(i)
                                    , f = c.multiply(d).mod(i)
                                    , p = s.multiply(u.shiftLeft(2).subtract(d)).subtract(h.shiftLeft(1).multiply(l)).mod(i)
                                    , g = c.multiply(h).mod(i);
                                return new e(this.curve, this.curve.fromBigInteger(f), this.curve.fromBigInteger(p), g)
                            }
                            ,
                            e.prototype.multiply = function (e) {
                                if (this.isInfinity())
                                    return this;
                                if (!e.signum())
                                    return this.curve.infinity;
                                for (var t = e.multiply(o), n = this.negate(), r = this, i = t.bitLength() - 2; i > 0; i--) {
                                    r = r.twice();
                                    var a = t.testBit(i);
                                    a !== e.testBit(i) && (r = r.add(a ? this : n))
                                }
                                return r
                            }
                            ,
                            e
                    }()
                    , l = function () {
                        function e(t, n, i) {
                            r(this, e),
                                this.q = t,
                                this.a = this.fromBigInteger(n),
                                this.b = this.fromBigInteger(i),
                                this.infinity = new c(this, null, null)
                        }
                        return e.prototype.equals = function (e) {
                            return e === this || this.q.equals(e.q) && this.a.equals(e.a) && this.b.equals(e.b)
                        }
                            ,
                            e.prototype.fromBigInteger = function (e) {
                                return new s(this.q, e)
                            }
                            ,
                            e.prototype.decodePointHex = function (e) {
                                switch (parseInt(e.substr(0, 2), 16)) {
                                    case 0:
                                        return this.infinity;
                                    case 2:
                                    case 3:
                                        var t = this.fromBigInteger(new i(e.substr(2), 16))
                                            , n = this.fromBigInteger(t.multiply(t.square()).add(t.multiply(this.a)).add(this.b).toBigInteger().modPow(this.q.divide(new i("4")).add(i.ONE), this.q));
                                        return n.toBigInteger().mod(a).equals(new i(e.substr(0, 2), 16).subtract(a)) || (n = n.negate()),
                                            new c(this, t, n);
                                    case 4:
                                    case 6:
                                    case 7:
                                        var r = (e.length - 2) / 2
                                            , o = e.substr(2, r)
                                            , s = e.substr(r + 2, r);
                                        return new c(this, this.fromBigInteger(new i(o, 16)), this.fromBigInteger(new i(s, 16)));
                                    default:
                                        return null
                                }
                            }
                            ,
                            e
                    }();
                e.exports = {
                    ECPointFp: c,
                    ECCurveFp: l
                }
            }
            , function (e, t, n) {
                "use strict";
                var r = n(1)
                    , i = r.sm3
                    , a = r.hmac;
                function o(e) {
                    return e.map((function (e) {
                        return 1 === (e = e.toString(16)).length ? "0" + e : e
                    }
                    )).join("")
                }
                function s(e) {
                    var t, n, r = [], i = e.length;
                    i % 2 !== 0 && (n = i + 1,
                        e = (t = e).length >= n ? t : new Array(n - t.length + 1).join("0") + t),
                        i = e.length;
                    for (var a = 0; a < i; a += 2)
                        r.push(parseInt(e.substr(a, 2), 16));
                    return r
                }
                e.exports = function (e, t) {
                    if (e = "string" === typeof e ? function (e) {
                        for (var t = [], n = 0, r = e.length; n < r; n++) {
                            var i = e.codePointAt(n);
                            if (i <= 127)
                                t.push(i);
                            else if (i <= 2047)
                                t.push(192 | i >>> 6),
                                    t.push(128 | 63 & i);
                            else if (i <= 55295 || i >= 57344 && i <= 65535)
                                t.push(224 | i >>> 12),
                                    t.push(128 | i >>> 6 & 63),
                                    t.push(128 | 63 & i);
                            else {
                                if (!(i >= 65536 && i <= 1114111))
                                    throw t.push(i),
                                    new Error("input is not supported");
                                n++,
                                    t.push(240 | i >>> 18 & 28),
                                    t.push(128 | i >>> 12 & 63),
                                    t.push(128 | i >>> 6 & 63),
                                    t.push(128 | 63 & i)
                            }
                        }
                        return t
                    }(e) : Array.prototype.slice.call(e),
                        t) {
                        if ("hmac" !== (t.mode || "hmac"))
                            throw new Error("invalid mode");
                        var n = t.key;
                        if (!n)
                            throw new Error("invalid key");
                        return n = "string" === typeof n ? s(n) : Array.prototype.slice.call(n),
                            o(a(e, n))
                    }
                    return o(i(e))
                }
            }
            , function (e, t, n) {
                "use strict";
                var r = 16
                    , i = [214, 144, 233, 254, 204, 225, 61, 183, 22, 182, 20, 194, 40, 251, 44, 5, 43, 103, 154, 118, 42, 190, 4, 195, 170, 68, 19, 38, 73, 134, 6, 153, 156, 66, 80, 244, 145, 239, 152, 122, 51, 84, 11, 67, 237, 207, 172, 98, 228, 179, 28, 169, 201, 8, 232, 149, 128, 223, 148, 250, 117, 143, 63, 166, 71, 7, 167, 252, 243, 115, 23, 186, 131, 89, 60, 25, 230, 133, 79, 168, 104, 107, 129, 178, 113, 100, 218, 139, 248, 235, 15, 75, 112, 86, 157, 53, 30, 36, 14, 94, 99, 88, 209, 162, 37, 34, 124, 59, 1, 33, 120, 135, 212, 0, 70, 87, 159, 211, 39, 82, 76, 54, 2, 231, 160, 196, 200, 158, 234, 191, 138, 210, 64, 199, 56, 181, 163, 247, 242, 206, 249, 97, 21, 161, 224, 174, 93, 164, 155, 52, 26, 85, 173, 147, 50, 48, 245, 140, 177, 227, 29, 246, 226, 46, 130, 102, 202, 96, 192, 41, 35, 171, 13, 83, 78, 111, 213, 219, 55, 69, 222, 253, 142, 47, 3, 255, 106, 114, 109, 108, 91, 81, 141, 27, 175, 146, 187, 221, 188, 127, 17, 217, 92, 65, 31, 16, 90, 216, 10, 193, 49, 136, 165, 205, 123, 189, 45, 116, 208, 18, 184, 229, 180, 176, 137, 105, 151, 74, 12, 150, 119, 126, 101, 185, 241, 9, 197, 110, 198, 132, 24, 240, 125, 236, 58, 220, 77, 32, 121, 238, 95, 62, 215, 203, 57, 72]
                    , a = [462357, 472066609, 943670861, 1415275113, 1886879365, 2358483617, 2830087869, 3301692121, 3773296373, 4228057617, 404694573, 876298825, 1347903077, 1819507329, 2291111581, 2762715833, 3234320085, 3705924337, 4177462797, 337322537, 808926789, 1280531041, 1752135293, 2223739545, 2695343797, 3166948049, 3638552301, 4110090761, 269950501, 741554753, 1213159005, 1684763257];
                function o(e) {
                    for (var t = [], n = 0, r = e.length; n < r; n += 2)
                        t.push(parseInt(e.substr(n, 2), 16));
                    return t
                }
                function s(e) {
                    return e.map((function (e) {
                        return 1 === (e = e.toString(16)).length ? "0" + e : e
                    }
                    )).join("")
                }
                function c(e) {
                    for (var t = [], n = 0, r = e.length; n < r; n++) {
                        var i = e.codePointAt(n);
                        if (i <= 127)
                            t.push(i);
                        else if (i <= 2047)
                            t.push(192 | i >>> 6),
                                t.push(128 | 63 & i);
                        else if (i <= 55295 || i >= 57344 && i <= 65535)
                            t.push(224 | i >>> 12),
                                t.push(128 | i >>> 6 & 63),
                                t.push(128 | 63 & i);
                        else {
                            if (!(i >= 65536 && i <= 1114111))
                                throw t.push(i),
                                new Error("input is not supported");
                            n++,
                                t.push(240 | i >>> 18 & 28),
                                t.push(128 | i >>> 12 & 63),
                                t.push(128 | i >>> 6 & 63),
                                t.push(128 | 63 & i)
                        }
                    }
                    return t
                }
                function l(e) {
                    for (var t = [], n = 0, r = e.length; n < r; n++)
                        e[n] >= 240 && e[n] <= 247 ? (t.push(String.fromCodePoint(((7 & e[n]) << 18) + ((63 & e[n + 1]) << 12) + ((63 & e[n + 2]) << 6) + (63 & e[n + 3]))),
                            n += 3) : e[n] >= 224 && e[n] <= 239 ? (t.push(String.fromCodePoint(((15 & e[n]) << 12) + ((63 & e[n + 1]) << 6) + (63 & e[n + 2]))),
                                n += 2) : e[n] >= 192 && e[n] <= 223 ? (t.push(String.fromCodePoint(((31 & e[n]) << 6) + (63 & e[n + 1]))),
                                    n++) : t.push(String.fromCodePoint(e[n]));
                    return t.join("")
                }
                function u(e, t) {
                    var n = 31 & t;
                    return e << n | e >>> 32 - n
                }
                function h(e) {
                    return (255 & i[e >>> 24 & 255]) << 24 | (255 & i[e >>> 16 & 255]) << 16 | (255 & i[e >>> 8 & 255]) << 8 | 255 & i[255 & e]
                }
                function d(e) {
                    return e ^ u(e, 2) ^ u(e, 10) ^ u(e, 18) ^ u(e, 24)
                }
                function f(e) {
                    return e ^ u(e, 13) ^ u(e, 23)
                }
                function p(e, t, n) {
                    for (var r = new Array(4), i = new Array(4), a = 0; a < 4; a++)
                        i[0] = 255 & e[4 * a],
                            i[1] = 255 & e[4 * a + 1],
                            i[2] = 255 & e[4 * a + 2],
                            i[3] = 255 & e[4 * a + 3],
                            r[a] = i[0] << 24 | i[1] << 16 | i[2] << 8 | i[3];
                    for (var o, s = 0; s < 32; s += 4)
                        o = r[1] ^ r[2] ^ r[3] ^ n[s + 0],
                            r[0] ^= d(h(o)),
                            o = r[2] ^ r[3] ^ r[0] ^ n[s + 1],
                            r[1] ^= d(h(o)),
                            o = r[3] ^ r[0] ^ r[1] ^ n[s + 2],
                            r[2] ^= d(h(o)),
                            o = r[0] ^ r[1] ^ r[2] ^ n[s + 3],
                            r[3] ^= d(h(o));
                    for (var c = 0; c < 16; c += 4)
                        t[c] = r[3 - c / 4] >>> 24 & 255,
                            t[c + 1] = r[3 - c / 4] >>> 16 & 255,
                            t[c + 2] = r[3 - c / 4] >>> 8 & 255,
                            t[c + 3] = 255 & r[3 - c / 4]
                }
                function g(e, t, n) {
                    for (var r = new Array(4), i = new Array(4), o = 0; o < 4; o++)
                        i[0] = 255 & e[0 + 4 * o],
                            i[1] = 255 & e[1 + 4 * o],
                            i[2] = 255 & e[2 + 4 * o],
                            i[3] = 255 & e[3 + 4 * o],
                            r[o] = i[0] << 24 | i[1] << 16 | i[2] << 8 | i[3];
                    r[0] ^= 2746333894,
                        r[1] ^= 1453994832,
                        r[2] ^= 1736282519,
                        r[3] ^= 2993693404;
                    for (var s, c = 0; c < 32; c += 4)
                        s = r[1] ^ r[2] ^ r[3] ^ a[c + 0],
                            t[c + 0] = r[0] ^= f(h(s)),
                            s = r[2] ^ r[3] ^ r[0] ^ a[c + 1],
                            t[c + 1] = r[1] ^= f(h(s)),
                            s = r[3] ^ r[0] ^ r[1] ^ a[c + 2],
                            t[c + 2] = r[2] ^= f(h(s)),
                            s = r[0] ^ r[1] ^ r[2] ^ a[c + 3],
                            t[c + 3] = r[3] ^= f(h(s));
                    if (0 === n)
                        for (var l, u = 0; u < 16; u++)
                            l = t[u],
                                t[u] = t[31 - u],
                                t[31 - u] = l
                }
                function m(e, t, n) {
                    var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}
                        , a = i.padding
                        , u = void 0 === a ? "pkcs#7" : a
                        , h = i.mode
                        , d = i.iv
                        , f = void 0 === d ? [] : d
                        , m = i.output
                        , y = void 0 === m ? "string" : m;
                    if ("cbc" === h && ("string" === typeof f && (f = o(f)),
                        16 !== f.length))
                        throw new Error("iv is invalid");
                    if ("string" === typeof t && (t = o(t)),
                        16 !== t.length)
                        throw new Error("key is invalid");
                    if (e = "string" === typeof e ? 0 !== n ? c(e) : o(e) : [].concat(e),
                        ("pkcs#5" === u || "pkcs#7" === u) && 0 !== n)
                        for (var _ = r - e.length % r, v = 0; v < _; v++)
                            e.push(_);
                    var b = new Array(32);
                    g(t, b, n);
                    for (var E = [], x = f, A = e.length, w = 0; A >= r;) {
                        var S = e.slice(w, w + 16)
                            , k = new Array(16);
                        if ("cbc" === h)
                            for (var C = 0; C < r; C++)
                                0 !== n && (S[C] ^= x[C]);
                        p(S, k, b);
                        for (var P = 0; P < r; P++)
                            "cbc" === h && 0 === n && (k[P] ^= x[P]),
                                E[w + P] = k[P];
                        "cbc" === h && (x = 0 !== n ? k : S),
                            A -= r,
                            w += r
                    }
                    if (("pkcs#5" === u || "pkcs#7" === u) && 0 === n) {
                        for (var O = E.length, T = E[O - 1], D = 1; D <= T; D++)
                            if (E[O - D] !== T)
                                throw new Error("padding is invalid");
                        E.splice(O - T, T)
                    }
                    return "array" !== y ? 0 !== n ? s(E) : l(E) : E
                }
                e.exports = {
                    encrypt: function (e, t, n) {
                        return m(e, t, 1, n)
                    },
                    decrypt: function (e, t, n) {
                        return m(e, t, 0, n)
                    }
                }
            }
        ])
    },
    71472: function (e, t, n) {
        "use strict";
        n.d(t, {
            fj: function () {
                return r
            },
            m1: function () {
                return i
            },
            TB: function () {
                return a
            },
            xs: function () {
                return o
            },
            yV: function () {
                return s
            }
        });
        var r = "-"
            , i = "1.4.2"
            , a = {
                RSA: 1,
                SM2: 2
            }
            , o = "https://weibo.com/airchina"
            , s = a.RSA
    }
}
]);

主程序入口

window = global
self = global
// 加载器
require("./load_data")
// 加载函数
require("./dict_func")

// 配置
url = "https://www.xxx.com.cn/gateway/api/flight/list"
depdate = "2024-11-21"
depCity = "PEK"
arrCity = "HKG"

// 请求串
req = {
    "Trip": [
        {
            "Date": depdate,
            "Dep": depCity,
            "Arrival": arrCity
        }
    ],
    "Passenger": {
        "adult": 1,
        "child": 0,
        "baby": 0
    },
    "RequestParameterRiskIdentificationBit": true
}

// 加密函数
jiami = function (e) {
    var a = wqx(70686),
        o = wqx(71472);
    try {
        var t = encodeURIComponent(JSON.stringify(e));
        return a.sm2.doEncrypt(t, "0419e8cc6e455ad6e3c49f75df09265cd0f5e4a58f09fda53b48ee066daa9abb8670ac3e94c1cecd6dcc3a581c2b61defce2c9e37c1737375dbe75812991a8af02", o.yV)
    } catch (n) {
        return console.log(n),
            ""
    }
}

req_data = jiami(req)

// 发送请求
fetch(url, {
    method: 'POST',
    headers: {
        'accept': 'application/json, text/plain, */*',
        'accept-language': 'zh-CN,zh;q=0.9',
        'cache-control': 'no-cache',
        'content-type': 'application/json',
        'cookie': 'HWWAFSESID=8b7ee732818770f201; HWWAFSESTIME=1729495266856; _gcl_au=1.1.968035522.1729495269; _ga=GA1.1.1362302176.1729495269; TKAEQLILOIB0YIMO=tak01j5DSFC7KEW7RWK772NECJTS3NGOSBZXMQLRIGG5Y2VD2ODKLDSPZK2JKWT7UIPM5KXT75JC64A5PSVE5F3SRAM4SQBLK6IQ6JXADYPCJCRGEM6J252SVR3FR46KZ6GBOKKIHOTFIRPBTF3FDA67E7FO2VH4DE; _ga_CGYVD7S4G4=GS1.1.1729583152.3.0.1729583152.0.0.0',
        'origin': 'https://www.airchina.com.cn',
        'pragma': 'no-cache',
        'priority': 'u=1, i',
        'referer': 'https://www.xxx.com.cn/flight/oneway/pek-hgh/2024-11-05',
        'sec-ch-ua': '"Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"',
        'sec-ch-ua-mobile': '?0',
        'sec-ch-ua-platform': '"macOS"',
        'sec-fetch-dest': 'empty',
        'sec-fetch-mode': 'cors',
        'sec-fetch-site': 'same-origin',
        'sgm-context': '152914111551247100;152914111551247100',
        'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
        'x-device-token': '""',
        'x-locale': 'zh-CN'
    },
    body: JSON.stringify({
        'params': req_data,
        'RequestParameterEncryptionIdentificationBit': true
    })
})
    .then(response => response.json())
    .then(data => console.log(JSON.stringify(data)))
    .catch(error => console.error('Error:', error));

声明:只用于技术交流,不得用于非法用途,否则后果自负!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值