module.exports = function (e) {
    var t = {};

    function i(n) {
        if (t[n]) return t[n].exports;
        var o = t[n] = {i: n, l: !1, exports: {}};
        return e[n].call(o.exports, o, o.exports, i), o.l = !0, o.exports
    }

    return i.m = e, i.c = t, i.d = function (e, t, n) {
        i.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: n})
    }, i.r = function (e) {
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
    }, i.t = function (e, t) {
        if (1 & t && (e = i(e)), 8 & t) return e;
        if (4 & t && "object" == typeof e && e && e.__esModule) return e;
        var n = Object.create(null);
        if (i.r(n), Object.defineProperty(n, "default", {
            enumerable: !0,
            value: e
        }), 2 & t && "string" != typeof e) for (var o in e) i.d(n, o, function (t) {
            return e[t]
        }.bind(null, o));
        return n
    }, i.n = function (e) {
        var t = e && e.__esModule ? function () {
            return e.default
        } : function () {
            return e
        };
        return i.d(t, "a", t), t
    }, i.o = function (e, t) {
        return Object.prototype.hasOwnProperty.call(e, t)
    }, i.p = "", i(i.s = 581)
}([function (e, t, i) {
    e.exports = i(65)(137)
}, function (e, t, i) {
    "use strict";

    function n(e, t, i, n, o, a, r, s) {
        var l, d = "function" == typeof e ? e.options : e;
        if (t && (d.render = t, d.staticRenderFns = i, d._compiled = !0), n && (d.functional = !0), a && (d._scopeId = "data-v-" + a), r ? (l = function (e) {
            (e = e || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || "undefined" == typeof __VUE_SSR_CONTEXT__ || (e = __VUE_SSR_CONTEXT__), o && o.call(this, e), e && e._registeredComponents && e._registeredComponents.add(r)
        }, d._ssrRegister = l) : o && (l = s ? function () {
            o.call(this, this.$root.$options.shadowRoot)
        } : o), l) if (d.functional) {
            d._injectStyles = l;
            var u = d.render;
            d.render = function (e, t) {
                return l.call(t), u(e, t)
            }
        } else {
            var c = d.beforeCreate;
            d.beforeCreate = c ? [].concat(c, l) : [l]
        }
        return {exports: e, options: d}
    }

    i.d(t, "a", function () {
        return n
    })
}, function (e, t) {
    e.exports = require("path")
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), a = i(586), r = i(61), s = i(123);

    function l(e) {
        s.information("on object freeer"), global.__xdasIPCClienInstance.notifyFreer(e.remoteId, e.callbackId)
    }

    let d = void 0;
    global.__xdasIPCClienInstance || (global.__xdasIPCClienInstance = new class extends o.EventEmitter {
        constructor() {
            super(), this.rid = 0, this.apis = {}, this.singletonMap = {}, this.connectedMap = {}, this.retCallbackMap = {}, this.eventCallbackMaps = {}, this.contextCallbackMap = {}
        }

        start(e, t, i, n) {
            do {
                if (t || (t = r.getDefaultPrex()), this.singletonMap.hasOwnProperty(t.toLowerCase())) {
                    if (n) if (this.connectedMap.hasOwnProperty(t.toLowerCase())) n("connect"); else {
                        let e = this.singletonMap[t.toLowerCase()];
                        e.on("error", e => {
                            n("error", e)
                        }), e.on("connect", () => {
                            n("connect")
                        }), e.on("end", () => {
                            let t = e.isInprocess();
                            n("end", e.getContext(), i, t)
                        })
                    }
                    break
                }
                if (global.__xdasPluginConfig && global.__xdasPluginConfig.name ? e = {
                    name: global.__xdasPluginConfig.name,
                    version: global.__xdasPluginConfig.version
                } : void 0 !== e && null !== e || (e = this.parseContext()), !e) {
                    if (!this.client || !this.client.getContext()) throw new Error("no suitable context for client, please specify context with start function");
                    e = {name: this.client.getContext().name, version: this.client.getContext().version}
                }
                if (e.name === r.serverContextName) throw new Error("client context must difference from server");
                if (i && !this.client) throw new Error("connect to other product must start self firstly");
                global.__xdasPluginConfig || (global.__xdasPluginConfig = e);
                let o = new a.Client({context: e, socketPrex: t});
                this.singletonMap[t.toLowerCase()] = o, i || (this.client = o), o.on("message", e => {
                    if ("fire_event" === e.action) this.fireServerEvent(o, e.name, [e.__context].concat(e.args)); else if ("client_context_freer" === e.action) do {
                        let t = e.rid;
                        if (t) {
                            if (!this.contextCallbackMap[t]) break;
                            delete this.contextCallbackMap[t]
                        }
                    } while (0); else if ("call_client_by_id" === e.action) this.callFunctionById(o, e.rid, e.s_rid, e.args); else if ("call_client_api" === e.action) this.callRegisterFunction(o, e); else if ("check_client_function" === e.action) {
                        let t = e.method, i = !0;
                        t && this.apis && this.apis[t] || (i = !1), this.sendAdapter(o, {
                            s_rid: e.s_rid,
                            action: "check_client_function_callback",
                            success: !0,
                            data: i
                        })
                    } else if (void 0 !== e.success && null !== e.success) {
                        let t = e;
                        this.client === o && this.emit("stat_call_function_back", o.getContext(), e);
                        const i = this.retCallbackMap[t.rid].callback;
                        if (i) if (t.success) do {
                            if ("remote_client_callback" === e.action && e.__context && e.__context.name && e.__context.productId) {
                                let n = `${e.__context.productId}-${e.__context.name}`.toLowerCase();
                                i(null, this.decodeParameter(t.data, n));
                                break
                            }
                            i(null, t.data)
                        } while (0); else i(t.error, t.data);
                        delete this.retCallbackMap[t.rid]
                    }
                }), o.on("error", e => {
                    n && n("error", e), this.emit("socket-error", e, o.getContext(), i, o.isInprocess()), delete this.singletonMap[t.toLowerCase()], delete this.connectedMap[t.toLowerCase()], i || (this.client = null)
                }), o.isInprocess() ? (this.connectedMap[t.toLowerCase()] = o, n && n("connect"), this.emit("connect", o.getContext(), i, !0)) : o.on("connect", () => {
                    this.connectedMap[t.toLowerCase()] = o, n && n("connect"), this.emit("connect", o.getContext(), i, !1)
                }), o.on("end", () => {
                    let e = o.isInprocess();
                    s.information("server is ended, and this client emit end", t, i, e), n && n("end", o.getContext(), i, e), this.emit("end", o.getContext(), i, e), delete this.singletonMap[t.toLowerCase()], delete this.connectedMap[t.toLowerCase()], i || (this.client = null)
                }), this.registry(o)
            } while (0)
        }

        registerFunctions(e) {
            do {
                if (!e) break;
                let t = void 0;
                for (let i in e) if (this.apis.hasOwnProperty(i)) {
                    t = i;
                    break
                }
                if (t) throw new Error(`try to coverd function ${t}`);
                this.apis = Object.assign({}, this.apis, e)
            } while (0)
        }

        checkServerFunction(e) {
            return n(this, void 0, void 0, function* () {
                return this.internalCheckServerFunction(this.client, e)
            })
        }

        callServerFunction(e, ...t) {
            return n(this, void 0, void 0, function* () {
                let i = null, n = yield this.callServerFunctionEx(e, ...t);
                return n && (i = n[0]), i
            })
        }

        callServerFunctionEx(e, ...t) {
            return this.internalCallServerFunctionEx(this.client, e, ...t)
        }

        isRemoteClientExist(e) {
            return this.internalIsRemoteClientExist(this.client, e)
        }

        checkRemoteFunction(e, t) {
            return this.internalCheckRemoteFunction(this.client, e, t)
        }

        callRemoteClientFunction(e, t, ...i) {
            return this.internalCallRemoteClientFunction(this.client, e, t, ...i)
        }

        notifyFreer(e, t) {
            this.sendAdapter(this.client, {action: "client_context_freer", dst: e, rid: t})
        }

        callRemoteContextById(e, t, ...i) {
            this.sendAdapter(this.client, {dst: e, action: "call_remote_context_by_id", rid: t, args: i})
        }

        attachServerEvent(e, t) {
            return this.internalAttachServerEvent(this.client, e, t)
        }

        detachServerEvent(e, t) {
            this.internalDetachServerEvent(this.client, e, t)
        }

        broadcastEvent(e, ...t) {
            this.sendAdapter(this.client, {action: "broadcast", name: e, args: t})
        }

        crossCheckServerFunction(e, t) {
            return n(this, void 0, void 0, function* () {
                {
                    if (!e) throw new Error("An argument for 'productId' was not provided");
                    let i = this.singletonMap[e.toLowerCase()];
                    if (!i) throw new Error("Please call the 'start' interface first");
                    return this.internalCheckServerFunction(i, t)
                }
            })
        }

        crossCallServerFunction(e, t, ...i) {
            return n(this, void 0, void 0, function* () {
                let n = null, o = yield this.crossCallServerFunctionEx(e, t, ...i);
                return o && (n = o[0]), n
            })
        }

        crossCallServerFunctionEx(e, t, ...i) {
            {
                if (!e) throw new Error("An argument for 'productId' was not provided");
                let n = this.singletonMap[e.toLowerCase()];
                if (!n) throw new Error("Please call the 'start' interface first");
                if (!t) throw new Error("An argument for 'funcName' was not provided");
                return this.internalCallServerFunctionEx(n, t, ...i)
            }
        }

        crossIsRemoteClientExist(e, t) {
            return n(this, void 0, void 0, function* () {
                {
                    if (!e) throw new Error("An argument for 'productId' was not provided");
                    let i = this.singletonMap[e.toLowerCase()];
                    if (!i) throw new Error("Please call the 'start' interface first");
                    return this.internalIsRemoteClientExist(i, t)
                }
            })
        }

        crossCheckRemoteFunction(e, t, i) {
            return n(this, void 0, void 0, function* () {
                {
                    if (!e) throw new Error("An argument for 'productId' was not provided");
                    let n = this.singletonMap[e.toLowerCase()];
                    if (!n) throw new Error("Please call the 'start' interface first");
                    if (!t) throw new Error("An argument for 'remoteId' was not provided");
                    if (!i) throw new Error("An argument for 'funcName' was not provided");
                    return this.internalCheckRemoteFunction(n, t, i)
                }
            })
        }

        crossCallRemoteClientFunction(e, t, i, ...n) {
            {
                if (!e) throw new Error("An argument for 'productId' was not provided");
                let o = this.singletonMap[e.toLowerCase()];
                if (!o) throw new Error("Please call the 'start' interface first");
                if (!t) throw new Error("An argument for 'remoteId' was not provided");
                if (!i) throw new Error("An argument for 'funcName' was not provided");
                return this.internalCallRemoteClientFunction(o, t, i, ...n)
            }
        }

        crossAttachServerEvent(e, t, i) {
            let n = void 0;
            {
                if (!e) throw new Error("An argument for 'productId' was not provided");
                let o = this.singletonMap[e.toLowerCase()];
                if (!o) throw new Error("Please call the 'start' interface first");
                if (!t) throw new Error("An argument for 'eventName' was not provided");
                n = this.internalAttachServerEvent(o, t, i)
            }
            return n
        }

        crossDetachServerEvent(e, t, i) {
            {
                if (!e) throw new Error("An argument for 'productId' was not provided");
                let n = this.singletonMap[e.toLowerCase()];
                if (!n) throw new Error("Please call the 'start' interface first");
                if (!t) throw new Error("An argument for 'eventName' was not provided");
                this.internalDetachServerEvent(n, t, i)
            }
        }

        crossBroadcastEvent(e, t, ...i) {
            {
                if (!e) throw new Error("An argument for 'productId' was not provided");
                let n = this.singletonMap[e.toLowerCase()];
                if (!n) throw new Error("Please call the 'start' interface first");
                if (!t) throw new Error("An argument for 'eventName' was not provided");
                this.sendAdapter(n, {
                    action: "broadcast",
                    name: t,
                    args: i,
                    __context: Object.assign({}, this.client.getContext())
                })
            }
        }

        registry(e) {
            let t = this.getFullContextName(this.client);
            return new Promise((i, n) => {
                do {
                    if (!t) {
                        i(!1);
                        break
                    }
                    let n = this.generateId();
                    const o = {alias: t, action: "register", rid: n};
                    let a = (e, n) => {
                        e ? (s.error("register error", e.message), i(n)) : i(t)
                    };
                    this.retCallbackMap[n] = Object.assign({callback: a}, o), this.sendAdapter(e, o)
                } while (0)
            })
        }

        getNow() {
            return Date.now()
        }

        sendAdapter(e, t) {
            do {
                if (!t) break;
                let i = this.getNow();
                if (t.timestamp ? t.timestamp = [...t.timestamp].concat(i) : t.timestamp = [].concat(i), !t.__context) {
                    let i = e.getContext();
                    i && (t = Object.assign({__context: i}, t))
                }
                e.isInprocess() ? (s.information("send to server in process"), global.__xdasIPCServer.emit("message", t, e)) : e.send(t)
            } while (0)
        }

        parseContext() {
            let e = void 0;
            do {
                let t = "";
                for (let e = 0; e < process.argv.length; e++) {
                    let i = process.argv[e];
                    if (0 === i.indexOf("--xdas-plugin-name=", 0)) {
                        t = i.substr("--xdas-plugin-name=".length);
                        break
                    }
                }
                if (!t) break;
                e = {name: t}
            } while (0);
            return e
        }

        generateId() {
            return this.rid++
        }

        getFullContextName(e, t) {
            let i = "";
            do {
                if (t === r.serverContextName) {
                    i = t;
                    break
                }
                if (void 0 === t) {
                    i = `${e.getContext().productId}-${e.getContext().name}`.toLowerCase();
                    break
                }
                i = `${e.getContext().productId}-${t}`.toLowerCase()
            } while (0);
            return i
        }

        internalCheckServerFunction(e, t) {
            return new Promise((i, n) => {
                do {
                    if (!e) {
                        i(!1);
                        break
                    }
                    if (!t) {
                        i(!1);
                        break
                    }
                    let n = this.generateId();
                    const o = {action: "check_server_function_exist", method: t, rid: n};
                    let a = (e, t) => {
                        i(!e && t)
                    };
                    this.retCallbackMap[n] = Object.assign({callback: a}, o), this.sendAdapter(e, o)
                } while (0)
            })
        }

        internalCallServerFunctionEx(e, t, ...i) {
            return new Promise((n, o) => {
                do {
                    if (!e) {
                        n([null, "client doesn't ready"]);
                        break
                    }
                    if (!t) {
                        n([null, "funcName is not specifed"]);
                        break
                    }
                    e === this.client && this.emit("stat_call_function", this.client.getContext(), t);
                    let o = this.generateId();
                    if (i) for (let e = 0; e < i.length; e++) i[e] = this.convertFunction2IdEx(i[e]);
                    const a = {rid: o, method: t, args: i};
                    let r = (t, i) => {
                        t ? (s.error("callServerFunction error", t, e.getContext()), n([null, t])) : n([i, void 0])
                    };
                    this.retCallbackMap[o] = Object.assign({callback: r}, a), this.sendAdapter(e, a)
                } while (0)
            })
        }

        internalIsRemoteClientExist(e, t) {
            return new Promise((i, n) => {
                do {
                    if (!t) {
                        i([!1, "remote client alias is not specifed"]);
                        break
                    }
                    if (e === this.client && t.toLowerCase() === e.getContext().name.toLowerCase()) {
                        i([!0, "self is exist"]);
                        break
                    }
                    let n = this.generateId();
                    const o = {dst: this.getFullContextName(e, t), action: "check_client_exist", rid: n};
                    let a = (e, t) => {
                        i(e ? [!1, e] : [t, "success"])
                    };
                    this.retCallbackMap[n] = Object.assign({callback: a}, o), this.sendAdapter(e, o)
                } while (0)
            })
        }

        internalCheckRemoteFunction(e, t, i) {
            return new Promise((n, o) => {
                do {
                    if (!e) {
                        n(!1);
                        break
                    }
                    if (!t) {
                        n(!1);
                        break
                    }
                    if (!i) {
                        n(!1);
                        break
                    }
                    if (e === this.client && t.toLowerCase() === e.getContext().name.toLowerCase()) {
                        n(!(!this.apis || !this.apis[i]));
                        break
                    }
                    let o = this.generateId();
                    const a = {
                        action: "check_client_function_exist",
                        method: i,
                        rid: o,
                        src: this.getFullContextName(this.client),
                        dst: this.getFullContextName(e, t)
                    };
                    let r = (e, t) => {
                        n(!e && t)
                    };
                    this.retCallbackMap[o] = Object.assign({callback: r}, a), this.sendAdapter(e, a)
                } while (0)
            })
        }

        internalCallRemoteClientFunction(e, t, i, ...n) {
            return new Promise((o, a) => {
                do {
                    if (!e) {
                        o([null, "client doesn't ready"]);
                        break
                    }
                    if (!t) {
                        o([null, "remote client alias is not specifed"]);
                        break
                    }
                    if (!i) {
                        o([null, "funcName is not specifed"]);
                        break
                    }
                    let a = (e, t) => {
                        e ? (s.information("callRemoteClientFunction", e.message), o([null, e])) : o([t, void 0])
                    };
                    if (n) for (let e = 0; e < n.length; e++) n[e] = this.convertFunction2IdEx(n[e]);
                    let r = this.generateId();
                    const l = {
                        src: this.getFullContextName(this.client),
                        dst: this.getFullContextName(e, t),
                        action: "call_remote_client_api",
                        method: i,
                        args: n,
                        rid: r
                    };
                    this.retCallbackMap[r] = Object.assign({callback: a}, l), this.sendAdapter(e, l)
                } while (0)
            })
        }

        internalAttachServerEvent(e, t, i) {
            let n = e.getContext().productId.toLowerCase();
            this.eventCallbackMaps.hasOwnProperty(n) || (this.eventCallbackMaps[n] = {}), this.eventCallbackMaps[n].hasOwnProperty(t) || (this.eventCallbackMaps[n][t] = {}), r.isObjectEmpty(this.eventCallbackMaps[n][t]) && this.sendAdapter(e, {
                action: "attach_event",
                name: t
            });
            let o = this.generateId();
            return this.eventCallbackMaps[n][t][o] = i, o
        }

        internalDetachServerEvent(e, t, i) {
            let n = e.getContext().productId.toLowerCase();
            do {
                if (!this.eventCallbackMaps.hasOwnProperty(n)) break;
                if (!this.eventCallbackMaps[n].hasOwnProperty(t)) break;
                delete this.eventCallbackMaps[n][t][i], r.isObjectEmpty(this.eventCallbackMaps[n][t]) && this.sendAdapter(e, {
                    action: "detach_event",
                    name: t
                })
            } while (0)
        }

        fireServerEvent(e, t, ...i) {
            let n = e.getContext().productId.toLowerCase();
            do {
                if (!this.eventCallbackMaps.hasOwnProperty(n)) break;
                if (!this.eventCallbackMaps[n].hasOwnProperty(t)) break;
                let e = this.eventCallbackMaps[n][t];
                for (let t in e) {
                    let n = e[t];
                    n && n.apply(null, ...i)
                }
            } while (0)
        }

        callFunctionById(e, t, i, ...n) {
            let o = void 0, a = !1;
            do {
                const r = this.contextCallbackMap[t];
                if (!r) {
                    s.error("the context function has been freeer", t), o = {
                        s_rid: i,
                        action: "call_client_by_id_callback",
                        success: !1,
                        error: "the context function has been freeer"
                    };
                    break
                }
                let l = void 0, d = void 0;
                try {
                    l = r.apply(null, ...n)
                } catch (e) {
                    d = e.message;
                    break
                }
                if (void 0 === i || null === i) break;
                if (o = {s_rid: i, action: "call_client_by_id_callback", success: !1}, void 0 !== d) {
                    o.error = d;
                    break
                }
                if (l && l.then) {
                    l.then(t => {
                        o.data = this.convertFunction2IdEx(t), o.success = !0, this.sendAdapter(e, o)
                    }).catch(t => {
                        o.error = t instanceof Error ? t.message : t, this.sendAdapter(e, o)
                    }), a = !0;
                    break
                }
                o.success = !0, o.data = this.convertFunction2IdEx(l)
            } while (0);
            !a && o && this.sendAdapter(e, o)
        }

        convertFunction2IdEx(e) {
            let t = e;
            if ("function" == typeof e) {
                let i = this.generateId();
                this.contextCallbackMap[i] = e, t = {"__nodeipc_callback_id__{A9C9D760-14E8-42CB-A3CB-9C0A0DDFD732}": i}
            } else if (e && "object" == typeof e) {
                t = Array.isArray(e) ? [...e] : Object.assign({}, e);
                for (let e in t) {
                    let i = t[e];
                    if ("function" == typeof i) {
                        let n = this.generateId();
                        this.contextCallbackMap[n] = i, t[e] = {"__nodeipc_callback_id__{A9C9D760-14E8-42CB-A3CB-9C0A0DDFD732}": n}
                    } else i && "object" == typeof i && (t[e] = this.convertFunction2IdEx(i))
                }
            }
            return t
        }

        decodeParameter(e, t) {
            let i = e;
            do {
                if (!e) break;
                if (!t) break;
                if ("object" != typeof e) break;
                let n = e["__nodeipc_callback_id__{A9C9D760-14E8-42CB-A3CB-9C0A0DDFD732}"];
                if (n) {
                    i = ((...e) => {
                        this.callRemoteContextById(t, n, ...e)
                    }), global.__xdasObjectLiftMonitor && global.__xdasObjectLiftMonitor.setObjectFreer(i, {
                        remoteId: t,
                        callbackId: n
                    }, l);
                    break
                }
                for (let i in e) {
                    let n = e[i];
                    e[i] = this.decodeParameter(n, t)
                }
            } while (0);
            return i
        }

        callRegisterFunction(e, t) {
            let i = void 0, n = !1;
            do {
                if (!t) break;
                let o = t.method;
                if (!o) break;
                let a = this.getNow();
                if (i = {
                    s_rid: t.s_rid,
                    action: "remote_client_callback",
                    success: !1,
                    rid: t.rid,
                    method: t.method,
                    src: t.src,
                    timestamp: t.timestamp ? t.timestamp.concat(a) : [].concat(a)
                }, !this.apis || !this.apis[o]) {
                    i.error = `callRegisterFunction ${o} is undefined`;
                    break
                }
                let r = void 0, s = this.decodeParameter(t.args, t.src);
                try {
                    r = this.apis[o].apply(null, [t.src].concat(s))
                } catch (e) {
                    i.error = e.message;
                    break
                }
                if (r && r.then) {
                    r.then(t => {
                        i.data = this.convertFunction2IdEx(t), i.success = !0, this.sendAdapter(e, i)
                    }).catch(t => {
                        i.error = t instanceof Error ? t.message : t, this.sendAdapter(e, i)
                    }), n = !0;
                    break
                }
                i.success = !0, i.data = this.convertFunction2IdEx(r)
            } while (0);
            s.information("callRegisterFunction", i), !n && i && this.sendAdapter(e, i)
        }
    }), d = global.__xdasIPCClienInstance, t.client = d
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t, i, n, o, a, r, s, l, d, u, c, h, f, p, g, m, v, y, T, w, k, C;
        !function (e) {
            e[e.Unkown = 0] = "Unkown", e[e.Create = 1] = "Create", e[e.InvaldParam = 2] = "InvaldParam", e[e.InvaldLink = 3] = "InvaldLink", e[e.InvaldConfig = 4] = "InvaldConfig", e[e.Timeout = 5] = "Timeout", e[e.VerifyData = 6] = "VerifyData", e[e.Forbidden = 7] = "Forbidden", e[e.RangeDispatch = 8] = "RangeDispatch", e[e.FilePathOverRanging = 9] = "FilePathOverRanging", e[e.FileCreate = 201] = "FileCreate", e[e.FileWrite = 202] = "FileWrite", e[e.FileRead = 203] = "FileRead", e[e.FileRename = 204] = "FileRename", e[e.FileFull = 205] = "FileFull", e[e.FileOccupied = 211] = "FileOccupied", e[e.FileAccessDenied = 212] = "FileAccessDenied", e[e.BtUploadExist = 601] = "BtUploadExist", e[e.ForbinddenResource = 701] = "ForbinddenResource", e[e.ForbinddenAccount = 702] = "ForbinddenAccount", e[e.ForbinddenArea = 703] = "ForbinddenArea", e[e.ForbinddenCopyright = 704] = "ForbinddenCopyright", e[e.ForbinddenReaction = 705] = "ForbinddenReaction", e[e.ForbinddenPorn = 706] = "ForbinddenPorn", e[e.DownloadSDKCrash = 10001] = "DownloadSDKCrash", e[e.torrentFileNotExist = 10002] = "torrentFileNotExist"
        }(t = e.TaskError || (e.TaskError = {})), function (e) {
            e[e.Unkown = -1] = "Unkown", e[e.Success = 0] = "Success", e[e.QueryFailed = 1] = "QueryFailed", e[e.ServerError = 2] = "ServerError", e[e.ResourceNotFound = 3] = "ResourceNotFound", e[e.AuthorizingFailed = 4] = "AuthorizingFailed", e[e.ForbidByCopyright = 5] = "ForbidByCopyright", e[e.ForbidByPorNoGraphy = 6] = "ForbidByPorNoGraphy", e[e.ForbidByReactionary = 7] = "ForbidByReactionary", e[e.ForbidByOtherFilter = 8] = "ForbidByOtherFilter"
        }(i = e.DcdnStatusCode || (e.DcdnStatusCode = {})), function (e) {
            e[e.Begin = -1] = "Begin", e[e.Unkown = 0] = "Unkown", e[e.StandBy = 1] = "StandBy", e[e.PreDownloading = 2] = "PreDownloading", e[e.StartWaiting = 3] = "StartWaiting", e[e.StartPending = 4] = "StartPending", e[e.Started = 5] = "Started", e[e.StopPending = 6] = "StopPending", e[e.Stopped = 7] = "Stopped", e[e.Succeeded = 8] = "Succeeded", e[e.Failed = 9] = "Failed", e[e.Seeding = 10] = "Seeding", e[e.DestroyPending = 11] = "DestroyPending", e[e.End = 12] = "End"
        }(n = e.TaskStatus || (e.TaskStatus = {})), function (e) {
            e[e.Begin = -1] = "Begin", e[e.StandBy = 0] = "StandBy", e[e.Stopped = 1] = "Stopped", e[e.Started = 2] = "Started", e[e.Complete = 3] = "Complete", e[e.Forbidden = 4] = "Forbidden", e[e.Error = 5] = "Error", e[e.End = 6] = "End"
        }(o = e.BtFileStatus || (e.BtFileStatus = {})), function (e) {
            e[e.DispatchStrategyNone = 0] = "DispatchStrategyNone", e[e.DispatchStrategyOrigin = 1] = "DispatchStrategyOrigin", e[e.DispatchStrategyP2s = 2] = "DispatchStrategyP2s", e[e.DispatchStrategyP2p = 4] = "DispatchStrategyP2p", e[e.DispatchStrategyAll = -1] = "DispatchStrategyAll"
        }(a = e.DispatchStrategy || (e.DispatchStrategy = {})), function (e) {
            e[e.Unkown = 0] = "Unkown", e[e.P2sp = 1] = "P2sp", e[e.Bt = 2] = "Bt", e[e.Emule = 3] = "Emule", e[e.Group = 4] = "Group", e[e.Magnet = 5] = "Magnet"
        }(r = e.TaskType || (e.TaskType = {})), function (e) {
            e[e.Invalid = 0] = "Invalid", e[e.P2sp = 1] = "P2sp", e[e.Emule = 2] = "Emule"
        }(s = e.TaskCfgType || (e.TaskCfgType = {})), function (e) {
            e.Unkown = "Unkown", e.Downloading = "Downloading", e.Completed = "Completed", e.Recycle = "Recycle"
        }(l = e.CategroyViewID || (e.CategroyViewID = {})), function (e) {
            e[e.Unknow = 0] = "Unknow", e[e.TaskCreated = 1] = "TaskCreated", e[e.InsertToCategoryView = 2] = "InsertToCategoryView", e[e.RemoveFromCategoryView = 3] = "RemoveFromCategoryView", e[e.StatusChanged = 4] = "StatusChanged", e[e.DetailChanged = 5] = "DetailChanged", e[e.ChannelInfoChanged = 6] = "ChannelInfoChanged", e[e.DcdnStatusChanged = 7] = "DcdnStatusChanged", e[e.TaskDescriptionChanged = 8] = "TaskDescriptionChanged", e[e.TaskUserRead = 9] = "TaskUserRead", e[e.TaskRenamed = 10] = "TaskRenamed", e[e.TaskMovedEnd = 11] = "TaskMovedEnd", e[e.TaskMovingStateChange = 12] = "TaskMovingStateChange", e[e.BtSubFileDetailChanged = 13] = "BtSubFileDetailChanged", e[e.BtSubFileLoaded = 14] = "BtSubFileLoaded", e[e.BtSubFileForbidden = 15] = "BtSubFileForbidden", e[e.BtSubFileDcdnStatusChanged = 16] = "BtSubFileDcdnStatusChanged", e[e.TaskCategoryMovedEnd = 17] = "TaskCategoryMovedEnd", e[e.GroupTaskSubFileDetailChanged = 18] = "GroupTaskSubFileDetailChanged", e[e.TaskDestroying = 19] = "TaskDestroying", e[e.TaskDestroyed = 20] = "TaskDestroyed"
        }(d = e.TaskEventType || (e.TaskEventType = {})), function (e) {
            e[e.NumberStrart = 0] = "NumberStrart", e[e.TaskId = 1] = "TaskId", e[e.VirtualId = 2] = "VirtualId", e[e.SrcTotal = 3] = "SrcTotal", e[e.SrcUsing = 4] = "SrcUsing", e[e.FileSize = 5] = "FileSize", e[e.ReceivedSize = 6] = "ReceivedSize", e[e.DownloadSize = 7] = "DownloadSize", e[e.TotalDownloadSize = 8] = "TotalDownloadSize", e[e.CreateTime = 9] = "CreateTime", e[e.CompletionTime = 10] = "CompletionTime", e[e.DownloadingPeriod = 11] = "DownloadingPeriod", e[e.Progress = 12] = "Progress", e[e.RecycleTime = 13] = "RecycleTime", e[e.FileCreated = 14] = "FileCreated", e[e.Forbidden = 15] = "Forbidden", e[e.CategoryId = 16] = "CategoryId", e[e.UserRead = 17] = "UserRead", e[e.OpenOnComplete = 18] = "OpenOnComplete", e[e.GroupTaskId = 19] = "GroupTaskId", e[e.DownloadSubTask = 20] = "DownloadSubTask", e[e.NameType = 21] = "NameType", e[e.OwnerProduct = 22] = "OwnerProduct", e[e.FileIndex = 23] = "FileIndex", e[e.NameFixed = 24] = "NameFixed", e[e.ValidDownloadSize = 25] = "ValidDownloadSize", e[e.RealDownloadSize = 26] = "RealDownloadSize", e[e.ResourceLegal = 27] = "ResourceLegal", e[e.TaskType = 28] = "TaskType", e[e.ErrorCode = 29] = "ErrorCode", e[e.PlayPosition = 30] = "PlayPosition", e[e.Duration = 31] = "Duration", e[e.NumberEnd = 32] = "NumberEnd", e[e.BooleanStart = 4096] = "BooleanStart", e[e.Destroyed = 4097] = "Destroyed", e[e.Background = 4098] = "Background", e[e.Moving = 4099] = "Moving", e[e.BooleanEnd = 4100] = "BooleanEnd", e[e.StringStart = 8192] = "StringStart", e[e.TaskName = 8193] = "TaskName", e[e.SavePath = 8194] = "SavePath", e[e.RelativePath = 8195] = "RelativePath", e[e.TaskUrl = 8196] = "TaskUrl", e[e.RefUrl = 8197] = "RefUrl", e[e.Cid = 8198] = "Cid", e[e.Gcid = 8199] = "Gcid", e[e.Cookie = 8200] = "Cookie", e[e.ProductInfo = 8201] = "ProductInfo", e[e.Origin = 8202] = "Origin", e[e.Description = 8203] = "Description", e[e.UserData = 8204] = "UserData", e[e.OriginName = 8205] = "OriginName", e[e.HTTPContentType = 8206] = "HTTPContentType", e[e.CategoryViewId = 8207] = "CategoryViewId", e[e.YunTaskId = 8208] = "YunTaskId", e[e.StringEnd = 8209] = "StringEnd", e[e.ObjectStart = 12288] = "ObjectStart", e[e.ObjectEnd = 12289] = "ObjectEnd"
        }(u = e.TaskAttribute || (e.TaskAttribute = {})), function (e) {
            e[e.UnKnown = 0] = "UnKnown", e[e.SrcTotal = 1] = "SrcTotal", e[e.SrcUsing = 2] = "SrcUsing", e[e.FileSize = 4] = "FileSize", e[e.ReceivedSize = 8] = "ReceivedSize", e[e.DownloadSize = 16] = "DownloadSize", e[e.CompletionTime = 32] = "CompletionTime", e[e.DownloadingPeriod = 64] = "DownloadingPeriod", e[e.Progress = 128] = "Progress", e[e.RecycleTime = 256] = "RecycleTime", e[e.FileCreated = 512] = "FileCreated", e[e.Forbidden = 1024] = "Forbidden", e[e.UserRead = 2048] = "UserRead", e[e.OpenOnComplete = 4096] = "OpenOnComplete", e[e.DownloadSubTask = 8192] = "DownloadSubTask", e[e.TaskName = 16384] = "TaskName", e[e.SavePath = 32768] = "SavePath", e[e.Cid = 65536] = "Cid", e[e.Gcid = 131072] = "Gcid", e[e.UserData = 262144] = "UserData", e[e.CategoryViewId = 524288] = "CategoryViewId", e[e.ErrorCode = 1048576] = "ErrorCode", e[e.TaskSpeed = 2097152] = "TaskSpeed", e[e.ChannelInfo = 4194304] = "ChannelInfo", e[e.ValidDownloadSize = 8388608] = "ValidDownloadSize", e[e.OriginName = 16777216] = "OriginName", e[e.HTTPContentType = 33554432] = "HTTPContentType", e[e.PlayPosition = 67108864] = "PlayPosition", e[e.Duration = 134217728] = "Duration", e[e.YunTaskId = 268435456] = "YunTaskId"
        }(c = e.TaskDetailChangedFlags || (e.TaskDetailChangedFlags = {})), function (e) {
            e[e.UnKnown = 0] = "UnKnown"
        }(h = e.BtSubFileDetailChangedFlags || (e.BtSubFileDetailChangedFlags = {})), function (e) {
            e[e.UnKnown = 0] = "UnKnown"
        }(f = e.GroupTaskSubFileDetailChangedFlags || (e.GroupTaskSubFileDetailChangedFlags = {})), function (e) {
            e[e.NumberStrart = 0] = "NumberStrart", e[e.TaskId = 1] = "TaskId", e[e.FileStatus = 2] = "FileStatus", e[e.DownloadSize = 3] = "DownloadSize", e[e.FileSize = 4] = "FileSize", e[e.EnableDcdn = 5] = "EnableDcdn", e[e.ErrorCode = 6] = "ErrorCode", e[e.DcdnStatus = 7] = "DcdnStatus", e[e.RealIndex = 8] = "RealIndex", e[e.FileOffset = 9] = "FileOffset", e[e.Visible = 10] = "Visible", e[e.Download = 11] = "Download", e[e.UserRead = 12] = "UserRead", e[e.PlayPosition = 13] = "PlayPosition", e[e.Duration = 14] = "Duration", e[e.NumberEnd = 15] = "NumberEnd", e[e.StringStart = 4096] = "StringStart", e[e.FinalName = 4097] = "FinalName", e[e.RelativePath = 4098] = "RelativePath", e[e.FileName = 4099] = "FileName", e[e.FilePath = 4100] = "FilePath", e[e.Cid = 4101] = "Cid", e[e.Gcid = 4102] = "Gcid", e[e.StringEnd = 4103] = "StringEnd"
        }(p = e.BtFileAttribute || (e.BtFileAttribute = {})), function (e) {
            e[e.P2spUrl = 0] = "P2spUrl", e[e.BtInfoId = 1] = "BtInfoId", e[e.EmuleFileHash = 2] = "EmuleFileHash", e[e.MagnetUrl = 3] = "MagnetUrl", e[e.GroupTaskName = 4] = "GroupTaskName"
        }(g = e.KeyType || (e.KeyType = {})), function (e) {
            e[e.NameInclude = 1] = "NameInclude", e[e.BtDisplayNameInclude = 2] = "BtDisplayNameInclude"
        }(m = e.SearchKeyType || (e.SearchKeyType = {})), function (e) {
            e[e.ExtEqual = 1] = "ExtEqual", e[e.NameLikeAndExtEqual = 2] = "NameLikeAndExtEqual", e[e.TaskTypeEqual = 4] = "TaskTypeEqual"
        }(v = e.FilterKeyType || (e.FilterKeyType = {})), function (e) {
            e[e.All = 0] = "All", e[e.CommonForeground = 1] = "CommonForeground", e[e.CommonBackground = 2] = "CommonBackground", e[e.Temporary = 3] = "Temporary", e[e.PreDownload = 4] = "PreDownload", e[e.PrivateForeground = 5] = "PrivateForeground"
        }(y = e.KeyFilter || (e.KeyFilter = {})), function (e) {
            e[e.Unknown = -1] = "Unknown", e[e.LoadTaskBasic = 0] = "LoadTaskBasic", e[e.Create = 1] = "Create", e[e.Complete = 2] = "Complete", e[e.Recycle = 3] = "Recycle", e[e.Recover = 4] = "Recover", e[e.ReDownload = 5] = "ReDownload", e[e.MoveThoughCategory = 6] = "MoveThoughCategory"
        }(T = e.TaskInsertReason || (e.TaskInsertReason = {})), function (e) {
            e[e.Unknown = -1] = "Unknown", e[e.Manual = 0] = "Manual", e[e.PauseAll = 1] = "PauseAll", e[e.DeleteTask = 2] = "DeleteTask", e[e.TaskJammed = 3] = "TaskJammed", e[e.LowSpeed = 4] = "LowSpeed", e[e.MaxDownloadReduce = 5] = "MaxDownloadReduce", e[e.MoveTask = 6] = "MoveTask", e[e.SelectDownloadLists = 7] = "SelectDownloadLists", e[e.PrivateLoginOut = 8] = "PrivateLoginOut", e[e.FreeDownload = 9] = "FreeDownload", e[e.Exit = 10] = "Exit"
        }(w = e.TaskStopReason || (e.TaskStopReason = {})), function (e) {
            e[e.RESOURCE_FROM_MEMBER = 1] = "RESOURCE_FROM_MEMBER", e[e.RESOURCE_FROM_OFFLINE = 2] = "RESOURCE_FROM_OFFLINE", e[e.RESOURCE_FROM_CRYSTAL_LARGE = 4] = "RESOURCE_FROM_CRYSTAL_LARGE", e[e.RESOURCE_FROM_CRYSTAL_SMALL = 8] = "RESOURCE_FROM_CRYSTAL_SMALL", e[e.RESOURCE_FROM_DCDN = 16] = "RESOURCE_FROM_DCDN", e[e.RESOURCE_FROM_FREEDCDN = 32] = "RESOURCE_FROM_FREEDCDN"
        }(k = e.XLResourceFrom || (e.XLResourceFrom = {})), function (e) {
            e[e.XL_TASKDOWNLOAD_STRATEGY_NORMALDOWNLOAD = 0] = "XL_TASKDOWNLOAD_STRATEGY_NORMALDOWNLOAD", e[e.XL_TASKDOWNLOAD_STRATEGY_DOWNLOADINGPLAYING = 1] = "XL_TASKDOWNLOAD_STRATEGY_DOWNLOADINGPLAYING", e[e.XL_TASKDOWNLOAD_STRATEGY_ONLINEPLAYING = 2] = "XL_TASKDOWNLOAD_STRATEGY_ONLINEPLAYING"
        }(C = e.XLDownloadStrategy || (e.XLDownloadStrategy = {}))
    }(t.DownloadKernel || (t.DownloadKernel = {}))
}, function (e, t) {
    e.exports = require("util")
}, function (e, t, i) {
    e.exports = i(65)(213)
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
        return require(e)
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(41), a = i(2), r = i(5), s = i(606), l = r.promisify,
        d = i(0).default.getLogger("Thunder.base.fs-utilities");
    !function (e) {
        function t(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                if (void 0 !== e) {
                    const i = l(o.access);
                    try {
                        yield i(e), t = !0
                    } catch (e) {
                        d.information(e)
                    }
                }
                return t
            })
        }

        function r(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                if (void 0 !== e) {
                    const i = l(o.mkdir);
                    try {
                        yield i(e), t = !0
                    } catch (e) {
                        d.warning(e)
                    }
                }
                return t
            })
        }

        function u(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                if (void 0 !== e) {
                    const i = l(o.rmdir);
                    try {
                        yield i(e), t = !0
                    } catch (e) {
                        d.warning(e)
                    }
                }
                return t
            })
        }

        function c(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                if (void 0 !== e) {
                    const i = l(o.unlink);
                    try {
                        yield i(e), t = !0
                    } catch (e) {
                        d.warning(e)
                    }
                }
                return t
            })
        }

        function h(e) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                if (void 0 !== e) {
                    const i = l(o.readdir);
                    try {
                        t = yield i(e)
                    } catch (e) {
                        d.warning(e)
                    }
                }
                return t
            })
        }

        function f(e) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                if (void 0 !== e) {
                    const i = l(o.lstat);
                    try {
                        t = yield i(e)
                    } catch (e) {
                        d.warning(e)
                    }
                }
                return t
            })
        }

        function p(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                if (void 0 !== e && void 0 !== t) {
                    let n = a.join(e, t), o = yield f(n);
                    i = null !== o && o.isDirectory() ? yield g(n) : yield c(n)
                }
                return i
            })
        }

        function g(e) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                if (void 0 !== e) {
                    if (yield t(e)) {
                        i = !0;
                        let t = (yield h(e)) || [];
                        for (let n = 0; n < t.length; n++) i = (yield p(e, t[n])) && i;
                        (i || 0 === t.length) && (i = (yield u(e)) && i)
                    }
                }
                return i
            })
        }

        function m(e) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                return d.information("mkdirsAW", e), void 0 !== e && ((yield t(e)) ? i = !0 : a.dirname(e) === e ? i = !1 : (yield m(a.dirname(e))) && (i = yield r(e))), i
            })
        }

        function v(e, i) {
            return n(this, void 0, void 0, function* () {
                let n;
                if (e.toLowerCase() !== i.toLowerCase() && (yield t(e))) {
                    let t = o.createReadStream(e), a = o.createWriteStream(i);
                    n = new Promise(e => {
                        t.pipe(a).on("finish", () => {
                            e(!0)
                        })
                    })
                } else n = new Promise(e => {
                    e(!1)
                });
                return n
            })
        }

        e.readFileAW = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                if (void 0 !== e) {
                    const i = l(o.readFile);
                    try {
                        t = yield i(e)
                    } catch (e) {
                        d.warning(e)
                    }
                }
                return t
            })
        }, e.readLineAw = function (e) {
            return n(this, void 0, void 0, function* () {
                let i = null;
                do {
                    if (!e) break;
                    if (!t(e)) break;
                    i = yield new Promise(t => {
                        let i = [];
                        const n = o.createReadStream(e), a = s.createInterface({input: n});
                        a.on("line", e => {
                            i.push(e)
                        }), a.on("close", () => {
                            t(i)
                        })
                    })
                } while (0);
                return i
            })
        }, e.writeFileAW = function (e, t) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                if (void 0 !== e && null !== t) {
                    const n = l(o.writeFile);
                    try {
                        yield n(e, t), i = !0
                    } catch (e) {
                        d.warning(e)
                    }
                }
                return i
            })
        }, e.existsAW = t, e.dirExistsAW = function (e) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                do {
                    if (!(i = yield t(e))) break;
                    let n = yield f(e);
                    if (!n) break;
                    i = n.isDirectory()
                } while (0);
                return i
            })
        }, e.mkdirAW = r, e.rmdirAW = u, e.unlinkAW = c, e.readdirAW = h, e.lstatAW = f, e.rmdirsAW = g, e.mkdirsAW = m, e.renameAW = function (e, t) {
            return n(this, void 0, void 0, function* () {
                if (void 0 !== e && void 0 !== t) {
                    const i = l(o.rename);
                    try {
                        yield i(e, t)
                    } catch (e) {
                        d.warning(e)
                    }
                }
            })
        }, e.copyFileAW = v, e.copyDirsAW = function e(i, o) {
            return n(this, void 0, void 0, function* () {
                let n = !1, r = yield f(i);
                if (r.isDirectory()) {
                    n = yield m(o);
                    let s = (yield h(i)) || [];
                    for (let l = 0; l < s.length; l++) {
                        let d = a.join(i, s[l]), u = a.join(o, s[l]);
                        (n = yield t(d)) && (n = (r = yield f(d)).isDirectory() ? yield e(d, u) : yield v(d, u))
                    }
                }
                return n
            })
        }, e.mkdtempAW = function () {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                const t = l(o.mkdtemp), n = (yield Promise.resolve().then(() => i(55))).tmpdir();
                try {
                    e = yield t(`${n}${a.sep}`)
                } catch (e) {
                    d.warning(e)
                }
                return e
            })
        }, e.deleteEmptySubDirs = function (e, i) {
            return n(this, void 0, void 0, function* () {
                let n = !0;
                e = a.normalize(e), i = a.normalize(i), e.length > 3 && "\\" === e[e.length - 1] && (e = e.slice(0, e.length - 1)), i.length > 3 && "\\" === i[i.length - 1] && (i = i.slice(0, i.length - 1));
                do {
                    if (0 !== e.indexOf(i)) {
                        n = !1;
                        break
                    }
                    let o = e;
                    for (; o !== i;) {
                        if ((yield t(o)) && !(yield u(o))) {
                            n = !1;
                            break
                        }
                        o = a.dirname(o)
                    }
                } while (0);
                return n
            })
        }, e.getFileSize = function e(i) {
            return n(this, void 0, void 0, function* () {
                let n = 0;
                do {
                    if (!i) break;
                    if (!(yield t(i))) break;
                    let o = yield f(i);
                    if (o) if (o.isDirectory()) {
                        let t = yield h(i);
                        for (let o = 0; o < t.length; o++) n += (yield e(a.join(i, t[o])))
                    } else n = o.size
                } while (0);
                return n
            })
        }, e.isDirectoryEmptyAW = function (e, i = !0) {
            return n(this, void 0, void 0, function* () {
                let n = !0;
                do {
                    if (!e) {
                        n = !1;
                        break
                    }
                    if (!(yield t(e))) {
                        n = i;
                        break
                    }
                    let o = yield f(e);
                    if (!o) {
                        n = !1;
                        break
                    }
                    if (!o.isDirectory()) {
                        n = !1;
                        break
                    }
                    if ((yield h(e)).length > 0) {
                        n = !1;
                        break
                    }
                } while (0);
                return n
            })
        }
    }(t.FileSystemAWNS || (t.FileSystemAWNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(7), r = i(0).default.getLogger("XLStat");
    let s = a.default(o.join(__rootDir, "../bin/ThunderHelper.node"));

    function l(e = "") {
        let t;
        if ("string" == typeof e) t = e; else if (d(e) && "object" == typeof e) {
            let i = [];
            for (let t in e) d(e[t]) && i.push(t + "=" + encodeURIComponent(e[t]));
            t = i.join(",")
        }
        return t
    }

    function d(e) {
        return void 0 !== e && null !== e
    }

    !function (e) {
        let t = null;

        function i() {
            return t || (t = s.xlstat4), t
        }

        function o(e, t = "", o = "", a = 0, s = 0, d = 0, u = 0, c = "", h = 0) {
            return n(this, void 0, void 0, function* () {
                let n = 0;
                do {
                    if (void 0 === e) {
                        n = 1;
                        break
                    }
                    let f = l(c);
                    n = "browser" === process.type ? yield new Promise(r => {
                        n = i().asyncTrackEvent(e, t, o, a, s, d, u, f, h, e => {
                            r(e)
                        })
                    }) : i().trackEvent(e, t, o, a, s, d, u, f, h), r.information(e, t, o, a, s, d, u, f, h)
                } while (0);
                return n
            })
        }

        function a(e, t = 0) {
            do {
                if (void 0 === e) break;
                "browser" !== process.type && i().trackClick(e, t)
            } while (0)
        }

        e.asyncTrackEvent = o, e.trackEvent = function (e, t = "", i = "", n = 0, a = 0, r = 0, s = 0, l = "", d = 0) {
            o(e, t, i, n, a, r, s, l, d).catch()
        }, e.trackEventEx = function (e, t = "", i = "", n = 0) {
            o(e, t, "", 0, 0, 0, 0, i, n).catch()
        }, e.trackClick = a, e.trackShow = function (e, t = 0) {
            a(e, t)
        }, e.setUserID = function (e = 0, t = 0) {
            "browser" !== process.type && i().setUserID(e, t)
        }, e.initParam = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = -1;
                return t = "browser" === process.type ? yield new Promise(t => {
                    i().asyncInitParam(e, (e, i) => {
                        t(e ? i : -1)
                    })
                }) : yield new Promise(t => {
                    i().initParamRemote(e, e => {
                        t(e)
                    })
                })
            })
        }, e.asyncUninit = function (e) {
            return n(this, void 0, void 0, function* () {
                "browser" === process.type && (yield new Promise(t => {
                    i().asyncUninit(e, () => {
                        t()
                    })
                }))
            })
        }, e.uninit = function () {
            "browser" === process.type && i().waitFinish()
        }
    }(t.XLStatNS || (t.XLStatNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(41), a = i(2), r = i(0), s = i(47), l = i(8), d = i(13), u = i(14), c = r.default.getLogger("Config");

    class h {
        constructor() {
            this.isInit = !1, this.configData = {}, this.configPath = void 0, this.configBakPath = void 0, this.eventContainer = new s.default, this.changed = !1, this.timer = null, this.eventContainer.setMaxListeners(0)
        }

        init(e) {
            return n(this, void 0, void 0, function* () {
                if (!this.isInit) {
                    this.configPath = e, this.configBakPath = e + ".bak";
                    let t = null, i = yield l.FileSystemAWNS.existsAW(e);
                    if (i) {
                        let i = yield l.FileSystemAWNS.readFileAW(e);
                        if (i && i.length > 0) try {
                            t = JSON.parse(i.toString())
                        } catch (e) {
                            c.warning(e)
                        }
                    }
                    if (!t && (i = yield l.FileSystemAWNS.existsAW(this.configBakPath))) {
                        let e = yield l.FileSystemAWNS.readFileAW(this.configBakPath);
                        if (e && e.length > 0) try {
                            t = JSON.parse(e.toString())
                        } catch (e) {
                            c.warning(e)
                        }
                    }
                    t && this.mergeConfigData(t), this.isInit = !0, this.eventContainer.fireEvent(d.NodeEventMesssageNS.eventConfigInitFinished)
                }
                this.timer || (this.timer = setInterval(() => {
                    this.changed && (this.changed = !1, this.save().catch())
                }, 5e3))
            })
        }

        getValue(e, t, i) {
            let n = i;
            do {
                if (!e || "" === e) break;
                if (!t || "" === t) break;
                let i = this.configData[e];
                if (!i) break;
                t in i && (n = i[t])
            } while (0);
            return n
        }

        setValue(e, t, i) {
            do {
                if (!e || "" === e) break;
                if (!t || "" === t) break;
                let n = void 0, o = this.configData[e];
                if (o) n = o[t], o[t] = i; else {
                    let n = {};
                    n[t] = i, this.configData[e] = n
                }
                n !== i && (this.changed = !0, this.fireValueChangedEvent(e, t, n, i))
            } while (0)
        }

        removeValue(e, t) {
            do {
                if (!e || "" === e) break;
                if (!t || "" === t) break;
                let i = void 0, n = this.configData[e];
                n && (i = n[t], n[t] = void 0), void 0 !== i && this.fireValueChangedEvent(e, t, i, void 0)
            } while (0)
        }

        isInitConfigFinished() {
            return this.isInit
        }

        getNetDiscVODCachePath() {
            return n(this, void 0, void 0, function* () {
                yield this.ensureConfigFisihed();
                let e = this.getValue("ThunderPanPlugin", "defaultDownloadPath", "");
                if (!e) {
                    let t = this.getValue("ThunderPanPlugin", "downloadPaths", []);
                    t && t.length > 0 && (e = t[0])
                }
                if (e) e = a.join(e, "云盘缓存"); else {
                    let t = yield u.ThunderUtil.getThunderTempPath(!0);
                    e = a.join(t, "云盘下载", "云盘缓存")
                }
                return e
            })
        }

        save() {
            return n(this, void 0, void 0, function* () {
                if (this.isInit) {
                    let e = JSON.stringify(this.configData, void 0, 2);
                    yield l.FileSystemAWNS.writeFileAW(this.configPath, e), yield l.FileSystemAWNS.writeFileAW(this.configBakPath, e)
                }
            })
        }

        saveSync() {
            if (this.isInit) {
                let e = JSON.stringify(this.configData, void 0, 2);
                o.writeFileSync(this.configPath, e), o.writeFileSync(this.configBakPath, e)
            }
        }

        attachListener(e, t) {
            do {
                if (e === d.NodeEventMesssageNS.eventConfigInitFinished) {
                    if (this.isInit) {
                        t(this.isInit);
                        break
                    }
                    this.eventContainer.attachOnceListener(e, t);
                    break
                }
                this.eventContainer.attachListener(e, t)
            } while (0)
        }

        detachListener(e, t) {
            this.eventContainer.detachListener(e, t)
        }

        prependListener(e, t) {
            do {
                if (e === d.NodeEventMesssageNS.eventConfigInitFinished) {
                    if (this.isInit) {
                        t(this.isInit);
                        break
                    }
                    this.eventContainer.prependOnceListener(e, t);
                    break
                }
                this.eventContainer.prependListener(e, t)
            } while (0)
        }

        mergeConfigData(e) {
            if (e) if (null === this.configData) this.configData = e; else for (let t in e) {
                let i = e[t];
                if (!i) break;
                for (let e in i) {
                    let n = i[e], o = this.configData[t];
                    if (o) o[e] = n; else {
                        let i = {};
                        i[e] = n, this.configData[t] = i
                    }
                }
            }
        }

        fireValueChangedEvent(e, t, i, n) {
            this.eventContainer.fireEvent(d.NodeEventMesssageNS.eventConfigValueChanged, e, t, i, n)
        }

        ensureConfigFisihed() {
            return new Promise((e, t) => {
                this.attachListener(d.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    e()
                })
            })
        }
    }

    t.Config = h;
    const f = new h;
    !function (e) {
        e.init = function (e) {
            return n(this, void 0, void 0, function* () {
                yield f.init(e)
            })
        }, e.getNetDiscVODCachePath = function () {
            return n(this, void 0, void 0, function* () {
                return yield f.getNetDiscVODCachePath()
            })
        }, e.isInitConfigFinished = function () {
            return f.isInitConfigFinished()
        }, e.isInitAw = function () {
            return n(this, void 0, void 0, function* () {
                return !!f.isInitConfigFinished() || new Promise(e => {
                    f.attachListener(d.NodeEventMesssageNS.eventConfigInitFinished, () => {
                        e(!0)
                    })
                })
            })
        }, e.save = function () {
            return n(this, void 0, void 0, function* () {
                yield f.save()
            })
        }, e.saveSync = function () {
            f.saveSync()
        }, e.getValue = function (e, t, i) {
            return f.getValue(e, t, i)
        }, e.setValue = function (e, t, i) {
            f.setValue(e, t, i)
        }, e.attachListener = function (e, t) {
            f.attachListener(e, t)
        }, e.prependListener = function (e, t) {
            f.prependListener(e, t)
        }, e.detachListener = function (e, t) {
            f.detachListener(e, t)
        }
    }(t.ConfigNS || (t.ConfigNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(2), r = i(0), s = i(7), l = i(47), d = i(8), u = i(13), c = i(42), h = i(4), f = i(32),
        p = i(607), g = i(16), m = i(44), v = i(26), y = i(35), T = i(3), w = i(5), k = i(51), C = i(22), b = i(38),
        I = i(43), S = i(102), _ = g.DownloadKernelEventManager.getEventManager(),
        D = m.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        A = v.DownloadKernelCategoryManager.getCategoryManager(), N = r.default.getLogger("DownloadKernel.TaskManager"),
        x = s.default(a.join(__rootDir, "../bin/ThunderHelper.node"));

    class E {
        constructor() {
            this.isLoadStorageFinish = !1, this.isInitingDk = !1, this.isInitDkFinish = !1, this.isEnableP2pChannel = !0, this.isEnableP2sChannel = !0, this.lastGlobalStat = {
                size: 0,
                recvdBytes: 0,
                sentBytes: 0,
                dhtNodeCount: 0,
                isUPnPReady: 0
            }, this.totalDownloadSpeed = 0, this.totalUploadSpeed = 0, this.eventContainer = new l.default, this.sdkCrash = !1, this.backgroundTasks = [], this.tasks = new Map, this.startTasks = []
        }

        getStartTaskIDs() {
            return this.startTasks
        }

        createTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = !0, n = !1, o = new p.Task, r = t.categoryId;
                if (t.privateSpace) {
                    let e = A.getCurrentPrivateCategory();
                    e && (r = e.getId())
                }
                switch (e) {
                    case h.DownloadKernel.TaskType.P2sp: {
                        let i = (yield this.getTaskName(e, t.taskBaseInfo.savePath, t.taskBaseInfo.taskName, 0, t.taskBaseInfo.origin)).newName;
                        t.taskBaseInfo.taskName = i;
                        let a = o.createP2spTask(t.isBackground, t.taskBaseInfo, t.p2spTaskInfo, r);
                        t.taskBaseInfo.groupTaskId && t.taskBaseInfo.groupTaskId > 0 && (n = !0), t.isBackground && this.backgroundTasks.push(a)
                    }
                        break;
                    case h.DownloadKernel.TaskType.Bt:
                        yield o.createBtTask(t.isBackground, t.taskBaseInfo, t.btTaskInfo, r);
                        break;
                    case h.DownloadKernel.TaskType.Emule: {
                        let i = (yield this.getTaskName(e, t.taskBaseInfo.savePath, t.taskBaseInfo.taskName, 0, t.taskBaseInfo.origin)).newName;
                        t.taskBaseInfo.taskName = i, o.createEmuleTask(t.isBackground, t.taskBaseInfo, t.emuleTaskInfo, r), t.taskBaseInfo.groupTaskId && t.taskBaseInfo.groupTaskId > 0 && (n = !0)
                    }
                        break;
                    case h.DownloadKernel.TaskType.Group: {
                        let i = a.dirname(t.taskBaseInfo.savePath),
                            n = (yield this.getTaskName(e, i, t.taskBaseInfo.taskName, 0, t.taskBaseInfo.origin)).newName,
                            s = t.taskBaseInfo.savePath;
                        if (n !== t.taskBaseInfo.taskName) {
                            t.taskBaseInfo.taskName = n, t.taskBaseInfo.savePath = a.join(i, n);
                            let e = t.taskBaseInfo.savePath;
                            for (let i = 0; i < t.groupTaskInfo.subTaskList.length; ++i) if (t.groupTaskInfo.subTaskList[i].p2spTaskInfo || t.groupTaskInfo.subTaskList[i].emuleTaskInfo) {
                                let n = t.groupTaskInfo.subTaskList[i].taskBaseInfo.savePath;
                                t.groupTaskInfo.subTaskList[i].taskBaseInfo.savePath = e + n.substr(s.length)
                            }
                        }
                        yield this.createGroupTask(o, t.taskBaseInfo, t.groupTaskInfo, r)
                    }
                        break;
                    case h.DownloadKernel.TaskType.Magnet:
                        o.createMagnetTask(t.isBackground, t.taskBaseInfo, t.magnetTaskInfo, r);
                        break;
                    default:
                        i = !1
                }
                return i ? (this.addTask(o, t), t.isBackground || n || this.insertToCategoryView(o, h.DownloadKernel.TaskInsertReason.Create), _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskCreated, [o])) : o = null, o
            })
        }

        createBatchTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = f.ThunderKernel.beginTransaction(), n = void 0, o = void 0;
                if (t) {
                    n = t.getId();
                    let e = t.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath);
                    e && (o = e.length + 1)
                }
                let r = new Map, s = void 0, l = [];
                for (let i = 0; i < e.length; ++i) {
                    let d = !0, u = new p.Task, c = e[i];
                    c.taskBaseInfo.groupTaskId = n;
                    let f = c.taskType, g = a.join(c.taskBaseInfo.savePath, c.taskBaseInfo.taskName);
                    this.setGroupTaskRelativePath(u, c.taskBaseInfo.savePath, o);
                    let m = r.get(g);
                    if (w.isNumber(m) || (m = 0), void 0 === s && (s = c.categoryId, c.privateSpace)) {
                        let e = A.getCurrentPrivateCategory();
                        e && (s = e.getId())
                    }
                    let v = yield this.getTaskName(f, c.taskBaseInfo.savePath, c.taskBaseInfo.taskName, m, c.taskBaseInfo.origin);
                    r.set(g, v.index + 1), c.taskBaseInfo.taskName = v.newName, f === h.DownloadKernel.TaskType.P2sp ? u.createP2spTask(c.isBackground, c.taskBaseInfo, c.p2spTaskInfo, s) : f === h.DownloadKernel.TaskType.Emule ? u.createEmuleTask(c.isBackground, c.taskBaseInfo, c.emuleTaskInfo, s) : d = !1, d ? (t && t.getExtraObject().addSubTask(u), this.addTask(u, c), c.isBackground || l.push(u)) : u = null
                }
                if (f.ThunderKernel.commitTransaction(i), !t) {
                    let e = null;
                    (e = void 0 !== s && s > -1 ? A.getCategoryView(s, h.DownloadKernel.CategroyViewID.Downloading) : D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading)) && e.insertTask(l, h.DownloadKernel.TaskInsertReason.Create), _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskCreated, l)
                }
                return l
            })
        }

        startTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = this.tasks.get(e), o = !1;
                if (i) {
                    if (this.sdkCrash) return i.setStatusAndErrorCode(h.DownloadKernel.TaskStatus.Failed, h.DownloadKernel.TaskError.DownloadSDKCrash), _.fireTaskEvent(h.DownloadKernel.TaskEventType.StatusChanged, [i]), o;
                    this.startTasks.push(e), this.isInitDkFinish ? (o = yield i.start(t)) ? this.taskStatusChanage([i]) : (N.warning("task start fail! taskId", e), this.removeStartTask(e)) : (o = i.updateTaskStatus(h.DownloadKernel.TaskStatus.StartPending)) && (this.taskStatusChanage([i]), this.downloadSdkInited().then(() => n(this, void 0, void 0, function* () {
                        (o = yield i.start(!0)) ? this.taskStatusChanage([i]) : (N.warning("task start fail! taskId", e), this.removeStartTask(e))
                    })).catch())
                } else N.warning("task not exist! taskId", e);
                return o
            })
        }

        startWaitingTask(e) {
            let t = !1, i = this.tasks.get(e);
            return i && i.startWaiting() && (this.taskStatusChanage([i]), t = !0), t
        }

        startWaitingTasks(e) {
            let t = !1, i = f.ThunderKernel.beginTransaction(), n = [];
            for (let i of e) {
                let e = this.tasks.get(i);
                e && e.startWaiting() && (n.push(e), t = !0)
            }
            return f.ThunderKernel.commitTransaction(i), n.length > 0 && _.fireTaskEvent(h.DownloadKernel.TaskEventType.StatusChanged, n), t
        }

        stopTask(e, t) {
            let i = this.tasks.get(e);
            i ? i.stop(t) ? (this.taskStatusChanage([i]), i.getTaskStatus() === h.DownloadKernel.TaskStatus.Stopped && i.setStopReason(h.DownloadKernel.TaskStopReason.Unknown)) : N.warning("task stop fail! taskId", e) : N.warning("task not exist! taskId", e)
        }

        batchStopTask(e, t) {
            let i = [], n = [];
            for (let t = 0; t < e.length; ++t) {
                let o = this.tasks.get(e[t]);
                if (o) {
                    o.getTaskStatus() === h.DownloadKernel.TaskStatus.StartWaiting ? i.push(o) : n.push(o)
                }
            }
            let o = [];
            for (let e = 0; e < i.length; ++e) {
                let n = i[e];
                n.stop(t) && o.push(n)
            }
            for (let e = 0; e < n.length; ++e) {
                let i = n[e];
                i.stop(t) && o.push(i)
            }
            o.length > 0 && this.taskStatusChanage(o);
            for (let e = 0; e < o.length; ++e) {
                let t = o[e];
                t.getTaskStatus() === h.DownloadKernel.TaskStatus.Stopped && t.setStopReason(h.DownloadKernel.TaskStopReason.Unknown)
            }
        }

        stopTaskAW(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = this.tasks.get(e);
                return i ? i.stop(t) ? (this.taskStatusChanage([i]), i.getTaskStatus() === h.DownloadKernel.TaskStatus.Stopped && i.setStopReason(h.DownloadKernel.TaskStopReason.Unknown)) : N.warning("task stop fail! taskId", e) : N.warning("task not exist! taskId", e), this.attachTaskStopOnce(e)
            })
        }

        deleteTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = this.tasks.get(e);
                if (!i) return !1;
                let n = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryViewId);
                n !== h.DownloadKernel.CategroyViewID.Downloading && n !== h.DownloadKernel.CategroyViewID.Unkown || (yield this.stopTaskAW(e, h.DownloadKernel.TaskStopReason.DeleteTask)), _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskDestroying, [i], t), i.updateTaskStatus(h.DownloadKernel.TaskStatus.DestroyPending) && this.taskStatusChanage([i]);
                let o = this.getTaskCategoryView(i), a = [i];
                null !== o && o.removeTask(a), this.removeTask(e);
                let r = f.ThunderKernel.beginTransaction();
                i.deleteStorageTask(), f.ThunderKernel.commitTransaction(r);
                let s = !0;
                return t && (s = (yield i.deleteFile()) && s), _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskDestroyed, [i], s), s
            })
        }

        deleteBatchTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = [], o = [];
                for (let t = 0; t < e.length; ++t) {
                    let n = this.tasks.get(e[t]);
                    if (!n) {
                        N.warning("deleteBatchTask task", n);
                        continue
                    }
                    let a = n.getTaskStatus();
                    a === h.DownloadKernel.TaskStatus.StartPending || a === h.DownloadKernel.TaskStatus.Started ? o.push(n) : i.push(n), S.ThunderPanTaskNS.deleteTask(null, null, n.getId())
                }
                let a = !0, r = {};
                if (i.length > 0) {
                    _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskDestroying, i, t);
                    let e = [];
                    for (let t = 0; t < i.length; ++t) {
                        let n = i[t], o = n.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryId);
                        r[o] || (r[o] = []), r[o].push(n), n.updateTaskStatus(h.DownloadKernel.TaskStatus.DestroyPending) && e.push(n)
                    }
                    e.length > 0 && _.fireTaskEvent(h.DownloadKernel.TaskEventType.StatusChanged, e);
                    for (let e in r) {
                        if (!r[e]) continue;
                        let t = this.getTaskCategoryView(r[e][0]);
                        null !== t && t.removeTask(i)
                    }
                    let n = f.ThunderKernel.beginTransaction();
                    for (let e = 0; e < i.length; ++e) {
                        let t = i[e];
                        this.removeTask(t.getId()), t.deleteStorageTask()
                    }
                    if (f.ThunderKernel.commitTransaction(n), t) for (let e = 0; e < i.length; ++e) {
                        let t = i[e];
                        a = (yield t.deleteFile()) && a
                    }
                    _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskDestroyed, i, a)
                }
                return o.length > 0 && (yield new Promise(e => {
                    let i = 0;
                    for (let r = 0; r < o.length; ++r) {
                        let s = o[r], l = s.getId();
                        this.stopTaskAW(l, h.DownloadKernel.TaskStopReason.DeleteTask).then(() => n(this, void 0, void 0, function* () {
                            ++i, _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskDestroying, [s], t), s.updateTaskStatus(h.DownloadKernel.TaskStatus.DestroyPending) && this.taskStatusChanage([s]);
                            let n = this.getTaskCategoryView(s);
                            null !== n && n.removeTask([s]), this.removeTask(l);
                            let r = f.ThunderKernel.beginTransaction();
                            s.deleteStorageTask(), f.ThunderKernel.commitTransaction(r), t && (a = (yield s.deleteFile()) && a), _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskDestroyed, [s], a), i === o.length && e()
                        })).catch()
                    }
                })), a
            })
        }

        removeToRecycle(e) {
            return n(this, void 0, void 0, function* () {
                let t = this.tasks.get(e);
                if (t) {
                    let i = t.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryViewId);
                    if (i === h.DownloadKernel.CategroyViewID.Completed) {
                        let e = [t];
                        D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed).removeTask(e)
                    } else if (yield this.stopTaskAW(e, h.DownloadKernel.TaskStopReason.DeleteTask), (i = t.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryViewId)) === h.DownloadKernel.CategroyViewID.Completed) {
                        let e = [t];
                        D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed).removeTask(e)
                    } else {
                        let i = [t];
                        D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading).removeTask(i), this.removeStartTask(e)
                    }
                    t.moveToRecycle();
                    let n = D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Recycle), o = [];
                    o.push(t), n.insertTask(o, h.DownloadKernel.TaskInsertReason.Recycle)
                }
            })
        }

        batchRemoveToRecycle(e) {
            return n(this, void 0, void 0, function* () {
                let t = [], i = [];
                for (let n = 0; n < e.length; ++n) {
                    let o = this.tasks.get(e[n]), a = o.getTaskStatus();
                    a === h.DownloadKernel.TaskStatus.StartPending || a === h.DownloadKernel.TaskStatus.Started ? i.push(o) : t.push(o)
                }
                if (t.length > 0) {
                    this.getTaskCategoryView(t[0]).removeTask(t);
                    let e = void 0;
                    t.length > 1 && (e = f.ThunderKernel.beginTransaction()), t.forEach(e => {
                        e.moveToRecycle()
                    }), void 0 !== e && f.ThunderKernel.commitTransaction(e), D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Recycle).insertTask(t, h.DownloadKernel.TaskInsertReason.Recycle)
                }
                i.length > 0 && i.forEach(e => n(this, void 0, void 0, function* () {
                    let t = e.getId();
                    if (yield this.stopTaskAW(t, h.DownloadKernel.TaskStopReason.DeleteTask), e.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryViewId) === h.DownloadKernel.CategroyViewID.Completed) {
                        let t = D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed), i = [e];
                        t.removeTask(i)
                    } else {
                        D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading).removeTask([e]), this.removeStartTask(t)
                    }
                    e.moveToRecycle(), D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Recycle).insertTask([e], h.DownloadKernel.TaskInsertReason.Recycle)
                }))
            })
        }

        recoverFromRecycle(e) {
            let t = 0, i = this.tasks.get(e);
            if (i && (t = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.RecycleTime)) > 0) {
                if (i.recover()) {
                    let e = D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Recycle), t = [];
                    t.push(i), e.removeTask(t)
                }
                let e = i.getTaskStatus();
                if (e === h.DownloadKernel.TaskStatus.Succeeded || e === h.DownloadKernel.TaskStatus.Seeding) {
                    let e = D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed), t = [];
                    t.push(i), e.insertTask(t, h.DownloadKernel.TaskInsertReason.Recover)
                } else {
                    let e = D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading), t = [];
                    t.push(i), e.insertTask(t, h.DownloadKernel.TaskInsertReason.Recover)
                }
            }
            return t > 0
        }

        batchRecoverFromRecycle(e) {
            let t = [], i = [], n = [], o = f.ThunderKernel.beginTransaction();
            for (let o of e) {
                let e = this.tasks.get(o);
                if (e) {
                    if (e.getTaskAttribute(h.DownloadKernel.TaskAttribute.RecycleTime) > 0) {
                        e.recover() && t.push(e);
                        let o = e.getTaskStatus();
                        o === h.DownloadKernel.TaskStatus.Succeeded || o === h.DownloadKernel.TaskStatus.Seeding ? i.push(e) : n.push(e)
                    }
                }
            }
            if (f.ThunderKernel.commitTransaction(o), t.length > 0) {
                D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Recycle).removeTask(t)
            }
            if (i.length > 0) {
                D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed).insertTask(i, h.DownloadKernel.TaskInsertReason.Recover)
            }
            if (n.length > 0) {
                D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading).insertTask(n, h.DownloadKernel.TaskInsertReason.Recover)
            }
        }

        reDownloadTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = null;
                do {
                    let n = this.tasks.get(e);
                    if (!n) break;
                    yield this.deleteTask(e, !0);
                    let o = n.getExtraObject().getAllUserData(),
                        a = n.getTaskAttribute(h.DownloadKernel.TaskAttribute.FileSize);
                    switch (a > 0 && (t.taskBaseInfo.fileSize = a), n.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType)) {
                        case h.DownloadKernel.TaskType.P2sp:
                            i = yield this.redownloadP2spTask(n, t);
                            break;
                        case h.DownloadKernel.TaskType.Bt:
                            i = yield this.redownloadBtTask(n, t);
                            break;
                        case h.DownloadKernel.TaskType.Emule:
                            i = yield this.redownloadEmuleTask(n, t);
                            break;
                        case h.DownloadKernel.TaskType.Group:
                            i = yield this.redownloadGroupTask(n, t)
                    }
                    if (i) {
                        i.getExtraObject().setAllUserData(o)
                    }
                } while (0);
                return i
            })
        }

        moveTaskToPath(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = !1, n = this.getTaskFromTaskId(e);
                do {
                    if (!n) break;
                    let o = n.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath);
                    if (!t || "" === t || t === o) break;
                    let a = n.getTaskStatus();
                    a === h.DownloadKernel.TaskStatus.Started || a === h.DownloadKernel.TaskStatus.StartPending || a === h.DownloadKernel.TaskStatus.StartWaiting ? (i = yield this.stopTaskAW(e, h.DownloadKernel.TaskStopReason.MoveTask), i = (a = n.getTaskStatus()) === h.DownloadKernel.TaskStatus.Succeeded || a === h.DownloadKernel.TaskStatus.Seeding ? yield this.moveTask(e, t) : yield this.moveTask(e, t, !0)) : i = yield this.moveTask(e, t)
                } while (0);
                let o = [];
                return o[0] = i ? n : null, _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskMovedEnd, o), i
            })
        }

        moveCategoryTask(e, t) {
            let i = !1, n = this.getTaskFromTaskId(e);
            do {
                if (!n) break;
                let e = n.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryId);
                if (void 0 === t || e === t) break;
                let o = n.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryViewId), a = null;
                if (!(a = -1 === e ? D.getCategoryViewFromId(o) : A.getCategoryView(e, o))) break;
                let r = null;
                if (!(r = -1 === t ? D.getCategoryViewFromId(o) : A.getCategoryView(t, o))) break;
                let s = [];
                if (s.push(n), a.removeTask(s), n.setCategoryId(t), n.getType() === h.DownloadKernel.TaskType.Group) {
                    let e = n.getExtraObject(), i = e.getSubTaskCount();
                    for (let n = 0; n < i; ++n) {
                        let i = e.getSubTaskByIndex(n);
                        i && i.setCategoryId(t)
                    }
                }
                r.insertTask(s, h.DownloadKernel.TaskInsertReason.MoveThoughCategory), i = !0
            } while (0);
            let o = [];
            return o[0] = i ? n : null, _.fireTaskEvent(h.DownloadKernel.TaskEventType.TaskCategoryMovedEnd, o), i
        }

        getTaskCount() {
            return this.tasks.size
        }

        getTaskFromTaskId(e) {
            return this.tasks.get(e)
        }

        batchFindP2spTask(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    f.ThunderKernel.batchFindP2spTask(e, i => {
                        let n = [];
                        do {
                            if (N.information("batchFindTaskAsync batchFindBtTask urls:", e, ",results:", i), !i || i.length <= 0) break;
                            for (let e = 0; e < i.length; ++e) {
                                let t = i[e], o = this.tasks.get(t.taskId);
                                o && !this.isOtherPrivateSpaceTask(o) && n.push(o)
                            }
                        } while (0);
                        t(n)
                    }) || t(null)
                })
            })
        }

        batchFindEmuleTask(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    f.ThunderKernel.batchFindEmuleTask(e, i => {
                        let n = [];
                        do {
                            if (N.information("batchFindTaskAsync batchFindEmuleTask fileHashs:", e, ",results:", i), !i || i.length <= 0) break;
                            for (let e = 0; e < i.length; ++e) {
                                let t = i[e], o = this.tasks.get(t.taskId);
                                o && !this.isOtherPrivateSpaceTask(o) && n.push(o)
                            }
                        } while (0);
                        t(n)
                    }) || t(null)
                })
            })
        }

        batchFindBtTask(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    f.ThunderKernel.batchFindBtTask(e, i => {
                        let n = [];
                        do {
                            if (N.information("batchFindTaskAsync batchFindBtTask infoIds:", e, ",results:", i), !i || i.length <= 0) break;
                            for (let e = 0; e < i.length; ++e) {
                                let t = i[e], o = this.tasks.get(t.taskId);
                                o && !this.isOtherPrivateSpaceTask(o) && n.push(o)
                            }
                        } while (0);
                        t(n)
                    }) || t(null)
                })
            })
        }

        batchFindMagnetTask(e) {
            let t = [];
            do {
                let i = [];
                for (let t = 0; t < e.length; ++t) {
                    let n = e[t];
                    c.Common.isThunderPrivateUrl(n) && (n = c.Common.parseThunderPrivateUrl(n));
                    try {
                        n = decodeURI(n)
                    } catch (e) {
                        N.warning(e)
                    }
                    n && i.push(this.splitLastChar(n).toLowerCase())
                }
                if (i.length <= 0) break;
                for (let e = 0; e < i.length; ++e) {
                    let n = i[e];
                    for (let [, e]of this.tasks) if (!this.isOtherPrivateSpaceTask(e)) {
                        if (e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType) === h.DownloadKernel.TaskType.Magnet) {
                            let i = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskUrl);
                            c.Common.isThunderPrivateUrl(i) && (i = c.Common.parseThunderPrivateUrl(i));
                            try {
                                i = decodeURI(i)
                            } catch (e) {
                                N.warning(e)
                            }
                            if (i && n === this.splitLastChar(i).toLowerCase()) {
                                t.push(e);
                                break
                            }
                        }
                    }
                }
            } while (0);
            return t
        }

        batchFindGroupTask(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    f.ThunderKernel.batchFindGroupTask(e, i => {
                        let n = [];
                        do {
                            if (N.information("batchFindTaskAsync batchFindGroupTask taskNames:", e, ",results:", i), !i || i.length <= 0) break;
                            for (let e = 0; e < i.length; ++e) {
                                let t = i[e], o = this.tasks.get(t.taskId);
                                o && !this.isOtherPrivateSpaceTask(o) && n.push(o)
                            }
                        } while (0);
                        t(n)
                    }) || t(null)
                })
            })
        }

        batchFindTaskAsync(e) {
            return n(this, void 0, void 0, function* () {
                let t = [], i = [], n = [], o = [], a = [];
                for (let r = 0; r < e.length; ++r) {
                    let s = e[r], l = s.keyValue;
                    void 0 !== l && (s.keyType === h.DownloadKernel.KeyType.P2spUrl ? t.push(l) : s.keyType === h.DownloadKernel.KeyType.EmuleFileHash ? i.push(l) : s.keyType === h.DownloadKernel.KeyType.BtInfoId ? n.push(l) : s.keyType === h.DownloadKernel.KeyType.MagnetUrl ? o.push(l) : s.keyType === h.DownloadKernel.KeyType.GroupTaskName && a.push(l))
                }
                let r = [];
                if (t.length <= 0 && i.length <= 0 && n.length <= 0 && o.length <= 0 && a.length <= 0) return r;
                if (t.length > 0) {
                    let e = yield this.batchFindP2spTask(t);
                    e && e.length > 0 && (r = r.concat(e))
                }
                if (i.length > 0) {
                    let e = yield this.batchFindEmuleTask(i);
                    e && e.length > 0 && (r = r.concat(e))
                }
                if (n.length > 0) {
                    let e = yield this.batchFindBtTask(n);
                    e && e.length > 0 && (r = r.concat(e))
                }
                if (o.length > 0) {
                    let e = this.batchFindMagnetTask(o);
                    e && e.length > 0 && (r = r.concat(e))
                }
                if (a.length > 0) {
                    let e = yield this.batchFindGroupTask(a);
                    e && e.length > 0 && (r = r.concat(e))
                }
                return N.information("batchFindTaskAsync keyInfos:", e, ", ret:", r), r
            })
        }

        isLoadStorageTaskFinish() {
            return this.isLoadStorageFinish
        }

        getTotalDownloadSpeed() {
            return this.totalDownloadSpeed
        }

        getTotalUploadSpeed() {
            return this.totalUploadSpeed
        }

        getTotalDownloadSize() {
            let e = 0;
            return this.lastGlobalStat && this.lastGlobalStat.recvdBytes && (e = this.lastGlobalStat.recvdBytes), e < 0 && (e = 0), e
        }

        getTotalUploadSize() {
            let e = 0;
            return this.lastGlobalStat && this.lastGlobalStat.sentBytes && (e = this.lastGlobalStat.sentBytes), e < 0 && (e = 0), e
        }

        attachListener(e, t) {
            do {
                if (e === u.NodeEventMesssageNS.eventTaskDataBaseLoadEnd) {
                    if (this.isLoadStorageFinish) {
                        t(this.isLoadStorageFinish);
                        break
                    }
                    this.attachOnceListener(e, t);
                    break
                }
                if (e === u.NodeEventMesssageNS.eventDownloadKernelInitEnd) {
                    if (this.isInitDkFinish) {
                        t(this.isInitDkFinish);
                        break
                    }
                    this.attachOnceListener(e, t);
                    break
                }
                this.eventContainer.attachListener(e, t)
            } while (0)
        }

        attachOnceListener(e, t) {
            this.eventContainer.attachOnceListener(e, t)
        }

        detachListener(e, t) {
            this.eventContainer.detachListener(e, t)
        }

        queryTaskInfo() {
            let e = 0, t = this.startTasks.length, i = void 0;
            t > 0 && (i = f.ThunderKernel.beginTransaction());
            for (let n = 0; n < this.startTasks.length; ++n) {
                let o = this.startTasks[n], a = this.tasks.get(o), r = !1;
                a && (r = a.queryTaskInfo(e => {
                    this.taskStatusChanage([e])
                }, (e, t) => {
                    this.taskDetailChanage([e], t)
                }, () => {
                    ++e === t && f.ThunderKernel.commitTransaction(i)
                })), r || ++e === t && f.ThunderKernel.commitTransaction(i)
            }
            f.ThunderKernel.queryGlobalInfo(0, e => {
                if (this.lastGlobalStat && e) {
                    if (void 0 !== this.lastGlobalStat.recvdBytes && void 0 !== e.recvdBytes) {
                        let t = e.recvdBytes - this.lastGlobalStat.recvdBytes;
                        t < 0 && (t = 0), this.totalDownloadSpeed !== t && (this.eventContainer.fireEvent(u.NodeEventMesssageNS.eventGlobalDownloadSpeedChanged, t), this.totalDownloadSpeed = t)
                    } else this.totalDownloadSpeed = 0;
                    if (void 0 !== this.lastGlobalStat.sentBytes && void 0 !== e.sentBytes) {
                        let t = e.sentBytes - this.lastGlobalStat.sentBytes;
                        t < 0 && (t = 0), this.totalUploadSpeed !== t && (this.eventContainer.fireEvent(u.NodeEventMesssageNS.eventGlobalUploadSpeedChanged, t), this.totalUploadSpeed = t)
                    } else this.totalUploadSpeed = 0;
                    e && (this.lastGlobalStat = e)
                }
            })
        }

        loadTaskBase() {
            f.ThunderKernel.loadTaskBase(e => {
                this.loadTaskBaseCallback(e).catch()
            })
        }

        setGlobalExtInfo(e) {
            return n(this, void 0, void 0, function* () {
                const {LoginHelperNS: t} = yield Promise.resolve().then(() => i(23));
                if (yield t.loginHelper.isLoginedAw()) t.loginHelper.getAllUserInfo(t => {
                    let i = "0", n = "", o = 0, a = "";
                    do {
                        if (!t) break;
                        if (a = t.userID, N.information(`stat dk userId ${t.userID}`, t), !t.vipList) break;
                        if (!t.vipList[0]) break;
                        if (N.information(`stat dk isVip ${t.vipList[0].isVip}`), "0" === (i = "1" === String(t.vipList[0].isVip) ? "1" : "0")) break;
                        N.information(`stat dk vasType ${t.vipList[0].vasType}, vipLevel ${t.vipList[0].vipLevel}`);
                        let e = {2: "normal", 3: "platinum", 5: "super"};
                        t.vipList[0].vasType && e.hasOwnProperty(String(t.vipList[0].vasType)) && (n = e[String(t.vipList[0].vasType)]), t.vipList[0].vipLevel && !isNaN(Number(t.vipList[0].vipLevel)) && (o = t.vipList[0].vipLevel)
                    } while (0);
                    f.ThunderKernel.setUserInfo(a, "");
                    let r = `isvip=${i},viptype=${n},viplevel=${o},userchannel=${e}`;
                    N.information("stat dk extinfo", r), f.ThunderKernel.setGlobalExtInfo(r, !1)
                }); else {
                    f.ThunderKernel.setUserInfo("", "");
                    let t = `isvip=0,viptype=,viplevel=0,userchannel=${e}`;
                    N.information("stat dk extinfo", t), f.ThunderKernel.setGlobalExtInfo(t, !1)
                }
            })
        }

        isDkLoaded() {
            return this.isInitDkFinish
        }

        initDownloadKernelStart() {
            this.isInitingDk = !0
        }

        initDownloadKernelEnd(e) {
            this.isInitingDk = !1, this.isInitDkFinish = 0 === e, this.eventContainer.fireEvent(u.NodeEventMesssageNS.eventDownloadKernelInitEnd, e)
        }

        downloadSDKCrashRecover(e) {
            this.eventContainer.fireEvent(u.NodeEventMesssageNS.eventDownloadSDKRecover, e);
            for (let e = 0; e < this.startTasks.length; ++e) {
                let t = this.startTasks[e], i = this.tasks.get(t);
                i && i.createDownloadSdkTask().catch()
            }
        }

        downloadSDKCrash() {
            if (this.sdkCrash = !0, this.startTasks.length > 0) {
                let e = [];
                for (let t = 0; t < this.startTasks.length; ++t) {
                    let i = this.tasks.get(this.startTasks[t]);
                    i && (i.setStatusAndErrorCode(h.DownloadKernel.TaskStatus.Failed, h.DownloadKernel.TaskError.DownloadSDKCrash), e.push(i))
                }
                this.startTasks = [], _.fireTaskEvent(h.DownloadKernel.TaskEventType.StatusChanged, e)
            }
            this.notifySDKCrash()
        }

        enableCommonP2pChannel(e) {
            this.isEnableP2pChannel = e
        }

        enableCommonP2sChannel(e) {
            this.isEnableP2sChannel = e
        }

        getTotalTaskDownloadSpeed(e, t) {
            let i = 0;
            for (let n = 0; n < this.startTasks.length; ++n) {
                let o = this.startTasks[n], a = this.getTaskFromTaskId(o);
                if (!a) continue;
                if (void 0 !== t && null !== t || (t = !0), !t && a.getIsPrivate()) continue;
                if (a.getTaskStatus() !== h.DownloadKernel.TaskStatus.Started) continue;
                let r = a.getDownloadSpeed();
                a.getTaskAttribute(h.DownloadKernel.TaskAttribute.Background) ? e && (i += r) : i += r
            }
            return i
        }

        getTotalTaskVipSpeed(e, t) {
            let i = 0;
            for (let n = 0; n < this.startTasks.length; ++n) {
                let o = this.startTasks[n], a = this.getTaskFromTaskId(o);
                if (!a) continue;
                if (void 0 !== t && null !== t || (t = !0), !t && a.getIsPrivate()) continue;
                if (a.getTaskStatus() !== h.DownloadKernel.TaskStatus.Started) continue;
                let r = a.getVipSpeed();
                a.getTaskAttribute(h.DownloadKernel.TaskAttribute.Background) ? e && (i += r) : i += r
            }
            return i
        }

        attachTaskStopOnce(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    let i = this.tasks.get(e);
                    if (i) {
                        let n = i.getTaskStatus();
                        if (n === h.DownloadKernel.TaskStatus.Succeeded || n === h.DownloadKernel.TaskStatus.Seeding || n === h.DownloadKernel.TaskStatus.Stopped || n === h.DownloadKernel.TaskStatus.Failed) t(!0); else {
                            let i = 0;
                            i = _.attachTaskEvent(h.DownloadKernel.TaskEventType.StatusChanged, (...n) => {
                                do {
                                    if (!n) break;
                                    if (n[0] !== h.DownloadKernel.TaskEventType.StatusChanged) break;
                                    let o = n[1];
                                    if (!o) break;
                                    for (let n = 0; n < o.length; ++n) {
                                        let a = o[n];
                                        if (!a) continue;
                                        let r = a.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskId);
                                        if (e !== r) continue;
                                        let s = a.getTaskStatus();
                                        s !== h.DownloadKernel.TaskStatus.Succeeded && s !== h.DownloadKernel.TaskStatus.Seeding && s !== h.DownloadKernel.TaskStatus.Stopped || (_.detachTaskEvent(h.DownloadKernel.TaskEventType.StatusChanged, i), t(!0));
                                        break
                                    }
                                } while (0)
                            })
                        }
                    } else t(!1)
                })
            })
        }

        downloadTaskSelectFiles(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                do {
                    if (!t) break;
                    let n = null;
                    try {
                        n = JSON.parse(t)
                    } catch (e) {
                        N.warning(e)
                    }
                    if (null == n) break;
                    let o = this.tasks.get(e);
                    if (!o) break;
                    let a = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType);
                    if (a !== h.DownloadKernel.TaskType.Bt && a !== h.DownloadKernel.TaskType.Group) break;
                    o.getTaskAttribute(h.DownloadKernel.TaskAttribute.RecycleTime) > 0 && this.recoverFromRecycle(e);
                    let r = o.getTaskStatus();
                    if (r !== h.DownloadKernel.TaskStatus.Started && r !== h.DownloadKernel.TaskStatus.StartPending || (yield this.stopTaskAW(e, h.DownloadKernel.TaskStopReason.SelectDownloadLists), r = o.getTaskStatus()), a === h.DownloadKernel.TaskType.Bt) {
                        o.getExtraObject().setDownloadFile(n)
                    } else if (a === h.DownloadKernel.TaskType.Group) {
                        o.getExtraObject().setDownloadTask(n)
                    }
                    if (r === h.DownloadKernel.TaskStatus.StartWaiting) {
                        if (this.taskStatusChanage([o]), a === h.DownloadKernel.TaskType.Group) {
                            o.getExtraObject().updateTaskDetail()
                        } else if (a === h.DownloadKernel.TaskType.Bt) {
                            let t = o.getExtraObject(), i = t.getFileSize();
                            o.internalSetFileSize(i) && this.taskDetailChanage([o], h.DownloadKernel.TaskDetailChangedFlags.FileSize);
                            let n = [], a = t.getBtFileList();
                            for (let [, e]of a) {
                                let t = e.getBtDownloadFileInfo();
                                n.push(t)
                            }
                            _.fireTaskEvent(h.DownloadKernel.TaskEventType.BtSubFileDetailChanged, e, n)
                        }
                    } else if (r === h.DownloadKernel.TaskStatus.Succeeded || r === h.DownloadKernel.TaskStatus.Seeding) {
                        let e = null, t = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryId);
                        if (e = void 0 !== t && t > -1 ? A.getCategoryView(t, h.DownloadKernel.CategroyViewID.Completed) : D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed)) {
                            let t = [];
                            t.push(o), e.removeTask(t)
                        }
                        let i = null;
                        if (i = void 0 !== t && t > -1 ? A.getCategoryView(t, h.DownloadKernel.CategroyViewID.Downloading) : D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading)) {
                            if (a === h.DownloadKernel.TaskType.Group) {
                                let e = o.getExtraObject(), t = e.getSubTaskCount();
                                for (let i = 0; i < t; ++i) {
                                    let t = e.getSubTaskByIndex(i);
                                    if (t) {
                                        if (1 !== t.getTaskAttribute(h.DownloadKernel.TaskAttribute.DownloadSubTask)) continue;
                                        t.getTaskStatus() === h.DownloadKernel.TaskStatus.Failed && t.updateTaskStatus(h.DownloadKernel.TaskStatus.Stopped)
                                    }
                                }
                            }
                            let e = [];
                            e.push(o), i.insertTask(e, h.DownloadKernel.TaskInsertReason.ReDownload), o.updateTaskStatus(h.DownloadKernel.TaskStatus.Stopped) && (o.setStopReason(h.DownloadKernel.TaskStopReason.SelectDownloadLists), this.taskStatusChanage([o]), o.setStopReason(h.DownloadKernel.TaskStopReason.Unknown))
                        }
                    }
                    i = !0
                } while (0);
                return i
            })
        }

        batchRelateYunTask(e) {
            let t = f.ThunderKernel.beginTransaction();
            for (let t of e) S.ThunderPanTaskNS.insertTask(t.taskId, t.panId, t.user_id, JSON.stringify({
                title: t.path,
                id: t.path_id
            }));
            f.ThunderKernel.commitTransaction(t)
        }

        getTaskCategoryView(e) {
            let t = null, i = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryId),
                n = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryViewId);
            return t = -1 === i ? D.getCategoryViewFromId(n) : A.getCategoryView(i, n)
        }

        loadStorageTask(e) {
            return n(this, void 0, void 0, function* () {
                let t = !0, i = new p.Task;
                if (null !== e) switch (e.taskType) {
                    case h.DownloadKernel.TaskType.P2sp:
                        i.loadStorageP2spTask(e);
                        break;
                    case h.DownloadKernel.TaskType.Bt:
                        i.loadStorageBtTask(e);
                        break;
                    case h.DownloadKernel.TaskType.Emule:
                        i.loadStorageEmuleTask(e);
                        break;
                    case h.DownloadKernel.TaskType.Group:
                        i.loadStorageGroupTask(e);
                        break;
                    default:
                        t = !1
                }
                return t && this.addTask(i) || (i = null), i
            })
        }

        getTaskStrategy(e) {
            let t = h.DownloadKernel.DispatchStrategy.DispatchStrategyOrigin, i = this.tasks.get(e);
            if (i) {
                i.getOriginOnlyStrategy() || (this.isEnableP2pChannel && (t += h.DownloadKernel.DispatchStrategy.DispatchStrategyP2p), this.isEnableP2sChannel && (t += h.DownloadKernel.DispatchStrategy.DispatchStrategyP2s))
            }
            return t
        }

        redownloadP2spTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = null;
                if (e) {
                    let n = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName),
                        o = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath),
                        a = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskUrl),
                        r = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.RefUrl),
                        s = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.Cookie), l = e.getIsPrivate(), d = null;
                    t && t.taskBaseInfo ? ((d = t.taskBaseInfo).taskName && "" !== d.taskName || (d.taskName = n), d.savePath && "" !== d.savePath || (d.savePath = o)) : d = {
                        taskName: n,
                        savePath: o
                    };
                    let u = e.getExtraObject(), c = {
                        url: a,
                        refUrl: r,
                        cookie: s,
                        useOriginResourceOnly: e.getOriginOnlyStrategy() ? 1 : 0,
                        nameFixed: u.getNameFixed()
                    };
                    t && t.p2spTaskInfo && (void 0 !== t.p2spTaskInfo.useOriginResourceOnly ? (N.information("redownload redefine orign", t.p2spTaskInfo.useOriginResourceOnly), c.useOriginResourceOnly = t.p2spTaskInfo.useOriginResourceOnly ? 1 : 0) : N.information("redownload extends origin", c.useOriginResourceOnly)), i = yield this.createTask(h.DownloadKernel.TaskType.P2sp, {
                        taskBaseInfo: d,
                        p2spTaskInfo: c,
                        privateSpace: l
                    })
                }
                return i
            })
        }

        redownloadBtTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = null;
                if (e) {
                    let n = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskUrl),
                        o = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName),
                        a = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath), r = e.getIsPrivate(),
                        s = e.getExtraObject(), l = s.getSeedFilePath(), d = s.getDisplayName(), u = s.getInfoId(),
                        c = s.getTrackerUrls(), f = s.getDownloadFile(), p = s.getBtFileInfoList(), g = null;
                    t && t.taskBaseInfo ? ((g = t.taskBaseInfo).taskName && "" !== g.taskName || (g.taskName = o), g.savePath && "" !== g.savePath || (g.savePath = a)) : g = {
                        taskName: o,
                        savePath: a
                    };
                    let m = {
                        originUrl: n,
                        seedFile: l,
                        displayName: d,
                        fileRealIndexLists: f,
                        fileLists: p,
                        infoId: u,
                        tracker: c
                    };
                    t && t.btTaskInfo && t.btTaskInfo.fileRealIndexLists && t.btTaskInfo.fileRealIndexLists.length > 0 && (m.fileRealIndexLists = t.btTaskInfo.fileRealIndexLists), i = yield this.createTask(h.DownloadKernel.TaskType.Bt, {
                        taskBaseInfo: g,
                        btTaskInfo: m,
                        privateSpace: r
                    })
                }
                return i
            })
        }

        redownloadEmuleTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = null;
                if (e) {
                    let n = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName),
                        o = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath),
                        a = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskUrl), r = e.getIsPrivate(), s = null;
                    t && t.taskBaseInfo ? ((s = t.taskBaseInfo).taskName && "" !== s.taskName || (s.taskName = n), s.savePath && "" !== s.savePath || (s.savePath = o)) : s = {
                        taskName: n,
                        savePath: o
                    };
                    let l = null;
                    t && t.emuleTaskInfo ? (l = t.emuleTaskInfo).url = a : l = {url: a}, i = yield this.createTask(h.DownloadKernel.TaskType.Emule, {
                        taskBaseInfo: s,
                        emuleTaskInfo: l,
                        privateSpace: r
                    })
                }
                return i
            })
        }

        redownloadGroupTask(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = null;
                if (e) {
                    let n = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName),
                        o = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath), a = e.getIsPrivate(),
                        r = e.getExtraObject(), s = r.getSubTaskCount(), l = [];
                    for (let e = 0; e < s; ++e) {
                        let i = r.getSubTaskByIndex(e);
                        if (i) {
                            let n = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName),
                                o = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath),
                                r = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskUrl),
                                s = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.RefUrl),
                                d = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.Cookie),
                                u = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.DownloadSubTask),
                                c = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType),
                                f = {taskBaseInfo: {taskName: n, savePath: o}, privateSpace: a};
                            if (c === h.DownloadKernel.TaskType.P2sp) {
                                let e = i.getExtraObject();
                                f.taskType = c, f.p2spTaskInfo = {
                                    url: r,
                                    refUrl: s,
                                    cookie: d,
                                    downloadSubTask: u,
                                    nameFixed: e.getNameFixed()
                                }, l.push(f)
                            } else c === h.DownloadKernel.TaskType.Emule && (f.taskType = c, f.emuleTaskInfo = {
                                url: r,
                                downloadSubTask: u
                            }, l.push(f));
                            if (t && t.groupTaskInfo && t.groupTaskInfo.subTaskList && t.groupTaskInfo.subTaskList[e]) {
                                let i = t.groupTaskInfo.subTaskList[e];
                                i.taskBaseInfo && (f.taskBaseInfo = i.taskBaseInfo, f.taskBaseInfo.taskName && "" !== f.taskBaseInfo.taskName || (f.taskBaseInfo.taskName = n), f.taskBaseInfo.savePath && "" !== f.taskBaseInfo.savePath || (f.taskBaseInfo.savePath = o)), c === h.DownloadKernel.TaskType.P2sp ? i.p2spTaskInfo && (f.p2spTaskInfo.useOriginResourceOnly = i.p2spTaskInfo.useOriginResourceOnly ? 1 : 0) : c === h.DownloadKernel.TaskType.Emule && i.emuleTaskInfo && (f.emuleTaskInfo.origin = i.emuleTaskInfo.origin)
                            }
                        }
                    }
                    let d = null;
                    t && t.taskBaseInfo ? ((d = t.taskBaseInfo).taskName && "" !== d.taskName || (d.taskName = n), d.savePath && "" !== d.savePath || (d.savePath = o)) : d = {
                        taskName: n,
                        savePath: o
                    };
                    let u = {subTaskList: l};
                    i = yield this.createTask(h.DownloadKernel.TaskType.Group, {
                        taskBaseInfo: d,
                        groupTaskInfo: u,
                        privateSpace: a
                    })
                }
                return i
            })
        }

        addTask(e, t) {
            let i = !1;
            if (e) {
                let n = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskId);
                this.tasks.set(n, e);
                let o = this.getTaskStrategy(n);
                N.information("set taskStrategy", o), e.setDispatchStrategy(o);
                let a = null;
                t && (t.birdKey || t.searchSource) && (t.taskType === h.DownloadKernel.TaskType.P2sp ? a = e.getExtraObject() : t.taskType === h.DownloadKernel.TaskType.Bt ? a = e.getExtraObject() : t.taskType === h.DownloadKernel.TaskType.Emule ? a = e.getExtraObject() : t.taskType === h.DownloadKernel.TaskType.Group ? a = e.getExtraObject() : (t.taskType, h.DownloadKernel.TaskType.Magnet), a && (t.birdKey && a.setUserData(I.TaskUserDataGUID.guidBirdKey, "birdKey", t.birdKey), t.searchSource && a.setUserData(I.TaskUserDataGUID.guidSearchFrom, "searchFrom", t.searchSource))), i = !0
            }
            return i
        }

        findTask(e) {
            let t = -1;
            do {
                if (!this.tasks || this.tasks.size < 1) break;
                for (let i of this.tasks.values()) {
                    if (i.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskUrl) === e) {
                        t = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskId);
                        break
                    }
                }
            } while (0);
            return t
        }

        getBackgroundTasks() {
            return this.backgroundTasks
        }

        removeTask(e) {
            let t = this.getTaskFromTaskId(e);
            if (t) {
                if (t.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType) === h.DownloadKernel.TaskType.Group) {
                    let e = t.getExtraObject(), i = e.getSubTaskCount();
                    for (let t = 0; t < i; ++t) {
                        let i = e.getSubTaskByIndex(t);
                        if (i) {
                            let e = i.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskId);
                            this.tasks.delete(e)
                        }
                    }
                }
            }
            this.tasks.delete(e), this.removeStartTask(e)
        }

        insertToCategoryView(e, t = h.DownloadKernel.TaskInsertReason.Unknown) {
            let i = h.DownloadKernel.CategroyViewID.Downloading;
            if (e.getTaskAttribute(h.DownloadKernel.TaskAttribute.RecycleTime) > 0) i = h.DownloadKernel.CategroyViewID.Recycle; else {
                let t = e.getTaskStatus();
                t !== h.DownloadKernel.TaskStatus.Succeeded && t !== h.DownloadKernel.TaskStatus.Seeding || (i = h.DownloadKernel.CategroyViewID.Completed)
            }
            let n = null, o = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryId);
            if (n = void 0 !== o && o > -1 ? A.getCategoryView(o, i) : D.getCategoryViewFromId(i)) {
                let i = [];
                i.push(e), n.insertTask(i, t)
            }
        }

        taskStatusChanage(e) {
            if (this.isInitDkFinish) for (let t = 0; t < e.length; ++t) {
                let i = e[t];
                if (i.getTaskAttribute(h.DownloadKernel.TaskAttribute.GroupTaskId) > 0) {
                    let e = i, t = i.getTaskStatus();
                    t === h.DownloadKernel.TaskStatus.Succeeded || t === h.DownloadKernel.TaskStatus.Seeding ? e.onFinish() : t === h.DownloadKernel.TaskStatus.Stopped ? e.onStop() : t === h.DownloadKernel.TaskStatus.Failed && e.onFail()
                } else if (i.getType() === h.DownloadKernel.TaskType.Group) do {
                    let e = i.getExtraObject();
                    if (!e) break;
                    let t = e.getTaskStatus();
                    N.information("taskStatusChanage taskExtra.taskStatus:", t), t === h.DownloadKernel.TaskStatus.Succeeded || t === h.DownloadKernel.TaskStatus.Seeding ? this.onTaskFinish(i) : t === h.DownloadKernel.TaskStatus.Stopped ? this.onTaskStop(i) : t === h.DownloadKernel.TaskStatus.Failed && this.onTaskFailed(i)
                } while (0); else {
                    let e = i.getTaskStatus();
                    N.information("taskStatusChanage task.taskStatus:", e), e === h.DownloadKernel.TaskStatus.Succeeded || e === h.DownloadKernel.TaskStatus.Seeding ? this.onTaskFinish(i) : e === h.DownloadKernel.TaskStatus.Stopped ? this.onTaskStop(i) : e === h.DownloadKernel.TaskStatus.Failed && this.onTaskFailed(i)
                }
            }
            _.fireTaskEvent(h.DownloadKernel.TaskEventType.StatusChanged, e)
        }

        taskDetailChanage(e, t) {
            let i = new Map, n = [];
            e.forEach(e => {
                let t = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.GroupTaskId);
                if (t < 1) n.push(e); else {
                    let n = i.get(t);
                    n || (n = [], i.set(t, n)), n.push(e)
                }
            }), n.length > 0 && _.fireTaskEvent(h.DownloadKernel.TaskEventType.DetailChanged, n, t)
        }

        loadTaskBaseCallback(e) {
            return n(this, void 0, void 0, function* () {
                let t = new Map;
                if (e) {
                    let i = [], n = [], o = [], a = new Map, r = new Map;
                    for (let s = 0; s < e.length; ++s) {
                        let l = e[s];
                        if (!l) continue;
                        if (-1 === l.recycleTime) continue;
                        l.taskStatus !== h.DownloadKernel.TaskStatus.Unkown && l.taskStatus !== h.DownloadKernel.TaskStatus.Failed && l.taskStatus !== h.DownloadKernel.TaskStatus.Succeeded && l.taskStatus !== h.DownloadKernel.TaskStatus.Seeding && (l.taskStatus = h.DownloadKernel.TaskStatus.Stopped);
                        let d = l.groupTaskId;
                        if (d > 0) {
                            let e = t.get(d);
                            e || (e = []), e.push(l), t.set(d, e)
                        }
                        let u = yield this.loadStorageTask(l);
                        if (u) {
                            if (u.getTaskAttribute(h.DownloadKernel.TaskAttribute.GroupTaskId) < 1) if (l.categoryId > -1) {
                                let e = u.getTaskStatus();
                                if (e === h.DownloadKernel.TaskStatus.Succeeded || e === h.DownloadKernel.TaskStatus.Seeding) {
                                    let e = r.get(l.categoryId);
                                    e || (e = [], r.set(l.categoryId, e)), e.push(u)
                                } else {
                                    let e = a.get(l.categoryId);
                                    e || (e = [], a.set(l.categoryId, e)), e.push(u)
                                }
                            } else {
                                if (u.getTaskAttribute(h.DownloadKernel.TaskAttribute.RecycleTime) > 0) o.push(u); else {
                                    let e = u.getTaskStatus();
                                    e === h.DownloadKernel.TaskStatus.Succeeded || e === h.DownloadKernel.TaskStatus.Seeding ? n.push(u) : i.push(u)
                                }
                            }
                        }
                    }
                    if (i.length > 0) {
                        let e = D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading);
                        e && e.insertTask(i, h.DownloadKernel.TaskInsertReason.LoadTaskBasic)
                    }
                    if (n.length > 0) {
                        let e = D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed);
                        e && e.insertTask(n, h.DownloadKernel.TaskInsertReason.LoadTaskBasic)
                    }
                    if (o.length > 0) {
                        let e = D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Recycle);
                        e && e.insertTask(o, h.DownloadKernel.TaskInsertReason.LoadTaskBasic)
                    }
                    for (let [e, t]of a) {
                        let i = A.getCategoryView(e, h.DownloadKernel.CategroyViewID.Downloading);
                        i ? i.insertTask(t, h.DownloadKernel.TaskInsertReason.LoadTaskBasic) : N.warning("getCategoryView failed! categoryId:", e, ", categoryViewId:", h.DownloadKernel.CategroyViewID.Downloading)
                    }
                    for (let [e, t]of r) {
                        let i = A.getCategoryView(e, h.DownloadKernel.CategroyViewID.Completed);
                        i ? i.insertTask(t, h.DownloadKernel.TaskInsertReason.LoadTaskBasic) : N.warning("getCategoryView failed! categoryId:", e, ", categoryViewId:", h.DownloadKernel.CategroyViewID.Completed)
                    }
                }
                for (let [e, i]of t) {
                    let t = this.getTaskFromTaskId(e);
                    if (t) {
                        let e = t.getExtraObject();
                        if (e) {
                            let n = void 0, o = t.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath);
                            o && (n = o.length + 1);
                            for (let t = 0; t < i.length; ++t) {
                                let o = i[t], a = o.taskId, r = this.getTaskFromTaskId(a);
                                r && (this.setGroupTaskRelativePath(r, o.savePath, n), e.addSubTask(r))
                            }
                        }
                    }
                }
                this.eventContainer.fireEvent(u.NodeEventMesssageNS.eventTaskDataBaseLoadEnd), this.isLoadStorageFinish = !0
            })
        }

        setGroupTaskRelativePath(e, t, i) {
            if (e && t && i) {
                let n = t.substr(i, t.length);
                n ? n.length > 0 && (n += "\\") : n = "", e.updateTaskRelativePath(n)
            }
        }

        onTaskFinish(e) {
            let t = e.onFinish();
            if (!e.getTaskAttribute(h.DownloadKernel.TaskAttribute.Background)) {
                let t = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.CategoryId), i = null;
                if (i = -1 === t ? D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading) : A.getCategoryView(t, h.DownloadKernel.CategroyViewID.Downloading)) {
                    let t = [];
                    t.push(e), i.removeTask(t)
                }
                if (0 === e.getTaskAttribute(h.DownloadKernel.TaskAttribute.RecycleTime)) {
                    let i = null;
                    if (i = -1 === t ? D.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Completed) : A.getCategoryView(t, h.DownloadKernel.CategroyViewID.Completed)) {
                        let t = [];
                        t.push(e), i.insertTask(t, h.DownloadKernel.TaskInsertReason.Complete)
                    }
                }
            }
            let i = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskId);
            return this.removeStartTask(i), t
        }

        onTaskStop(e) {
            let t = e.onStop(), i = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskId);
            return this.removeStartTask(i), t
        }

        onTaskFailed(e) {
            let t = e.onFail(), i = e.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskId);
            return this.removeStartTask(i), t
        }

        moveTaskFiles(e, t, i, n) {
            return o.ipcRenderer.send(y.ThunderChannelList.channelRMFileMove, e, t, i), new Promise(e => {
                o.ipcRenderer.once(y.ThunderChannelList.channelMRFileMoveResult, (t, n, o, a, r) => {
                    a === i && (n ? r && (n = !1) : 2 !== o && 124 !== o || (n = !0), e(n))
                })
            })
        }

        moveTask(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = !1;
                do {
                    let o = this.tasks.get(e);
                    if (!o) break;
                    let r = void 0, s = void 0, l = o.getTaskStatus(),
                        u = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType),
                        c = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath);
                    if (yield k.SingleBtTaskNS.isSingleBtTask(o)) {
                        let e = void 0, i = o.getExtraObject(), n = i.getBtFileList();
                        for (let [, t]of n) {
                            e = t.getBtFileAttribute(h.DownloadKernel.BtFileAttribute.FileName);
                            break
                        }
                        let u = a.join(c, e), f = i.getInfoId() + ".torrent", p = a.join(c, f);
                        if (p += "\r\n", l === h.DownloadKernel.TaskStatus.Succeeded || l === h.DownloadKernel.TaskStatus.Seeding) r = (u += "\r\n") + p; else {
                            let e = u + ".bt.xltd";
                            (yield d.FileSystemAWNS.existsAW(e)) || (e = u + ".bt.td"), r = (e += "\r\n") + p
                        }
                        s = t
                    } else {
                        let f = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName), p = void 0,
                            g = yield k.SingleBtTaskNS.getCorrectSingleBtFolder(o);
                        p = g ? a.join(c, g) : a.join(c, f);
                        let m = a.join(t, f);
                        if (l === h.DownloadKernel.TaskStatus.Succeeded || l === h.DownloadKernel.TaskStatus.Seeding) if (u === h.DownloadKernel.TaskType.P2sp || u === h.DownloadKernel.TaskType.Emule) r = p, s = m; else if (u === h.DownloadKernel.TaskType.Bt) {
                            if (g) {
                                let e = o.getExtraObject().getInfoId() + ".torrent", t = a.join(c, e);
                                r = p + "\r\n" + (t += "\r\n")
                            } else r = p;
                            s = (yield d.FileSystemAWNS.existsAW(m)) ? t : m
                        } else u === h.DownloadKernel.TaskType.Group && (n = yield this.moveGroupTask(e, t, i)); else if (u === h.DownloadKernel.TaskType.P2sp) {
                            r = p + ".xltd\r\n" + (p + ".xltd.cfg\r\n"), s = t
                        } else if (u === h.DownloadKernel.TaskType.Emule) {
                            r = p + ".emule.xltd\r\n" + (p + ".xlemule.cfg\r\n"), s = t
                        } else if (u === h.DownloadKernel.TaskType.Bt) {
                            if (g) {
                                let e = o.getExtraObject().getInfoId() + ".torrent", t = a.join(c, e);
                                r = p + "\r\n" + (t += "\r\n")
                            } else r = p;
                            s = (yield d.FileSystemAWNS.existsAW(m)) ? t : m
                        } else u === h.DownloadKernel.TaskType.Group && (n = yield this.moveGroupTask(e, t, i))
                    }
                    void 0 !== r && void 0 !== s && (o.setTaskMovingState(!0), n = yield this.moveTaskFiles(r, s, e, u), o.setTaskMovingState(!1)), n && u !== h.DownloadKernel.TaskType.Group && (o.setSavePath(t), i && (yield this.startTask(e)), T.client.callServerFunction("ShowMessageToast", {
                        message: "移动成功",
                        type: "success"
                    }).catch())
                } while (0);
                return n
            })
        }

        moveGroupTask(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = !1;
                do {
                    let o = this.tasks.get(e);
                    if (!o) break;
                    let r = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskType);
                    if (r !== h.DownloadKernel.TaskType.Group) break;
                    let s = o.getExtraObject();
                    if (!s) break;
                    if (!s.getSubTaskByIndex(0)) break;
                    let l = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath),
                        u = o.getTaskAttribute(h.DownloadKernel.TaskAttribute.TaskName), c = a.join(l, "*"),
                        f = a.join(t, u);
                    if (o.setTaskMovingState(!0), n = yield this.moveTaskFiles(c, f, e, r), o.setTaskMovingState(!1), n) {
                        let t = s.getSubTaskCount();
                        for (let e = 0; e < t; ++e) {
                            let t = s.getSubTaskByIndex(e);
                            if (t) {
                                let e = f, i = t.getTaskAttribute(h.DownloadKernel.TaskAttribute.SavePath);
                                if (i === l) ; else if (i.length > l.length && i.substr(0, l.length) === l) {
                                    let t = i.slice(l.length);
                                    "\\" === t[0] && (t = t.slice(1), e = a.join(f, t))
                                }
                                t.setSavePath(e)
                            }
                        }
                        yield d.FileSystemAWNS.rmdirAW(l), o.setSavePath(f), i && (yield this.startTask(e)), T.client.callServerFunction("ShowMessageToast", {
                            message: "移动成功",
                            type: "success"
                        }).catch();
                        let n = s.getUserData(I.TaskUserDataGUID.guidNotSavePath, "notSavePath");
                        if (n && (l = a.normalize(l), n = a.normalize(n), 0 === l.indexOf(n))) {
                            let e = n.indexOf(":\\");
                            if (-1 !== e) {
                                let t = n.substr(0, e + ":\\".length);
                                t && d.FileSystemAWNS.deleteEmptySubDirs(n, t).catch()
                            }
                        }
                    }
                } while (0);
                return n
            })
        }

        splitLastChar(e) {
            let t = e;
            return c.Common.isThunderPrivateUrl(e) && (e.lastIndexOf("==") === e.length - 2 ? t = e.substr(0, e.length - 2) : e.lastIndexOf("=") === e.length - 1 && (t = e.substr(0, e.length - 1))), t
        }

        removeStartTask(e) {
            let t = this.startTasks.indexOf(e);
            t > -1 && this.startTasks.splice(t, 1)
        }

        createGroupTask(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                let n = !1, a = f.ThunderKernel.beginTransaction();
                do {
                    if (e.createGroupTask(!1, t, i, o), !e.getExtraObject()) break;
                    yield this.createBatchTask(i.subTaskList, e), n = !0
                } while (0);
                return f.ThunderKernel.commitTransaction(a), n
            })
        }

        getTaskCfgType(e) {
            let t = h.DownloadKernel.TaskCfgType.Invalid;
            do {
                if (e === h.DownloadKernel.TaskType.P2sp) {
                    t = h.DownloadKernel.TaskCfgType.P2sp;
                    break
                }
                if (e === h.DownloadKernel.TaskType.Emule) {
                    t = h.DownloadKernel.TaskCfgType.Emule;
                    break
                }
            } while (0);
            return t
        }

        getTaskName(e, t, i, o, r) {
            return n(this, void 0, void 0, function* () {
                let n = "";
                for (; ;) {
                    if (e === h.DownloadKernel.TaskType.P2sp || e === h.DownloadKernel.TaskType.Emule) {
                        let e = a.extname(i), t = a.basename(i, e);
                        n = 0 === o ? i : t + "(" + o.toString() + ")" + e
                    } else n = 0 === o ? i : i + "(" + o.toString() + ")";
                    let s = !1, l = a.join(t, n);
                    if ("TD" !== r && "file_drag" !== r) {
                        let t = this.getTaskCfgType(e);
                        t !== h.DownloadKernel.TaskCfgType.Invalid && (s = yield f.ThunderKernel.isDownloadTaskCfgFileExist(t, l))
                    }
                    if (!s && !(yield d.FileSystemAWNS.existsAW(l))) break;
                    ++o
                }
                return {newName: n, index: o}
            })
        }

        isOtherPrivateSpaceTask(e) {
            let t = A.getCurrentPrivateCategory(), i = t ? t.getUserName() : "", n = e.getUserName();
            return !(!n || "" === n || i === n)
        }

        notifySDKCrash() {
            C.MessageBox.confirm({
                title: "迅雷下载引擎发生故障!",
                type: C.MessageBox.ConfirmType.Error,
                content: "迅雷开发者会在最新版本中修复各种故障<br>因此建议您尝试“检查更新”<br>如果您已安装最新版本,请尝试“重启电脑”",
                okText: "检查更新",
                cancelText: "重启电脑"
            }).then(e => {
                e.action === b.MessageBoxNS.Action.OK ? x.startManualUpdateWithUI() : e.action === b.MessageBoxNS.Action.Cancel && x.rebootdMachine()
            }).catch()
        }

        downloadSdkInited() {
            return n(this, void 0, void 0, function* () {
                this.isInitDkFinish || this.isInitingDk && (yield new Promise(e => n(this, void 0, void 0, function* () {
                    this.eventContainer.attachOnceListener(u.NodeEventMesssageNS.eventDownloadKernelInitEnd, () => {
                        e()
                    })
                })))
            })
        }
    }

    t.TaskManager = E, function (e) {
        const t = new E;
        e.getTaskManager = function () {
            return t
        }
    }(t.DownloadKernelTaskManager || (t.DownloadKernelTaskManager = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0).default.getLogger("async-remote-call"), a = i(588), r = i(20), s = i(5);
    t.asyncRemoteCall = new class extends r.EventEmitter {
        constructor() {
            super(), this.mapObj = new Map, this.mapObjIniting = new Map, "renderer" !== process.type && o.warning('can not import "renderer-process-call" module in non-renderer process', process.type)
        }

        getAppName() {
            return n(this, void 0, void 0, function* () {
                if (void 0 === this.appName) {
                    let e = yield this.getApp();
                    this.appName = yield e.getName()
                }
                return this.appName
            })
        }

        getAppVersion() {
            return n(this, void 0, void 0, function* () {
                if (void 0 === this.appVersion) {
                    let e = yield this.getApp();
                    this.appVersion = yield e.getVersion()
                }
                return this.appVersion
            })
        }

        getProcess() {
            return n(this, void 0, void 0, function* () {
                return a.global.process.__resolve()
            })
        }

        getIpcMain() {
            return n(this, void 0, void 0, function* () {
                return this.getCurrentObject("ipcMain")
            })
        }

        getDialog() {
            return n(this, void 0, void 0, function* () {
                return this.getCurrentObject("dialog")
            })
        }

        getApp() {
            return n(this, void 0, void 0, function* () {
                return this.getCurrentObject("app")
            })
        }

        getShell() {
            return n(this, void 0, void 0, function* () {
                return this.getCurrentObject("shell")
            })
        }

        getMenu() {
            return n(this, void 0, void 0, function* () {
                return this.getCurrentObject("Menu")
            })
        }

        getScreen() {
            return n(this, void 0, void 0, function* () {
                return this.getCurrentObject("screen")
            })
        }

        getBrowserWindow() {
            return n(this, void 0, void 0, function* () {
                return this.getCurrentObject("BrowserWindow")
            })
        }

        getWebContents() {
            return n(this, void 0, void 0, function* () {
                return this.getCurrentObject("webContents")
            })
        }

        getGlobalShortcut() {
            return n(this, void 0, void 0, function* () {
                return this.getCurrentObject("globalShortcut")
            })
        }

        getCurrentWebContents() {
            return n(this, void 0, void 0, function* () {
                let e = this.mapObj.get("currentWebContents");
                return void 0 === e && (this.mapObjIniting.get("currentWebContents") ? e = yield new Promise(e => n(this, void 0, void 0, function* () {
                    this.on("OnInitCurrentWebContents", t => {
                        e(t)
                    })
                })) : (this.mapObjIniting.set("currentWebContents", !0), e = yield a.getCurrentWebContents().__resolve(), this.mapObjIniting.set("currentWebContents", !1), this.emit("OnInitCurrentWebContents", e), this.listeners("OnInitCurrentWebContents").forEach(e => {
                    this.removeListener("OnInitCurrentWebContents", e)
                })), this.mapObj.set("currentWebContents", e)), e
            })
        }

        getCurrentWindow() {
            return n(this, void 0, void 0, function* () {
                let e = this.mapObj.get("currentWindow");
                return void 0 === e && (this.mapObjIniting.get("currentWindow") ? e = yield new Promise(e => n(this, void 0, void 0, function* () {
                    this.on("OnInitCurrentWindow", t => {
                        e(t)
                    })
                })) : (this.mapObjIniting.set("currentWindow", !0), e = yield a.getCurrentWindow().__resolve(), this.mapObjIniting.set("currentWindow", !1), this.emit("OnInitCurrentWindow", e), this.listeners("OnInitCurrentWindow").forEach(e => {
                    this.removeListener("OnInitCurrentWindow", e)
                })), this.mapObj.set("currentWindow", e)), e
            })
        }

        getCurrentObject(e) {
            return n(this, void 0, void 0, function* () {
                let t = this.mapObj.get(e);
                return s.isNullOrUndefined(t) && (this.mapObjIniting.get(e) ? t = yield new Promise(t => n(this, void 0, void 0, function* () {
                    this.on(e, e => {
                        t(e)
                    })
                })) : (this.mapObjIniting.set(e, !0), t = yield a.electron[e].__resolve(), this.mapObjIniting.set(e, !1), this.emit(e, t), this.listeners(e).forEach(t => {
                    this.removeListener(e, t)
                })), this.mapObj.set(e, t)), t
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.eventPluginLoderPluginReady = "event_plugin_loader_plugin_ready", e.eventDownloadItemActive = "event_download_item_active", e.eventDownloadItemChosen = "event_download_item_chosen", e.eventDetailSwitch2Index = "event_detail_switch_to_index", e.eventDownloadSwitchCategory = "event_download_switch_category", e.evetDownloadMove2Tail = "event_download_move_to_tail", e.eventBringMainWindowToTop = "event_bring_main_window_to_top", e.eventDownloadContextMenuClick = "event_download_context_menu_click", e.eventOnCommand = "event_on_command", e.eventOnCommandline = "event_on_command_line", e.eventDownloadKernelInitEnd = "event_dk_init_end", e.eventDownloadSDKRecover = "event_sdk_crash_recover", e.eventTaskDataBaseLoadEnd = "event_dk_task_data_base_load_end", e.eventGlobalDownloadSpeedChanged = "event_dk_global_download_speed_changed", e.eventGlobalUploadSpeedChanged = "event_dk_global_upload_speed_changed", e.eventConfigInitFinished = "event_config_init_finished", e.eventConfigValueChanged = "event_config_value_changed", e.eventBHOConfigInitFinished = "event_bho_config_init_finished", e.eventBHOConfigValueChanged = "event_bho_config_value_changed", e.eventMemoryConfigValueChanged = "event_memory_config_value_changed", e.eventShowHomePage = "event_show_home_page", e.eventShowSearchTaskPage = "event_show_searchtask_page", e.eventConfigBrowserInitFinished = "event_config_browser_init_finished", e.eventDownloadContextMenuPopup = "event_download_context_menu_popup", e.eventDownloadContextMenuEnd = "event_download_context_menu_end", e.eventEmbeddedBrowserWndClick = "event_embedded_browser_wnd_click", e.eventLoginWndCreate = "event_login_wnd_create", e.eventLoginWndCreated = "event_login_wnd_created", e.eventLoginWndShow = "event_login_wnd_show", e.eventLoginWndShowResult = "event_login_wnd_show_result", e.eventLoginWndClose = "event_login_wnd_close", e.eventRetryLoginWndCreate = "event_retry_login_wnd_create", e.eventModifierUserinfoWndCreate = "event_modifier-userinfo-wnd-create", e.eventBrowserNumberChange = "event_browser_number_change", e.eventUploadConfigInitFinished = "event_upload_config_init_finished", e.eventUploadConfigValueChanged = "event_upload_config_value_changed"
    }(t.NodeEventMesssageNS || (t.NodeEventMesssageNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(2), r = i(0), s = i(8), l = i(31), d = r.default.getLogger("Thunder.Util"),
        u = "Thunder Network\\Thunder7.9\\";

    function c(e) {
        let t = e;
        return 0 === e.indexOf('"') && e.lastIndexOf('"') === e.length - 1 ? t = e.substring(1, e.length - 1) : 0 === e.indexOf("'") && e.lastIndexOf("'") === e.length - 1 && (t = e.substring(1, e.length - 1)), t
    }

    !function (e) {
        function t() {
            let e = l.ThunderHelper.getSystemTempPath(), t = l.ThunderHelper.getLogicalDriveStrings(), i = 0;
            for (let n = 0; n < t.length; n++) {
                if (l.ThunderHelper.getDriveType(t[n]) === l.ThunderHelper.DriverType.DRIVE_FIXED) {
                    let o = l.ThunderHelper.getDriveInfo(t[n]);
                    i < o.freeBytes && t[n] !== e && (i = o.freeBytes, e = t[n])
                }
            }
            return e.substring(0, 1) + ":\\迅雷下载"
        }

        function r(e) {
            let t = (e.style.webkitTransform || getComputedStyle(e, "").getPropertyValue("-webkit-transform") || e.style.transform || getComputedStyle(e, "").getPropertyValue("transform")).match(/\-?[0-9]+\.?[0-9]*/g);
            return {x: parseInt(t && (t[12] || t[4]) || "0", 10), y: parseInt(t && (t[13] || t[5]) || "0", 10)}
        }

        function h(e) {
            let t = !1;
            do {
                let i = "", n = "";
                if (/^[a-zA-Z]:\\/.test(e)) i = e.slice(3); else {
                    if (0 !== e.indexOf("\\\\")) break;
                    {
                        let t = e.indexOf("\\", 2);
                        if (-1 === t || t === e.length - 1) break;
                        if ("" === (n = (i = e.slice(2)).substr(0, t - 2))) break
                    }
                }
                if (/[\*\"<>\?:\|]/i.test(i)) break;
                if (e.length > 256) break;
                if ("" === n) {
                    t = !0;
                    break
                }
                let o = n.indexOf(".ipv6-literal.net");
                -1 !== o ? (-1 !== (o = (n = n.substr(0, o)).indexOf("%")) && (n = n.substr(0, o)), n = n.replace(/\-/g, ":"), /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/.test(n) && (t = !0)) : /(?=(\b|\D))(((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))\.){3}((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))(?=(\b|\D))/.test(n) && (t = !0)
            } while (0);
            return t
        }

        e.formatSize = function (e, t) {
            0 === t || (t = t || 2);
            let i = "0B";
            if ("number" == typeof e && e > 0) {
                let n = ["B", "KB", "MB", "GB", "TB"], o = 0, a = e;
                for (; a >= 1e3 && !(o >= 4);) a /= 1024, o += 1;
                i = -1 === String(a).indexOf(".") ? a + n[o] : a.toFixed(t) + n[o]
            }
            return i
        }, e.formatSizeCustom = function (e, t = 2, i = 5) {
            let n = "0B";
            if ("number" == typeof e && e > 0) {
                let o = ["B", "KB", "MB", "GB", "TB"], a = 0, r = e;
                for (; r >= 1e3 && !(a >= 4);) r /= 1024, a += 1;
                if (-1 === String(r).indexOf(".")) n = r + o[a]; else {
                    let e = r.toFixed(t);
                    e.length <= i ? n = "KB" !== o[a] && "MB" !== o[a] || 1 === t ? e + o[a] : r.toFixed(1) + o[a] : ("." === (e = e.substr(0, i))[i - 1] && (e = e.substr(0, i - 1)), n = e + o[a])
                }
            }
            return n
        }, e.isDigital = function (e) {
            let t = !1;
            return /^\d+$/.test(e) && (t = !0), t
        }, e.isAlpha = function (e) {
            let t = !1;
            return /[A-Za-z]/.test(e) && (t = !0), t
        }, e.isUpperCase = function (e) {
            let t = !1;
            return /[A-Z]/.test(e) && (t = !0), t
        }, e.isLowerCase = function (e) {
            let t = !1;
            return /[a-z]/.test(e) && (t = !0), t
        }, e.isChinese = function (e) {
            let t = !1;
            return /[\u4E00-\u9FA5]/.test(e) && (t = !0), t
        }, e.replaceNonDigital = function (e) {
            return e.replace(/[^\d]/g, "")
        }, e.replaceNonAlpha = function (e) {
            return e.replace(/[^A-Za-z]/g, "")
        }, e.replaceNonWord = function (e) {
            return e.replace(/[^\W]/g, "")
        }, e.getDefaultDownloadDir = t, e.getMaxFreeDriver = function () {
            return t().substring(0, 1)
        }, e.deepCopy = function (e) {
            let t = JSON.stringify(e), i = null;
            try {
                i = JSON.parse(t)
            } catch (e) {
                d.warning(e)
            }
            return i
        }, e.swap = function (e, t, i) {
            do {
                if (t < 0 || t >= e.length) break;
                if (i < 0 || i >= e.length) break;
                if (t === i) break;
                e[t] = e.splice(i, 1, e[t])[0]
            } while (0);
            return e
        }, e.compareNocase = function (e, t) {
            let i = !1;
            do {
                if (void 0 === e && void 0 === t) {
                    i = !0;
                    break
                }
                if (void 0 === e || void 0 === t) break;
                if ("string" != typeof e || "string" != typeof t) break;
                i = e.toLowerCase() === t.toLowerCase()
            } while (0);
            return i
        }, e.parseCommandLine = function (e) {
            let t = 0, i = "", n = !1, o = [], a = e.length;
            for (let r = 0; r < a; r++) {
                let s = e[r];
                if ('"' !== s && "'" !== s || ("" === i ? (n = !0, i = s) : i === s && (n = !1, i = "")), " " !== s || n || r === a - 1) {
                    if (r === a - 1) {
                        let i = e.substring(t);
                        "" !== i.trim() && o.push(c(i))
                    }
                } else {
                    let i = e.substring(t, r);
                    "" !== i.trim() && o.push(c(i)), t = r + 1
                }
            }
            return o
        }, e.getThunderTempPath = function (e, t) {
            return n(this, void 0, void 0, function* () {
                const n = yield Promise.resolve().then(() => i(55));
                let o = a.join(n.tmpdir(), u);
                return t && (o = a.join(o, t)), void 0 !== e && e && (yield s.FileSystemAWNS.mkdirsAW(o)), o
            })
        }, e.setQueryString = function (e, t) {
            return Object.keys(t).forEach((i, n) => {
                e += 0 === n ? "?" : "&", e += `${i}=${t[i]}`
            }), e
        }, e.setQueryStringEx = function (e, t) {
            for (let i in t) e += -1 === e.indexOf("?") ? "?" : "&", e += `${i}=${t[i]}`;
            return e
        }, e.getQueryString = function (e, t) {
            return e && t && e.match(new RegExp(`(^${t}|[?|&]${t})=([^&#]+)`)) ? RegExp.$2 : ""
        }, e.isClipboardTextFormatAvailable = function () {
            let e = !1, t = o.clipboard.availableFormats();
            for (let i of t) if ("text/plain" === i) {
                e = !0;
                break
            }
            return e
        }, e.keywordsHighLight = function (e, t, i) {
            if (!e) return "";
            if (!t) return e;
            if (0 === e.length) return e;
            if (0 === t.length) return e;
            let n = /\\/, o = t.split(" ");
            if (0 === (o = o.filter(e => e.trim().length > 0)).length) return e;
            for (let t = 0; t < o.length; t++) if (o[t].search(n) > 0) return e;
            i = void 0 === i || null === i ? "#FF0000" : i;
            let a = "", r = ["\\[", "\\^", "\\*", "\\(", "\\)", "\\|", "\\?", "\\$", "\\.", "\\+"], s = "", l = "|";
            for (let e = 0; e < o.length; e++) {
                for (let t = 0; t < r.length; t++) {
                    let i = new RegExp(r[t], "g");
                    o[e] = o[e].replace(i, r[t])
                }
                e === o.length - 1 && (l = ""), s = s.concat(o[e], l)
            }
            let d = new RegExp(s, "gi");
            return a = e.replace(d, e => '<span style= "color:' + i + '">' + e + "</span>")
        }, e.isDef = function (e) {
            return void 0 !== e && null !== e
        }, e.isUndef = function (e) {
            return void 0 === e || null === e
        }, e.setStyle = function (e, t) {
            Object.entries(t).forEach(([t, i]) => {
                e.style[t] = i
            })
        }, e.setCSSProperties = function (e, t) {
            Object.entries(t).forEach(([t, i]) => {
                e.style.setProperty(t, i)
            })
        }, e.versionCompare = function (e, t) {
            let i = e.split("."), n = t.split("."), o = 0;
            for (let e = 0; e < i.length; e++) {
                if (Number(i[e]) - Number(n[e]) > 0) {
                    o = 1;
                    break
                }
                if (Number(i[e]) - Number(n[e]) < 0) {
                    o = -1;
                    break
                }
            }
            return o
        }, e.throttle = function (e, t) {
            let i, n = 0;
            return (...o) => {
                const a = Date.now();
                clearTimeout(i), a - n > t ? (e(...o), n = a) : i = setTimeout(() => {
                    e(...o), n = a
                }, t)
            }
        }, e.debounce = function (e, t) {
            let i = null;
            return (...n) => {
                i && clearTimeout(i), i = setTimeout(() => {
                    e(...n)
                }, t)
            }
        }, e.getElementFixed = function (e) {
            let t = e.offsetLeft, i = e.offsetTop, n = e.offsetParent;
            for (; null !== n;) {
                let e = r(n);
                t += n.offsetLeft + e.x, i += n.offsetTop + e.y, n = n.offsetParent
            }
            return {x: t, y: i}
        }, e.escapeHTML = function (e) {
            return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;")
        }, e.unescapeHTML = function (e) {
            return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&apos;/g, "'")
        }, e.isValidPath = h, e.isValidDownloadPath = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    if (e.length < 3) break;
                    if ("私人空间" === e) {
                        t = !0;
                        break
                    }
                    if (l.ThunderHelper.getDriveType(e) === l.ThunderHelper.DriverType.DRIVE_REMOTE) {
                        t = !0;
                        break
                    }
                    if (!h(e)) break;
                    if (!(yield s.FileSystemAWNS.dirExistsAW(e)) && !(yield s.FileSystemAWNS.mkdirsAW(e))) break;
                    t = !0
                } while (0);
                return t
            })
        };
        let f = void 0;

        function p(e, t = "normal 12px sans-serif") {
            f || (f = document.createElement("canvas"));
            let i = f.getContext("2d");
            return i.font = t, i.measureText(e).width
        }

        function g(e, t, i = "normal 12px sans-serif", n = 1) {
            function o(e, t, n, a, r) {
                let s = -1;
                do {
                    if (e > t) {
                        s = t;
                        break
                    }
                    let l = Math.round((e + t) / 2), d = p(`${n.substr(0, l)}...${a}`, i);
                    if (r === d) {
                        s = l;
                        break
                    }
                    if (r > d) {
                        if (Math.round(r) === Math.round(d)) {
                            s = l;
                            break
                        }
                        s = o(l + 1, t, n, a, r)
                    } else if (d > r) {
                        if (Math.round(r) === Math.round(d)) {
                            s = l - 1;
                            break
                        }
                        s = o(e, l - 1, n, a, r)
                    }
                } while (0);
                return s
            }

            let r = e;
            do {
                if (!t) break;
                if (!e) break;
                let s = t.offsetWidth * n;
                if (s > p(e, i)) break;
                let l = a.extname(e);
                "" !== l && (l = l.substring(1));
                let d = e.substr(0, e.length - l.length - 1);
                if (!d) break;
                let u = o(0, d.length, d, l, s);
                if (-1 === u) break;
                r = `${d.substr(0, u - 2 * (n - 1))}...${l}`
            } while (0);
            return r
        }

        e.getTextWidth = p, e.getOmitName = g, e.getOmitNameMultiLine = function (e, t, i) {
            return g(e, t, "normal 12px microsoft yahei", 2)
        }, e.setTimeoutAw = function (e, t) {
            return new Promise((i, n) => {
                setTimeout(() => {
                    t && t(), i()
                }, e)
            })
        }
    }(t.ThunderUtil || (t.ThunderUtil = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), a = i(584), r = i(61), s = i(123);

    function l(e) {
        s.information("on object freeer"), global.__xdasIPCServerInstance.notifyFreer(e.client, e.callbackId)
    }

    let d = void 0;
    global.__xdasIPCServerInstance || (global.__xdasIPCServerInstance = new class extends o.EventEmitter {
        constructor() {
            super(), this.rid = 0, this.apis = {}, this.eventMap = {}, this.clientAliasMap = {}, this.retCallbackMap = {}, this.contextCallbackMap = {}, this.singleton = !1
        }

        registerFunctions(e) {
            do {
                if (!e) break;
                let t = void 0;
                for (let i in e) if (this.apis.hasOwnProperty(i)) {
                    t = i;
                    break
                }
                if (t) throw new Error(`try to coverd function ${t}`);
                this.apis = Object.assign({}, this.apis, e)
            } while (0)
        }

        start(e, t) {
            if (this.singleton) throw new Error("try to start server duplicate");
            this.singleton = !0, this.server = new a.Server, global.__xdasIPCServer = this.server, this.server.listen(void 0, t), e && this.registerFunctions(e), this.server.on("connect", e => {
                this.emit("connect", e)
            }), this.server.on("message", (e, t) => {
                do {
                    if ("attach_event" === e.action) {
                        this.attachEvent(e.name, t);
                        break
                    }
                    if ("detach_event" === e.action) {
                        this.detachEvent(e.name, t);
                        break
                    }
                    if ("broadcast" === e.action) {
                        if (e.__context && e.__context.name === r.serverContextName) throw new Error("client context must difference from server");
                        this.forwardEvent(e.name, e.__context, e.timestamp, ...e.args);
                        break
                    }
                    if ("call_remote_client_api" === e.action) {
                        this.callClientFunction(e, t);
                        break
                    }
                    if ("call_remote_context_by_id" === e.action) {
                        if (e.dst && this.clientAliasMap.hasOwnProperty(e.dst)) {
                            let t = this.clientAliasMap[e.dst];
                            t && this.callClientFunctionById(t, e.rid, ...e.args)
                        }
                        break
                    }
                    if ("call_client_by_id_callback" === e.action) {
                        this.fireRetCallback(e, t);
                        break
                    }
                    if ("check_client_function_callback" === e.action) {
                        this.fireRetCallback(e, t);
                        break
                    }
                    if ("remote_client_callback" === e.action) {
                        this.reply2Client(e, t);
                        break
                    }
                    if ("check_client_function_exist" === e.action) {
                        this.internalCheckClientFunction(e.dst, e.method).then(i => {
                            let n = this.getNow();
                            this.sendAdapter(t, {
                                success: !0,
                                rid: e.rid,
                                method: e.method,
                                data: i,
                                timestamp: e.timestamp ? e.timestamp.concat(n) : [].concat(n)
                            })
                        });
                        break
                    }
                    let i = this.getNow(), n = {
                        success: !1,
                        rid: e.rid,
                        method: e.method,
                        timestamp: e.timestamp ? e.timestamp.concat(i) : [].concat(i)
                    }, o = e.method;
                    do {
                        if ("register" === e.action) {
                            this.registerAlias(e, t, n), this.sendAdapter(t, n);
                            break
                        }
                        if ("client_context_freer" === e.action) {
                            if (e.dst && this.clientAliasMap.hasOwnProperty(e.dst)) {
                                let t = this.clientAliasMap[e.dst];
                                this.notifyFreer(t, e.rid)
                            }
                            break
                        }
                        if ("check_server_function_exist" === e.action) {
                            n.success = !0, n.data = !(!this.apis || !this.apis[o]), this.sendAdapter(t, n);
                            break
                        }
                        if ("check_client_exist" === e.action) {
                            n.success = !0, n.data = !1, e.dst && this.clientAliasMap.hasOwnProperty(e.dst) && (n.data = !0), this.sendAdapter(t, n);
                            break
                        }
                        if (!o) break;
                        if (!this.apis || !this.apis[o]) {
                            n.error = `${e.__context} try to call method '${o}' which is undefined`, this.sendAdapter(t, n);
                            break
                        }
                        let i = void 0, a = this.decodeParameter(e.args, t);
                        try {
                            i = this.apis[o].apply(null, [t, e.__context].concat(a))
                        } catch (e) {
                            n.error = e.message, this.sendAdapter(t, n);
                            break
                        }
                        if (i && i.then) {
                            i.then(e => {
                                n.data = e, n.success = !0, this.sendAdapter(t, n)
                            }).catch(e => {
                                n.error = e instanceof Error ? e.message : e, this.sendAdapter(t, n)
                            });
                            break
                        }
                        n.success = !0, n.data = i, this.sendAdapter(t, n)
                    } while (0)
                } while (0)
            }), this.server.on("end", e => {
                this.emit("end", e), this.clearClientInfo(e)
            }), this.server.on("error", (e, t) => {
                s.information("server error", t, t && t.code), t && "EPIPE" === t.code && this.clearClientInfo(e)
            })
        }

        fireClientEvent(e, ...t) {
            this.forwardEvent(e, {name: r.serverContextName}, void 0, ...t)
        }

        callClientFunctionById(e, t, ...i) {
            this.sendAdapter(e, {action: "call_client_by_id", rid: t, args: i})
        }

        callClientFunctionByIdAw(e, t, ...i) {
            return new Promise((n, o) => {
                {
                    let o = this.generateId(), a = (e, t) => {
                        n(e ? [null, e] : [t])
                    }, r = {s_rid: o, action: "call_client_by_id", rid: t, args: i};
                    this.retCallbackMap[o] = Object.assign({callback: a}, r), this.sendAdapter(e, r)
                }
            })
        }

        checkClientFunction(e, t) {
            return "string" == typeof e && (e = this.getFullAlias(e)), this.internalCheckClientFunction(e, t)
        }

        callClientFunctionByName(e, t, ...i) {
            return new Promise((n, o) => {
                do {
                    if (!e) {
                        n([null, null]);
                        break
                    }
                    let o = void 0;
                    if ("string" == typeof e) {
                        if (e = this.getFullAlias(e), !this.clientAliasMap.hasOwnProperty(e)) {
                            n([null, null]);
                            break
                        }
                        o = this.clientAliasMap[e]
                    } else o = e;
                    if (!o) {
                        n([null, null]);
                        break
                    }
                    let a = this.generateId(), s = (e, t, i) => {
                        n(e ? [null, i, e] : [t, i])
                    };
                    if (i) for (let e = 0; e < i.length; e++) i[e] = this.convertFunction2Id(i[e]);
                    let l = {s_rid: a, action: "call_client_api", args: i, src: r.serverContextName, method: t};
                    this.retCallbackMap[a] = Object.assign({callback: s}, l), this.sendAdapter(o, l)
                } while (0)
            })
        }

        isRemoteClientExist(e) {
            let t = !1;
            return this.clientAliasMap.hasOwnProperty(this.getFullAlias(e)) && (t = !0), t
        }

        getRemoteClient(e, t) {
            let i = null;
            do {
                if (!e) break;
                t || (t = this.server.getProductId());
                let n = `${t}-${e}`.toLowerCase();
                i = this.clientAliasMap[n]
            } while (0);
            return i
        }

        internalCheckClientFunction(e, t) {
            return n(this, void 0, void 0, function* () {
                return new Promise((i, n) => {
                    do {
                        if (!e) {
                            i(!1);
                            break
                        }
                        let n = void 0;
                        if ("string" == typeof e) {
                            if (!this.clientAliasMap.hasOwnProperty(e)) {
                                i(!1);
                                break
                            }
                            n = this.clientAliasMap[e]
                        } else n = e;
                        if (!n) {
                            i(!1);
                            break
                        }
                        let o = this.generateId(), a = (e, t) => {
                            i(!e && t)
                        }, r = {s_rid: o, action: "check_client_function", method: t};
                        this.retCallbackMap[o] = Object.assign({callback: a}, r), this.sendAdapter(n, r)
                    } while (0)
                })
            })
        }

        convertFunction2Id(e) {
            let t = e;
            if ("function" == typeof e) {
                let i = this.generateId();
                this.contextCallbackMap[i] = e, t = i
            } else if (e && "object" == typeof e) for (let t in e) {
                let i = e[t];
                if ("function" == typeof i) {
                    let n = this.generateId();
                    this.contextCallbackMap[n] = i, e[t] = n
                } else i && "object" == typeof i && (e[t] = this.convertFunction2Id(i))
            }
            return t
        }

        clearClientInfo(e) {
            for (let t in this.clientAliasMap) this.clientAliasMap[t] === e && delete this.clientAliasMap[t];
            for (let t in this.eventMap) this.detachEvent(t, e);
            for (let t in this.retCallbackMap) {
                let i = this.retCallbackMap[t];
                if (i.dstRemote === e) {
                    let e = {
                        rid: i.rid,
                        method: i.method,
                        error: "client has been ended by the other party",
                        action: "remote_client_callback",
                        success: !1
                    };
                    s.information("client has been ended by other party, but still has return callback", e), this.sendAdapter(i.remote, e), delete this.retCallbackMap[t]
                }
            }
        }

        registerAlias(e, t, i) {
            do {
                if (!e) break;
                if (!e.alias) {
                    i.error = "register alias can not be empty";
                    break
                }
                if (this.clientAliasMap.hasOwnProperty(e.alias)) {
                    if (this.clientAliasMap[e.alias] === t) {
                        i.data = e.alias, i.success = !0;
                        break
                    }
                    i.error = "register failed cause alias is in use";
                    break
                }
                {
                    let n = void 0;
                    for (let e in this.clientAliasMap) if (this.clientAliasMap[e] === t) {
                        n = e;
                        break
                    }
                    if (n) {
                        i.data = n, i.error = `register failed cause already register by another alias ${n}`;
                        break
                    }
                    this.clientAliasMap[e.alias] = t, i.data = e.alias, i.success = !0;
                    break
                }
            } while (0)
        }

        callClientFunction(e, t) {
            do {
                if (!e) break;
                let i = e.dst, n = {rid: e.rid, method: e.method};
                if (!this.clientAliasMap.hasOwnProperty(i)) {
                    let o = `call remote function but dst client is not start or ended ${i}, method ${e.method}`;
                    s.error(o), n.error = o, n.action = "remote_client_callback", n.success = !1, this.sendAdapter(t, n);
                    break
                }
                let o = this.generateId(), a = this.clientAliasMap[i];
                n = Object.assign({
                    s_rid: o,
                    action: "call_client_api",
                    args: e.args,
                    src: e.src
                }, n), this.retCallbackMap[o] = Object.assign({remote: t, dstRemote: a}, n), this.sendAdapter(a, n)
            } while (0)
        }

        fireRetCallback(e, t) {
            do {
                let i = e.s_rid;
                if (void 0 === i || null === i) break;
                let n = this.retCallbackMap[i];
                if (!n) break;
                const o = n.callback;
                if (!o) break;
                e.success ? o(null, this.decodeParameter(e.data, t)) : o(e.error, e.data), delete this.retCallbackMap[i], s.information("free fireRetCallback", i)
            } while (0)
        }

        decodeParameter(e, t) {
            let i = e;
            do {
                if (!e) break;
                if ("object" != typeof e) break;
                let o = e["__nodeipc_callback_id__{A9C9D760-14E8-42CB-A3CB-9C0A0DDFD732}"];
                if (o) {
                    i = ((...e) => n(this, void 0, void 0, function* () {
                        return this.callClientFunctionByIdAw(t, o, ...e)
                    })), global.__xdasObjectLiftMonitor && global.__xdasObjectLiftMonitor.setObjectFreer(i, {
                        client: t,
                        callbackId: o
                    }, l);
                    break
                }
                for (let i in e) {
                    let n = e[i];
                    e[i] = this.decodeParameter(n, t)
                }
            } while (0);
            return i
        }

        notifyFreer(e, t) {
            this.sendAdapter(e, {action: "client_context_freer", rid: t})
        }

        reply2Client(e, t) {
            do {
                let i = e.s_rid;
                if (void 0 === i || null === i) break;
                let n = this.retCallbackMap[i];
                if (!n) break;
                if (e.src === r.serverContextName) {
                    const i = n.callback;
                    if (!i) break;
                    e.success ? i(null, this.decodeParameter(e.data, t), t) : i(e.error, e.data, t)
                } else {
                    let t = n.remote;
                    if (!t) break;
                    this.sendAdapter(t, e)
                }
                delete this.retCallbackMap[i]
            } while (0)
        }

        getNow() {
            return Date.now()
        }

        sendAdapter(e, t) {
            let i = this.getNow();
            t.timestamp = t.timestamp ? t.timestamp.concat(i) : [].concat(i), e.isInprocess() ? (s.information("send to client in process"), e.emit("message", t)) : e.send(t)
        }

        forwardEvent(e, t, i, ...n) {
            do {
                if (!this.eventMap.hasOwnProperty(e)) break;
                let o = this.eventMap[e];
                for (let a of o) this.sendAdapter(a, {
                    action: "fire_event",
                    name: e,
                    args: n,
                    __context: t,
                    timestamp: i
                })
            } while (0)
        }

        attachEvent(e, t) {
            {
                this.eventMap[e] || (this.eventMap[e] = []);
                let i = this.eventMap[e], n = !1;
                for (let o of i) if (o === t) {
                    s.information("server attachEvent attached", e), n = !0;
                    break
                }
                n || (this.eventMap[e].push(t), s.information("server attachEvent ", e))
            }
        }

        detachEvent(e, t) {
            do {
                if (!this.eventMap.hasOwnProperty(e)) break;
                let i = this.eventMap[e];
                for (let n = 0; n < i.length; n++) if (i[n] === t) {
                    this.eventMap[e].splice(n, 1), s.information("server detachEvent current eventMap", this.eventMap);
                    break
                }
            } while (0)
        }

        generateId() {
            return this.rid++
        }

        getFullAlias(e) {
            return `${this.server.getProductId()}-${e}`.toLowerCase()
        }
    }), d = global.__xdasIPCServerInstance, t.server = d
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});

    class n {
        constructor(e, t, i = !1) {
            this.cookie = null, this.once = !1, this.callback = null, this.ref = 0, this.callback = e, this.cookie = t, this.once = i, this.ref = 1
        }

        fire(e, ...t) {
            return "function" == typeof this.callback && this.callback(e, ...t)
        }

        compare(e) {
            return this.cookie === e
        }

        addRef() {
            this.ref++
        }

        release() {
            return this.ref--, this.ref <= 0
        }
    }

    class o {
        constructor() {
            this.cookie = 0, this.listeners = new Map
        }

        attachTaskEvent(e, t) {
            this.cookie++;
            let i = new n(t, this.cookie, !1), o = this.listeners.get(e);
            return o || (o = []), o.push(i), this.listeners.set(e, o), this.cookie
        }

        attachTaskEventOnce(e, t) {
            this.cookie++;
            let i = new n(t, this.cookie, !0), o = this.listeners.get(e);
            return o || (o = []), o.push(i), this.listeners.set(e, o), this.cookie
        }

        detachTaskEvent(e, t) {
            let i = this.listeners.get(e);
            if (i) for (let e = 0; e < i.length; ++e) {
                let n = i[e];
                if (n.compare(t)) {
                    n.release() && i.splice(e, 1);
                    break
                }
            }
        }

        fireTaskEvent(e, ...t) {
            let i = this.listeners.get(e);
            if (i) {
                let n = [], o = i.length, a = 0;
                for (; a < o;) {
                    let r = i[a];
                    if (void 0 === r || null === r) {
                        i.splice(a, 1), --o;
                        continue
                    }
                    r.addRef();
                    let s = r.fire(e, ...t);
                    r.release() ? (i.splice(a, 1), --o) : (++a, r.once && s && n.push(r))
                }
                for (let t = 0; t < n.length; t++) {
                    let i = n[t];
                    this.detachTaskEvent(e, i.cookie)
                }
            }
        }
    }

    t.EventManager = o, function (e) {
        const t = new o;
        e.getEventManager = function () {
            return t
        }
    }(t.DownloadKernelEventManager || (t.DownloadKernelEventManager = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(5), o = i(121), a = i(122), r = i(71), s = i(377);
    !function (e) {
        let t;
        !function (e) {
            e[e.Unknown = -1] = "Unknown", e[e.Success = 0] = "Success", e[e.FunctionNotExist = 1] = "FunctionNotExist", e[e.ParamaterError = 2] = "ParamaterError", e[e.CallFailed = 3] = "CallFailed"
        }(t = e.NativeCallErrorCode || (e.NativeCallErrorCode = {}));

        class i {
            constructor(e, t, i) {
                this.maxId = e, this.minId = t, this.invalidId = i
            }

            generateId() {
                return this.minId === this.maxId ? this.invalidId : this.minId++
            }

            isInvalidId(e) {
                return e === this.invalidId
            }
        }

        e.IdGenerator = i;
        const l = 0;
        e.idGenerator = new i(1e7, 1, l);

        class d {
            constructor() {
                this.jsCallbacks = new Map, this.jsReturnCallbacks = new Map, this.eventJsCallbakcs = new Map, this.jsRegisterFunctions = new Map, this.targetCommunitorInfo = s.CommonIPCRenderer.rendererCommunicator.getCommunicatorInfoByContext(r.CommonIPCBase.mainRendererContext), this.bindMsgListeners(), this.notifyNativeCallReady()
            }

            CallNativeFunction(t, ...i) {
                do {
                    if (n.isNullOrUndefined(t) || 0 === t.length) {
                        o.error("funcName is empty");
                        break
                    }
                    if (!this.targetCommunitorInfo) {
                        o.error("CallNativeFunction but targetCommunitorInfo null");
                        break
                    }
                    o.information("funcName = ", t), this.printArgs(i);
                    let r = l;
                    for (let t = 0; t < i.length; ++t) if (n.isFunction(i[t])) {
                        let n = e.idGenerator.generateId(), o = i[t];
                        t === i.length - 1 ? (this.jsReturnCallbacks.set(n, o), r = n, i.pop()) : (this.jsCallbacks.set(n, o), i[t] = n)
                    }
                    s.CommonIPCRenderer.rendererCommunicator.sendMessageToRenderer(this.targetCommunitorInfo.id, {
                        name: a.CommonIPCMessage.msgNCCallNativeFunction,
                        args: [t, r].concat(i)
                    })
                } while (0)
            }

            AttachNativeEvent(t, i) {
                let a = void 0;
                do {
                    if (n.isNullOrUndefined(t) || 0 === t.length) {
                        o.error("eventName is empty");
                        break
                    }
                    if (n.isNullOrUndefined(i)) {
                        o.error("callback is empty");
                        break
                    }
                    let r = e.idGenerator.generateId();
                    if (e.idGenerator.isInvalidId(r)) {
                        o.error("id error");
                        break
                    }
                    if (this.eventJsCallbakcs.has(t)) this.eventJsCallbakcs.get(t).set(r, i); else {
                        let e = new Map;
                        e.set(r, i), this.eventJsCallbakcs.set(t, e)
                    }
                    a = r
                } while (0);
                return a
            }

            DetachNativeEvent(e, t) {
                do {
                    if (n.isNullOrUndefined(e) || 0 === e.length) {
                        o.error("eventName is empty");
                        break
                    }
                    if (n.isNullOrUndefined(t)) {
                        o.error("callback is empty");
                        break
                    }
                    if (!this.eventJsCallbakcs.has(e)) {
                        o.error(`event: ${e} doesnot have listener`);
                        break
                    }
                    if (!this.eventJsCallbakcs.get(e).has(t)) {
                        o.error(`event: ${e} doesnot have the listener of id=${t}`);
                        break
                    }
                    this.eventJsCallbakcs.get(e).delete(t)
                } while (0)
            }

            CheckNativeFunction(t, i) {
                do {
                    if (n.isNullOrUndefined(t) || 0 === t.length) {
                        o.error("funcName is empty");
                        break
                    }
                    if (n.isNullOrUndefined(i)) {
                        o.error("callback is empty");
                        break
                    }
                    if (!this.targetCommunitorInfo) {
                        o.error("CheckNativeFunction but targetCommunitorInfo null");
                        break
                    }
                    o.information("funcName = ", t);
                    let r = e.idGenerator.generateId();
                    this.jsReturnCallbacks.set(r, i), s.CommonIPCRenderer.rendererCommunicator.sendMessageToRenderer(this.targetCommunitorInfo.id, {
                        name: a.CommonIPCMessage.msgNCCheckNativeFunction,
                        args: [t, r]
                    })
                } while (0)
            }

            RegisterJSFunction(e, i) {
                let a = t.ParamaterError;
                do {
                    if (n.isNullOrUndefined(e) || 0 === e.length) {
                        o.error("funcName is empty");
                        break
                    }
                    if (n.isNullOrUndefined(i)) {
                        o.error("jsFunc is empty");
                        break
                    }
                    this.jsRegisterFunctions.set(e, i), a = t.Success
                } while (0);
                return a
            }

            bindMsgListeners() {
                s.CommonIPCRenderer.rendererCommunicator.onMessage(a.CommonIPCMessage.msgNCCallJsFunctionById, e => {
                    this.handleCallJsFunctionById(e.msg.args)
                }), s.CommonIPCRenderer.rendererCommunicator.onMessage(a.CommonIPCMessage.msgNCCallJsFunctionByName, e => {
                    this.handleCallJsFunctionByName(e.msg.args)
                }), s.CommonIPCRenderer.rendererCommunicator.onMessage(a.CommonIPCMessage.msgNCNativeFireEvent, e => {
                    this.handleNativeFireEvent(e.msg.args)
                })
            }

            handleCallJsFunctionById(t) {
                do {
                    let i = t[0];
                    if (!n.isNumber(i)) {
                        o.error(`id error id = ${i}`);
                        break
                    }
                    if (e.idGenerator.isInvalidId(i)) {
                        o.error(`id = ${i} invalid`);
                        break
                    }
                    let a = null, r = 0;
                    if (this.jsCallbacks.has(i) && (r = 1, a = this.jsCallbacks.get(i)), this.jsReturnCallbacks.has(i) && (r = 2, a = this.jsReturnCallbacks.get(i)), 0 === r) {
                        o.error(`callbacks[${i}] is null`);
                        break
                    }
                    t.splice(0, 1), a.apply(null, t), 2 === r && this.jsReturnCallbacks.delete(i)
                } while (0)
            }

            handleCallJsFunctionByName(e) {
                do {
                    let t = e[0];
                    if (!n.isString(t)) {
                        o.error(`funcName error funcName = ${t}`);
                        break
                    }
                    if (!this.jsRegisterFunctions.has(t)) {
                        o.error(`jsRegisterFunctions[${t}] is null`);
                        break
                    }
                    e.splice(0, 1), this.jsRegisterFunctions.get(t).apply(null, e)
                } while (0)
            }

            handleNativeFireEvent(e) {
                do {
                    let t = e[0];
                    if (!n.isString(t)) {
                        o.warning(`eventName error eventName = ${t}`);
                        break
                    }
                    if (!this.eventJsCallbakcs.has(t)) {
                        o.warning(`eventJsCallbakcs[${t}] is null`);
                        break
                    }
                    e.shift(), this.eventJsCallbakcs.get(t).forEach((t, i, a) => {
                        o.information(`value = ${t}, key = ${i}, map = ${a}`), n.isNullOrUndefined(t) || t.apply(null, e)
                    })
                } while (0)
            }

            notifyNativeCallReady() {
                do {
                    if (!this.targetCommunitorInfo) {
                        o.error("notifyNativeCallReady but targetCommunitorInfo null");
                        break
                    }
                    s.CommonIPCRenderer.rendererCommunicator.sendMessageToRenderer(this.targetCommunitorInfo.id, {
                        name: a.CommonIPCMessage.msgNCNativeCallReady,
                        args: [s.CommonIPCRenderer.rendererCommunicator.getCommunicatorInfo()]
                    })
                } while (0)
            }

            printArgs(e) {
                for (let t in e) o.information(`index ${t} = `, e[t])
            }
        }

        e.NativeCallImpl = d, e.nativeCall = new d
    }(t.NativeCallModule || (t.NativeCallModule = {}))
}, function (e, t, i) {
    e.exports = i(615)
}, function (e, t) {
    e.exports = require("electron")
}, function (e, t) {
    e.exports = require("events")
}, function (e, t, i) {
    "use strict";
    var n = i(52), o = i(504), a = i(506), r = i(100), s = i(62), l = i(507).http, d = i(507).https, u = i(50),
        c = i(80), h = i(627), f = i(380), p = i(505);
    e.exports = function (e) {
        return new Promise(function (t, i) {
            var g, m = e.data, v = e.headers;
            if (v["User-Agent"] || v["user-agent"] || (v["User-Agent"] = "axios/" + h.version), m && !n.isStream(m)) {
                if (Buffer.isBuffer(m)) ; else if (n.isArrayBuffer(m)) m = new Buffer(new Uint8Array(m)); else {
                    if (!n.isString(m)) return i(f("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", e));
                    m = new Buffer(m, "utf-8")
                }
                v["Content-Length"] = m.length
            }
            var y = void 0;
            e.auth && (y = (e.auth.username || "") + ":" + (e.auth.password || ""));
            var T = u.parse(e.url), w = T.protocol || "http:";
            if (!y && T.auth) {
                var k = T.auth.split(":");
                y = (k[0] || "") + ":" + (k[1] || "")
            }
            y && delete v.Authorization;
            var C = "https:" === w, b = C ? e.httpsAgent : e.httpAgent, I = {
                path: a(T.path, e.params, e.paramsSerializer).replace(/^\?/, ""),
                method: e.method,
                headers: v,
                agent: b,
                auth: y
            };
            e.socketPath ? I.socketPath = e.socketPath : (I.hostname = T.hostname, I.port = T.port);
            var S, _ = e.proxy;
            if (!_ && !1 !== _) {
                var D = w.slice(0, -1) + "_proxy", A = process.env[D] || process.env[D.toUpperCase()];
                if (A) {
                    var N = u.parse(A);
                    if (_ = {host: N.hostname, port: N.port}, N.auth) {
                        var x = N.auth.split(":");
                        _.auth = {username: x[0], password: x[1]}
                    }
                }
            }
            if (_ && (I.hostname = _.host, I.host = _.host, I.headers.host = T.hostname + (T.port ? ":" + T.port : ""), I.port = _.port, I.path = w + "//" + T.hostname + (T.port ? ":" + T.port : "") + I.path, _.auth)) {
                var E = new Buffer(_.auth.username + ":" + _.auth.password, "utf8").toString("base64");
                I.headers["Proxy-Authorization"] = "Basic " + E
            }
            e.transport ? S = e.transport : 0 === e.maxRedirects ? S = C ? s : r : (e.maxRedirects && (I.maxRedirects = e.maxRedirects), S = C ? d : l), e.maxContentLength && e.maxContentLength > -1 && (I.maxBodyLength = e.maxContentLength);
            var O = S.request(I, function (n) {
                if (!O.aborted) {
                    clearTimeout(g), g = null;
                    var a = n;
                    switch (n.headers["content-encoding"]) {
                        case"gzip":
                        case"compress":
                        case"deflate":
                            a = a.pipe(c.createUnzip()), delete n.headers["content-encoding"]
                    }
                    var r = n.req || O, s = {
                        status: n.statusCode,
                        statusText: n.statusMessage,
                        headers: n.headers,
                        config: e,
                        request: r
                    };
                    if ("stream" === e.responseType) s.data = a, o(t, i, s); else {
                        var l = [];
                        a.on("data", function (t) {
                            l.push(t), e.maxContentLength > -1 && Buffer.concat(l).length > e.maxContentLength && i(f("maxContentLength size of " + e.maxContentLength + " exceeded", e, null, r))
                        }), a.on("error", function (t) {
                            O.aborted || i(p(t, e, null, r))
                        }), a.on("end", function () {
                            var n = Buffer.concat(l);
                            "arraybuffer" !== e.responseType && (n = n.toString("utf8")), s.data = n, o(t, i, s)
                        })
                    }
                }
            });
            O.on("error", function (t) {
                O.aborted || i(p(t, e, null, O))
            }), e.timeout && !g && (g = setTimeout(function () {
                O.abort(), i(f("timeout of " + e.timeout + "ms exceeded", e, "ECONNABORTED", O))
            }, e.timeout)), e.cancelToken && e.cancelToken.promise.then(function (e) {
                O.aborted || (O.abort(), i(e))
            }), n.isStream(m) ? m.pipe(O) : O.end(m)
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(12);
    !function (e) {
        let t;
        !function (e) {
            e.Info = "info", e.Warning = "warning", e.Error = "error", e.Success = "success"
        }(t = e.ConfirmType || (e.ConfirmType = {})), e.confirm = function (e, t = {}) {
            return n(this, void 0, void 0, function* () {
                let i = String(Math.random()).replace(/\D/, "");
                o.ipcRenderer.send("message-box-confirm-create", {options: e, dialogConf: t, boxId: i});
                let n = yield a.asyncRemoteCall.getIpcMain();
                return n.once(`message-box-init-${i}`, t => {
                    t.sender.send("message-box-init-reply", {popType: "confirm", options: e})
                }), new Promise(e => {
                    n.once(`message-box-resolve-${i}`, (t, i, n) => {
                        e({action: i, checkboxChecked: n})
                    })
                })
            })
        }, e.pop = function (e, t = {}) {
            return n(this, void 0, void 0, function* () {
                let i = String(Math.random()).replace(/\D/, ""), n = e.parentId;
                o.ipcRenderer.send("message-box-pop-create", {dialogConf: t, boxId: i, parentId: n});
                let r = yield a.asyncRemoteCall.getIpcMain();
                return r.once(`message-box-init-${i}`, t => {
                    t.sender.send("message-box-init-reply", {popType: "message-box", options: e})
                }), new Promise(e => {
                    r.once(`message-box-resolve-${i}`, (t, i, n) => {
                        e({action: i, formData: n})
                    })
                })
            })
        }, e.custom = function (e, t = {}, i = {}) {
            return n(this, void 0, void 0, function* () {
                let n = String(Math.random()).replace(/\D/, "");
                o.ipcRenderer.send("message-box-custom-create", JSON.parse(JSON.stringify({
                    popType: e,
                    dialogConf: i,
                    boxId: n,
                    options: t
                })));
                let r = yield a.asyncRemoteCall.getIpcMain();
                return r.once(`message-box-init-${n}`, n => {
                    n.sender.send("message-box-init-reply", JSON.parse(JSON.stringify({
                        popType: e,
                        options: t,
                        dialogConf: i
                    })))
                }), new Promise(e => {
                    r.once(`message-box-resolve-${n}`, (t, i, n) => {
                        e({action: i, args: n})
                    })
                })
            })
        }, e.customIndividuation = function (e, t = {}, i = {}) {
            return n(this, void 0, void 0, function* () {
                let n = String(Math.random()).replace(/\D/, "");
                return o.ipcRenderer.send("message-box-individuation-create", {
                    popType: e,
                    dialogConf: i,
                    boxId: n,
                    options: t
                }), (yield a.asyncRemoteCall.getIpcMain()).once(`message-box-init-${n}`, n => {
                    n.sender.send("message-box-init-reply", {popType: e, options: t, dialogConf: i})
                }), new Promise(e => {
                    o.ipcRenderer.once(`message-box-resolve-${n}`, (t, i, n) => {
                        e({action: i, args: n})
                    })
                })
            })
        }
    }(t.MessageBox || (t.MessageBox = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(55), a = i(19), r = i(12), s = i(635), l = i(2), d = i(5), u = i(0), c = i(8), h = i(29), f = i(28),
        p = i(66), g = i(7), m = i(13), v = i(636), y = i(125), T = i(20), w = i(3), k = i(511), C = i(17),
        b = g.default(l.join(__rootDir, "../bin/ThunderHelper.node")), I = u.default.getLogger("login-helper");
    !function (e) {
        let t;
        !function (e) {
            e[e.Success = 0] = "Success", e[e.UnKnown = -1] = "UnKnown", e[e.WrongParam = -2] = "WrongParam"
        }(t = e.CommonResultCodeType || (e.CommonResultCodeType = {}));
        e.loginUIHelper = new class {
            constructor() {
            }

            createLoginWnd(e, t, i, n, o) {
                a.ipcRenderer.send(m.NodeEventMesssageNS.eventLoginWndCreate, e, t, i, n, o)
            }

            createLoginWndEx(e, t, i, o, s) {
                return new Promise(l => n(this, void 0, void 0, function* () {
                    a.ipcRenderer.once(m.NodeEventMesssageNS.eventLoginWndCreated, (e, t) => n(this, void 0, void 0, function* () {
                        let e = yield(yield r.asyncRemoteCall.getBrowserWindow()).fromId(t);
                        l(e);
                        let i = void 0, n = "unknown";
                        i = C.NativeCallModule.nativeCall.AttachNativeEvent("onLoginWndClose", e => {
                            C.NativeCallModule.nativeCall.DetachNativeEvent("onLoginWndClose", i), i = void 0, I.information("on login wnd event", e), n = e
                        }), e.once("closed", () => {
                            I.information("on login wnd close", n)
                        })
                    })), a.ipcRenderer.send(m.NodeEventMesssageNS.eventLoginWndCreate, e, t, i, o, s)
                }))
            }

            closeLoginWnd(e) {
                a.ipcRenderer.send(m.NodeEventMesssageNS.eventLoginWndClose, e)
            }

            updateLoginWnd(e, t, i, n, o) {
                a.ipcRenderer.send(m.NodeEventMesssageNS.eventLoginWndShow, e, t, i, n, o), a.ipcRenderer.once(m.NodeEventMesssageNS.eventLoginWndShowResult, (e, t) => {
                    t && y.LoginOptionNS.loginOption.attachListenerEvent()
                })
            }

            createPersonalInfoWnd(e, t) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(i => n(this, void 0, void 0, function* () {
                        a.ipcRenderer.once("personal-info-window-created", (e, t) => n(this, void 0, void 0, function* () {
                            let e = yield r.asyncRemoteCall.getBrowserWindow();
                            i(yield e.fromId(t))
                        })), a.ipcRenderer.once("personal-info-window-ready-to-show", (e, t) => {
                            w.client.broadcastEvent(k.ThunderEvent.hoverWindowReadyToShow)
                        });
                        let o = yield w.client.callServerFunction("IsLogined");
                        a.ipcRenderer.send("create-personal-info-window", e, t, o)
                    }))
                })
            }

            createRetryLoginWnd(e, t) {
                a.ipcRenderer.send(m.NodeEventMesssageNS.eventRetryLoginWndCreate, e, t)
            }

            createModifierUserInfoWnd(e) {
                a.ipcRenderer.send(m.NodeEventMesssageNS.eventModifierUserinfoWndCreate, e)
            }
        }, e.loginSDKHelper = new class {
            constructor() {
                this.curUserInfo = null, this.key = "XUNLEIACCOUNT123", this.loginInfo = null, this.loginDataDir = l.join(__profilesDir, "xlaccount/"), this.loginDataPath = l.join(__profilesDir, "xlaccount/accountdata.dat"), this.deviceId = "", this.canSaveDataNow = !0, this.dataToSave = null, this.eventEmitter = null, I.information("loginSDKHelper obj create"), this.eventEmitter = new T.EventEmitter, this.eventEmitter.setMaxListeners(0)
            }

            init() {
                return n(this, void 0, void 0, function* () {
                    let e = yield c.FileSystemAWNS.existsAW(`${this.loginDataPath}`);
                    e || (e = yield c.FileSystemAWNS.mkdirsAW(`${this.loginDataDir}`)) && (yield c.FileSystemAWNS.writeFileAW(`${this.loginDataPath}`, "")), yield this.loadLoginDataFromFile(), yield this.getDeviceID(), yield v.activityObj.getActiveConfig()
                })
            }

            getDeviceID() {
                return n(this, void 0, void 0, function* () {
                    let e = "";
                    do {
                        if (null !== this.deviceId && void 0 !== this.deviceId && "" !== this.deviceId) {
                            e = this.deviceId;
                            break
                        }
                        let t = "", i = "", n = "SYSTEM_CONFIG", o = "DEVICEID", a = b.getPublicUserDataPath(),
                            r = l.join(a, "Thunder Network/Thunder"), s = l.join(r, "/xlconfig.ini");
                        if ("" !== a && ((yield c.FileSystemAWNS.mkdirsAW(r)) && (i = b.readINI(s, n, o)), I.information("得到文件保存 peeridMd5Str:", i)), "" === i) {
                            let e = b.getPeerID();
                            i = h.ToolsUtilitiesAWNS.genarateMd5(e), I.information("重新计算 peeridStr:", e, ";peeridMd5Str:", i), (yield c.FileSystemAWNS.mkdirsAW(r)) && b.writeINI(s, n, o, i)
                        }
                        let d = b.getDmideCode(), u = h.ToolsUtilitiesAWNS.genarateMd5(d);
                        I.information("dmideCodeStr:", d, ";dmideCodeMd5Str:", u), t = u + i, e = h.ToolsUtilitiesAWNS.genarateMd5(t), this.deviceId = e
                    } while (0);
                    return I.information("deviceIDMd5Str:", e), e
                })
            }

            getInitData() {
                return n(this, void 0, void 0, function* () {
                    let e = yield w.client.callServerFunction("GetInitUserLoginParam"), t = e.clientId,
                        i = e.clientSecret, n = l.join(__rootDir, "../../Thunder.exe"), a = b.getFileVersion(n),
                        r = v.activityObj.getActivityInfo(), s = r.activityEnable, d = r.activityCssPath;
                    return I.information("getInitData:", r), JSON.stringify({
                        appid: "0",
                        package: "com.xunlei.thunderx",
                        appkey: "4af30ad6c6b0c02c4d8df3ded2cb79b8",
                        platform: "pc-xdas",
                        osversion: o.release(),
                        thirdLoginDefault: ["weixin", "qq"],
                        thirdLoginGroup: ["qq", "weixin", "sina", "alipay"],
                        loginTypes: ["account", "mobile"],
                        registerTypes: ["mobile"],
                        uiText: "xlx_new",
                        clientVersion: a,
                        thunderVersion: a,
                        activityEnable: s,
                        activityCssPath: d,
                        clientId: t,
                        clientSecret: i,
                        enableOauthLogout: !0,
                        platformVersion: "0",
                        appName: "PC-com.xunlei.thunderx"
                    })
                })
            }

            saveDataToFile(e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = !1;
                    return this.canSaveDataNow ? (this.canSaveDataNow = !1, i = yield c.FileSystemAWNS.writeFileAW(e, t), this.canSaveDataNow = !0, this.eventEmitter.emit("OnSaveDataToFileComplete")) : (this.dataToSave = t, this.eventEmitter.removeAllListeners("OnSaveDataToFileComplete"), this.eventEmitter.once("OnSaveDataToFileComplete", () => n(this, void 0, void 0, function* () {
                        i = yield this.saveDataToFile(e, this.dataToSave)
                    }))), i
                })
            }

            saveData(e, t, i) {
                return n(this, void 0, void 0, function* () {
                    I.information("SaveData type:", e, ";key:", t, ";data:", i);
                    let n = !1;
                    do {
                        if (d.isNullOrUndefined(e) || d.isNullOrUndefined(t) || d.isNullOrUndefined(i) || "" === i) break;
                        if ("memory" === e) {
                            d.isNullOrUndefined(this.curUserInfo) && (this.curUserInfo = {});
                            try {
                                this.curUserInfo[t] = JSON.parse(i)
                            } catch (e) {
                                I.information(e)
                            }
                            n = !0
                        } else if ("file" === e) {
                            d.isNullOrUndefined(this.loginInfo) && (this.loginInfo = {});
                            try {
                                this.loginInfo[t] = JSON.parse(i);
                                let e = JSON.stringify(this.loginInfo);
                                I.information("SaveData bufStr:", e);
                                let o = new Buffer(e), a = h.ToolsUtilitiesAWNS.encryptBuffer(o, this.key);
                                n = yield this.saveDataToFile(this.loginDataPath, a)
                            } catch (e) {
                                I.information(e)
                            }
                        } else n = !0
                    } while (0);
                    return f.NativeCallHostModule.nativeCallHost.fireNativeEvent("onChangeLoginData", e, t, i), n
                })
            }

            fireEvent(e, i) {
                return n(this, void 0, void 0, function* () {
                    let n = {code: t.UnKnown};
                    do {
                        if (d.isNullOrUndefined(e)) {
                            n.code = t.WrongParam;
                            break
                        }
                        f.NativeCallHostModule.nativeCallHost.fireNativeEvent("onFireLoginEvent", e, i), n.code = t.Success
                    } while (0);
                    return n
                })
            }

            loadData(e, t) {
                let i = null;
                do {
                    if (d.isNullOrUndefined(e) || d.isNullOrUndefined(t)) break;
                    if ("memory" === e) {
                        if (d.isNullOrUndefined(this.curUserInfo) || d.isNullOrUndefined(this.curUserInfo[t]) || "" === this.curUserInfo[t]) break;
                        i = JSON.stringify(this.curUserInfo[t])
                    } else {
                        if ("file" !== e) break;
                        if (d.isNullOrUndefined(this.loginInfo) || d.isNullOrUndefined(this.loginInfo[t]) || "" === this.loginInfo[t]) break;
                        i = JSON.stringify(this.loginInfo[t])
                    }
                } while (0);
                return I.information("loadData:data = ", i), i
            }

            loadLoginDataFromFile() {
                return n(this, void 0, void 0, function* () {
                    do {
                        let e = yield c.FileSystemAWNS.readFileAW(`${this.loginDataPath}`);
                        if (d.isNullOrUndefined(e) || "" === e.toString()) {
                            I.information("loadLoginDataFromFile no buf data");
                            break
                        }
                        let t = "";
                        try {
                            if (t = h.ToolsUtilitiesAWNS.decryptBuffer(e, this.key).toString(), d.isNullOrUndefined(t) || "" === t) {
                                I.information("loadLoginDataFromFile decryption bufStr is null");
                                break
                            }
                            this.loginInfo = JSON.parse(t), I.information("loadLoginDataFromFile decryption this.loginInfo:", this.loginInfo)
                        } catch (e) {
                            yield c.FileSystemAWNS.unlinkAW(this.loginDataPath);
                            break
                        }
                    } while (0)
                })
            }
        }, e.loginHelper = new class {
            constructor() {
                this.curUserInfo = null, this.curLoginInfo = null, this.dir = l.join(__profilesDir, "Community/UserImages"), I.information("loginHelper obj create")
            }

            getCurInternetState() {
                return b.getCurInternetState()
            }

            getUserHeaderAw(e) {
                return n(this, void 0, void 0, function* () {
                    I.information("enter getUserHeaderAw");
                    let t = "";
                    do {
                        if (null === e || void 0 === e || "" === e) break;
                        let i = e + ".jpg", n = l.join(this.dir, i);
                        (yield c.FileSystemAWNS.existsAW(n)) && (t = `file:///${n}`)
                    } while (0);
                    return I.information("leave getUserHeaderAw:", t, e), t
                })
            }

            getUserHeader(e) {
                I.information("enter getUserHeader");
                let t = "";
                do {
                    if (null === e || void 0 === e || "" === e) break;
                    let i = e + ".jpg", n = l.join(this.dir, i);
                    b.queryFileExists(n) && (t = `file:///${n}`)
                } while (0);
                return I.information("leave getUserHeader:", t, e), t
            }

            updateHeaderAw(e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = "";
                    do {
                        if (I.information("enter updateHeaderAw:", e, t), null === e || void 0 === e || "" === e || null === t || void 0 === t || "" === t) break;
                        let n = t + ".jpg", o = l.join(this.dir, n);
                        (yield p.AxiosNS.downloadFileAW(e, o)) && (i = `file:///${o}?_=${Date.now()}`)
                    } while (0);
                    return I.information("leave updateHeaderAw:", i), i
                })
            }

            getUserInfo(...e) {
                void 0 !== s.xlQuickLogin && s.xlQuickLogin.getUserInfo(...e)
            }

            getSessionIDAw() {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        s.xlQuickLogin.getUserInfo("sessionid", t => {
                            e(t)
                        })
                    })
                })
            }

            getUserInfoAw(e) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(t => {
                        e ? s.xlQuickLogin.getUserInfo(e, e => {
                            t(e)
                        }) : s.xlQuickLogin.getUserInfo(e => {
                            t(e)
                        })
                    })
                })
            }

            getUserInfoEx(e, t) {
                s.xlQuickLogin.getAllUserInfo(i => {
                    this.curUserInfo = i, null !== this.curUserInfo && void 0 !== this.curUserInfo && "" !== this.curUserInfo ? s.xlQuickLogin.getUserInfo(i => {
                        this.curLoginInfo = i, I.information(this.curLoginInfo);
                        let n = "";
                        if (null === e || 0 === e || 3 === e) {
                            let e = {}, t = this.getUserInfoStr();
                            e[1] = t;
                            let i = this.getVipInfoStr();
                            e[2] = i, n = JSON.stringify(e)
                        } else if (1 === e) {
                            let e = this.getUserInfoStr();
                            n = JSON.stringify(e)
                        } else if (2 === e) {
                            let e = this.getVipInfoStr();
                            n = JSON.stringify(e)
                        }
                        t(n)
                    }) : t("")
                })
            }

            getAllUserInfo(...e) {
                void 0 !== s.xlQuickLogin && s.xlQuickLogin.getAllUserInfo(...e)
            }

            getAllUserInfoAw() {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        s.xlQuickLogin.getAllUserInfo(t => {
                            e(t)
                        })
                    })
                })
            }

            getUserInfoByKeyAw(e, t) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(i => {
                        null !== t && void 0 !== t && "vip_xl" === t ? s.xlQuickLogin.getAllUserInfo(t => {
                            let n = "";
                            do {
                                if (null === t || void 0 === t) break;
                                if (null === t.vipList || void 0 === t.vipList) break;
                                if (null === t.vipList[0] || void 0 === t.vipList[0]) break;
                                n = t.vipList[0][e]
                            } while (0);
                            i(n)
                        }) : s.xlQuickLogin.getAllUserInfo(e, e => {
                            i(e)
                        })
                    })
                })
            }

            isLogined(...e) {
                if (void 0 === s.xlQuickLogin || void 0 === e) throw new Error(void 0 === s.xlQuickLogin ? "xlQuickLogin undefined" : "args undefined");
                s.xlQuickLogin.isLogined(...e)
            }

            isLoginedAw() {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        s.xlQuickLogin.isLogined(t => {
                            e(t)
                        })
                    })
                })
            }

            showLoginDlg(e, t, i) {
                I.information(e), null !== t && void 0 !== t || (t = !0), y.LoginOptionNS.loginOption.setOption(i), f.NativeCallHostModule.nativeCallHost.fireNativeEvent("onShowLoginWnd", e, t)
            }

            logout() {
                void 0 !== s.xlQuickLogin && (I.information("调用 logout 接口"), s.xlQuickLogin.logout())
            }

            logIn(e) {
                void 0 !== s.xlQuickLogin && "function" == typeof s.xlQuickLogin.retryLogin && (I.information("enter xlQuickLogin.retryLogin"), s.xlQuickLogin.retryLogin())
            }

            switchAccount(e) {
                void 0 !== s.xlQuickLogin && "function" == typeof s.xlQuickLogin.switchAccount && s.xlQuickLogin.switchAccount()
            }

            isAutologin(...e) {
                void 0 !== s.xlQuickLogin && "function" == typeof s.xlQuickLogin.isAutologin && s.xlQuickLogin.isAutologin(...e)
            }

            channel(e) {
                void 0 !== s.xlQuickLogin && "function" == typeof s.xlQuickLogin.channel && s.xlQuickLogin.channel(e)
            }

            getVipInfo() {
                return this.getVipInfoStr()
            }

            getUserInfoStr() {
                return {
                    username: this.curLoginInfo.userName,
                    usernewno: this.curUserInfo.userNewNo,
                    userid: this.curUserInfo.userID,
                    sessionid: this.curLoginInfo.sessionid,
                    nickName: this.curUserInfo.nickName,
                    account: this.curUserInfo.account,
                    rank: this.curUserInfo.rank,
                    order: this.curUserInfo.order,
                    isSubAccount: this.curUserInfo.isSubAccount,
                    country: this.curUserInfo.country,
                    province: this.curUserInfo.province,
                    city: this.curUserInfo.city,
                    birthday: this.curUserInfo.birthday,
                    sex: this.curUserInfo.sex,
                    mobile: this.curUserInfo.mobile,
                    isSpecialNum: this.curUserInfo.isSpecialNum,
                    role: this.curUserInfo.role,
                    todayScore: this.curUserInfo.todayScore,
                    personalSign: this.curUserInfo.personalSign
                }
            }

            getVipInfoStr() {
                let e = this.curUserInfo && this.curUserInfo.vipList && this.curUserInfo.vipList[0] || {};
                return {
                    vasid: e.vasid,
                    isVip: e.isVip,
                    vipLevel: e.vipLevel,
                    expireDate: e.expireDate,
                    vasType: e.vasType,
                    payId: e.payId,
                    payName: e.payName,
                    vipGrow: e.vipGrow,
                    vipDayGrow: e.vipDayGrow,
                    isAutoDeduct: e.isAutoDeduct,
                    isRemind: e.isRemind,
                    isYear: e.isYear,
                    register: e.register
                }
            }
        }
    }(t.LoginHelperNS || (t.LoginHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(98), o = i(720), a = i(721), r = i(722), s = i(723), l = i(724), d = i(725), u = i(726), c = i(727),
        h = i(728), f = i(729), p = i(730), g = i(731), m = i(732), v = i(49), y = i(733), T = i(149);
    n.default.use(o.default);
    const w = new o.default.Store({
        modules: {
            Tabs: r.default,
            DownloadListState: l.default,
            ToolbarState: d.default,
            VipSpeedState: u.default,
            WebView: c.default,
            SettingConf: s.default,
            Community: h.default,
            PrivateSpaceState: f.default,
            UpgradeTaskState: p.default,
            BookMarks: g.default,
            Group: m.default,
            Navs: v.default,
            Users: y.default,
            Configs: T.default
        }, strict: !1
    });
    t.connector = new a.default(w)
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(62), a = i(18), r = i(0), s = i(20), l = i(9), d = i(8), u = r.default.getLogger("config-modules"),
        c = `${__profilesDir}/modules.json`;
    const h = new class {
        constructor() {
            this.configModulesJsonData = null, this.eventEmitter = new s.EventEmitter, this.inited = !1
        }

        cache(e) {
            return n(this, void 0, void 0, function* () {
                yield d.FileSystemAWNS.writeFileAW(c, JSON.stringify(e))
            })
        }

        loadLatest() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!(yield d.FileSystemAWNS.existsAW(c))) break;
                    let e = (yield d.FileSystemAWNS.readFileAW(c)).toString();
                    try {
                        this.configModulesJsonData = JSON.parse(e)
                    } catch (e) {
                    }
                } while (0)
            })
        }

        update() {
            return n(this, void 0, void 0, function* () {
                let e = null, t = !1;
                try {
                    a.default.defaults.adapter = i(21);
                    let t = new o.Agent({rejectUnauthorized: !1});
                    e = yield a.default.get("https://static-xl.a.88cdn.com/json/modules.json", {
                        timeout: 1e4,
                        httpsAgent: t
                    })
                } catch (e) {
                    u.information(e)
                }
                if (null !== e && void 0 !== e.status && 200 === e.status && void 0 !== e.data && null !== e.data && "" !== e.data && (this.configModulesJsonData = e.data, this.cache(e.data).catch(), t = !0), !t) {
                    let t = null !== e ? e.status : -1;
                    l.XLStatNS.trackEvent("business", "module_json_download_fail", "", 0, 0, 0, 0, `err_code=${t}`)
                }
                return t
            })
        }

        init() {
            return n(this, void 0, void 0, function* () {
                let e = yield this.update();
                e || (u.information("module_json_download_fail load cache"), yield this.loadLatest().catch()), setInterval(() => n(this, void 0, void 0, function* () {
                    this.update().catch()
                }), 36e5), this.inited = !0, this.eventEmitter.emit("OnConfigModulesLoaded", e)
            })
        }

        getConfigInfo(e, t) {
            let i = null;
            do {
                if (null === this.configModulesJsonData || void 0 === this.configModulesJsonData) break;
                null === e || void 0 === e || "" === e ? i = this.configModulesJsonData : null === t || void 0 === t || "" === t ? null !== this.configModulesJsonData[e] && void 0 !== this.configModulesJsonData[e] && (i = this.configModulesJsonData[e]) : null !== this.configModulesJsonData[e] && void 0 !== this.configModulesJsonData[e] && null !== this.configModulesJsonData[e][t] && void 0 !== this.configModulesJsonData[e][t] && (i = this.configModulesJsonData[e][t])
            } while (0);
            return i
        }

        getEventEmitter() {
            return this.eventEmitter
        }

        isInited() {
            return this.inited
        }

        isInitedAw() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    this.inited ? e(!0) : this.eventEmitter.once("OnConfigModulesLoaded", t => {
                        e(!0)
                    })
                })
            })
        }

        getJsonData() {
            return this.configModulesJsonData
        }
    };
    t.default = h
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(5), r = i(614), s = i(32), l = i(72), d = i(501), u = i(20),
        c = o.default.getLogger("DownloadKernel.CategoryManager");

    class h {
        constructor() {
            this.newCategoryId = 0, this.categorys = new Map, this.userId = "", this.accountPassword = "", this.isInit = !1, this.isIniting = !1, this.eventEmitter = new u.EventEmitter
        }

        innerInit() {
            do {
                if (this.isIniting) break;
                this.isIniting = !0, s.ThunderKernel.loadCategory(e => {
                    e.forEach(e => {
                        if (c.information("load category, name:", e.name), e.name === h.privateCategoryName) {
                            let t = r.PrivateCategory.createCategoryFromData(e);
                            t && this.categorys.set(e.categoryId, t)
                        } else if (e.name === h.panCategoryName) {
                            let t = d.CommonCategory.createCategoryFromData(e);
                            t && this.categorys.set(e.categoryId, t)
                        } else c.warning("unkown category name:", e.name);
                        void 0 !== e.categoryId && this.newCategoryId <= e.categoryId && (this.newCategoryId = e.categoryId + 1)
                    }), this.isIniting = !1, this.isInit = !0, this.eventEmitter.emit(h.loadedEvent)
                })
            } while (0)
        }

        init() {
            return n(this, void 0, void 0, function* () {
                if (!this.isInit && (this.innerInit(), this.isIniting)) return new Promise((e, t) => {
                    this.eventEmitter.on(h.loadedEvent, () => {
                        e()
                    })
                })
            })
        }

        getCategorys() {
            return this.categorys
        }

        getCategoryByName(e) {
            let t = new Map;
            for (let i of this.categorys.values()) i.getName() === e && t.set(i.getId(), i);
            return t
        }

        getCategoryCount() {
            return this.categorys.size
        }

        getCategoryFromId(e) {
            return this.categorys.get(e)
        }

        getCategoryView(e, t) {
            let i = null, n = this.getCategoryFromId(e);
            return n && (i = n.getCategoryViewFromId(t)), i
        }

        getCategoryFromUserId(e, t, i) {
            if (!a.isString(e) || !t || "" === t) return null;
            let n = null;
            for (let i of this.categorys.values()) if (i.getName() === e && i.getUserName() === t) {
                n = i;
                break
            }
            return n || (c.information("create new category, id:", this.newCategoryId), (n = new d.CommonCategory(this.newCategoryId)).setName(e), n.setDescription(i || e), n.setUserName(t), n.setAccountPassword(""), this.categorys.set(this.newCategoryId, n), this.newCategoryId++, s.ThunderKernel.createCategory(n.getId(), -1, -1, n.getName(), n.getDescription(), n.getUserName(), n.getAccountPassword())), n
        }

        getPrivateCategoryFromUserId(e) {
            if (!e || "" === e) return null;
            let t = null;
            for (let i of this.categorys.values()) if (i.getUserName() === e && i.getName() === h.privateCategoryName) {
                t = i;
                break
            }
            return t || (c.information("create new private category, id:", this.newCategoryId), (t = new r.PrivateCategory(this.newCategoryId)).setName(h.privateCategoryName), t.setDescription("Private Space"), t.setUserName(e), t.setAccountPassword(""), this.categorys.set(this.newCategoryId, t), this.newCategoryId++, s.ThunderKernel.createCategory(t.getId(), -1, -1, t.getName(), t.getDescription(), t.getUserName(), t.getAccountPassword())), t
        }

        getCurrentPrivateCategory() {
            if (!this.userId || "" === this.userId) return null;
            return this.getPrivateCategoryFromUserId(this.userId)
        }

        setUserInfo(e, t) {
            e = e || "", t = t || "";
            let i = !1;
            this.userId !== e && (this.userId = e, i = !0);
            let n = "";
            if ("" === t) n = ""; else {
                let e = l.createHash("md5");
                e.update(this.accountPassword), n = e.digest("hex")
            }
            if (this.accountPassword !== n && (this.accountPassword = n, i = !0), i) {
                let e = null;
                for (let t of this.categorys.values()) if (t.getUserName() === this.userId) {
                    e = t;
                    break
                }
                e && e.setAccountPassword(this.accountPassword)
            }
        }

        isPrivateCategory(e) {
            let t = !1;
            do {
                let i = this.getCategoryFromId(e);
                if (!i) break;
                i.getName() === h.privateCategoryName && (t = !0)
            } while (0);
            return t
        }
    }

    h.privateCategoryName = "Private", h.panCategoryName = "ThunderPanPlugin", h.loadedEvent = "OnCatetoryLoaded", t.CategoryManager = h, function (e) {
        const t = new h;
        e.getCategoryManager = function () {
            return t
        }
    }(t.DownloadKernelCategoryManager || (t.DownloadKernelCategoryManager = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e[e.Success = 0] = "Success", e[e.FunctionUnExist = 1] = "FunctionUnExist", e[e.ParamError = 2] = "ParamError", e[e.CallFailed = 3] = "CallFailed", e[e.NotAllowed = 4] = "NotAllowed"
    }(t.NativeFunctionErrorCode || (t.NativeFunctionErrorCode = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(5), o = i(121), a = i(122), r = i(377), s = 0, l = "#home-1EAC214F-7644-4163-9EB8-AF4BAA62D144";
    !function (e) {
        class t {
            constructor() {
                this.nativeCallInfoList = [], this.webviewInfoId = -1
            }

            initialize() {
                this.bindMsgListeners()
            }

            addDelegate(e) {
                this.delegate = e
            }

            removeDelegate() {
                this.delegate = null
            }

            callJsFunctionById(e, t, ...i) {
                o.information(`funcId = ${t}`);
                do {
                    if (!n.isNumber(e)) {
                        o.error(`nativeCallId = ${e} error`);
                        break
                    }
                    if (!n.isNumber(t)) {
                        o.error(`funcId = ${t} error`);
                        break
                    }
                    if (this.isInvalidId(t)) {
                        o.error(`funcId = ${t} invalid`);
                        break
                    }
                    let r = a.CommonIPCMessage.msgNCCallJsFunctionById, s = [t].concat(i);
                    this.isWebviewInfo(e) ? this.sendMsgToWebviewNativeCall(r, s) : this.sendMsgToNativeCall(e, r, s)
                } while (0)
            }

            callJsFunctionByName(e, t, ...i) {
                o.information(`funcName = ${t}`);
                do {
                    if (!n.isNumber(e)) {
                        o.error(`nativeCallId = ${e} error`);
                        break
                    }
                    if (n.isNullOrUndefined(t) || 0 === t.length) {
                        o.error(`funcName = ${t} error`);
                        break
                    }
                    let r = a.CommonIPCMessage.msgNCCallJsFunctionByName, s = [t].concat(i);
                    this.isWebviewInfo(e) ? this.sendMsgToWebviewNativeCall(r, s) : this.sendMsgToNativeCall(e, r, s)
                } while (0)
            }

            fireNativeEvent(e, ...t) {
                o.information(`eventName = ${e}`);
                do {
                    if (n.isNullOrUndefined(e) || 0 === e.length) {
                        o.error(`eventName = ${e} error`);
                        break
                    }
                    let i = a.CommonIPCMessage.msgNCNativeFireEvent, r = [e].concat(t);
                    this.sendMsgToWebviewNativeCall(i, r);
                    for (let e of this.nativeCallInfoList) this.sendMsgToNativeCall(e.id, i, r)
                } while (0)
            }

            bindMsgListeners() {
                this.bindWebviewMsgListeners(), this.bindIPCMsgListeners()
            }

            bindWebviewMsgListeners() {
                const e = document.querySelector(l);
                n.isNullOrUndefined(e) ? o.error("webview is null") : e.addEventListener("ipc-message", e => {
                    do {
                        if (e.channel === a.CommonIPCMessage.msgNCCallNativeFunction) {
                            this.handleWebviewCallNativeFunction(e.args[0]);
                            break
                        }
                        if (e.channel === a.CommonIPCMessage.msgNCCheckNativeFunction) {
                            this.handleWebviewCheckNativeFunction(e.args[0]);
                            break
                        }
                    } while (0)
                })
            }

            bindIPCMsgListeners() {
                r.CommonIPCRenderer.rendererCommunicator.onMessage(a.CommonIPCMessage.msgNCCallNativeFunction, e => {
                    this.handleCallNativeFunction(e)
                }), r.CommonIPCRenderer.rendererCommunicator.onMessage(a.CommonIPCMessage.msgNCCheckNativeFunction, e => {
                    this.handleCheckNativeFunction(e)
                }), r.CommonIPCRenderer.rendererCommunicator.onMessage(a.CommonIPCMessage.msgNCNativeCallReady, e => {
                    this.handleNativeCallReady(e.msg.args)
                })
            }

            handleCallNativeFunction(e) {
                do {
                    if (n.isNullOrUndefined(this.delegate)) {
                        o.error("delegate is null");
                        break
                    }
                    if (n.isNullOrUndefined(e)) {
                        o.error("msgInfo is null");
                        break
                    }
                    let t = e.senderInfo;
                    if (n.isNullOrUndefined(t)) {
                        o.error("nativeCallInfo is null");
                        break
                    }
                    let i = e.msg.args;
                    if (n.isNullOrUndefined(i)) {
                        o.error("args is null");
                        break
                    }
                    let a = i[0];
                    if (!n.isString(a) || 0 === a.length) {
                        o.error(`funcName = ${a} error`);
                        break
                    }
                    let r = i[1];
                    if (!n.isNumber(r)) {
                        o.error(`callbackId = ${r} error`);
                        break
                    }
                    i.splice(0, 2), this.appendNativeCallInfoList(t), this.delegate.onJsCallNativeFunction(t.id, a, r, i)
                } while (0)
            }

            handleCheckNativeFunction(e) {
                do {
                    if (n.isNullOrUndefined(this.delegate)) {
                        o.error("delegate is null");
                        break
                    }
                    if (n.isNullOrUndefined(e)) {
                        o.error("msgInfo is null");
                        break
                    }
                    let t = e.senderInfo;
                    if (n.isNullOrUndefined(t)) {
                        o.error("nativeCallInfo is null");
                        break
                    }
                    let i = e.msg.args;
                    if (n.isNullOrUndefined(i)) {
                        o.error("args is null");
                        break
                    }
                    let a = i[0];
                    if (!n.isString(a) || 0 === a.length) {
                        o.error(`funcName = ${a} error`);
                        break
                    }
                    let r = i[1];
                    if (!n.isNumber(r)) {
                        o.error(`callbackId = ${r} error`);
                        break
                    }
                    this.appendNativeCallInfoList(t), i.splice(0, 2), this.delegate.onJsCheckNativeFunction(t.id, a, r)
                } while (0)
            }

            handleNativeCallReady(e) {
                do {
                    if (n.isNullOrUndefined(e)) {
                        o.error("args is null");
                        break
                    }
                    let t = e[0];
                    if (n.isNullOrUndefined(t)) {
                        o.error(`info = ${t} error`);
                        break
                    }
                    this.appendNativeCallInfoList(t)
                } while (0)
            }

            handleWebviewCallNativeFunction(e) {
                do {
                    if (n.isNullOrUndefined(this.delegate)) {
                        o.error("delegate is null");
                        break
                    }
                    if (n.isNullOrUndefined(e)) {
                        o.error("args is null");
                        break
                    }
                    let t = e[0];
                    if (!n.isString(t) || 0 === t.length) {
                        o.error(`funcName = ${t} error`);
                        break
                    }
                    let i = e[1];
                    if (!n.isNumber(i)) {
                        o.error(`callbackId = ${i} error`);
                        break
                    }
                    e.splice(0, 2), this.delegate.onJsCallNativeFunction(this.webviewInfoId, t, i, e)
                } while (0)
            }

            handleWebviewCheckNativeFunction(e) {
                do {
                    if (n.isNullOrUndefined(this.delegate)) {
                        o.error("delegate is null");
                        break
                    }
                    if (n.isNullOrUndefined(e)) {
                        o.error("args is null");
                        break
                    }
                    let t = e[0];
                    if (!n.isString(t) || 0 === t.length) {
                        o.error(`funcName = ${t} error`);
                        break
                    }
                    let i = e[1];
                    if (!n.isNumber(i)) {
                        o.error(`callbackId = ${i} error`);
                        break
                    }
                    e.splice(0, 2), this.delegate.onJsCheckNativeFunction(this.webviewInfoId, t, i)
                } while (0)
            }

            appendNativeCallInfoList(e) {
                let t = !0;
                for (let i of this.nativeCallInfoList) if (i.id === e.id) {
                    t = !1;
                    break
                }
                t && this.nativeCallInfoList.push(e)
            }

            findNativeCallInfo(e) {
                for (let t of this.nativeCallInfoList) if (t.id === e) return t;
                return null
            }

            isWebviewInfo(e) {
                return e === this.webviewInfoId
            }

            sendMsgToWebviewNativeCall(e, t) {
                const i = document.querySelector(l);
                do {
                    if (n.isNullOrUndefined(i)) {
                        o.error("webview is null");
                        break
                    }
                    if (!1 === global.__homepageWebviewReady) {
                        o.warning("The WebView must be attached to the DOM and the dom-ready event emitted before this method can be called.");
                        break
                    }
                    if (n.isNullOrUndefined(i.send)) {
                        o.error("webview.send is null");
                        break
                    }
                    i.send(e, t)
                } while (0)
            }

            sendMsgToNativeCall(e, t, i) {
                do {
                    let a = this.findNativeCallInfo(e);
                    if (n.isNullOrUndefined(a)) {
                        o.error("nativeCallInfo is null");
                        break
                    }
                    r.CommonIPCRenderer.rendererCommunicator.sendMessageToRenderer(a.id, {name: t, args: i})
                } while (0)
            }

            isInvalidId(e) {
                return e === s
            }
        }

        e.NativeCallHost = t, e.nativeCallHost = new t
    }(t.NativeCallHostModule || (t.NativeCallHostModule = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(72), a = i(41), r = i(8), s = i(0).default.getLogger("Thunder.base.tools-utilities"), l = i(2),
        d = i(7).default(l.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        function t(e) {
            return n(this, void 0, void 0, function* () {
                let t;
                return t = e && (yield r.FileSystemAWNS.existsAW(e)) ? new Promise(t => {
                    d.asyncCalcuteFileMD5(e, (e, i) => {
                        e ? (i = i.toUpperCase(), t(i)) : t(void 0)
                    })
                }) : new Promise(e => {
                    e(void 0)
                })
            })
        }

        e.genarateMd5 = function (e) {
            let t = void 0, i = o.createHash("md5");
            return null !== i && (t = i.update(e).digest("hex")), t
        }, e.matchFileMd5 = function (e, i) {
            return n(this, void 0, void 0, function* () {
                let n = !1, o = yield t(e);
                return void 0 !== o && o === i.toUpperCase() && (s.information("check full md5 sucessful"), n = !0), n
            })
        }, e.calculateFileMd5Ex = function (e) {
            return n(this, void 0, void 0, function* () {
                let t;
                if (e && (yield r.FileSystemAWNS.existsAW(e))) {
                    let i = a.createReadStream(e), n = o.createHash("md5");
                    i.on("data", e => {
                        n.update(e)
                    }), t = new Promise(e => {
                        i.on("end", () => {
                            let t = n.digest("hex");
                            t = t.toUpperCase(), e(t)
                        })
                    })
                } else t = new Promise(e => {
                    e(void 0)
                });
                return t
            })
        }, e.calculateFileMd5 = t, e.encryptBuffer = function (e, t) {
            let i = null;
            try {
                let n = o.createCipheriv("aes-128-ecb", t, ""), a = n.update(e), r = n.final();
                i = Buffer.concat([a, r])
            } catch (e) {
                s.warning("encryptBuffer", e)
            }
            return i
        }, e.decryptBuffer = function (e, t) {
            let i = null;
            try {
                let n = o.createDecipheriv("aes-128-ecb", t, ""), a = n.update(e), r = n.final();
                i = Buffer.concat([a, r])
            } catch (e) {
                s.warning("decryptBuffer", e)
            }
            return i
        }, e.encryptSha1Buffer = function (e) {
            let t = null;
            try {
                t = o.createHash("sha1").update(e).digest("hex")
            } catch (e) {
                s.warning("encryptSha1Buffer", e)
            }
            return t
        }, e.encryptHmacBuffer = function (e, t, i, n = "hex") {
            let a = null;
            try {
                a = o.createHmac(e, t).update(i, "utf8").digest(n)
            } catch (e) {
                s.warning("encryptSha1Buffer", e)
            }
            return a
        }, e.setForegroundWindow = function (e, t) {
            return n(this, void 0, void 0, function* () {
                if (null !== e && null !== t) {
                    let i = void 0, o = [];
                    "renderer" === process.type ? (i = yield t.getNativeWindowHandle(), o = yield t.getChildWindows()) : (i = t.getNativeWindowHandle(), o = t.getChildWindows());
                    let a = [];
                    for (let e = 0; e < o.length; ++e) {
                        let t = o[e], i = !1;
                        "renderer" === process.type ? (yield t.isDestroyed()) || (i = yield t.isAlwaysOnTop()) : t.isDestroyed() || (i = t.isAlwaysOnTop()), i && a.push(t)
                    }
                    let r = i.readUIntLE(0, 4);
                    e.setForegroundWindow(r) ? s.information("setForegroundWindow sucessful") : s.information("setForegroundWindow failed"), a.forEach(e => n(this, void 0, void 0, function* () {
                        "renderer" === process.type ? (yield e.isDestroyed()) || e.setAlwaysOnTop(!0).catch() : e.isDestroyed() || e.setAlwaysOnTop(!0)
                    }))
                }
            })
        }
    }(t.ToolsUtilitiesAWNS || (t.ToolsUtilitiesAWNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(12), r = i(2), s = i(0), l = i(47), d = i(4), u = i(16), c = i(33), h = i(13), f = i(35),
        p = i(381), g = i(26), m = i(44), v = i(14), y = i(31), T = i(8), w = s.default.getLogger("DownloadMgr"),
        k = u.DownloadKernelEventManager.getEventManager(),
        C = m.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        b = g.DownloadKernelCategoryManager.getCategoryManager(), I = [{
            type: "task",
            title: "新建下载任务",
            program: process.execPath,
            args: "-task:newtask -window:bringtotop",
            iconIndex: 0,
            description: "新建下载任务"
        }, {
            type: "task",
            title: "开始所有任务",
            program: process.execPath,
            args: "-task:startall",
            iconIndex: 0,
            description: "开始所有任务"
        }, {
            type: "task",
            program: process.execPath,
            args: "-task:pauseall",
            iconIndex: 0,
            title: "暂停所有任务",
            description: "暂停所有任务"
        }, {
            type: "task",
            program: process.execPath,
            args: "-shell:exit",
            iconIndex: 0,
            title: "退出迅雷",
            description: "退出迅雷"
        }];
    const S = new class extends l.default {
        constructor() {
            super(...arguments), this.completedList = [], this.recentList = [], this.tracked = !1, this.needSelectNext = !1, this.currentCategoryId = -1, this.currentCategoryView = window.__xadsSkeletonCompletedActive ? d.DownloadKernel.CategroyViewID.Completed : d.DownloadKernel.CategroyViewID.Downloading, this.noneReactiveTaskMaps = {
                taskList: {},
                taskListPrivate: {}
            }
        }

        updateTaskMaps(e, t, i) {
            let n = this.noneReactiveTaskMaps.taskList;
            -1 !== e && b.isPrivateCategory(e) && (n = this.noneReactiveTaskMaps.taskListPrivate), n[t] = i
        }

        getTaskBases(e, t) {
            let i = {}, n = this.noneReactiveTaskMaps.taskList;
            return -1 !== e && b.isPrivateCategory(e) && (n = this.noneReactiveTaskMaps.taskListPrivate), n.hasOwnProperty(t) && (i = n[t]), i
        }

        getTaskBasesByTaskIds(e, t, i) {
            let n = {}, o = this.noneReactiveTaskMaps.taskList;
            -1 !== e && b.isPrivateCategory(e) && (o = this.noneReactiveTaskMaps.taskListPrivate);
            for (let e of i) {
                let i = o[t];
                i && (n[e] = i[e])
            }
            return n
        }

        setNeedSelectNext(e) {
            this.needSelectNext = e
        }

        getNeedSelectNext() {
            return this.needSelectNext
        }

        getCurrentCategoryId() {
            return this.currentCategoryId
        }

        setCurrentCategoryId(e) {
            this.currentCategoryId = e
        }

        getCurrentCategoryView() {
            return this.currentCategoryView
        }

        setCurrentCategoryView(e) {
            this.currentCategoryView = e
        }

        trackWin7NewTrait() {
            this.trackTaskComplete().catch(), c.DownloadKernelManager.attachListener(h.NodeEventMesssageNS.eventGlobalDownloadSpeedChanged, (...e) => {
                let t = p.DownloadProgressNS.getDownloadDetails().progress;
                o.ipcRenderer.send(f.ThunderChannelList.channelRMSetProgressBar, t)
            })
        }

        trackTaskComplete() {
            return n(this, void 0, void 0, function* () {
                yield(yield a.asyncRemoteCall.getApp()).getJumpListSettings();
                do {
                    if (this.tracked) break;
                    this.tracked = !0, c.DownloadKernelManager.attachListener(h.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, () => {
                        this.initCompeltedList(), this.getJumplistGroup().catch(), this.updateJumpList().catch(), this.attachCompletedCategoryViewChange()
                    })
                } while (0)
            })
        }

        updateJumpList() {
            return n(this, void 0, void 0, function* () {
                let e = [];
                e.push({type: "tasks", items: I});
                let t = [];
                if (this.recentList.length > 0) {
                    let e = y.ThunderHelper.isWindow7();
                    for (let i of this.recentList) {
                        let n = i.savePath, o = i.taskName;
                        void 0 !== o && o.indexOf(".") === o.length - 1 && (o = o.substring(0, o.length - 1));
                        let a = "", s = a = i.taskType === d.DownloadKernel.TaskType.Group ? n : r.join(n, o);
                        if (i.taskType === d.DownloadKernel.TaskType.Bt) s = `${__rootDir}/static/icon/jumplist_bttask.ico`; else do {
                            if (!e) break;
                            let t = yield v.ThunderUtil.getThunderTempPath(!0, "JumpIcon"), n = i.cid + ".ico";
                            "" === i.cid && (n = o + ".ico");
                            let l = r.join(t, n);
                            if (yield T.FileSystemAWNS.existsAW(l)) {
                                s = l;
                                break
                            }
                            y.ThunderHelper.extractIcon(a, l) && (s = l)
                        } while (0);
                        t.push({type: "task", title: o, iconPath: s, iconIndex: 0, args: "", program: a})
                    }
                } else t.push({type: "task", title: "最近没有完成任务", program: ""});
                t.length > 0 && (w.information("jumpRecentList", t), e.push({
                    name: "最近完成的任务",
                    items: t,
                    type: "custom"
                })), w.information("categories", e);
                let i = yield a.asyncRemoteCall.getApp();
                try {
                    yield i.setJumpList(e)
                } catch (e) {
                    w.warning("setJumpList error ", e)
                }
            })
        }

        sortCompletedList() {
            this.completedList.sort((e, t) => {
                let i = e.completionTime;
                return t.completionTime - i
            })
        }

        getJumplistGroup() {
            return n(this, void 0, void 0, function* () {
                do {
                    this.sortCompletedList();
                    let e = yield(yield a.asyncRemoteCall.getApp()).getJumpListSettings();
                    w.information("getJumpListSettings", e);
                    let t = e.removedItems;
                    if (!t || 0 === t.length) {
                        w.information("update jumplist removedItems null");
                        break
                    }
                    if (0 === this.completedList.length) break;
                    w.information("update jumplist removedItems", t);
                    for (let e of t) for (let t = 0; t < this.completedList.length; t++) {
                        let i = this.completedList[t], n = i.savePath, o = i.taskName;
                        void 0 !== o && o.indexOf(".") === o.length - 1 && (o = o.substring(0, o.length - 1));
                        let a = "";
                        if (a = i.taskType === d.DownloadKernel.TaskType.Group ? n : r.join(n, o), e.iconPath && a.toLowerCase() === e.iconPath.toLowerCase()) {
                            this.completedList.splice(t, 1);
                            break
                        }
                    }
                } while (0);
                let e = this.completedList.length > 4 ? 4 : this.completedList.length;
                this.recentList = this.completedList.slice(0, e), w.information("getJumplistGroup", this.recentList)
            })
        }

        initCompeltedList() {
            let e = C.getCategoryViewFromId(d.DownloadKernel.CategroyViewID.Completed).getTasks();
            for (let [, t]of e) this.completedList.push(t.getTaskBaseInfo())
        }

        attachCompletedCategoryViewChange() {
            k.attachTaskEvent(d.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== d.DownloadKernel.TaskEventType.InsertToCategoryView) break;
                    if (!e[1] || !e[2] || !e[3]) break;
                    if (-1 !== e[1]) break;
                    if (e[2] !== d.DownloadKernel.CategroyViewID.Completed) break;
                    let t = e[3];
                    if (0 === t.length) break;
                    let i = t.map(e => e.getTaskBaseInfo());
                    this.completedList.push(...i), this.getJumplistGroup().catch(), this.updateJumpList().catch()
                } while (0)
            }), k.attachTaskEvent(d.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== d.DownloadKernel.TaskEventType.RemoveFromCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    if (-1 !== e[1]) break;
                    if (e[2] !== d.DownloadKernel.CategroyViewID.Completed) break;
                    let t = e[3];
                    if (0 === t.length) break;
                    let i = this.completedList.map(e => e.taskId);
                    for (let e of t) {
                        let t = i.indexOf(e.getId());
                        -1 !== t && (this.completedList.splice(t, 1), i.splice(t, 1))
                    }
                    this.getJumplistGroup().catch(), this.updateJumpList().catch()
                } while (0)
            })
        }
    };
    t.default = S
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(95), r = i(55), s = i(4), l = i(7).default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        let t, i, o, d;

        function u(e) {
            let t = e;
            return /^[a-zA-Z]:\\/.test(e) ? t = e.slice(0, 3) : e && "\\" !== e[e.length - 1] && (t = e + "\\"), t
        }

        !function (e) {
            e[e.DRIVE_UNKNOWN = 0] = "DRIVE_UNKNOWN", e[e.DRIVE_NO_ROOT_DIR = 1] = "DRIVE_NO_ROOT_DIR", e[e.DRIVE_REMOVABLE = 2] = "DRIVE_REMOVABLE", e[e.DRIVE_FIXED = 3] = "DRIVE_FIXED", e[e.DRIVE_REMOTE = 4] = "DRIVE_REMOTE", e[e.DRIVE_CDROM = 5] = "DRIVE_CDROM", e[e.DRIVE_RAMDISK = 6] = "DRIVE_RAMDISK"
        }(t = e.DriverType || (e.DriverType = {})), function (e) {
            e[e.Unspecified = 0] = "Unspecified", e[e.HDD = 3] = "HDD", e[e.SSD = 4] = "SSD", e[e.SCM = 5] = "SCM"
        }(i = e.MediaType || (e.MediaType = {})), function (e) {
            e.HKEY_CLASSES_ROOT = "HKEY_CLASSES_ROOT", e.HKEY_CURRENT_USER = "HKEY_CURRENT_USER", e.HKEY_LOCAL_MACHINE = "HKEY_LOCAL_MACHINE", e.HKEY_USERS = "HKEY_USERS"
        }(o = e.RegistryHKey || (e.RegistryHKey = {})), function (e) {
            e[e.REG_NONE = 0] = "REG_NONE", e[e.REG_SZ = 1] = "REG_SZ", e[e.REG_EXPAND_SZ = 2] = "REG_EXPAND_SZ", e[e.REG_BINARY = 3] = "REG_BINARY", e[e.REG_DWORD = 4] = "REG_DWORD", e[e.REG_DWORD_LITTLE_ENDIAN = 4] = "REG_DWORD_LITTLE_ENDIAN", e[e.REG_DWORD_BIG_ENDIAN = 5] = "REG_DWORD_BIG_ENDIAN", e[e.REG_LINK = 6] = "REG_LINK", e[e.REG_MULTI_SZ = 7] = "REG_MULTI_SZ", e[e.REG_RESOURCE_LIST = 8] = "REG_RESOURCE_LIST", e[e.REG_FULL_RESOURCE_DESCRIPTOR = 9] = "REG_FULL_RESOURCE_DESCRIPTOR", e[e.REG_RESOURCE_REQUIREMENTS_LIST = 10] = "REG_RESOURCE_REQUIREMENTS_LIST", e[e.REG_QWORD = 11] = "REG_QWORD", e[e.REG_QWORD_LITTLE_ENDIAN = 11] = "REG_QWORD_LITTLE_ENDIAN"
        }(d = e.RegistryDataType || (e.RegistryDataType = {})), e.getDriveType = function (e) {
            return e = u(e), l.getDriveType(e)
        }, e.getDriveInfo = function (e) {
            return e = u(e), l.getDriveInfo(e)
        }, e.getFreePartitionSpace = function (e) {
            return e = u(e), l.getFreePartitionSpace(e)
        }, e.getLogicalDriveStrings = function () {
            return l.getLogicalDriveStrings()
        }, e.getPartitionSpace = function (e) {
            return e = u(e), l.getPartitionSpace(e)
        }, e.getSystemTempPath = function () {
            return l.getSystemTempPath()
        }, e.getTaskTypeFromUrl = function (e) {
            let t = l.getTaskTypeFromUrl(e);
            if (t === s.DownloadKernel.TaskType.Unkown && function (e) {
                e = e.toLowerCase();
                let t = !1;
                do {
                    if ("http://" === e.substr(0, "http://".length)) {
                        t = !0;
                        break
                    }
                    if ("https://" === e.substr(0, "https://".length)) {
                        t = !0;
                        break
                    }
                    if ("ftp://" === e.substr(0, "ftp://".length)) {
                        t = !0;
                        break
                    }
                } while (0);
                return t
            }(e)) {
                let i = /:\/\/\[(.+?)\].*/.exec(e);
                i || (i = /.+?:\/\/.*?\[(.+?)\].*/.exec(e)), i && i[1] && a.isIPv6(i[1]) && (t = s.DownloadKernel.TaskType.P2sp)
            }
            return t
        }, e.extractIcon = function (e, t) {
            return l.extractIcon(e, t)
        }, e.isWindow7 = function () {
            return 1 === l.isWin7()
        }, e.isWindow8OrLater = function () {
            let e = !1;
            do {
                let t = r.release();
                if (!t) break;
                let i = t.indexOf(".", 0);
                if (i < 0) break;
                let n = t.substring(0, i);
                if (!n) break;
                let o = parseInt(n, 10);
                o && o >= 8 && (e = !0)
            } while (0);
            return e
        }, e.isWindows10 = function () {
            let e = !1;
            do {
                let t = r.release();
                if (!t) break;
                if (0 === t.indexOf("10.0.")) {
                    e = !0;
                    break
                }
            } while (0);
            return e
        }, e.compareStr = function (e, t) {
            return l.compareStr(e, t)
        }, e.getTickCount = function () {
            return l.getTickCount()
        }, e.setScreenSaveActive = function (e, t) {
            return l.setScreenSaveActive(e, t)
        }, e.isSparseDriver = function (e) {
            return e = u(e), l.isSparseDriver(e)
        }, e.getAppList = function () {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    l.getAppList(t => {
                        e(t)
                    })
                })
            })
        }, e.isSSD = function () {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    l.isSSD((t, i) => {
                        e(i)
                    })
                })
            })
        }, e.getMemoryInfo = function () {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    l.getMemoryInfo((t, i) => {
                        e({totalPhy: t, totalVir: i})
                    })
                })
            })
        }, e.getHardDiskSpaceList = function () {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    l.getHardDiskSpaceList(t => {
                        e(t)
                    })
                })
            })
        }, e.getCpuList = function () {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    l.getCpuList(t => {
                        e(t)
                    })
                })
            })
        }, e.getFixedDriveMediaType = function (e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    e.length > 1 && (e = e.slice(0, 1)), l.getDriveMediaType(e.toUpperCase(), (e, i) => {
                        t(i)
                    })
                })
            })
        }, e.sleep = function (e) {
            return n(this, void 0, void 0, function* () {
                yield new Promise((t, i) => {
                    setTimeout(t, e)
                })
            })
        }, e.getTextScale = function () {
            let e = 100,
                t = l.readRegString(o.HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Accessibility", "TextScaleFactor");
            return t && (e = Number(t)), isNaN(e) && (e = 100), e
        }, e.getWindowRect = function (e) {
            return e ? l.getWindowRect(e) : {x: 0, y: 0, width: 0, height: 0}
        }, e.moveWindow = function (e, t) {
            e && l.moveWindow(e, t.x, t.y, t.width, t.height, !0)
        }, e.getSystemDirectory = function () {
            return l.getSystemDirectory()
        }, e.getVersionBlockString = function (e, t) {
            return l.getVersionBlockString(e, t)
        }, e.getOwnerName = function (e) {
            return l.getOwnerName(e)
        }, e.createRegKey = function (e, t) {
            return l.createRegKey(e, t)
        }, e.deleteRegKey = function (e, t) {
            return l.deleteRegKey(e, t)
        }, e.readRegString = function (e, t, i) {
            return l.readRegString(e, t, i)
        }, e.queryRegValue = function (e, t, i) {
            return l.queryRegValue(e, t, i)
        }, e.writeRegValue = function (e, t, i, n, o) {
            return l.writeRegValue(e, t, i, n, o)
        }, e.deleteRegValue = function (e, t, i) {
            return l.deleteRegValue(e, t, i)
        }
    }(t.ThunderHelper || (t.ThunderHelper = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(7), r = i(42), s = i(19), l = i(35);
    !function (e) {
        const t = i(2), d = a.default(t.join(__rootDir, "../bin/ThunderKernel.node")),
            u = o.default.getLogger("DownloadKernel.ThunderKernel");
        let c = 0, h = [];
        s.ipcRenderer.on(l.ThunderChannelList.channelMRUpdateLogEnviroment, () => {
            d.enableETWLogger(o.default.enableLogger)
        }), e.registerDownloadSDKCrashCallback = function (e) {
            return d.registerDownloadSDKCrashCallback(e)
        }, e.initDownloadSdk = function (e, t, i, n) {
            return d.initDownloadSdk(e, t, i, n)
        }, e.createP2spTask = function (e, t, i, n, o, a) {
            return e && "" !== e || u.warning("createP2spTask url:", e), n && "" !== n || u.warning("createP2spTask savePath:", n), o && "" !== o || u.warning("createP2spTask fileName:", o), e = r.Common.parseThunderPrivateUrl(e), d.createP2spTask(e, void 0 === t ? "" : t, void 0 === i ? "" : i, n, o, a)
        }, e.createBtTask = function (e, t, i, n) {
            return e && "" !== e || u.warning("createBtTask torrentFilePath:", e), t && "" !== t || u.warning("createBtTask savePath:", t), 0 === i.length && u.warning("createBtTask fileRealIndexLists:", 0), d.createBtTask(e, t, i, n)
        }, e.createEmuleTask = function (e, t, i, n) {
            return e && "" !== e || u.warning("createEmuleTask url:", e), t && "" !== t || u.warning("createEmuleTask savePath:", t), i && "" !== i || u.warning("createEmuleTask fileName:", i), e = r.Common.parseThunderPrivateUrl(e), d.createEmuleTask(e, t, i, n)
        }, e.createMagnetTask = function (e, t, i) {
            return e && "" !== e || u.warning("createMagnetTask url:", e), t && "" !== t || u.warning("createMagnetTask torrentFilePath:", t), e = r.Common.parseThunderPrivateUrl(e), d.createMagnetTask(e, t, i)
        }, e.startTask = function (e) {
            return u.information("startTask virtualTaskId:", e), d.startTask(e)
        }, e.stopTask = function (e) {
            return u.information("stopTask virtualTaskId:", e), d.stopTask(e)
        }, e.deleteTask = function (e) {
            return u.information("deleteTask virtualTaskId:", e), d.deleteTask(e)
        }, e.renameP2spTaskFile = function (e, t) {
            return d.renameP2spTaskFile(e, t)
        }, e.queryTaskInfo = function (e, t) {
            return 0 === d.queryTaskInfo(e, t)
        }, e.queryBtTaskInfo = function (e, t) {
            return 0 === d.queryBtTaskInfo(e, t)
        }, e.queryPlayInfo = function (e, t, i) {
            return 0 === d.queryPlayInfo(e, t, i)
        }, e.queryGlobalInfo = function (e, t) {
            return 0 === d.queryGlobalInfo(e, t)
        }, e.createTaskId = function () {
            return d.createTaskId()
        }, e.importTask = function (e, t, i) {
            return d.importTask(e, t, i)
        }, e.parserBtFileInfo = function (e, t) {
            return d.parserBtFileInfo(e, t)
        }, e.getFileHashByUrl = function (e) {
            return d.getFileHashByUrl(e)
        }, e.getInfoHashByUrl = function (e) {
            return d.getInfoHashByUrl(e)
        }, e.enableDcdnWithVipCert = function (e, t, i) {
            return d.enableDcdnWithVipCert(e, t, i)
        }, e.updateDcdnWithVipCert = function (e, t, i) {
            return d.updateDcdnWithVipCert(e, t, i)
        }, e.disableDcdnWithVipCert = function (e, t) {
            return d.disableDcdnWithVipCert(e, t)
        }, e.setDownloadSpeedLimit = function (e) {
            return d.setDownloadSpeedLimit(Number(e))
        }, e.setUploadSpeedLimit = function (e) {
            return d.setUploadSpeedLimit(Number(e))
        }, e.getSubNetUploader = function (e) {
            return d.getSubNetUploader(e)
        }, e.setTaskStrategy = function (e, t) {
            return d.setTaskStrategy(e, t)
        }, e.setDownloadStrategy = function (e, t) {
            return d.setDownloadStrategy(e, t)
        }, e.setTaskThreadCount = function (e, t) {
            return d.setTaskThreadCount(e, Number(t))
        }, e.setCacheSize = function (e) {
            return d.setCacheSize(Number(e))
        }, e.setGlobalConnectionLimit = function (e) {
            return d.setGlobalConnectionLimit(e)
        }, e.setUserInfo = function (e, t) {
            return d.setUserInfo(e, t)
        }, e.updateNetDiscVODCachePath = function (e) {
            return d.updateNetDiscVODCachePath(e)
        }, e.setBTExtraTrackers = function (e, t) {
            return d.setBTExtraTrackers(e, t)
        }, e.setGlobalExtInfo = function (e, t) {
            return d.setGlobalExtInfo(e, t)
        }, e.setTaskExtInfo = function (e, t) {
            return d.setTaskExtInfo(e, t)
        }, e.setTaskExtStat = function (e, t, i, n) {
            return d.setTaskExtStat(e, t, i, n)
        }, e.addHttpHeaderField = function (e, t, i) {
            return d.addHttpHeaderField(e, t, i)
        }, e.setupNetDiskFetchTaskFlag = function (e) {
            return d.setupNetDiskFetchTaskFlag(e)
        }, e.updateTaskVideoByteRatio = function (e, t, i) {
            return d.updateTaskVideoByteRatio(e, t, i)
        }, e.initDataBase = function (e, t) {
            return d.initDataBase(e, t)
        }, e.beginTransaction = function () {
            u.information("beginTransaction transactionId:", c);
            let e = c;
            return d.beginTransaction(e), c >= Number.MAX_SAFE_INTEGER ? c = 0 : c++, h.push(e), e
        }, e.commitTransaction = function (e) {
            let t = -1;
            u.information("commitTransaction transactionId:", e);
            for (let i = 0; i < h.length; ++i) if (h[i] === e) {
                h.splice(i, 1), t = d.commitTransaction(e);
                break
            }
            return t
        }, e.commitAllTransaction = function () {
            for (let e = 0; e < h.length; ++e) d.commitTransaction(h[e]);
            h = []
        }, e.rollbackTransaction = function (e) {
            return u.information("rollbackTransaction transactionId:", e), d.rollbackTransaction(e)
        }, e.execSqlite = function (e, t) {
            return d.execSqlite(e, t)
        }, e.execSqliteEx = function (e, t) {
            return d.execSqliteEx(e, t)
        }, e.querySqlite = function (e, t) {
            return d.querySqlite(e, t)
        }, e.querySqliteEx = function (e, t) {
            return d.querySqliteEx(e, t)
        }, e.insertTaskBase = function (e) {
            d.insertTaskBase(e)
        }, e.insertP2spTask = function (e, t, i, n, o, a, r) {
            d.insertP2spTask(e, t, i, n, o, a, r)
        }, e.insertBtTask = function (e, t, i, n, o) {
            d.insertBtTask(e, t, i, n, o)
        }, e.insertBtFile = function (e, t) {
            d.insertBtFile(e, t)
        }, e.insertEmuleTask = function (e, t, i) {
            d.insertEmuleTask(e, t, i)
        }, e.insertGroupTask = function (e, t, i, n) {
            d.insertGroupTask(e, t, i, n)
        }, e.insertMagnetTask = function (e) {
            d.insertMagnetTask(e)
        }, e.deleteStorageTask = function (e, t) {
            d.deleteStorageTask(e, t)
        }, e.loadTaskBase = function (e) {
            d.loadTaskBase(e)
        }, e.loadBtFile = function (e) {
            d.loadBtFile(e)
        }, e.loadStorageTask = function (e, t, i) {
            d.loadStorageTask(e, t, i)
        }, e.saveTaskBaseInfo = function (e, t, i, n) {
            d.saveTaskBaseInfo(e, t, i, n)
        }, e.saveTaskUserData = function (e, t) {
            d.saveTaskUserData(e, t)
        }, e.saveTaskChannelInfo = function (e, t, i, n, o, a) {
            d.saveTaskChannelInfo(e, t, i, n, o, a)
        }, e.setP2spTaskOriginOnly = function (e, t) {
            d.setP2spTaskOriginOnly(e, t)
        }, e.setP2spTaskThreadCount = function (e, t) {
            d.setP2spTaskThreadCount(e, t)
        }, e.saveBtFileInfo = function (e, t, i, n, o) {
            d.saveBtFileInfo(e, t, i, n, o)
        }, e.saveBtTaskSeedFile = function (e, t) {
            d.saveBtTaskSeedFile(e, t)
        }, e.saveBtFileCid = function (e, t, i, n) {
            d.saveBtFileCid(e, t, i, n)
        }, e.saveBtFileUserRead = function (e, t, i) {
            d.saveBtFileUserRead(e, t, i)
        }, e.setCategoryId = function (e, t) {
            d.setCategoryId(e, t)
        }, e.loadCategory = function (e) {
            d.loadCategory(e)
        }, e.createCategory = function (e, t, i, n, o, a, r) {
            d.createCategory(e, t, i, n, o, a, r)
        }, e.setCategoryPassword = function (e, t, i, n) {
            d.setCategoryPassword(e, t, i, n)
        }, e.setCategoryAccountPassword = function (e, t) {
            d.setCategoryAccountPassword(e, t)
        }, e.searchTask = function (e, t, i, n, o) {
            d.searchTask(e, t, i, n, o)
        }, e.filterTask = function (e, t, i, n, o, a, r) {
            let s = `SELECT taskid from TaskBase WHERE  CompletionTime != 0 and RemovingToRecycleTime = 0 and (${"CategoryId = " + o.join(" or CategoryId = ")})`;
            if (void 0 !== r) s = `${s} and ${"type = " + r}`; else {
                if (t) {
                    let e = t.split("|"), i = `Name LIKE '%${e[0]}%' `;
                    for (let t = 1; t < e.length; t++) i += `or Name LIKE '%${e[t]}%' `;
                    s = `${s} and (${i})`
                }
                if (i) {
                    let e = i.split("|"), t = `Name LIKE '%${e[0]}' `;
                    for (let i = 1; i < e.length; i++) t += `or Name LIKE '%${e[i]}' `;
                    s = `${s} and (${t})`
                }
            }
            d.querySqlite(s, (e, t, i) => {
                u.information("filter result", t);
                let o = [];
                for (let e of t) o.push(Number(e[0].value));
                n(o)
            })
        }, e.setTaskPriorityLevel = function (e, t, i) {
            d.setTaskPriorityLevel(e, t, i)
        }, e.setBtFileFailureErrorCode = function (e, t, i) {
            d.setBtFileFailureErrorCode(e, t, i)
        }, e.setBtFilePlayPosition = function (e, t, i) {
            d.setBtFilePlayPosition(e, t, i)
        }, e.setBtFileDuration = function (e, t, i) {
            d.setBtFileDuration(e, t, i)
        }, e.batchFindP2spTask = function (e, t) {
            return 0 === d.batchFindP2spTask(e, t)
        }, e.batchFindEmuleTask = function (e, t) {
            return 0 === d.batchFindEmuleTask(e, t)
        }, e.batchFindBtTask = function (e, t) {
            return 0 === d.batchFindBtTask(e, t)
        }, e.batchFindGroupTask = function (e, t) {
            return 0 === d.batchFindGroupTask(e, t)
        }, e.verifyProxy = function (e, t, i, n, o, a) {
            return n || (n = ""), i || (i = "", n = ""), t = t ? Number(t) : 0, d.verifyProxy(e, t, i, n, o, a)
        }, e.setProxy = function (e, t, i, n, o) {
            return o || (o = ""), n || (n = "", o = ""), i = i ? Number(i) : 0, d.setProxy(e, t, i, n, o)
        }, e.getSumOfRemotePeerBeBenefited = function (e) {
            return d.getSumOfRemotePeerBeBenefited(e)
        }, e.isFileSizeSetterWorking = function (e) {
            return d.isFileSizeSetterWorking(e)
        }, e.isDownloadTaskCfgFileExist = function (e, t) {
            return n(this, void 0, void 0, function* () {
                return new Promise(i => {
                    d.isDownloadTaskCFGFileExist(e, t, e => {
                        i(1 === e)
                    })
                })
            })
        }, e.launchFileAssistant = function (e) {
            return d.launchFileAssistant(e)
        }, e.getTaskProfileLog = function (e, t, i) {
            return d.getTaskProfileLog(e, t, i)
        }, e.stopPushStorageCommand = function () {
            return d.stopPushStorageCommand()
        }, e.getStorageWaitingCommandSize = function () {
            return d.getStorageWaitingCommandSize()
        }, e.addServer = function (e, t, i) {
            d.addServer(e, t, i)
        }, e.discardServer = function (e, t, i) {
            d.discardServer(e, t, i)
        }
    }(t.ThunderKernel || (t.ThunderKernel = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(7), r = i(0), s = i(8), l = i(32), d = i(11), u = i(26), c = i(20), h = i(502), f = i(17),
        p = i(13), g = i(102), m = i(31), v = i(9);
    !function (e) {
        const t = d.DownloadKernelTaskManager.getTaskManager(),
            i = u.DownloadKernelCategoryManager.getCategoryManager(),
            y = a.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
            T = r.default.getLogger("DownloadKernelManager");
        let w = void 0, k = !1, C = new c.EventEmitter;
        C.setMaxListeners(0);
        let b = 0;

        function I(e, t) {
            l.ThunderKernel.initDataBase(e, t)
        }

        function S(e, t, i, n) {
            l.ThunderKernel.initDownloadSdk(e, t, i, n)
        }

        function _(e, i) {
            t.attachListener(e, i)
        }

        e.init = function () {
            return n(this, void 0, void 0, function* () {
                let e = o.join(__rootDir, "../../Thunder.exe"), n = y.getFileVersion(e);
                l.ThunderKernel.registerDownloadSDKCrashCallback(() => {
                    if (++b < 4) {
                        let e = m.ThunderHelper.getTickCount();
                        S(o.join(__rootDir, "../bin/SDK"), "xzcGMudGh1bmRlclg7MA^^SDK==edee53fd0b15e8d65dbfe7824f5f^a23", n, i => {
                            let n = `time=${m.ThunderHelper.getTickCount() - e},errorcode=${i},is_crash=1`;
                            v.XLStatNS.trackEvent("core_event", "init_dk_result", "", 0, 0, 0, 0, n), t.downloadSDKCrashRecover(i)
                        })
                    } else t.downloadSDKCrash()
                }), _(p.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, () => {
                    let e = m.ThunderHelper.getTickCount();
                    t.initDownloadKernelStart(), S(o.join(__rootDir, "../bin/SDK"), "xzcGMudGh1bmRlclg7MA^^SDK==edee53fd0b15e8d65dbfe7824f5f^a23", n, i => {
                        let n = `time=${m.ThunderHelper.getTickCount() - e},errorcode=${i},is_crash=0`;
                        v.XLStatNS.trackEvent("core_event", "init_dk_result", "", 0, 0, 0, 0, n), t.initDownloadKernelEnd(i)
                    })
                }), (yield s.FileSystemAWNS.existsAW(__profilesDir)) || (yield s.FileSystemAWNS.mkdirsAW(__profilesDir)), I(o.join(__profilesDir, "TaskDb.dat"), e => {
                    0 === e && (i.init().catch(), t.loadTaskBase(), g.ThunderPanTaskNS.createPanTable(), setInterval(() => {
                        t.queryTaskInfo()
                    }, 1e3), setTimeout(() => {
                        let e = y.getInstallChannel();
                        t.setGlobalExtInfo(e).catch(), f.NativeCallModule.nativeCall.AttachNativeEvent("onLoginStatusChange", (i, n) => {
                            T.information(`stat dk onLoginStatusChange oldStatus ${i}, newState ${n}`), t.setGlobalExtInfo(e).catch()
                        })
                    }, 3e3))
                }), yield h.BTExtraTrackNS.initBtTaskTrackers()
            })
        }, e.getPeerId = function () {
            return n(this, void 0, void 0, function* () {
                let e = void 0;
                return e = w && "" !== w ? w : new Promise(e => {
                    k ? C.once("OnGetGlobalPeerId", t => {
                        e(t)
                    }) : l.ThunderKernel.queryGlobalInfo(1, (t, i) => {
                        T.information("getPeerId queryGlobalInfo glPeerId:", i), k = !1, w = i, e(i), C.emit("OnGetGlobalPeerId", i)
                    }) ? k = !0 : e("")
                })
            })
        }, e.initDataBase = I, e.uninitialize = function () {
        }, e.startBatchOperationJournal = function () {
        }, e.endBatchOperationJournal = function () {
        }, e.getDownloadSdkVersion = function () {
            let e = o.join(__rootDir, "../bin/SDK/DownloadSDKServer.exe");
            return y.getFileVersion(e)
        }, e.setDownloadSpeedLimit = function (e) {
            return l.ThunderKernel.setDownloadSpeedLimit(e)
        }, e.setUploadSpeedLimit = function (e) {
            return l.ThunderKernel.setUploadSpeedLimit(e)
        }, e.setCacheSize = function (e) {
            return l.ThunderKernel.setCacheSize(e)
        }, e.enableCommonP2pChannel = function (e) {
            T.information("enableCommonP2pChannel", e), t.enableCommonP2pChannel(e)
        }, e.enableCommonP2sChannel = function (e) {
            T.information("enableCommonP2sChannel", e), t.enableCommonP2sChannel(e)
        }, e.getTotalDownloadSpeed = function () {
            return t.getTotalDownloadSpeed()
        }, e.getTotalUploadSpeed = function () {
            return t.getTotalUploadSpeed()
        }, e.getTotalDownloadSize = function () {
            return t.getTotalDownloadSize()
        }, e.getTotalUploadSize = function () {
            return t.getTotalUploadSize()
        }, e.getTotalTaskDownloadSpeed = function (e, i) {
            return t.getTotalTaskDownloadSpeed(e, i)
        }, e.getTotalTaskVipSpeed = function (e, i) {
            return t.getTotalTaskVipSpeed(e, i)
        }, e.attachListener = _, e.attachOnceListener = function (e, i) {
            t.attachOnceListener(e, i)
        }, e.detachListener = function (e, i) {
            t.detachListener(e, i)
        }, e.importUnfinishedTask = function (e, t, i) {
            l.ThunderKernel.importTask(e, t, i)
        }, e.getSumOfRemotePeerBeBenefited = function (e) {
            l.ThunderKernel.getSumOfRemotePeerBeBenefited(e)
        }, e.isFileSizeSetterWorking = function (e) {
            l.ThunderKernel.isFileSizeSetterWorking(e)
        }, e.launchFileAssistant = function (e) {
            l.ThunderKernel.launchFileAssistant(e)
        }
    }(t.DownloadKernelManager || (t.DownloadKernelManager = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(19), r = i(0), s = i(7), l = i(8), d = i(4), u = i(33), c = i(11), h = i(44), f = i(26),
        p = i(16), g = i(42), m = i(67), v = i(22), y = i(38), T = i(9), w = i(37), k = i(10), C = i(39), b = i(5),
        I = i(30), S = i(35), _ = i(48), D = i(56), A = i(53), N = i(43), x = i(68), E = i(142), O = i(40), P = i(107),
        M = i(73), F = i(51), L = i(105), R = i(14), B = i(58), U = i(15), V = i(3), K = i(25), G = i(102), W = i(12),
        j = i(31), H = i(70), z = i(23), X = i(71), q = i(61), Y = r.default.getLogger("Thunder.TaskOperator"),
        J = s.default(o.join(__rootDir, "../bin/ThunderHelper.node")), Z = c.DownloadKernelTaskManager.getTaskManager(),
        Q = h.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        $ = f.DownloadKernelCategoryManager.getCategoryManager(), ee = p.DownloadKernelEventManager.getEventManager(),
        te = D.ToastNotifyManagerNS.getToastNotifyManger();

    function ie(e) {
        return n(this, void 0, void 0, function* () {
            if (void 0 !== e) {
                let t = e + "\\.", i = yield W.asyncRemoteCall.getShell();
                (yield l.FileSystemAWNS.existsAW(t)) && (yield i.openPath(t))
            }
        })
    }

    function ne(e) {
        return n(this, void 0, void 0, function* () {
            return new Promise(t => n(this, void 0, void 0, function* () {
                e.properties = ["openFile"];
                let i = yield W.asyncRemoteCall.getCurrentWindow();
                (yield W.asyncRemoteCall.getDialog()).showOpenDialog(i, e).then(e => {
                    let i = e.filePaths;
                    e.canceled ? t(void 0) : t(i[0])
                }).catch()
            }))
        })
    }

    function oe() {
        v.MessageBox.pop({
            title: "提示",
            size: "small",
            message: "临时文件无法正常载入，导入任务失败!",
            okText: "确定",
            cancelVisible: !1
        }).catch()
    }

    function ae() {
        return n(this, void 0, void 0, function* () {
            return E.DownloadAndPlayNS.getXmpPath()
        })
    }

    function re(e) {
        return n(this, void 0, void 0, function* () {
            let t = 0;
            return new Promise(i => {
                t = ee.attachTaskEvent(d.DownloadKernel.TaskEventType.StatusChanged, (...n) => {
                    do {
                        if (!n) break;
                        if (n[0] !== d.DownloadKernel.TaskEventType.StatusChanged) break;
                        if (!n[1]) break;
                        let o = n[1];
                        for (let n = 0; n < o.length; ++n) {
                            let a = o[n];
                            if (!a) continue;
                            let r = a.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                            if (e === r) {
                                a.getTaskStatus() === d.DownloadKernel.TaskStatus.Started && (ee.detachTaskEvent(d.DownloadKernel.TaskEventType.StatusChanged, t), i(!0));
                                break
                            }
                        }
                    } while (0)
                })
            })
        })
    }

    !function (e) {
        function t(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    e ? J.asyncShellExecute(0, "open", e, "", "", "SW_SHOW", i => {
                        Y.information("async openitem", e, i), t(!(i <= 32))
                    }) : t(!1)
                })
            })
        }

        function r(e, t) {
            let i = g.Common.getTaskTypeFromImportingFile(e);
            i === d.DownloadKernel.TaskType.P2sp ? function (e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = {errcode: 0, errinfo: "success"};
                    do {
                        let n = e + ".cfg";
                        if (!(yield l.FileSystemAWNS.existsAW(n))) {
                            i.errcode = 2, i.errinfo = "缺少.cfg文件,无法导入";
                            break
                        }
                        let o = yield m.TaskUtilitiesAWNS.importUnfinishedTaskAW(e, "");
                        if (null !== o && 0 === o.ret) {
                            let n = {taskType: d.DownloadKernel.TaskType.P2sp, value: o.url},
                                a = yield m.TaskUtilitiesAWNS.batchFindTaskAW([n]);
                            if (a && a.length > 0) {
                                i.errcode = 3, i.extra = a[0], C.ThunderNewTask.repeatTasksMsg([a[0]]);
                                break
                            }
                            let r = {
                                taskBaseInfo: {
                                    taskName: g.Common.getTaskNameFromImportFile(e),
                                    savePath: g.Common.getSavePathFromImportFile(e),
                                    origin: t = void 0 === t ? "Unknown" : t
                                }, p2spTaskInfo: {url: o.url, refUrl: "", cookie: ""}
                            }, s = yield Z.createTask(d.DownloadKernel.TaskType.P2sp, r);
                            if (null !== s) {
                                let e = s.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                                yield _.DownloadDispatchNS.startTask(e)
                            } else Y.warning("createTask failed")
                        } else i.errcode = 2, i.errinfo = "临时文件无法正常载入，导入任务失败", oe()
                    } while (0);
                    return i
                })
            }(e, t).then(e => {
                Y.information(e.errcode, e.errinfo)
            }).catch() : i === d.DownloadKernel.TaskType.Emule ? function (e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = {errcode: 0, errinfo: "success"};
                    do {
                        let n = "";
                        if (".PART" === o.extname(e).toUpperCase() && (n = e + ".met", !(yield l.FileSystemAWNS.existsAW(n))) && void 0 === (n = yield ne({
                            title: "导入eMule文件时,需要相应的MET文件,请选择MET文件",
                            filters: [{name: "met文件(*.met)", extensions: ["met"]}]
                        }))) break;
                        let a = yield m.TaskUtilitiesAWNS.importUnfinishedTaskAW(e, n);
                        if (null !== a && 0 === a.ret) {
                            let n = g.Common.parseEd2kUrl(a.url);
                            if (null !== n) {
                                let o = {taskType: d.DownloadKernel.TaskType.Emule, value: n.fileHash},
                                    r = yield m.TaskUtilitiesAWNS.batchFindTaskAW([o]);
                                if (r && r.length > 0) {
                                    i.errcode = 3, i.extra = r[0], C.ThunderNewTask.repeatTasksMsg([r[0]]);
                                    break
                                }
                                let s = {
                                    taskBaseInfo: {
                                        taskName: g.Common.getTaskNameFromImportFile(e),
                                        savePath: g.Common.getSavePathFromImportFile(e),
                                        origin: t = void 0 === t ? "Unknown" : t
                                    }, emuleTaskInfo: {url: a.url}
                                }, l = yield Z.createTask(d.DownloadKernel.TaskType.Emule, s);
                                if (null !== l) {
                                    let e = l.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                                    yield _.DownloadDispatchNS.startTask(e)
                                }
                            }
                        } else i.errcode = 2, i.errinfo = "导入失败,该任务临时文件无法正常载入", oe()
                    } while (0);
                    return i
                })
            }(e, t).then(e => {
                Y.information(e.errcode, e.errinfo)
            }).catch() : i === d.DownloadKernel.TaskType.Bt && function (e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = o.dirname(e), n = void 0;
                    if (yield l.FileSystemAWNS.existsAW(i)) {
                        let t = yield l.FileSystemAWNS.readdirAW(i);
                        for (let a = 0; a < t.length; a++) {
                            let r = t[a];
                            if (".torrent" === o.extname(r)) {
                                n = r;
                                let t = o.join(i, r), a = yield m.TaskUtilitiesAWNS.parserBtFileInfoAW(t);
                                if (1 !== a.fileLists.length) break;
                                {
                                    let t = o.basename(e);
                                    if (t = o.basename(t, ".bt.xltd"), a.fileLists[0].fileName === t) break
                                }
                            }
                        }
                    }
                    do {
                        if (void 0 === n || null === n || "" === n) break;
                        let e = o.join(__profilesDir, "Torrents"), a = o.join(e, n);
                        if (yield l.FileSystemAWNS.existsAW(a)) {
                            let e = yield m.TaskUtilitiesAWNS.parserBtFileInfoAW(a),
                                n = {taskType: d.DownloadKernel.TaskType.Bt, value: e.infoId},
                                r = yield m.TaskUtilitiesAWNS.batchFindTaskAW([n]);
                            if (r && r.length > 0) {
                                C.ThunderNewTask.repeatTasksMsg([r[0]]);
                                break
                            }
                            let s = e.title, l = i;
                            e.fileLists.length > 1 && (l = o.dirname(i), s = o.basename(i));
                            let u = [];
                            for (let t = 0; t < e.fileLists.length; ++t) u.push(e.fileLists[t].realIndex);
                            let h = e.trackerUrls.join("\n"), f = {
                                    taskBaseInfo: {
                                        savePath: l,
                                        taskName: s,
                                        productInfo: O.TaskCtrlOperatorNS.constructProductInfo(""),
                                        origin: t = void 0 === t ? "Unknown" : t,
                                        import: !0
                                    },
                                    btTaskInfo: {
                                        seedFile: a,
                                        displayName: e.title,
                                        fileRealIndexLists: u,
                                        fileLists: e.fileLists,
                                        infoId: e.infoId,
                                        tracker: h
                                    }
                                },
                                p = yield c.DownloadKernelTaskManager.getTaskManager().createTask(d.DownloadKernel.TaskType.Bt, f);
                            if (null !== p) {
                                let e = p.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                                yield _.DownloadDispatchNS.startTask(e)
                            }
                        } else yield V.client.callServerFunction("ShowMessageToast", {
                            message: "导入失败，请重新下载",
                            type: "error"
                        })
                    } while (0)
                })
            }(e, t).catch()
        }

        function s(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = [];
                do {
                    if (void 0 === e || null === e) break;
                    let n = Z.getTaskFromTaskId(e);
                    if (null === n) break;
                    if (n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType) !== d.DownloadKernel.TaskType.Bt) break;
                    let a = n.getExtraObject();
                    if (0 === a.getDownloadFile().length) break;
                    if (yield F.SingleBtTaskNS.isSingleBtTask(n)) {
                        let e = F.SingleBtTaskNS.getSinleBtTaskFilePath(n), o = a.getBtFileList();
                        for (let [, n]of o) {
                            let o = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex),
                                a = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Download),
                                r = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName);
                            if (1 === a) {
                                let a = w.TaskUtilHelper.getTaskFileType(r);
                                if (null !== t && void 0 !== t && -1 !== t) {
                                    if (t === o) {
                                        i.push({fileExtType: a, fullPath: e, btFile: n});
                                        break
                                    }
                                } else i.push({fileExtType: a, fullPath: e, btFile: n})
                            }
                            break
                        }
                    } else {
                        let e = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath),
                            r = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), s = a.getBtFileList();
                        for (let [, n]of s) {
                            let a = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex),
                                s = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Download),
                                l = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName),
                                u = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FilePath),
                                c = o.join(e, r, u, l);
                            if (1 === s) {
                                let e = w.TaskUtilHelper.getTaskFileType(l);
                                if (null !== t && void 0 !== t && -1 !== t) {
                                    if (t === a) {
                                        i.push({fileExtType: e, fullPath: c, btFile: n});
                                        break
                                    }
                                } else i.push({fileExtType: e, fullPath: c, btFile: n})
                            }
                        }
                    }
                } while (0);
                return i
            })
        }

        function h(e) {
            let t = !1;
            do {
                let i = 0;
                if (null !== e && (i = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.ErrorCode)), 7 === i) {
                    t = !0;
                    break
                }
                if (i >= 700 && i <= 799) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }

        function p(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = [];
                do {
                    if (void 0 === e || null === e) break;
                    let n = Z.getTaskFromTaskId(e);
                    if (null === n) break;
                    if (n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType) !== d.DownloadKernel.TaskType.Bt) break;
                    let a = n.getExtraObject();
                    if (0 === a.getDownloadFile().length) break;
                    if (yield F.SingleBtTaskNS.isSingleBtTask(n)) {
                        let e = F.SingleBtTaskNS.getSinleBtTaskFilePath(n), o = a.getBtFileList();
                        for (let [, n]of o) {
                            let o = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex),
                                a = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Download),
                                r = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName),
                                s = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Cid),
                                l = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Gcid),
                                u = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.PlayPosition),
                                c = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Duration);
                            if (1 === a) {
                                if (w.TaskUtilHelper.getTaskFileType(r) === w.TaskUtilHelper.FileExtType.Video) if (null !== t && void 0 !== t && -1 !== t) {
                                    if (o === t) {
                                        i.push({
                                            fileName: r,
                                            fullPath: e,
                                            index: o,
                                            cid: s,
                                            gcid: l,
                                            playPosition: u,
                                            duration: c
                                        });
                                        break
                                    }
                                } else i.push({
                                    fileName: r,
                                    fullPath: e,
                                    index: o,
                                    cid: s,
                                    gcid: l,
                                    playPosition: u,
                                    duration: c
                                })
                            }
                            break
                        }
                    } else {
                        let e = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath),
                            r = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), s = a.getBtFileList();
                        for (let [, n]of s) {
                            let a = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex),
                                s = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Download),
                                l = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName),
                                u = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FilePath),
                                c = o.join(e, r, u, l), h = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Cid),
                                f = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Gcid),
                                p = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.PlayPosition),
                                g = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Duration);
                            if (1 === s) {
                                if (w.TaskUtilHelper.getTaskFileType(l) === w.TaskUtilHelper.FileExtType.Video) if (null !== t && void 0 !== t && -1 !== t) {
                                    if (a === t) {
                                        i.push({
                                            fileName: l,
                                            fullPath: c,
                                            index: a,
                                            cid: h,
                                            gcid: f,
                                            playPosition: p,
                                            duration: g
                                        });
                                        break
                                    }
                                } else i.push({
                                    fileName: l,
                                    fullPath: c,
                                    index: a,
                                    cid: h,
                                    gcid: f,
                                    playPosition: p,
                                    duration: g
                                })
                            }
                        }
                    }
                } while (0);
                return i
            })
        }

        function E(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = [];
                do {
                    if (void 0 === e || null === e) break;
                    let n = Z.getTaskFromTaskId(e);
                    if (null === n) break;
                    if (n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType) !== d.DownloadKernel.TaskType.Group) break;
                    let a = n.getExtraObject();
                    if (null === a || void 0 === a) break;
                    let r = a.getSubTaskCount();
                    for (let e = 0; e < r; ++e) {
                        let n = a.getSubTaskByIndex(e), r = e,
                            s = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.DownloadSubTask),
                            l = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath),
                            u = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), c = o.join(l, u),
                            f = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.Cid),
                            p = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid),
                            g = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl),
                            m = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.PlayPosition),
                            v = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.Duration), y = h(n);
                        if (1 === s) {
                            if (w.TaskUtilHelper.getTaskFileType(u) === w.TaskUtilHelper.FileExtType.Video) if (null !== t && void 0 !== t && -1 !== t) {
                                if (r === t) {
                                    i.push({
                                        fileName: u,
                                        fullPath: c,
                                        index: r,
                                        cid: f,
                                        gcid: p,
                                        isForbidden: y,
                                        taskId: n.getId(),
                                        taskUrl: g,
                                        playPosition: m,
                                        duration: v
                                    });
                                    break
                                }
                            } else i.push({
                                fileName: u,
                                fullPath: c,
                                index: r,
                                cid: f,
                                gcid: p,
                                isForbidden: y,
                                taskId: n.getId(),
                                taskUrl: g,
                                playPosition: m,
                                duration: v
                            })
                        }
                    }
                } while (0);
                return i
            })
        }

        function ee(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = !1;
                if (void 0 !== t && "" !== t) {
                    if (!1 !== i) {
                        let e = k.ConfigNS.getValue("MoveToDir", "LatestSavePath", []), i = e.indexOf(t);
                        -1 !== i && e.splice(i, 1), e.splice(0, 0, t), e = e.slice(0, 3), k.ConfigNS.setValue("MoveToDir", "LatestSavePath", e), k.ConfigNS.save().catch()
                    }
                    for (let i of e) n = yield Z.moveTaskToPath(i.taskId, t)
                }
                return n
            })
        }

        function se(e) {
            let t = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType),
                i = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl);
            if (t === d.DownloadKernel.TaskType.P2sp) {
                let t = e.getExtraObject().getDisplayUrl();
                "" !== t && void 0 !== t && (i = t)
            }
            return i
        }

        function le(e) {
            let t = $.getCategoryView(e, d.DownloadKernel.CategroyViewID.Downloading);
            if (t) if ($.isPrivateCategory(e)) {
                let e = t.getTasks();
                for (let [, t]of e) if (null !== t) {
                    t.getTaskAttribute(d.DownloadKernel.TaskAttribute.Background) || Z.startTask(t.getId()).catch()
                }
            } else {
                let e = t.getTasks(), i = [];
                for (let [t, n]of e) if (null !== n) {
                    n.getTaskAttribute(d.DownloadKernel.TaskAttribute.Background) || i.push(t)
                }
                i.length > 0 && _.DownloadDispatchNS.startTasks(i).catch()
            }
        }

        function de(e, t) {
            let i = $.getCategoryView(e, d.DownloadKernel.CategroyViewID.Downloading);
            if (!i) return;
            let n = [], o = i.getTasks();
            for (let [, e]of o) if (null !== e) {
                e.getTaskAttribute(d.DownloadKernel.TaskAttribute.Background) || n.push(e.getId())
            }
            n.length > 0 && Z.batchStopTask(n, t)
        }

        function ue(e, i = !1, a = !1) {
            return n(this, void 0, void 0, function* () {
                function r(e) {
                    let t = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.DownloadingPeriod),
                        i = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.DownloadSize);
                    return 0 === t && (t = 1), Math.round(i / t)
                }

                let s = {ret: !1, errcode: 0};
                do {
                    let c = null;
                    if (!a && e.playUrl && !e.isEmbed && !e.panFileId && (yield l.FileSystemAWNS.existsAW(e.playUrl))) {
                        let i = yield V.client.callServerFunction("GetConfigValue", "CompletedTaskPlay", "LanuchMediaPlayer", "1");
                        if ("1" === i) {
                            c = yield ae();
                            let e = k.ConfigNS.getValue("CompletedTaskPlay", "isXmpInited", 1);
                            if (c && (yield l.FileSystemAWNS.existsAW(c))) 2 === e && v.MessageBox.custom("XmpAssociate").then(e => n(this, void 0, void 0, function* () {
                                if (e.action === y.MessageBoxNS.Action.OK) {
                                    let e = yield W.asyncRemoteCall.getApp(),
                                        t = o.join(yield e.getPath("desktop"), "迅雷影音.lnk");
                                    J.createShortcut(t, o.resolve(__rootDir, "../../XMP/Program/Xmp.exe"), "-StartType:DesktopIcon", o.join(__rootDir, "../../XMP/Program/xmp.ico"), e => {
                                        Y.information("createShortcut result", e)
                                    })
                                }
                                k.ConfigNS.setValue("CompletedTaskPlay", "isXmpInited", 1)
                            })).catch(); else {
                                let t = y.MessageBoxNS.Action.OK, i = J.getChannelID();
                                if (0 === e && "100004" !== i ? yield v.MessageBox.custom("XmpWaitInit") : yield P.default.installXmp(), !(t !== y.MessageBoxNS.Action.OK || (c = yield ae()) && (yield l.FileSystemAWNS.existsAW(c)))) break
                            }
                        } else if ("2" === i) {
                            t(e.playUrl).catch();
                            break
                        }
                    }
                    if (!e.playUrl || "" === e.playUrl) break;
                    let h = Z.getTaskFromTaskId(e.taskId), f = "", p = 0, g = "", m = void 0;
                    if (null !== h && void 0 !== h) {
                        if ((m = h.getType()) === d.DownloadKernel.TaskType.Bt) {
                            g = f = h.getExtraObject().getInfoId(), e.taskUrl || (e.taskUrl = "magnet:?xt=urn:btih:" + f)
                        } else if (m === d.DownloadKernel.TaskType.Magnet) {
                            f = h.getExtraObject().getFileHash()
                        } else m !== d.DownloadKernel.TaskType.Emule && m !== d.DownloadKernel.TaskType.P2sp || (f = h.getTaskBaseInfo().gcid);
                        p = r(h)
                    }
                    let T = [], w = '/surl "' + e.playUrl + '"', I = "/sstartfrom xl11", S = "/sopenfrom " + e.openFrom;
                    "dc" === e.playType && (T.push("/stype"), T.push("dc")), T.push(I), T.push(S);
                    let _ = '/sname "' + e.fileName + '"';
                    T.push(_);
                    let D = "/scid " + e.cid;
                    T.push(D);
                    let A = "/sgcid " + e.gcid;
                    T.push(A), e.playPosPercent ? T.push("/iplaypercent " + 100 * e.playPosPercent) : b.isNumber(e.startPos) && (j.ThunderHelper.isWindows10() ? T.push("/iplayposition " + e.startPos) : T.push("/#i_laststartpos " + e.startPos));
                    let N, x = K.default.getConfigInfo("XmpLitePlayer", "EmbedMode"),
                        E = (yield(yield W.asyncRemoteCall.getCurrentWindow()).getNativeWindowHandle()).readUInt32LE(0);
                    T.push("-thunderwnd:" + E), Y.information("[CrossProduct] embed=", x);
                    let M = H.XmpPlaySoure.PLAY_BY_DOWNLOAD;
                    if (h) {
                        let t = h.getTaskAttribute(d.DownloadKernel.TaskAttribute.GroupTaskId);
                        N = "number" == typeof t && t > 0 ? t.toString() : e.taskId.toString()
                    } else e.panFileId && (N = e.panFileId, M = H.XmpPlaySoure.PLAY_BY_PAN);
                    if (c || (yield V.client.callServerFunction("SetPlayingTaskId", N, M)), e.playSoure = M, null !== x && 1 !== x || !e.isEmbed || T.push("-embedmode"), i || (yield C.ThunderNewTask.selectTask(Number(N))), h) {
                        let e = h.getTaskAttribute(d.DownloadKernel.TaskAttribute.RefUrl);
                        if (e) {
                            let t = "/srefurl " + e;
                            T.push(t)
                        }
                    }
                    let F = (new Date).getTime();
                    T.push("/sclicktimestamp " + F), "" !== f && T.push("/scommentid " + f), p > 0 && T.push("/thunderdownloadSpeed " + p);
                    let L = "/sfilesize " + e.fileSize;
                    if (T.push(L), m === d.DownloadKernel.TaskType.Bt) {
                        let t = '/shashid "' + g + '"';
                        T.push(t);
                        let i = '/ssubid "' + e.fileIndex + '"';
                        T.push(i)
                    }
                    let R = '/sext "' + o.extname(e.fileName) + '"';
                    T.push(R);
                    let B = "/staskid " + e.taskId;
                    if (T.push(B), void 0 !== e.taskType) {
                        let t = "/stasktype " + e.taskType;
                        T.push(t)
                    }
                    if (null !== e.fileDir && void 0 !== e.fileDir && "" !== e.fileDir) {
                        let t = '/sFilePath "' + e.fileDir + '"';
                        T.push(t)
                    }
                    let G = "/ssdkver " + u.DownloadKernelManager.getDownloadSdkVersion();
                    T.push(G);
                    let z = yield O.TaskCtrlOperatorNS.getUserLoginInfo();
                    if ("" !== z && T.push(z), e.dlnaPlay && T.push("/sshowdlna on"), e.panFileId) {
                        let t = '/spanfileid "' + e.panFileId + '"';
                        T.push(t)
                    }
                    if (e.playType) {
                        let t = '/splayType "' + e.playType + '"';
                        T.push(t)
                    }
                    if (e.playFrom) {
                        let t = '/splayFrom "' + e.playFrom + '"';
                        T.push(t)
                    }
                    T.push(w);
                    let Q = T.join(" ");
                    if (Y.information("playVideoByXmp strArgs", Q), c) {
                        let e = o.dirname(c);
                        Q += " LocalFile";
                        let t = J.shellExecute(0, "open", c, Q, e, "SW_SHOW");
                        t > 32 ? s.ret = !0 : s.errcode = t, U.server.fireClientEvent("OnPlayVideo", t), Y.information("shellExecute:result = ", t)
                    } else {
                        "local" !== e.playType ? V.client.callServerFunction("SetPerformanceItemStart", "DownloadAndPlay").catch() : V.client.callServerFunction("SetPerformanceItemStart", "PlayFile").catch();
                        let t = (new Date).getTime();
                        yield U.server.callClientFunctionByName(q.mainRendererContext, "XmpPlayerRecordStat", "setclickStartTime", t), U.server.callClientFunctionByName(X.CommonIPCBase.mainRendererContext, "XmpPlayerOpen", e).catch()
                    }
                } while (0);
                return U.server.fireClientEvent("OnPlayVideoByXmp"), s
            })
        }

        function ce(e, t, i, a, r, s, u, c = !0, h, g, m, v, y) {
            return n(this, void 0, void 0, function* () {
                let n = !1, w = Z.getTaskFromTaskId(e);
                do {
                    if (!w) break;
                    if (!v) {
                        if (!w.isSupportPlay()) break
                    }
                    let k = !1, C = $.getCategoryFromId(r);
                    (!C || C && C.getName() === f.CategoryManager.panCategoryName) && (k = !0);
                    let b = {playUrl: "", fileName: ""}, S = "", D = w.getTaskStatus(), A = null,
                        N = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.CategoryId), x = w.getIsPrivate();
                    if (b.isYunRecvTask = !x && -1 !== N, Y.warning("cqm downloadAndPlay xmpInfo.isYunRecvTask", b.isYunRecvTask), b.taskUrl = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl), b.fileSize = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.FileSize), b.taskId = e, b.taskType = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType), b.fileIndex = -1, b.isEmbed = h, b.dlnaPlay = s, b.startPos = void 0, b.playPosPercent = u, b.openFrom = "xunlei11", b.playFrom = g, b.showBackIcon = !1 !== m, b.isZipPlay = v, h && U.server.fireClientEvent("OnShowDownAndPlayToast", e), D === d.DownloadKernel.TaskStatus.Succeeded || D === d.DownloadKernel.TaskStatus.Seeding) {
                        if (b.playType = "local", v) {
                            let e = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath);
                            if (b.fileName = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), S = o.resolve(e, b.fileName), !(yield l.FileSystemAWNS.existsAW(S))) break;
                            b.cid = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.Cid), b.gcid = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid), b.playUrl = S
                        } else if (b.taskType === d.DownloadKernel.TaskType.Emule || b.taskType === d.DownloadKernel.TaskType.P2sp) {
                            let e = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath);
                            if (b.fileName = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), S = o.resolve(e, b.fileName), !(yield l.FileSystemAWNS.existsAW(S))) break;
                            if (b.cid = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.Cid), b.gcid = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid), b.playUrl = S, c) {
                                let e = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.Duration),
                                    t = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.PlayPosition);
                                b.startPos = e !== t ? t : 0
                            } else !1 === c && (b.startPos = 0)
                        } else if (b.taskType === d.DownloadKernel.TaskType.Bt || b.taskType === d.DownloadKernel.TaskType.Group) {
                            let i = [];
                            if (0 === (i = b.taskType === d.DownloadKernel.TaskType.Bt ? yield p(e, t) : yield E(e, t)).length) break;
                            if (null !== (A = (i.length, i[0]))) {
                                if (yield l.FileSystemAWNS.existsAW(A.fullPath)) b.playUrl = A.fullPath; else if (b.taskType === d.DownloadKernel.TaskType.Bt) b.playUrl = yield w.getPlayUrl(A.index); else {
                                    let e = w.getExtraObject().getSubTaskByIndex(A.index);
                                    null !== e && void 0 !== e && (b.playUrl = yield e.getPlayUrl(-1))
                                }
                                b.fileName = A.fileName, b.cid = A.cid, b.gcid = A.gcid, b.fileIndex = A.index, c ? A.duration !== A.playPosition ? b.startPos = A.playPosition : b.startPos = 0 : !1 === c && (b.startPos = 0), b.taskType === d.DownloadKernel.TaskType.Group && (b.taskId = A.taskId, b.taskUrl = A.taskUrl)
                            }
                        }
                    } else {
                        if (b.playType = "p2s", D === d.DownloadKernel.TaskStatus.StartWaiting) {
                            Y.information("down and play waiting");
                            break
                        }
                        if (w.setDownloadStrategy(d.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_DOWNLOADINGPLAYING), D === d.DownloadKernel.TaskStatus.Stopped || D === d.DownloadKernel.TaskStatus.Failed) {
                            if (!(yield _.DownloadDispatchNS.startTask(e))) {
                                Y.information("down and play start waiting");
                                break
                            }
                            yield re(e)
                        }
                        let i = !0;
                        if (b.taskType === d.DownloadKernel.TaskType.Bt || b.taskType === d.DownloadKernel.TaskType.Group) {
                            let n = [];
                            if (0 === (n = b.taskType === d.DownloadKernel.TaskType.Bt ? yield p(e, t) : yield E(e, t)).length) break;
                            if (null !== (A = (n.length, n[0]))) {
                                if (yield l.FileSystemAWNS.existsAW(A.fullPath)) b.playUrl = A.fullPath, i = !1; else if (b.taskType === d.DownloadKernel.TaskType.Bt) b.playUrl = yield w.getPlayUrl(A.index); else {
                                    let e = w.getExtraObject().getSubTaskByIndex(A.index);
                                    null !== e && void 0 !== e && (b.playUrl = yield e.getPlayUrl(-1))
                                }
                                b.fileDir = o.dirname(A.fullPath), b.fileName = A.fileName, b.cid = A.cid, b.gcid = A.gcid, b.fileIndex = A.index, c ? A.duration !== A.playPosition ? b.startPos = A.playPosition : b.startPos = 0 : !1 === c && (b.startPos = 0), b.taskType === d.DownloadKernel.TaskType.Group && (b.taskId = A.taskId, b.taskUrl = A.taskUrl), Y.information("Thunder.DownloadAndPlayIPC playTaskId:", b.taskId, ", taskId:", e)
                            }
                        } else if (b.taskType === d.DownloadKernel.TaskType.Emule || b.taskType === d.DownloadKernel.TaskType.P2sp) if (b.playUrl = yield w.getPlayUrl(-1), b.fileName = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), b.fileDir = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath), b.cid = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.Cid), b.gcid = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid), c) {
                            let e = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.Duration),
                                t = w.getTaskAttribute(d.DownloadKernel.TaskAttribute.PlayPosition);
                            b.startPos = e !== t ? t : 0
                        } else !1 === c && (b.startPos = 0);
                        b.playUrl && b.playUrl
                    }
                    v && (b.fileName = y, b.fileIndex = t);
                    let O = yield ue(b, k, v);
                    if (n = O.ret) {
                        let e = w.getType();
                        if (e === d.DownloadKernel.TaskType.Bt) {
                            let e = w.getExtraObject().getBtFileByRealIndex(A.index);
                            e.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileStatus) === d.DownloadKernel.BtFileStatus.Complete && e.setUserRead(1)
                        } else if (e === d.DownloadKernel.TaskType.Group) {
                            let e = w.getExtraObject().getSubTaskByIndex(A.index);
                            null !== e && void 0 !== e && (e.getTaskStatus() !== d.DownloadKernel.TaskStatus.Succeeded && e.getTaskStatus() !== d.DownloadKernel.TaskStatus.Seeding || e.setUserRead(1))
                        } else w.getTaskStatus() !== d.DownloadKernel.TaskStatus.Succeeded && w.getTaskStatus() !== d.DownloadKernel.TaskStatus.Seeding || w.setUserRead(1)
                    }
                    let P = [];
                    if (void 0 === r && (r = I.default.getCurrentCategoryId()), -1 === r) P.push("panel_type=mypc"); else if ($.isPrivateCategory(r)) P.push("panel_type=private"); else {
                        let e = $.getCategoryFromId(r);
                        e && P.push("panel_type=" + e.getName())
                    }
                    void 0 === a && (a = ""), P.push("panel=" + a), P.push("taskid=" + e), P.push("filename=" + encodeURIComponent(b.fileName)), void 0 === i && (i = "other"), P.push("click_source=" + i), n ? P.push("result=success") : (P.push("result=fail"), P.push("errorcode=" + O.errcode));
                    let M = P.join(",");
                    Y.information("trackEvent", "download_leftpanel", "play_panel_show", M), T.XLStatNS.trackEvent("download_leftpanel", "play_panel_show", "", 0, 0, 0, 0, M)
                } while (0);
                return n
            })
        }

        function he(e) {
            do {
                if (null === e || void 0 === e || void 0 === e.taskId) break;
                let t = Z.getTaskFromTaskId(e.taskId);
                if (null === t || void 0 === t) break;
                if (t.getTaskAttribute(d.DownloadKernel.TaskAttribute.CategoryViewId) !== d.DownloadKernel.CategroyViewID.Downloading) break;
                if ("ThunderUnion" !== t.getTaskAttribute(d.DownloadKernel.TaskAttribute.Origin)) break;
                if (t.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType) !== d.DownloadKernel.TaskType.Group) break;
                if (e.taskStatus === d.DownloadKernel.TaskStatus.Succeeded) break;
                let i = t.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName),
                    n = `filename=${encodeURIComponent(i)}`;
                Y.information("trackEvent js_grouptask_delete_click ", i, n), T.XLStatNS.trackEvent("core_operate", "js_grouptask_delete_click", "", 0, 0, 0, 0, n)
            } while (0)
        }

        e.asyncOpenItem = t, e.importUncompletedFromFile = r, e.importUncompleted = function () {
            return n(this, void 0, void 0, function* () {
                Y.information("import un-finished");
                let e = yield W.asyncRemoteCall.getCurrentWindow(), t = [{
                    name: "所有支持的文件类型（*.td;*.bt.td;*.emule.td;*.bc!;*.part;*.xltd）",
                    extensions: ["td", "bt.td", "emule.td", "bc!", "part", "xltd"]
                }, {name: "迅雷专有下载文件（*.td）", extensions: ["td", "xltd"]}, {
                    name: "迅雷BT下载文件（*.bt.td）",
                    extensions: ["bt.td"]
                }, {name: "迅雷eMule下载文件（*.emule.td）", extensions: ["emule.td"]}, {
                    name: "BitComet下载文件（*.bc!）",
                    extensions: ["bc!"]
                }, {name: "eMule0.47数据文件（*.part）", extensions: ["part"]}];
                const i = yield W.asyncRemoteCall.getDialog();
                e && !(yield e.isDestroyed()) && i.showOpenDialog(e, {properties: ["openFile"], filters: t}).then(e => {
                    let t = e.filePaths;
                    e.canceled ? Y.information("import un finished select none") : r(t[0], "TD")
                }).catch()
            })
        }, e.removeNonExistingTask = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = 0;
                do {
                    if (void 0 === e || null === e) {
                        let t = Q.getCategoryViewFromId(d.DownloadKernel.CategroyViewID.Completed);
                        if (null === t) break;
                        let i = t.getTasks();
                        e = [...i.values()].map(e => e.getTaskBaseInfo())
                    }
                    if (null === e || void 0 === e || 0 === e.length) break;
                    let i = [];
                    for (let n of e) (yield O.TaskCtrlOperatorNS.isExistTaskFile(n)) || (i.push(n.taskId), t += 1);
                    yield Z.deleteBatchTask(i, !0)
                } while (0);
                return t
            })
        }, e.markReadStatus = function (e, t) {
            do {
                if (null === e || 0 === e.length) break;
                for (let i of e) {
                    let e = Z.getTaskFromTaskId(i.taskId);
                    e && e.setUserRead(t)
                }
            } while (0)
        }, e.moveCategoryTask = function (e, t) {
            do {
                if (null === e || 0 === e.length) break;
                for (let i of e) Z.moveCategoryTask(i.taskId, t)
            } while (0)
        }, e.getFileIcon = function (e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => n(this, void 0, void 0, function* () {
                    (yield W.asyncRemoteCall.getApp()).getFileIcon(e).then(e => {
                        t(null === e || void 0 === e ? null : e.toDataURL())
                    }).catch()
                }))
            })
        }, e.executeInstallFile = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = !1;
                do {
                    let o = "", r = "";
                    if (null !== t && void 0 !== t && "" !== t) o = t, null !== i && void 0 !== i && "" !== i && (r = i); else {
                        if (e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType) !== d.DownloadKernel.TaskType.Group) break;
                        let t = e.getExtraObject(),
                            i = t.getUserData(N.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile");
                        if (void 0 === i || null === i || "" === i || "0" === i) break;
                        let n = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                        if (o = O.TaskCtrlOperatorNS.getSavePathByFileName(n, i), !(yield l.FileSystemAWNS.existsAW(o))) break;
                        r = "", null !== (i = t.getUserData(N.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams")) && void 0 !== i && "" !== i && (r = i)
                    }
                    if (a.ipcRenderer.send("onOpenExecute", o, r), n = !0, "ThunderUnion" === e.getTaskAttribute(d.DownloadKernel.TaskAttribute.Origin)) {
                        let t = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName),
                            i = `filename=${encodeURIComponent(t)}`;
                        Y.information("trackEvent js_grouptask_install ", t, i), T.XLStatNS.trackEvent("core_operate", "js_grouptask_install", "", 0, 0, 0, 0, i)
                    }
                } while (0);
                return n
            })
        }, e.openTaskFolder = function (e, t) {
            return n(this, void 0, void 0, function* () {
                let i = e.savePath, n = e.taskName, a = "", r = yield W.asyncRemoteCall.getShell();
                "" === n ? a = i : (void 0 !== n && n.indexOf(".") === n.length - 1 && (n = n.substring(0, n.length - 1)), a = o.join(i, n));
                do {
                    if (e.taskType === d.DownloadKernel.TaskType.Bt) {
                        let n = Z.getTaskFromTaskId(e.taskId), s = n.getExtraObject(), u = s.getDownloadFile();
                        if (1 !== u.length) {
                            t ? ie(a).catch() : r.showItemInFolder(a);
                            break
                        }
                        if (yield F.SingleBtTaskNS.isSingleBtTask(n)) a = F.SingleBtTaskNS.getSinleBtTaskFilePath(n); else {
                            let e = s.getBtFileList();
                            for (let [, t]of e) if (t.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex) === u[0]) {
                                let e = t.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FilePath),
                                    n = t.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName),
                                    r = o.join(a, e);
                                if (a = o.join(a, e, n), e && !(yield l.FileSystemAWNS.dirExistsAW(r))) {
                                    let t = o.join(i, e);
                                    (yield l.FileSystemAWNS.dirExistsAW(t)) && (a = o.join(i, e, n))
                                }
                                break
                            }
                        }
                    } else {
                        if (e.taskType === d.DownloadKernel.TaskType.Group) {
                            t ? ie(i).catch() : r.showItemInFolder(i);
                            break
                        }
                        if (e.taskType === d.DownloadKernel.TaskType.Unkown) break;
                        if (e.taskType === d.DownloadKernel.TaskType.Magnet) break
                    }
                    if (e.taskStatus === d.DownloadKernel.TaskStatus.Succeeded || e.taskStatus === d.DownloadKernel.TaskStatus.Seeding) {
                        (yield l.FileSystemAWNS.existsAW(a)) ? r.showItemInFolder(a) : ie(i).catch();
                        break
                    }
                    if (yield l.FileSystemAWNS.existsAW(a)) {
                        r.showItemInFolder(a);
                        break
                    }
                    if (e.taskType === d.DownloadKernel.TaskType.P2sp) {
                        (yield l.FileSystemAWNS.existsAW(a + ".td")) ? r.showItemInFolder(a + ".td") : (yield l.FileSystemAWNS.existsAW(a + ".xltd")) ? r.showItemInFolder(a + ".xltd") : ie(i).catch();
                        break
                    }
                    if (e.taskType === d.DownloadKernel.TaskType.Emule) {
                        (yield l.FileSystemAWNS.existsAW(a + ".emule.td")) ? r.showItemInFolder(a + ".emule.td") : (yield l.FileSystemAWNS.existsAW(a + ".xltd")) ? r.showItemInFolder(a + ".xltd") : (yield l.FileSystemAWNS.existsAW(a + ".emule.xltd")) ? r.showItemInFolder(a + ".emule.xltd") : ie(i).catch();
                        break
                    }
                    if (e.taskType === d.DownloadKernel.TaskType.Bt) {
                        (yield l.FileSystemAWNS.existsAW(a + ".bt.td")) ? r.showItemInFolder(a + ".bt.td") : (yield l.FileSystemAWNS.existsAW(a + ".xltd")) ? r.showItemInFolder(a + ".xltd") : (yield l.FileSystemAWNS.existsAW(a + ".bt.xltd")) ? r.showItemInFolder(a + ".bt.xltd") : ie(i).catch();
                        break
                    }
                    e.taskType === d.DownloadKernel.TaskType.Group && ie(i).catch()
                } while (0)
            })
        }, e.openTaskItem = function (e, a, r, u, c, h, f) {
            return n(this, void 0, void 0, function* () {
                let n = e.savePath, p = e.taskName, g = "";
                "" === p ? g = n : (void 0 !== p && p.indexOf(".") === p.length - 1 && (p = p.substring(0, p.length - 1)), g = o.join(n, p));
                let m = Z.getTaskFromTaskId(e.taskId), k = m.isSupportPlay();
                do {
                    if (e.taskType === d.DownloadKernel.TaskType.P2sp || e.taskType === d.DownloadKernel.TaskType.Emule) {
                        if (e.taskStatus !== d.DownloadKernel.TaskStatus.Succeeded && e.taskStatus !== d.DownloadKernel.TaskStatus.Seeding) break;
                        if (yield l.FileSystemAWNS.existsAW(g)) if (k) yield ce(e.taskId, -1, r, u, c, void 0, void 0, !0, h, f); else do {
                            if (g.endsWith(".exe")) {
                                const {exeVerify: t} = yield Promise.resolve().then(() => i(522));
                                yield t.readyAw();
                                let n = t.hit(e);
                                if (n) {
                                    let e = "core_event",
                                        t = `file_size=${n.size},\n                  file_name=${encodeURIComponent(n.name || "")},\n                  digital_signature=${encodeURIComponent(n.signature || "")},\n                  gcid=${n.gcid},\n                  product_name=${encodeURIComponent(n.productName || "")}`;
                                    T.XLStatNS.trackEvent(e, "run_bind_download_exe_alarm_pop_show", "", 0, 0, 0, 0, t);
                                    let i = (yield v.MessageBox.confirm({
                                        title: "确定要运行么",
                                        content: n.content,
                                        type: v.MessageBox.ConfirmType.Info,
                                        checkboxEnabled: !1,
                                        cancelVisible: !0,
                                        cancelText: "继续运行",
                                        okText: "取消运行"
                                    })).action === y.MessageBoxNS.Action.Cancel;
                                    if (t += `,button=${i ? "continue" : "cancel"}`, T.XLStatNS.trackEvent(e, "run_bind_download_exe_alarm_pop_click", "", 0, 0, 0, 0, t), !i) break
                                }
                            }
                            t(g).catch()
                        } while (0)
                    } else if (e.taskType === d.DownloadKernel.TaskType.Bt) {
                        let i = m.getExtraObject(), p = i.getDownloadFile();
                        if (e.taskStatus === d.DownloadKernel.TaskStatus.Succeeded || e.taskStatus === d.DownloadKernel.TaskStatus.Seeding) if (1 === p.length) {
                            if (yield F.SingleBtTaskNS.isSingleBtTask(m)) g = F.SingleBtTaskNS.getSinleBtTaskFilePath(m); else {
                                let e = i.getBtFileList();
                                for (let [, t]of e) if (t.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex) === p[0]) {
                                    let e = t.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FilePath),
                                        i = t.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName),
                                        a = o.join(g, e);
                                    if (g = o.join(g, e, i), e && !(yield l.FileSystemAWNS.dirExistsAW(a))) {
                                        let t = o.join(n, e);
                                        (yield l.FileSystemAWNS.dirExistsAW(t)) && (g = o.join(n, e, i))
                                    }
                                    break
                                }
                            }
                            k ? yield ce(e.taskId, -1, r, u, c, void 0, void 0, !0, h, f) : t(g).catch()
                        } else if (null !== a && void 0 !== a && -1 !== a) {
                            let i = yield s(e.taskId, a);
                            null === i || void 0 === i || i.length <= 0 ? ie(g).catch() : i[0].fileExtType === w.TaskUtilHelper.FileExtType.Video ? yield ce(e.taskId, a, r, u, c, void 0, void 0, !0, h, f) : null !== i[0].fullPath && void 0 !== i[0].fullPath && "" !== i[0].fullPath ? t(i[0].fullPath).catch() : ie(g).catch()
                        } else k ? yield ce(e.taskId, -1, r, u, c, void 0, void 0, !0, h, f) : ie(g).catch(); else if (null !== a && void 0 !== a && -1 !== a) {
                            let i = yield s(e.taskId, a), n = {playUrl: i[0].fullPath, fileName: ""};
                            null === i || void 0 === i || i.length <= 0 ? ie(g).catch() : i[0].fileExtType === w.TaskUtilHelper.FileExtType.Video ? i[0].fullPath && (yield l.FileSystemAWNS.existsAW(i[0].fullPath)) ? (n.fileIndex = i[0].btFile.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex), n.fromweb = h, n.taskId = e.taskId, n.fileSize = 0, yield ue(n)) : yield ce(e.taskId, a, r, u, c, void 0, void 0, !0, h, f) : null !== i[0].fullPath && void 0 !== i[0].fullPath && "" !== i[0].fullPath ? t(i[0].fullPath).catch() : ie(g).catch()
                        } else ie(g).catch()
                    } else if (e.taskType === d.DownloadKernel.TaskType.Group) if (null !== a && void 0 !== a && -1 !== a) {
                        let e = m.getExtraObject();
                        if (null === e || void 0 === e) break;
                        let i = e.getSubTaskByIndex(a), n = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId),
                            s = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath),
                            p = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), g = "";
                        "" === p ? g = s : (void 0 !== p && p.indexOf(".") === p.length - 1 && (p = p.substring(0, p.length - 1)), g = o.join(s, p));
                        let v = i.isSupportPlay();
                        (yield l.FileSystemAWNS.existsAW(g)) && (v ? yield ce(n, -1, r, u, c, void 0, void 0, !0, h, f) : t(g).catch())
                    } else {
                        let e = m.getExtraObject();
                        e && ie(e.getSubTaskByIndex(0).getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath)).catch()
                    }
                } while (0)
            })
        }, e.openAsTaskItem = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = e.savePath, i = e.taskName, n = "";
                "" === i ? n = t : (void 0 !== i && i.indexOf(".") === i.length - 1 && (i = i.substring(0, i.length - 1)), n = o.join(t, i));
                let a = Z.getTaskFromTaskId(e.taskId);
                do {
                    if (e.taskType === d.DownloadKernel.TaskType.P2sp || e.taskType === d.DownloadKernel.TaskType.Emule) {
                        if (e.taskStatus !== d.DownloadKernel.TaskStatus.Succeeded && e.taskStatus !== d.DownloadKernel.TaskStatus.Seeding) break;
                        L.exec(`rundll32.exe shell32.dll,OpenAs_RunDLL ${n}`, {cwd: process.cwd()})
                    } else if (e.taskType === d.DownloadKernel.TaskType.Bt) {
                        let t = a.getExtraObject(), i = t.getDownloadFile();
                        if ((e.taskStatus === d.DownloadKernel.TaskStatus.Succeeded || e.taskStatus === d.DownloadKernel.TaskStatus.Seeding) && 1 === i.length) if (yield F.SingleBtTaskNS.isSingleBtTask(a)) n = F.SingleBtTaskNS.getSinleBtTaskFilePath(a), L.exec(`rundll32.exe shell32.dll,OpenAs_RunDLL ${n}`, {cwd: process.cwd()}); else {
                            let i = yield F.SingleBtTaskNS.getCorrectSingleBtFolder(a);
                            if (i) {
                                let a = e.savePath, r = void 0, s = t.getBtFileList();
                                for (let [, e]of s) {
                                    r = e.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName);
                                    break
                                }
                                n = o.join(a, i, r), L.exec(`rundll32.exe shell32.dll,OpenAs_RunDLL ${n}`, {cwd: process.cwd()})
                            }
                        }
                    }
                } while (0)
            })
        }, e.startTasks = function (e) {
            let t = e.map(e => e.taskId);
            _.DownloadDispatchNS.startTasks(t).catch()
        }, e.pauseTasks = function (e, t) {
            let i = [];
            for (let t of e) i.push(t.taskId);
            i.length > 0 && Z.batchStopTask(i, t);
            let n = j.ThunderHelper.getTickCount();
            for (let e of i) window.__performanceMap["PauseTask_" + e] = n
        }, e.deleteTasks = function (e, t) {
            do {
                if (null === e || void 0 === e || e.length <= 0) break;
                if (void 0 === t && (t = !0), t) {
                    let t = !1;
                    for (let i of e) if (i.taskStatus === d.DownloadKernel.TaskStatus.Started) {
                        t = !0;
                        break
                    }
                    if (t) v.MessageBox.confirm({
                        title: "删除任务",
                        content: "任务正在下载，您确定删除任务吗？",
                        type: v.MessageBox.ConfirmType.Info,
                        checkboxEnabled: !1
                    }).then(t => {
                        if (t.action === y.MessageBoxNS.Action.OK) {
                            let t = [];
                            for (let i of e) he(i), t.push(i.taskId);
                            Z.batchRemoveToRecycle(t).catch(), 1 === e.length && I.default.setNeedSelectNext(!0)
                        }
                    }).catch(); else {
                        let t = [];
                        for (let i of e) he(i), t.push(i.taskId);
                        Z.batchRemoveToRecycle(t).catch(), 1 === e.length && I.default.setNeedSelectNext(!0)
                    }
                }
            } while (0)
        }, e.destroyTasks = function (e, t) {
            do {
                if (null === e || void 0 === e || e.length <= 0) break;
                if (void 0 === t && (t = !0), t) {
                    let t = k.ConfigNS.getValue("ConfigMsg", "ConfigMsg_DeleteFile", !0);
                    v.MessageBox.confirm({
                        title: "确定要删除吗？",
                        type: v.MessageBox.ConfirmType.Warning,
                        checkboxEnabled: !0,
                        checkboxChecked: t,
                        checkboxLabel: "同时删除本地文件",
                        okText: "删除"
                    }, {width: 400, height: 154, center: !0}).then(t => {
                        if (t.action === y.MessageBoxNS.Action.OK) {
                            let i = [];
                            for (let t of e) he(t), i.push(t.taskId);
                            k.ConfigNS.setValue("ConfigMsg", "ConfigMsg_DeleteFile", t.checkboxChecked), Z.deleteBatchTask(i, t.checkboxChecked).then(e => {
                                t.checkboxChecked && !e && te.showNotify(D.ToastNotifyManagerNS.notifyIdTaskOperatorDestroyTask, A.ToastNotifyItemType.RedNotify, "文件在本地磁盘中删除失败", 3e3)
                            }).catch(), 1 === e.length && I.default.setNeedSelectNext(!0)
                        }
                    }).catch()
                } else {
                    let t = [];
                    for (let i of e) he(i), t.push(i.taskId);
                    Z.deleteBatchTask(t, !0).then(e => {
                        e || te.showNotify(D.ToastNotifyManagerNS.notifyIdTaskOperatorDestroyTask, A.ToastNotifyItemType.RedNotify, "文件在本地磁盘中删除失败", 3e3)
                    }).catch(), 1 === e.length && I.default.setNeedSelectNext(!0)
                }
            } while (0)
        }, e.move2Dir = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let o = !1;
                if (void 0 === t || "" === t) {
                    let a = yield W.asyncRemoteCall.getCurrentWindow();
                    const r = yield W.asyncRemoteCall.getDialog();
                    a && !(yield a.isDestroyed()) && r.showOpenDialog(a, {properties: ["openDirectory"]}).then(a => n(this, void 0, void 0, function* () {
                        let n = a.filePaths;
                        a.canceled || (t = n[0]), void 0 !== t && "" !== t && (o = yield ee(e, t, i))
                    })).catch()
                } else o = yield ee(e, t, i);
                return o
            })
        }, e.copy2Dir = function (e, t) {
            return n(this, void 0, void 0, function* () {
                let i = void 0;
                if (void 0 !== t && "" !== t) i = t; else {
                    let e = yield W.asyncRemoteCall.getCurrentWindow();
                    const t = yield W.asyncRemoteCall.getDialog();
                    if (e && !(yield e.isDestroyed())) {
                        let n = yield t.showOpenDialog(e, {properties: ["openDirectory"]});
                        n.canceled || (i = n.filePaths[0])
                    }
                }
                if (void 0 !== i && "" !== i) {
                    let t = k.ConfigNS.getValue("CopyToDir", "LatestSavePath", []), n = t.indexOf(i);
                    -1 !== n && t.splice(n, 1), t.splice(0, 0, i), t = t.slice(0, 3), k.ConfigNS.setValue("CopyToDir", "LatestSavePath", t), k.ConfigNS.save().catch();
                    for (let t of e) {
                        let e = t.savePath, n = t.taskName, r = e, s = i;
                        if (t.taskType !== d.DownloadKernel.TaskType.Group) {
                            let i = Z.getTaskFromTaskId(t.taskId);
                            if (yield F.SingleBtTaskNS.isSingleBtTask(i)) {
                                let e = i.getExtraObject().getBtFileList();
                                for (let [, t]of e) {
                                    n = t.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName);
                                    break
                                }
                            }
                            r = o.join(e, n)
                        } else r = o.join(r, "*");
                        s = o.join(i, n), r !== i && a.ipcRenderer.send(S.ThunderChannelList.channelRMFileCopy, r, s)
                    }
                }
            })
        }, e.copyLink = function (e, t) {
            let i = [];
            for (let t of e) {
                let e = Z.getTaskFromTaskId(t.taskId);
                if (-1 === t.categoryId || $.isPrivateCategory(t.categoryId)) if (t.taskType !== d.DownloadKernel.TaskType.P2sp) if (t.taskType !== d.DownloadKernel.TaskType.Emule) if (t.taskType !== d.DownloadKernel.TaskType.Group) ; else {
                    let e = Z.getTaskFromTaskId(t.taskId).getExtraObject(), n = e.getSubTaskCount();
                    for (let t = 0; t < n; t++) {
                        let n = se(e.getSubTaskByIndex(t));
                        i.push(n)
                    }
                } else i.push(t.url); else {
                    let n = e.getExtraObject().getDisplayUrl();
                    "" === n && (n = t.url), i.push(n)
                }
            }
            a.clipboard.writeText(i.join("\r\n")), V.client.callServerFunction("ShowMessageToast", {
                message: "链接已复制",
                type: "success"
            }).catch()
        }, e.copyMagnetLink = function (e, t) {
            do {
                if (void 0 === e) break;
                if (e.taskType !== d.DownloadKernel.TaskType.Bt) break;
                let t = Z.getTaskFromTaskId(e.taskId), i = t.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl);
                i && "" !== i || (i = "magnet:?xt=urn:btih:" + t.getExtraObject().getInfoId()), a.clipboard.writeText(i), V.client.callServerFunction("ShowMessageToast", {
                    message: "磁力链接已复制",
                    type: "success"
                }).catch()
            } while (0)
        }, e.shareLink = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = "", a = e.taskName, r = "", s = Z.getTaskFromTaskId(e.taskId);
                if (e.taskType === d.DownloadKernel.TaskType.P2sp) "" === (n = s.getExtraObject().getDisplayUrl()) && (n = e.url), r = o.extname(a).toLowerCase(); else if (e.taskType === d.DownloadKernel.TaskType.Emule) n = e.url, r = o.extname(a).toLowerCase(); else {
                    if (e.taskType !== d.DownloadKernel.TaskType.Bt) return;
                    (n = s.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl)) && "" !== n || (n = "magnet:?xt=urn:btih:" + s.getExtraObject().getInfoId()), r = ".torrent"
                }
                let l = yield z.LoginHelperNS.loginHelper.getUserInfoAw("userid");
                v.MessageBox.custom("copy-link-share", {
                    url: n,
                    panel: t,
                    taskName: a,
                    ext: r,
                    taskId: e.taskId,
                    shareFrom: i,
                    userId: l
                }, {width: 500, height: 353, center: !0}).catch()
            })
        }, e.save2Cloud = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                function o(e) {
                    let t = 0;
                    for (let i of e) t += i.fileSize;
                    return t
                }

                function a(e, t) {
                    let i = [];
                    do {
                        if (e === d.DownloadKernel.CategroyViewID.Recycle) break;
                        if (e === d.DownloadKernel.CategroyViewID.Completed) {
                            i = t;
                            break
                        }
                        for (let e of t) e.taskStatus !== d.DownloadKernel.TaskStatus.Failed && i.push(e)
                    } while (0);
                    return i
                }

                function r() {
                    return n(this, void 0, void 0, function* () {
                        let e = void 0;
                        do {
                            let t = yield U.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcTreePath", {});
                            if (!t) break;
                            let i = t[0];
                            if (!i || i.error) break;
                            let n = "", o = "";
                            for (let e of i.path) n += "\\" + e.title, o += "\\" + e.id;
                            e = {id: o.slice(1), title: n.slice(1), parentId: i.parentId}
                        } while (0);
                        return e
                    })
                }

                function s(e, i) {
                    let n = [];
                    {
                        let o = Z.getTaskFromTaskId(e.taskId).getExtraObject(), a = o.getSubTaskCount();
                        for (let e = 0; e < a; ++e) {
                            let a = o.getSubTaskByIndex(e);
                            a && n.push({
                                searchFrom: "",
                                url: a.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl),
                                name: a.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName),
                                path: i.title,
                                parentId: i.parentId,
                                files: [],
                                from: t
                            })
                        }
                    }
                    return n
                }

                let l = "";
                do {
                    if (0 === e.length) break;
                    let n = a(i, e);
                    if (0 === n.length) {
                        l = `${e.length}个任务无法添加到云盘`;
                        break
                    }
                    let u = e.length, c = void 0;
                    if (!(yield V.client.callServerFunction("IsLogined"))) {
                        if (!(c = yield B.default(!1, !0, t))) break;
                        yield R.ThunderUtil.setTimeoutAw(50)
                    }
                    let h = yield U.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetDriveInfo");
                    if (!h || !h[0]) {
                        l = "未知错误，无法添加到云盘";
                        break
                    }
                    if (h[0].limit - h[0].usage < o(n)) {
                        l = "空间不足，无法添加到云盘";
                        break
                    }
                    let f = yield r();
                    if (!f || !f.title) break;
                    if (!(c = yield B.default(!1, !0, t))) break;
                    let p = [], g = {}, m = 0;
                    for (let e of n) if (e.taskType === d.DownloadKernel.TaskType.Group) {
                        let t = s(e, f);
                        if (0 === t.length) continue;
                        u = u - 1 + t.length;
                        let i = yield U.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcAddUrlTaskGroup", {
                            groupName: e.taskName,
                            urlTasks: t,
                            needToast: !1
                        });
                        if (!i || !i[0]) continue;
                        for (let t of i[0]) t.task && (m++, G.ThunderPanTaskNS.insertTask(e.taskId, t.task.id, c, JSON.stringify({
                            id: f.id,
                            title: f.title
                        })))
                    } else {
                        let i = e.url, n = [];
                        if (e.taskType === d.DownloadKernel.TaskType.Bt) {
                            let t = Z.getTaskFromTaskId(e.taskId), o = t.getExtraObject();
                            i || (i = "magnet:?xt=urn:btih:" + o.getInfoId());
                            let a = t.getExtraObject().getBtFileList();
                            for (let [, e]of a) e.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Download) && n.push(String(e.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.RealIndex)))
                        }
                        g[i] = e.taskId, p.push({
                            name: e.taskName,
                            url: i,
                            path: f.title,
                            parentId: f.parentId,
                            files: n,
                            from: t
                        })
                    }
                    let v = [];
                    if (p.length > 0) {
                        let e = yield U.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcBatchAddUrlsToDrive", p, void 0, void 0, !1);
                        if (e && e[0]) {
                            let t = e[0];
                            for (let e = 0; e < t.length; e++) {
                                let i = t[e];
                                if (i && i.task) {
                                    let t = i.task;
                                    m++, v.push({
                                        panId: t.id,
                                        user_id: t.user_id,
                                        path_id: f.id,
                                        path: f.title,
                                        taskId: g[p[e].url]
                                    })
                                }
                            }
                        }
                    }
                    u !== m && (l = `${u - m}个任务无法添加到云盘`), v.length > 0 && Z.batchRelateYunTask(v)
                } while (0);
                return l
            })
        }, e.saveAsTorrent = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    if (void 0 === e) break;
                    if (e.taskType !== d.DownloadKernel.TaskType.Bt) break;
                    let i = Z.getTaskFromTaskId(e.taskId).getExtraObject(), a = i.getSeedFilePath();
                    if (!(yield l.FileSystemAWNS.existsAW(a))) break;
                    let r = e.taskName;
                    void 0 !== r && "" !== r || "" === (r = i.getDisplayName()) && (r = o.parse(a).name);
                    let s = r, u = o.parse(r);
                    x.ParseUrlFileNameNS.isUsualFileExtName(u.ext) && (s = u.name + ".torrent");
                    let c = yield W.asyncRemoteCall.getCurrentWindow(),
                        h = {defaultPath: s, filters: [{name: "BT种子文件（*.torrent）", extensions: ["torrent"]}]};
                    (yield W.asyncRemoteCall.getDialog()).showSaveDialog(c, h).then(e => n(this, void 0, void 0, function* () {
                        let i = e.filePath;
                        void 0 !== i && "" !== i ? (".torrent" !== o.extname(i).toLowerCase() && (i += ".torrent"), (t = yield l.FileSystemAWNS.copyFileAW(a, i)) || te.showNotify(D.ToastNotifyManagerNS.notifyIdTaskOperatorSaveAsTorrent, A.ToastNotifyItemType.RedNotify, "获取此任务种子文件失败", 3e3)) : t = !0
                    })).catch()
                } while (0)
            })
        }, e.renameTask = function (e) {
            Y.information("rename", e.taskName, e.taskId);
            let t = e.taskName;
            v.MessageBox.custom("task-rename", {taskBase: e}, {width: 450, height: 194, center: !0}).then(i => {
                if (i.action === y.MessageBoxNS.Action.OK) do {
                    if (b.isNullOrUndefined(i.args)) break;
                    if (void 0 === i.args.fileName || null === i.args.fileName) break;
                    let n = i.args.fileName;
                    if (n === t) break;
                    Z.getTaskFromTaskId(e.taskId).reName(n).catch()
                } while (0)
            }).catch()
        }, e.recoverTask = function (e) {
            if (e.length > 1) {
                let t = [];
                for (let i of e) t.push(i.taskId);
                Z.batchRecoverFromRecycle(t)
            } else for (let t of e) Z.recoverFromRecycle(t.taskId);
            te.showNotify(D.ToastNotifyManagerNS.notifyIdTaskOperatorRecoverTask, A.ToastNotifyItemType.GreenNotify, "已还原任务", 3e3)
        }, e.clearRecycle = function () {
            let e = Q.getCategoryViewFromId(d.DownloadKernel.CategroyViewID.Recycle).getTasks();
            e.size > 0 && v.MessageBox.confirm({
                title: "确定清空回收站吗？",
                type: v.MessageBox.ConfirmType.Warning,
                checkboxEnabled: !0,
                checkboxChecked: !1,
                checkboxLabel: "同时删除文件"
            }, {width: 400, height: 174, center: !0}).then(t => {
                if (t.action === y.MessageBoxNS.Action.OK) {
                    let i = [];
                    e.forEach(e => {
                        i.push(e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId))
                    }), Z.deleteBatchTask(i, t.checkboxChecked).catch()
                }
            }).catch()
        }, e.startAllPausedTask = function () {
            return n(this, void 0, void 0, function* () {
                let e = [], t = Q.getCategoryViewFromId(d.DownloadKernel.CategroyViewID.Downloading).getTasks();
                for (let [, i]of t) i.getTaskStatus() === d.DownloadKernel.TaskStatus.Stopped && e.push(i);
                let i = e.map(e => e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId));
                yield _.DownloadDispatchNS.startTasks(i)
            })
        }, e.startAll = function () {
            let e = [], t = Q.getCategoryViewFromId(d.DownloadKernel.CategroyViewID.Downloading).getTasks();
            for (let [, i]of t) e.push(i);
            let i = e.map(e => e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId));
            _.DownloadDispatchNS.startTasks(i).catch(), z.LoginHelperNS.loginHelper.getUserInfoAw("userid").then(e => {
                e && le($.getCategoryFromUserId("ThunderPanPlugin", e, "ThunderPan Download Category").getId())
            }).catch()
        }, e.pauseAll = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = [], i = Q.getCategoryViewFromId(d.DownloadKernel.CategroyViewID.Downloading).getTasks();
                for (let [, e]of i) null !== e && (e.getTaskAttribute(d.DownloadKernel.TaskAttribute.Background) || t.push(e.getId()));
                t.length > 0 && Z.batchStopTask(t, e), z.LoginHelperNS.loginHelper.getUserInfoAw("userid").then(t => {
                    t && de($.getCategoryFromUserId("ThunderPanPlugin", t, "ThunderPan Download Category").getId(), e)
                }).catch()
            })
        }, e.hasCategoryStartTask = function (e) {
            let t = !1, i = $.getCategoryView(e, d.DownloadKernel.CategroyViewID.Downloading);
            if (!i) return t;
            let n = i.getTasks();
            for (let [, e]of n) if (null !== e) {
                let i = e.getTaskStatus();
                if (i === d.DownloadKernel.TaskStatus.StartWaiting || i === d.DownloadKernel.TaskStatus.StartPending || i === d.DownloadKernel.TaskStatus.Started) {
                    t = !0;
                    break
                }
            }
            return t
        }, e.startCategoryAllTask = le, e.pauseCategoryAllTask = de, e.playVideoByXmp = ue, e.downloadAndPlay = ce, e.statJsSdkDeleteTask = he, e.createBirdKey = function (e) {
            let t, i, n = Z.getTaskFromTaskId(e), o = n.getTaskBaseInfo(), a = n.getType(), r = "";
            if (a === d.DownloadKernel.TaskType.P2sp) r = o.url, i = "p2sp", t = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid); else if (a === d.DownloadKernel.TaskType.Emule) r = o.url, i = "emule", t = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.Gcid); else if (a === d.DownloadKernel.TaskType.Bt) {
                i = "bt";
                let e = n.getExtraObject();
                t = e.getInfoId(), (r = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl)) && "" !== r || (r = "magnet:?xt=urn:btih:" + e.getInfoId())
            } else if (a === d.DownloadKernel.TaskType.Magnet) i = "magnet"; else if (a === d.DownloadKernel.TaskType.Group) {
                i = "group";
                let e = {};
                e.taskGroupName = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), e.tasks = [];
                let t = n.getExtraObject(), o = t.getUserData(N.TaskUserDataGUID.guidDownloadGroupTask, "excludePath"),
                    a = t.getUserData(N.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile"),
                    s = t.getUserData(N.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams");
                e.excludePath = o || "", e.installFile = a || "", e.runParams = s || "";
                let l = t.getUserData(N.TaskUserDataGUID.guidCreateShortcut, "createShortcut");
                if (l && l.length > 0) try {
                    l = JSON.parse(l), e.createShortcut = l
                } catch (e) {
                    Y.warning(e)
                }
                let u = t.getSubTaskCount(), c = "", h = "";
                for (let i = 0; i < u; ++i) {
                    let n = t.getSubTaskByIndex(i), o = n.getType();
                    o !== d.DownloadKernel.TaskType.P2sp && o !== d.DownloadKernel.TaskType.Emule || (c = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl), h = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), e.tasks.push({
                        name: h,
                        url: c,
                        dir: ""
                    }))
                }
                r = JSON.stringify(e)
            }
            if (r.length > 0) {
                Y.information("点击任务详情按钮,生成迅雷口令,taskURL:", r);
                let e = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.CategoryViewId), a = new Map;
                a.set(d.DownloadKernel.CategroyViewID.Downloading, "downloading"), a.set(d.DownloadKernel.CategroyViewID.Completed, "complete"), a.set(d.DownloadKernel.CategroyViewID.Recycle, "trash"), a.set(d.DownloadKernel.CategroyViewID.Unkown, "unknown");
                let s = {
                    pannel: a.get(e),
                    gcid: t,
                    taskid: o.taskId.toString(),
                    filename: o.taskName,
                    pannelType: n.getIsPrivate() ? "private" : "mypc",
                    taskType: i
                };
                M.openBirdKeyEncodeDialog(r, s).catch()
            }
        }, e.getTaskBirdKeyData = function (e) {
            let t = "", i = Z.getTaskFromTaskId(e), n = i.getTaskBaseInfo(), o = i.getType();
            if (o === d.DownloadKernel.TaskType.P2sp) t = n.url; else if (o === d.DownloadKernel.TaskType.Emule) t = n.url; else if (o === d.DownloadKernel.TaskType.Bt) (t = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl)) && "" !== t || (t = "magnet:?xt=urn:btih:" + i.getExtraObject().getInfoId()); else if (o === d.DownloadKernel.TaskType.Magnet) ; else if (o === d.DownloadKernel.TaskType.Group) {
                let e = {};
                e.taskGroupName = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), e.tasks = [];
                let n = i.getExtraObject(), o = n.getUserData(N.TaskUserDataGUID.guidDownloadGroupTask, "excludePath"),
                    a = n.getUserData(N.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile"),
                    r = n.getUserData(N.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams");
                e.excludePath = o || "", e.installFile = a || "", e.runParams = r || "";
                let s = n.getUserData(N.TaskUserDataGUID.guidCreateShortcut, "createShortcut");
                if (s && s.length > 0) try {
                    s = JSON.parse(s), e.createShortcut = s
                } catch (e) {
                    Y.warning(e)
                }
                let l = n.getSubTaskCount(), u = "", c = "";
                for (let t = 0; t < l; ++t) {
                    let i = n.getSubTaskByIndex(t), o = i.getType();
                    o !== d.DownloadKernel.TaskType.P2sp && o !== d.DownloadKernel.TaskType.Emule || (u = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl), c = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), e.tasks.push({
                        name: c,
                        url: u,
                        dir: ""
                    }))
                }
                t = JSON.stringify(e)
            }
            return t
        }
    }(t.TaskOperatorNs || (t.TaskOperatorNs = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.channelRMNewTaskReadyForSetTaskData = "RM_NEWTASK_READYRORSETTASKDATA", e.channelRMNewTaskSetTaskData = "RM_NEWTASK_SETTASKDATA", e.channelRMPreNewTaskSetTaskData = "RM_PRENEWTASK_SETTASKDATA", e.channelRMNewTaskCreateNewTask = "RM_NEWTASK_CREATENEWTASK", e.channelRMNewTaskClose = "RM_NEWTASK_CLOSE", e.channelRMPreNewTaskClose = "RM_PRENEWTASK_CLOSE", e.channelRMNewTaskSetBTInfo = "RM_NEWTASK_SETBTINFO", e.channelRMNewTaskDownloadTorrent = "RM_NEW_TASK_DOWNLOAD_TORRENT", e.channelRMNewTaskCreateBtTask = "RM_NEWTASK_CRATEBTTASK", e.channelRMNewTaskCancleMagnet = "RM_NEWTASK_CANCLE_MAGNET", e.channelRMImportTorrent = "RM_NEWTASK_IMPORT_TORRENT", e.channelRMGetConfigValueResolve = "RM_GET_CONFIG_VALUE_RESOLVE", e.channelRMGetConfigValueReject = "RM_GET_CONFIG_VALUE_REJECT", e.channelRMSetConfigValueReject = "RM_SET_CONFIG_VALUE_REJECT", e.channelMRTrayMenuClick = "MR_TRAY_MENU_CLICK", e.channelMRNewTaskMagnetTaskCreated = "MR_NEW_TASK_MAGNET_TASK_CREATED", e.channelMRNewTaskDownloadTorrentResult = "MR_NEW_TASK_DOWNLOAD_TORRENT_RESULT", e.channelMRNewTaskCreateNewTaskResult = "MR_NEWTASK_CREATENEWTASK_RESULT", e.channelMRNewTaskCreateBtTaskResult = "RM_NEWTASK_CRATEBTTASK_RESULT", e.channelMRGetConfigValue = "MR_GET_CONFIG_VALUE", e.channelMRSetConfigValue = "MR_SET_CONFIG_VALUE", e.channelRMCommitPlanTask = "RM_PLANTASK_COMMIT", e.channelRMPerformePlanTask = "RM_PLANTASK_PERFORME", e.channelRMProcessSend = "RM_RENDER_PROCESS_INFO", e.channelRMGetPrivateSpaceInfo = "RM_RENDER_GET_PRIVATE_SPACE_INFO", e.channelMRGetPrivateSpaceInfoResult = "MR_RENDER_GET_PRIVATE_SPACE_INFO_RESULT", e.channelRMFileCopy = "RM_FILE_COPY", e.channelRMFileMove = "RM_FILE_MOVE", e.channelMRFileCopyResult = "MR_FILE_COPY_RESULT", e.channelMRFileMoveResult = "MR_FILE_MOVE_RESULT", e.channelRMGetSutitleByCid = "RM_RENDER_GET_SUBTITLE_BY_CID", e.channelMRGetSutitleByCidResult = "MR_RENDER_GET_SUBTITLE_BY_CID_RESULT", e.channelRMGetSutitleByName = "RM_RENDER_GET_SUBTITLE_BY_NAME", e.channelMRGetSutitleByNameResult = "MR_RENDER_GET_SUBTITLE_BY_NAME_RESULT", e.channelRMDownloadSutitle = "RM_RENDER_DOWNLOAD_SUBTITLE", e.channelMRDownloadSutitleSuc = "MR_RENDER_DOWNLOAD_SUBTITLE_SUCCESS", e.channelMRDownloadSutitleFail = "MR_RENDER_DOWNLOAD_SUBTITLE_FAIL", e.channelRMGetDisplayName = "RM_RENDER_GET_SUBTITLE_DISPLAYNAME", e.channelMRGetDisplayNameResult = "MR_RENDER_GET_SUBTITLE_DISPLAYNAME_RESULT", e.channelMRBringWindowToTop = "MR_RENDER_BRING_WINDOW_TO_TOP", e.channelRMDownloadXmp = "RM_RENDER_DOWNLOAD_XMP", e.channelRMXmpFixBoxCreated = "RM_RENDER_XMPFIXBOX_CREATED", e.channelMRFixXmpSuc = "MR_RENDER_FIX_XMP_SUC", e.channelMRFixXMPFail = "MR_RENDER_FIX_XMP_FAIL", e.channelRMDownloadXmpEx = "RM_RENDER_DOWNLOAD_XMP_EX", e.channelRMSetPosition = "RM_SET_POSITION", e.channelRMSetFoucs = "RM_SET_FOCUS", e.channelRMCreateAddressDropWnd = "RM_CREATE_ADDRESS_DROPWND", e.channelRMRefreshAddressDropWnd = "RM_REFRESH_ADDRESS_DROPWND", e.channelRMSelectAddressDropItem = "RM_SELECT_ADDRESS_DROPITEM", e.channelRMCreateSearchWindow = "RM_CREATE_SEARCH_WINDOW", e.channelRMShowSearchWindow = "RM_SHOW_SEARCH_WINDOW", e.channelRMAddressKeyDown = "RM_ADDRESS_BAR_KEYDOWN", e.channelMRFWAddressKeyDown = "MR_ADDRESS_FW_BAR_KEYDOWN", e.channelMRFWSelectAddressDropItem = "MR_FW_SELECT_ADDRESS_DROPITEM", e.channelRMAddressDropWndKeyDown = "RM_ADDRESS_DROPWND_KEYDOWN", e.channelRMClickMouse = "RM_CLICK_MOUSE", e.channelMRSearchBarFocusChange = "MR_SEARCHBAR_FOCUS_CHANGE", e.channelMRFWAddressDropWndKeyDown = "MR_FW_ADDRESS_DROPWND_KEYDOWN", e.channelMRClickAddressDropItem = "MR_CLICK_ADDRESS_DROPITEM", e.channelMRMainWndMax = "MR_MAINWINDOW_MAX", e.channelMRMainWndMin = "MR_MAINWINDOW_MIN", e.channelMRMainWndRestore = "MR_MAINWINDOW_RESTORE", e.channelRMGetBrowserStartType = "RM_GET_BROWSER_START_TYPE", e.channelMRGetBrowserStartTypeResult = "MR_GET_BROWSER_START_TYPE_RESULT", e.channelRMExecute = "RM_SHELL_EXECUTE", e.channelMRExecuteResult = "MR_SHELL_EXECUTE_RESULT", e.channelMRAdTipsClick = "MR_AD_TIPS_CLICK", e.channelMRNotificationMsg = "MR_NOTIFICATION_MSG", e.channelRMSetProgressBar = "RM_SET_PROGRESS_BAR", e.channelRMRoundWindow = "RM_ROUND_WINDOW", e.channelMRShowOrHideWindow = "MR_SHOW_OR_HIDE_WINDOW", e.channelMRSuspensionWindowShowOrHide = "MR_SUSPENSION_WINDOW_SHOW_OR_HIDE", e.channelRMConfigInitFinished = "RM_CONFIG_INIT_FINISHED", e.channelRMConfigValueChanged = "RM_CONFIG_VALUE_CHANGED", e.channelRMIndividuationBrowserMsg = "RM_INDIVIDUATION_BROWSER_MSG", e.channelMRIndividuationBrowserMsg = "MR_INDIVIDUATION_BROWSER_MSG", e.channelRMSetEnvironmentVariable = "RM_SET_ENVIRONMENT_VARIABLE", e.channelMREmbedPlayerPos = "MR_EMBED_PLAYER_POSITION", e.channelRMUpdateLogEnviroment = "RM_UPDATE_LOG_ENVIRONMENT", e.channelMRUpdateLogEnviroment = "MR_UPDATE_LOG_ENVIRONMENT"
    }(t.ThunderChannelList || (t.ThunderChannelList = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(5), a = i(28), r = i(27), s = n.default.getLogger("Thunder.MainRenderer.TabsBrowser");

    class l {
        constructor() {
        }

        registerNativeFunction(e, t) {
            let i = !1;
            do {
                if (o.isNullOrUndefined(e) || "" === e) {
                    s.warning(e);
                    break
                }
                if (o.isNullOrUndefined(t)) {
                    s.warning(t);
                    break
                }
                if (o.isNullOrUndefined(l.nativeFunctionContainer)) {
                    s.warning(t);
                    break
                }
                let n = l.nativeFunctionContainer.filter(t => e === t.functionName);
                if (o.isNullOrUndefined(n)) {
                    let n = {functionName: e, nativeFunc: t};
                    l.nativeFunctionContainer.push(n), i = !0
                }
            } while (0);
            return i
        }

        unregisterNativeFunction(e) {
            let t = !1;
            do {
                if (o.isNullOrUndefined(e) || "" === e) {
                    s.warning(e);
                    break
                }
                if (o.isNullOrUndefined(l.nativeFunctionContainer)) {
                    s.warning(l.nativeFunctionContainer);
                    break
                }
                for (let i in l.nativeFunctionContainer) if (l.nativeFunctionContainer[Number(i)].functionName === e) {
                    l.nativeFunctionContainer.splice(Number(i), 1), t = !0;
                    break
                }
            } while (0);
            return t
        }

        onJsCallNativeFunction(e, t, i, n) {
            let d = !1;
            do {
                if (o.isNullOrUndefined(e) && s.warning(e), o.isNullOrUndefined(t) || "" === t) {
                    s.warning(t);
                    break
                }
                if (o.isNullOrUndefined(l.nativeFunctionContainer)) {
                    s.warning(l.nativeFunctionContainer);
                    break
                }
                let u = l.nativeFunctionContainer.filter(e => t === e.functionName), c = void 0,
                    h = r.NativeFunctionErrorCode.Success;
                if (o.isNullOrUndefined(u) || 0 === u.length || o.isNullOrUndefined(u[0].nativeFunc)) {
                    if (h = r.NativeFunctionErrorCode.FunctionUnExist, o.isNullOrUndefined(i)) {
                        d = !0;
                        break
                    }
                    if (o.isNullOrUndefined(a.NativeCallHostModule.nativeCallHost)) {
                        s.warning(a.NativeCallHostModule.nativeCallHost);
                        break
                    }
                    a.NativeCallHostModule.nativeCallHost.callJsFunctionById.apply(a.NativeCallHostModule.nativeCallHost, [e].concat(i, h, c))
                } else u[0].nativeFunc(this, e, i, n)
            } while (0);
            return d
        }

        onJsCheckNativeFunction(e, t, i) {
            do {
                if (o.isNullOrUndefined(e) && s.warning(e), o.isNullOrUndefined(i)) break;
                if (o.isNullOrUndefined(t) || "" === t) {
                    s.warning(t);
                    break
                }
                if (o.isNullOrUndefined(l.nativeFunctionContainer)) {
                    s.warning(l.nativeFunctionContainer);
                    break
                }
                let n = l.nativeFunctionContainer.filter(e => t === e.functionName),
                    d = r.NativeFunctionErrorCode.Success;
                if ((o.isNullOrUndefined(n) || o.isNullOrUndefined(n[0]) || o.isNullOrUndefined(n[0].nativeFunc)) && (d = r.NativeFunctionErrorCode.FunctionUnExist, s.warning(n)), o.isNullOrUndefined(a.NativeCallHostModule.nativeCallHost)) {
                    s.warning(a.NativeCallHostModule.nativeCallHost);
                    break
                }
                a.NativeCallHostModule.nativeCallHost.callJsFunctionById(e, i, d)
            } while (0);
            return !1
        }

        callNativeFunctionCallback(e, t, ...i) {
            let n = !1;
            do {
                if (o.isNullOrUndefined(t)) {
                    s.warning(t);
                    break
                }
                if (o.isNullOrUndefined(a.NativeCallHostModule.nativeCallHost)) {
                    s.warning(a.NativeCallHostModule.nativeCallHost);
                    break
                }
                a.NativeCallHostModule.nativeCallHost.callJsFunctionById.apply(a.NativeCallHostModule.nativeCallHost, [e].concat(t, i)), n = !0
            } while (0);
            return n
        }
    }

    l.nativeFunctionContainer = [], t.NativeCall = l;
    const d = new l;
    !function (e) {
        function t(e, t, i, n) {
            d.onJsCallNativeFunction(e, t, i, n)
        }

        function i(e, t, i) {
            d.onJsCheckNativeFunction(e, t, i)
        }

        e.init = function () {
            a.NativeCallHostModule.nativeCallHost.initialize();
            let e = {onJsCallNativeFunction: t, onJsCheckNativeFunction: i};
            a.NativeCallHostModule.nativeCallHost.addDelegate(e)
        }, e.registerNativeFunction = function (e) {
            let t = !1;
            do {
                if (o.isNullOrUndefined(e)) {
                    s.warning("event listeners error");
                    break
                }
                if (0 === e.length) {
                    s.warning("event listeners length error");
                    break
                }
                l.nativeFunctionContainer = [...l.nativeFunctionContainer, ...e], t = !0
            } while (0);
            return t
        }, e.unregisterNativeFunction = function (e) {
            for (let t of e) for (let e = 0; e < l.nativeFunctionContainer.length; e++) if (l.nativeFunctionContainer[e].functionName === t) {
                l.nativeFunctionContainer.splice(e, 1);
                break
            }
        }, e.checkNativeFunction = function (e) {
            let t = !1;
            do {
                if (!e) break;
                if (o.isNullOrUndefined(l.nativeFunctionContainer)) break;
                if (0 === l.nativeFunctionContainer.length) break;
                for (let i = 0; i < l.nativeFunctionContainer.length; i++) if (l.nativeFunctionContainer[i].functionName === e) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }
    }(t.NativeCallNS || (t.NativeCallNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(4);
    let a = ["apk", "pic", "video", "mp4", "rmvb", "wmv", "mpg", "mkv", "mov", "rm", "avi", "flv", "doc", "link", "ppt", "word", "magnetic", "music", "pdf", "rar", "xls", "txt", "unknow", "gif", "ipa", "ipsw", "dll", "chm", "text", "install", "iso"];
    const r = ".xv;.xlmv;.3gp;.3gp2;.3gpp;.3gpp2;.3mm;.3p2;.60d;.787;.aaf;.aep;.aepx;.aet;.aetx;.ajp;.ale;.amv;.amx;.arf;\n  .asf;.asx;.avb;.avd;.avi;.avp;.avs;.avs;.axm;.bdm;.bdmv;.bik;.bix;.bmk;.bnp;.box;.bs4;.bsf;.byu;.camproj;.camrec;.clpi;.cmmp;\n  .cmmtpl;.cmproj;.cmrec;.cpi;.cst;.cvc;.d2v;.d3v;.dat;.dav;.dce;.dck;.ddat;.dif;.dir;.divx;.dlx; .dmb;.dmsm;.dmsm3d;.dmss;.dnc;.dpg;\n  .dream;.dsy;.dv;.dv-avi;.dv4;.dvdmedia;.dvr-ms;.dvx;.dxr;.dzm;.dzp;.dzt;.edl;.evo;.eye;.f4p;.f4v;.fbr;.fbr;.fbz;.fcp;.flc;.flh;\n  .fli;.flv;.flx;.gfp;.gl;.grasp;.gts;.gvi;.gvp;.hdmov;.hkm;.ifo;.imovieproj;.imovieproject;.iva;.ivf;.ivr;.ivs;.izz;.izzy;.jts;.jtv;\n  .k3g;.lrec;.lsf;.lsx;.m15;.m1pg;.m1v;.m21;.m21;.m2a;.m2p;.m2t;.m2ts;.m2v;.m4e;.m4u;.m4v;.m75;.meta;.mgv;.mj2;.mjp;.mjpg;.mkv;.mmv;\n  .mnv;.mod;.modd;.moff;.moi;.moov;.mov;.movie;.mp21;.mp2v;.mp4;.mp4v;.mpe;.mpeg;.mpeg4;.mpf;.mpg;.mpg2;.mpgindex;.mpl;.mpls;\n  .mpsub;.mpv;.mpv2;.mqv;.msdvd;.msh;.mswmm;.mts;.mtv;.mvb;.mvc;.mvd;.mve;.mvp;.mvy;.mxf;.mys;.ncor;.nsv;.nuv;.nvc;.ogm;.ogv;.ogx;.osp;\n  .par;.pds;.pgi;.piv;.pjs;.pmf;.pns;.ppj;.prel;.pro;.prproj;.prtl;.psh;.pssd;.pva;.pvr;.pxv;.qt;.qtch;.qtl;.qtm;.qtz;\n  .r3d;.rcproject;.rdb;.rec;.rm;.rmd;.rmp;.rms;.rmvb;.roq;.rp;.rts;.rts;.rum;.rv;.sbk;.sbt;.scc;.scm;.scn;.screenflow;.sec;.seq;.sfd;\n  .sfvidcap;.smk;.sml;.smv;.spl;.ssm;.stl;.str;.stx;.svi;.swf;.swi;.swt;.tda3mt;.tivo;.tix;.tod;.tp;.tp0;.tpd;\n  .tpr;.trp;.ts;.tts;.tvs;.vc1;.vcpf;.vcr;.vcv;.vdo;.vdr;.veg;.vem;.vf;.vfw;.vfz;.vgz;.vid;.viewlet;.viv;.vivo;.vlab;.vob;.vp3;.vp6;.vp7;\n  .vro;.vs4;.vse;.vsp;.w32;.wcp;.webm;.wlmp;.wm;.wmd;.wmmp;.wmv;.wmx;.wp3;.wpl;.wtv;.wvx;.xfl;.xvid;.yuv;.zm1;.zm2;.zm3;.zmv;",
        s = ".exe;.com;.bat;.msi;.apk;.ipa;.iso;.mds;.bin;.img;.ipsw;",
        l = ".txt;.html;.htm;.shtml;.xhtml;.chm;.hlp;.inf;.rtf;.tex;.ltx;.doc;.docx;.wps;.ppt;.pptx;.odf;.pdf;.xls;.xlsx;.docm;.\n  dot;.dotm;.dotx;.email;.rp;.pps;.et;.ett;.xlt;.dbf;.prn;.csv;.mht;.mhtml;.xml;.wpt;.dps;.dpt;.pot;.ppsx;.epub;.mobi;.lit;.wdl;.ceb;.abm;\n  .pdg;.umb;.ibooks;",
        d = ".aiff;.cue;.m3u;.au;.cdda;.raw;.wav;.flac;.tak;.mp3;.aac;.wma;.m4a;.mid;.mka;.mp2;.mpa;.mpc;.ape;.ofr;\n  .ogg;.ra;.wv;.tta;.ac3;.dts;.nsf;.mod;.s3m;.xm;.it;.vst;",
        u = ".psd;.tga;.gif;.jpeg;.jpg;.jp2;.bmp;.ico;.pcx;.png;.pbm;.pgm;.ppm;.pnm;.pgf;.arw;.cr2;.crw;.dcr;.dng;.erf;.kdc;.mef;\n  .mos;.mrw;.nef;.nrw;.orf;.pef;.ptx;.r3d;.raf;.raw;.rw2;.srf;.srw;.x3f;.ras;.tiff;.tif;.wbmp;.ilbm;.lbm;.iff;.ico;",
        c = ".zip;.zipx;.rar;.7z;.isz;.cab;.arj;.ace;.alz;.uue;.tar;.gz; .gzip;.tgz;.tpz;.bzip2;.bz2;.bz;.tbz;.tbz2;.xz;.txz;\n  .lzh;.lha;.zt;.az; .xpi;.jar;.wim;.swm;.rpm;.xar;.deb;.dmg;.hfs;.cpio;.lzma;.lzma86;.split;",
        h = ".torrent;", f = ".idx;.smi;.sub;.psb;.ssa;.ass;.usf;.ssf;.srt;.sup",
        p = ".3gp;.asf;.avi;.divx;.f4v;.flv;.mkv;.mov;.movie;.mp4;.mpeg;.mpeg4;.mpg;.mpg2;.rm;.rmvb;.rp;.swf;.tp;.tp0;.ts;.wmv",
        g = ".exe;.com;.bat;.msi", m = ".wav;.flac;.mp3;.aac;.wma;.m4a;.mid;.ape;.ogg;.ra;.mod",
        v = ".psd;.tga;.gif;.jpeg;.jpg;.jp2;.bmp;.ico;.pcx;.pdf;.png;.pbm;.pgm;.ppm;.pnm;.pgf;.arw;.cr2;.crw;.dcr;.dng;.erf;.kdc;\n  .mef;.mos;.mrw;.nef;.nrw;.orf;.pef;.ptx;.r3d;.raf;.raw;.rw2;.srf;.srw;.x3f;.ras;.tiff;.tif;.wbmp;.ilbm;.lbm;.iff;.ico",
        y = ".txt;.html;.htm;.shtml;.xhtml;.chm;.hlp;.inf;.rtf;.tex;.ltx;.doc;.docx;.wps;.ppt;.pptx;.odf;.pdf;.xls;.xlsx;.docm;.dot;.dotm;.dotx;.email;.rp;.pps",
        T = ".rar;.tar;.zip;.gzip;.cab;.uue;.arj;.bz2;.lzh;.jar;.ace;.iso;.7-zip;.7z",
        w = ".asf;.mpg;.rmvb;.rm;.wmv;.avi;.mp4;.mpeg;.mkv;.mov;.ts;.flv;.3gp;.m2ts;",
        k = ".exe;.com;.bat;.scr;.lnk;.pif;.wsh;", C = ".iso;";
    !function (e) {
        let t;

        function i(e) {
            let i = t.Unkown, o = n.extname(e);
            return null !== o && void 0 !== o && o.length >= 2 && (o = o.toLowerCase()), void 0 === o || "" === o || o.length < 2 ? i = t.Unkown : p.indexOf(o) > -1 ? i = t.Video : g.indexOf(o) > -1 ? i = t.Software : y.indexOf(o) > -1 ? i = t.Doc : m.indexOf(o) > -1 ? i = t.Music : v.indexOf(o) > -1 ? i = t.Pic : T.indexOf(o) > -1 && (i = t.Zip), o.length > 1 && ".z" === o.slice(0, 2) && /[0-9]+/.test(o.substring(2)) && (i = t.Zip), i
        }

        e.getTaskIcon = function (e, t, i) {
            i = i || "xly-type-";
            let p = "";
            do {
                if (t === o.DownloadKernel.TaskType.Bt) {
                    p = "bt-file";
                    break
                }
                if (t === o.DownloadKernel.TaskType.Group) {
                    p = "group";
                    break
                }
                p = "unknown";
                let i = n.extname(e);
                if ("" === i || i.length < 2) break;
                let g = (i = i.toLowerCase()).substring(1);
                if (a.indexOf(g) > -1) {
                    p = "doc" === i ? "word" : g;
                    break
                }
                if (i += ";", r.indexOf(i) > -1) {
                    p = "video";
                    break
                }
                if (s.indexOf(i) > -1) {
                    p = "install", [".mds;", ".bin;", ".img;"].indexOf(i) > -1 && (p = "iso");
                    break
                }
                if (l.indexOf(i) > -1) {
                    if (p = "doc", [".htm;", ".html;", ".mht;"].indexOf(i) > -1) {
                        p = "link";
                        break
                    }
                    if (".docx;" === i) {
                        p = "word";
                        break
                    }
                    if (".xlsx;" === i) {
                        p = "xls";
                        break
                    }
                    if (".pptx;" === i) {
                        p = "ppt";
                        break
                    }
                    break
                }
                if (d.indexOf(i) > -1) {
                    p = "music";
                    break
                }
                if (u.indexOf(i) > -1) {
                    p = "pic";
                    break
                }
                if (c.indexOf(i) > -1) {
                    p = "rar";
                    break
                }
                if (h.indexOf(i) > -1) {
                    p = "bt-link";
                    break
                }
                if (f.indexOf(i) > -1) {
                    p = "text";
                    break
                }
            } while (0);
            return `${i}${p}`
        }, function (e) {
            e[e.Unkown = 0] = "Unkown", e[e.Video = 1] = "Video", e[e.Software = 2] = "Software", e[e.Doc = 3] = "Doc", e[e.Music = 4] = "Music", e[e.Pic = 5] = "Pic", e[e.Zip = 6] = "Zip", e[e.Bt = 7] = "Bt"
        }(t = e.FileExtType || (e.FileExtType = {})), e.getTaskFileType = function (e, i) {
            let o = t.Unkown;
            return void 0 === i && void 0 !== e && (i = n.extname(e)), null !== i && void 0 !== i && i.length >= 2 && (i = i.toLowerCase(), i += ";"), void 0 === i || "" === i || i.length < 3 ? o = t.Unkown : r.indexOf(i) > -1 ? o = t.Video : s.indexOf(i) > -1 ? o = t.Software : l.indexOf(i) > -1 ? o = t.Doc : d.indexOf(i) > -1 ? o = t.Music : u.indexOf(i) > -1 ? o = t.Pic : c.indexOf(i) > -1 ? o = t.Zip : h.indexOf(i) > -1 && (o = t.Bt), i.length > 1 && ".z" === i.slice(0, 2) && /[0-9]+/.test(i.substring(2)) && (o = t.Zip), o
        }, e.isVideoFileExt = function (e) {
            let t = !1;
            do {
                if (null === e || void 0 === e || "" === e) break;
                let i = n.extname(e);
                if (!(null !== i && void 0 !== i && i.length >= 2)) break;
                i = i.toLowerCase(), i += ";", w.indexOf(i) > -1 && (t = !0)
            } while (0);
            return t
        }, e.isSubtitleExt = function (e) {
            let t = !1;
            do {
                if (null === e || void 0 === e || "" === e) break;
                let i = n.extname(e);
                if (!(null !== i && void 0 !== i && i.length >= 2)) break;
                i = i.toLowerCase(), i += ";", f.indexOf(i) > -1 && (t = !0)
            } while (0);
            return t
        }, e.isExecutableExt = function (e) {
            let t = !1;
            do {
                if (null === e || void 0 === e || "" === e) break;
                let i = n.extname(e);
                if (!(null !== i && void 0 !== i && i.length >= 2)) break;
                i = i.toLowerCase(), i += ";", k.indexOf(i) > -1 && (t = !0)
            } while (0);
            return t
        }, e.isIsoExt = function (e) {
            let t = !1;
            do {
                if (null === e || void 0 === e || "" === e) break;
                let i = n.extname(e);
                if (!(null !== i && void 0 !== i && i.length >= 2)) break;
                i = i.toLowerCase(), i += ";", C.indexOf(i) > -1 && (t = !0)
            } while (0);
            return t
        }, e.getGroupFileType = i, e.getDefaultGroupPrefix = function (e) {
            let n = "任务组";
            do {
                if (void 0 === e || null === e || 0 === e.length) break;
                let o = [];
                for (let e = 0; e < 7; e++) o[e] = 0;
                for (let t of e) {
                    let e = i(t);
                    o[e] = o[e] + 1
                }
                let a = t.Unkown;
                for (let e = 1; e < o.length; e++) o[e] > o[a] && (a = e);
                a === t.Video ? n = "视频任务组" : a === t.Software ? n = "程序任务组" : a === t.Music ? n = "音乐任务组" : a === t.Pic ? n = "图片任务组" : a === t.Doc ? n = "文档任务组" : a === t.Zip && (n = "压缩包任务组")
            } while (0);
            return n
        }, e.compareVersion = function (e, t) {
            let i = -2;
            do {
                if (null === e || void 0 === e || "" === e || null === t || void 0 === t || "" === t) break;
                let n = 0, o = 0, a = 0, r = 0, s = 0, l = 0, d = 0, u = 0, c = e.split(/\./);
                if (null === c || void 0 === c || c.length < 3) break;
                if (n = Number(c[0]), o = Number(c[1]), a = Number(c[2]), null !== c[3] && void 0 !== c[3] && "" !== c[3] && (r = Number(c[3])), null === (c = t.split(/\./)) || void 0 === c || c.length < 3) break;
                if (s = Number(c[0]), l = Number(c[1]), d = Number(c[2]), null !== c[3] && void 0 !== c[3] && "" !== c[3] && (u = Number(c[3])), s > n) {
                    i = 1;
                    break
                }
                if (s < n) {
                    i = -1;
                    break
                }
                if (l > o) {
                    i = 1;
                    break
                }
                if (l < o) {
                    i = -1;
                    break
                }
                if (d > a) {
                    i = 1;
                    break
                }
                if (d < a) {
                    i = -1;
                    break
                }
                if (0 !== r) {
                    if (u > r) {
                        i = 1;
                        break
                    }
                    if (u < r) {
                        i = -1;
                        break
                    }
                }
                i = 0
            } while (0);
            return i
        }
    }(t.TaskUtilHelper || (t.TaskUtilHelper = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t;
        !function (e) {
            e[e.OK = 0] = "OK", e[e.Cancel = 1] = "Cancel", e[e.Close = 2] = "Close", e[e.Unknow = 3] = "Unknow"
        }(t = e.Action || (e.Action = {}))
    }(t.MessageBoxNS || (t.MessageBoxNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(2), r = i(0), s = i(7), l = i(35), d = i(4), u = i(11), c = i(67), h = i(40), f = i(14),
        p = i(68), g = i(22), m = i(30), v = i(13), y = i(10), T = i(8), w = i(42), k = i(50), C = i(25), b = i(89),
        I = i(43), S = i(48), _ = i(513), D = i(37), A = i(31), N = i(9), x = i(514), E = i(56), O = i(53), P = i(3),
        M = i(17), F = E.ToastNotifyManagerNS.getToastNotifyManger(), L = r.default.getLogger("ThunderNewTask"),
        R = u.DownloadKernelTaskManager.getTaskManager(), B = s.default(a.join(__rootDir, "../bin/ThunderHelper.node")),
        U = i(38), V = i(12), K = i(15), G = i(49), W = i(58), j = i(385);
    let H = !1, z = !1, X = !1, q = [];
    !function (e) {
        function t(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = R.getTaskFromTaskId(e);
                do {
                    if (!i) break;
                    let n = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.CategoryId),
                        o = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.CategoryViewId);
                    if (L.information("查看重复任务", o), o === d.DownloadKernel.CategroyViewID.Unkown) break;
                    t = void 0 === t || t, m.default.fireEvent(v.NodeEventMesssageNS.eventDownloadSwitchCategory, n, o, e, t)
                } while (0)
            })
        }

        function i(e, i) {
            L.information("重复下载任务：nlen = ", e.length);
            do {
                if (e.length <= 0) break;
                if (e.length <= 1) {
                    let o = !1, a = e[0], r = e[0].getTaskBaseInfo();
                    if (r.taskType === d.DownloadKernel.TaskType.P2sp || r.taskType === d.DownloadKernel.TaskType.Emule) {
                        let t = e[0].getTaskAttribute(d.DownloadKernel.TaskAttribute.GroupTaskId);
                        if (t > 0) {
                            let e = R.getTaskFromTaskId(t);
                            null !== e && void 0 !== e && (a = e, o = !0)
                        }
                    }
                    g.MessageBox.confirm({
                        title: "任务已存在",
                        content: "当前任务已存在，重新下载将删除已下载的内容",
                        type: g.MessageBox.ConfirmType.Info,
                        okText: "查看",
                        cancelText: "重新下载",
                        cancelVisible: !o
                    }).then(e => n(this, void 0, void 0, function* () {
                        if (e.action === U.MessageBoxNS.Action.OK) {
                            yield t(a.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId))
                        } else if (e.action === U.MessageBoxNS.Action.Cancel) if (void 0 === i || null === i || 0 === i.length) h.TaskCtrlOperatorNS.redownloadTask([a.getTaskBaseInfo()], !1).catch(); else {
                            yield R.deleteTask(a.getTaskBaseInfo().taskId, !0), i[0].newTaskInfo.taskBaseInfo.productInfo = h.TaskCtrlOperatorNS.constructProductInfo(""), i[0].newTaskInfo.taskBaseInfo.origin = "re_download";
                            let e = yield R.createTask(i[0].taskType, i[0].newTaskInfo);
                            if (null !== e) {
                                let t = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                                yield S.DownloadDispatchNS.startTask(t)
                            }
                        }
                    })).catch()
                } else {
                    let t = e.map(e => e.getTaskBaseInfo().url), i = JSON.stringify(t);
                    g.MessageBox.custom("multi-repeat-task", {file: i}, {width: 450, height: 315}).catch()
                }
            } while (0)
        }

        function r(e, t) {
            for (let i of e) {
                let e = t.indexOf(i.index);
                -1 !== e && t.splice(e, 1)
            }
            return t
        }

        function s(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (void 0 === e) break;
                    if (null === e) break;
                    for (let t of e) yield T.FileSystemAWNS.unlinkAW(t.fullPath)
                } while (0)
            })
        }

        function Y(e, i, o, l, c, f, p, m, v, y, T, w) {
            return n(this, void 0, void 0, function* () {
                let k = f;
                const C = u.DownloadKernelTaskManager.getTaskManager();
                do {
                    if (void 0 === m) break;
                    if ("ignore" === m) {
                        if (void 0 === (k = r(v, f)) || null === k) break;
                        if (0 === k.length) {
                            if (void 0 !== y) yield t(y); else {
                                let t = a.join(e, o.title);
                                g.MessageBox.confirm({
                                    title: "全部文件已存在，位于以下路径：",
                                    type: g.MessageBox.ConfirmType.Info,
                                    content: t,
                                    okText: "知道了",
                                    cancelText: "打开文件夹"
                                }).then(e => n(this, void 0, void 0, function* () {
                                    if (e.action === U.MessageBoxNS.Action.Cancel) {
                                        (yield V.asyncRemoteCall.getShell()).showItemInFolder(t)
                                    }
                                })).catch()
                            }
                            break
                        }
                        void 0 !== y && (yield C.deleteTask(y, !1))
                    } else if ("delete" === m) yield s(v), void 0 !== y && (yield C.deleteTask(y, !0)); else if ("continue" === m && void 0 !== y) {
                        yield S.DownloadDispatchNS.startTask(y);
                        break
                    }
                    let u = o.trackerUrls.join("\n"), b = h.TaskCtrlOperatorNS.constructProductInfo(p.browser), I = {
                        taskBaseInfo: {savePath: e, taskName: o.title, productInfo: b, origin: p.source},
                        btTaskInfo: {
                            originUrl: w,
                            seedFile: l,
                            displayName: c,
                            fileLists: o.fileLists,
                            infoId: o.infoId,
                            fileRealIndexLists: k,
                            tracker: u
                        },
                        privateSpace: T
                    };
                    L.information("create task bt productinfo", p);
                    let _ = yield C.createTask(d.DownloadKernel.TaskType.Bt, I);
                    if (null !== _) {
                        if (1 === i) {
                            let e = _.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                            yield S.DownloadDispatchNS.startTask(e)
                        }
                    } else L.warning("create bt task null")
                } while (0)
            })
        }

        function J(e, t) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (0 === e.length) break;
                    o.ipcRenderer.send("create-new-task-window", JSON.stringify(e))
                } while (0)
            })
        }

        function Z(e, t, i, n, a) {
            o.ipcRenderer.send("create-pre-new-task-window", e ? JSON.stringify(e) : e, t, i, n, a ? JSON.stringify(a) : a)
        }

        function Q(e, t) {
            o.ipcRenderer.send("create-bt-task-window", e ? JSON.stringify(e) : e, t ? JSON.stringify(t) : t)
        }

        function $(e) {
            if (void 0 !== e && null !== e && "" !== e) {
                y.ConfigNS.getValue("PathAndCategory", "LastUsedPath", "") !== e && (y.ConfigNS.setValue("PathAndCategory", "LastUsedPath", e), y.ConfigNS.save().catch())
            }
        }

        function ee(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                if (A.ThunderHelper.getDriveType(e) === A.ThunderHelper.DriverType.DRIVE_FIXED) {
                    (yield A.ThunderHelper.getFixedDriveMediaType(e)) === A.ThunderHelper.MediaType.HDD && (t = !0)
                }
                return t
            })
        }

        function te(e, t) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (z) break;
                    if (e > 1048576e3) {
                        if (!(yield P.client.callServerFunction("IsFileSizeSetterWorking")) && (yield ee(t))) {
                            z = !0, 0 === (yield P.client.callServerFunction("LaunchFileAssistant")) && N.XLStatNS.trackEvent("core_event", "apply_for_disk_space_fast_succ")
                        }
                    }
                } while (0)
            })
        }

        function ie(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (e.length > 1) break;
                    let t = e[0], n = 0;
                    e.forEach(e => {
                        e.fileSize && (n += e.fileSize)
                    });
                    let o = yield P.client.callServerFunction("GetDownloadDir");
                    yield te(n, o);
                    let a = A.ThunderHelper.getTaskTypeFromUrl(t.url), r = p.ParseUrlFileNameNS.getNameFromUrl(t.url),
                        s = yield P.client.callServerFunction("GetConfigValue", "TaskDefaultSettings", "NewTaskStartMode", 1),
                        l = [], u = void 0;
                    if (a === d.DownloadKernel.TaskType.P2sp) u = {
                        taskType: d.DownloadKernel.TaskType.P2sp,
                        newTaskInfo: {
                            taskType: d.DownloadKernel.TaskType.P2sp,
                            taskBaseInfo: {taskName: r, savePath: o},
                            p2spTaskInfo: {
                                url: t.url,
                                refUrl: t.referer,
                                cookie: t.cookie,
                                nameFixed: t.nameFixedFlag & x.ThunderNewtaskHelperNS.taskOptFileNameFixed ? 1 : 0
                            },
                            searchSource: t.searchFrom
                        }
                    }, l = yield c.TaskUtilitiesAWNS.batchFindTaskAW([{
                        taskType: d.DownloadKernel.TaskType.P2sp,
                        value: t.url
                    }]); else if (a === d.DownloadKernel.TaskType.Emule) {
                        u = {
                            taskType: d.DownloadKernel.TaskType.Emule,
                            newTaskInfo: {
                                taskType: d.DownloadKernel.TaskType.Emule,
                                taskBaseInfo: {taskName: r, savePath: o},
                                emuleTaskInfo: {url: t.url},
                                searchSource: t.searchFrom
                            }
                        };
                        let e = p.ParseUrlFileNameNS.parseEd2kUrl(t.url);
                        l = yield c.TaskUtilitiesAWNS.batchFindTaskAW([{
                            taskType: d.DownloadKernel.TaskType.Emule,
                            value: e.fileHash
                        }])
                    }
                    if (l && l.length > 0) {
                        (yield V.asyncRemoteCall.getCurrentWindow()).show(), i(l, [u]);
                        break
                    }
                    if (void 0 === u) break;
                    let h = yield R.createTask(u.taskType, u.newTaskInfo);
                    if (null !== h && 1 === s) {
                        let e = h.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                        yield S.DownloadDispatchNS.startTask(e)
                    }
                } while (0)
            })
        }

        function ne(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (e.length > 1) {
                        J(e).catch();
                        break
                    }
                    let t = e[0];
                    if (void 0 === t.browser || t.browser, t.browser, 0 === (yield P.client.callServerFunction("GetConfigValue", "TaskDefaultSettings", "OpenSilenceDownload", 0))) {
                        J(e).catch();
                        break
                    }
                    ie(e).catch()
                } while (0)
            })
        }

        function oe(e, t) {
            let i = "";
            do {
                if (null === e || void 0 === e || "" === e || null === t || void 0 === t || "" === t) break;
                let n = e;
                if (w.Common.isThunderPrivateUrl(e) && (n = w.Common.parseThunderPrivateUrl(e)), null === n || void 0 === n || "" === n) break;
                let o = n.indexOf(t);
                if (o < 0) break;
                let r = n.substring(o + t.length);
                if (null === r || void 0 === r || "" === r) break;
                i = re(a.dirname(r))
            } while (0);
            return i
        }

        function ae(e) {
            return n(this, void 0, void 0, function* () {
                let t = "";
                do {
                    if (!e) break;
                    let i = yield P.client.callServerFunction("GetCurrentSelectTabValue", "url");
                    if (e !== i) break;
                    let n = yield P.client.callServerFunction("GetCurrentSelectTabValue", "extData");
                    if (!n) break;
                    let o = null;
                    try {
                        o = JSON.parse(n)
                    } catch (e) {
                    }
                    o && o.search_from && (t = o.search_from)
                } while (0);
                return t
            })
        }

        function re(e) {
            let t = "";
            do {
                if (null === e || void 0 === e || "" === e) break;
                let i = e.split(/\//);
                if (i.length <= 0) break;
                for (let e = 0; e < i.length; ++e) {
                    let n = i[e];
                    if (null !== n && "" !== n) {
                        let e = n.replace(/[*?/:|<>"]/g, "");
                        null !== e && "" !== e && (e = e.trim(), t = "" === t ? e : a.join(t, e))
                    }
                }
            } while (0);
            return t
        }

        function se(e, t, i) {
            let n = "";
            do {
                if (null === e || void 0 === e || "" === e) break;
                let o = e;
                if (w.Common.isThunderPrivateUrl(e) && (o = w.Common.parseThunderPrivateUrl(e)), null === o || void 0 === o || "" === o) break;
                if (null !== i && void 0 !== i && "" !== i) {
                    i === a.basename(t) && (n = o);
                    break
                }
                a.basename(o) === a.basename(t) && (n = o)
            } while (0);
            return n
        }

        function le(e) {
            let t = !1;
            do {
                if (null === e || void 0 === e || "" === e) break;
                let i = k.parse(e).hostname;
                if (null === i || void 0 === i || "" === i) break;
                let n = C.default.getConfigInfo("thunderLink", "whiteList");
                if (null === n || void 0 === n || "" === n || n.length <= 0) break;
                for (let e = 0; e < n.length; ++e) if (i.toLowerCase() === n[e].toLowerCase()) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }

        function de(e) {
            return n(this, void 0, void 0, function* () {
                let t = "您正在使用旧版本迅雷，不支持下载";
                return null !== e && void 0 !== e && "" !== e ? t = t + '"' + e + '"' : t += '"此类文件"', t += "<br>建议您升级到最新版迅雷后，再次进行下载！", new Promise(e => {
                    g.MessageBox.confirm({
                        title: "请使用最新版迅雷",
                        type: g.MessageBox.ConfirmType.Info,
                        content: t,
                        okText: "升级迅雷",
                        cancelVisible: !0
                    }).then(t => {
                        t.action === U.MessageBoxNS.Action.OK ? e(!0) : e(!0)
                    }).catch()
                })
            })
        }

        function ue(e, t = "ThunderUnion", i = !0) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (L.information("createThunderxTask strDataInfo:", e), void 0 === e || null === e || "" === e) break;
                    let n = null, o = null;
                    try {
                        o = JSON.parse(e)
                    } catch (e) {
                    }
                    if (L.information("createThunderxTask strDataInfo:", o), null === o || void 0 === o || o.length <= 0) break;
                    let r = o.json, s = !1;
                    if (null !== r && void 0 !== r && "" !== r) {
                        s = !0, n = yield x.ThunderNewtaskHelperNS.readThunderUnionConfig(r);
                        let e = "url=" + encodeURIComponent(r);
                        if (L.information("createThunderxTask:需要读取配置信息 jsonUrlStr = ", r), null === n || void 0 === n) {
                            e += ",result=fail,errorcode=pick_up_fail", N.XLStatNS.trackEvent("core_operate", "js_grouptask_pick_up_info", "", 0, 0, 0, 0, e);
                            break
                        }
                        if ("" === n || null === n.tasks || void 0 === n.tasks) {
                            e += ",result=fail,errorcode=analysis_fail", N.XLStatNS.trackEvent("core_operate", "js_grouptask_pick_up_info", "", 0, 0, 0, 0, e);
                            break
                        }
                        e += ",result=success", N.XLStatNS.trackEvent("core_operate", "js_grouptask_pick_up_info", "", 0, 0, 0, 0, e)
                    } else n = o;
                    let l = n.tasks;
                    if (null === l || void 0 === l || l.length <= 0) break;
                    let d = n.taskGroupName;
                    L.information("createThunderxTask:jsonData = ", n);
                    let u = n.minVersion;
                    if (null !== u && void 0 !== u && "" !== u || s && (u = "10.1.2.0"), null !== u && void 0 !== u && "" !== u) {
                        let e = a.join(__rootDir, "../../Thunder.exe"), t = B.getFileVersion(e);
                        if (-1 === D.TaskUtilHelper.compareVersion(u, t)) {
                            if (!H) {
                                N.XLStatNS.trackEvent("core_operate", "newthunder_lowversion_popup", "", 0, 0, 0, 0, ""), H = !0;
                                let e = yield de(d);
                                H = !1, e && (N.XLStatNS.trackEvent("core_operate", "newthunder_lowversion_download", "", 0, 0, 0, 0, ""), B.startManualUpdateWithUI())
                            }
                            return
                        }
                    }
                    let c = n.downloadDir, h = n.installFile, p = n.excludePath, g = n.runParams, m = n.userAgent,
                        v = n.createShortcut, y = null;
                    null !== n.threadCount && void 0 !== n.threadCount && "" !== n.threadCount && (y = Number(n.threadCount));
                    let T = [], k = "", C = "";
                    for (let e = 0; e < l.length; ++e) {
                        let i = l[e], n = i.url, o = i.name, a = i.referer || "", r = 0;
                        if (null !== h && void 0 !== h && "" !== h && "" === k) {
                            let e = se(n, h, o);
                            "" !== e && (k = e)
                        }
                        if (v && v.targetFile && "" === C) {
                            let e = se(n, v.targetFile, o);
                            "" !== e && (C = e)
                        }
                        null !== i.size && void 0 !== i.size && (r = i.size);
                        let s = "";
                        null !== i.dir && void 0 !== i.dir && "" !== i.dir ? s = re(i.dir) : null !== p && void 0 !== p && "" !== p && (s = oe(n, p));
                        let d = n;
                        if (w.Common.isThunderPrivateUrl(n) && (d = w.Common.parseThunderPrivateUrl(n)), void 0 !== d && null !== d && "" !== d) {
                            let e = {
                                url: n,
                                referer: a,
                                fileName: o,
                                fileSize: r,
                                subDir: s,
                                statClick: t,
                                nameFixedFlag: x.ThunderNewtaskHelperNS.taskOptFileNameFixed
                            };
                            T.push(e)
                        }
                    }
                    if (T.length >= 1) {
                        let e = {};
                        if (null !== c && void 0 !== c && "" !== c) {
                            let t = f.ThunderUtil.getMaxFreeDriver();
                            null !== t && "" !== t && (t += ":"), c = a.join(t, c), e.isNotSavePath = !0, e.notSavePath = c
                        }
                        if (null !== y && void 0 !== y && (y <= 0 ? y = 1 : y >= 10 && (y = 10), e.threadCount = y), null !== m && void 0 !== m && "" !== m && (e.userAgent = m), null !== p && void 0 !== p && "" !== p && (e.excludePath = p), null !== d && void 0 !== d && "" !== d) {
                            if (null !== h && void 0 !== h && "" !== h && null !== k && void 0 !== k && "" !== k && le(k)) {
                                let t = h.replace(/[*?:|<>"]/g, "_");
                                e.installFile = t, e.runParams = g
                            }
                            v && v.name && v.targetFile && le(C) && (e.createShortcut = v)
                        }
                        Z(T, t, c, d, e), i && B.emptyClipBoard()
                    }
                } while (0)
            })
        }

        function ce(e, t) {
            return n(this, void 0, void 0, function* () {
                if ((yield P.client.callServerFunction("GetCurrentNav")) === G.NavViewID.Download) {
                    if (!t) return yield P.client.callServerFunction("SelectNav", G.NavViewID.Cloud), void (yield K.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcShowTransferWindow"));
                    N.XLStatNS.trackEvent("download_leftpanel", "sync_to_yunpan_tips_show"), F.showNotifyEx(E.ToastNotifyManagerNS.notifyIdTaskAdd2Cloud, O.ToastNotifyItemType.GreenNotify, `${e}个下载任务已同步到云盘`, 3e3, {
                        viewVisible: !0,
                        onView: () => n(this, void 0, void 0, function* () {
                            N.XLStatNS.trackEvent("download_leftpanel", "sync_to_yunpan_tips_click", "", 0, 0, 0, 0, "clickid=look"), yield P.client.callServerFunction("SelectNav", G.NavViewID.Cloud), yield K.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcShowTransferWindow")
                        }),
                        onClose: () => {
                            N.XLStatNS.trackEvent("download_leftpanel", "sync_to_yunpan_tips_click", "", 0, 0, 0, 0, "clickid=close")
                        }
                    })
                }
            })
        }

        function he(e) {
            return n(this, void 0, void 0, function* () {
                let t = void 0;
                do {
                    if (yield P.client.callServerFunction("IsLogined")) {
                        t = e;
                        break
                    }
                    let i = "";
                    if (!(yield W.default(!1, !0, i))) break;
                    yield f.ThunderUtil.setTimeoutAw(50);
                    let n = yield K.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcDefaultSavePath");
                    if (!n || !n[0]) {
                        L.information("cloud IpcDefaultSavePath error", n[2]);
                        break
                    }
                    "我的资源" === n[0].name && (n[0].name = "我的云盘\\我的资源"), t = n[0]
                } while (0);
                return t
            })
        }

        function fe(e, t, i, o, a, r) {
            return n(this, void 0, void 0, function* () {
                if (t = yield he(t)) {
                    let n = 0, s = [], l = e.map(e => ({
                        from: r,
                        searchFrom: e.data.searchFrom,
                        url: e.data.url,
                        name: e.data.fileName,
                        path: t.name,
                        parentId: t.id,
                        files: []
                    })), d = [];
                    if ((d = i ? yield K.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcAddUrlTaskGroup", {
                        groupName: i,
                        urlTasks: l
                    }) : yield K.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcBatchAddUrlsToDrive", l)) && d[0]) {
                        let e = d[0];
                        for (let i = 0; i < e.length; i++) {
                            let r = e[i];
                            if (r && r.task) {
                                if (n++, !o && !a) continue;
                                let e = r.task, d = o || a[l[i].url];
                                d && s.push({panId: e.id, user_id: e.user_id, path_id: t.id, path: t.name, taskId: d})
                            }
                        }
                    } else L.information("cloud IpcBatchAddUrlsToDrive err", d[2]);
                    s.length > 0 && R.batchRelateYunTask(s), n > 0 && (yield ce(n, !(!o && !a)))
                }
            })
        }

        function pe(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                if (yield he(t)) {
                    let n = yield K.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcBatchAddUrlsToDrive", [{
                        from: o,
                        searchFrom: e.searchFrom,
                        url: e.url,
                        name: e.name,
                        path: t.name,
                        parentId: t.id,
                        files: e.files
                    }]);
                    if (n && n[0]) {
                        let e = n[0][0];
                        if (e) {
                            let n = e.task;
                            n && i && R.batchRelateYunTask([{
                                panId: n.id,
                                user_id: n.user_id,
                                path_id: t.id,
                                path: t.name,
                                taskId: i
                            }]), n && (yield ce(1, !!i))
                        }
                    }
                }
            })
        }

        function ge() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (X) break;
                    return new Promise(e => n(this, void 0, void 0, function* () {
                        q.push(() => {
                            e()
                        })
                    }))
                } while (0)
            })
        }

        function me() {
            return n(this, void 0, void 0, function* () {
                do {
                    const e = "ThunderXLogin";
                    if (j.PluginLoaderNS.pluginLoader.isPluginLoaded(e)) break;
                    return new Promise(e => n(this, void 0, void 0, function* () {
                        let t = void 0;
                        M.NativeCallModule.nativeCall.AttachNativeEvent("onLoginPluginInited", (...i) => {
                            void 0 !== t && (M.NativeCallModule.nativeCall.DetachNativeEvent("onLoginPluginInited", t), t = void 0), e()
                        })
                    }))
                } while (0)
            })
        }

        e.selectTask = t, e.repeatTasksMsg = i, e.createNewTaskWindow = J, e.createPreNewTaskWindow = Z, e.createBtTaskWindow = Q, e.uninit = function () {
        }, e.saveLastestDownloadPath = $, e.createP2spEmuleTasksDirectly = ie, e.createTaskByUrl = function (e, t) {
            do {
                if (void 0 === e || null === e || "" === e) break;
                let i = "";
                i = (t = t || {}).fileName ? t.fileName : p.ParseUrlFileNameNS.getNameFromUrl(e);
                let n = A.ThunderHelper.getTaskTypeFromUrl(e);
                n === d.DownloadKernel.TaskType.Emule || n === d.DownloadKernel.TaskType.P2sp ? ne([Object.assign({}, t, {
                    url: e,
                    fileName: i,
                    nameFixedFlag: t.fileName ? x.ThunderNewtaskHelperNS.taskOptFileNameFixed : 0
                })]).catch() : n === d.DownloadKernel.TaskType.Bt && Q({
                    url: e,
                    type: "url"
                }, {browser: t.browser || "xlbrowser.exe", searchFrom: t.searchFrom})
            } while (0)
        }, e.createUnionTask = function (e) {
            return n(this, void 0, void 0, function* () {
                do {
                    let t = decodeURIComponent(e);
                    L.information("createUnionTask:urlPath = ", t, e);
                    let i = yield T.FileSystemAWNS.readFileAW(t);
                    if (yield T.FileSystemAWNS.unlinkAW(t), null === i || void 0 === i || "" === i.toString()) {
                        L.information("createUnionTask:读取内容 buf为null");
                        break
                    }
                    let n = i.toString(), o = (n += "\r\n").split("\r\n");
                    if (o.length <= 1) {
                        L.information("createUnionTask:lines.length <= 1");
                        break
                    }
                    let r = !1, s = "", l = [], u = [], c = "", h = "", p = "", g = "", m = "", v = "",
                        k = y.ConfigNS.getValue("TaskDefaultSettings", "OrignHostThreads", "5"), C = new Map,
                        b = new Map, I = new Map, S = new Map, _ = new Map, D = null;
                    for (let e = 0; e < o.length; ++e) {
                        let t = o[e].split("=");
                        if (null !== t && 2 === t.length) {
                            let e = t[0].toLowerCase(), i = t[1];
                            if (null !== e && "" !== e) {
                                if (i = i.replace(/\+/g, "%20"), i = decodeURIComponent(i), "json" === e) {
                                    r = !0, s = i;
                                    break
                                }
                                if ("taskgroupname" === e) c = i; else if ("downloaddir" === e) h = i; else if ("installfile" === e) p = i; else if ("excludepath" === e) g = i; else if ("runparams" === e) m = i; else if (0 === e.indexOf("createshortcut")) {
                                    let t = e.match(/createshortcut\[(.+)\]/);
                                    if (t && t[1].length > 0) switch (D || (D = {}), t[1]) {
                                        case"name":
                                            D.name = i;
                                            break;
                                        case"targetfile":
                                            D.targetFile = i;
                                            break;
                                        case"runparams":
                                            D.runParams = i
                                    }
                                } else if ("useragent" === e) v = i; else if ("threadcount" === e) k = i; else {
                                    L.information("createUnionTask:", e, i);
                                    let t = e.match(/^tasks\[\d+\]/), n = "";
                                    null !== t && void 0 !== t && (n = t[0]);
                                    let o = /url/;
                                    o.test(e) ? "" !== n ? C.set(n, i) : l.push(i) : (o = /referer/).test(e) ? "" !== n ? b.set(n, i) : u.push(i) : (o = /^tasks\[\d+\]\[name\]/).test(e) ? "" !== n && I.set(n, i) : (o = /^tasks\[\d+\]\[size\]/).test(e) ? "" !== n && S.set(n, i) : (o = /^tasks\[\d+\]\[dir\]/).test(e) && "" !== n && _.set(n, i)
                                }
                            }
                        }
                    }
                    if (r) {
                        L.information("createUnionTask 通过读取配置信息得到数据 jsonUrlStr:", s);
                        let e = {minVersion: "", json: s};
                        yield ue(JSON.stringify(e))
                    } else {
                        let e = [], t = [], i = "", n = "";
                        if (null !== C && C.size > 0 && C.forEach((o, a) => {
                            let r = o, s = A.ThunderHelper.getTaskTypeFromUrl(r), l = "", u = 0, c = b.get(a) || "";
                            if (null !== I && I.size > 0 && (l = I.get(a)), null !== p && void 0 !== p && "" !== p && "" === i) {
                                let e = se(r, p, l);
                                "" !== e && (i = e)
                            }
                            if (D && "" !== D.targetFile && "" === n) {
                                let e = se(r, D.targetFile, l);
                                "" !== e && (n = e)
                            }
                            if (null !== S && S.size > 0) {
                                let e = S.get(a);
                                null !== e && "" !== e && (u = Number(e))
                            }
                            let h = "", f = _.get(a);
                            null !== f && void 0 !== f && "" !== f ? h = re(f) : null !== g && void 0 !== g && "" !== g && (h = oe(r, g));
                            let m = r;
                            if (w.Common.isThunderPrivateUrl(r) && (m = w.Common.parseThunderPrivateUrl(r)), void 0 !== m && null !== m && "" !== m) {
                                let i = {
                                    url: r,
                                    referer: c,
                                    fileName: l,
                                    fileSize: u,
                                    subDir: h,
                                    statClick: "ThunderUnion",
                                    nameFixedFlag: x.ThunderNewtaskHelperNS.taskOptFileNameFixed
                                };
                                s === d.DownloadKernel.TaskType.P2sp || s === d.DownloadKernel.TaskType.Emule ? e.push(i) : s !== d.DownloadKernel.TaskType.Magnet && s !== d.DownloadKernel.TaskType.Bt || t.push(i)
                            }
                        }), e.length >= 1) {
                            let t = {};
                            if (null !== h && "" !== h) {
                                let e = f.ThunderUtil.getMaxFreeDriver();
                                null !== e && "" !== e && (e += ":"), h = a.join(e, h), t.isNotSavePath = !0, t.notSavePath = h
                            }
                            if (k) {
                                let e = Number(k);
                                e <= 0 ? e = 1 : e >= 10 && (e = 10), t.threadCount = e
                            }
                            if (null !== v && void 0 !== v && "" !== v && (t.userAgent = v), null !== g && void 0 !== g && "" !== g && (t.excludePath = g), null !== c && void 0 !== c && "" !== c) {
                                if (null !== p && void 0 !== p && "" !== p && null !== i && void 0 !== i && "" !== i && le(i)) {
                                    let e = p.replace(/[*?:|<>"]/g, "_");
                                    t.installFile = e, t.runParams = m
                                }
                                D && D.name && D.targetFile && le(n) && (t.createShortcut = D)
                            }
                            L.information("createUnionTask：新协议拉起新建面板", t);
                            let o = yield ae(e[0].referer);
                            o && e.forEach(e => {
                                e.searchFrom = o
                            }), Z(e, "ThunderUnion", h, c, t)
                        }
                        if (t.length > 0) {
                            let e = yield ae(t[0].referer);
                            for (let i of t) Q({url: i.url, type: "url"}, {
                                source: i.statClick,
                                referer: i.referer,
                                searchFrom: e
                            })
                        }
                        if (l.length >= 1) {
                            L.information("createUnionTask：旧协议拉起新建面板");
                            let e = yield ae(u[0]), t = [];
                            for (let i = 0; i < l.length; ++i) t.push({
                                url: l[i],
                                referer: u[i] || "",
                                searchFrom: e,
                                thread: Number(k)
                            });
                            Z(t, "ThunderUnion")
                        }
                    }
                } while (0)
            })
        }, e.upload2ThunderPan = function (e, t) {
            return n(this, void 0, void 0, function* () {
                do {
                    yield P.client.callServerFunction("SelectNav", G.NavViewID.Cloud), yield me();
                    let i = yield W.default(!1, !0, t);
                    if (L.information("## upload2ThunderPan shouldLogin", i), !i) break;
                    yield ge(), yield P.client.callRemoteClientFunction("ThunderPanPluginWebview", "IpcUploadLocalFiles", e)
                } while (0)
            })
        }, e.sendMessageBox = de, e.createThunderxTask = ue, e.addUrls2Cloud = fe, e.addBt2Cloud = pe, e.thunderPanPluginReadyAw = ge, e.thunderXLoginReadyAw = me, e.init = function () {
            return n(this, void 0, void 0, function* () {
                L.information("xxxxx init=====");
                let e = yield V.asyncRemoteCall.getIpcMain();
                e.on(l.ThunderChannelList.channelRMNewTaskCreateNewTask, (e, t, o, r, s, u, f, p, g, m, v) => n(this, void 0, void 0, function* () {
                    let n = null;
                    try {
                        n = JSON.parse(r)
                    } catch (e) {
                        L.warning(e)
                    }
                    if (null === n) return;
                    let T = [...Object.values(n)];
                    if (L.information("xxx", T, s), s) {
                        let i = yield P.client.callServerFunction("GetUserID");
                        if (b.PrivateSpaceHelperNS.isPrivateSpaceOpen(i)) {
                            let t = yield b.PrivateSpaceHelperNS.openPrivateCategory(i);
                            if (t < 0 && e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateNewTaskResult, !1, "开启私人空间后才能创建任务至私人空间"), 0 !== t) return;
                            let n = yield b.PrivateSpaceHelperNS.accessPrivateCategory(i);
                            if (n < 0 && e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateNewTaskResult, !1, "开启私人空间后才能创建任务至私人空间"), 0 !== n) return
                        } else {
                            s = !1;
                            let e = y.ConfigNS.getValue("PathAndCategory", "LastUsedPath", "");
                            null !== e && void 0 !== e && "" !== e || (e = y.ConfigNS.getValue("TaskDefaultSettings", "DefaultPath", "")), t = e, F.showNotify(E.ToastNotifyManagerNS.notifyIdScheduleTaskDownloadMode, O.ToastNotifyItemType.GreenNotify, "您未开通私人空间，请开通后再移动任务？", 3e3)
                        }
                    }
                    e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateNewTaskResult, !0), t || (yield P.client.callServerFunction("IsConfigInitFinish"), t = yield P.client.callServerFunction("GetDownloadDir"));
                    let w = 0;
                    void 0 !== typeof T && null !== T && T.length > 0 && T.forEach(e => {
                        e.data.fileSize && (w += e.data.fileSize), 0 === e.data.url.indexOf("ftp://") && e.setting.loginFtp && e.setting && e.setting.ftpInfo && e.setting.ftpInfo.userName && e.setting.ftpInfo.password && (e.data.url = B.makeUrl(e.data.url, e.setting.ftpInfo.userName, e.setting.ftpInfo.password))
                    }), yield te(w, t), null !== p && void 0 !== p && null !== p.isNotSavePath && void 0 !== p.isNotSavePath && !0 === p.isNotSavePath || s || $(t), L.information(p), L.verbose(e);
                    let k = [], C = void 0, _ = {};
                    if (void 0 !== typeof T && null !== T && T.length > 0) {
                        let e = [], n = t;
                        null !== f && void 0 !== f && "" !== f && (n = a.join(t, f));
                        let r = T.map(e => {
                            let t = "";
                            return e.taskType === d.DownloadKernel.TaskType.P2sp ? t = e.data.url : e.taskType === d.DownloadKernel.TaskType.Emule && (t = e.data.fileHash), {
                                taskType: e.taskType,
                                value: t
                            }
                        }), l = yield c.TaskUtilitiesAWNS.batchFindTaskAW(r);
                        for (let t = 0; t < T.length; t++) {
                            let i = T[t], o = n;
                            void 0 !== i.data.subDir && null !== i.data.subDir && "" !== i.data.subDir && (o = a.join(n, i.data.subDir));
                            let r = h.TaskCtrlOperatorNS.constructProductInfo(i.data.browser),
                                u = {taskName: i.data.fileName, savePath: o, productInfo: r, origin: i.data.statClick};
                            i.data.fileSize && i.data.fileSize > 0 && (u.fileSize = i.data.fileSize), i.data.gcid && "" !== i.data.gcid && (u.gcid = i.data.gcid);
                            let c = {taskBaseInfo: u, privateSpace: s};
                            if (c.birdKey = i.data.birdkeyChars ? i.data.birdkeyChars : void 0, c.searchSource = i.data.searchFrom, void 0 !== i.setting && null !== i.setting) {
                                let e = i.setting;
                                void 0 !== e.note && null !== e.note && "" !== e.note && (u.description = e.note), e.openAfterDownload && (u.openOnComplete = 1)
                            }
                            if (i.taskType === d.DownloadKernel.TaskType.P2sp) {
                                if (c.taskType = d.DownloadKernel.TaskType.P2sp, c.p2spTaskInfo = {
                                    url: i.data.url,
                                    refUrl: i.data.referer,
                                    cookie: i.data.cookie,
                                    downloadSubTask: 1,
                                    nameFixed: i.data.nameFixedFlag & x.ThunderNewtaskHelperNS.taskOptFileNameFixed ? 1 : 0
                                }, void 0 !== i.setting && null !== i.setting) {
                                    let e = i.setting;
                                    e.onlyOrigin && (c.p2spTaskInfo.useOriginResourceOnly = 1), void 0 !== e.thread && "number" == typeof e.thread && (c.p2spTaskInfo.originResourceThreadCount = e.thread)
                                }
                                let t = !1;
                                if (l && l.length > 0) for (let e of l) if (e.getType() === d.DownloadKernel.TaskType.P2sp && e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl).toLowerCase() === i.data.url.toLowerCase()) {
                                    t = !0;
                                    break
                                }
                                if (t) {
                                    e.push({taskType: d.DownloadKernel.TaskType.P2sp, newTaskInfo: c});
                                    continue
                                }
                                k.push(c)
                            } else if (i.taskType === d.DownloadKernel.TaskType.Emule) {
                                c.taskType = d.DownloadKernel.TaskType.Emule, c.emuleTaskInfo = {
                                    url: i.data.url,
                                    downloadSubTask: 1
                                };
                                let t = !1;
                                if (l && l.length > 0) for (let e of l) if (e.getType() === d.DownloadKernel.TaskType.Emule && e.getExtraObject().getFileHash().toLowerCase() === i.data.fileHash.toLowerCase()) {
                                    t = !0;
                                    break
                                }
                                if (t) {
                                    e.push({taskType: d.DownloadKernel.TaskType.Emule, newTaskInfo: c});
                                    continue
                                }
                                k.push(c)
                            }
                        }
                        if (null !== f && void 0 !== f && "" !== f && k.length > 0) {
                            let e = {taskName: f, savePath: n, origin: k[0].taskBaseInfo.origin}, i = {subTaskList: k},
                                a = yield R.createTask(d.DownloadKernel.TaskType.Group, {
                                    taskType: d.DownloadKernel.TaskType.Group,
                                    taskBaseInfo: e,
                                    groupTaskInfo: i,
                                    privateSpace: s,
                                    searchSource: k[0].searchSource
                                });
                            if (null !== a) {
                                let e = a.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                                C = e, 1 === o && (yield S.DownloadDispatchNS.startTask(e));
                                let i = a.getExtraObject();
                                null !== p && void 0 !== p && (L.information("setUserData:", p), null !== p.installFile && void 0 !== p.installFile && "" !== p.installFile && i.setUserData(I.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile", p.installFile), p.excludePath && "" !== p.excludePath && i.setUserData(I.TaskUserDataGUID.guidDownloadGroupTask, "excludePath", p.excludePath), null !== p.isSelectInstallCheck && void 0 !== p.isSelectInstallCheck && p.isSelectInstallCheck && i.setUserData(I.TaskUserDataGUID.guidDownloadCompleteInstall, "isImmediatelyInstall", "1"), null !== p.runParams && void 0 !== p.runParams && "" !== p.runParams && i.setUserData(I.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams", p.runParams), p.createShortcut && i.setUserData(I.TaskUserDataGUID.guidCreateShortcut, "createShortcut", JSON.stringify(p.createShortcut))), i.setUserData(I.TaskUserDataGUID.guidDownloadGroupTask, "canRepost", "true"), p && p.notSavePath === t && i.setUserData(I.TaskUserDataGUID.guidNotSavePath, "notSavePath", p.notSavePath)
                            }
                        } else if (k.length > 0) {
                            let e = yield R.createBatchTask(k), t = [];
                            for (let i of e) t.push(i.getId()), _[i.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskUrl)] = i.getId();
                            1 === o && (L.information("download-dispatch createBatchTask", t), yield S.DownloadDispatchNS.startTasks(t))
                        }
                        l.length > 0 && i(l, e)
                    }
                    if (u && u.length > 0) for (let e of u) Q({
                        url: e.url,
                        type: "url",
                        birdkeyChars: e.birdkeyChars
                    }, {source: e.statClick || "newwindow_url", referer: e.referer});
                    if (g && g.length > 0) for (let e of g) setTimeout(() => {
                        ue(e.url, "newwindow_url", !1).catch()
                    }, 50);
                    m && (yield fe(T, m, f, C, C ? void 0 : _, v))
                })), e.on(l.ThunderChannelList.channelRMNewTaskDownloadTorrent, (e, t, i) => n(this, void 0, void 0, function* () {
                    let o = (t, i, o) => n(this, void 0, void 0, function* () {
                            do {
                                if (!e.sender) break;
                                let n = R.getTaskFromTaskId(t);
                                if (yield e.sender.isDestroyed()) {
                                    L.information("download torrent back isDestroyed");
                                    break
                                }
                                if (i) {
                                    if (!n) {
                                        e.sender.send(l.ThunderChannelList.channelMRNewTaskDownloadTorrentResult, !1), L.information("channelRMNewTaskDownloadTorrent error");
                                        break
                                    }
                                    let t = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.SavePath),
                                        i = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName), o = a.join(t, i),
                                        r = yield c.TaskUtilitiesAWNS.parserBtFileInfoAW(o);
                                    if (!e.sender || (yield e.sender.isDestroyed())) {
                                        L.information("parserBtFileInfoAW back isDestroyed");
                                        break
                                    }
                                    if (null === r) {
                                        let t = {errinfo: "磁力链接解析失败"};
                                        e.sender.send(l.ThunderChannelList.channelMRNewTaskDownloadTorrentResult, !1, JSON.stringify(t));
                                        break
                                    }
                                    let s = JSON.stringify(r);
                                    e.sender.send(l.ThunderChannelList.channelMRNewTaskDownloadTorrentResult, !0, s, o)
                                } else {
                                    let t = void 0;
                                    705 === o && (t = {
                                        errinfo: "包含违规内容 无法下载",
                                        disable: !0
                                    }), e.sender.send(l.ThunderChannelList.channelMRNewTaskDownloadTorrentResult, !1, t ? JSON.stringify(t) : t)
                                }
                            } while (0)
                        }), r = {taskType: d.DownloadKernel.TaskType.Magnet, value: t},
                        s = yield c.TaskUtilitiesAWNS.batchFindTaskAW([r]);
                    if (s && s.length > 0) {
                        L.information("channelRMNewTaskDownloadTorrent repeat magnet task.url:", t);
                        let i = s[0].getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                        e.sender.send(l.ThunderChannelList.channelMRNewTaskMagnetTaskCreated, i), _.MagnetListenerNS.addRef(i, o)
                    } else {
                        let n = yield f.ThunderUtil.getThunderTempPath(!0),
                            r = p.ParseUrlFileNameNS.parseMagnetUrl(t) + ".torrent", s = a.join(n, r), c = {
                                taskBaseInfo: {
                                    taskName: r,
                                    savePath: n,
                                    productInfo: h.TaskCtrlOperatorNS.constructProductInfo(i.browser),
                                    origin: i.source
                                }, magnetTaskInfo: {url: t, torrentFilePath: s}, isBackground: !0
                            };
                        const g = u.DownloadKernelTaskManager.getTaskManager();
                        L.information("create task magnet productinfo", i);
                        let m = yield g.createTask(d.DownloadKernel.TaskType.Magnet, c);
                        if (null !== m) {
                            let t = m.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                            e.sender.send(l.ThunderChannelList.channelMRNewTaskMagnetTaskCreated, t), _.MagnetListenerNS.addRef(t, o), yield S.DownloadDispatchNS.startTask(t, !0)
                        }
                    }
                })), e.on(l.ThunderChannelList.channelRMNewTaskCancleMagnet, (e, t) => {
                    _.MagnetListenerNS.release(t)
                }), e.on(l.ThunderChannelList.channelRMNewTaskCreateBtTask, (e, t, o, r, s, u, f, p, m, v, T, w, k) => n(this, void 0, void 0, function* () {
                    L.verbose(e);
                    let C = !1, I = void 0, _ = f.map(e => String(e)), D = void 0, A = void 0;
                    do {
                        if (void 0 === r || null === r) {
                            e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateBtTaskResult, !1, "开启私人空间后才能创建任务至私人空间");
                            break
                        }
                        let w = null;
                        try {
                            w = JSON.parse(r)
                        } catch (e) {
                            L.warning(e)
                        }
                        if (null === w) break;
                        if (p) {
                            let i = yield P.client.callServerFunction("GetUserID");
                            if (b.PrivateSpaceHelperNS.isPrivateSpaceOpen(i)) {
                                let t = yield b.PrivateSpaceHelperNS.openPrivateCategory(i);
                                if (t < 0 && e.sender && !(yield e.sender.isDestroyed()) && e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateBtTaskResult, !1), 0 !== t) break;
                                let n = yield b.PrivateSpaceHelperNS.accessPrivateCategory(i);
                                if (n < 0 && e.sender && !(yield e.sender.isDestroyed()) && e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateBtTaskResult, !1), 0 !== n) break
                            } else {
                                p = !1;
                                let e = y.ConfigNS.getValue("PathAndCategory", "LastUsedPath", "");
                                null !== e && void 0 !== e && "" !== e || (e = y.ConfigNS.getValue("TaskDefaultSettings", "DefaultPath", "")), t = e, F.showNotify(E.ToastNotifyManagerNS.notifyIdScheduleTaskDownloadMode, O.ToastNotifyItemType.GreenNotify, "您未开通私人空间，请开通后再移动任务？", 3e3)
                            }
                        }
                        if (e.sender && !(yield e.sender.isDestroyed()) && e.sender.send(l.ThunderChannelList.channelMRNewTaskCreateBtTaskResult, !0), p || $(t), t || (yield P.client.callServerFunction("IsConfigInitFinish"), t = yield P.client.callServerFunction("GetDownloadDir")), void 0 === typeof w || null === w) break;
                        if (w = Object.assign({}, w), I = v || `magnet:?xt=urn:btih:${w.infoId}`, void 0 === typeof s || null === s) break;
                        C = !0, A = w.title;
                        let k = 0, _ = {};
                        f.forEach(e => {
                            _[e] = !0
                        });
                        let N = 0, x = 0;
                        for (let e of w.fileLists) {
                            if (N === w.fileLists.length) break;
                            _[e.realIndex] && (N++, e.fileSize && (x += e.fileSize, k += e.fileSize))
                        }
                        yield te(k, t);
                        let M = yield h.TaskCtrlOperatorNS.getBtExistFilePathList(t, w, f),
                            B = {taskType: d.DownloadKernel.TaskType.Bt, value: w.infoId},
                            V = yield c.TaskUtilitiesAWNS.batchFindTaskAW([B]), K = w.trackerUrls.join("\n"),
                            G = h.TaskCtrlOperatorNS.constructProductInfo(m.browser),
                            W = {savePath: t, taskName: w.title, productInfo: G, origin: m.source}, j = {
                                originUrl: v,
                                refUrl: m.referer,
                                seedFile: s,
                                displayName: u,
                                fileLists: w.fileLists,
                                infoId: w.infoId,
                                fileRealIndexLists: f,
                                tracker: K
                            }, H = {
                                taskType: d.DownloadKernel.TaskType.Bt,
                                newTaskInfo: {
                                    taskType: d.DownloadKernel.TaskType.Bt,
                                    taskBaseInfo: W,
                                    btTaskInfo: j,
                                    privateSpace: p
                                }
                            };
                        if (H.newTaskInfo.birdKey = T || void 0, H.newTaskInfo.searchSource = m.searchFrom ? m.searchFrom : void 0, 0 !== M.length) {
                            if (V && V.length > 0) {
                                g.MessageBox.custom("bt-repeat-task", {}, {
                                    width: 450,
                                    height: 240
                                }).then(e => n(this, void 0, void 0, function* () {
                                    if (e.action === U.MessageBoxNS.Action.OK) {
                                        let i = e.args.picked,
                                            n = V[0].getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId);
                                        "continue" === i ? yield S.DownloadDispatchNS.startTask(n) : Y(t, o, w, s, u, f, m, i, M, n, p).catch()
                                    }
                                })).catch();
                                break
                            }
                            {
                                let e = a.join(t, w.title), i = M.map(e => e.relativePath), n = JSON.stringify(i);
                                g.MessageBox.custom("bt-repeat-file", {saveDir: e, file: n}, {
                                    width: 450,
                                    height: 344
                                }).then(e => {
                                    if (e.action === U.MessageBoxNS.Action.OK) {
                                        let i = e.args.picked;
                                        Y(t, o, w, s, u, f, m, i, M, void 0, p, v).catch()
                                    }
                                }).catch();
                                break
                            }
                        }
                        if (V && V.length > 0) {
                            i(V, [H]);
                            break
                        }
                        let z = yield R.createTask(H.taskType, H.newTaskInfo);
                        null !== z ? (D = z.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId), 1 === o && (yield S.DownloadDispatchNS.startTask(D))) : L.warning("create bt task null")
                    } while (0);
                    C && w && (yield pe({files: _, url: I, name: A, searchFrom: m.searchFrom}, w, D, k))
                })), e.on(l.ThunderChannelList.channelRMImportTorrent, (e, t) => n(this, void 0, void 0, function* () {
                    L.verbose(e);
                    let i = yield c.TaskUtilitiesAWNS.parserBtFileInfoAW(t);
                    Q(null === i ? {type: "file", seedFile: t} : {
                        data: JSON.stringify(i),
                        type: "file",
                        seedFile: t
                    }, {source: "newwindow_bt"})
                }));
                let t = void 0;
                t = P.client.attachServerEvent("ThunderPanPluginReady", () => {
                    P.client.detachServerEvent("ThunderPanPluginReady", t), X = !0;
                    for (let e of q) e && e();
                    q = []
                })
            })
        }
    }(t.ThunderNewTask || (t.ThunderNewTask = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(0), r = i(7), s = i(8), l = i(4), d = i(11), u = i(22), c = i(38), h = i(9), f = i(5),
        p = i(30), g = i(48), m = i(51), v = i(37), y = i(127), T = i(32), w = i(26), k = i(3),
        C = a.default.getLogger("Thunder.TaskOperator"), b = r.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        I = d.DownloadKernelTaskManager.getTaskManager(), S = w.DownloadKernelCategoryManager.getCategoryManager();
    !function (e) {
        function t(e) {
            let t = b.getInstallChannel();
            e = void 0 === e ? "" : e;
            let i = o.join(__rootDir, "../../Thunder.exe");
            return `xl_thunder_pc|${b.getFileVersion(i)}|${t}|${e}`
        }

        function i(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    if (f.isNullOrUndefined(e)) break;
                    let i = e.savePath, n = e.taskName;
                    void 0 !== n && n.indexOf(".") === n.length - 1 && (n = n.substring(0, n.length - 1));
                    let a = o.join(i, n);
                    if (e.taskType === l.DownloadKernel.TaskType.P2sp || e.taskType === l.DownloadKernel.TaskType.Emule) ; else if (e.taskType === l.DownloadKernel.TaskType.Bt) {
                        let n = I.getTaskFromTaskId(e.taskId);
                        if (f.isNullOrUndefined(n)) break;
                        let r = n.getExtraObject(), d = r.getDownloadFile();
                        if (1 !== d.length) {
                            t = !(yield s.FileSystemAWNS.isDirectoryEmptyAW(a));
                            break
                        }
                        if (yield m.SingleBtTaskNS.isSingleBtTask(n)) a = m.SingleBtTaskNS.getSinleBtTaskFilePath(n); else {
                            let e = r.getBtFileList();
                            for (let [, t]of e) {
                                if (t.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.RealIndex) === d[0]) {
                                    let e = t.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FilePath),
                                        n = t.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileName),
                                        r = o.join(a, e);
                                    if (a = o.join(a, e, n), e && !(yield s.FileSystemAWNS.dirExistsAW(r))) {
                                        let t = o.join(i, e);
                                        (yield s.FileSystemAWNS.dirExistsAW(t)) && (a = o.join(i, e, n))
                                    }
                                    break
                                }
                            }
                        }
                    } else if (e.taskType === l.DownloadKernel.TaskType.Group) {
                        a = i;
                        let n = I.getTaskFromTaskId(e.taskId);
                        if (f.isNullOrUndefined(n)) break;
                        let r = n.getExtraObject(), d = r.getSubTaskCount();
                        for (let e = 0; e < d; ++e) {
                            let i = r.getSubTaskByIndex(e);
                            if (1 === i.getTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSubTask)) {
                                let e = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath),
                                    n = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName), a = o.join(e, n);
                                if (yield s.FileSystemAWNS.existsAW(a)) {
                                    t = !0;
                                    break
                                }
                            }
                        }
                        break
                    }
                    t = yield s.FileSystemAWNS.existsAW(a)
                } while (0);
                return t
            })
        }

        function a(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    let n = e.taskStatus;
                    if (n === l.DownloadKernel.TaskStatus.StartPending || n === l.DownloadKernel.TaskStatus.StopPending || n === l.DownloadKernel.TaskStatus.DestroyPending) break;
                    let a = I.getTaskFromTaskId(e.taskId);
                    if (yield m.SingleBtTaskNS.isSingleBtTask(a)) {
                        let e = m.SingleBtTaskNS.getSinleBtTaskFilePath(a);
                        t = yield s.FileSystemAWNS.existsAW(e)
                    } else {
                        let n = e.savePath, r = e.taskName;
                        void 0 !== r && r.indexOf(".") === r.length - 1 && (r = r.substring(0, r.length - 1));
                        let d = o.join(n, r), u = e.taskType;
                        if (u === l.DownloadKernel.TaskType.Bt) {
                            if ("" === r) {
                                t = yield s.FileSystemAWNS.existsAW(n);
                                break
                            }
                            if (t = yield s.FileSystemAWNS.existsAW(d)) break;
                            {
                                let e = yield m.SingleBtTaskNS.getCorrectSingleBtFolder(a);
                                if (e) {
                                    let i = o.join(n, e);
                                    t = yield s.FileSystemAWNS.dirExistsAW(i)
                                }
                            }
                        } else u === l.DownloadKernel.TaskType.Group ? (t = yield s.FileSystemAWNS.existsAW(n)) && (t = yield i(e)) : t = yield s.FileSystemAWNS.existsAW(d)
                    }
                } while (0);
                return t
            })
        }

        e.getUserLoginInfo = function () {
            return n(this, void 0, void 0, function* () {
                let e = "";
                do {
                    if (!(yield k.client.callServerFunction("IsLogined"))) break;
                    let t = yield k.client.callServerFunction("GetSessionID"),
                        i = yield k.client.callServerFunction("GetUserID");
                    if (!t) break;
                    e = "/ssessionid " + t + " /suserid " + i
                } while (0);
                return e
            })
        }, e.redownloadTask = function (e, i, o) {
            return n(this, void 0, void 0, function* () {
                if (void 0 === i) if (1 === e.length) {
                    let t = e[0].taskStatus;
                    i = t === l.DownloadKernel.TaskStatus.Succeeded || t === l.DownloadKernel.TaskStatus.Seeding ? yield a(e[0]) : t !== l.DownloadKernel.TaskStatus.Failed
                } else i = !0;
                let r = p.default.getCurrentCategoryId(), s = "mypc";
                if (-1 !== r) if (S.isPrivateCategory(r)) s = "private"; else {
                    let e = S.getCategoryFromId(r);
                    e && (s = e.getName())
                }
                if (i) {
                    let i = !1, a = !1;
                    if (1 === e.length && e[0].taskType === l.DownloadKernel.TaskType.P2sp) {
                        i = !0;
                        let t = I.getTaskFromTaskId(e[0].taskId);
                        t && (a = t.getOriginOnlyStrategy())
                    }
                    u.MessageBox.confirm({
                        title: "重新下载",
                        content: "重新下载会删除本地文件，确定要重新下载么？",
                        type: u.MessageBox.ConfirmType.Info,
                        checkboxEnabled: i,
                        checkboxChecked: a,
                        checkboxLabel: "从原始地址重新下载",
                        windowHeight: i ? 178 : 154
                    }).then(a => n(this, void 0, void 0, function* () {
                        if (a.action === c.MessageBoxNS.Action.OK) {
                            if (void 0 !== o) {
                                let e = "";
                                e = void 0 !== a.checkboxChecked && a.checkboxChecked ? `panel_type=${s},button=origin` : `panel_type=${s},button=reload`, h.XLStatNS.trackEvent("download_leftpanel", o, "", 0, 0, 0, 0, e)
                            }
                            for (let n of e) {
                                let e = {
                                    taskBaseInfo: {
                                        savePath: void 0,
                                        taskName: void 0,
                                        productInfo: t(""),
                                        origin: "re_download"
                                    },
                                    p2spTaskInfo: {
                                        url: void 0,
                                        useOriginResourceOnly: i ? a.checkboxChecked ? 1 : 0 : void 0
                                    }
                                };
                                (yield k.client.callServerFunction("GetXmpPlayTaskId")) === n.taskId && (yield k.client.callServerFunction("SetXmpStop"));
                                let o = yield I.reDownloadTask(n.taskId, e);
                                if (null !== o) {
                                    let e = o.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                                    yield g.DownloadDispatchNS.startTask(e)
                                }
                            }
                        } else if (void 0 !== o) {
                            let e = "";
                            e = a.action === c.MessageBoxNS.Action.Cancel ? `panel_type=${s},button=cancel` : `panel_type=${s},button=close`, h.XLStatNS.trackEvent("download_leftpanel", o, "", 0, 0, 0, 0, e)
                        }
                    })).catch()
                } else for (let i of e) {
                    if (void 0 !== o) {
                        let e = `panel_type=${s}`;
                        h.XLStatNS.trackEvent("download_leftpanel", o, "", 0, 0, 0, 0, e)
                    }
                    let e = {
                        taskBaseInfo: {
                            savePath: void 0,
                            taskName: void 0,
                            productInfo: t(""),
                            origin: "re_download"
                        }, p2spTaskInfo: {url: void 0, useOriginResourceOnly: void 0}
                    }, n = yield I.reDownloadTask(i.taskId, e);
                    if (null !== n) {
                        let e = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                        yield g.DownloadDispatchNS.startTask(e)
                    }
                }
            })
        }, e.constructProductInfo = t, e.isExistTaskFile = i, e.canOpenSelectedTaskFolder = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    let i = e.taskStatus;
                    if (i === l.DownloadKernel.TaskStatus.StartPending || i === l.DownloadKernel.TaskStatus.StopPending || i === l.DownloadKernel.TaskStatus.DestroyPending) break;
                    let n = I.getTaskFromTaskId(e.taskId);
                    if (yield m.SingleBtTaskNS.isSingleBtTask(n)) t = yield s.FileSystemAWNS.existsAW(e.savePath); else {
                        let i = e.savePath, a = e.taskName, r = e.taskType, d = o.join(i, a);
                        if (r === l.DownloadKernel.TaskType.Bt) {
                            if ("" === a) {
                                t = yield s.FileSystemAWNS.existsAW(i);
                                break
                            }
                            if (t = yield s.FileSystemAWNS.existsAW(d)) break;
                            {
                                let e = yield m.SingleBtTaskNS.getCorrectSingleBtFolder(n);
                                if (e) {
                                    let n = o.join(i, e);
                                    t = yield s.FileSystemAWNS.dirExistsAW(n)
                                }
                            }
                        } else l.DownloadKernel.TaskType.Group, t = yield s.FileSystemAWNS.existsAW(i)
                    }
                } while (0);
                return t
            })
        }, e.canOpenSelectedTaskFile = a, e.canOpenAsSelectedTaskFile = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    let i = e.taskStatus;
                    if (i === l.DownloadKernel.TaskStatus.StartPending || i === l.DownloadKernel.TaskStatus.StopPending || i === l.DownloadKernel.TaskStatus.DestroyPending) break;
                    let n = I.getTaskFromTaskId(e.taskId), a = e.taskType;
                    if (a === l.DownloadKernel.TaskType.Bt) if (yield m.SingleBtTaskNS.isSingleBtTask(n)) {
                        let e = m.SingleBtTaskNS.getSinleBtTaskFilePath(n);
                        v.TaskUtilHelper.isExecutableExt(e) || (t = yield s.FileSystemAWNS.existsAW(e))
                    } else {
                        let i = yield m.SingleBtTaskNS.getCorrectSingleBtFolder(n);
                        if (i) {
                            let n = e.savePath, a = o.join(n, i);
                            t = yield s.FileSystemAWNS.dirExistsAW(a)
                        }
                    } else if (a !== l.DownloadKernel.TaskType.Group) {
                        let i = e.savePath, n = e.taskName;
                        void 0 !== n && n.indexOf(".") === n.length - 1 && (n = n.substring(0, n.length - 1));
                        let a = o.join(i, n);
                        if (v.TaskUtilHelper.isExecutableExt(a)) break;
                        t = yield s.FileSystemAWNS.existsAW(a)
                    }
                } while (0);
                return t
            })
        }, e.getBtExistFilePathList = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = [];
                do {
                    let a = o.join(e, t.title);
                    if (!(yield s.FileSystemAWNS.existsAW(a))) break;
                    let r = t.fileLists;
                    for (let e = 0; e < r.length; e++) {
                        let t = r[e];
                        if (-1 !== i.indexOf(t.realIndex)) {
                            let e = o.join(t.filePath, t.fileName), i = o.join(a, e);
                            (yield s.FileSystemAWNS.existsAW(i)) && n.push({
                                fullPath: i,
                                index: t.realIndex,
                                relativePath: e
                            })
                        }
                    }
                } while (0);
                return n
            })
        }, e.getSavePathByFileName = function (e, t) {
            let i = "";
            do {
                if (void 0 === e || null === e) break;
                let n = I.getTaskFromTaskId(e);
                n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskType) === l.DownloadKernel.TaskType.Group && (i = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath), i = o.join(i, t), C.information("getSavePathByFileName:", i, t))
            } while (0);
            return i
        }, e.shouleiFileTransfer = function (e) {
            return n(this, void 0, void 0, function* () {
                T.ThunderKernel.getSubNetUploader((t, i) => n(this, void 0, void 0, function* () {
                    if (C.information("getSubNetUploader result", t, i), 0 === t) {
                        let t = {
                            singleton: !0,
                            shareLink: yield y.getShouleiFileTransferDlj(e.taskId, i, "pic", "leftlist_rk_phone"),
                            taskBase: e
                        };
                        if (e.taskType === l.DownloadKernel.TaskType.Bt) {
                            let i = [];
                            I.getTaskFromTaskId(e.taskId).getExtraObject().getBtFileList().forEach(e => {
                                i.push({
                                    index: e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.RealIndex),
                                    fileName: e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileName)
                                })
                            }), t.subFileList = i
                        }
                        u.MessageBox.custom("ShouleiFileTransfer", t, {modal: !1}).catch()
                    }
                }))
            })
        }
    }(t.TaskCtrlOperatorNS || (t.TaskCtrlOperatorNS = {}))
}, function (e, t) {
    e.exports = require("fs")
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(4), a = i(7), r = i(10), s = Math.pow(2, 38),
        l = a.default(n.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        function t(e) {
            return l.isThunderPrivateUrl(e)
        }

        function i(e) {
            let t = !0;
            for (let i = 0; i < e.length; i++) if (e.charCodeAt(i) > 127) {
                t = !1;
                break
            }
            return t
        }

        e.formatSize = function (e) {
            let t = 0, i = e, n = ["B", "KB", "MB", "GB", "TB", "PB"];
            for (; i >= 1024 && !(t > n.length - 1);) i /= 1024, t++;
            let o = n[t];
            return i.toFixed(2) + o
        }, e.getSavePathFromImportFile = function (e) {
            let t = "";
            return e && "" !== e && (t = n.dirname(e)), t
        }, e.getTaskNameFromImportFile = function (e) {
            let t = "";
            do {
                if (!e || "" === e) break;
                let i = n.basename(e), o = n.extname(e);
                if (!i || "" === i || !o || "" === o) break;
                let a = n.parse(i).name;
                if (!a || "" === a) break;
                let r = n.extname(a);
                if (!r || "" === r) break;
                ".td" === o || ".xltd" === o ? t = ".bt" === r || ".emule" === r ? n.parse(a).name : a : ".cfg" === o && (".td" === r || ".xltd" === r ? t = n.parse(a).name : ".emule" !== r && ".xlemule" !== r && ".bt" !== r && ".xlbt" !== r || (a = n.parse(a).name, t = n.parse(a).name))
            } while (0);
            return t
        }, e.getTaskTypeFromImportingFile = function (e) {
            let t = o.DownloadKernel.TaskType.Unkown;
            do {
                if (!e || "" === e) break;
                let i = n.basename(e), a = n.extname(e);
                if (!i || "" === i || !a || "" === a) break;
                let r = n.parse(i).name;
                if (!r || "" === r) break;
                let s = n.extname(r).toLowerCase();
                ".td" === a || ".xltd" === a ? t = ".bt" === s ? o.DownloadKernel.TaskType.Bt : ".emule" === s ? o.DownloadKernel.TaskType.Emule : o.DownloadKernel.TaskType.P2sp : ".cfg" === a && (".td" === s || ".xltd" === s ? t = o.DownloadKernel.TaskType.P2sp : ".emule" === s || ".xlemule" === s || ".part" === s ? t = o.DownloadKernel.TaskType.Emule : ".bt" !== s && ".xlbt" !== s || (t = o.DownloadKernel.TaskType.Bt))
            } while (0);
            return t
        }, e.isThunderPrivateUrl = t, e.parseThunderPrivateUrl = function (e) {
            let i = e;
            if (t(e)) {
                let t = l.parseThunderPrivateUrl(e);
                i = null !== t && void 0 !== t ? t.url : void 0
            }
            return i
        }, e.isAllAsciiChar = i, e.parseEd2kUrl = function (e) {
            let t = null;
            do {
                -1 === e.indexOf("|") && (e = e.replace("%7C", "|"));
                let n = [];
                if ((n = e.split("|")).length < 5) break;
                let o = "ed2k://";
                if (n[0].length < o.length || 0 !== n[0].indexOf(o)) break;
                let a = "file";
                if (n[1].length < a.length || 0 !== n[1].indexOf(a)) break;
                let r = n[2], l = parseInt(n[3], 10);
                if (l <= 0 || l > s) break;
                if (32 !== n[4].length) break;
                let d = n[4];
                if (-1 !== r.indexOf("%") && i(r)) try {
                    r = decodeURI(r)
                } catch (e) {
                }
                t = {
                    fileName: r = (r = (r = (r = (r = (r = (r = (r = (r = r.replace("<", "_")).replace(">", "_")).replace(":", "_")).replace('"', "_")).replace("/", "_")).replace("\\", "_")).replace("|", "_")).replace("?", "_")).replace("*", "_"),
                    fileHash: d,
                    fileSize: l
                }
            } while (0);
            return t
        };
        let a = void 0;

        function d(e) {
            let t = 0, i = -1;
            for (let n = 0; n < e.length; ++n) t += (i = e.charCodeAt(n)) >= 0 && i <= 128 ? 1 : 2;
            return t
        }

        function u(e, t) {
            let i = "", n = 0, o = new String;
            for (let a = 0; a < e.length; a++) {
                let r = e.charAt(a);
                if (n++, escape(r).length > 4 && n++, o = o.concat(r), n >= t) {
                    i = o.toString();
                    break
                }
            }
            return n < t && (i = e), i
        }

        e.getXmpPath = function () {
            if (!a) {
                let e = "HKEY_LOCAL_MACHINE", t = "SOFTWARE\\Thunder Network\\Xmp", i = "Path";
                a = l.readRegString(e, t, i)
            }
            return a
        }, e.getLastAssociateExts = function () {
            return r.ConfigNS.getValue("DownloadAndPlay", "AssociateExts", ".asf;.avi;.wm;.wmp;.wmv;.ram;.rm;.rmvb;.rp;.rpm;.rt;.smil;.scm;.dat;.m1v;.m2v;.m2p;.m2ts;.mp2v;.mpe;.mpeg;.mpeg1;.mpeg2;.mpg;.mpv2;.pss;.pva;.tp;.tpr;.ts;.m4b;.m4r;.m4p;.m4v;.mp4;.mpeg4;.3g2;.3gp;.3gp2;.3gpp;.mov;.qt;.flv;.f4v;.swf;.hlv;.ifo;.vob;.amv;.csf;.divx;.evo;.mkv;.mod;.pmp;.vp6;.bik;.mts;.xlmv;.ogm;.ogv;.ogx;.dvd;.srt;.ass;.ssa;.smi;.idx;.sub;.sup;.psb;.usf;.ssf")
        }, e.getStringLength = d, e.cutString = u, e.getMaxFilePath = function (e) {
            let t = "", i = d(e);
            if (i < 260) t = e; else {
                let o = n.dirname(e), a = n.basename(e), r = n.extname(e), s = 260 - (i = d(o) + 2) - r.length - 2;
                s > 0 && (a = u(a, s), a += r, t = n.join(o, a))
            }
            return t
        }
    }(t.Common || (t.Common = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.guidDownloadAndPlay = "{6B0A52BF-FDC5-4dfd-A20E-597CCD50CB8F}", e.guidTaskRequest = "{D30770E1-0A7F-4879-A103-AC738CB477C6}", e.guidUnzip = "{C60B84A8-6D18-475d-989D-965ADBECF135}", e.guidDownloadCompleteInstall = "{66F815D6-ADE3-4c85-A6B2-E48D50C096A7}", e.guidDownloadCompleteRunParams = "{D30770E1-0A7F-4879-A103-AC738CB477C6}", e.guidDownloadGroupTask = "{66F815D6-ADE3-4c85-A6B2-E48D50C096A7}", e.guidNotSavePath = "{57D3CEED-8FE8-465e-B7B0-4A80BF7AED3D}", e.guidCreateShortcut = "{FF6109C2-2C71-4A9F-8C52-8BF2548D1A6F}", e.guidBirdKey = "{DC5A04D4-3FCF-43E4-A8F6-10809C8E5A8B}", e.guidSearchFrom = "{940D0737-FDA2-41AA-A210-F94A2CD7CD19}", e.guidHttpHeaderField = "{76E33F22-C09A-4A21-A31E-62CE63F1A2FE}", e.guidThunderYunDownloadUserData = "{56F48D3C-5453-4E16-B3A5-35EC5CC2C69E}"
    }(t.TaskUserDataGUID || (t.TaskUserDataGUID = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(4), o = i(378);
    !function (e) {
        const t = new class {
            constructor() {
                this.categoryViews = [];
                let e = new o.CategoryView(-1, n.DownloadKernel.CategroyViewID.Downloading),
                    t = new o.CategoryView(-1, n.DownloadKernel.CategroyViewID.Completed),
                    i = new o.CategoryView(-1, n.DownloadKernel.CategroyViewID.Recycle);
                this.categoryViews.push(e), this.categoryViews.push(t), this.categoryViews.push(i)
            }

            getCategoryViews() {
                return this.categoryViews
            }

            getCategoryViewCount() {
                return this.categoryViews.length
            }

            getCategoryViewFromId(e) {
                let t = null;
                for (let i = 0; i < this.categoryViews.length; ++i) {
                    let n = this.categoryViews[i];
                    if (n && e === n.getCategoryViewId()) {
                        t = n;
                        break
                    }
                }
                return t
            }
        };
        e.getCategoryViewManager = function () {
            return t
        }
    }(t.DownloadKernelCategoryViewManager || (t.DownloadKernelCategoryViewManager = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(0), r = i(20), s = i(2), l = i(23), d = i(7), u = i(17), c = i(10), h = i(13), f = i(72),
        p = d.default(s.join(__rootDir, "../bin/ThunderHelper.node")), g = a.default.getLogger("config-remote-global");
    const m = new class {
        constructor() {
            this.configJsonData = null, this.eventEmitter = new r.EventEmitter, this.inited = !1, this.token = 0
        }

        getBaseConfigUrl() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    c.ConfigNS.attachListener(h.NodeEventMesssageNS.eventConfigInitFinished, () => {
                        let t = c.ConfigNS.getValue("ConfigRemoteGlobal", "TestServer", !1);
                        e(t ? "http://alpha-conf-m-ssl.xunlei.com/external/e095b1fb-6807-11e9-80e6-0242ac160003?" : "https://conf-m-ssl.xunlei.com/external/e095b1fb-6807-11e9-80e6-0242ac160003?")
                    })
                })
            })
        }

        getUpdateInterval() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    c.ConfigNS.attachListener(h.NodeEventMesssageNS.eventConfigInitFinished, () => {
                        let t = c.ConfigNS.getValue("ConfigRemoteGlobal", "Interval", 864e5);
                        e(t)
                    })
                })
            })
        }

        getConfigUrl() {
            return n(this, void 0, void 0, function* () {
                let e = yield this.getBaseConfigUrl(), t = yield l.LoginHelperNS.loginHelper.getUserInfoAw("userid"),
                    i = {};
                t && "" !== t && (i["user-id"] = t);
                let n = this.getThunderVersion();
                if (n && "" !== n) {
                    i["version-name"] = n;
                    let e = n.split(".");
                    e && 4 === e.length && (i["version-code"] = e[3])
                }
                let o = p.getPeerID();
                if (o && "" !== o) {
                    i["device-id"] = o;
                    let e = f.createHash("sha256");
                    e.update(o);
                    let t = e.digest("hex");
                    t && (o = t.toUpperCase()), i["peer-id"] = o
                }
                let a = p.getChannelID();
                a && "" !== a && (i.channel = a), i["app-type"] = "pc";
                let r = (new Date).getTimezoneOffset();
                i["time-zome"] = (r / 60).toString(), i.language = window.navigator.language;
                let s = p.getOSVersion();
                i.os = s;
                let d = !0;
                for (let t in i) d ? d = !1 : e += "&", e += t + "=" + i[t];
                return g.information("getConfigUrl url:", e), e
            })
        }

        getThunderVersion() {
            let e = s.join(__rootDir, "../../Thunder.exe");
            return p.getFileVersion(e)
        }

        requestConfig() {
            return n(this, void 0, void 0, function* () {
                let e = null, t = null;
                try {
                    o.default.defaults.adapter = i(21);
                    let e = yield this.getConfigUrl();
                    t = yield o.default.get(e, {timeout: 1e4}), g.information("url: ", e, ", response:", t)
                } catch (e) {
                    g.warning(e)
                }
                return t && 200 === t.status && t.data && "" !== t.data && "ok" === t.data.result && t.data.values && (e = t.data.values), e
            })
        }

        updateConfig() {
            return n(this, void 0, void 0, function* () {
                let e = ++this.token, t = yield this.requestConfig();
                e === this.token && (this.configJsonData = t, this.inited ? this.eventEmitter.emit("OnRemoteGlobalConfigUpdated", null !== this.configJsonData && void 0 !== this.configJsonData) : (this.inited = !0, this.eventEmitter.emit("OnRemoteGlobalConfigLoaded", null !== this.configJsonData && void 0 !== this.configJsonData)))
            })
        }

        init() {
            return n(this, void 0, void 0, function* () {
                u.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", this.updateConfig.bind(this)), u.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", this.updateConfig.bind(this));
                let e = this.token, t = yield this.requestConfig();
                e !== this.token || this.inited || (this.configJsonData = t, this.inited = !0, this.eventEmitter.emit("OnRemoteGlobalConfigLoaded", null !== this.configJsonData && void 0 !== this.configJsonData));
                let i = yield this.getUpdateInterval();
                i > 0 && setInterval(() => {
                    g.information("time out updateConfig"), this.updateConfig().catch()
                }, i)
            })
        }

        isConfigExists(e, t) {
            let i = !1;
            do {
                if (null === this.configJsonData || void 0 === this.configJsonData) break;
                null === t || void 0 === t || "" === t ? null !== this.configJsonData[e] && void 0 !== this.configJsonData[e] && (i = !0) : null !== this.configJsonData[e] && void 0 !== this.configJsonData[e] && null !== this.configJsonData[e][t] && void 0 !== this.configJsonData[e][t] && (i = !0)
            } while (0);
            return i
        }

        getConfigValue(e, t, i) {
            let n = i;
            do {
                if (null === this.configJsonData || void 0 === this.configJsonData) break;
                null === t || void 0 === t || "" === t ? null !== this.configJsonData[e] && void 0 !== this.configJsonData[e] && (n = this.configJsonData[e]) : null !== this.configJsonData[e] && void 0 !== this.configJsonData[e] && null !== this.configJsonData[e][t] && void 0 !== this.configJsonData[e][t] && (n = this.configJsonData[e][t])
            } while (0);
            return n
        }

        attachListener(e, t) {
            this.eventEmitter.addListener(e, t)
        }

        detachListener(e, t) {
            this.eventEmitter.removeListener(e, t)
        }

        isInited() {
            return this.inited
        }

        isInitedAW() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    this.inited ? e(!0) : this.eventEmitter.once("OnRemoteGlobalConfigLoaded", t => {
                        e(!0)
                    })
                })
            })
        }
    };
    t.default = m
}, function (e, t, i) {
    e.exports = i(65)(28)
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(20);
    t.default = class {
        constructor() {
            this.emitter = null, this.emitter = new n.EventEmitter
        }

        attachOnceListener(e, t) {
            this.emitter.once(e, t)
        }

        attachListener(e, t) {
            this.emitter.addListener(e, t)
        }

        prependListener(e, t) {
            this.emitter.prependListener(e, t)
        }

        prependOnceListener(e, t) {
            this.emitter.prependOnceListener(e, t)
        }

        detachListener(e, t) {
            this.emitter.removeListener(e, t)
        }

        fireEvent(e, ...t) {
            return this.emitter.emit(e, ...t)
        }

        setMaxListeners(e) {
            this.emitter.setMaxListeners(e)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(4), r = i(13), s = i(53), l = i(56), d = i(103), u = i(30), c = i(16), h = i(33), f = i(26),
        p = i(11), g = i(44), m = i(126), v = i(31), y = i(81), T = i(69), w = i(15),
        k = o.default.getLogger("download-dispatch"), C = p.DownloadKernelTaskManager.getTaskManager(),
        b = c.DownloadKernelEventManager.getEventManager(), I = f.DownloadKernelCategoryManager.getCategoryManager(),
        S = l.ToastNotifyManagerNS.getToastNotifyManger(),
        _ = g.DownloadKernelCategoryViewManager.getCategoryViewManager(), D = 50, A = 51200;
    var N;
    !function (e) {
        e[e.resume = 1] = "resume"
    }(N || (N = {}));
    const x = new class {
        constructor() {
            this.maxStartCount = 5, this.tasks = [], this.downloadingTasks = [], this.freeDownloadingTasks = [], this.waitingTasks = [], this.lowSpeedCache = {}, this.isFreeOpened = !1, this.noLimitSize = 30, this.autoAddTimerId = void 0, this.autoTailTimerId = void 0, this.taskDetailCookie = void 0, this.autoAddRate = void 0, this.speedArray = [], this.taskSpeedMap = {}, this.autoAddAvailable = !1
        }

        init() {
            this.attachTaskEvent(), setInterval(() => n(this, void 0, void 0, function* () {
                let e = 0 === C.getStartTaskIDs().length, t = yield y.CommonNS.callXmp(T.XmpPlayerFunction.isPlaying);
                v.ThunderHelper.setScreenSaveActive(e && !t, t)
            }), 3e4)
        }

        setAutoAddTask(e, t) {
            e ? this.startAutoAddTask(t) : (this.autoAddRate = void 0, this.stopAutoAddTask())
        }

        setAutoTail(e) {
            k.information("setAutoTail", e), this.autoTailAvailbale = e, e ? (this.taskSpeedMap = {}, this.syncTaskSpeedMap(void 0, this.downloadingTasks), this.trySwitchAutoTail()) : this.stopAutoTail()
        }

        setFreeFromScheduleOpen(e, t) {
            return n(this, void 0, void 0, function* () {
                if (this.isFreeOpened = e, this.noLimitSize = t, k.information("setFreeFromScheduleOpen", this.isFreeOpened, this.noLimitSize, this.tasks.length), e) {
                    for (let e of this.tasks) {
                        let i = C.getTaskFromTaskId(e), n = i.getTaskAttribute(a.DownloadKernel.TaskAttribute.FileSize);
                        k.information("setFreeFromSchedule", n, t), n <= 1024 * t * 1024 && n > 0 ? i.setFreeFromSchedule(!0) : i.setFreeFromSchedule(!1)
                    }
                    for (let e of this.waitingTasks) C.getTaskFromTaskId(e).isFreeFromSchedule() && (yield this.startNoWaiting(e, !0))
                } else for (let e of this.tasks) C.getTaskFromTaskId(e).setFreeFromSchedule(!1)
            })
        }

        setAutoAddTaskAvailable(e) {
            k.information("auto add available", e), this.autoAddAvailable = e, e ? this.switchAutoAddTask() : this.stopAutoAddTask()
        }

        updateTasks(e) {
            this.tasks = [...e]
        }

        startTask(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = !0;
                do {
                    if (this.downloadingTasks.includes(e) || this.freeDownloadingTasks.includes(e)) {
                        k.information("startTask is downloading", e);
                        break
                    }
                    let o = C.getTaskFromTaskId(e);
                    if (null === o) break;
                    if (o.getTaskAttribute(a.DownloadKernel.TaskAttribute.Background)) {
                        k.information("startTask is background", e), yield C.startTask(e, i);
                        break
                    }
                    let r = o.getTaskAttribute(a.DownloadKernel.TaskAttribute.CategoryId);
                    if (-1 !== r) {
                        I.isPrivateCategory(r) ? (k.information("startTask is private", e, r), yield C.startTask(e, i)) : yield w.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcRetrieveTaskContol", N.resume, [e]);
                        break
                    }
                    let s = o.isFreeFromSchedule();
                    if (s) {
                        k.information("startTask isFreeFromSchedule"), yield this.startNoWaiting(e, !0, i), this.showSmallFileAdvancedNotify();
                        break
                    }
                    if (void 0 === s && this.isFreeOpened && !isNaN(this.noLimitSize) && this.noLimitSize > 0) {
                        let t = o.getTaskAttribute(a.DownloadKernel.TaskAttribute.FileSize);
                        if (t <= 1024 * this.noLimitSize * 1024 && t > 0) {
                            o.setFreeFromSchedule(!0), k.information("startTask isFreeFromSchedule"), yield this.startNoWaiting(e, !0, i), this.showSmallFileAdvancedNotify();
                            break
                        }
                        o.setFreeFromSchedule(!1)
                    }
                    if (t) {
                        k.information("startTask force no waiting", e), yield this.startNoWaiting(e, !1, i);
                        break
                    }
                    if (this.downloadingTasks.length < this.maxStartCount) {
                        k.information("startTask no waiting", e), yield this.startNoWaiting(e, !1, i);
                        break
                    }
                    k.information("startTask waiting", e), this.startWaiting(e), n = !1
                } while (0);
                return n
            })
        }

        startTasks(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (null === e || void 0 === e || 0 === e.length) break;
                    0 === this.tasks.length && (k.information("try to start multi task but tasks not inited"), this.initTasksOrderFromConfig());
                    let t = this.getTaskIdsInOrder(e), i = !1, n = [], o = [];
                    for (let e of t) {
                        let t = C.getTaskFromTaskId(e).getTaskAttribute(a.DownloadKernel.TaskAttribute.CategoryId);
                        void 0 !== t && -1 !== t ? I.isPrivateCategory(t) ? (i = !0, yield C.startTask(e)) : n.push(e) : o.push(e)
                    }
                    if (n.length > 0 && (yield w.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcRetrieveTaskContol", N.resume, n)), i || 0 === o.length) break;
                    yield this.batchStartTasks(o)
                } while (0)
            })
        }

        setMaxStartTaskCount(e) {
            return n(this, void 0, void 0, function* () {
                if (this.maxStartCount !== e && e > 0) {
                    this.maxStartCount = e;
                    let t = this.downloadingTasks.length;
                    if (this.isFreeOpened || (t = this.downloadingTasks.length + this.freeDownloadingTasks.length), t > this.maxStartCount) {
                        let e = 0;
                        for (let t = 0; t < this.tasks.length; t++) {
                            let i = this.tasks[t], n = C.getTaskFromTaskId(i), o = n.getTaskStatus(),
                                r = n.isFreeFromSchedule();
                            o !== a.DownloadKernel.TaskStatus.StartPending && o !== a.DownloadKernel.TaskStatus.Started || r || (e += 1) > this.maxStartCount && (k.information("to stop", i), this.stopAndWaiting(i, a.DownloadKernel.TaskStopReason.MaxDownloadReduce).catch())
                        }
                    } else if (this.waitingTasks.length > 0 && this.downloadingTasks.length < this.maxStartCount) {
                        k.information("setMaxStartTaskCount to add start task", this.waitingTasks.length, this.downloadingTasks.length, this.maxStartCount);
                        for (let e = 0; e < this.tasks.length; e++) {
                            let t = this.tasks[e];
                            if (C.getTaskFromTaskId(t).getTaskStatus() === a.DownloadKernel.TaskStatus.StartWaiting && (yield this.startNoWaiting(t), k.information("setMaxStartTaskCount add start task", t, this.waitingTasks.length, this.downloadingTasks.length), 0 === this.waitingTasks.length || this.downloadingTasks.length === this.maxStartCount)) break
                        }
                    }
                }
            })
        }

        getTaskIdsInOrder(e) {
            let t = [];
            do {
                if (!e || 0 === e.length) break;
                let i = [];
                for (let t of e) {
                    let e = this.tasks.indexOf(t);
                    -1 !== e && i.push(e)
                }
                if (i.length !== e.length) {
                    t = [...e];
                    break
                }
                i.sort((e, t) => e - t);
                for (let e of i) {
                    let i = this.tasks[e];
                    t.push(i)
                }
            } while (0);
            return t
        }

        showSmallFileAdvancedNotify() {
            this.downloadingTasks.length >= this.maxStartCount ? S.showNotify(l.ToastNotifyManagerNS.notifyIdTaskDispatchSmallFileAdvanced, s.ToastNotifyItemType.GreenNotify, `正在优先下载小于${this.noLimitSize}MB的任务`, 3e3) : k.information("showSmallFileAdvancedNotify no waiting ")
        }

        batchStartTasks(e) {
            return n(this, void 0, void 0, function* () {
                let t = [];
                for (let i = 0; i < e.length; i++) {
                    let n = e[i];
                    if (!(yield this.startTask(n))) {
                        if (!this.isFreeOpened) {
                            i + 1 < e.length && (t = e.slice(i + 1));
                            break
                        }
                        t.push(n)
                    }
                }
                t.length > 0 && this.startBatchWaiting(t)
            })
        }

        initTasksOrderFromConfig() {
            let e = [], t = _.getCategoryViewFromId(a.DownloadKernel.CategroyViewID.Downloading).getTasks();
            for (let [, i]of t) e.push(i.getTaskBaseInfo());
            e.sort(m.SortNS.getSortFuncByConfig(a.DownloadKernel.CategroyViewID.Downloading, -1)), this.tasks = e.map(e => e.taskId)
        }

        startNoWaiting(e, t = !1, i) {
            return n(this, void 0, void 0, function* () {
                if (yield C.startTask(e, i)) {
                    t ? this.freeDownloadingTasks.includes(e) || this.freeDownloadingTasks.push(e) : this.downloadingTasks.includes(e) || (this.downloadingTasks.push(e), this.syncTaskSpeedMap(void 0, [e]));
                    let i = this.waitingTasks.indexOf(e);
                    -1 !== i && (this.waitingTasks.splice(i, 1), this.switchAutoAddTask(), this.trySwitchAutoTail())
                }
            })
        }

        startWaiting(e) {
            if (C.startWaitingTask(e)) {
                this.waitingTasks.includes(e) || (this.waitingTasks.push(e), this.switchAutoAddTask(), this.trySwitchAutoTail());
                let t = this.downloadingTasks.indexOf(e);
                -1 !== t && (this.downloadingTasks.splice(t, 1), this.syncTaskSpeedMap([e]))
            }
        }

        startBatchWaiting(e) {
            for (let t of e) {
                let e = C.getTaskFromTaskId(t).getTaskStatus();
                if (e === a.DownloadKernel.TaskStatus.Stopped || e === a.DownloadKernel.TaskStatus.Failed || e === a.DownloadKernel.TaskStatus.Unkown) {
                    this.waitingTasks.includes(t) || (this.waitingTasks.push(t), this.switchAutoAddTask(), this.trySwitchAutoTail());
                    let e = this.downloadingTasks.indexOf(t);
                    -1 !== e && (this.downloadingTasks.splice(e, 1), this.syncTaskSpeedMap([t]))
                }
            }
            C.startWaitingTasks(e)
        }

        convertWaiting2Start() {
            return n(this, void 0, void 0, function* () {
                for (let e = 0; e < this.tasks.length; e++) {
                    let t = this.tasks[e];
                    if (this.waitingTasks.includes(t) && C.getTaskFromTaskId(t).getTaskStatus() === a.DownloadKernel.TaskStatus.StartWaiting) {
                        k.information("convertWaiting2Start", t), yield this.startNoWaiting(t);
                        break
                    }
                }
            })
        }

        batchConvertWaiting2Start(e) {
            for (let t of e) this.waitingTasks.includes(t) && C.getTaskFromTaskId(t).getTaskStatus() === a.DownloadKernel.TaskStatus.StartWaiting && (k.information("batchConvertWaiting2Start", t), this.startNoWaiting(t).catch())
        }

        getAverageSpeed(e, t = 10) {
            let i = -1;
            do {
                if (isNaN(t)) break;
                if (t < 0) break;
                if (0 === e.length) break;
                let n = v.ThunderHelper.getTickCount(), o = e.filter(e => e.tickCount + 1e3 * t >= n);
                if (0 === o.length) break;
                let a = o.map(e => e.speed);
                i = a.reduce((e, t) => e + t, 0) / a.length
            } while (0);
            return k.information("getAverageSpeed", i), i
        }

        onGlobalDownloadSpeedChanged() {
            do {
                if (void 0 === this.autoAddTimerId) break;
                let e = h.DownloadKernelManager.getTotalTaskDownloadSpeed(!1, !1);
                this.speedArray.length >= 10 && this.speedArray.shift();
                let t = {speed: e, tickCount: v.ThunderHelper.getTickCount()};
                this.speedArray.push(t)
            } while (0)
        }

        startAutoAddTask(e) {
            do {
                if (isNaN(e)) {
                    this.stopAutoAddTask();
                    break
                }
                if (this.autoAddRate = e, !this.autoAddAvailable) break;
                if (0 === this.waitingTasks.length) break;
                void 0 === this.autoAddTimerId && (h.DownloadKernelManager.attachListener(r.NodeEventMesssageNS.eventGlobalDownloadSpeedChanged, this.onGlobalDownloadSpeedChanged.bind(this)), k.information("start auto add timer"), this.autoAddTimerId = setInterval(() => n(this, void 0, void 0, function* () {
                    do {
                        if (this.downloadingTasks.length + this.freeDownloadingTasks.length >= D) {
                            k.information("auto add task upper limit");
                            break
                        }
                        if (0 === this.waitingTasks.length) break;
                        this.isAutoAddTask() && (yield this.convertWaiting2Start())
                    } while (0)
                }), 3e4))
            } while (0)
        }

        stopAutoAddTask() {
            k.information("stopAutoAddTask"), void 0 !== this.autoAddTimerId && (clearInterval(this.autoAddTimerId), this.autoAddTimerId = void 0, this.speedArray = [], k.information("detachListener"), h.DownloadKernelManager.detachListener(r.NodeEventMesssageNS.eventGlobalDownloadSpeedChanged, this.onGlobalDownloadSpeedChanged.bind(this)))
        }

        isAutoAddTask() {
            let e = !1, t = this.getAverageSpeed(this.speedArray);
            return t < 1024 * this.autoAddRate && (e = !0), k.information("isAutoAddTask", t, 1024 * this.autoAddRate, e), e
        }

        switchAutoAddTask() {
            do {
                if (!this.autoAddAvailable) break;
                if (void 0 === this.autoAddRate) break;
                this.waitingTasks.length > 0 ? this.startAutoAddTask(this.autoAddRate) : (k.information("no waiting task to stopAutoAdd"), this.stopAutoAddTask())
            } while (0)
        }

        isLowSpeed(e, t) {
            let i = !1;
            do {
                if (0 === this.waitingTasks.length) {
                    k.information("isLowSpeed task no waiting now");
                    break
                }
                if (!t) break;
                if (0 === t.length) break;
                if (this.lowSpeedCache.hasOwnProperty(String(e))) {
                    k.information("task already move to tail once");
                    break
                }
                let n = C.getTaskFromTaskId(e);
                if (!n) break;
                let o = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.FileSize),
                    r = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.DownloadSize);
                if (o > 0 && 100 * r / o >= 99.9) {
                    k.information("isLowSpeed percent more then 99.9");
                    break
                }
                if (v.ThunderHelper.getTickCount() - t[0].tickCount < 1e4) {
                    k.information("isLowSpeed task start less then 10s", t);
                    break
                }
                this.getAverageSpeed(t.slice(1)) < A && (i = !0)
            } while (0);
            return i
        }

        syncTaskSpeedMap(e, t) {
            do {
                if (!this.autoTailAvailbale) break;
                if (e) for (let t of e) this.taskSpeedMap.hasOwnProperty(String(t)) && delete this.taskSpeedMap[t];
                if (t) for (let e of t) {
                    let t = v.ThunderHelper.getTickCount();
                    k.information("init first speed item", t, e), this.taskSpeedMap[e] = [{speed: 0, tickCount: t}]
                }
            } while (0)
        }

        trySwitchAutoTail() {
            k.information("trySwitchAutoTail", this.autoTailAvailbale, this.waitingTasks.length);
            do {
                if (!this.autoTailAvailbale) break;
                if (0 === this.waitingTasks.length) {
                    this.stopAutoTail();
                    break
                }
                if (void 0 !== this.autoTailTimerId) break;
                this.taskDetailCookie = b.attachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    do {
                        if (!e) break;
                        if (e[0] !== a.DownloadKernel.TaskEventType.DetailChanged) break;
                        if (!e[1]) break;
                        let t = e[1];
                        for (let e of t) {
                            let t = e.getId();
                            if (this.taskSpeedMap.hasOwnProperty(String(t))) {
                                let i = e.getDownloadSpeed();
                                this.taskSpeedMap[t].length >= 11 && this.taskSpeedMap[t].shift(), this.taskSpeedMap[t].push({
                                    speed: i,
                                    tickCount: v.ThunderHelper.getTickCount()
                                })
                            }
                        }
                    } while (0)
                }), k.information("start auto tail timer"), this.autoTailTimerId = setInterval(() => n(this, void 0, void 0, function* () {
                    let e = this.taskSpeedMap,
                        t = this.downloadingTasks.length < this.waitingTasks.length ? this.downloadingTasks.length : this.waitingTasks.length,
                        i = 0, n = this.tasks.slice(0);
                    for (let o = 0; o < n.length; o++) {
                        let a = n[o];
                        if (e.hasOwnProperty(String(a)) && this.isLowSpeed(a, e[a]) && (k.information("isLowSpeed data is", a, e[a]), i++, yield this.convertWaiting2Start(), yield this.moveTask2Tail(Number(a)), this.lowSpeedCache[a] = !0, i === t)) {
                            k.information("isLowSpeed current waitingtask all convert start");
                            break
                        }
                    }
                }), 3e4)
            } while (0)
        }

        stopAutoTail() {
            k.information("stopAutoTail"), void 0 !== this.autoTailTimerId && (clearInterval(this.autoTailTimerId), this.autoTailTimerId = void 0), this.taskDetailCookie && (b.detachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, this.taskDetailCookie), this.taskDetailCookie = void 0)
        }

        stopAndWaiting(e, t) {
            return n(this, void 0, void 0, function* () {
                return new Promise((i, n) => {
                    C.stopTaskAW(e, t).then(t => {
                        t ? (k.information("stoptask and startwaiting", e), this.startWaiting(e)) : k.information("stopTaskAW fail", e), i()
                    }).catch()
                })
            })
        }

        moveTask2Tail(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (this.tasks.indexOf(e) === this.tasks.length - 1) {
                        k.information("moveTask2Tail already at the end"), yield this.stopAndWaiting(e, a.DownloadKernel.TaskStopReason.LowSpeed);
                        break
                    }
                    return new Promise((t, i) => {
                        u.default.fireEvent(r.NodeEventMesssageNS.evetDownloadMove2Tail, e, () => n(this, void 0, void 0, function* () {
                            yield this.stopAndWaiting(e, a.DownloadKernel.TaskStopReason.LowSpeed), t()
                        }))
                    })
                } while (0)
            })
        }

        attachTaskEvent() {
            b.attachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, (...e) => n(this, void 0, void 0, function* () {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.StatusChanged) break;
                    let t = e[1];
                    if (!t) break;
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        if (i.getTaskAttribute(a.DownloadKernel.TaskAttribute.Background)) continue;
                        let n = i.getTaskStatus(), o = i.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                        if (i.getTaskAttribute(a.DownloadKernel.TaskAttribute.GroupTaskId) > 0) continue;
                        if (-1 !== i.getTaskAttribute(a.DownloadKernel.TaskAttribute.CategoryId)) continue;
                        if (n === a.DownloadKernel.TaskStatus.StartPending || n === a.DownloadKernel.TaskStatus.Started) continue;
                        if ((n === a.DownloadKernel.TaskStatus.StopPending || n === a.DownloadKernel.TaskStatus.Stopped) && d.DownloadJammedNS.isStopPending(o)) {
                            k.information("ignore status change download jammed stop", n);
                            continue
                        }
                        let r = this.downloadingTasks.indexOf(o);
                        if (-1 !== r) this.downloadingTasks.splice(r, 1), this.syncTaskSpeedMap([o]); else {
                            let e = this.freeDownloadingTasks.indexOf(o);
                            -1 !== e && this.freeDownloadingTasks.splice(e, 1)
                        }
                        if (n === a.DownloadKernel.TaskStatus.StartWaiting) continue;
                        let s = this.waitingTasks.indexOf(o);
                        if (-1 !== s && (this.waitingTasks.splice(s, 1), this.switchAutoAddTask(), this.trySwitchAutoTail()), (n === a.DownloadKernel.TaskStatus.Succeeded || n === a.DownloadKernel.TaskStatus.Failed || n === a.DownloadKernel.TaskStatus.StopPending || n === a.DownloadKernel.TaskStatus.Stopped) && this.waitingTasks.length > 0 && this.downloadingTasks.length < this.maxStartCount) {
                            let e = Math.min(this.maxStartCount - this.downloadingTasks.length, this.waitingTasks.length),
                                t = [];
                            for (let i = 0; i < e; i++) t.push(this.waitingTasks[i]);
                            this.batchConvertWaiting2Start(t)
                        }
                    }
                } while (0)
            })), b.attachTaskEvent(a.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.RemoveFromCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    if (-1 !== e[1]) break;
                    if (e[2] !== a.DownloadKernel.CategroyViewID.Downloading) break;
                    let t = e[3];
                    for (let e of t) {
                        let t = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId),
                            i = this.downloadingTasks.indexOf(t);
                        if (-1 !== i) this.downloadingTasks.splice(i, 1), this.syncTaskSpeedMap([t]); else {
                            let e = this.freeDownloadingTasks.indexOf(t);
                            -1 !== e && this.freeDownloadingTasks.splice(e, 1)
                        }
                        let n = this.waitingTasks.indexOf(t);
                        -1 !== n && (this.waitingTasks.splice(n, 1), this.switchAutoAddTask(), this.trySwitchAutoTail())
                    }
                } while (0)
            })
        }
    };
    !function (e) {
        e.init = function () {
            x.init()
        }, e.updateTasksOrder = function (e) {
            x.updateTasks(e)
        }, e.startTask = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = C.getTaskFromTaskId(e).getTaskStatus();
                return n !== a.DownloadKernel.TaskStatus.Succeeded && n !== a.DownloadKernel.TaskStatus.Seeding && x.startTask(e, t, i)
            })
        }, e.startTasks = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = v.ThunderHelper.getTickCount();
                for (let i of e) window.__performanceMap["StartTask_" + i] = t;
                yield x.startTasks(e)
            })
        }, e.setStartTaskCount = function (e) {
            do {
                if ("number" != typeof e && (e = Number(e)), isNaN(e)) break;
                if (e <= 0) break;
                x.setMaxStartTaskCount(e).catch()
            } while (0)
        }, e.setFreeFromScheduleOpen = function (e, t) {
            x.setFreeFromScheduleOpen(e, t).catch()
        }, e.setAutoAddTaskAvailable = function (e) {
            x.setAutoAddTaskAvailable(e)
        }, e.setAutoAddTask = function (e, t) {
            x.setAutoAddTask(e, t)
        }, e.setAutoTail = function (e) {
            x.setAutoTail(e)
        }
    }(t.DownloadDispatchNS || (t.DownloadDispatchNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(74);
    var o;
    !function (e) {
        e.Download = "download-panel", e.Cloud = "pan-plugin-view"
    }(o = t.NavViewID || (t.NavViewID = {}));
    const a = {
        currentNav: o.Download,
        isSettingCenterOpened: !1,
        navs: [{
            content: "下载",
            icon: "xly-icon-nav-down",
            key: o.Download,
            unReadNum: 0,
            showUnRead: !0,
            showRedDot: !1
        }, {
            content: "云盘",
            icon: "xly-icon-nav-cloud",
            key: o.Cloud,
            unReadNum: 0,
            showUnRead: !0,
            showRedDot: !1
        },]
    }, r = {
        SELECT_NAV(e, t) {
            if (!e.navs.some(e => e.key === t)) return;
            if (t === e.currentNav) return;
            this.commit("SHOW_OR_HIDE_EMBEDDED_BROWSER", {nav: e.currentNav, show: !1});
            let i = e.navs.find(e => e.key === t);
            if (i.isEmbeddedBrowser) {
                let e = {
                    tabType: n.TabType.Chromium,
                    tabParam: {
                        url: i.embeddedBrowserUrl,
                        hideUI: !0,
                        name: i.key,
                        title: i.title || "",
                        isEmbeddedBrowser: !0
                    }
                };
                this.commit("CREATE_NEW_TAB", e, {root: !0}), this.commit("SHOW_OR_HIDE_EMBEDDED_BROWSER", {
                    nav: t,
                    show: !0
                })
            }
            e.currentNav = t, t === o.Browser ? this.commit("SHOW_OR_HIDE_BROWSER", !0, {root: !0}) : this.commit("SHOW_OR_HIDE_BROWSER", !1, {root: !0})
        }, INSERT_NEW_NAVS(e, t) {
            if (void 0 !== t && null !== t) {
                for (let e of Object.keys(t.viewID)) {
                    if (o[e]) return;
                    o[e] = t.viewID[e]
                }
                for (let i of Object.keys(t.navs)) {
                    let n = parseInt(i, 10);
                    e.navs.splice(n, 0, t.navs[i])
                }
            }
        }, REMOVE_NAVS(e, t) {
            if (void 0 !== t && null !== t && t.viewID !== o.Browser && t.viewID !== o.Cloud && t.viewID !== o.Download && t.viewID !== o.Message) {
                for (let e of Object.keys(t.viewID)) delete o[e];
                for (let i of Object.keys(t.navs)) {
                    let n = e.navs.findIndex(e => e.key === t.navs[i].key);
                    t.navs[i].key === e.currentNav && this.commit("SELECT_NAV", o.Download), this.commit("CLOSE_TAB_BY_NAME", t.navs[i].key), e.navs.splice(n, 1)
                }
            }
        }, SET_SETTING_CENTER_STATUS(e, t) {
            e.isSettingCenterOpened = t
        }
    }, s = {
        currentNav: e => e.currentNav,
        navList: e => e.navs,
        messageUnreadNum: e => {
        },
        currentNavView: e => e.navs.find(t => t.key === e.currentNav),
        isSettingCenterOpened: e => e.isSettingCenterOpened
    };
    t.default = {state: a, mutations: r, getters: s}
}, function (e, t) {
    e.exports = require("url")
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(8), r = i(4);
    !function (e) {
        e.isSingleBtTask = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = !1, i = void 0;
                do {
                    if (!e) break;
                    if (e.getType() !== r.DownloadKernel.TaskType.Bt) break;
                    let n = e.getExtraObject();
                    if (!n) break;
                    if (1 !== n.getFileCount()) break;
                    let s = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.SavePath),
                        l = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskName), d = o.join(s, l);
                    if (yield a.FileSystemAWNS.existsAW(d)) {
                        let e = yield a.FileSystemAWNS.lstatAW(d);
                        if (e && e.isDirectory()) {
                            let e = void 0, i = n.getBtFileList();
                            for (let [, t]of i) {
                                e = t.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileName);
                                break
                            }
                            if (!e) break;
                            let s = o.join(d, e);
                            if (yield a.FileSystemAWNS.existsAW(s)) {
                                let e = yield a.FileSystemAWNS.lstatAW(s);
                                e && e.isDirectory() && (t = !0);
                                break
                            }
                            let l = e + ".bt.xltd";
                            if (s = o.join(d, l), yield a.FileSystemAWNS.existsAW(s)) {
                                let e = yield a.FileSystemAWNS.lstatAW(s);
                                e && e.isDirectory() && (t = !0);
                                break
                            }
                            if (l = e + ".bt.td", s = o.join(d, l), yield a.FileSystemAWNS.existsAW(s)) {
                                let e = yield a.FileSystemAWNS.lstatAW(s);
                                e && e.isDirectory() && (t = !0);
                                break
                            }
                            break
                        }
                    }
                    let u = n.getBtFileList();
                    for (let [, e]of u) {
                        i = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FilePath);
                        break
                    }
                    if (i) {
                        t = !1;
                        break
                    }
                    t = !0
                } while (0);
                return t
            })
        }, e.getCorrectSingleBtFolder = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = void 0;
                do {
                    if (!e) break;
                    if (e.getType() !== r.DownloadKernel.TaskType.Bt) break;
                    let i = e.getExtraObject();
                    if (!i) break;
                    if (1 !== i.getFileCount()) break;
                    let n = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.SavePath),
                        s = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskName), l = o.join(n, s),
                        d = yield a.FileSystemAWNS.dirExistsAW(l);
                    if (d) break;
                    let u = void 0, c = void 0, h = i.getBtFileList();
                    for (let [, e]of h) {
                        u = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileName), c = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FilePath);
                        break
                    }
                    if (!u || !c) break;
                    if (l = o.join(n, c), d = yield a.FileSystemAWNS.dirExistsAW(l)) {
                        t = c;
                        break
                    }
                } while (0);
                return t
            })
        }, e.getSinleBtTaskFilePath = function (e) {
            let t = void 0;
            {
                let i = void 0, n = void 0, a = e.getExtraObject().getBtFileList();
                for (let [, e]of a) {
                    n = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FilePath), i = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileName), n && (i = o.join(n, i));
                    break
                }
                let s = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.SavePath);
                t = o.join(s, i)
            }
            return t
        }
    }(t.SingleBtTaskNS || (t.SingleBtTaskNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = i(503), o = i(616), a = Object.prototype.toString;

    function r(e) {
        return "[object Array]" === a.call(e)
    }

    function s(e) {
        return null !== e && "object" == typeof e
    }

    function l(e) {
        return "[object Function]" === a.call(e)
    }

    function d(e, t) {
        if (null !== e && void 0 !== e) if ("object" != typeof e && (e = [e]), r(e)) for (var i = 0, n = e.length; i < n; i++) t.call(null, e[i], i, e); else for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.call(null, e[o], o, e)
    }

    e.exports = {
        isArray: r, isArrayBuffer: function (e) {
            return "[object ArrayBuffer]" === a.call(e)
        }, isBuffer: o, isFormData: function (e) {
            return "undefined" != typeof FormData && e instanceof FormData
        }, isArrayBufferView: function (e) {
            return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && e.buffer instanceof ArrayBuffer
        }, isString: function (e) {
            return "string" == typeof e
        }, isNumber: function (e) {
            return "number" == typeof e
        }, isObject: s, isUndefined: function (e) {
            return void 0 === e
        }, isDate: function (e) {
            return "[object Date]" === a.call(e)
        }, isFile: function (e) {
            return "[object File]" === a.call(e)
        }, isBlob: function (e) {
            return "[object Blob]" === a.call(e)
        }, isFunction: l, isStream: function (e) {
            return s(e) && l(e.pipe)
        }, isURLSearchParams: function (e) {
            return "undefined" != typeof URLSearchParams && e instanceof URLSearchParams
        }, isStandardBrowserEnv: function () {
            return ("undefined" == typeof navigator || "ReactNative" !== navigator.product) && "undefined" != typeof window && "undefined" != typeof document
        }, forEach: d, merge: function e() {
            var t = {};

            function i(i, n) {
                "object" == typeof t[n] && "object" == typeof i ? t[n] = e(t[n], i) : t[n] = i
            }

            for (var n = 0, o = arguments.length; n < o; n++) d(arguments[n], i);
            return t
        }, extend: function (e, t, i) {
            return d(t, function (t, o) {
                e[o] = i && "function" == typeof t ? n(t, i) : t
            }), e
        }, trim: function (e) {
            return e.replace(/^\s*/, "").replace(/\s*$/, "")
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(47);
    var o;
    !function (e) {
        e[e.GreenNotify = 0] = "GreenNotify", e[e.RedNotify = 1] = "RedNotify", e[e.RedCancelNotify = 2] = "RedCancelNotify", e[e.Custom = 3] = "Custom"
    }(o = t.ToastNotifyItemType || (t.ToastNotifyItemType = {}));

    class a extends n.default {
        constructor(e, t, i, n) {
            super(), this.id = "", this.message = "", this.duration = 0, this.viewOptions = null, this.id = e, this.message = t, this.duration = i, this.viewOptions = n
        }

        setMessage(e) {
            this.message = e
        }

        getMessage() {
            return this.message
        }

        setDuration(e) {
            this.duration = e
        }

        getDuration() {
            return this.duration
        }

        getId() {
            return this.id
        }

        getType() {
            return o.GreenNotify
        }

        getCancel() {
            return !(!this.viewOptions || !this.viewOptions.viewVisible)
        }

        getCancelText() {
            do {
                if (!this.viewOptions) break;
                if (this.viewOptions.viewVisible) return this.viewOptions.viewText ? this.viewOptions.viewText : "查看"
            } while (0);
            return ""
        }

        cancel() {
            this.viewOptions && this.viewOptions.onView ? this.viewOptions.onView() : this.fireEvent("OnCancel")
        }

        close() {
            this.viewOptions && this.viewOptions.onClose && this.viewOptions.onClose()
        }
    }

    t.ToastNotifyItem = a;
    t.RedToastNotifyItem = class extends a {
        constructor(e, t, i, n) {
            super(e, t, i, n)
        }

        getType() {
            return o.RedNotify
        }
    };

    class r extends a {
        constructor(e, t, i, n) {
            super(e, t, i, n)
        }

        getCancel() {
            return !0
        }

        getCancelText() {
            return "取消"
        }

        onCancel(e) {
            this.attachOnceListener("OnCancel", e)
        }
    }

    t.CancelToastNotifyItem = r;
    t.RedCancelToastNotifyItem = class extends r {
        constructor(e, t, i, n) {
            super(e, t, i, n)
        }

        getType() {
            return o.RedCancelNotify
        }
    };
    t.CustomToastNotifyItem = class extends r {
        constructor(e, t, i, n) {
            super(e, t, i), this.component = "", this.component = n
        }

        getType() {
            return o.Custom
        }

        getComponentId() {
            return this.component
        }
    }
}, function (e, t, i) {
    (function () {
        var t, n, o, a, r, s, l, d, u, c, h, f, p = {}.hasOwnProperty;
        f = i(76), h = f.isObject, c = f.isFunction, u = f.isEmpty, r = null, t = null, n = null, o = null, a = null, l = null, d = null, s = null, e.exports = function () {
            function e(e) {
                this.parent = e, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify), this.children = [], r || (r = i(129), t = i(130), n = i(131), o = i(132), a = i(133), l = i(138), d = i(139), s = i(140))
            }

            return e.prototype.element = function (e, t, i) {
                var n, o, a, r, s, l, d, f, g, m;
                if (l = null, null == t && (t = {}), t = t.valueOf(), h(t) || (i = (g = [t, i])[0], t = g[1]), null != e && (e = e.valueOf()), Array.isArray(e)) for (a = 0, d = e.length; a < d; a++) o = e[a], l = this.element(o); else if (c(e)) l = this.element(e.apply()); else if (h(e)) {
                    for (s in e) if (p.call(e, s)) if (m = e[s], c(m) && (m = m.apply()), h(m) && u(m) && (m = null), !this.options.ignoreDecorators && this.stringify.convertAttKey && 0 === s.indexOf(this.stringify.convertAttKey)) l = this.attribute(s.substr(this.stringify.convertAttKey.length), m); else if (!this.options.separateArrayItems && Array.isArray(m)) for (r = 0, f = m.length; r < f; r++) o = m[r], (n = {})[s] = o, l = this.element(n); else h(m) ? (l = this.element(s)).element(m) : l = this.element(s, m)
                } else l = !this.options.ignoreDecorators && this.stringify.convertTextKey && 0 === e.indexOf(this.stringify.convertTextKey) ? this.text(i) : !this.options.ignoreDecorators && this.stringify.convertCDataKey && 0 === e.indexOf(this.stringify.convertCDataKey) ? this.cdata(i) : !this.options.ignoreDecorators && this.stringify.convertCommentKey && 0 === e.indexOf(this.stringify.convertCommentKey) ? this.comment(i) : !this.options.ignoreDecorators && this.stringify.convertRawKey && 0 === e.indexOf(this.stringify.convertRawKey) ? this.raw(i) : !this.options.ignoreDecorators && this.stringify.convertPIKey && 0 === e.indexOf(this.stringify.convertPIKey) ? this.instruction(e.substr(this.stringify.convertPIKey.length), i) : this.node(e, t, i);
                if (null == l) throw new Error("Could not create any elements with: " + e);
                return l
            }, e.prototype.insertBefore = function (e, t, i) {
                var n, o, a;
                if (this.isRoot) throw new Error("Cannot insert elements at root level");
                return o = this.parent.children.indexOf(this), a = this.parent.children.splice(o), n = this.parent.element(e, t, i), Array.prototype.push.apply(this.parent.children, a), n
            }, e.prototype.insertAfter = function (e, t, i) {
                var n, o, a;
                if (this.isRoot) throw new Error("Cannot insert elements at root level");
                return o = this.parent.children.indexOf(this), a = this.parent.children.splice(o + 1), n = this.parent.element(e, t, i), Array.prototype.push.apply(this.parent.children, a), n
            }, e.prototype.remove = function () {
                var e;
                if (this.isRoot) throw new Error("Cannot remove the root element");
                return e = this.parent.children.indexOf(this), [].splice.apply(this.parent.children, [e, e - e + 1].concat([])), this.parent
            }, e.prototype.node = function (e, t, i) {
                var n, o;
                return null != e && (e = e.valueOf()), t || (t = {}), t = t.valueOf(), h(t) || (i = (o = [t, i])[0], t = o[1]), n = new r(this, e, t), null != i && n.text(i), this.children.push(n), n
            }, e.prototype.text = function (e) {
                var t;
                return t = new d(this, e), this.children.push(t), this
            }, e.prototype.cdata = function (e) {
                var i;
                return i = new t(this, e), this.children.push(i), this
            }, e.prototype.comment = function (e) {
                var t;
                return t = new n(this, e), this.children.push(t), this
            }, e.prototype.commentBefore = function (e) {
                var t, i;
                return t = this.parent.children.indexOf(this), i = this.parent.children.splice(t), this.parent.comment(e), Array.prototype.push.apply(this.parent.children, i), this
            }, e.prototype.commentAfter = function (e) {
                var t, i;
                return t = this.parent.children.indexOf(this), i = this.parent.children.splice(t + 1), this.parent.comment(e), Array.prototype.push.apply(this.parent.children, i), this
            }, e.prototype.raw = function (e) {
                var t;
                return t = new l(this, e), this.children.push(t), this
            }, e.prototype.instruction = function (e, t) {
                var i, n, o, a, r;
                if (null != e && (e = e.valueOf()), null != t && (t = t.valueOf()), Array.isArray(e)) for (a = 0, r = e.length; a < r; a++) i = e[a], this.instruction(i); else if (h(e)) for (i in e) p.call(e, i) && (n = e[i], this.instruction(i, n)); else c(t) && (t = t.apply()), o = new s(this, e, t), this.children.push(o);
                return this
            }, e.prototype.instructionBefore = function (e, t) {
                var i, n;
                return i = this.parent.children.indexOf(this), n = this.parent.children.splice(i), this.parent.instruction(e, t), Array.prototype.push.apply(this.parent.children, n), this
            }, e.prototype.instructionAfter = function (e, t) {
                var i, n;
                return i = this.parent.children.indexOf(this), n = this.parent.children.splice(i + 1), this.parent.instruction(e, t), Array.prototype.push.apply(this.parent.children, n), this
            }, e.prototype.declaration = function (e, t, i) {
                var n, a;
                return n = this.document(), a = new o(n, e, t, i), n.children[0] instanceof o ? n.children[0] = a : n.children.unshift(a), n.root() || n
            }, e.prototype.doctype = function (e, t) {
                var i, n, o, r, s, l, d, u, c;
                for (i = this.document(), n = new a(i, e, t), o = r = 0, l = (u = i.children).length; r < l; o = ++r) if (u[o] instanceof a) return i.children[o] = n, n;
                for (o = s = 0, d = (c = i.children).length; s < d; o = ++s) if (c[o].isRoot) return i.children.splice(o, 0, n), n;
                return i.children.push(n), n
            }, e.prototype.up = function () {
                if (this.isRoot) throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
                return this.parent
            }, e.prototype.root = function () {
                var e;
                for (e = this; e;) {
                    if (e.isDocument) return e.rootObject;
                    if (e.isRoot) return e;
                    e = e.parent
                }
            }, e.prototype.document = function () {
                var e;
                for (e = this; e;) {
                    if (e.isDocument) return e;
                    e = e.parent
                }
            }, e.prototype.end = function (e) {
                return this.document().end(e)
            }, e.prototype.prev = function () {
                var e;
                if ((e = this.parent.children.indexOf(this)) < 1) throw new Error("Already at the first node");
                return this.parent.children[e - 1]
            }, e.prototype.next = function () {
                var e;
                if (-1 === (e = this.parent.children.indexOf(this)) || e === this.parent.children.length - 1) throw new Error("Already at the last node");
                return this.parent.children[e + 1]
            }, e.prototype.importDocument = function (e) {
                var t;
                return (t = e.root().clone()).parent = this, t.isRoot = !1, this.children.push(t), this
            }, e.prototype.ele = function (e, t, i) {
                return this.element(e, t, i)
            }, e.prototype.nod = function (e, t, i) {
                return this.node(e, t, i)
            }, e.prototype.txt = function (e) {
                return this.text(e)
            }, e.prototype.dat = function (e) {
                return this.cdata(e)
            }, e.prototype.com = function (e) {
                return this.comment(e)
            }, e.prototype.ins = function (e, t) {
                return this.instruction(e, t)
            }, e.prototype.doc = function () {
                return this.document()
            }, e.prototype.dec = function (e, t, i) {
                return this.declaration(e, t, i)
            }, e.prototype.dtd = function (e, t) {
                return this.doctype(e, t)
            }, e.prototype.e = function (e, t, i) {
                return this.element(e, t, i)
            }, e.prototype.n = function (e, t, i) {
                return this.node(e, t, i)
            }, e.prototype.t = function (e) {
                return this.text(e)
            }, e.prototype.d = function (e) {
                return this.cdata(e)
            }, e.prototype.c = function (e) {
                return this.comment(e)
            }, e.prototype.r = function (e) {
                return this.raw(e)
            }, e.prototype.i = function (e, t) {
                return this.instruction(e, t)
            }, e.prototype.u = function () {
                return this.up()
            }, e.prototype.importXMLBuilder = function (e) {
                return this.importDocument(e)
            }, e
        }()
    }).call(this)
}, function (e, t) {
    e.exports = require("os")
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(47), a = i(53), r = n.default.getLogger("ToastNotifyManager");
    !function (e) {
        e.notifyIdAutoDeleteNonExistTasks = "auto_delete_nonexsit_tasks", e.notifyIdScheduleTaskComplete = "schedule_task_complete", e.notifyIdTaskOperatorDestroyTask = "task_operator_destroy_task", e.notifyIdTaskOperatorCopyLink = "task_operator_copy_link", e.notifyIdTaskOperatorCopyMagnetLink = "task_operator_copy_magnet_link", e.notifyIdTaskOperatorSaveAsTorrent = "task_operator_save_as_torrent", e.notifyIdTaskOperatorRecoverTask = "task_operator_recover_task", e.notifyIdScheduleTaskDownloadMode = "schedule_task_download_mode", e.notifyIdTaskOperatorMoveTask = "task_operator_move_task", e.notifyIdTaskDispatchSmallFileAdvanced = "task_dispatch_small_file_advanced", e.notifyIdGetCoinPrize = "get_coin_prize", e.notifyIdTaskAdd2Cloud = "task_add_to_cloud_notify", e.notifyIdImportUnfinishedFail = "import_unfinished_fail";

        class t extends o.default {
            constructor() {
                super(...arguments), this.notifyList = []
            }

            getTopNotify() {
                return this.notifyList.length < 1 ? null : this.notifyList[this.notifyList.length - 1]
            }

            closeNotify(e) {
                r.information("closeNotify notifyId:", e);
                for (let t = 0; t < this.notifyList.length; t++) if (this.notifyList[t].getId() === e) {
                    let i = this.notifyList[t];
                    this.notifyList.splice(t, 1), this.fireEvent("OnCloseNotify", e, i);
                    break
                }
            }

            updateNotify(e, t, i) {
                r.information("updateNotify notifyId:", e, ", msg:", t, ", duration:", i);
                for (let n = 0; n < this.notifyList.length; n++) {
                    let o = this.notifyList[n];
                    if (o.getId() === e) return o.setMessage(t), o.setDuration(i), this.fireEvent("OnUpdateNotify", e, o), !0
                }
                return !1
            }

            showNotify(e, t, i, n, o) {
                r.information("showNotify notifyId:", e, ", notifyType:", t, ", message:", i, ", duration:", n, ", component:", o);
                let s = null;
                switch (t) {
                    case a.ToastNotifyItemType.GreenNotify:
                        s = new a.ToastNotifyItem(e, i, n);
                        break;
                    case a.ToastNotifyItemType.RedCancelNotify:
                        s = new a.RedCancelToastNotifyItem(e, i, n);
                        break;
                    case a.ToastNotifyItemType.RedNotify:
                        s = new a.RedToastNotifyItem(e, i, n);
                        break;
                    case a.ToastNotifyItemType.Custom:
                        s = new a.CustomToastNotifyItem(e, i, n, o)
                }
                return s ? (this.notifyList.push(s), this.fireEvent("OnShowNotify", e, s), s) : s
            }

            showNotifyEx(e, t, i, n, o, r) {
                let s = null;
                switch (t) {
                    case a.ToastNotifyItemType.GreenNotify:
                        s = new a.ToastNotifyItem(e, i, n, o);
                        break;
                    case a.ToastNotifyItemType.RedCancelNotify:
                        s = new a.RedCancelToastNotifyItem(e, i, n, o);
                        break;
                    case a.ToastNotifyItemType.RedNotify:
                        s = new a.RedToastNotifyItem(e, i, n, o);
                        break;
                    case a.ToastNotifyItemType.Custom:
                        s = new a.CustomToastNotifyItem(e, i, n, r)
                }
                return s ? (this.notifyList.push(s), this.fireEvent("OnShowNotify", e, s), s) : s
            }
        }

        e.ToastNotifyManager = t;
        const i = new t;
        e.getToastNotifyManger = function () {
            return i
        }
    }(t.ToastNotifyManagerNS || (t.ToastNotifyManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(62), a = i(3), r = i(0), s = i(29), l = i(5), d = r.default.getLogger("FetchRes"), u = {
        mock: "http://easy-mock.com/mock/59f0652c1bd72e7a888988ab/sl",
        test: "http://test.api-shoulei-ssl.xunlei.com",
        prod: "http://api-shoulei-ssl.xunlei.com"
    }, c = {
        "server error": "服务器异常",
        "params error": "参数错误",
        "login plz": "未登录",
        "shield review": "风险账号",
        "shield reject": "异常账号",
        "not allowed": "无权限做此操作",
        "not found": "未找到资源",
        exists: "已存在",
        "too many": "超过操作上限"
    };

    function h(e) {
        return (e = (e = encodeURIComponent(e)).replace(/\(/g, "%29")).replace(/\)/g, "%28")
    }

    function f({url: e, data: t, method: o = "get"}, r = "prod") {
        return n(this, arguments, void 0, function* () {
            d.information("fetchFromApiProxy", arguments);
            try {
                const n = yield Promise.all([a.client.callServerFunction("GetUserID"), a.client.callServerFunction("GetSessionID"), a.client.callServerFunction("GetPeerID")]), [u, c, f] = n;
                d.information(n);
                let p = {
                    _h: Object.assign({
                        "Account-Id": u,
                        "Peer-Id": f,
                        "User-Id": u,
                        "Session-Id": c,
                        "App-Type": "pc_xunlei"
                    }, t && t._h || {})
                };
                t && t._h && delete t._h, t && (t.peer_id = f);
                let g = {
                    accesskey: "pc.xunlei",
                    nonce: Math.floor(99999999 * Math.random()).toString(),
                    timestamp: Math.floor((new Date).getTime() / 1e3).toString()
                }, m = {};
                "get" === o && t && (m = t, t = null);
                for (let e in m) l.isObject(m[e]) || (g[e] = m[e]);
                let v = [];
                for (let e in g) v.push(h(e) + "%3D" + h(g[e]));
                v.sort();
                let y = h(e), T = o.toUpperCase() + "&" + y + "&", w = "";
                for (let e = 0; e < v.length - 1; ++e) w += v[e] + "%26";
                let k, C = T + (w += v[v.length - 1]);
                !t || "post" !== o && "put" !== o || (C += "%26" + JSON.stringify(t)), d.information("message: ", C), k = "test" === r ? "c9879c94a55474304cca0abafb867653" : "89917368930f3fea5bafebe704d6b623";
                let b = s.ToolsUtilitiesAWNS.encryptHmacBuffer("sha1", k, C, "base64");
                b = (b = b.replace(/\+/g, "-")).replace(/\//g, "_");
                let I = e + "?";
                for (let e in g) I += h(e) + "=" + h(g[e]) + "&";
                I += "sig=" + b, d.information("fetchFromApiProxy method", o, ", uri", I, ", data", t, ", headers", p._h);
                const S = yield i(18);
                return S.defaults.adapter = i(21), S.defaults.headers["Content-Type"] = "post" === o ? "application/json" : "application/x-www-form-urlencoded", S.request({
                    method: o,
                    url: I,
                    data: t,
                    headers: p._h
                }).then(e => (d.information("fetchFromApiProxy success", e), e)).catch(e => (d.information("fetchFromApiProxy failed", e), {error: e}))
            } catch (e) {
                return {error: e}
            }
        })
    }

    function p({url: e, data: t, method: o = "get"}, r = "prod") {
        return n(this, arguments, void 0, function* () {
            d.information("fetchFromApiProxy", arguments);
            try {
                const n = yield Promise.all([a.client.callServerFunction("GetUserID"), a.client.callServerFunction("GetSessionID"), a.client.callServerFunction("GetPeerID")]), [r, s, u] = n;
                d.information("fetchFromApiProxyNoSign", n);
                let c = {
                    _h: Object.assign({
                        "Account-Id": r,
                        "Peer-Id": u,
                        "User-Id": r,
                        "Session-Id": s,
                        "App-Type": "pc_xunlei"
                    }, t && t._h || {})
                };
                t && t._h && delete t._h, t && (t.peer_id = u);
                let f = {
                    accesskey: "pc.xunlei",
                    nonce: Math.floor(99999999 * Math.random()).toString(),
                    timestamp: Math.floor((new Date).getTime() / 1e3).toString()
                }, p = {};
                "get" === o && t && (p = t, t = null);
                for (let e in p) l.isObject(p[e]) || (f[e] = p[e]);
                let g = e;
                g.includes("?") ? g += "&" : g += "?";
                for (let e in f) g += h(e) + "=" + h(f[e]) + "&";
                d.information("fetchFromApiProxy method", o, ", uri", g, ", data", t, ", headers", c._h);
                const m = yield i(18);
                return m.defaults.adapter = i(21), m.defaults.headers["Content-Type"] = "post" === o ? "application/json" : "application/x-www-form-urlencoded", m.request({
                    method: o,
                    url: g,
                    data: t,
                    headers: c._h
                }).then(e => (d.information("fetchFromApiProxy success", e), e)).catch(e => (d.information("fetchFromApiProxy failed", e), {error: e}))
            } catch (e) {
                return {error: e}
            }
        })
    }

    function g({url: e, data: t, method: i = "get"}, o = "prod", r = !0) {
        return n(this, void 0, void 0, function* () {
            let n = u[o], s = yield a.client.callServerFunction("GetValue", "ConfigFetchInterface", "TestServer", 0);
            return 1 === s && (n = u[o = "test"]), d.information("当前fetchSlRes 是否测试服:", s, " 远程地址:", n), r ? f({
                url: `${n}${e}`,
                data: t,
                method: i
            }, o) : p({url: `${n}${e}`, data: t, method: i}, o)
        })
    }

    function m(e, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") {
        return Array.apply(null, new Array(e)).map(function () {
            return t.charAt(Math.floor(Math.random() * t.length))
        }).join("")
    }

    function v(e, t = document.cookie) {
        return null == t.match(new RegExp("(^" + e + "| " + e + ")=([^;]*)")) ? "" : RegExp.$2
    }

    t.fetchFromApiProxy = f, t.fetchFromApiProxyNoSign = p, t.fetchSlRes = g, t.fetchPCRes = function ({url: e, data: t, method: i = "get"}, o = "prod") {
        return n(this, void 0, void 0, function* () {
            return g({url: e, data: t, method: i}, o)
        })
    }, t.fetchPCRequest = function ({url: e, data: t, method: o = "get"}, r = "prod") {
        return n(this, void 0, void 0, function* () {
            let n = u[r], s = yield a.client.callServerFunction("GetValue", "ConfigFetchInterface", "TestServer", 0);
            1 === s && (n = u[r = "test"]), d.information("当前fetchPCRequest 是否测试服:", s, " 远程地址:", n);
            let l = {_h: Object.assign({}, t && t._h || {})};
            t && t._h && delete t._h;
            const c = yield i(18);
            c.defaults.adapter = i(21), c.defaults.headers["Content-Type"] = "post" === o ? "application/json" : "application/x-www-form-urlencoded";
            try {
                return c.request({
                    method: o,
                    url: `${n}${e}`,
                    params: "get" === o && t ? t : {},
                    data: "post" === o && t ? t : {},
                    headers: l._h
                }).then(e => (d.information("fetchRequest success", e), e)).catch(e => (d.information("fetchRequest fail", e), {error: e}))
            } catch (e) {
                return {error: e}
            }
        })
    }, t.fetchRequest = function ({url: e, data: t, method: o = "get"}) {
        return n(this, arguments, void 0, function* () {
            d.information("fetchRequest", arguments);
            try {
                const n = yield i(18);
                return n.defaults.adapter = i(21), n.defaults.headers["Content-Type"] = "post" === o ? "application/json" : "application/x-www-form-urlencoded", n.request({
                    method: o,
                    url: e,
                    params: "get" === o && t ? t : {},
                    data: "post" === o && t ? t : {}
                }).then(e => (d.information("fetchRequest success", e), e)).catch(e => (d.information("fetchRequest fail", e), {error: e}))
            } catch (e) {
                return {error: e}
            }
        })
    }, t.fetchClientRes = function (e, ...t) {
        return n(this, void 0, void 0, function* () {
            return a.client.callServerFunction(e, ...t)
        })
    }, t.fetch = function (e, t) {
        return n(this, void 0, void 0, function* () {
            const n = i(18);
            if (!t) {
                let e = new o.Agent({rejectUnauthorized: !1});
                t = {timeout: 1e4, httpsAgent: e}
            }
            return n(e, t).then(e => e.data)
        })
    }, t.fetchCmtRes = function (e, t, o, r = "prod") {
        return n(this, void 0, void 0, function* () {
            let n = u[r];
            t = `${n}${t}`;
            const s = yield Promise.all([a.client.callServerFunction("GetUserID"), a.client.callServerFunction("GetSessionID")]), [l, c] = s;
            let h = o && o._h || [];
            delete o._h;
            let f = {};
            "get" === e ? (f = Object.assign({}, o, {
                app_id: 14,
                userid: l,
                session_id: c,
                v: "1.0",
                jsL2S: 1,
                _: (new Date).getTime()
            }), o = null) : o = Object.assign({}, o, {
                app_id: 14,
                userid: l,
                session_id: c,
                v: "1.0",
                jsL2S: 1,
                _: (new Date).getTime()
            });
            const p = i(18).create();
            return p.defaults.timeout = 1e4, p.defaults.adapter = i(21), l && "" !== l && (p.defaults.headers["User-Id"] = l), c && "" !== c && (p.defaults.headers["Session-Id"] = c), p.defaults.headers["Content-Type"] = "post" === e ? "application/json" : "application/x-www-form-urlencoded", p.request({
                method: e,
                url: t,
                params: f,
                data: o,
                headers: h
            }).then(e => {
                if (200 === e.status && e.data) return e.data;
                throw new Error(`请求评论接口 ${t} 失败`)
            }).catch(e => {
                d.warning("fetchCmtRes error, catch axios res", e)
            })
        })
    }, t.random = m, t.getCookie = v, t.fetchDataWithShoulei = function (e, t = {}, o = {}) {
        return n(this, void 0, void 0, function* () {
            e = `https://api-shoulei-ssl.xunlei.com${e}`;
            let r = yield function (e = {}, t = {}) {
                return n(this, void 0, void 0, function* () {
                    const i = (t = Object.assign({}, {method: e && e._m || "get"}, t)).method,
                        n = !process.server && document.cookie || "";
                    let {userID: o = 0, version: r, sessionID: l} = yield a.client.callServerFunction("GetUserInfoAw"),
                        d = yield a.client.callServerFunction("GetPeerID");
                    d = d || v("peerid", n) || v("deviceid", n);
                    const u = {
                        userID: o,
                        sessionID: l,
                        version: r,
                        guid: s.ToolsUtilitiesAWNS.genarateMd5(d || m(32)),
                        peerId: d
                    }, c = [...e && e._h || []];
                    let h;
                    return delete e._h, delete e._m, "get" === i && (h = e, e = null), {
                        method: i,
                        params: h,
                        headerStrings: c,
                        userInfo: u,
                        data: e
                    }
                })
            }(t, o), {method: l, params: u, userInfo: h} = r;
            const f = !process.server && document.cookie || "", p = Object.assign({}, {
                "Peer-Id": h.peerId,
                Guid: h.guid,
                "User-Id": h && "0" !== h.userID ? "" : h.userID,
                "Session-Id": h.sessionID,
                "Product-Id": 14,
                "Version-Code": "4.8.1",
                "Account-Id": 165,
                "Credit-Key": v("creditkey", f)
            }, o.headers), g = i(18).create();
            return g.defaults.adapter = i(21), g.defaults.timeout = 3e4, g.defaults.headers["Content-Type"] = "post" === l ? "application/json" : "application/x-www-form-urlencoded", g({
                method: l,
                url: e,
                data: t,
                params: u,
                headers: p
            }).then(e => ("ok" !== e.data.result && (e.data.errorText = c(e.data)), "shield reject" === e.data.result ? Promise.resolve({response: e}) : (e.data.result, e.data))).catch(e => (d.warning("error", e), Promise.resolve(Object.assign({}, e.response, {message: e.message}))))
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(3), r = i(17), s = o.default.getLogger("Thunder.ShouldLogin");
    t.default = function (e = !1, t = !1, i) {
        return n(this, void 0, void 0, function* () {
            let n, o = null;
            try {
                let l = yield a.client.callServerFunction("IsLogined"),
                    d = yield a.client.callServerFunction("GetUserID");
                l ? (s.information("is logined"), n = Promise.resolve(d)) : (n = new Promise((i, n) => {
                    let a = -1;
                    if (a = r.NativeCallModule.nativeCall.AttachNativeEvent("OnUserLogin", e => {
                        let t = Date.now();
                        s.information("On UserLogin", e, t, o), o && Math.floor(t - o) > 3e5 ? i("") : i(e), -1 !== a && (r.NativeCallModule.nativeCall.DetachNativeEvent("OnUserLogin", a), a = -1)
                    }), !e) {
                        let e = r.NativeCallModule.nativeCall.AttachNativeEvent("OnLoginWndClose", n => {
                            do {
                                if ("close" === n) {
                                    if (i(""), !t && -1 !== a) {
                                        r.NativeCallModule.nativeCall.DetachNativeEvent("OnUserLogin", a), a = -1;
                                        break
                                    }
                                } else if ("suc" === n && -1 !== a) break;
                                t && -1 !== a && (r.NativeCallModule.nativeCall.DetachNativeEvent("OnUserLogin", a), a = -1)
                            } while (0);
                            r.NativeCallModule.nativeCall.DetachNativeEvent("OnLoginWndClose", e)
                        })
                    }
                }), e || (o = Date.now(), a.client.callServerFunction("ShowLoginDlg", i).catch(e => {
                    s.warning(e)
                })))
            } catch (e) {
                s.warning(e), n = Promise.resolve("")
            }
            return n
        })
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(4), o = i(382), a = i(103), r = i(26).DownloadKernelCategoryManager.getCategoryManager();
    !function (e) {
        let t, i, s;

        function l(e) {
            let o = null, a = e.receiveSize, r = e.srcUsing;
            do {
                if (e.taskType === n.DownloadKernel.TaskType.P2sp) {
                    if (a > 0) {
                        o = t.Stared;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.StartPending) {
                        o = t.Starting;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.Started && 0 === a) {
                        o = t.Connect;
                        break
                    }
                } else if (e.taskType === n.DownloadKernel.TaskType.Bt) {
                    if (a > 0) {
                        o = i.Stared;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.StartPending) {
                        o = i.Analy;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.Started) {
                        o = r > 0 ? i.Connect : i.Search;
                        break
                    }
                } else if (e.taskType === n.DownloadKernel.TaskType.Emule) {
                    if (a > 0) {
                        o = s.Stared;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.StartPending) {
                        o = s.Starting;
                        break
                    }
                    if (e.taskStatus === n.DownloadKernel.TaskStatus.Started) {
                        o = r > 0 ? s.Connect : s.Search;
                        break
                    }
                }
            } while (0);
            return o
        }

        function d(e) {
            let t = "未知错误，无法继续下载";
            e > 704 && e <= 799 && (e = 701);
            let i = o.default.getMessage(o.ErrorType.Download, e);
            if (i) t = i; else switch (e) {
                case 1:
                    t = "任务创建失败，无法继续下载";
                    break;
                case 2:
                    t = "任务参数错误，无法继续下载";
                    break;
                case 3:
                    t = "链接失效，无法继续下载";
                    break;
                case 4:
                    t = "任务配置文件错误，无法继续下载";
                    break;
                case 5:
                    t = "任务连接超时，无法继续下载";
                    break;
                case 6:
                    t = "文件校验失败，无法继续下载";
                    break;
                case 7:
                    t = "疑似包含违规内容，无法下载";
                    break;
                case 8:
                    t = "下载引擎加速出错，无法继续下载";
                    break;
                case 9:
                    t = "文件路径超出系统限制，无法继续下载";
                    break;
                case 201:
                    t = "文件创建失败，无法继续下载";
                    break;
                case 202:
                    t = "文件写入失败，无法继续下载";
                    break;
                case 203:
                    t = "文件读取失败，无法继续下载";
                    break;
                case 204:
                    t = "文件重命名失败，无法继续下载";
                    break;
                case 205:
                    t = "磁盘空间不足，无法继续下载";
                    break;
                case 211:
                case 212:
                    t = "当前下载目录无法写入数据，请尝试下载到其它目录";
                    break;
                case 601:
                    t = "BT任务已存在，无法继续下载";
                    break;
                case 701:
                    t = "疑似包含违规内容，无法下载";
                    break;
                case 702:
                    t = "帐号存在异常，无法继续下载";
                    break;
                case 703:
                    t = "根据当地法律法规，文件无法下载";
                    break;
                case 704:
                    t = "应版权方要求，文件无法下载";
                    break;
                case 2e4:
                case 10001:
                    t = "下载引擎未启动，无法继续下载";
                    break;
                case 10002:
                    t = "种子文件不存在，无法继续下载"
            }
            return t
        }

        e.canStartSelectedTask = function (e, t) {
            let i = !1;
            if (e === n.DownloadKernel.CategroyViewID.Downloading) for (let e of t) {
                if (e.isMoving) {
                    i = !1;
                    break
                }
                let t = e.taskStatus;
                t !== n.DownloadKernel.TaskStatus.StandBy && t !== n.DownloadKernel.TaskStatus.Stopped && t !== n.DownloadKernel.TaskStatus.Failed && t !== n.DownloadKernel.TaskStatus.Unkown || (i = !0)
            }
            return i
        }, e.canMoveSelectedTask = function (e, t) {
            let i = !0;
            for (let e of t) if (e.isMoving) {
                i = !1;
                break
            }
            return i
        }, e.canStopSelectedTask = function (e, t) {
            let i = !1;
            if (e === n.DownloadKernel.CategroyViewID.Downloading) for (let e of t) {
                let t = e.taskStatus;
                if (t === n.DownloadKernel.TaskStatus.Started || t === n.DownloadKernel.TaskStatus.StartWaiting) {
                    i = !0;
                    break
                }
            }
            return i
        }, e.canDeleteSelectedTask = function (e, t) {
            let i = !1;
            if (t.length > 0) for (let e of t) {
                if (e.isMoving) {
                    i = !1;
                    break
                }
                let t = e.taskStatus;
                t === n.DownloadKernel.TaskStatus.StartPending || t === n.DownloadKernel.TaskStatus.StopPending || t === n.DownloadKernel.TaskStatus.DestroyPending || (i = !0)
            }
            return i
        }, e.canMarkAsOpened = function (e) {
            let t = !1;
            do {
                if (null === e || 0 === e.length) break;
                for (let i of e) if (0 === i.userRead) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }, e.canCopySelectTaskLink = function (e) {
            let t = !1;
            do {
                if (void 0 === e) break;
                if (0 === e.length) break;
                for (let i of e) if (i.taskType === n.DownloadKernel.TaskType.P2sp || i.taskType === n.DownloadKernel.TaskType.Emule || i.taskType === n.DownloadKernel.TaskType.Group) {
                    let e = i.categoryId;
                    if (-1 === e || r.isPrivateCategory(e)) {
                        t = !0;
                        break
                    }
                }
            } while (0);
            return t
        }, e.canAdd2CloudSelectedTask = function (e, t) {
            let i = !1;
            do {
                if (e === n.DownloadKernel.CategroyViewID.Recycle) break;
                for (let e of t) if (e.taskStatus !== n.DownloadKernel.TaskStatus.Failed) {
                    i = !0;
                    break
                }
            } while (0);
            return i
        }, e.canMergeSelectedTaskIntoGroup = function (e) {
            let t = !0;
            do {
                if (void 0 === e || null === e) {
                    t = !1;
                    break
                }
                if (e.length <= 1) {
                    t = !1;
                    break
                }
                for (let i of e) if (i.taskType === n.DownloadKernel.TaskType.Bt || i.taskType === n.DownloadKernel.TaskType.Group) {
                    t = !1;
                    break
                }
            } while (0);
            return t
        }, function (e) {
            e[e.Unkown = 0] = "Unkown", e[e.Starting = 1] = "Starting", e[e.Connect = 2] = "Connect", e[e.Stared = 3] = "Stared"
        }(t = e.P2spStartStatus || (e.P2spStartStatus = {})), function (e) {
            e[e.Unkown = 0] = "Unkown", e[e.Analy = 1] = "Analy", e[e.Search = 2] = "Search", e[e.Connect = 3] = "Connect", e[e.Stared = 4] = "Stared"
        }(i = e.BtStartStatus || (e.BtStartStatus = {})), function (e) {
            e[e.Unkown = 0] = "Unkown", e[e.Starting = 1] = "Starting", e[e.Search = 2] = "Search", e[e.Connect = 3] = "Connect", e[e.Stared = 4] = "Stared"
        }(s = e.EmuleStartStatus || (e.EmuleStartStatus = {})), e.getTaskStartStatus = l, e.getTaskStartStatusPrompt = function (e) {
            let o = void 0;
            do {
                if (null === e) break;
                if (e.taskStatus === n.DownloadKernel.TaskStatus.StartPending || e.taskStatus === n.DownloadKernel.TaskStatus.Started) {
                    if (e.taskType === n.DownloadKernel.TaskType.P2sp) {
                        let i = l(e);
                        if (null === i) break;
                        i === t.Connect && (o = "连接资源");
                        break
                    }
                    if (e.taskType === n.DownloadKernel.TaskType.Bt) {
                        let t = l(e);
                        if (null === t) break;
                        t === i.Analy ? o = "解析种子" : t === i.Search ? o = "寻找资源" : t === i.Connect && (o = "连接资源");
                        break
                    }
                    if (e.taskType === n.DownloadKernel.TaskType.Emule) {
                        let t = l(e);
                        if (null === t) break;
                        t === s.Search ? o = "寻找资源" : t === s.Connect && (o = "连接资源")
                    }
                }
            } while (0);
            return o
        }, e.getTaskStatusPrompt = function (e) {
            let t = void 0;
            do {
                if (null === e) break;
                let i = e.taskStatus;
                if (i === n.DownloadKernel.TaskStatus.Unkown) {
                    t = "未知错误";
                    break
                }
                if (i !== n.DownloadKernel.TaskStatus.Started) {
                    if (a.DownloadJammedNS.isStopPending(e.taskId)) {
                        t = "0B/s";
                        break
                    }
                } else if (a.DownloadJammedNS.isValidatingFileData(e.taskId)) {
                    t = "正在校验数据";
                    break
                }
                if (i === n.DownloadKernel.TaskStatus.StandBy) {
                    t = "准备开始";
                    break
                }
                if (i === n.DownloadKernel.TaskStatus.PreDownloading) {
                    t = "等待中";
                    break
                }
                if (i === n.DownloadKernel.TaskStatus.StartWaiting) {
                    t = "排队等待";
                    break
                }
                if (i === n.DownloadKernel.TaskStatus.StartPending) {
                    t = "正在开始";
                    break
                }
                if (i === n.DownloadKernel.TaskStatus.StopPending) {
                    t = "正在停止";
                    break
                }
                if (i === n.DownloadKernel.TaskStatus.Stopped) {
                    t = "暂停", e.isMoving && (t = "移动文件中");
                    break
                }
                if (i === n.DownloadKernel.TaskStatus.Failed) {
                    t = "任务出错", t = d(e.errorCode);
                    break
                }
                if (i === n.DownloadKernel.TaskStatus.Succeeded || i === n.DownloadKernel.TaskStatus.Seeding) {
                    t = "完成";
                    break
                }
            } while (0);
            return t
        }, e.getValueForSort = function (e) {
            let t = 0, i = e.taskStatus;
            if (i === n.DownloadKernel.TaskStatus.PreDownloading ? t = 11 : i === n.DownloadKernel.TaskStatus.Started ? t = 10 : i === n.DownloadKernel.TaskStatus.StartPending ? t = 9 : i === n.DownloadKernel.TaskStatus.StartWaiting ? t = 8 : i === n.DownloadKernel.TaskStatus.StopPending ? t = 7 : i === n.DownloadKernel.TaskStatus.DestroyPending ? t = 6 : i === n.DownloadKernel.TaskStatus.Unkown ? t = 5 : i === n.DownloadKernel.TaskStatus.StandBy ? t = 4 : i === n.DownloadKernel.TaskStatus.Stopped ? t = 3 : i === n.DownloadKernel.TaskStatus.Failed ? t = 2 : i === n.DownloadKernel.TaskStatus.Seeding ? t = 1 : i === n.DownloadKernel.TaskStatus.Succeeded && (t = 0), i === n.DownloadKernel.TaskStatus.Started) {
                let i = l(e);
                t = null === i || 4 === i ? t + .9 - 1 / (e.downloadSpeed + 1.2) : t + i / 10 - .4
            }
            return i === n.DownloadKernel.TaskStatus.StartPending && e.taskType === n.DownloadKernel.TaskType.Bt && (t += .1), t
        }, e.getTaskErrorInfoByCode = d
    }(t.TaskStatusHelper || (t.TaskStatusHelper = {}))
}, function (e, t, i) {
    e.exports = i(65)(12)
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(55), o = i(2);
    t.getDefaultPrex = function () {
        return o.basename(process.execPath, ".exe")
    }, t.getSockPath = function (e) {
        const t = n.tmpdir();
        let i = e;
        e || (i = o.basename(process.execPath, ".exe"));
        let a = o.join(t, `${i}-xunlei-node-net-ipc-{FD196984-2591-4588-AA6F-5C8AC1266290}.sock`);
        return "win32" === process.platform && (a = "\\\\.\\pipe\\" + (a = (a = a.replace(/^\//, "")).replace(/\//g, "-"))), a
    }, t.serverContextName = "xunlei-node-net-ipc-server-{46105371-DE78-4442-B59F-FDA1D6D7D430}", t.mainProcessContext = "main-process", t.mainRendererContext = "main-renderer", t.isObjectEmpty = function (e) {
        let t = !0;
        do {
            if (!e) break;
            if (0 === Object.keys(e).length) break;
            t = !1
        } while (0);
        return t
    }
}, function (e, t) {
    e.exports = require("https")
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(650), r = i(0), s = i(12), l = i(15), d = r.default.getLogger("quit-promises");
    t.quitPromises = new class {
        constructor() {
            this.promiseFuncArray = [], this.promiseBeforeFuncArray = [], this.promiseAfterFuncArray = [], this.promiseIpcCallbackArray = [], o.ipcRenderer.once("OnQueryEndSession", () => n(this, void 0, void 0, function* () {
                o.ipcRenderer.send("closeMainWindow", "exit"), a.HistoryDataNS.setExitType("normal"), yield this.runAllPromises()
            }));
            let e = {AddQuitPromise: this.addQuitPromise.bind(this)};
            l.server.registerFunctions(e)
        }

        addQuitPromise(e, t, i) {
            d.information("addQuitPromise context:", t), this.promiseIpcCallbackArray.push({context: t, callback: i})
        }

        add(e) {
            this.promiseFuncArray.push(e)
        }

        addBefore(e) {
            this.promiseBeforeFuncArray.push(e)
        }

        addAfter(e) {
            this.promiseAfterFuncArray.push(e)
        }

        runPromises(e) {
            return n(this, void 0, void 0, function* () {
                let t = [];
                for (let i of e) "function" == typeof i && t.push(i());
                return new Promise(e => {
                    Promise.all(t).then(() => {
                        d.information("runPromises finish."), e()
                    }).catch(t => {
                        d.warning("runPromises exception.", t), e()
                    })
                })
            })
        }

        runAllPromises() {
            return n(this, void 0, void 0, function* () {
                d.information("runPromises before"), yield this.runPromises(this.promiseBeforeFuncArray), d.information("runIpcPromises");
                let e = [];
                for (let t of this.promiseIpcCallbackArray) e.push(t.callback);
                yield this.runPromises(e), d.information("runPromises"), yield this.runPromises(this.promiseFuncArray), d.information("runPromises after"), yield this.runPromises(this.promiseAfterFuncArray)
            })
        }

        run() {
            return n(this, void 0, void 0, function* () {
                o.ipcRenderer.send("closeMainWindow", "exit"), a.HistoryDataNS.setExitType("normal"), yield this.runAllPromises(), d.information("app.quit before"), yield(yield s.asyncRemoteCall.getApp()).quit(), d.information("app.quit end")
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        function t(e) {
            const t = new Date(+e);
            return "Invalid Date" === t.toString() ? "" : `${t.getFullYear()}-${o(t.getMonth() + 1, 2)}-${o(t.getDate(), 2)} ${o(t.getHours(), 2)}:${o(t.getMinutes(), 2)}`
        }

        function i(e) {
            let t = new Date(+e);
            return "Invalid Date" === t.toString() ? "" : o(t.getHours(), 2) + ":" + o(t.getMinutes(), 2)
        }

        function n(e, t) {
            return ((e = new Date(e).setHours(0, 0, 0, 0)) - (t = new Date(t).setHours(0, 0, 0, 0))) / 1e3 / 60 / 60 / 24
        }

        function o(e, t) {
            let i = e.toString().length, n = e.toString();
            for (; i < t;) n = "0" + n, i++;
            return n
        }

        e.formatDate = function (e, t) {
            /(y+)/.test(t) && (t = t.replace(RegExp.$1, (e.getFullYear() + "").substr(4 - RegExp.$1.length)));
            let i = {
                "M+": e.getMonth() + 1,
                "d+": e.getDate(),
                "h+": e.getHours(),
                "m+": e.getMinutes(),
                "s+": e.getSeconds()
            };
            for (let e in i) {
                let n = i[e] + "";
                new RegExp(`(${e})`).test(t) && (t = t.replace(RegExp.$1, 1 === RegExp.$1.length ? n : ("00" + (n = n)).substr(n.length)))
            }
            var n;
            if (/(f+)/.test(t)) {
                let i = e.getMilliseconds() + "";
                t = t.replace(RegExp.$1, ("000" + i).substr(i.length))
            }
            return t
        }, e.getPubTime = function (e) {
            const a = new Date(+e), r = (new Date).getTime(), s = r - 1 * e, l = n(r, a.getTime());
            let d = "";
            if (s < 36e5) {
                let e = Math.floor(s / 6e4);
                d = e >= 1 ? e + "分钟前" : "刚刚"
            } else d = s < 864e5 ? Math.floor(s / 36e5) + "小时前" : 1 === l ? "昨天" + i(e) : 2 === l ? "前天" + i(e) : a.getFullYear() === (new Date).getFullYear() ? `${o(a.getMonth() + 1, 2)}-${o(a.getDate(), 2)} ${o(a.getHours(), 2)}:${o(a.getMinutes(), 2)}` : t(e);
            return d
        }, e.createTimeFormat = t, e.timeFormat = i, e.dateDiff = n, e.pad = o, e.formatSeconds = function (e) {
            let t = "";
            do {
                if (e <= 0) {
                    t = "00:00:00";
                    break
                }
                let i = Math.floor(e / 3600), n = Math.floor(e / 60) % 60, o = Math.floor(e % 60);
                t = i < 10 ? "0" + i + ":" : i + ":", t += n < 10 ? "0" + n + ":" : n + ":", t += o < 10 ? "0" + o : "" + o
            } while (0);
            return t
        }, e.formatSecondsCustom = function (e) {
            let t = "";
            do {
                if (e <= 0) {
                    t = "00:00:00";
                    break
                }
                let i = Math.floor(e / 3600), n = Math.floor(e / 60) % 60, o = Math.floor(e % 60);
                if (i <= 99) t = i < 10 ? "0" + i + ":" : i + ":", t += n < 10 ? "0" + n + ":" : n + ":", t += o < 10 ? "0" + o : "" + o; else {
                    let i = Math.floor(e / 86400);
                    t = `剩${i = i > 999 ? 999 : i}天`
                }
            } while (0);
            return t
        }, e.convertTimeToMinutes = function (e, t, i) {
            return 3600 * e + 60 * t + i
        }, e.convertMinuteToTime = function (e) {
            return [Math.floor(e / 3600), Math.floor(e / 60 % 60), Math.floor(e % 60)]
        }
    }(t.TimeHelperNS || (t.TimeHelperNS = {}))
}, function (e, t) {
    e.exports = vendor_0aff229d1d3a2d2be355
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(50), a = i(18), r = i(2), s = i(8), l = i(0).default.getLogger("Axios.Helper");
    !function (e) {
        e.getFileSizeWithUrlAW = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = 0;
                do {
                    let i = o.parse(e);
                    if ("https:" !== i.protocol && "http:" !== i.protocol) break;
                    let n = null;
                    try {
                        n = yield a.default.get(e, {responseType: "arraybuffer"})
                    } catch (e) {
                        l.warning(e)
                    }
                    if (null !== n && void 0 !== n.status && 200 === n.status) {
                        let e = n.headers["content-length"];
                        void 0 !== e && (t = parseInt(e, 10))
                    }
                } while (0);
                return t
            })
        }, e.downloadFileAW = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = !1, o = 0;
                for (; ;) {
                    let d = null;
                    o += 1;
                    try {
                        d = yield a.default.get(e, {responseType: "arraybuffer", headers: i})
                    } catch (e) {
                        l.information(e);
                        break
                    }
                    if (null !== d && void 0 !== d.status && 200 === d.status && void 0 !== d.data && null !== d.data && "" !== d.data) {
                        let e = r.dirname(t), i = yield s.FileSystemAWNS.mkdirsAW(e);
                        if (i && (i = yield s.FileSystemAWNS.writeFileAW(t, d.data))) {
                            n = !0;
                            break
                        }
                        if (o > 3) break
                    }
                }
                return n
            })
        }
    }(t.AxiosNS || (t.AxiosNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), a = i(33), r = i(11), s = i(32), l = i(8), d = r.DownloadKernelTaskManager.getTaskManager();
    !function (e) {
        e.batchFindTaskAW = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = [];
                for (let i = 0; i < e.length; ++i) {
                    let n = e[i], a = null;
                    n.taskType === o.DownloadKernel.TaskType.P2sp ? a = {
                        keyType: o.DownloadKernel.KeyType.P2spUrl,
                        keyValue: n.value,
                        keyFilter: o.DownloadKernel.KeyFilter.All
                    } : n.taskType === o.DownloadKernel.TaskType.Emule ? a = {
                        keyType: o.DownloadKernel.KeyType.EmuleFileHash,
                        keyValue: n.value,
                        keyFilter: o.DownloadKernel.KeyFilter.All
                    } : n.taskType === o.DownloadKernel.TaskType.Bt ? a = {
                        keyType: o.DownloadKernel.KeyType.BtInfoId,
                        keyValue: n.value,
                        keyFilter: o.DownloadKernel.KeyFilter.All
                    } : n.taskType === o.DownloadKernel.TaskType.Magnet && (a = {
                        keyType: o.DownloadKernel.KeyType.MagnetUrl,
                        keyValue: n.value,
                        keyFilter: o.DownloadKernel.KeyFilter.All
                    }), a && t.push(a)
                }
                return d.batchFindTaskAsync(t)
            })
        }, e.importUnfinishedTaskAW = function (e, t) {
            return n(this, void 0, void 0, function* () {
                return new Promise(i => {
                    a.DownloadKernelManager.importUnfinishedTask(e, t, (e, t, n) => {
                        i({ret: e, url: t, torrentPath: n})
                    })
                })
            })
        }, e.parserBtFileInfoAW = function (e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => n(this, void 0, void 0, function* () {
                    (yield l.FileSystemAWNS.existsAW(e)) ? s.ThunderKernel.parserBtFileInfo(e, (e, i) => {
                        t(0 === e && i ? i : null)
                    }) : t(null)
                }))
            })
        }
    }(t.TaskUtilitiesAWNS || (t.TaskUtilitiesAWNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(0), a = i(4), r = i(37), s = i(31), l = i(7), d = o.default.getLogger("ThunderNewTask"),
        u = l.default(n.join(__rootDir, "../bin/ThunderHelper.node")),
        c = ".asf;.avi;.exe;.iso;.mp3;.mpeg;.mpg;.mpga;.ra;.rar;.rm;.rmvb;.tar;.wma;.wmp;.wmv;\n  .mov;.zip;.3gp;.chm;.mdf;.torrent;.jar;.msi;.arj;.bin;.dll;.psd;.hqx;.sit;.lzh;.gz;.tgz;.xlsx;.xls;.doc;.docx;.ppt;\n  .pptx;.flv;.swf;.mkv;.tp;.ts;.flac;.ape;.wav;.aac;.txt;.dat;.7z;.ttf;.bat;.xv;.xvx;.pdf;.mp4;.apk;.ipa;.epub;.mobi;\n  .deb;.sisx;.cab;.pxl;.dmg;.msu;",
        h = ".a;.a3m;.a3w;.a4m;.a4p;.a4w;.a5w;.aam;.aas;.abf;.abk;.abs;.ace;.acm;.acp;.act;.ad;\n  .ada;.adb;.adf;.adi;.adm;.adp;.adr;.ads;.af2;.af3;.afm;.ai;.aif;.aifc;.aiff;.aim;.ais;.akw;.alb;.all;.ams;.anc;.ani;\n  .ans;.ant;.api;.aps;.ari;.arj;.art;.asa;.asc;.asd;.ase;.asf;.asm;.aso;.asp;.asv;.asx;.atw;.au;.avb;.avi;.avr;.avs;\n  .awd;.awr;.axx;.bak;.bas;.bat;.bdf;.bgl;.bi;.bif;.biff;.bin;.bk;.bk$;.bks;.bmk;.bmp;.book;.brx;.bsp;.btm;.bud;.bun;\n  .bw;.bwv;.c;.cab;.cad;.cal;.cap;.cas;.cb;.cc;.ccb;.cch;.cco;.cct;.cda;.cdf;.cdi;.cdm;.cdr;.cdt;.cdx;.cfg;.cgi;.cgm;\n  .chk;.chm;.chr;.cif;.cil;.class;.cll;.clp;.cls;.cmf;.cmv;.cmx;.cnf;.cnm;.cnt;.cod;.com;.cpl;.cpo;.cpp;.cpr;.cpt;.cpx;\n  .crd;.crp;.crt;.csc;.csp;.cst;.csv;.ctl;.cur;.cv;.cxx;.dat;.db;.dbc;.dbf;.dbx;.dcm;.dcs;.dct;.dcu;.dcx;.dem;.der;.dewf;\n  .dib;.dic;.dif;.dig;.dir;.diz;.dlg;.dll;.dls;.dmd;.dmf;.doc;.dot;.draw;.drv;.drw;.dsf;.dsg;.dsm;.dsp;.dsq;.dsw;.dtd;\n  .dun;.dv;.dxf;.dxr;.eda;.edd;.emd;.emf;.eml;.ephtml;.eps;.exe;.fav;.fax;.fcd;.fdf;.ffa;.ffk;.ffl;.ffo;.fif;.fla;.flc;\n  .fm;.fml;.fng;.fnk;.fon;.fot;.frt;.frx;.ftg;.fts;.gal;.gdb;.gdm;.gem;.gen;.getright;.gfi;.gfx;.gho;.gif;.gim;.gix;.gkh;\n  .gks;.gl;.gna;.gnt;.gnx;.gra;.grf;.grp;.hcom;.hgl;.hlp;.hpj;.hpp;.hst;.ht;.htm;.html;.htt;.htx;.icb;.icc;.icl;.icm;.ico;\n  .idd;.idf;.idq;.idx;.iff;.iges;.igf;.ilbm;.ima;.inf;.ini;.inrs;.ins;.int;.iqy;.iso;.ist;.isu;.iwc;.j62;.jar;.java;.jbf;\n  .jff;.jfif;.jif;.jmp;.jpe;.jpeg;.jpg;.js;.jsp;.jtf;.k25;.kar;.kdc;.key;.kfx;.kiz;.kkw;.kmp;.kqp;.lab;.lbm;.lbt;.lbx;.ldb;\n  .ldl;.leg;.lft;.lgo;.lha;.lib;.lin;.lis;.llx;.lnk;.log;.lst;.lu;.lyr;.lzh;.lzs;.m1v;.m3u;.mad;.maf;.mam;.map;.maq;.mar;.mat;\n  .mb1;.mbx;.mcr;.mdb;.mde;.mdl;.mdn;.mdw;.mdz;.mic;.mid;.mim;.mime;.mli;.mme;.mng;.mnu;.mod;.mov;.mp2;.mp3;.mpa;.mpe;.mpeg;\n  .mpg;.mpp;.mpr;.msg;.msi;.msn;.msp;.mst;.mtm;.nan;.nap;.ncb;.ncd;.ncf;.nff;.nft;.nil;.nist;.nls;.nlu;.ntx;.nwc;.nws;.obj;\n  .ocx;.ods;.ofn;.oft;.olb;.ole;.oogl;.opo;.p65;.pab;.part;.pas;.pbd;.pbl;.pbm;.pbr;.pcd;.pcl;.pcm;.pdd;.pdf;.pfm;.pgl;.pgm;\n  .ph;.php;.php3;.phtml;.pic;.pjt;.pjx;.pkg;.pli;.png;.pot;.ppa;.ppf;.ppm;.pps;.ppt;.prf;.prg;.prj;.prn;.prt;.psd;.psp;.pst;\n  .pwz;.qic;.qif;.qlb;.qry;.qtp;.qtx;.qw;.ra;.ram;.rar;.rdf;.reg;.rep;.res;.rft;.rgb;.rm;.rmd;.rpt;.rtf;.rul;.rvp;.s;.sav;.sbl;\n  .scc;.scf;.scp;.scr;.sct;.scx;.sdt;.sdv;.sdx;.sep;.sfd;.sfi;.sfr;.sfx;.sgi;.sgml;.shg;.shtml;.shw;.sig;.ska;.skl;.sl;.spl;\n  .sqc;.sqr;.str;.swa;.swf;.sys;.syw;.taz;.tga;.theme;.thn;.tif;.tiff;.tig;.tlb;.tmp;.tol;.tpl;.trm;.trn;.ttf;.txt;.txw;.udf;\n  .ult;.url;.use;.uwf;.vbp;.vbp;.vbw;.vbw;.vbx;.vbx;.vct;.vcx;.vda;.vda;.vir;.vir;.viv;.vqf;.vsd;.vsd;.vsl;.vsl;.vss;.vss;.vst;\n  .vst;.vsw;.vsw;.vxd;.vxd;.w3l;.wab;.wad;.wav;.wbk;.wcm;.wdb;.wfm;.wfn;.wil;.wiz;.wll;.wmf;.wow;.wp;.wpd;.wpf;.wpg;.wps;.wpt;.wr1;\n  .wrk;.wrl;.wrz;.x;.x16;.x32;.xar;.xbm;.xi;.xla;.xlb;.xlc;.xld;.xlk;.xll;.xlm;.xls;.xlt;.xlv;.xlw;.xnk;.xpm;.xwd;.xwf;.yal;.z;.zap;.zip;";
    !function (e) {
        function t(e) {
            let t = !1;
            do {
                if (void 0 === e || null === e) break;
                if ("" === e || "." === e) break;
                if (c.indexOf(e) > -1) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }

        function i(e) {
            let t = !1;
            do {
                if (void 0 === e || null === e) break;
                if ("" === e) break;
                if (e.match(/[\/\\"<>\?\*|]/)) break;
                t = !0
            } while (0);
            return t
        }

        function o(e) {
            let i = !1;
            do {
                if (void 0 === e || null === e) break;
                if ("" === e || "." === e) break;
                let n = r.TaskUtilHelper.getTaskFileType(void 0, e);
                if (n === r.TaskUtilHelper.FileExtType.Video || n === r.TaskUtilHelper.FileExtType.Music || n === r.TaskUtilHelper.FileExtType.Pic) {
                    i = !0;
                    break
                }
                i = t(e)
            } while (0);
            return i
        }

        function l(e) {
            let t = !1, a = n.parse(e);
            return t = i(a.name) && o(a.ext)
        }

        function f(e) {
            let t = {};
            do {
                if (void 0 === e || null === e) break;
                d.information("parseDynamicUrlArgs");
                let i = /([^&=?]+)=([^&]*)/g;
                for (; i.exec(e);) t[RegExp.$1] = RegExp.$2;
                d.information("parseDynamicUrlArgs ret ", t)
            } while (0);
            return t
        }

        function p(e) {
            let t = {pageFileName: void 0, args: void 0};
            do {
                if (void 0 === e || null === e) break;
                d.information("parseDynamicUrlPath"), e.match(/[\/]?([^?]*)\?([^\s]*)/) ? (t.pageFileName = RegExp.$1, t.args = RegExp.$2) : (t.pageFileName = e, t.args = ""), d.information("parseDynamicUrlPath ret", t)
            } while (0);
            return t
        }

        function g(e) {
            let t = "";
            do {
                if (void 0 === e || null === e) break;
                let i = p(e);
                if (void 0 !== i.args) {
                    let e = f(i.args);
                    for (let i in e) {
                        let n = e[i];
                        if (l(n)) {
                            t = n;
                            break
                        }
                    }
                }
                void 0 !== i.pageFileName && l(i.pageFileName) && (t = i.pageFileName)
            } while (0);
            return t
        }

        function m(e) {
            let t = [];
            do {
                if (void 0 === e || null === e) break;
                let i = g(e);
                if ("" !== i && !t.includes(i)) {
                    let e = v(i);
                    t.push(e)
                }
                let n = v(e);
                t.includes(n) || t.push(n)
            } while (0);
            return t
        }

        function v(e) {
            return u.parseFileNameFromP2spUrlPath(e)
        }

        function y(e) {
            return u.isThunderPrivateUrl(e)
        }

        function T(e) {
            return u.parseEd2kUrl(e)
        }

        function w(e) {
            return u.parseUrl(e)
        }

        e.isDownloadFileExtName = t, e.isIllegalFileName = i, e.isGoodFileExtName = o, e.isUsualFileExtName = function (e) {
            let t = !1;
            do {
                if (void 0 === e || null === e) break;
                if ("" === e || "." === e) break;
                if (o(e)) {
                    t = !0;
                    break
                }
                if (h.indexOf(e) > -1) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }, e.isGoodFileName = l, e.parseDynamicUrlArgs = f, e.parseDynamicUrlPath = p, e.parseFileNameFromDynamicUrlPath = g, e.getFileNameListFromUrlPath = m, e.getNameFromUrl = function (e) {
            let t = "index.html", i = s.ThunderHelper.getTaskTypeFromUrl(e);
            if (i === a.DownloadKernel.TaskType.P2sp) {
                let i = w(e);
                if (i) {
                    let e = m(i.fullPath);
                    e.length > 0 && (t = e[0])
                } else {
                    let i = /:\/\/.*?\[.+?\].*(\/.+)/.exec(e);
                    if (i && i[1]) {
                        let e = m(i[1]);
                        e.length > 0 && (t = e[0])
                    }
                }
            } else i === a.DownloadKernel.TaskType.Emule && (t = T(e).fileName);
            return t.replace(/[*?/\\:|<>\"]/g, "_")
        }, e.parseFileNameFromP2spUrlPath = v, e.isThunderPrivateUrl = y, e.parseThunderPrivateUrl = function (e) {
            let t = {url: e, codePage: -1};
            return y(e) && (t = u.parseThunderPrivateUrl(e)), t
        }, e.parseEd2kUrl = T, e.parseUrl = w, e.parseMagnetUrl = function (e) {
            return u.parseMagnetUrl(e)
        }, e.makeUrl = function (e) {
            return u.makeUrl(e)
        }
    }(t.ParseUrlFileNameNS || (t.ParseUrlFileNameNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e[e.Invalid = -100] = "Invalid", e[e.PreOpen = -10] = "PreOpen", e[e.QueryExt = -9] = "QueryExt", e[e.DownloadTorrent = -3] = "DownloadTorrent", e[e.ParserTorrent = -2] = "ParserTorrent", e[e.GetPlayUrl = -1] = "GetPlayUrl", e[e.Ready = 0] = "Ready", e[e.Opening = 1] = "Opening", e[e.Pausing = 2] = "Pausing", e[e.Paused = 3] = "Paused", e[e.Playing = 4] = "Playing", e[e.Play = 5] = "Play", e[e.Closeing = 6] = "Closeing", e[e.Completed = 7] = "Completed", e[e.Stopped = 8] = "Stopped", e[e.Error = 9] = "Error"
    }(t.XmpMediaState || (t.XmpMediaState = {})), function (e) {
        e[e.NumberStart = 0] = "NumberStart", e[e.MediaId = 1] = "MediaId", e[e.OwnerMediaId = 2] = "OwnerMediaId", e[e.CreateTime = 3] = "CreateTime", e[e.PlayTime = 4] = "PlayTime", e[e.LastPlayTime = 5] = "LastPlayTime", e[e.Duration = 6] = "Duration", e[e.Height = 7] = "Height", e[e.Width = 8] = "Width", e[e.PreState = 9] = "PreState", e[e.State = 10] = "State", e[e.Position = 11] = "Position", e[e.LastStartPos = 12] = "LastStartPos", e[e.PlaySpeed = 13] = "PlaySpeed", e[e.SubtitleShow = 14] = "SubtitleShow", e[e.SubtitleLanguage = 15] = "SubtitleLanguage", e[e.SubtitleType = 16] = "SubtitleType", e[e.SubtitlePosition = 17] = "SubtitlePosition", e[e.SubtitleTimming = 18] = "SubtitleTimming", e[e.Subtitle3D = 19] = "Subtitle3D", e[e.Subtitle2Show = 20] = "Subtitle2Show", e[e.Subtitle2Language = 21] = "Subtitle2Language", e[e.Subtitle2Type = 22] = "Subtitle2Type", e[e.Subtitle2Position = 23] = "Subtitle2Position", e[e.Subtitle2Timming = 24] = "Subtitle2Timming", e[e.Subtitle23D = 25] = "Subtitle23D", e[e.FileSize = 26] = "FileSize", e[e.Category = 27] = "Category", e[e.Type = 28] = "Type", e[e.MediaIndex = 29] = "MediaIndex", e[e.TaskId = 30] = "TaskId", e[e.TaskStop = 31] = "TaskStop", e[e.AudioTrack = 32] = "AudioTrack", e[e.ThunderTaskId = 33] = "ThunderTaskId", e[e.ThunderTaskSubId = 34] = "ThunderTaskSubId", e[e.PlayPercent = 35] = "PlayPercent", e[e.OpenFrom = 36] = "OpenFrom", e[e.DLNA = 37] = "DLNA", e[e.transcode = 38] = "transcode", e[e.NumberEnd = 39] = "NumberEnd", e[e.StringStart = 4096] = "StringStart", e[e.Name = 4097] = "Name", e[e.Url = 4098] = "Url", e[e.PlayUrl = 4099] = "PlayUrl", e[e.Cid = 4100] = "Cid", e[e.Gcid = 4101] = "Gcid", e[e.Subtitle = 4102] = "Subtitle", e[e.Subtitle2 = 4103] = "Subtitle2", e[e.Ext = 4104] = "Ext", e[e.Played = 4105] = "Played", e[e.AudioChannel = 4106] = "AudioChannel", e[e.OutputMode = 4107] = "OutputMode", e[e.Brightness = 4108] = "Brightness", e[e.ContrastRatio = 4109] = "ContrastRatio", e[e.Saturation = 4110] = "Saturation", e[e.SubtitleSize = 4111] = "SubtitleSize", e[e.SubtitleColor = 4112] = "SubtitleColor", e[e.SubtitleFont = 4113] = "SubtitleFont", e[e.Subtitle2Size = 4114] = "Subtitle2Size", e[e.Subtitle2Color = 4115] = "Subtitle2Color", e[e.Subtitle2Font = 4116] = "Subtitle2Font", e[e.Proportion = 4117] = "Proportion", e[e.AudioTime = 4118] = "AudioTime", e[e.Rorate = 4119] = "Rorate", e[e.FlipH = 4120] = "FlipH", e[e.FlipV = 4121] = "FlipV", e[e.LocalAudioTrack = 4122] = "LocalAudioTrack", e[e.ImgSrc = 4123] = "ImgSrc", e[e.PanFileId = 4124] = "PanFileId", e[e.RationText = 4125] = "RationText", e[e.RationTextEx = 4126] = "RationTextEx", e[e.vipLevel = 4127] = "vipLevel", e[e.PlayFrom = 4128] = "PlayFrom", e[e.Resolution = 4129] = "Resolution", e[e.TransGcid = 4130] = "TransGcid", e[e.PlayType = 4131] = "PlayType", e[e.ShowBackIcon = 4132] = "ShowBackIcon", e[e.ResolutionMedias = 4133] = "ResolutionMedias", e[e.TaskUrl = 4134] = "TaskUrl", e[e.IsYunRecvTask = 4135] = "IsYunRecvTask", e[e.MimeType = 4136] = "MimeType", e[e.StringEnd = 4137] = "StringEnd", e[e.IsZipPlay = 8192] = "IsZipPlay"
    }(t.XmpMediaAttr || (t.XmpMediaAttr = {})), function (e) {
        e.unKnow = "UnKnow", e.localFile = "LocalFile", e.downloadAndPlay = "DownloadAndPlay", e.yunBo = "YunBo"
    }(t.XmpPlayType || (t.XmpPlayType = {})), function (e) {
        e.init = "XmpPlayerInit", e.showAPlayerWindow = "XmpShowAPlayerWindow", e.createXmpMedia = "XmpPlayerCreateXmpMedia", e.open = "XmpPlayerOpen", e.openFile = "XmpPlayerOpenFile", e.addFile = "XmpPlayerAddFile", e.openFolder = "XmpPlayerOpenFolder", e.openBt = "XmpPlayerOpenBt", e.openUrl = "XmpPlayerOpenUrl", e.openMedia = "XmpPlayerOpenMedia", e.close = "XmpPlayerClose", e.stop = "XmpPlayerStop", e.play = "XmpPlayerPlay", e.pause = "XmpPlayerPause", e.getVersion = "XmpPlayerGetVersion", e.getState = "XmpPlayerGetState", e.isPlaying = "XmpPlayerIsPlaying", e.getDuration = "XmpPlayerGetDuration", e.getPosition = "XmpPlayerGetPosition", e.setPosition = "XmpPlayerSetPosition", e.getVideoWidth = "XmpPlayerGetVideoWidth", e.getVideoHeight = "XmpPlayerGetVideoHeight", e.getVolume = "XmpPlayerGetVolume", e.setVolume = "XmpPlayerSetVolume", e.isSeeking = "XmpPlayerIsSeeking", e.getBufferProgress = "XmpPlayerGetBufferProgress", e.getConfig = "XmpPlayerGetConfig", e.setConfig = "XmpPlayerSetConfig", e.setCurrentMedia = "XmpPlayerSetCurrentMedia", e.getCurrentMedia = "XmpPlayerGetCurrentMedia", e.getLastMediaId = "XmpPlayerGetLastMediaId", e.getMediaAttribute = "XmpPlayerMediaAttribute", e.getCurrentMediaAttribute = "XmpPlayerGetCurrentMediaAttribute", e.clearCurrentMedia = "XmpPlayerClearCurrentMedia", e.openPreMedia = "XmpPlayerOpenPreMedia", e.openNextMedia = "XmpPlayerOpenNextMedia", e.isPlayOrderFirstMedia = "XmpPlayerIsPlayOrderFirstMedia", e.isPlayOrderLastMedia = "XmpPlayerIsPlayOrderLastMedia", e.isFirstMedia = "XmpPlayerIsFirstMedia", e.isLastMedia = "XmpPlayerIsLastMedia", e.isMediasLoadFinished = "XmpPlayerIsMediasLoadFinished", e.getMediasInfo = "XmpPlayerGetMediasInfo", e.removeMedia = "XmpPlayerRemoveMedia", e.removeAllMedia = "XmpPlayerRemoveAllMedia", e.setASpectRatioAtive = "XmpPlayerSetASpectRatioAtive", e.setPlayForward = "XmpPlayerSetPlayForward", e.postionChange = "XmpPlayerPostionChange", e.getBufferRange = "XmpPlayerGetBufferRange", e.fireKeyDown = "XmpPlayerFireKeyDown", e.fireKeyUp = "XmpPlayerFireKeyUp", e.setAudioTime = "XmpPlayerSetAudioTime", e.setProportion = "XmpPlayerSetProportion", e.setVlomue = "XmpPlayerSetVlomue", e.getCurView = "XmpPlayerGetCurView", e.recordStat = "XmpPlayerRecordStat", e.getHostWnd = "XmpPlayerGetHostWnd", e.startWindowZorderChecker = "StartWindowZorderChecker", e.stopWindowZorderChecker = "StopWindowZorderChecker", e.setZOrderCheckerWindowHandle = "SetZOrderCheckerWindowHandle", e.removeZOrderCheckerWindowHandle = "RemoveZOrderCheckerWindowHandle", e.getVideoDuration = "GetVideoDuration", e.getDownloadState = "GetDownloadState", e.getResConfig = "GetResConfig", e.queryTaskState = "QueryTaskState", e.shareMediaInfo = "ShareMediaInfo", e.getThunderDirState = "GetThunderDirState", e.setThunderDirState = "SetThunderDirState", e.showSyncDig = "ShowSyncDig", e.isXmpLite = "IsXmpLite", e.handleVipPlaySpeed = "handleVipPlaySpeed", e.getMediaInfo = "GetMediaInfo", e.getCurrentMediaInfo = "GetCurrentMediaInfo", e.setMediaAttribute = "XmpPlayerSetMediaAttribute", e.updateDownloadEmbedRect = "UpdateDownloadEmbedRect", e.updatePanEmbedRect = "UpdatePanEmbedRect", e.createIndependentWindow = "CreateIndependentWindow", e.thunderResize = "ThunderResize", e.updateScrollShowOrHide = "UpdateScrollShowOrHide", e.updateFloatWindow = "IpdateFloatWindow", e.updateAplayerHwnd = "UpdateAplayerHwnd", e.updatePlaySource = "UpdatePlaySource", e.setXmpCurrentMode = "SetXmpCurrentMode", e.getXmpCurrentMode = "GetXmpCurrentMode", e.isSwitchXmpMode = "IsSwitchXmpMode", e.destroy = "XmpDestroy", e.maximize = "XmpMaximize", e.unmaximize = "XmpUnmaximize", e.minmized = "XmpMinmized", e.setPlaySpeed = "SetPlaySpeed", e.getPlaySpeed = "GetPlaySpeed", e.setWindowTopMode = "SetWindowTopMode", e.calcelWindowTopMode = "CalcelWindowTopMode", e.enterFullScreen = "EnterFullScreen", e.leaveFullScreen = "LeaveFullScreen", e.setFullcScreen = "SetFullcScreen", e.getIsFullScreen = "GetIsFullScreen", e.getIsFullScreenEx = "GetIsFullScreenEx", e.setPlayingTaskId = "SetPlayingTaskId", e.setlayPingPanFileId = "SetPlayingPanFileId", e.setSelectTaskId = "SetSelectTaskId", e.setSelectPanel = "SetSelectPanel",e.setSelectTab = "SetSelectTab",e.setSelectPanFileId = "SetSelectPanFileId",e.getPlayingTaskId = "GetPlayingTaskId",e.getPlayingPanFileId = "GetPlayingPanFileId",e.getSelectTaskId = "GetSelectTaskId",e.getSelectPanel = "GetSelectPanel",e.getSelectTab = "GetSelectTab",e.getSelectPanFileId = "GetSelectPanFileId",e.getXmpPlayType = "GetXmpPlayType",e.getDownloadAndPlayTaskData = "GetDownloadAndPlayTaskData",e.openDLNA = "OpenDLNA",e.disConnectDLNA = "DisConnectDLNA",e.getCurrentDLNADeviceName = "GetCurrentDLNADeviceName",e.addXmpVideoTipPos = "AddXmpVideoTipPos",e.removeXmpVideoTipPos = "RemoveXmpVideoTipPos",e.addXmpVideoTipPosMainRenderer = "AddXmpVideoTipPosRenderer",e.removeXmpVideoTipPosMainRenderer = "RemoveXmpVideoTipPosRenderer",e.switchSilent = "XmpSwitchSilent",e.isSilent = "XmpIsSilent",e.cancelDownloadCodecs = "OnCancelDownloadCodecs",e.getCachedDownloadCodecInfo = "OnGetCachedDownloadCodecInfo",e.onTaskStopped = "OnTaskStopped",e.showOrHideXmpWindow = "OnShowOrHideXmpWindow",e.getPlayingSoure = "OnGetPlayingSoure",e.userLogout = "OnUserLogout",e.isCurrentBuffingIsByDrag = "IsCurrentBuffingIsByDrag",e.thunderQuit = "ThunderQuit",e.getLastPlayError = "GetLastPlayError",e.showAplayerAndFloatWindow = "ShowAplayerAndFloatWindow",e.hideAplayerAndFloatWindow = "HideAplayerAndFloatWindow",e.hideEmbedAplayerAndFloatWindow = "HideEmbedAplayerAndFloatWindow",e.isPlayMusic = "IsPlayMusic",e.getMediaById = "GetMediaById",e.setPlayEndInfo = "SetPlayEndInfo",e.getPlayId = "GetPlayId",e.getPlayTick = "GetPlayTick",e.setAudioTrack = "SetAudioTrack"
    }(t.XmpPlayerFunction || (t.XmpPlayerFunction = {})), function (e) {
        e.doGetFileList = "ZipDoGetFileList", e.doDelFileList = "ZipDoDelFileList", e.abortGetFileList = "ZipAbortGetFileList", e.openFile = "ZipOpenFile", e.openPassWord = "ZipOpenPassWord", e.openIndex = "ZipOpenIndex", e.makeIndexFile = "ZipMakeIndexFile", e.abortMakeIndexFile = "ZipAbortMakeIndexFile", e.needWaitIndexFile = "ZipNeedWaitIndexFile", e.isIndexError = "ZipIsIndexError", e.isPasswordError = "ZipIsPasswordError", e.isFilePlaying = "ZipIsFilePlaying"
    }(t.ZipFunction || (t.ZipFunction = {})), function (e) {
        e.listCompleted = "OnZipListCompleted", e.listCompletedError = "OnZipListCompletedError", e.indexCompleted = "OnZipIndexCompleted", e.passWordError = "OnZipPassWordError", e.indexProgress = "OnZipIndexProgress", e.indexError = "OnZipIndexError", e.indexProgressBegin = "OnZipIndexProgressBegin"
    }(t.ZipEvent || (t.ZipEvent = {})), function (e) {
        e.onWindowMessage = "OnWindowMessage", e.onStateChanged = "OnStateChanged", e.onCreateMediaError = "OnCreateMediaError", e.onOpenSucceeded = "OnOpenSucceeded", e.onVideoSizeChanged = "OnVideoSizeChanged", e.onAPlayerCreated = "OnAPlayerCreated", e.onAllStoped = "OnAllStoped", e.onSeekCompleted = "OnSeekCompleted", e.onBuffer = "OnBuffer", e.onDownloadCodec = "OnDownloadCodec", e.onDownloadCodecProgress = "OnDownloadCodecProgress", e.onDropFiles = "OnDropFiles", e.onEvent = "OnEvent", e.onGetPlayUrl = "OnGetPlayUrl", e.onOpenFailed = "OnOpenFailed", e.onPlayFailed = "OnPlayFailed", e.onClearError = "OnClearError", e.onError = "OnError", e.onPlaying = "OnPlaying", e.onPreOpen = "OnPreOpen", e.onPaused = "OnPaused", e.onPlayCompleted = "OnPlayCompleted", e.onPreStop = "OnPreStop", e.onStop = "OnStop", e.onForceLoadingState = "OnForceLoadingState", e.onVipStruckPlayState = "OnVipStruckPlayState", e.onTimeDesChange = "OnTimeDesChange", e.onPositionChanged = "OnPositionChanged", e.onSnapShotCreated = "OnSnapShotCreated", e.onXmpPlayerEvent = "OnXmpPlayerEvent", e.onXmpAplayerCrash = "OnXmpAplayerCrash", e.onUpdateMediaCid = "OnUpdateMediaCid", e.onUpdateMediaGcid = "OnUpdateMediaGcid", e.onSpeedChange = "OnSpeedChange", e.onFullScreenStateChange = "OnFullScreenStateChange", e.onSetConfig = "OnSetConfig", e.onVolumeChange = "OnVolumeChange", e.onPlayStateChange = "OnPlayStateChange", e.onCurViewChanged = "OnCurViewChanged", e.onUserLogin = "OnUserLogin", e.onDwmCompositionChanged = "OnDwmCompositionChanged", e.onDpiChanged = "OnDpiChanged", e.onGPUProcessCrashed = "OnGPUProcessCrashed", e.onSetCurrentDevice = "OnSetCurrentDevice", e.onXmpPlayerRemoveMedias = "OnXmpPlayerRemoveMedias", e.onOpenMediaNotExist = "OnOpenMediaNotExist", e.onSwitchModeError = "OnSwitchModeError", e.onDlnaEvent = "OnDlnaEvent", e.onSubtitleInit = "OnSubtitleInit", e.onSubtitleUnInit = "onSubtitleUnInit", e.onEmbedSubInitFinish = "OnEmbedSubInitFinish", e.onEntertCurrentDevice = "OnEntertCurrentDevice", e.onWindowZOrderChanged = "OnWindowZOrderChanged", e.onAplayerSeekFrameChanged = "OnAplayerSeekFrameChanged", e.onModeBarChange = "OnModeBarChange", e.onThunderTaskRemove = "OnThunderTaskRemove", e.onXmpClose = "OnXmpClose", e.onXmpStartFailed = "OnXmpStartFailed", e.onVipViewInitFinish = "OnVipViewInitFinish", e.onModeEvent = "OnModeEvent", e.onMaxmized = "OnMaxmized", e.onUnMaxmized = "OnUnMaxmized", e.onSetWindowTopMost = "OnWindowTopMost", e.onCancelWindowTopMost = "OnCancelWindowTopMost", e.onOpenOrCloseSettingCenter = "OnOpenOrCloseSettingCenter", e.onUpdateBufferingUI = "OnUpdateBufferingUI"
    }(t.XmpEvent || (t.XmpEvent = {})), function (e) {
        e.XMP = "xmp", e.APlayer = "aplayer", e.DownloadKernel = "download_kernel", e.Thunder = "thunder", e.Other = "other", e.Exit = "exit", e.Crash = "crash", e.Restart = "restart", e.CancelDownloadCodecs = "cancel_download_codecs"
    }(t.ErrorFrom || (t.ErrorFrom = {})), function (e) {
        e[e.UNKNOWN_MODE = -1] = "UNKNOWN_MODE", e[e.INDEPENDENT_MODE = 0] = "INDEPENDENT_MODE", e[e.MAGNETIC_MODE = 1] = "MAGNETIC_MODE", e[e.EMBED_MODE = 2] = "EMBED_MODE"
    }(t.XmpMode || (t.XmpMode = {})), function (e) {
        let t = new Map([[2147746328, "无法解码该文件, 找不到所需的解码器或格式不支持，请尝试重新安装"], [2147680258, "找不到指定的资源"], [2147533648, "找不到指定的模块，请尝试重新安装"], [3222077446, "无法连接指定的服务器"], [3222080445, "无法播放受到版权保护的媒体文件"], [2147746351, "文件为空或无法访问"], [2147943792, "无效的播放参数，请确认输入了有效的播放文件地址"], [4294967263, "全网点播服务在维护中"], [1, "任务创建失败，无法继续下载"], [2, "任务参数错误，无法继续下载"], [3, "链接失效，无法继续下载"], [4, "任务配置文件错误，无法继续下载"], [5, "任务连接超时，无法继续下载"], [6, "文件校验失败，无法继续下载"], [7, "任务包含违规内容，无法继续下载"], [8, "下载引擎加速出错，无法继续下载"], [9, "文件路径超出系统限制，无法继续下载"], [201, "缓存文件创建失败，无法继续下载"], [202, "缓存文件写入失败，无法继续下载"], [203, "缓存文件读取失败，无法继续下载"], [204, "缓存文件文件重命名失败，无法继续下载"], [205, "缓存磁盘空间不足，无法继续下载，请清理再试"], [601, "BT任务已存在，无法继续下载"], [701, "任务包含违规内容，无法继续下载"], [702, "帐号存在异常，无法继续下载"], [703, "根据当地法律法规，文件无法下载"], [704, "应版权方要求，该文件无法下载"], [10001, "下载引擎未启动，无法继续下载"], [10002, "种子文件不存在，无法继续下载"], [44093, "播放进程崩溃了"], [44172, "边下边播任务异常,请尝试重启迅雷"], [44041, "本地BT媒体文件找不到,请稍后再试"], [44042, "种子内无有效的视频文件"], [44013, "媒体链接为网页地址,无法播放"], [44014, "媒体链接无法连接成功"], [44018, "不支持此媒体播放"], [44019, "媒体解码失败,无法播放"], [44091, "下载库崩溃,请重启迅雷播放组件再试"], [44111, "获取媒体格式失败"], [44112, "媒体文件下载失败"], [71200, "切换校验模式后，仍无法打开媒体文件"], [168965206, "播放失败，缺少必要的解码器"], [305419896, "播放出错, 可能暂不支持该格式解码, 建议尝试播放其他音视频文件"], [2326396930, "失效文件，可能已经被删除"], [2326396936, "密码错误，请重新输入"], [2147746369, "未能识别的文件"], [2147500037, "参数错误或内部错误"]]);
        e.getErrorTextByErrorCode = function (e) {
            let i = t.get(e);
            return i || (i = "未知错误"), i
        }
    }(t.XmpErrorCodeNS || (t.XmpErrorCodeNS = {})), function (e) {
        e[e.Unkown = 0] = "Unkown", e[e.Download = 1] = "Download", e[e.Play = 2] = "Play", e[e.Collect = 3] = "Collect"
    }(t.XmpMediaCategory || (t.XmpMediaCategory = {})), function (e) {
        e[e.XMPDrag = 0] = "XMPDrag"
    }(t.OpenMode || (t.OpenMode = {})), function (e) {
        e[e.Unkown = 0] = "Unkown", e[e.Dc = 1] = "Dc", e[e.Vod = 2] = "Vod", e[e.P2s = 3] = "P2s", e[e.Gvod = 4] = "Gvod", e[e.ServerXlpan = 5] = "ServerXlpan", e[e.LocalXlpan = 6] = "LocalXlpan"
    }(t.XmpMediaType || (t.XmpMediaType = {})), function (e) {
        e.createButton = "CreateButton", e.updateButton = "UpdateButton", e.createWebview = "CreateWebview", e.setDefaultVipSpeedStatus = "SetDefaultVipSpeedStatus", e.updateVipSpeedStatus = "UpdateVipSpeedStatus", e.getWebviewInfo = "GetWebviewInfo", e.createVipView = "CreateVipview", e.showCurveChart = "showCurveChart", e.applyBrowserView = "ApplyBrowserView", e.getBrowserViewId = "GetBrowserViewId", e.initBrowserViewConfig = "initBrowserViewConfig", e.createVipMenu = "CreateVipMenu", e.getMenuSlot = "GetMenuSlot", e.openNewTab = "OpenNewTab", e.videoPause = "DoVideoPause", e.videoPlay = "DoVideoPlay", e.videoPauseEx = "DoVideoPauseEx", e.videoPlayEx = "DoVideoPlayEx", e.setPlaySpeed = "SetPlaySpeed", e.setProgressColor = "SetProgressColor", e.getProgressColor = "GetProgressColor", e.showBufferingEntry = "ShowBufferingEntry", e.isBufferingEntryShow = "IsBufferingEntryShow", e.showOpenVipEntry = "ShowOpenVipEntry", e.registerFunctionCall = "RegisterFunctionCall", e.executeFunctionCall = "ExecuteFunctionCall", e.videoGetPlayState = "VideoGetPlayState", e.setXmpFocus = "SetXmpFocus", e.leaveFullScreen = "LeaveFullScreen"
    }(t.UIFunction || (t.UIFunction = {})), function (e) {
        e.onXmpModeChanging = "OnXmpModeChanging", e.onXmpModeChanged = "OnXmpModeChanged", e.onXmpEnterFullScreen = "OnXmpEnterFullScreen", e.onXmpLeaveFullScreen = "OnXmpLeaveFullScreen"
    }(t.ModeChangeEvent || (t.ModeChangeEvent = {})), function (e) {
        e.saveConfig = "SaveConfig", e.getConfigValue = "GetConfigValue", e.setConfigValue = "SetConfigValue", e.isConfigInitFinish = "IsConfigInitFinish", e.getConfigModules = "GetConfigModules", e.setXmpAndThunderConfigValue = "SetXmpAndThunderConfigValue"
    }(t.ConfigFunction || (t.ConfigFunction = {})), function (e) {
        e[e.CONFIGID_CHANGE_URL = -4] = "CONFIGID_CHANGE_URL", e[e.CONFIGID_SET_TOKEN = -3] = "CONFIGID_SET_TOKEN", e[e.CONFIGID_DOWNLOAD_PATH = -2] = "CONFIGID_DOWNLOAD_PATH", e[e.CONFIGID_GETVERSION = -1] = "CONFIGID_GETVERSION", e[e.CONFIGID_APLAYERINFO = 1] = "CONFIGID_APLAYERINFO", e[e.CONFIGID_CODECSPATH = 2] = "CONFIGID_CODECSPATH", e[e.CONFIGID_CODECSDISABLELIST = 3] = "CONFIGID_CODECSDISABLELIST", e[e.CONFIGID_CURRENTURL = 4] = "CONFIGID_CURRENTURL", e[e.CONFIGID_FILESIZE = 5] = "CONFIGID_FILESIZE", e[e.CONFIGID_PLAYMODE = 6] = "CONFIGID_PLAYMODE", e[e.CONFIGID_PLAYRESULT = 7] = "CONFIGID_PLAYRESULT", e[e.CONFIGID_AUTOPLAY = 8] = "CONFIGID_AUTOPLAY", e[e.CONFIGID_USEOPENCHAIN = 9] = "CONFIGID_USEOPENCHAIN", e[e.CONFIGID_SOUNDDEVICELIST = 10] = "CONFIGID_SOUNDDEVICELIST", e[e.CONFIGID_SOUNDDEVICECURRENT = 11] = "CONFIGID_SOUNDDEVICECURRENT", e[e.CONFIGID_SOUNDSILENT = 12] = "CONFIGID_SOUNDSILENT", e[e.CONFIGID_SOUNDBALANCE = 13] = "CONFIGID_SOUNDBALANCE", e[e.CONFIGID_DISABLEVIDEO = 14] = "CONFIGID_DISABLEVIDEO", e[e.CONFIGID_DISABLEAUDIO = 15] = "CONFIGID_DISABLEAUDIO", e[e.CONFIGID_ENABLEVSFILTER = 16] = "CONFIGID_ENABLEVSFILTER", e[e.CONFIGID_ENABLEAUDIOSWITCHER = 17] = "CONFIGID_ENABLEAUDIOSWITCHER", e[e.CONFIGID_DOWNLOADCODECSYNC = 18] = "CONFIGID_DOWNLOADCODECSYNC", e[e.CONFIGID_DOWNLOADCODECCOMPLETED = 19] = "CONFIGID_DOWNLOADCODECCOMPLETED", e[e.CONFIGID_WINDOWHANDLE = 20] = "CONFIGID_WINDOWHANDLE", e[e.CONFIGID_WINDOWMOVED = 21] = "CONFIGID_WINDOWMOVED", e[e.CONFIGID_SETTINGEXPLAIN = 22] = "CONFIGID_SETTINGEXPLAIN", e[e.CONFIGID_SETTINGVALUES = 23] = "CONFIGID_SETTINGVALUES", e[e.CONFIGID_LOADPLUGIN = 24] = "CONFIGID_LOADPLUGIN", e[e.CONFIGID_FREEPLUGIN = 25] = "CONFIGID_FREEPLUGIN", e[e.CONFIGID_FLASHINTERACTION = 26] = "CONFIGID_FLASHINTERACTION", e[e.CONFIGID_INTELMEDIASDKDECODER = 27] = "CONFIGID_INTELMEDIASDKDECODER", e[e.CONFIGID_INTELMEDIASDKENCODER = 28] = "CONFIGID_INTELMEDIASDKENCODER", e[e.CONFIGID_READSIZE = 29] = "CONFIGID_READSIZE", e[e.CONFIGID_READOFFSET = 30] = "CONFIGID_READOFFSET", e[e.CONFIGID_READPOSITION = 31] = "CONFIGID_READPOSITION", e[e.CONFIGID_WRITEOFFSET = 32] = "CONFIGID_WRITEOFFSET", e[e.CONFIGID_ALLOWLOG = 33] = "CONFIGID_ALLOWLOG", e[e.CONFIGID_MEDIAINFO = 34] = "CONFIGID_MEDIAINFO", e[e.CONFIGID_PLUGINSTDCALL = 35] = "CONFIGID_PLUGINSTDCALL", e[e.CONFIGID_LOGOSETTINGS = 36] = "CONFIGID_LOGOSETTINGS", e[e.CONFIGID_LOGOFILE = 37] = "CONFIGID_LOGOFILE", e[e.CONFIGID_CUSTOMCURSOR = 38] = "CONFIGID_CUSTOMCURSOR", e[e.CONFIGID_READSPEED = 41] = "CONFIGID_READSPEED", e[e.CONFIGID_APLAYERDNN = 43] = "CONFIGID_APLAYERDNN", e[e.CONFIGID_ENABLELOG = 44] = "CONFIGID_ENABLELOG", e[e.CONFIGID_FISRTFRAMETIME = 45] = "CONFIGID_FISRTFRAMETIME", e[e.CONFIGID_SEEK_FRAME_TIME = 46] = "CONFIGID_SEEK_FRAME_TIME", e[e.CONFIGID_SEEK_FRAME_TIME_AVERAGE = 47] = "CONFIGID_SEEK_FRAME_TIME_AVERAGE", e[e.CONFIGID_AUTOPLAY_AFTERBUFFER = 48] = "CONFIGID_AUTOPLAY_AFTERBUFFER", e[e.CONFIGID_STAT = 50] = "CONFIGID_STAT", e[e.CONFIGID_TIMEISFRAME = 101] = "CONFIGID_TIMEISFRAME", e[e.CONFIGID_STARTPOSITION = 102] = "CONFIGID_STARTPOSITION", e[e.CONFIGID_STOPPOSITION = 103] = "CONFIGID_STOPPOSITION", e[e.CONFIGID_PLAYSPEED = 104] = "CONFIGID_PLAYSPEED", e[e.CONFIGID_KEYFRAMESEEK = 105] = "CONFIGID_KEYFRAMESEEK", e[e.CONFIGID_KEYFRAMECOUNT = 106] = "CONFIGID_KEYFRAMECOUNT", e[e.CONFIGID_KEYFRAMELIST = 107] = "CONFIGID_KEYFRAMELIST", e[e.CONFIGID_KEYFRAMECURRENT = 108] = "CONFIGID_KEYFRAMECURRENT", e[e.CONFIGID_CANFRAMESTEPFORWARDONE = 109] = "CONFIGID_CANFRAMESTEPFORWARDONE", e[e.CONFIGID_CANFRAMESTEPFORWARDMULTI = 110] = "CONFIGID_CANFRAMESTEPFORWARDMULTI", e[e.CONFIGID_CANFRAMESTEPBACKWORDKONE = 111] = "CONFIGID_CANFRAMESTEPBACKWORDKONE", e[e.CONFIGID_CANFRAMESTEPBACKWORDMULTI = 112] = "CONFIGID_CANFRAMESTEPBACKWORDMULTI", e[e.CONFIGID_FRAMESTEP = 113] = "CONFIGID_FRAMESTEP", e[e.CONFIGID_ISFRAMESTEPPING = 114] = "CONFIGID_ISFRAMESTEPPING", e[e.CONFIGID_READINDEXWHENOPEN = 115] = "CONFIGID_READINDEXWHENOPEN", e[e.CONFIGID_TIMEPOSITIONLIST = 116] = "CONFIGID_TIMEPOSITIONLIST", e[e.CONFIGID_FRAMEINTERVAL = 117] = "CONFIGID_FRAMEINTERVAL", e[e.CONFIGID_FRAMESDRAWN = 118] = "CONFIGID_FRAMESDRAWN", e[e.CONFIGID_LOOPPLAY = 119] = "CONFIGID_LOOPPLAY", e[e.CONFIGID_NOCLOSEWHENCOMPLETE = 120] = "CONFIGID_NOCLOSEWHENCOMPLETE", e[e.CONFIGID_MOUSEFRAMESEEK = 122] = "CONFIGID_MOUSEFRAMESEEK", e[e.CONFIGID_RENDERMODECONFIG = 201] = "CONFIGID_RENDERMODECONFIG", e[e.CONFIGID_RENDERMODECURRENT = 202] = "CONFIGID_RENDERMODECURRENT", e[e.CONFIGID_ASPECTRATIONATIVE = 203] = "CONFIGID_ASPECTRATIONATIVE", e[e.CONFIGID_ASPECTRATIOCUSTOM = 204] = "CONFIGID_ASPECTRATIOCUSTOM", e[e.CONFIGID_VIDEOSOURCEPOSITION = 205] = "CONFIGID_VIDEOSOURCEPOSITION", e[e.CONFIGID_VIDEOTARGETPOSITION = 206] = "CONFIGID_VIDEOTARGETPOSITION", e[e.CONFIGID_CLIPBLACKBANDENABLE = 207] = "CONFIGID_CLIPBLACKBANDENABLE", e[e.CONFIGID_CLIPBLACKBANDSTILL = 208] = "CONFIGID_CLIPBLACKBANDSTILL", e[e.CONFIGID_SPEEDUPENABLE = 209] = "CONFIGID_SPEEDUPENABLE", e[e.CONFIGID_SPEEDUPCUDAFIRST = 210] = "CONFIGID_SPEEDUPCUDAFIRST", e[e.CONFIGID_SPEEDUPSTATUS = 211] = "CONFIGID_SPEEDUPSTATUS", e[e.CONFIGID_SPEEDUPQUERY = 212] = "CONFIGID_SPEEDUPQUERY", e[e.CONFIGID_VIDEOADJUSTUSABLE = 213] = "CONFIGID_VIDEOADJUSTUSABLE", e[e.CONFIGID_BRIGHTNESS = 214] = "CONFIGID_BRIGHTNESS", e[e.CONFIGID_CONTRAST = 215] = "CONFIGID_CONTRAST", e[e.CONFIGID_SATURATION = 216] = "CONFIGID_SATURATION", e[e.CONFIGID_HUE = 217] = "CONFIGID_HUE", e[e.CONFIGID_COREAVCOUTPUTLEVEL = 218] = "CONFIGID_COREAVCOUTPUTLEVEL", e[e.CONFIGID_UNUSED = 219] = "CONFIGID_UNUSED", e[e.CONFIGID_VIDEOCODEC = 220] = "CONFIGID_VIDEOCODEC", e[e.CONFIGID_VIDEOOUTPUTFORMAT = 221] = "CONFIGID_VIDEOOUTPUTFORMAT", e[e.CONFIGID_CURRENTBLACKBANDINFO = 222] = "CONFIGID_CURRENTBLACKBANDINFO", e[e.CONFIGID_IMAGEPROCESSUSABLE = 301] = "CONFIGID_IMAGEPROCESSUSABLE", e[e.CONFIGID_IMAGEFLIPH = 302] = "CONFIGID_IMAGEFLIPH", e[e.CONFIGID_IMAGEFLIPV = 303] = "CONFIGID_IMAGEFLIPV", e[e.CONFIGID_IMAGEROTATE = 304] = "CONFIGID_IMAGEROTATE", e[e.CONFIGID_IMAGENORMALIZEENABLE = 305] = "CONFIGID_IMAGENORMALIZEENABLE", e[e.CONFIGID_IMAGENORMALIZECOMPARE = 306] = "CONFIGID_IMAGENORMALIZECOMPARE", e[e.CONFIGID_IMAGESHARPEN = 307] = "CONFIGID_IMAGESHARPEN", e[e.CONFIGID_IMAGECOLOR3DENABLE = 308] = "CONFIGID_IMAGECOLOR3DENABLE",e[e.CONFIGID_IMAGECOLOR3DOKAY = 309] = "CONFIGID_IMAGECOLOR3DOKAY",e[e.CONFIGID_IMAGECOLOR3DSHOW = 310] = "CONFIGID_IMAGECOLOR3DSHOW",e[e.CONFIGID_IMAGECOLOR3DMODE = 311] = "CONFIGID_IMAGECOLOR3DMODE",e[e.CONFIGID_IMAGECOLOR3DCOLOR = 312] = "CONFIGID_IMAGECOLOR3DCOLOR",e[e.CONFIGID_IMAGEUSEOPENCL = 313] = "CONFIGID_IMAGEUSEOPENCL",e[e.CONFIGID_IMAGEUSEAVX2 = 314] = "CONFIGID_IMAGEUSEAVX2",e[e.CONFIGID_IMAGEUSESSE2 = 315] = "CONFIGID_IMAGEUSESSE2",e[e.CONFIGID_AUIDOPROCESSUSABLE = 401] = "CONFIGID_AUIDOPROCESSUSABLE",e[e.CONFIGID_AUDIOTRACKLIST = 402] = "CONFIGID_AUDIOTRACKLIST",e[e.CONFIGID_AUDIOTRACKCURRENT = 403] = "CONFIGID_AUDIOTRACKCURRENT",e[e.CONFIGID_AUDIOCHANNEL = 404] = "CONFIGID_AUDIOCHANNEL",e[e.CONFIGID_AUDIOTIMESHIFT = 405] = "CONFIGID_AUDIOTIMESHIFT",e[e.CONFIGID_AUDIONORMALIZE = 406] = "CONFIGID_AUDIONORMALIZE",e[e.CONFIGID_AUDIOVSSENABLE = 407] = "CONFIGID_AUDIOVSSENABLE",e[e.CONFIGID_AUDIOVSSDEEP = 408] = "CONFIGID_AUDIOVSSDEEP",e[e.CONFIGID_AUDIOLOADTRACK = 409] = "CONFIGID_AUDIOLOADTRACK",e[e.CONFIGID_AUDIOCODEC = 410] = "CONFIGID_AUDIOCODEC",e[e.CONFIGID_AUDIOINPUTCHANNELS = 411] = "CONFIGID_AUDIOINPUTCHANNELS",e[e.CONFIGID_AUDIOINPUTSAMPLERATE = 412] = "CONFIGID_AUDIOINPUTSAMPLERATE",e[e.CONFIGID_AUDIOINPUTSAMPLEBIT = 413] = "CONFIGID_AUDIOINPUTSAMPLEBIT",e[e.CONFIGID_AUDIOOUTPUTFORMAT = 414] = "CONFIGID_AUDIOOUTPUTFORMAT",e[e.CONFIGID_AUDIOOUTPUTCHANNELS = 415] = "CONFIGID_AUDIOOUTPUTCHANNELS",e[e.CONFIGID_AUDIOOUTPUTSAMPLERATE = 416] = "CONFIGID_AUDIOOUTPUTSAMPLERATE",e[e.CONFIGID_AUDIOOUTPUTSAMPLEBIT = 417] = "CONFIGID_AUDIOOUTPUTSAMPLEBIT",e[e.CONFIGID_SUBTITLEUSABLE = 501] = "CONFIGID_SUBTITLEUSABLE",e[e.CONFIGID_SUBTITLEEXTNAMELIST = 502] = "CONFIGID_SUBTITLEEXTNAMELIST",e[e.CONFIGID_SUBTITLEFILENAME = 503] = "CONFIGID_SUBTITLEFILENAME",e[e.CONFIGID_SUBTITLESHOW = 504] = "CONFIGID_SUBTITLESHOW",e[e.CONFIGID_SUBTITLELANGUAGELIST = 505] = "CONFIGID_SUBTITLELANGUAGELIST",e[e.CONFIGID_SUBTITLELANGUAGECURRENT = 506] = "CONFIGID_SUBTITLELANGUAGECURRENT",e[e.CONFIGID_SUBTITLEPLACEMENT = 507] = "CONFIGID_SUBTITLEPLACEMENT",e[e.CONFIGID_SUBTITLEFONT = 508] = "CONFIGID_SUBTITLEFONT",e[e.CONFIGID_SUBTITLETIMING = 509] = "CONFIGID_SUBTITLETIMING",e[e.CONFIGID_SUBTITLE3D = 510] = "CONFIGID_SUBTITLE3D",e[e.CONFIGID_SUBTITLECONTENT = 511] = "CONFIGID_SUBTITLECONTENT",e[e.CONFIGID_PICTUREUSABLE = 601] = "CONFIGID_PICTUREUSABLE",e[e.CONFIGID_PICTUREENABLE = 602] = "CONFIGID_PICTUREENABLE",e[e.CONFIGID_PICTUREBOUND = 603] = "CONFIGID_PICTUREBOUND",e[e.CONFIGID_PICTUREWIDTH = 604] = "CONFIGID_PICTUREWIDTH",e[e.CONFIGID_PICTUREHEIGHT = 605] = "CONFIGID_PICTUREHEIGHT",e[e.CONFIGID_PICTURELEFT = 606] = "CONFIGID_PICTURELEFT",e[e.CONFIGID_PICTURETOP = 607] = "CONFIGID_PICTURETOP",e[e.CONFIGID_PICTUREALPHA = 608] = "CONFIGID_PICTUREALPHA",e[e.CONFIGID_PICTURECOLORKEY = 609] = "CONFIGID_PICTURECOLORKEY",e[e.CONFIGID_PICTUREHITTEST = 610] = "CONFIGID_PICTUREHITTEST",e[e.CONFIGID_PICTUREHITALPHA = 611] = "CONFIGID_PICTUREHITALPHA",e[e.CONFIGID_PICTURETEXT = 612] = "CONFIGID_PICTURETEXT",e[e.CONFIGID_PICTUREFONT = 613] = "CONFIGID_PICTUREFONT",e[e.CONFIGID_PICTURERGBABUFFER = 614] = "CONFIGID_PICTURERGBABUFFER",e[e.CONFIGID_PICTUREBMPHANDLE = 615] = "CONFIGID_PICTUREBMPHANDLE",e[e.CONFIGID_PICTUREBMPFILENAME = 616] = "CONFIGID_PICTUREBMPFILENAME",e[e.CONFIGID_PICTUREPNGFILENAME = 617] = "CONFIGID_PICTUREPNGFILENAME",e[e.CONFIGID_PICTURESWFFILENAME = 618] = "CONFIGID_PICTURESWFFILENAME",e[e.CONFIGID_PICTURESWFSIZE = 619] = "CONFIGID_PICTURESWFSIZE",e[e.CONFIGID_PICTURESWFCONTROL = 620] = "CONFIGID_PICTURESWFCONTROL",e[e.CONFIGID_PICTUREEVRCPLINEAR = 621] = "CONFIGID_PICTUREEVRCPLINEAR",e[e.CONFIGID_PICTUREATTACHTOVR = 622] = "CONFIGID_PICTUREATTACHTOVR",e[e.CONFIGID_SNAPSHOTUSABLE = 701] = "CONFIGID_SNAPSHOTUSABLE",e[e.CONFIGID_SNAPSHOTIMAGE = 702] = "CONFIGID_SNAPSHOTIMAGE",e[e.CONFIGID_SNAPSHOTWIDTH = 703] = "CONFIGID_SNAPSHOTWIDTH",e[e.CONFIGID_SNAPSHOTHEIGHT = 704] = "CONFIGID_SNAPSHOTHEIGHT",e[e.CONFIGID_SNAPSHOTSOURCEPOSITION = 705] = "CONFIGID_SNAPSHOTSOURCEPOSITION",e[e.CONFIGID_SNAPSHOTKEEPASPECTRATIO = 706] = "CONFIGID_SNAPSHOTKEEPASPECTRATIO",e[e.CONFIGID_SNAPSHOTFORMAT = 707] = "CONFIGID_SNAPSHOTFORMAT",e[e.CONFIGID_SNAPSHOTJPEGQUALITY = 708] = "CONFIGID_SNAPSHOTJPEGQUALITY",e[e.CONFIGID_SNAPSHOTGIFPARAM = 709] = "CONFIGID_SNAPSHOTGIFPARAM",e[e.CONFIGID_SNAPSHOTABORT = 710] = "CONFIGID_SNAPSHOTABORT",e[e.CONFIGID_SNAPSHOTGIFWORKING = 711] = "CONFIGID_SNAPSHOTGIFWORKING",e[e.CONFIGID_SNAPSHOTGIFPROGRESS = 712] = "CONFIGID_SNAPSHOTGIFPROGRESS",e[e.CONFIGID_SNAPSHOTSUBTITLE = 713] = "CONFIGID_SNAPSHOTSUBTITLE",e[e.CONFIGID_CUTUSABLE = 801] = "CONFIGID_CUTUSABLE",e[e.CONFIGID_CUTFORMATLIST = 802] = "CONFIGID_CUTFORMATLIST",e[e.CONFIGID_CUTFORMATCURRENT = 803] = "CONFIGID_CUTFORMATCURRENT",e[e.CONFIGID_CUTFILENAME = 804] = "CONFIGID_CUTFILENAME",e[e.CONFIGID_TRANSCODEVIDEOWIDTH = 901] = "CONFIGID_TRANSCODEVIDEOWIDTH",e[e.CONFIGID_TRANSCODEVIDEOHEIGHT = 902] = "CONFIGID_TRANSCODEVIDEOHEIGHT",e[e.CONFIGID_TRANSCODEKEEPASPECTRATIO = 903] = "CONFIGID_TRANSCODEKEEPASPECTRATIO",e[e.CONFIGID_TRANSCODEROUNDSIZE = 904] = "CONFIGID_TRANSCODEROUNDSIZE",e[e.CONFIGID_TRANSCODEAUDIOTRACK = 905] = "CONFIGID_TRANSCODEAUDIOTRACK",e[e.CONFIGID_TRANSCODESUBTLTELANGUAGE = 906] = "CONFIGID_TRANSCODESUBTLTELANGUAGE",e[e.CONFIGID_TRANSCODECROPBORDER = 907] = "CONFIGID_TRANSCODECROPBORDER",e[e.CONFIGID_TRANSCODEVSFILTER = 908] = "CONFIGID_TRANSCODEVSFILTER",e[e.CONFIGID_NETWORK_BUFFERENTER = 1001] = "CONFIGID_NETWORK_BUFFERENTER",e[e.CONFIGID_NETWORK_BUFFERLEAVE = 1002] = "CONFIGID_NETWORK_BUFFERLEAVE",e[e.CONFIGID_NETWORK_NOBUFFERDRY = 1003] = "CONFIGID_NETWORK_NOBUFFERDRY",e[e.CONFIGID_NETWORK_SEEKBUFFERTIMEOUT = 1004] = "CONFIGID_NETWORK_SEEKBUFFERTIMEOUT",e[e.CONFIGID_NETWORK__ISSEEKBUFFER = 1012] = "CONFIGID_NETWORK__ISSEEKBUFFER",e[e.CONFIGID_NETWORK__FASTSEEK = 1013] = "CONFIGID_NETWORK__FASTSEEK",e[e.CONFIGID_NETWORK__STUFFURL = 1014] = "CONFIGID_NETWORK__STUFFURL",e[e.CONFIGID_NETWORK__TS_INDEX_STATUS = 1018] = "CONFIGID_NETWORK__TS_INDEX_STATUS",e[e.CONFIGID_NETWORK__STUFF_READ_SIZE = 1019] = "CONFIGID_NETWORK__STUFF_READ_SIZE",e[e.CONFIGID_HTTPENABLEVOD = 1101] = "CONFIGID_HTTPENABLEVOD",e[e.CONFIGID_HTTPFAILEDRECONNECTCOUNT = 1102] = "CONFIGID_HTTPFAILEDRECONNECTCOUNT",e[e.CONFIGID_HTTPFAILEDRECONNECTINTERVAL = 1103] = "CONFIGID_HTTPFAILEDRECONNECTINTERVAL",e[e.CONFIGID_HTTPLIVE = 1104] = "CONFIGID_HTTPLIVE",e[e.CONFIGID_HTTPCOOKIE = 1105] = "CONFIGID_HTTPCOOKIE",e[e.CONFIGID_HTTPREFERER = 1106] = "CONFIGID_HTTPREFERER",e[e.CONFIGID_HTTPCUSTOMHEADERS = 1107] = "CONFIGID_HTTPCUSTOMHEADERS",e[e.CONFIGID_HTTPUSERAGENT = 1108] = "CONFIGID_HTTPUSERAGENT",e[e.CONFIGID_MULTISOURCEUSABLE = 1201] = "CONFIGID_MULTISOURCEUSABLE",e[e.CONFIGID_MULTISOURCECHANGE = 1202] = "CONFIGID_MULTISOURCECHANGE",e[e.CONFIGID_MULTISOURCESEEK = 1203] = "CONFIGID_MULTISOURCESEEK",e[e.CONFIGID_MULTISOURCECURRENT = 1204] = "CONFIGID_MULTISOURCECURRENT",e[e.CONFIGID_LYRICUSABLE = 1301] = "CONFIGID_LYRICUSABLE",e[e.CONFIGID_LYRICSHOW = 1302] = "CONFIGID_LYRICSHOW",e[e.CONFIGID_LYRICUPDATETIME = 1303] = "CONFIGID_LYRICUPDATETIME",e[e.CONFIGID_LYRICFORMAT = 1304] = "CONFIGID_LYRICFORMAT",e[e.CONFIGID_LYRICFILE = 1305] = "CONFIGID_LYRICFILE",e[e.CONFIGID_LYRICCONTENT = 1306] = "CONFIGID_LYRICCONTENT",e[e.CONFIGID_LYRICBACKCOLOR = 1307] = "CONFIGID_LYRICBACKCOLOR",e[e.CONFIGID_LYRICPICTUREFILENAME = 1308] = "CONFIGID_LYRICPICTUREFILENAME",e[e.CONFIGID_LYRICPICTUREHANDLE = 1309] = "CONFIGID_LYRICPICTUREHANDLE",e[e.CONFIGID_LYRICPICTUREMODE = 1310] = "CONFIGID_LYRICPICTUREMODE",e[e.CONFIGID_LYRICFONT = 1311] = "CONFIGID_LYRICFONT",e[e.CONFIGID_LYRICFONTNORMALCOLOR = 1312] = "CONFIGID_LYRICFONTNORMALCOLOR",e[e.CONFIGID_LYRICFONTHIGHLIGHTCOLOR = 1313] = "CONFIGID_LYRICFONTHIGHLIGHTCOLOR",e[e.CONFIGID_LYRICFRAMEENABLE = 1314] = "CONFIGID_LYRICFRAMEENABLE",e[e.CONFIGID_LYRICFRAMECOLOR = 1315] = "CONFIGID_LYRICFRAMECOLOR",e[e.CONFIGID_LYRICSMOOTHMULITPLE = 1316] = "CONFIGID_LYRICSMOOTHMULITPLE",e[e.CONFIGID_LYRICSMOOTHONLYLYRIC = 1317] = "CONFIGID_LYRICSMOOTHONLYLYRIC",e[e.CONFIGID_LYRICALPHA = 1318] = "CONFIGID_LYRICALPHA",e[e.CONFIGID_LYRICANIMATION = 1319] = "CONFIGID_LYRICANIMATION",e[e.CONFIGID_LYRICTIMEOFFSET = 1320] = "CONFIGID_LYRICTIMEOFFSET",e[e.CONFIGID_LYRICDRAGENABLE = 1321] = "CONFIGID_LYRICDRAGENABLE",e[e.CONFIGID_LYRICDRAGLINECOLOR = 1322] = "CONFIGID_LYRICDRAGLINECOLOR",e[e.CONFIGID_LYRICDRAGTEXTCOLOR = 1323] = "CONFIGID_LYRICDRAGTEXTCOLOR",e[e.CONFIGID_LYRICDRAGTEXTLEFT = 1324] = "CONFIGID_LYRICDRAGTEXTLEFT",e[e.CONFIGID_LYRICDRAGTEXTRIGHTFRONT = 1325] = "CONFIGID_LYRICDRAGTEXTRIGHTFRONT",e[e.CONFIGID_LYRICDRAGTEXTRIGHTBACK = 1326] = "CONFIGID_LYRICDRAGTEXTRIGHTBACK",e[e.CONFIGID_LYRICDRAGTEXTRIGHTDIV = 1327] = "CONFIGID_LYRICDRAGTEXTRIGHTDIV",e[e.CONFIGID_LYRICALIGN = 1328] = "CONFIGID_LYRICALIGN",e[e.CONFIGID_DVDCHAPTERS = 1401] = "CONFIGID_DVDCHAPTERS",e[e.CONFIGID_DVDANGLECOUNT = 1402] = "CONFIGID_DVDANGLECOUNT",e[e.CONFIGID_DVDAUDIOS = 1403] = "CONFIGID_DVDAUDIOS",e[e.CONFIGID_DVDSUBPICTURES = 1404] = "CONFIGID_DVDSUBPICTURES",e[e.CONFIGID_DVDCURRENTCHAPTER = 1405] = "CONFIGID_DVDCURRENTCHAPTER",e[e.CONFIGID_DVDCURRENTANGLE = 1406] = "CONFIGID_DVDCURRENTANGLE",e[e.CONFIGID_DVDCURRENTAUDIO = 1407] = "CONFIGID_DVDCURRENTAUDIO",e[e.CONFIGID_DVDCURRENTSUBPICTURE = 1408] = "CONFIGID_DVDCURRENTSUBPICTURE",e[e.CONFIGID_DVDPARENTALLEVEL = 1409] = "CONFIGID_DVDPARENTALLEVEL",e[e.CONFIGID_DVDSHOWMENU = 1410] = "CONFIGID_DVDSHOWMENU",e[e.CONFIGID_DVDPRESSBUTTON = 1411] = "CONFIGID_DVDPRESSBUTTON",e[e.CONFIGID_DVDSKIPCHAPTER = 1412] = "CONFIGID_DVDSKIPCHAPTER",e[e.CONFIGID_DVDPLAYFORWARD = 1413] = "CONFIGID_DVDPLAYFORWARD",e[e.CONFIGID_DVDPLAYBACKWARD = 1414] = "CONFIGID_DVDPLAYBACKWARD",e[e.CONFIGID_DVDNEEDINTERACTION = 1415] = "CONFIGID_DVDNEEDINTERACTION",e[e.CONFIGID_AC3DTSUSABLE = 1501] = "CONFIGID_AC3DTSUSABLE",e[e.CONFIGID_AC3DTSOUTPUTMODE = 1502] = "CONFIGID_AC3DTSOUTPUTMODE",e[e.CONFIGID_AC3DTSVOICEVOLUME = 1503] = "CONFIGID_AC3DTSVOICEVOLUME",e[e.CONFIGID_SVCCURRENTLEVEL = 1601] = "CONFIGID_SVCCURRENTLEVEL",e[e.CONFIGID_SVCSTATISTICINTERVAL = 1602] = "CONFIGID_SVCSTATISTICINTERVAL",e[e.CONFIGID_SVCLEVELMIN = 1603] = "CONFIGID_SVCLEVELMIN",e[e.CONFIGID_SVCLEVELMAX = 1604] = "CONFIGID_SVCLEVELMAX",e[e.CONFIGID_SVCDOWNLOADSPEED = 1605] = "CONFIGID_SVCDOWNLOADSPEED",e[e.CONFIGID_SVCCONNECTTIMEOUT = 1606] = "CONFIGID_SVCCONNECTTIMEOUT",e[e.CONFIGID_DETECTSUBTITLEUSABLE = 1701] = "CONFIGID_DETECTSUBTITLEUSABLE",e[e.CONFIGID_DETECTSUBTITLEENABLE = 1702] = "CONFIGID_DETECTSUBTITLEENABLE",e[e.CONFIGID_DETECTSUBTITLEAREA = 1703] = "CONFIGID_DETECTSUBTITLEAREA",e[e.CONFIGID_DETECTSUBTITLESHOW = 1704] = "CONFIGID_DETECTSUBTITLESHOW",e[e.CONFIGID_DLNAENABLE = 1801] = "CONFIGID_DLNAENABLE",e[e.CONFIGID_DLNADEVICELIST = 1802] = "CONFIGID_DLNADEVICELIST",e[e.CONFIGID_DLNACURRENTDEVICE = 1803] = "CONFIGID_DLNACURRENTDEVICE",e[e.CONFIGID_DLNASEARCHDEVICE = 1804] = "CONFIGID_DLNASEARCHDEVICE",e[e.CONFIGID_VIDEO3DUSABLE = 1901] = "CONFIGID_VIDEO3DUSABLE",e[e.CONFIGID_VIDEO3DSHOW = 1902] = "CONFIGID_VIDEO3DSHOW",e[e.CONFIGID_VIDEO3DOBJECTLIST = 1903] = "CONFIGID_VIDEO3DOBJECTLIST",e[e.CONFIGID_VIDEO3DCURRENTOBJECT = 1904] = "CONFIGID_VIDEO3DCURRENTOBJECT",e[e.CONFIGID_VIDEO3DOBJECTINFO = 1905] = "CONFIGID_VIDEO3DOBJECTINFO",e[e.CONFIGID_VIDEO3DADDOBJECT = 1906] = "CONFIGID_VIDEO3DADDOBJECT",e[e.CONFIGID_VIDEO3DDELETEOBJECT = 1907] = "CONFIGID_VIDEO3DDELETEOBJECT",e[e.CONFIGID_VIDEO3DPOINTCOUNT = 1908] = "CONFIGID_VIDEO3DPOINTCOUNT",e[e.CONFIGID_VIDEO3DCURRENTPOINT = 1909] = "CONFIGID_VIDEO3DCURRENTPOINT",e[e.CONFIGID_VIDEO3DPOINTINFO = 1910] = "CONFIGID_VIDEO3DPOINTINFO",e[e.CONFIGID_VIDEO3DADDPOINT = 1911] = "CONFIGID_VIDEO3DADDPOINT",e[e.CONFIGID_VIDEO3DDELETEPOINT = 1912] = "CONFIGID_VIDEO3DDELETEPOINT",e[e.CONFIGID_VIDEO3DFRAMECOUNT = 1913] = "CONFIGID_VIDEO3DFRAMECOUNT",e[e.CONFIGID_VIDEO3DFRAMEINFO = 1914] = "CONFIGID_VIDEO3DFRAMEINFO",e[e.CONFIGID_VIDEO3DADDFRAME = 1915] = "CONFIGID_VIDEO3DADDFRAME",e[e.CONFIGID_VIDEO3DDELETEFRAME = 1916] = "CONFIGID_VIDEO3DDELETEFRAME",e[e.CONFIGID_VIDEO3DCLEARFRAMES = 1917] = "CONFIGID_VIDEO3DCLEARFRAMES",e[e.CONFIGID_VIDEO3DCOPYFRAME = 1918] = "CONFIGID_VIDEO3DCOPYFRAME",e[e.CONFIGID_VIDEO3DSAMEFRAMES = 1919] = "CONFIGID_VIDEO3DSAMEFRAMES",e[e.CONFIGID_VIDEO3DLINEARFRAMES = 1920] = "CONFIGID_VIDEO3DLINEARFRAMES",e[e.CONFIGID_VIDEO3DEDITMODE = 1921] = "CONFIGID_VIDEO3DEDITMODE",e[e.CONFIGID_VIDEO3DSELECTTOOL = 1922] = "CONFIGID_VIDEO3DSELECTTOOL",e[e.CONFIGID_VIDEO3DMAGICADMIT = 1923] = "CONFIGID_VIDEO3DMAGICADMIT",e[e.CONFIGID_VIDEO3DLOADFROMFILE = 1924] = "CONFIGID_VIDEO3DLOADFROMFILE",e[e.CONFIGID_VIDEO3DSAVETOFILE = 1925] = "CONFIGID_VIDEO3DSAVETOFILE",e[e.CONFIGID_WIDIENABLE = 2001] = "CONFIGID_WIDIENABLE",e[e.CONFIGID_WIDIADAPTERLIST = 2002] = "CONFIGID_WIDIADAPTERLIST",e[e.CONFIGID_WIDICONNECT = 2003] = "CONFIGID_WIDICONNECT",e[e.CONFIGID_WIDIDISCONNECT = 2004] = "CONFIGID_WIDIDISCONNECT",e[e.CONFIGID_WIDISETMODE = 2005] = "CONFIGID_WIDISETMODE",e[e.CONFIGID_WIDISEARCHDEVICE = 2006] = "CONFIGID_WIDISEARCHDEVICE",e[e.CONFIGID_SUBTITLE2USABLE = 2101] = "CONFIGID_SUBTITLE2USABLE",e[e.CONFIGID_SUBTITLE2EXTNAMELIST = 2102] = "CONFIGID_SUBTITLE2EXTNAMELIST",e[e.CONFIGID_SUBTITLE2FILENAME = 2103] = "CONFIGID_SUBTITLE2FILENAME",e[e.CONFIGID_SUBTITLE2SHOW = 2104] = "CONFIGID_SUBTITLE2SHOW",e[e.CONFIGID_SUBTITLE2LANGUAGELIST = 2105] = "CONFIGID_SUBTITLE2LANGUAGELIST",e[e.CONFIGID_SUBTITLE2LANGUAGECURRENT = 2106] = "CONFIGID_SUBTITLE2LANGUAGECURRENT",e[e.CONFIGID_SUBTITLE2PLACEMENT = 2107] = "CONFIGID_SUBTITLE2PLACEMENT",e[e.CONFIGID_SUBTITLE2FONT = 2108] = "CONFIGID_SUBTITLE2FONT",e[e.CONFIGID_SUBTITLE2TIMING = 2109] = "CONFIGID_SUBTITLE2TIMING",e[e.CONFIGID_SUBTITLE23D = 2110] = "CONFIGID_SUBTITLE23D",e[e.CONFIGID_SUBTITLE2CONTENT = 2111] = "CONFIGID_SUBTITLE2CONTENT",e[e.CONFIGID_CACHEFILENAME = 2201] = "CONFIGID_CACHEFILENAME",e[e.CONFIGID_CACHECLEAR = 2202] = "CONFIGID_CACHECLEAR",e[e.CONFIGID_CACHEDOWNLOADLIST = 2203] = "CONFIGID_CACHEDOWNLOADLIST",e[e.CONFIGID_CACHECOMPLETED = 2204] = "CONFIGID_CACHECOMPLETED",e[e.CONFIGID_CACHECONVERT = 2205] = "CONFIGID_CACHECONVERT",e[e.CONFIGID_CACHEIGNORECOMPAREURL = 2206] = "CONFIGID_CACHEIGNORECOMPAREURL",e[e.CONFIGID_CACHEGREED = 2207] = "CONFIGID_CACHEGREED",e[e.CONFIGID_SPRITEUSABLE = 2301] = "CONFIGID_SPRITEUSABLE",e[e.CONFIGID_SPRITELIST = 2302] = "CONFIGID_SPRITELIST",e[e.CONFIGID_SPRITEADD = 2303] = "CONFIGID_SPRITEADD",e[e.CONFIGID_SPRITEDELETE = 2304] = "CONFIGID_SPRITEDELETE",e[e.CONFIGID_SPRITECURRENT = 2305] = "CONFIGID_SPRITECURRENT",e[e.CONFIGID_SPRITEBOUND = 2306] = "CONFIGID_SPRITEBOUND",e[e.CONFIGID_SPRITEPOSITION = 2307] = "CONFIGID_SPRITEPOSITION",e[e.CONFIGID_SPRITEMOVETO = 2308] = "CONFIGID_SPRITEMOVETO",e[e.CONFIGID_SPRITESELECTVIDEO = 2309] = "CONFIGID_SPRITESELECTVIDEO",e[e.CONFIGID_SPRITESELECTRECT = 2310] = "CONFIGID_SPRITESELECTRECT",e[e.CONFIGID_SPRITESHOWSELECT = 2311] = "CONFIGID_SPRITESHOWSELECT",e[e.CONFIGID_SPRITEATTACHVIDEO = 2312] = "CONFIGID_SPRITEATTACHVIDEO",e[e.CONFIGID_SPRITEATTACHTOVR = 2313] = "CONFIGID_SPRITEATTACHTOVR",e[e.CONFIGID_VRENABLE = 2401] = "CONFIGID_VRENABLE",e[e.CONFIGID_VRMODE = 2402] = "CONFIGID_VRMODE",e[e.CONFIGID_VRPOSITION = 2403] = "CONFIGID_VRPOSITION",e[e.CONFIGID_VRDEVICE = 2404] = "CONFIGID_VRDEVICE",e[e.CONFIGID_VRDELAY = 2405] = "CONFIGID_VRDELAY",e[e.CONFIGID_VRCIRCULARPARAMETER = 2406] = "CONFIGID_VRCIRCULARPARAMETER",e[e.CONFIGID_VRMONITORPARAMETER = 2407] = "CONFIGID_VRMONITORPARAMETER",e[e.CONFIGID_VRFILLBAND = 2408] = "CONFIGID_VRFILLBAND",e[e.CONFIGID_VRFOCUSPOSITION = 2409] = "CONFIGID_VRFOCUSPOSITION",e[e.CONFIGID_VRQUALITY = 2410] = "CONFIGID_VRQUALITY",e[e.CONFIGID_DNNVSRMODEL = 2802] = "CONFIGID_DNNVSRMODEL",e[e.CONFIGID_DNNENABLEVSR = 2803] = "CONFIGID_DNNENABLEVSR",e[e.CONFIGID_DNNIMAGESR = 2804] = "CONFIGID_DNNIMAGESR",e[e.CONFIGID_ZIP_FILELISTDO = 3001] = "CONFIGID_ZIP_FILELISTDO",e[e.CONFIGID_ZIP_FILELISTABORT = 3002] = "CONFIGID_ZIP_FILELISTABORT",e[e.CONFIGID_ZIP_FILELISTGET = 3003] = "CONFIGID_ZIP_FILELISTGET",e[e.CONFIGID_ZIP_OPENFILE = 3004] = "CONFIGID_ZIP_OPENFILE",e[e.CONFIGID_ZIP_OPENPASSWORD = 3005] = "CONFIGID_ZIP_OPENPASSWORD",e[e.CONFIGID_ZIP_OPENINDEX = 3006] = "CONFIGID_ZIP_OPENINDEX",e[e.CONFIGID_ZIP_MAKEINDEXFILE = 3007] = "CONFIGID_ZIP_MAKEINDEXFILE",e[e.CONFIGID_ZIP_MAKEINDEXPASSWORD = 3008] = "CONFIGID_ZIP_MAKEINDEXPASSWORD",e[e.CONFIGID_ZIP_MAKEINDEXOUTPUT = 3009] = "CONFIGID_ZIP_MAKEINDEXOUTPUT",e[e.CONFIGID_ZIP_MAKEINDEXDO = 3010] = "CONFIGID_ZIP_MAKEINDEXDO",e[e.CONFIGID_ZIP_MAKEINDEXABORT = 3011] = "CONFIGID_ZIP_MAKEINDEXABORT",e[e.CONFIGID_ZIP_MAKEINDEXPROGRESS = 3012] = "CONFIGID_ZIP_MAKEINDEXPROGRESS"
    }(t.APlayerConfigId || (t.APlayerConfigId = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e[e.HWND_NOTOPMOST = -2] = "HWND_NOTOPMOST", e[e.HWND_TOPMOST = -1] = "HWND_TOPMOST", e[e.HWND_TOP = 0] = "HWND_TOP", e[e.HWND_BOTTOM = 1] = "HWND_BOTTOM"
    }(t.OptionOfHWNDInAfter || (t.OptionOfHWNDInAfter = {})), function (e) {
        e[e.SWP_ASYNCWINDOWPOS = 16384] = "SWP_ASYNCWINDOWPOS", e[e.SWP_DEFERERASE = 8192] = "SWP_DEFERERASE", e[e.SWP_DRAWFRAME = 32] = "SWP_DRAWFRAME", e[e.SWP_FRAMECHANGED = 32] = "SWP_FRAMECHANGED", e[e.SWP_HIDEWINDOW = 128] = "SWP_HIDEWINDOW", e[e.SWP_NOACTIVATE = 16] = "SWP_NOACTIVATE", e[e.SWP_NOCOPYBITS = 256] = "SWP_NOCOPYBITS", e[e.SWP_NOMOVE = 2] = "SWP_NOMOVE", e[e.SWP_NOOWNERZORDER = 512] = "SWP_NOOWNERZORDER", e[e.SWP_NOREDRAW = 8] = "SWP_NOREDRAW", e[e.SWP_NOREPOSITION = 512] = "SWP_NOREPOSITION", e[e.SWP_NOSENDCHANGING = 1024] = "SWP_NOSENDCHANGING", e[e.SWP_NOSIZE = 1] = "SWP_NOSIZE", e[e.SWP_NOZORDER = 4] = "SWP_NOZORDER", e[e.SWP_SHOWWINDOW = 64] = "SWP_SHOWWINDOW"
    }(t.Uflag || (t.Uflag = {})), function (e) {
        e[e.SW_FORCEMINIMIZE = 11] = "SW_FORCEMINIMIZE", e[e.SW_HIDE = 0] = "SW_HIDE", e[e.SW_MAXIMIZE = 3] = "SW_MAXIMIZE", e[e.SW_MINIMIZE = 6] = "SW_MINIMIZE", e[e.SW_RESTORE = 9] = "SW_RESTORE", e[e.SW_SHOW = 5] = "SW_SHOW", e[e.SW_SHOWDEFAULT = 10] = "SW_SHOWDEFAULT", e[e.SW_SHOWMAXIMIZED = 3] = "SW_SHOWMAXIMIZED", e[e.SW_SHOWMINIMIZED = 2] = "SW_SHOWMINIMIZED", e[e.SW_SHOWMINNOACTIVE = 7] = "SW_SHOWMINNOACTIVE", e[e.SW_SHOWNA = 8] = "SW_SHOWNA", e[e.SW_SHOWNOACTIVATE = 4] = "SW_SHOWNOACTIVATE", e[e.SW_SHOWNORMAL = 1] = "SW_SHOWNORMAL"
    }(t.CmdShow || (t.CmdShow = {})), function (e) {
        e[e.WS_BORDER = 8388608] = "WS_BORDER", e[e.WS_CAPTION = 12582912] = "WS_CAPTION", e[e.WS_CHILD = 1073741824] = "WS_CHILD", e[e.WS_CHILDWINDOW = 1073741824] = "WS_CHILDWINDOW", e[e.WS_CLIPCHILDREN = 33554432] = "WS_CLIPCHILDREN", e[e.WS_CLIPSIBLINGS = 67108864] = "WS_CLIPSIBLINGS", e[e.WS_POPUP = 2147483648] = "WS_POPUP", e[e.WS_THICKFRAME = 262144] = "WS_THICKFRAME"
    }(t.WindowStyle || (t.WindowStyle = {})), function (e) {
        e[e.WS_EX_TOOLWINDOW = 128] = "WS_EX_TOOLWINDOW", e[e.WS_EX_APPWINDOW = 262144] = "WS_EX_APPWINDOW", e[e.WS_EX_TOPMOST = 8] = "WS_EX_TOPMOST", e[e.WS_EX_WINDOWEDGE = 256] = "WS_EX_WINDOWEDGE", e[e.WS_EX_NOACTIVATE = 134217728] = "WS_EX_NOACTIVATE", e[e.WS_EX_TRANSPARENT = 32] = "WS_EX_TRANSPARENT", e[e.WS_EX_LAYERED = 524288] = "WS_EX_LAYERED"
    }(t.WindowStyleEx || (t.WindowStyleEx = {})), function (e) {
        e[e.GWL_EXSTYLE = -20] = "GWL_EXSTYLE", e[e.GWL_HINSTANCE = -6] = "GWL_HINSTANCE", e[e.GWL_ID = -12] = "GWL_ID", e[e.GWL_STYLE = -16] = "GWL_STYLE", e[e.GWL_USERDATA = -21] = "GWL_USERDATA", e[e.GWL_WNDPROC = -4] = "GWL_WNDPROC"
    }(t.SetWindowType || (t.SetWindowType = {})), function (e) {
        e[e.WM_CREATE = 1] = "WM_CREATE", e[e.WM_DESTROY = 2] = "WM_DESTROY", e[e.WM_MOVE = 3] = "WM_MOVE", e[e.WM_SIZE = 5] = "WM_SIZE", e[e.WM_ACTIVATE = 6] = "WM_ACTIVATE", e[e.WM_SETFOCUS = 7] = "WM_SETFOCUS", e[e.WM_KILLFOCUS = 8] = "WM_KILLFOCUS", e[e.WM_ENABLE = 10] = "WM_ENABLE", e[e.WM_KEYDOWN = 256] = "WM_KEYDOWN", e[e.WM_KEYUP = 257] = "WM_KEYUP", e[e.WM_SYSKEYDOWN = 260] = "WM_SYSKEYDOWN", e[e.WM_MOUSEMOVE = 512] = "WM_MOUSEMOVE", e[e.WM_SETCURSOR = 32] = "WM_SETCURSOR", e[e.WM_LBUTTONDOWN = 513] = "WM_LBUTTONDOWN", e[e.WM_LBUTTONUP = 514] = "WM_LBUTTONUP", e[e.WM_LBUTTONDBLCLK = 515] = "WM_LBUTTONDBLCLK", e[e.WM_RBUTTONUP = 517] = "WM_RBUTTONUP", e[e.WM_MOUSEWHEEL = 522] = "WM_MOUSEWHEEL", e[e.WM_MOUSELEAVE = 675] = "WM_MOUSELEAVE", e[e.WM_DPICHANGED = 736] = "WM_DPICHANGED", e[e.WM_GETMINMAXINFO = 36] = "WM_GETMINMAXINFO", e[e.WM_NCHITTEST = 132] = "WM_NCHITTEST", e[e.WM_NCMOUSEMOVE = 160] = "WM_NCMOUSEMOVE", e[e.WM_NCLBUTTONDOWN = 161] = "WM_NCLBUTTONDOWN", e[e.WM_NCLBUTTONUP = 162] = "WM_NCLBUTTONUP", e[e.WM_NCLBUTTONDBLCLK = 163] = "WM_NCLBUTTONDBLCLK", e[e.WM_NCRBUTTONDOWN = 164] = "WM_NCRBUTTONDOWN", e[e.WM_NCRBUTTONUP = 165] = "WM_NCRBUTTONUP", e[e.WM_NCRBUTTONDBLCLK = 166] = "WM_NCRBUTTONDBLCLK", e[e.WM_NCMBUTTONDOWN = 167] = "WM_NCMBUTTONDOWN", e[e.WM_NCMBUTTONUP = 168] = "WM_NCMBUTTONUP", e[e.WM_NCMBUTTONDBLCLK = 169] = "WM_NCMBUTTONDBLCLK", e[e.WM_WINDOWPOSCHANGED = 71] = "WM_WINDOWPOSCHANGED", e[e.WM_WINDOWPOSCHANGING = 70] = "WM_WINDOWPOSCHANGING", e[e.WM_ACTIVATEAPP = 28] = "WM_ACTIVATEAPP", e[e.WM_DWMCOMPOSITIONCHANGED = 798] = "WM_DWMCOMPOSITIONCHANGED", e[e.WM_QUERYENDSESSION = 17] = "WM_QUERYENDSESSION"
    }(t.WindowMessage || (t.WindowMessage = {})), function (e) {
        e[e.GW_HWNDFIRST = 0] = "GW_HWNDFIRST", e[e.GW_HWNDLAST = 1] = "GW_HWNDLAST", e[e.GW_HWNDNEXT = 2] = "GW_HWNDNEXT", e[e.GW_HWNDPREV = 3] = "GW_HWNDPREV", e[e.GW_OWNER = 4] = "GW_OWNER", e[e.GW_CHILD = 5] = "GW_CHILD", e[e.GW_ENABLEDPOPUP = 6] = "GW_ENABLEDPOPUP"
    }(t.GWCmd || (t.GWCmd = {})), function (e) {
        e[e.HTERROR = -2] = "HTERROR", e[e.HTTRANSPARENT = -1] = "HTTRANSPARENT", e[e.HTNOWHERE = 0] = "HTNOWHERE", e[e.HTCLIENT = 1] = "HTCLIENT", e[e.HTCAPTION = 2] = "HTCAPTION", e[e.HTSYSMENU = 3] = "HTSYSMENU", e[e.HTGROWBOX = 4] = "HTGROWBOX", e[e.HTSIZE = 4] = "HTSIZE", e[e.HTMENU = 5] = "HTMENU", e[e.HTHSCROLL = 6] = "HTHSCROLL", e[e.HTVSCROLL = 7] = "HTVSCROLL", e[e.HTMINBUTTON = 8] = "HTMINBUTTON", e[e.HTMAXBUTTON = 9] = "HTMAXBUTTON", e[e.HTLEFT = 10] = "HTLEFT", e[e.HTRIGHT = 11] = "HTRIGHT", e[e.HTTOP = 12] = "HTTOP", e[e.HTTOPLEFT = 13] = "HTTOPLEFT", e[e.HTTOPRIGHT = 14] = "HTTOPRIGHT", e[e.HTBOTTOM = 15] = "HTBOTTOM", e[e.HTBOTTOMLEFT = 16] = "HTBOTTOMLEFT", e[e.HTBOTTOMRIGHT = 17] = "HTBOTTOMRIGHT", e[e.HTBORDER = 18] = "HTBORDER", e[e.HTREDUCE = 8] = "HTREDUCE", e[e.HTZOOM = 9] = "HTZOOM", e[e.HTSIZEFIRST = 10] = "HTSIZEFIRST", e[e.HTSIZELAST = 17] = "HTSIZELAST", e[e.HTOBJECT = 19] = "HTOBJECT", e[e.HTCLOSE = 20] = "HTCLOSE", e[e.HTHELP = 21] = "HTHELP"
    }(t.HitTestPositionCode || (t.HitTestPositionCode = {})), function (e) {
        e[e.VK_LBUTTON = 1] = "VK_LBUTTON", e[e.VK_RBUTTON = 2] = "VK_RBUTTON", e[e.VK_MBUTTON = 4] = "VK_MBUTTON", e[e.VK_BACK = 8] = "VK_BACK", e[e.VK_TAB = 9] = "VK_TAB", e[e.VK_RETURN = 13] = "VK_RETURN", e[e.VK_SHIFT = 16] = "VK_SHIFT", e[e.VK_CONTROL = 17] = "VK_CONTROL", e[e.VK_MENU = 18] = "VK_MENU", e[e.VK_ESCAPE = 27] = "VK_ESCAPE", e[e.VK_SPACE = 32] = "VK_SPACE", e[e.VK_PRIOR = 33] = "VK_PRIOR", e[e.VK_NEXT = 34] = "VK_NEXT", e[e.VK_END = 35] = "VK_END", e[e.VK_LEFT = 37] = "VK_LEFT", e[e.VK_UP = 38] = "VK_UP", e[e.VK_RIGHT = 39] = "VK_RIGHT", e[e.VK_DOWN = 40] = "VK_DOWN", e[e.VK_DELETE = 46] = "VK_DELETE", e[e.VK_F1 = 112] = "VK_F1", e[e.VK_F2 = 113] = "VK_F2", e[e.VK_F3 = 114] = "VK_F3", e[e.VK_F4 = 115] = "VK_F4", e[e.VK_F5 = 116] = "VK_F5", e[e.VK_F6 = 117] = "VK_F6", e[e.VK_F7 = 118] = "VK_F7", e[e.VK_F8 = 119] = "VK_F8", e[e.VK_F9 = 120] = "VK_F9", e[e.VK_F10 = 121] = "VK_F10", e[e.VK_F11 = 122] = "VK_F11", e[e.VK_F12 = 123] = "VK_F12", e[e.VK_OEM_1 = 186] = "VK_OEM_1", e[e.VK_OEM_PLUS = 187] = "VK_OEM_PLUS", e[e.VK_OEM_COMMA = 188] = "VK_OEM_COMMA", e[e.VK_OEM_MINUS = 189] = "VK_OEM_MINUS", e[e.VK_OEM_PERIOD = 190] = "VK_OEM_PERIOD", e[e.VK_OEM_2 = 191] = "VK_OEM_2", e[e.VK_OEM_3 = 192] = "VK_OEM_3", e[e.VK_OEM_4 = 219] = "VK_OEM_4", e[e.VK_OEM_5 = 220] = "VK_OEM_5", e[e.VK_OEM_6 = 221] = "VK_OEM_6", e[e.VK_OEM_7 = 222] = "VK_OEM_7", e[e.VK_PROCESSKEY = 229] = "VK_PROCESSKEY"
    }(t.VirtualKeyCode || (t.VirtualKeyCode = {})), function (e) {
        e[e.SW_HIDE = 0] = "SW_HIDE", e[e.SW_SHOWMAXIMIZED = 3] = "SW_SHOWMAXIMIZED", e[e.SW_SHOW = 5] = "SW_SHOW"
    }(t.ShowWindowCmd || (t.ShowWindowCmd = {})), function (e) {
        e[e.MIN_WINDOW_WIDTH = 520] = "MIN_WINDOW_WIDTH", e[e.MIN_WINDOW_HEIGHT = 335] = "MIN_WINDOW_HEIGHT", e[e.MIN_WINDOW_WIDTH_TAB = 910] = "MIN_WINDOW_WIDTH_TAB", e[e.MIN_WINDOW_HEIGHT_TAB = 600] = "MIN_WINDOW_HEIGHT_TAB", e[e.TOP_WINDOW_HEIGHT = 68] = "TOP_WINDOW_HEIGHT", e[e.TOP_WINDOW_HEIGHT_NORMAL = 68] = "TOP_WINDOW_HEIGHT_NORMAL", e[e.PLAYCTRL_HEIGHT = 82] = "PLAYCTRL_HEIGHT", e[e.PLAYLIST_WIDTH = 240] = "PLAYLIST_WIDTH", e[e.FRAME_BORDER = 0] = "FRAME_BORDER", e[e.FRAME_RESIZE_BORDER = 0] = "FRAME_RESIZE_BORDER", e[e.BROWSERWINDOW_SHADOW = 8] = "BROWSERWINDOW_SHADOW", e[e.SIDE_BAR_WIDTH = 25] = "SIDE_BAR_WIDTH", e[e.SIDE_BAR_HEIGHT = 100] = "SIDE_BAR_HEIGHT", e[e.SHOWHIDE_DELAY_TIME = 2e3] = "SHOWHIDE_DELAY_TIME", e[e.TIME_TIP_WINDOW_WIDTH = 111] = "TIME_TIP_WINDOW_WIDTH", e[e.TIME_TIP_WINDOW_HEIGHT = 30] = "TIME_TIP_WINDOW_HEIGHT", e[e.TIME_IMG_TIP_WINDOW_HEIGHT = 75] = "TIME_IMG_TIP_WINDOW_HEIGHT"
    }(t.WindowParams || (t.WindowParams = {})), function (e) {
        e[e.UNKNOWN_MODE = -1] = "UNKNOWN_MODE", e[e.TRANSPARENT_MODE = 0] = "TRANSPARENT_MODE", e[e.NORMAL_MODE = 1] = "NORMAL_MODE", e[e.MINI_MODE = 2] = "MINI_MODE", e[e.EMBED_CHILD_MODE = 3] = "EMBED_CHILD_MODE"
    }(t.XMPShowMode || (t.XMPShowMode = {})), function (e) {
        e[e.NO_TOPMOST_MODE = 0] = "NO_TOPMOST_MODE", e[e.PLAYING_TOPMOST_MODE = 1] = "PLAYING_TOPMOST_MODE", e[e.ALWAYLS_TOPMOST_MODE = 2] = "ALWAYLS_TOPMOST_MODE"
    }(t.WindowTopMode || (t.WindowTopMode = {})), function (e) {
        e[e.RGN_AND = 1] = "RGN_AND", e[e.RGN_OR = 2] = "RGN_OR", e[e.RGN_XOR = 3] = "RGN_XOR", e[e.RGN_DIFF = 4] = "RGN_DIFF", e[e.RGN_COPY = 5] = "RGN_COPY"
    }(t.CombineRgnType || (t.CombineRgnType = {})), function (e) {
        e[e.PLAY_UNKNOWN = 0] = "PLAY_UNKNOWN", e[e.PLAY_BY_DOWNLOAD = 1] = "PLAY_BY_DOWNLOAD", e[e.PLAY_BY_PAN = 2] = "PLAY_BY_PAN"
    }(t.XmpPlaySoure || (t.XmpPlaySoure = {})), function (e) {
        e.onOpenSucceeded = "OnOpenSucceeded", e.onOpenFailed = "OnOpenFailed", e.onPlayFailed = "OnPlayFailed", e.onPlaying = "OnPlaying", e.onPreOpen = "OnPreOpen", e.onPaused = "OnPaused", e.onPlayCompleted = "OnPlayCompleted", e.onPreStop = "OnPreStop", e.onStop = "OnStop", e.onXmpQuit = "OnXmpQuit", e.onXmpStartFailed = "OnXmpStartFailed", e.onError = "OnError"
    }(t.XmpEvent || (t.XmpEvent = {})), function (e) {
        e[e.Invalid = -100] = "Invalid", e[e.PreOpen = -10] = "PreOpen", e[e.QueryExt = -9] = "QueryExt", e[e.DownloadTorrent = -3] = "DownloadTorrent", e[e.ParserTorrent = -2] = "ParserTorrent", e[e.GetPlayUrl = -1] = "GetPlayUrl", e[e.Ready = 0] = "Ready", e[e.Opening = 1] = "Opening", e[e.Pausing = 2] = "Pausing", e[e.Paused = 3] = "Paused", e[e.Playing = 4] = "Playing", e[e.Play = 5] = "Play", e[e.Closeing = 6] = "Closeing", e[e.Completed = 7] = "Completed", e[e.Stopped = 8] = "Stopped", e[e.Error = 9] = "Error"
    }(t.XmpMediaState || (t.XmpMediaState = {})), function (e) {
        e[e.AbeLeft = 0] = "AbeLeft", e[e.AbeTop = 1] = "AbeTop", e[e.AbeRright = 2] = "AbeRright", e[e.AbeBottom = 3] = "AbeBottom"
    }(t.WindowTaskBarAbe || (t.WindowTaskBarAbe = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(19), o = i(5), a = i(121), r = i(122);
    !function (e) {
        e.mainProcessContext = "main-process", e.mainRendererContext = "main-renderer", e.mainPageWebviewRendererContext = "main-page-webview-renderer", e.newTaskRendererContext = "new-task-renderer", e.preNewTaskRendererContext = "pre-new-task-renderer", e.loginRendererContext = "login-renderer";

        class t {
            constructor() {
                this.isConnected = !1, this.isOnIPCEvent = !1, this.rendererInfos = [], this.listeners = new Map, t.intervalIPCModuleMsgs = [r.CommonIPCMessage.msgIPCRendererConnect, r.CommonIPCMessage.msgIPCRendererDisconnect]
            }

            onMessage(e, t) {
                do {
                    if (!o.isString(e) || 0 === e.length) {
                        a.error("msgName is null");
                        break
                    }
                    if (o.isNullOrUndefined(t)) {
                        a.error("listener is null");
                        break
                    }
                    this.listeners.has(e) ? this.listeners.get(e).push(t) : this.listeners.set(e, [t])
                } while (0)
            }

            getCommunicatorInfo() {
                return this.currInfo
            }

            getAllRenderer() {
                return this.rendererInfos
            }

            getCommunicatorInfoById(e) {
                for (let t of this.rendererInfos) if (t.id === e) return t;
                return null
            }

            getCommunicatorInfoByContext(e) {
                for (let t of this.rendererInfos) if (t.context === e) return t;
                return null
            }

            startListenIPCMessage(e) {
                this.isOnIPCEvent || (this.isOnIPCEvent = !0, e && this.ListenSendToMainMsg(), this.ListenSendToRendererMsg(e))
            }

            ListenSendToMainMsg() {
                n.ipcMain.on(r.CommonIPCMessage.msgIPCSendToMain, (e, t) => {
                    let i = void 0;
                    do {
                        if (o.isNullOrUndefined(t)) {
                            a.error("msgInfo is empty");
                            break
                        }
                        if (!this.isConnected) {
                            a.warning("hasnot been connected yet");
                            break
                        }
                        let n = t.msg.name;
                        if (this.isIPCModuleIntervalMsg(n)) {
                            a.information(`IPC module interval msg : ${n}`);
                            let o = this.handleIPCModuleIntervalMsg(e.sender, t);
                            if (i = o[1], !o[0]) break;
                            a.information("need to dispatch msg:" + n)
                        }
                        o.isNullOrUndefined(i) ? i = this.NotifyListener(t) : this.NotifyListener(t)
                    } while (0);
                    o.isNullOrUndefined(i) || (e.returnValue = i), t = null
                })
            }

            ListenSendToRendererMsg(e) {
                (e ? n.ipcMain : n.ipcRenderer).on(r.CommonIPCMessage.msgIPCSendToRenderer, (t, i) => {
                    let n = void 0;
                    do {
                        if (o.isNullOrUndefined(i)) {
                            a.error("msgInfo is empty");
                            break
                        }
                        if (!this.isConnected) {
                            a.warning("hasnot been connected yet");
                            break
                        }
                        let r = i.msg.name;
                        if (this.isIPCModuleIntervalMsg(r)) {
                            a.information(`IPC module interval msg : ${r}`);
                            let e = this.handleIPCModuleIntervalMsg(t.sender, i);
                            if (n = e[1], !e[0]) break;
                            a.information("need to dispatch msg:" + r)
                        }
                        e ? (a.information("is main, handle forward msg"), this.handleForwardRendererToRendererMsg(i)) : (a.information("is renderer, handle business msg"), o.isNullOrUndefined(n) ? n = this.NotifyListener(i) : this.NotifyListener(i))
                    } while (0);
                    o.isNullOrUndefined(n) || (t.returnValue = n), i = null
                })
            }

            isIPCModuleIntervalMsg(e) {
                for (let i of t.intervalIPCModuleMsgs) if (e === i) return !0;
                return !1
            }

            handleIPCModuleIntervalMsg(e, t) {
                let i = [!1, void 0];
                do {
                    let n = t.msg.name;
                    if (n === r.CommonIPCMessage.msgIPCRendererConnect) {
                        i = [!0, this.handleRendererConnectMsg(e, t)];
                        break
                    }
                    if (n === r.CommonIPCMessage.msgIPCRendererDisconnect) {
                        i = [!0, this.handleRendererDisconnectMsg(e, t)];
                        break
                    }
                } while (0);
                return i
            }

            handleRendererConnectMsg(e, t) {
                a.verbose(e), a.verbose(t)
            }

            handleRendererDisconnectMsg(e, t) {
                a.verbose(e), a.verbose(t)
            }

            handleForwardRendererToRendererMsg(e) {
                this.sendForwardRendererToRendererMsg(e)
            }

            sendForwardRendererToRendererMsg(e) {
                a.verbose(e)
            }

            NotifyListener(e) {
                let t = void 0, i = e.msg.name;
                if (this.listeners.has(i)) {
                    let n = this.listeners.get(i), o = !0;
                    for (let i of n) o ? (o = !1, t = i(e)) : i(e)
                }
                return t
            }
        }

        e.Communicator = t
    }(t.CommonIPCBase || (t.CommonIPCBase = {}))
}, function (e, t) {
    e.exports = require("crypto")
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), a = i(22), r = i(3), s = i(58), l = i(0).default.getLogger("ThunderBirdKey");
    var d;
    !function (e) {
        e[e.ShowUI_Decoding = 0] = "ShowUI_Decoding", e[e.ShowUI_Creating = 1] = "ShowUI_Creating", e[e.ShowUI_DecodeFailed = 2] = "ShowUI_DecodeFailed", e[e.ShowUI_CreateFailed = 3] = "ShowUI_CreateFailed", e[e.ShowUI_CreateSucc = 4] = "ShowUI_CreateSucc", e[e.ShowUI_CreateSuccDis = 5] = "ShowUI_CreateSuccDis"
    }(d = t.ShowType || (t.ShowType = {}));

    class u {
        constructor() {
            this.lastBirdKey = []
        }

        static GetInstance() {
            return u.instance || (u.instance = new u), u.instance
        }

        setLastBirdKey(e) {
            if (e && 0 !== e.length) {
                this.lastBirdKey = [];
                for (let t = 0; t < e.length; t++) this.lastBirdKey.push(e[t])
            }
        }

        getLastBirdKey() {
            return this.lastBirdKey
        }

        isSameBirdKey(e) {
            if (!this.lastBirdKey) return !1;
            if (e.length !== this.lastBirdKey.length) return !1;
            let t = 0;
            for (let i = 0; i < e.length; i++) e[i] === this.lastBirdKey[i] && t++;
            return t === e.length
        }
    }

    function c(e, t, i, n, a) {
        let r = {url: "/dlj_create", data: Object.assign({url: e, "Chat-Version": 2}, a), method: "post"};
        return "string" == typeof i && (r.data.type = i), t && (r.data.uid = t), "string" == typeof n && (r.data.passwd = n), o.fetchSlRes(r)
    }

    function h(e, t, i, n) {
        return c(e, t, i, void 0, n)
    }

    u.instance = null, t.encodeBirdKey = c, t.setBirdKeyPriority = function (e, t, i = !1) {
        return o.fetchSlRes({url: "/dlj/option", data: {url: e, priority: i, "Chat-Version": 2}, method: "put"})
    }, t.queryBirdKeyInfo = h, t.getUserNameByID = function (e) {
        return o.fetchSlRes({url: "/user_info/pc_info", data: {uid: e}})
    }, t.decodeBirdKey = function (e) {
        return n(this, void 0, void 0, function* () {
            let t = yield r.client.callServerFunction("GetThunderVersion");
            return o.fetchSlRes({
                url: "/dlj/bird_key",
                data: {_h: {"Chat-Version": 2, "Version-Name": t}, key: e.toLowerCase()},
                method: "get"
            })
        })
    }, t.openBirdKeyEncodeDialog = function (e, t) {
        return n(this, void 0, void 0, function* () {
            let i = function (e, t) {
                l.information("弹出生成迅雷口令面板,begin,url=", e), a.MessageBox.custom("BirdKeyShow", {
                    showType: d.ShowUI_Creating,
                    url: e,
                    statData: t
                }, {modal: !1}).catch(e => {
                    l.information("弹出生成迅雷口令面板,error=", e)
                }), l.information("弹出生成迅雷口令面板,end")
            };
            l.information("调用promise IsLogined 函数 Begin");
            let o = yield r.client.callServerFunction("IsLogined");
            l.information("调用promise IsLogined 函数 End, isLogined=", o), o ? i(e, t) : h(e).then(o => n(this, void 0, void 0, function* () {
                if ("object" != typeof o) return Promise.resolve();
                if (!o.data) return Promise.resolve();
                if ("encrypted" === o.data.type) {
                    let n = yield s.default(!1, !0, "birdkey");
                    if (!n || "" === n) return;
                    i(e, t)
                } else i(e, t);
                return Promise.resolve()
            })).catch(e => {
                l.information("调用queryBirdKeyInfo 接口异常 error=", e)
            })
        })
    }, t.openBirdKeyDecodeDialog = function (e, t) {
        a.MessageBox.custom("BirdKeyShow", {
            showType: d.ShowUI_Decoding,
            birdkeyChars: e,
            statData: t
        }, {modal: !1}).catch()
    }, t.saveVestUrlToConfig = function (e, t) {
        let i = t ? "vestURL" : "commonUrl";
        r.client.callServerFunction("GetValue", "BirdKeyVest", i, []).then(t => {
            let n = t || [];
            "" !== e && -1 === n.join().indexOf(e) && (n.push(e), r.client.callServerFunction("SetValue", "BirdKeyVest", i, n).catch())
        }).catch()
    }, t.isVestUrl = function (e, t) {
        return n(this, void 0, void 0, function* () {
            let i = yield r.client.callServerFunction("GetValue", "BirdKeyVest", t, []);
            return "" !== e && -1 !== (i || []).join().indexOf(e)
        })
    }, t.getBirdKeyMgr = function () {
        return u.GetInstance()
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(104), r = i(128), s = i(384), l = i(0), d = i(5), u = i(28), c = i(36), h = i(27), f = i(12),
        p = i(25), g = i(9), m = i(50), v = i(7), y = l.default.getLogger("Thunder.MainRenderer.TabsBrowser"),
        T = v.default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    let w = [".xunlei.com", "h5-pccloud.onethingpcs.com"];
    var k;
    !function (e) {
        e[e.XDAS = 0] = "XDAS", e[e.Chromium = 1] = "Chromium", e[e.IE = 2] = "IE", e[e.Other = 3] = "Other"
    }(k = t.TabType || (t.TabType = {}));

    class C extends c.NativeCall {
        constructor() {
            super(), this.canGoForward = !1, this.canGoBack = !1, this.url = "", this.curUrl = "", this.iconUrl = "", this.originalUrl = "", this.isErrorPage = !1, this.isLoadingPage = !0, this.hideUI = !1, this.state = "loading", this.extData = "", this.pinned = !1, this.isEmbeddedBrowser = !1, y.information("tab construct"), this.beforeCloseExtra = null, y.information("init beforeClose null", this.beforeCloseExtra)
        }

        initTab(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = !1;
                do {
                    if (d.isNullOrUndefined(e)) {
                        y.warning(e);
                        break
                    }
                    this.type = e, this.originalUrl = t.url, this.curUrl = t.url || "", this.name = t.name, this.index = t.index, this.showUrl = !("showUrl" in t) || t.showUrl, this.hideUI = "hideUI" in t && t.hideUI, this.isEmbeddedBrowser = !!t.isEmbeddedBrowser, this.extData = t.extData, this.hideUI && (this.showUrl = !1), void 0 !== t.pinned && "boolean" == typeof t.pinned && (this.pinned = t.pinned), e === k.XDAS ? n = this.xdasTabInit(t) : e === k.Chromium ? n = yield this.chromiumTabInit(t, i) : e === k.IE && (n = this.ieTabInit(t))
                } while (0);
                return n
            })
        }

        navigate(e) {
            let t = !1;
            do {
                if (this.type !== k.Chromium) {
                    y.warning(this.type);
                    break
                }
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                this.browser.navigate(e, "", "", !1), this.isDefaultTab() || this.setShowUrl(!0), t = !0
            } while (0);
            return t
        }

        refresh(e) {
            do {
                if (this.type !== k.Chromium) {
                    y.warning(this.type);
                    break
                }
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                if (d.isNullOrUndefined(e)) {
                    y.warning(e);
                    break
                }
                this.state = "loading", this.browser.refresh()
            } while (0);
            return !1
        }

        stop() {
            do {
                if (this.type !== k.Chromium) {
                    y.warning(this.type);
                    break
                }
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                this.browser.stop()
            } while (0);
            return !1
        }

        goForward() {
            do {
                if (this.type !== k.Chromium) {
                    y.warning(this.type);
                    break
                }
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                this.browser.goForward()
            } while (0);
            return !1
        }

        goBack() {
            do {
                if (this.type !== k.Chromium) {
                    y.warning(this.type);
                    break
                }
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                this.browser.goBack()
            } while (0);
            return !1
        }

        showDevTool(e) {
            do {
                if (this.type !== k.Chromium) {
                    y.warning(this.type);
                    break
                }
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                if (d.isNullOrUndefined(e)) {
                    y.warning(e);
                    break
                }
                this.browser.showDevTool(e)
            } while (0);
            return !1
        }

        destroyBrowser(e) {
            do {
                if (this.type !== k.Chromium) {
                    y.warning(this.type);
                    break
                }
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                if (d.isNullOrUndefined(e)) {
                    y.warning(e);
                    break
                }
                this.browser.destroy(e), this.browser.removeAllListeners()
            } while (0);
            return !1
        }

        viewSource() {
            do {
                if (this.type !== k.Chromium) break;
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                this.browser.viewSource()
            } while (0);
            return !1
        }

        attachListener(e) {
            do {
                if (this.type !== k.Chromium) break;
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                if (d.isNullOrUndefined(e) || d.isNullOrUndefined(e.eventName) || d.isNullOrUndefined(e.listener)) {
                    y.warning(e);
                    break
                }
                let t = [{eventName: e.eventName, listener: e.listener}];
                this.attachBrowserEvents(this.browser, t)
            } while (0);
            return 0
        }

        detachListener(e) {
            let t = !1;
            do {
                if (d.isNullOrUndefined(e)) {
                    y.warning(e);
                    break
                }
                if (d.isNullOrUndefined(e.eventName) || "" === e.eventName) {
                    y.warning(e.eventName);
                    break
                }
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                if (this.type !== k.Chromium) break;
                this.browser.removeListener(e.eventName, e.listener), t = !0
            } while (0);
            return t
        }

        getTabType() {
            return this.type
        }

        getTitle() {
            return this.title
        }

        getOriginalUrl() {
            return this.originalUrl
        }

        getPinned() {
            return this.pinned
        }

        getBeforeCloseExtra() {
            return this.beforeCloseExtra
        }

        setBeforeCloseExtra(e) {
            this.beforeCloseExtra = e
        }

        getCurUrl() {
            return this.curUrl
        }

        setTitle(e) {
            return !d.isNullOrUndefined(e) && (this.title = e, !0)
        }

        setIconUrl(e) {
            return !d.isNullOrUndefined(e) && (this.iconUrl = e, !0)
        }

        setCurUrl(e) {
            return !d.isNullOrUndefined(e) && (this.curUrl = e, !0)
        }

        addExtData(e) {
            if (d.isNullOrUndefined(e)) return !1;
            let t = JSON.parse(e), i = JSON.parse(this.extData);
            return Object.assign(i, t), this.extData = JSON.stringify(i), !0
        }

        setExtData(e) {
            return !d.isNullOrUndefined(e) && (this.extData = e, !0)
        }

        getExtData() {
            return this.extData || ""
        }

        getSearchFrom() {
            let e = "";
            do {
                if (!this.extData) break;
                let t = null;
                try {
                    t = JSON.parse(this.extData)
                } catch (e) {
                }
                t && t.search_from && (e = t.search_from)
            } while (0);
            return e
        }

        getBrowser() {
            return this.browser
        }

        attachListeners(e) {
            do {
                if (d.isNullOrUndefined(this.browser)) {
                    y.warning(this.browser);
                    break
                }
                this.type === k.Chromium && this.attachBrowserEvents(this.browser, e)
            } while (0)
        }

        callNativeFunctionCallback(e, t, ...i) {
            let n = !1;
            do {
                if (d.isNullOrUndefined(t)) {
                    y.warning(t);
                    break
                }
                if (i && [1, 2, 3, 4].includes(i[0])) {
                    let e = null === p.default.getJsonData() ? 1 : 0;
                    g.XLStatNS.trackEvent("business", "native_Interface_invoke_fail", "", 0, 0, 0, 0, `err_code=${i[0]},config_empty=${e}`)
                }
                if (this.type === k.XDAS) {
                    if (d.isNullOrUndefined(u.NativeCallHostModule.nativeCallHost)) {
                        y.warning(u.NativeCallHostModule.nativeCallHost);
                        break
                    }
                    u.NativeCallHostModule.nativeCallHost.callJsFunctionById.apply(u.NativeCallHostModule.nativeCallHost, [e].concat(t, i)), n = !0
                } else if (this.type === k.Chromium) {
                    if (d.isNullOrUndefined(this.browser)) {
                        y.warning(this.browser);
                        break
                    }
                    this.browser.callJsFunctionById(t, ...i), n = !0
                }
            } while (0);
            return n
        }

        callJSFunction(e, t, ...i) {
            let n = !1;
            do {
                if (d.isNullOrUndefined(t) || "" === t) {
                    y.warning(t);
                    break
                }
                if (this.type === k.XDAS) {
                    if (d.isNullOrUndefined(u.NativeCallHostModule.nativeCallHost)) {
                        y.warning(u.NativeCallHostModule.nativeCallHost);
                        break
                    }
                    u.NativeCallHostModule.nativeCallHost.callJsFunctionByName(e, t, i), n = !0
                } else if (this.type === k.Chromium) {
                    if (d.isNullOrUndefined(this.browser)) {
                        y.warning(this.browser);
                        break
                    }
                    this.browser.callJsFunctionByName(t, ...i), n = !0
                }
            } while (0);
            return n
        }

        fireEvent(e, ...t) {
            let i = !1;
            do {
                if (d.isNullOrUndefined(e) || "" === e) {
                    y.warning(e);
                    break
                }
                if (this.type === k.XDAS) {
                    if (d.isNullOrUndefined(u.NativeCallHostModule.nativeCallHost)) {
                        y.warning(u.NativeCallHostModule.nativeCallHost);
                        break
                    }
                    u.NativeCallHostModule.nativeCallHost.fireNativeEvent.apply(u.NativeCallHostModule.nativeCallHost, [e].concat(t)), i = !0
                } else if (this.type === k.Chromium) {
                    if (d.isNullOrUndefined(this.browser)) {
                        y.warning(this.browser);
                        break
                    }
                    this.browser.fireEvent(e, ...t), i = !0
                }
            } while (0);
            return i
        }

        onJsCallNativeFunction(e, t, i, n) {
            let o = !1;
            do {
                if (d.isNullOrUndefined(e) && y.warning(e), d.isNullOrUndefined(t) || "" === t) {
                    y.warning(t);
                    break
                }
                if (d.isNullOrUndefined(c.NativeCall.nativeFunctionContainer)) {
                    y.warning(c.NativeCall.nativeFunctionContainer);
                    break
                }
                let a = c.NativeCall.nativeFunctionContainer.filter(e => t === e.functionName), r = void 0,
                    s = h.NativeFunctionErrorCode.Success, l = this.browser && n && n.length > 0 ? n[0] : void 0;
                y.information("frameurl", l, t, ...n), this.browser && (n = n && n.length > 0 ? n.slice(1) : n), y.information("curUrl:", this.curUrl);
                let f = p.default.getConfigInfo("nativeFunc", "domains") || w,
                    g = this.isUrlInDomains(this.curUrl, f, l);
                if (!g) {
                    let e = p.default.getConfigInfo("nativeFunc", "limitDomains");
                    if (e) for (let i = 0; i < e.length; ++i) {
                        let n = e[i];
                        if (n && n.domains && n.funcs && n.funcs.includes(t) && (g = this.isUrlInDomains(this.curUrl, n.domains, l))) break
                    }
                }
                if (!g && !d.isNullOrUndefined(this.browser) && this.type === k.Chromium) {
                    s = h.NativeFunctionErrorCode.NotAllowed, this.browser.callJsFunctionById(i, s);
                    break
                }
                if (d.isNullOrUndefined(a) || 0 === a.length || d.isNullOrUndefined(a[0].nativeFunc)) {
                    if (s = h.NativeFunctionErrorCode.FunctionUnExist, d.isNullOrUndefined(i)) {
                        o = !0;
                        break
                    }
                    if (this.type === k.XDAS) {
                        if (d.isNullOrUndefined(u.NativeCallHostModule.nativeCallHost)) {
                            y.warning(u.NativeCallHostModule.nativeCallHost);
                            break
                        }
                        u.NativeCallHostModule.nativeCallHost.callJsFunctionById.apply(u.NativeCallHostModule.nativeCallHost, [e].concat(i, s, r))
                    } else if (this.type === k.Chromium) {
                        if (d.isNullOrUndefined(this.browser)) {
                            y.warning(this.browser);
                            break
                        }
                        this.browser.callJsFunctionById(i, s)
                    }
                } else a[0].nativeFunc(this, e, i, n)
            } while (0);
            return o
        }

        onJsCheckNativeFunction(e, t, i) {
            do {
                if (d.isNullOrUndefined(e) && y.warning(e), d.isNullOrUndefined(i)) break;
                if (d.isNullOrUndefined(t) || "" === t) {
                    y.warning(t);
                    break
                }
                if (d.isNullOrUndefined(c.NativeCall.nativeFunctionContainer)) {
                    y.warning(c.NativeCall.nativeFunctionContainer);
                    break
                }
                let n = c.NativeCall.nativeFunctionContainer.filter(e => t === e.functionName),
                    o = h.NativeFunctionErrorCode.Success;
                if ((d.isNullOrUndefined(n) || d.isNullOrUndefined(n[0]) || d.isNullOrUndefined(n[0].nativeFunc)) && (o = h.NativeFunctionErrorCode.FunctionUnExist, y.warning(n)), this.type === k.XDAS) {
                    if (d.isNullOrUndefined(u.NativeCallHostModule.nativeCallHost)) {
                        y.warning(u.NativeCallHostModule.nativeCallHost);
                        break
                    }
                    u.NativeCallHostModule.nativeCallHost.callJsFunctionById(e, i, o)
                } else if (this.type === k.Chromium) {
                    if (d.isNullOrUndefined(this.browser)) {
                        y.warning(this.browser);
                        break
                    }
                    this.browser.callJsFunctionById(i, o)
                }
            } while (0);
            return !1
        }

        isDefaultTab() {
            return this.url.split("#")[0] === C.defaultBrowserUrl
        }

        setShowUrl(e) {
            this.showUrl = e
        }

        xdasTabInit(e) {
            return d.isNullOrUndefined(e) && (e = {}), void 0 === e.title ? this.title = C.defaultXDASTitle : this.title = e.title, this.state = "loaded", this.isLoadingPage = !1, !0
        }

        trackBrowserEvent(e, t, i = "") {
            do {
                if (!t || "" === t) break;
                let n = m.parse(t);
                if (n.host && n.host.indexOf(".xunlei.com") < 0) break;
                i = i + (i.length > 0 ? "," : "") + "url=" + encodeURIComponent(t), g.XLStatNS.trackEvent("new_tab", e, "", 0, 0, 0, 0, i)
            } while (0)
        }

        chromiumTabInit(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                if (this.browser) return !0;
                d.isNullOrUndefined(e) && (e = {});
                do {
                    d.isNullOrUndefined(e.url) && (e.url = C.defaultBrowserUrl, this.curUrl = e.url), r.BrowserSupportNS.browserIsInitFinish() || (this.trackBrowserEvent("browser_load_init", e.url), yield r.BrowserSupportNS.initTBC()), void 0 === e.title ? this.title = C.defaultBrowserTitle : this.title = e.title, void 0 === e.isFromPopup && (e.isFromPopup = !1), void 0 === e.eventListeners ? e.eventListeners = C.defaultEventList : e.eventListeners = e.eventListeners.concat(C.defaultEventList);
                    let n = yield f.asyncRemoteCall.getCurrentWindow();
                    if (void 0 === e.parentHwnd) if (e.isFromPopup) e.parentHwnd = t.target.getParentWindowHandle(); else {
                        let t = (yield n.getNativeWindowHandle()).readUIntLE(0, 4);
                        e.parentHwnd = t
                    }
                    void 0 === e.rect && (e.rect = yield s.BrowserWindowNS.getBrowserWindowPosition(T, n, this.isEmbeddedBrowser)), y.information("stroe chromiumTab Init param", e), this.trackBrowserEvent("browser_load_create", e.url);
                    let o = new a.Browser;
                    if (o.init({
                        rect: e.rect,
                        parent_window: e.parentHwnd,
                        is_popup: e.isFromPopup,
                        url: e.url,
                        visible: !(!0 === e.hideUI)
                    }), d.isNullOrUndefined(o)) {
                        y.warning(o);
                        break
                    }
                    e.isFromPopup && t && (t.returnValue = o), this.browser = o, o.addCustomProtocol("ed2k://"), o.addCustomProtocol("thunder://"), o.addCustomProtocol("magnet:?"), o.registerHotKey(116, 4), o.registerHotKey(116, 0), o.registerHotKey(84, 4), o.registerHotKey(82, 4), o.registerHotKey(87, 4), this.attachBrowserEvents(o, e.eventListeners), i = !0
                } while (0);
                return i
            })
        }

        attachBrowserEvents(e, t) {
            do {
                if (d.isNullOrUndefined(e)) {
                    y.warning(e);
                    break
                }
                if (this.type === k.Chromium) for (let i of t) if (!(d.isNullOrUndefined(i) || d.isNullOrUndefined(i.eventName) || d.isNullOrUndefined(i.listener))) switch (i.eventName) {
                    case"init-done":
                        e.on("init-done", i.listener);
                        break;
                    case"before-nav":
                        e.on("before-nav", i.listener);
                        break;
                    case"title-change":
                        e.on("title-change", i.listener);
                        break;
                    case"favicon-url-change":
                        e.on("favicon-url-change", i.listener);
                        break;
                    case"address-change":
                        e.on("address-change", i.listener);
                        break;
                    case"new-browser-popup":
                        e.on("new-browser-popup", i.listener);
                        break;
                    case"open-url-from-tab":
                        e.on("open-url-from-tab", i.listener);
                        break;
                    case"close":
                        e.on("close", i.listener);
                        break;
                    case"loading-state-change":
                        e.on("loading-state-change", i.listener);
                        break;
                    case"load-start":
                        e.on("load-start", i.listener);
                        break;
                    case"load-end":
                        e.on("load-end", i.listener);
                        break;
                    case"load-error":
                        e.on("load-error", i.listener);
                        break;
                    case"destroyed":
                        e.on("destroyed", i.listener);
                        break;
                    case"custom-protocol-execution":
                        e.on("custom-protocol-execution", i.listener);
                        break;
                    case"before-download":
                        e.on("before-download", i.listener);
                        break;
                    case"before-context-menu":
                        e.on("before-context-menu", i.listener);
                        break;
                    case"context-menu-command":
                        e.on("context-menu-command", i.listener);
                        break;
                    case"got-focus":
                        e.on("got-focus", i.listener);
                        break;
                    case"hotkey":
                        e.on("hotkey", i.listener);
                        break;
                    case"call-native-func":
                        e.on("call-native-func", i.listener);
                        break;
                    case"check-native-func":
                        e.on("check-native-func", i.listener)
                }
            } while (0)
        }

        ieTabInit(e) {
            return void 0 === e.title ? this.title = C.defaultBrowserTitle : this.title = e.title, !0
        }

        isUrlInDomains(e, t, i) {
            let n = !1;
            for (let o = 0; o < t.length; ++o) if (e.includes(t[o]) || i && i.includes(t[o])) {
                n = !0;
                break
            }
            return n
        }
    }

    C.defaultXDASTitle = "下载", C.defaultBrowserTitle = "正在加载...", C.defaultBrowserUrl = "http://misc.xl9.xunlei.com/chrome/client/view/dist/1.0/new_tab.html", C.defaultEventList = [], C.tempBrowser = null, t.Tab = C
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(2), r = i(29), s = i(8), l = i(7), d = i(10), u = i(13), c = i(150), h = i(0), f = i(3),
        p = i(23), g = i(39), m = i(25), v = h.default.getLogger("AdHelperNS"),
        y = l.default(a.join(__rootDir, "../bin/ThunderHelper.node"));
    o.default.defaults.headers["Content-Type"] = "application/x-www-form-urlencoded";
    const T = "1.0", w = "14", k = "1b301990901c336d84fbdd8bc8dda35c";
    !function (e) {
        let t;

        function i(e) {
            let t = "";
            do {
                if (null === e || void 0 === e) break;
                Object.keys(e).forEach(i => {
                    let n = e[i];
                    t = `${t}${i}=${n}`
                }), t = `${t}${k}`, t = r.ToolsUtilitiesAWNS.genarateMd5(t)
            } while (0);
            return t
        }

        function l() {
            return n(this, void 0, void 0, function* () {
                let e = t.unLogin;
                if (yield p.LoginHelperNS.loginHelper.isLoginedAw()) {
                    let i = yield p.LoginHelperNS.loginHelper.getAllUserInfoAw();
                    if (null === i || void 0 === i || null === i.vipList || void 0 === i.vipList || i.vipList.length <= 0) e = t.noVip; else {
                        let n = i.vipList[0], o = Number(n.isVip), a = Number(n.vasType), r = Number(n.isYear);
                        0 === o ? e = t.noVip : 3 === a ? e = 0 !== r ? t.bjN : t.bjVip : 5 === a && (e = 0 !== r ? t.cjN : t.cjVip)
                    }
                }
                return e
            })
        }

        function h(e) {
            return n(this, void 0, void 0, function* () {
                let t = "", n = {appId: w, callId: Date.now()};
                return Object.assign(n, e), n.sig = i(n), Object.keys(n).forEach(e => {
                    let i = n[e];
                    t = "" === t ? `${e}=${encodeURIComponent(i)}` : `${t}&${e}=${encodeURIComponent(i)}`
                }), t
            })
        }

        function C() {
        }

        !function (e) {
            e.unLogin = "1", e.noVip = "2", e.bjVip = "21", e.cjVip = "22", e.bjN = "23", e.cjN = "24", e.knVip = "41", e.knN = "42"
        }(t || (t = {})), e.getAdDataAw = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = null;
                do {
                    let a = m.default.getConfigInfo("ad", "enable");
                    if (0 === a) {
                        v.information("获取到的配置中信息，不显示广告 enable = ", a);
                        break
                    }
                    if (null === e || void 0 === e) break;
                    let r = `${C()}/api/adp/get`, s = null, d = "";
                    d = void 0 === i || null === i || !1 === i ? "" : yield l();
                    let u = yield h({
                        devicId: y.getPeerID(),
                        identity: d,
                        isAll: 1,
                        positionId: e,
                        shownOrderId: t,
                        v: T
                    });
                    v.information("getAdDataAw:", r, u);
                    try {
                        null !== (s = yield o.default({
                            method: "post",
                            url: r,
                            data: u
                        })) && void 0 !== s && 200 === s.status && void 0 !== s.data && null !== s.data && "" !== s.data && (n = s.data)
                    } catch (e) {
                        v.information(e)
                    }
                } while (0);
                return n
            })
        }, e.getHotWordsAw = function (e = 1, t = !0) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                do {
                    yield m.default.isInitedAw();
                    let i = m.default.getConfigInfo("ad", "hotwordsEnable");
                    if (0 === i) {
                        v.information("获取到的配置中信息，不显示热词 enable = ", i);
                        break
                    }
                    let n = `${C()}/api/adp/hotword`, a = null, r = yield h({count: e});
                    v.information("getHotWordsAw:", n, r);
                    try {
                        null !== (a = yield o.default({
                            method: "get",
                            url: n + "?" + r
                        })) && void 0 !== a && 200 === a.status && void 0 !== a.data && null !== a.data && "" !== a.data && (t = a.data)
                    } catch (e) {
                        v.information(e)
                    }
                } while (0);
                return t
            })
        }, e.statServer = function (e, t, a) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (null === e || void 0 === e || null === t || void 0 === t || null === a || void 0 === a) break;
                    let n = {positionId: e, orderId: t, statType: a, statValue: 1}, r = [];
                    r.push(n);
                    let s = {
                        appId: w,
                        callId: Date.now(),
                        guid: y.getPeerID(),
                        identity: "",
                        items: JSON.stringify(r),
                        positionId: e,
                        v: T
                    };
                    s.sig = i(s);
                    let l = "";
                    Object.keys(s).forEach(e => {
                        let t = s[e];
                        l = "" === l ? `${e}=${encodeURIComponent(t)}` : `${l}&${e}=${encodeURIComponent(t)}`
                    });
                    let d = `${C()}/api/adp/addStat`, u = null;
                    v.information("statServer:", d, l);
                    try {
                        null !== (u = yield o.default({
                            method: "post",
                            url: d,
                            data: l
                        })) && void 0 !== u && 200 === u.status && void 0 !== u.data && null !== u.data && "" !== u.data && v.information(u.data)
                    } catch (e) {
                        v.information(e)
                    }
                } while (0)
            })
        }, e.getCurDate = function () {
            let e = "", t = new Date;
            return e = `${t.getFullYear()}${t.getMonth() + 1}${t.getDate()}`
        }, e.onConfigInitAw = function () {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    d.ConfigNS.attachListener(u.NodeEventMesssageNS.eventConfigInitFinished, () => {
                        e(!0)
                    })
                })
            })
        }, e.loadScene = function (e) {
            return n(this, void 0, void 0, function* () {
                v.information("loadScene enter");
                let t = null, i = a.join(e, "index.js");
                return (yield s.FileSystemAWNS.existsAW(i)) && (t = require(i)), v.information("loadScene leave ", t), t
            })
        }, e.execute = function (e, t, i) {
            let n = 0;
            do {
                let o = t;
                if (null !== o && void 0 !== o && "" !== o || (o = i), null === o || void 0 === o || "" === o) break;
                if (e === c.AdCommonNS.OpenType.tab) {
                    f.client.callServerFunction("OpenNewTab", o).catch();
                    break
                }
                if (e === c.AdCommonNS.OpenType.app) {
                    let t = "file://";
                    if (o.indexOf(t) < 0) null !== i && void 0 !== i && "" !== i && f.client.callServerFunction("OpenNewTab", i).catch(); else {
                        let r = o.substring(t.length);
                        r = a.join(__rootDir, `../../../${r}`), n = y.shellExecute(0, "open", r, "", "", "SW_SHOW"), v.information("execute:", e, r, n), n <= 32 && null !== i && void 0 !== i && "" !== i && f.client.callServerFunction("OpenNewTab", i).catch()
                    }
                    break
                }
                if (e === c.AdCommonNS.OpenType.download) {
                    let e = [];
                    e.push(o), g.ThunderNewTask.createPreNewTaskWindow(e);
                    break
                }
                e === c.AdCommonNS.OpenType.defaultBrowser ? n = y.openURLByDefault(o) : e === c.AdCommonNS.OpenType.ieBrowser && (n = y.openURLByIEorDefault(o))
            } while (0);
            return n
        }
    }(t.AdHelperNS || (t.AdHelperNS = {}))
}, function (e, t) {
    (function () {
        var t, i, n, o, a, r, s = [].slice, l = {}.hasOwnProperty;
        t = function () {
            var e, t, i, n, a, r;
            if (r = arguments[0], a = 2 <= arguments.length ? s.call(arguments, 1) : [], o(Object.assign)) Object.assign.apply(null, arguments); else for (e = 0, i = a.length; e < i; e++) if (null != (n = a[e])) for (t in n) l.call(n, t) && (r[t] = n[t]);
            return r
        }, o = function (e) {
            return !!e && "[object Function]" === Object.prototype.toString.call(e)
        }, a = function (e) {
            var t;
            return !!e && ("function" == (t = typeof e) || "object" === t)
        }, i = function (e) {
            return o(Array.isArray) ? Array.isArray(e) : "[object Array]" === Object.prototype.toString.call(e)
        }, n = function (e) {
            var t;
            if (i(e)) return !e.length;
            for (t in e) if (l.call(e, t)) return !1;
            return !0
        }, r = function (e) {
            var t, i;
            return a(e) && (i = Object.getPrototypeOf(e)) && (t = i.constructor) && "function" == typeof t && t instanceof t && Function.prototype.toString.call(t) === Function.prototype.toString.call(Object)
        }, e.exports.assign = t, e.exports.isFunction = o, e.exports.isObject = a, e.exports.isArray = i, e.exports.isEmpty = n, e.exports.isPlainObject = r
    }).call(this)
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(41), a = i(2), r = i(0), s = i(7), l = i(8), d = i(13), u = i(10), c = i(656),
        h = r.default.getLogger("BHOConfig"), f = s.default(a.join(__rootDir, "../bin/ThunderHelper.node"));

    class p extends u.Config {
        init(e) {
            return n(this, void 0, void 0, function* () {
                if (!this.isInit) {
                    if (this.configPath = e, yield l.FileSystemAWNS.existsAW(e)) {
                        let t = yield l.FileSystemAWNS.readFileAW(e);
                        if (t) {
                            let e = null;
                            try {
                                e = c.IniNS.parse(t.toString())
                            } catch (e) {
                                h.warning(e)
                            }
                            this.isInit = !0, this.mergeConfigData(e), this.eventContainer.fireEvent(d.NodeEventMesssageNS.eventBHOConfigInitFinished)
                        }
                    } else {
                        let t = a.dirname(e);
                        yield l.FileSystemAWNS.mkdirsAW(t), this.isInit = !0, this.eventContainer.fireEvent(d.NodeEventMesssageNS.eventBHOConfigInitFinished)
                    }
                }
            })
        }

        save() {
            return n(this, void 0, void 0, function* () {
                if (null !== this.configPath && void 0 !== this.configPath && "" !== this.configPath && this.isInit) {
                    let e = c.IniNS.stringify(this.configData);
                    yield l.FileSystemAWNS.writeFileAW(this.configPath, e)
                }
            })
        }

        saveSync() {
            let e = c.IniNS.stringify(this.configData);
            null !== this.configPath && void 0 !== this.configPath && "" !== this.configPath && this.isInit && o.writeFileSync(this.configPath, e)
        }

        fireValueChangedEvent(e, t, i, n) {
            this.eventContainer.fireEvent(d.NodeEventMesssageNS.eventBHOConfigValueChanged, e, t, i, n)
        }

        attachListener(e, t) {
            do {
                if (e === d.NodeEventMesssageNS.eventBHOConfigInitFinished) {
                    if (this.isInit) {
                        t(this.isInit);
                        break
                    }
                    this.eventContainer.attachOnceListener(e, t);
                    break
                }
                this.eventContainer.attachListener(e, t)
            } while (0)
        }
    }

    t.BHOConfig = p;
    const g = new p;
    !function (e) {
        e.init = function () {
            return n(this, void 0, void 0, function* () {
                let e = f.getAppDataLocalLowPath();
                if (null !== e && void 0 !== e && "" !== e) {
                    let t = a.join(e, "Thunder Network\\Thunder\\BHO\\config.ini");
                    yield g.init(t)
                }
            })
        }, e.getDefaultExtendNames = function () {
            return ".asf;.avi;.exe;.iso;.mp3;.mpeg;.mpg;.mpga;.ra;.rar;.rm;.rmvb;.tar;.wma;.wmp;.wmv;.mov;.zip;.3gp;.chm;.mdf;.torrent;.jar;.msi;.arj;.bin;.dll;.psd;.hqx;.sit;.lzh;.gz;.tgz;.xlsx;.xls;.doc;.docx;.ppt;.pptx;.flv;.swf;.mkv;.tp;.ts;.flac;.ape;.wav;.aac;.txt;.dat;.7z;.ttf;.bat;.xv;.xvx;.pdf;.mp4;.apk;.ipa;.epub;.mobi;.deb;.sisx;.cab;.pxl;.xlb;.dmg;.msu;.bz2;"
        }, e.getDefaultFilterSitesForUI = function () {
            return "*.mail.live.com\n*.mail.yahoo.com\n*.mail.qq.com\n*.mail.sohu.com\n*.mail.google.com\n*.sinamail.sina.com.cn\n*.mail.sina.com.cn\n*.mail.163.com\n*.mail.10086.cn\n*.webmail30.189.cn\n*.www.126.com\n*.passport.alipay.com\n*.login.live.com\n*.mail.sogou.com\n*.web.mail.tom.com\n*.www.2980.com\n*.mail.21cn.com\n*.www.188.com\n*.yeah.net\n*.mail.wo.com.cn\n*.263.net\n*.ecitic.com\n*.pos.baidu.com"
        }, e.save = function () {
            return n(this, void 0, void 0, function* () {
                yield g.save()
            })
        }, e.saveSync = function () {
            g.saveSync()
        }, e.getValue = function (e, t, i) {
            return g.getValue(e, t, i)
        }, e.setValue = function (e, t, i) {
            g.setValue(e, t, i)
        }, e.attachListener = function (e, t) {
            g.attachListener(e, t)
        }, e.detachListener = function (e, t) {
            g.detachListener(e, t)
        }
    }(t.BHOConfigNS || (t.BHOConfigNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0).default.getLogger("msg-queue");
    !function (e) {
        let t, i;
        !function (e) {
            e[e.Community = 0] = "Community", e[e.AdvertisementMarket = 1] = "AdvertisementMarket", e[e.AdvertisementFunctional = 2] = "AdvertisementFunctional", e[e.PreciseDelivery = 3] = "PreciseDelivery", e[e.CenterVip = 4] = "CenterVip", e[e.Download = 5] = "Download"
        }(t = e.MsgPriority || (e.MsgPriority = {})), function (e) {
            e.Community = "MsgType.Community", e.AdvertisementMarket = "MsgType.AdvertisementMarket", e.AdvertisementFunctional = "MsgType.AdvertisementFunctional", e.PreciseDelivery = "MsgType.PreciseDelivery", e.CenterVip = "MsgType.CenterVip", e.Download = "MsgType.Download"
        }(i = e.MsgType || (e.MsgType = {}));
        e.Queue = class {
            constructor() {
                this.queue = [], this.priority = 0
            }

            enQueue(e) {
                let t = !1;
                n.information("消息队列增加消息", this.queue);
                for (let i = 0; i < this.queue.length; i++) if (this.queue[i].priority >= e.priority) {
                    t = !0, this.queue.splice(i, 0, e);
                    break
                }
                t || this.queue.push(e)
            }

            deQueue() {
                if (0 !== this.queue.length) {
                    let e = this.queue.pop();
                    this.priority = e.priority, void 0 !== e.callback && "function" == typeof e.callback && (n.information("消息队列弹出消息", this.queue), e.callback())
                }
            }

            clearQueuesByName(e) {
                let t = [];
                for (let i = 0; i < this.queue.length; i++) this.queue[i].name !== e && t.push(this.queue[i]);
                this.queue = t
            }

            isEmpty() {
                return 0 === this.queue.length
            }

            getCurrentProperty() {
                return this.priority
            }
        }
    }(t.MsgQueueNS || (t.MsgQueueNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(7).default(n.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        function t() {
            let e = !0;
            {
                0;
                let t = n.resolve("C:\\ETW_LOG\\log.ini");
                e = "1" === o.readINI(t, "Log", "enable")
            }
            return e
        }

        e.isDevToolsEnable = function () {
            return t()
        }, e.isLogEnable = t, e.getLogOutput = function () {
            let e = process.env.TL_OUTPUT;
            do {
                if (e && "" !== e) break;
                let t = n.resolve("C:\\ETW_LOG\\log.ini");
                e = o.readINI(t, "Log", "output")
            } while (0);
            return e
        }
    }(t.DevEnvHelperNS || (t.DevEnvHelperNS = {}))
}, function (e, t) {
    e.exports = require("zlib")
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), a = i(69), r = i(637), s = "main-renderer", l = "vip-download-webview";
    !function (e) {
        function t(e, ...t) {
            return n(this, void 0, void 0, function* () {
                let i = yield o.client.callRemoteClientFunction(s, e, ...t).catch();
                return i && i.length > 0 ? i[0] : {}
            })
        }

        function i() {
            return n(this, void 0, void 0, function* () {
                return yield t(a.XmpPlayerFunction.getXmpPlayType)
            })
        }

        function d() {
            return n(this, void 0, void 0, function* () {
                return (yield i()) === a.XmpPlayType.yunBo
            })
        }

        function u() {
            return n(this, void 0, void 0, function* () {
                return Number(yield t(a.XmpPlayerFunction.getPlayingTaskId))
            })
        }

        e.callVipPlugin = function (e, ...t) {
            return n(this, void 0, void 0, function* () {
                let i = yield o.client.callRemoteClientFunction(l, e, ...t).catch();
                return i && i.length > 0 ? i[0] : {}
            })
        }, e.openPayVipUrl = function (e) {
            o.client.callRemoteClientFunction(l, "OpenPayVipUrl", e).catch()
        }, e.callXmp = t, e.getXmpPlayType = i, e.isYunBo = d, e.isPlayAndDownload = function () {
            return n(this, void 0, void 0, function* () {
                return (yield i()) === a.XmpPlayType.downloadAndPlay
            })
        }, e.isLocalPlay = function () {
            return n(this, void 0, void 0, function* () {
                return (yield i()) === a.XmpPlayType.localFile
            })
        }, e.isYunRecvTask = function () {
            return n(this, void 0, void 0, function* () {
                return t(a.XmpPlayerFunction.getCurrentMediaAttribute, a.XmpMediaAttr.IsYunRecvTask)
            })
        }, e.getXmpCurrentMode = function () {
            return n(this, void 0, void 0, function* () {
                return t(a.XmpPlayerFunction.getXmpCurrentMode)
            })
        }, e.getCurrentTaskGcid = function () {
            return n(this, void 0, void 0, function* () {
                return t(a.XmpPlayerFunction.getCurrentMediaAttribute, a.XmpMediaAttr.Gcid)
            })
        }, e.getCurrentTaskId = u, e.getCurrentTaskUrl = function () {
            return n(this, void 0, void 0, function* () {
                return t(a.XmpPlayerFunction.getCurrentMediaAttribute, a.XmpMediaAttr.Url)
            })
        }, e.getCurrentTaskIdOrPanId = function () {
            return n(this, void 0, void 0, function* () {
                return (yield d()) ? t(a.XmpPlayerFunction.getCurrentMediaAttribute, a.XmpMediaAttr.PanFileId) : t(a.XmpPlayerFunction.getPlayingTaskId)
            })
        }, e.getCurrentTaskStatus = function () {
            return n(this, void 0, void 0, function* () {
                let e = yield u();
                return r.default.getTaskStatus(e)
            })
        }, e.isZipPlay = function () {
            return n(this, void 0, void 0, function* () {
                return t(a.XmpPlayerFunction.getCurrentMediaAttribute, a.XmpMediaAttr.IsZipPlay)
            })
        }, e.getStatPlayType = function () {
            return n(this, void 0, void 0, function* () {
                return t(a.XmpPlayerFunction.getCurrentMediaAttribute, a.XmpMediaAttr.PlayType)
            })
        }, e.getStatPlayfrom = function () {
            return n(this, void 0, void 0, function* () {
                return (yield t(a.XmpPlayerFunction.getCurrentMediaAttribute, a.XmpMediaAttr.PlayFrom)) || ""
            })
        }, e.getStatOpenFrom = function () {
            return n(this, void 0, void 0, function* () {
                return (yield t(a.XmpPlayerFunction.getCurrentMediaAttribute, a.XmpMediaAttr.OpenFrom)) || ""
            })
        }, e.trackShowEvnet = function (e, i, n) {
            t("TrackShowEvent", (new Date).getTime(), e, i, function (e) {
                let t = "";
                return e.forEach((e, i) => {
                    "" !== t && (t += ","), t = t + i + "=" + e
                }), t
            }(n)).catch()
        }
    }(t.CommonNS || (t.CommonNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(4), r = i(31), s = i(0);
    let l = null;
    const d = i(3), u = s.default.getLogger("url.helper");
    !function (e) {
        let t = !1, s = ["txt", "url", "nfo", "lnk"];

        function c(e) {
            let t = !0;
            if ("string" == typeof e) if (40 === e.length || 32 === e.length) {
                for (let i = 0; i < e.length; i++) if (e.charCodeAt(i) > 127) {
                    t = !1;
                    break
                }
            } else t = !1; else t = !1;
            return t
        }

        function h(e, t = !0) {
            t = void 0 === t || t;
            let i = !1;
            do {
                if ("string" != typeof e || "" === e) break;
                let n = e.trim();
                if ("" === n) break;
                if (r.ThunderHelper.getTaskTypeFromUrl(n) === a.DownloadKernel.TaskType.Unkown) {
                    if (!t) break;
                    c(n) && (i = !0)
                } else i = !0;
                i || n.match(/^file:\/\/\//) && (i = !0)
            } while (0);
            return i
        }

        e.isMagnetCode = c, e.fixMagnetUrl = function (e) {
            let t = "";
            do {
                if ("string" != typeof e || "" === e) break;
                if ("" === (t = e.trim())) break;
                r.ThunderHelper.getTaskTypeFromUrl(t) === a.DownloadKernel.TaskType.Unkown && c(t) && (t = "magnet:?xt=urn:btih:" + t)
            } while (0);
            return t
        }, e.isUrlValid = h, e.isBirdKey = function (e) {
            return e ? e.match(/#[Xx]([0-9a-zA-Z])+#/g) : null
        }, e.isYunFetchBackTask = function (e) {
            return e ? e.match(/#\$ThunderPanFetchBack:([\s\S]+)\$#/) : null
        }, e.isCustomProtocol = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                null === l && (l = yield Promise.resolve().then(() => i(50)));
                let n = l.parse(e);
                do {
                    if (null === n || void 0 === n) break;
                    let e = n.protocol;
                    if ("magnet:" === e) {
                        t = !0;
                        break
                    }
                    if ("thunder:" === e) {
                        t = !0;
                        break
                    }
                    if ("ed2k:" === e) {
                        t = !0;
                        break
                    }
                } while (0);
                return t
            })
        }, e.isP2spOrEmuleUrl = function (e) {
            let t = !1;
            do {
                if (null === e || void 0 === e || "" === e) break;
                let i = e.trim();
                if ("" === i) break;
                let n = r.ThunderHelper.getTaskTypeFromUrl(i);
                if (n === a.DownloadKernel.TaskType.P2sp || n === a.DownloadKernel.TaskType.Emule) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }, e.isSupportUrl = function (e) {
            e = e.toLowerCase();
            let t = !1;
            do {
                if ("http://" === e.substr(0, "http://".length)) {
                    t = !0;
                    break
                }
                if ("https://" === e.substr(0, "https://".length)) {
                    t = !0;
                    break
                }
                if ("ftp://" === e.substr(0, "ftp://".length)) {
                    t = !0;
                    break
                }
                if ("ed2k://" === e.substr(0, "ed2k://".length)) {
                    t = !0;
                    break
                }
                if ("thunder://" === e.substr(0, "thunder://".length)) {
                    t = !0;
                    break
                }
                if ("magnet:?" === e.substr(0, "magnet:?".length)) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        };
        let f = ".edu;.gov;.mil;.hk;.tw;.com.tw;.com.tw;.aero;.biz;.coop;.info;.museum;.name;.pro;";
        f += ".com;.cn;.xin;.net;.top;.xyz;.wang;.shop;.site;.club;.cc;.fun;.online;.biz;.red;.link;.ltd;.mobi;.info;.org;", f += ".com.cn;.net.cn;.org.cn;.gov.cn;.name;.vip;.work;.tv;.co;.kim;.group;.tech;.store;.ren;.ink;.pub;.live;.wiki;.design;";
        const p = (f += ".me").split(";");

        function g(e) {
            let t = !1;
            do {
                if (void 0 === e || null === e || "" === e) break;
                if (-1 !== p.indexOf(e)) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }

        function m(e) {
            let t = null;
            do {
                if (void 0 === e || null === e) break;
                if ("" === (e = e.trim())) break;
                let i = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/.exec(e);
                if (null === i) break;
                u.information("url parse result ", i), t = {};
                let n = ["url", "scheme", "slash", "host", "port", "path", "query", "hash"];
                for (let e = 0; e < n.length; e++) t[n[e]] = i[e];
                u.information("url parse", t)
            } while (0);
            return t
        }

        e.isUsualDomainSuffix = g, e.urlParse = m, e.isUrl = function (e) {
            let t = !1, i = e;
            do {
                if (void 0 === e || null === e) break;
                if (h(e, !1)) {
                    t = !0;
                    break
                }
                if (e.trim().match(/^file:\/\/\//)) {
                    t = !0;
                    break
                }
                let n = m(e);
                if (null === n) {
                    u.information("url parse failed");
                    break
                }
                if (void 0 === n.host || null === n.host) break;
                if (void 0 !== n.scheme) {
                    t = !0;
                    break
                }
                let a = n.host.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
                if (a) {
                    if (u.information("url parse is ip", a), Number(a[1]) <= 0 || Number(a[1]) > 255) {
                        t = !1;
                        break
                    }
                    if (Number(a[2]) < 0 || Number(a[2]) > 255) {
                        t = !1;
                        break
                    }
                    if (Number(a[4]) < 0 || Number(a[4]) > 255) {
                        t = !1;
                        break
                    }
                    if (Number(a[4]) < 0 || Number(a[4]) > 255) {
                        t = !1;
                        break
                    }
                    t = !0, void 0 === n.scheme && void 0 !== n.port && (i = `http://${e}`);
                    break
                }
                if (n.host.match(/\.{2,}/)) {
                    u.information("url parse has multi dot"), t = !1;
                    break
                }
                let r = o.extname(n.host);
                if ("" === r) break;
                if (g(r)) {
                    t = !0;
                    break
                }
            } while (0);
            return u.information("url parse isUrl", t), {ret: t, suggest: i}
        }, e.isFileNameValid = function (e) {
            let t = !1;
            do {
                if (void 0 === e) break;
                if (null === e) break;
                if ("" === (e = e.trim())) break;
                if ("." === e[0]) break;
                if (e.match(/[\/\\"<>\?\*|]/)) break;
                t = !0
            } while (0);
            return t
        }, e.initBlackList = function () {
            return n(this, void 0, void 0, function* () {
                if (!t) {
                    let e = yield d.client.callServerFunction("GetConfigModules", "SuffixBlackList", s);
                    e && (s = e, t = !0)
                }
            })
        }, e.isSuffixNeedDownload = function (e) {
            let t = !0;
            do {
                if (void 0 === e) break;
                if ("" === e || "." === e) break;
                if (e = e.toLowerCase(), -1 !== s.indexOf(e)) {
                    t = !1;
                    break
                }
            } while (0);
            return t
        }
    }(t.URLHelperNS || (t.URLHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(74), a = i(5), r = i(0), s = i(20), l = r.default.getLogger("Thunder.MainRenderer.Tabs");
    t.createXDASTab = function (e) {
        let t = new o.Tab;
        return t.initTab(o.TabType.XDAS, e).catch(), t
    }, t.createNewTab = function (e, t, i) {
        return n(this, void 0, void 0, function* () {
            let n = new o.Tab;
            return !1 === (yield n.initTab(e, t, i)) && (n = null, l.warning("init tab error")), n
        })
    }, t.createChromiumTab = function (e) {
        return n(this, void 0, void 0, function* () {
            let t = new o.Tab, i = {url: e};
            return !1 === (yield t.initTab(o.TabType.Chromium, i)) && (t = null, l.warning("init tab error")), t
        })
    }, t.setDefaultListeners = function (e) {
        let t = !1;
        do {
            if (a.isNullOrUndefined(e)) {
                l.warning("event listeners error");
                break
            }
            if (0 === e.length) {
                l.warning("event listeners length error");
                break
            }
            o.Tab.defaultEventList = e, t = !0
        } while (0);
        return t
    }, function (e) {
        let t;
        !function (e) {
            e.Unknow = "Unknow", e.GotFocus = "GoFocus", e.RemoveTab = "RemoveTab", e.AddTab = "AddTab", e.ChangeTab = "ChangeTab", e.VisibleChange = "VisibleChange", e.CreateNewTab = "CreateNewTab", e.SelectTab = "SelectTab"
        }(t = e.EventType || (e.EventType = {}));
        let i = new s.EventEmitter;
        e.getEventEmitter = function () {
            return i
        }
    }(t.TabEventManagerNS || (t.TabEventManagerNS = {}));
    let d = 0;
    t.setCurrentTabID = function (e) {
        d = e
    }, t.getCurrentTabID = function () {
        return d
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t;
        !function (e) {
            e.DownloadComplete = "DownloadComplete", e.DownloadFail = "DownloadFail", e.ConsumptionTips = "ConsumptionTips", e.CommunityTips = "CommunityTips", e.CommunityGroupTips = "CommunityGroupTips", e.AdvertisementTips = "AdvertisementTips", e.AdvertisementWebPageTips = "AdvertisementWebPageTips", e.CommonPushTip = "CommonPushTip"
        }(t = e.TipsType || (e.TipsType = {}))
    }(t.Notification || (t.Notification = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(20), r = i(15), s = i(45), l = o.default.getLogger("adplatform-manager");
    var d, u;
    !function (e) {
        e.FunctionalHigh = "pack_using", e.Functional = "pack_before", e.Renew = "renew", e.Exactly = "exactly", e.AdPlatform = "adplatform"
    }(d = t.AdPlatformType || (t.AdPlatformType = {})), function (e) {
        e[e.Unknown = 0] = "Unknown", e[e.Click = 1] = "Click", e[e.Priority = 2] = "Priority", e[e.Expired = 3] = "Expired"
    }(u = t.AdPlatformCloseReason || (t.AdPlatformCloseReason = {}));
    !function (e) {
        const t = new class extends a.EventEmitter {
            constructor() {
                super(), this.adPriority = {
                    [d.AdPlatform]: 4,
                    [d.Exactly]: 3,
                    [d.Renew]: 2,
                    [d.Functional]: 1,
                    [d.FunctionalHigh]: 0
                }, this.showLimit = {
                    [d.FunctionalHigh]: 3,
                    [d.Functional]: 3,
                    [d.Renew]: 1,
                    [d.Exactly]: 1,
                    [d.AdPlatform]: 1
                }, this.adPlatformWaitOrder = null, this.currentOrder = null, this.inited = !1
            }

            init() {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (this.inited) break;
                        this.inited = !0, r.server.registerFunctions({
                            EnqueueAdPlatform: (e, t, ...i) => this.tryShow(i[0], i[1], i[2], i[3]),
                            CloseAdPlatform: (e, t, ...i) => {
                                let n = !1;
                                do {
                                    let e = i[0];
                                    if (e === d.AdPlatform) {
                                        l.information("广告后台小黄条不能通过接口关闭");
                                        break
                                    }
                                    if (!this.currentOrder) {
                                        l.information("当前无广告订单展示");
                                        break
                                    }
                                    let t = i[1];
                                    if (e !== this.currentOrder.adType || this.currentOrder.data.msgid !== t) {
                                        l.information("当前展示的小黄条和关闭目标不一致");
                                        break
                                    }
                                    let o = void 0 === i[2] ? u.Expired : i[2];
                                    r.server.fireClientEvent("OnAdPlatformClose", e, t, o), n = !0
                                } while (0);
                                return n
                            }
                        }), yield s.default.isInitedAW();
                        let e = s.default.getConfigValue("vip", "xht");
                        e && e.hasOwnProperty(d.AdPlatform) && e.hasOwnProperty(d.Exactly) && e.hasOwnProperty(d.Renew) && e.hasOwnProperty(d.Functional) && e.hasOwnProperty(d.FunctionalHigh) && (this.adPriority = Object.assign({}, e))
                    } while (0)
                })
            }

            tryShow(e, t, i, n) {
                let o = !1;
                do {
                    if (l.information("tryShow", e, t), !this.adPriority.hasOwnProperty(e)) {
                        l.information("无法识别的来源");
                        break
                    }
                    let a = this.adPriority[e];
                    if (this.showLimit[e] <= 0) {
                        l.information("超过限制次数", e);
                        break
                    }
                    if (!this.currentOrder) {
                        l.information("当前小黄条没有任何展示内容，可展示", e), this.currentOrder = {
                            adType: e,
                            data: t,
                            showCallback: i,
                            closeCallback: n
                        }, this.showImmediately(), o = !0;
                        break
                    }
                    if (this.adPriority[this.currentOrder.adType] < a) {
                        e !== d.AdPlatform || this.adPlatformWaitOrder ? l.information("当前展示优先级更高，无法展示，返回") : (l.information("当前展示优先级更高，无法展示，广告后台订单等待"), this.adPlatformWaitOrder = {
                            data: t,
                            showCallback: i
                        });
                        break
                    }
                    if (this.currentOrder.adType === e) {
                        l.information("同一来源试图更新数据"), this.tryUpdateOrder(e, t);
                        break
                    }
                    l.information("替换当前显示的订单"), this.close(u.Priority, void 0), this.currentOrder = {
                        adType: e,
                        data: t,
                        showCallback: i,
                        closeCallback: n
                    }, this.showImmediately(), o = !0
                } while (0);
                return o
            }

            close(e, t) {
                do {
                    if (!this.currentOrder) break;
                    this.currentOrder.closeCallback && this.currentOrder.closeCallback(e || u.Unknown, t), this.currentOrder = null, e !== u.Priority && setTimeout(() => {
                        this.pop()
                    }, 6e4)
                } while (0)
            }

            pop() {
                l.information("pop in");
                do {
                    if (this.currentOrder) break;
                    this.adPlatformWaitOrder && (this.tryShow(d.AdPlatform, this.adPlatformWaitOrder.data, this.adPlatformWaitOrder.showCallback), this.adPlatformWaitOrder = null)
                } while (0);
                l.information("pop leave")
            }

            tryUpdateOrder(e, t) {
                switch (e) {
                    case d.AdPlatform:
                        l.information("广告后台的订单信息无法更新");
                        break;
                    case d.Renew:
                    case d.Exactly:
                    case d.Functional:
                    case d.FunctionalHigh:
                        t && this.currentOrder.data.msgid === t.msgid && (this.currentOrder.data = Object.assign({}, this.currentOrder.data, t), this.emit("adplatfor_update_order", e, t))
                }
            }

            showImmediately() {
                this.currentOrder.showCallback && this.currentOrder.showCallback();
                let e = this.showLimit[this.currentOrder.adType];
                this.showLimit[this.currentOrder.adType] = e - 1, r.server.fireClientEvent("OnAdPlatformShow", this.currentOrder.adType, this.currentOrder.data)
            }
        };
        e.getInstance = function () {
            return t
        }
    }(t.AdPlatformManagerNS || (t.AdPlatformManagerNS = {}))
}, function (e, t) {
    var i,
        n = [0, 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085, 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185, 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706];
    t.getSymbolSize = function (e) {
        if (!e) throw new Error('"version" cannot be null or undefined');
        if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
        return 4 * e + 17
    }, t.getSymbolTotalCodewords = function (e) {
        return n[e]
    }, t.getBCHDigit = function (e) {
        for (var t = 0; 0 !== e;) t++, e >>>= 1;
        return t
    }, t.setToSJISFunction = function (e) {
        if ("function" != typeof e) throw new Error('"toSJISFunc" is not a valid function.');
        i = e
    }, t.isKanjiModeEnabled = function () {
        return void 0 !== i
    }, t.toSJIS = function (e) {
        return i(e)
    }
}, function (e, t, i) {
    var n = i(554), o = i(555);
    t.NUMERIC = {id: "Numeric", bit: 1, ccBits: [10, 12, 14]}, t.ALPHANUMERIC = {
        id: "Alphanumeric",
        bit: 2,
        ccBits: [9, 11, 13]
    }, t.BYTE = {id: "Byte", bit: 4, ccBits: [8, 16, 16]}, t.KANJI = {
        id: "Kanji",
        bit: 8,
        ccBits: [8, 10, 12]
    }, t.MIXED = {bit: -1}, t.getCharCountIndicator = function (e, t) {
        if (!e.ccBits) throw new Error("Invalid mode: " + e);
        if (!n.isValid(t)) throw new Error("Invalid version: " + t);
        return t >= 1 && t < 10 ? e.ccBits[0] : t < 27 ? e.ccBits[1] : e.ccBits[2]
    }, t.getBestModeForData = function (e) {
        return o.testNumeric(e) ? t.NUMERIC : o.testAlphanumeric(e) ? t.ALPHANUMERIC : o.testKanji(e) ? t.KANJI : t.BYTE
    }, t.toString = function (e) {
        if (e && e.id) return e.id;
        throw new Error("Invalid mode")
    }, t.isValid = function (e) {
        return e && e.bit && e.ccBits
    }, t.from = function (e, i) {
        if (t.isValid(e)) return e;
        try {
            return function (e) {
                if ("string" != typeof e) throw new Error("Param is not a string");
                switch (e.toLowerCase()) {
                    case"numeric":
                        return t.NUMERIC;
                    case"alphanumeric":
                        return t.ALPHANUMERIC;
                    case"kanji":
                        return t.KANJI;
                    case"byte":
                        return t.BYTE;
                    default:
                        throw new Error("Unknown mode: " + e)
                }
            }(e)
        } catch (e) {
            return i
        }
    }
}, function (e, t, i) {
    e.exports = i(65)(16)
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(12), r = i(17), s = i(4), l = i(26), d = i(10), u = i(8), c = i(14), h = i(3), f = i(0),
        p = i(22), g = i(16), m = i(30), v = i(35), y = i(7), T = i(20), w = i(38), k = i(51), C = i(23), b = i(56),
        I = i(53), S = y.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        _ = g.DownloadKernelEventManager.getEventManager(), D = l.DownloadKernelCategoryManager.getCategoryManager(),
        A = f.default.getLogger("Thunder.PrivateSpaceHelper"), N = b.ToastNotifyManagerNS.getToastNotifyManger();
    !function (e) {
        let t = void 0, i = void 0, l = "", f = !0, g = void 0, y = void 0;
        const x = new T.EventEmitter;
        let E;

        function O(e, t, i) {
            A.information("onInsertToCategoryView categoryId:", e, ", categoryViewId:", t);
            for (let e = 0; e < i.length; e++) {
                let t = i[e];
                if (t.getTaskAttribute(s.DownloadKernel.TaskAttribute.Background)) return;
                let n = t.getTaskStatus();
                A.information("onInsertToCategoryView taskStatus:", n), n !== s.DownloadKernel.TaskStatus.Succeeded && n !== s.DownloadKernel.TaskStatus.Seeding || M(t, t.getIsPrivate()).then().catch()
            }
        }

        function P(e) {
            for (let t = 0; t < e.length; t++) {
                let i = e[t];
                if (i.getTaskAttribute(s.DownloadKernel.TaskAttribute.Background)) continue;
                let n = i.getTaskStatus();
                n !== s.DownloadKernel.TaskStatus.Succeeded && n !== s.DownloadKernel.TaskStatus.Seeding || i.getIsPrivate() && M(i, !0).then().catch()
            }
        }

        function M(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = e.getTaskStatus(), a = e.getTaskBaseInfo().taskType;
                if (A.information("moveTaskFileToPrivateSpace taskType:", a, ", taskStatus:", i, ", moveIn:", t), i === s.DownloadKernel.TaskStatus.Succeeded || i === s.DownloadKernel.TaskStatus.Seeding) {
                    if (e.getTaskAttribute(s.DownloadKernel.TaskAttribute.GroupTaskId) > 0) return;
                    let i = "";
                    if (t ? (i = yield L(l), i = o.join(i, l)) : i = yield h.client.callServerFunction("GetDownloadDir"), A.information("moveTaskFileToPrivateSpace newSrcPath:", i), a === s.DownloadKernel.TaskType.Group) return function (e, t, i) {
                        return n(this, void 0, void 0, function* () {
                            let n = e.getSavePath(), a = e.getTaskName();
                            if (!(yield u.FileSystemAWNS.existsAW(n))) return;
                            let r = o.join(n, a);
                            if (A.information("destPath:", r), n !== r) {
                                yield u.FileSystemAWNS.mkdirsAW(i);
                                let o = yield F(n, r);
                                if (o) {
                                    e.setSavePath(i), B(e, !!t && R());
                                    let n = e.getExtraObject(), o = n.getSubTaskCount();
                                    if (o && o > 0) for (let e = 0; e < o; e++) {
                                        let t = n.getSubTaskByIndex(e);
                                        t && t.setSavePath(r)
                                    }
                                    _.fireTaskEvent(s.DownloadKernel.TaskEventType.TaskMovedEnd, [e])
                                }
                            } else B(e, !!t && R())
                        })
                    }(e, t, i);
                    if (a === s.DownloadKernel.TaskType.Bt) return function (e, t, i) {
                        return n(this, void 0, void 0, function* () {
                            let n = e.getExtraObject(), a = n.getDownloadFile();
                            if (1 !== a.length) return;
                            let r = n.getBtFileList(), l = r.get(a[0]);
                            if (!l) return;
                            let d = void 0, c = e.getSavePath(),
                                h = l.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileName),
                                f = l.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FilePath),
                                p = yield k.SingleBtTaskNS.isSingleBtTask(e);
                            if (p) d = k.SingleBtTaskNS.getSinleBtTaskFilePath(e); else {
                                if (!h || "" === h) return;
                                c = o.join(c, f), d = o.join(c, h)
                            }
                            if (yield u.FileSystemAWNS.existsAW(d)) if (c !== i) {
                                yield u.FileSystemAWNS.mkdirsAW(i);
                                let n = o.join(i, h), a = yield F(d, n);
                                a && (e.setSavePath(i), _.fireTaskEvent(s.DownloadKernel.TaskEventType.TaskMovedEnd, [e]), B(e, !!t && R()))
                            } else B(e, !!t && R())
                        })
                    }(e, t, i);
                    if (a === s.DownloadKernel.TaskType.P2sp || a === s.DownloadKernel.TaskType.Emule) return function (e, t, i) {
                        return n(this, void 0, void 0, function* () {
                            let n = e.getSavePath(), a = e.getTaskName(), r = o.join(n, a);
                            if (yield u.FileSystemAWNS.existsAW(r)) if (n !== i) {
                                yield u.FileSystemAWNS.mkdirsAW(i);
                                let n = o.join(i, a), l = yield F(r, n);
                                l && (e.setSavePath(i), _.fireTaskEvent(s.DownloadKernel.TaskEventType.TaskMovedEnd, [e]), B(e, !!t && R()))
                            } else B(e, !!t && R())
                        })
                    }(e, t, i)
                }
            })
        }

        function F(e, t) {
            return n(this, void 0, void 0, function* () {
                return A.information("moveFile srcParh:", e, ", destPath:", t), new Promise(i => n(this, void 0, void 0, function* () {
                    if (e[0] === t[0]) {
                        yield u.FileSystemAWNS.renameAW(e, t);
                        let n = yield u.FileSystemAWNS.existsAW(t);
                        A.information("moveFile existsAW success:", n), i(n)
                    } else {
                        let n = !1;
                        (yield u.FileSystemAWNS.lstatAW(e)).isDirectory() ? (n = yield u.FileSystemAWNS.copyDirsAW(e, t), A.information("moveFile copyDirsAW success:", n), n && (n = yield u.FileSystemAWNS.rmdirsAW(e), A.information("moveFile rmdirsAW success:", n))) : (n = yield u.FileSystemAWNS.copyFileAW(e, t), A.information("moveFile copyFileAW success:", n), n && (n = yield u.FileSystemAWNS.unlinkAW(e), A.information("moveFile unlinkAW success:", n))), i(n)
                    }
                }))
            })
        }

        function L(e) {
            return n(this, void 0, void 0, function* () {
                let t = d.ConfigNS.getValue("PrivateSpaceDefaultPath", e, "");
                if (t && "" !== t) {
                    let i = o.join(t, e);
                    if (yield u.FileSystemAWNS.existsAW(i)) return t;
                    if (yield u.FileSystemAWNS.mkdirAW(i)) return t
                }
                let i = d.ConfigNS.getValue("TaskDefaultSettings", "DefaultPath", "");
                return void 0 !== i && "" !== i || (i = c.ThunderUtil.getDefaultDownloadDir()), void 0 !== i && "" !== i ? (d.ConfigNS.setValue("PrivateSpaceDefaultPath", e, i), i) : ""
            })
        }

        function R(e) {
            return e && "" === e || (e = l), 1 === d.ConfigNS.getValue("PrivateSpaceLockUserTask", e, 1)
        }

        function B(e, t) {
            let i = e.getSavePath(), n = e.getTaskName();
            A.information("setTaskHidden path:", i, ", name:", n, ", hidden:", t), t && !function (e) {
                if (!e || "" === e) return !1;
                let t = l;
                "" !== l && "0" !== l || (t = "私人空间");
                if (A.information("userId:", t), A.information("filePath:", e), new RegExp(t).test(e)) return !0;
                return !1
            }(i) || (U(i, t), U(o.join(i, n), t))
        }

        function U(e, t) {
            let i = t ? 2 : 128, n = S.setFileAttributes(e, i);
            A.information("setPathHidden ret:", n, ", path:", e, ", hidden:", t)
        }

        function V(e, t) {
            e && "" === e || (e = l), d.ConfigNS.setValue("PrivateSpacePasswordErrorCount", e, t)
        }

        function K(e, t) {
            return n(this, void 0, void 0, function* () {
                if (!t || "" === t) return;
                if (t = o.join(t, e), !(yield u.FileSystemAWNS.existsAW(t))) {
                    yield u.FileSystemAWNS.mkdirAW(t)
                }
                let i = d.ConfigNS.getValue("PrivateSpaceLockUserTask", e, 1);
                A.information("setPrivateSavePath", i, t), U(t, 1 === i)
            })
        }

        function G(e, t) {
            A.information("setAllTaskFileHidden", e, t);
            let i = D.getPrivateCategoryFromUserId(e);
            if (!i) return;
            let n = i.getCategoryViews();
            if (n && !(n.length <= 0)) for (let e = 0; e < n.length; e++) {
                let i = n[e].getTasks();
                for (let e of i.values()) {
                    if (e.getTaskAttribute(s.DownloadKernel.TaskAttribute.Background)) continue;
                    let i = e.getTaskStatus();
                    i !== s.DownloadKernel.TaskStatus.Succeeded && i !== s.DownloadKernel.TaskStatus.Seeding || e.getIsPrivate() && B(e, t)
                }
            }
        }

        function W(e, t, i) {
            return n(this, void 0, void 0, function* () {
                return new Promise((o, a) => n(this, void 0, void 0, function* () {
                    let n = null;
                    if (n = e && "" !== e ? D.getPrivateCategoryFromUserId(e) : D.getCurrentPrivateCategory()) {
                        let e = yield C.LoginHelperNS.loginHelper.getUserInfoByKeyAw("mobile");
                        null === e || void 0 === e || "" === e ? (!1 !== i && (yield h.client.callServerFunction("OpenNewTab", "https://i.xunlei.com/xluser/validate/enter/bindphone_enter.html")), o(1)) : function (e, t) {
                            return p.MessageBox.custom("private-space-phone-verify", {
                                mobile: e,
                                methodType: t
                            }, {webPreferences: {spellcheck: !1, nodeIntegration: !0, webSecurity: !1}})
                        }(e, t).then(e => {
                            e.action === w.MessageBoxNS.Action.OK ? o(0) : o(-1)
                        }).catch()
                    } else o(-1)
                }))
            })
        }

        function j(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = R(e);
                return new Promise((o, a) => {
                    (function (e, t) {
                        return p.MessageBox.custom("private-space-set-password", {isSetHide: e, showType: t})
                    })(i, t).then(t => {
                        if (t.action === w.MessageBoxNS.Action.OK) {
                            if (null !== t.args.isSetHide && void 0 !== t.args.isSetHide && "boolean" == typeof t.args.isSetHide && t.args.isSetHide !== i) {
                                let i = t.args.isSetHide ? 1 : 0;
                                d.ConfigNS.setValue("PrivateSpaceLockUserTask", e, i), G(e, t.args.isSetHide)
                            }
                            let a = D.getCurrentPrivateCategory();
                            a && a.setPassword(t.args.password, "", !0, (t, i) => n(this, void 0, void 0, function* () {
                                t && (z(!1), x.emit(E.SetPassword, !0), N.showNotify(b.ToastNotifyManagerNS.notifyIdScheduleTaskDownloadMode, I.ToastNotifyItemType.GreenNotify, "私人空间密码设置成功", 3e3), V(e, 0), o(0));
                                let i = yield L(e);
                                i && "" !== i && K(e, i).then().catch()
                            }))
                        } else o(-1)
                    }).catch()
                })
            })
        }

        function H(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise((t, i) => {
                    let n = null;
                    (n = e && "" !== e ? D.getPrivateCategoryFromUserId(e) : D.getCurrentPrivateCategory()) ? j(e, "change").then(e => {
                        t(e)
                    }).catch() : t(-1)
                })
            })
        }

        function z(e) {
            f = e
        }

        function X() {
            return f
        }

        !function (e) {
            e.Unknow = "Unknow", e.SetPassword = "SetPassword"
        }(E = e.EventType || (e.EventType = {})), e.getEventEmitter = function () {
            return x
        }, e.getPrivateSavePath = L, e.isPrivateSpaceOpen = function (e) {
            let t = !1, i = D.getPrivateCategoryFromUserId(e);
            if (i) {
                let e = i.getPassword();
                e && "" !== e && (t = !0)
            }
            return t
        }, e.setPrivateSavePath = K, e.setAllTaskFileHidden = G, e.phoneVerifyPrivateCategory = W, e.changePrivateSpacePassword = H, e.openPrivateCategory = function (e) {
            return n(this, void 0, void 0, function* () {
                return new Promise((t, i) => {
                    let n = null;
                    if (n = e && "" !== e ? D.getPrivateCategoryFromUserId(e) : D.getCurrentPrivateCategory()) {
                        let i = n.getPassword();
                        i && "" !== i ? t(0) : j(e, "open").then(e => {
                            t(e)
                        }).catch()
                    } else t(-1)
                })
            })
        }, e.accessPrivateCategory = function (e) {
            return n(this, void 0, void 0, function* () {
                var t, i;
                return new Promise((t, i) => {
                    let o = null;
                    if (o = e && "" !== e ? D.getPrivateCategoryFromUserId(e) : D.getCurrentPrivateCategory()) if (X()) {
                        let i = o.getPassword();
                        if (i && "" !== i) {
                            let o = function (e) {
                                return e && "" === e || (e = l), d.ConfigNS.getValue("PrivateSpacePasswordErrorCount", e, 0)
                            }(e);
                            o >= 5 ? W(e, "more").then(i => n(this, void 0, void 0, function* () {
                                0 === i ? (i = yield H(e), t(0 === i ? 0 : -1)) : t(-1)
                            })).catch(() => {
                                t(-1)
                            }) : (i = i, o = o, p.MessageBox.custom("private-space-verify-password", {
                                password: i,
                                errorCount: o
                            })).then(i => n(this, void 0, void 0, function* () {
                                if (i.action === w.MessageBoxNS.Action.OK) i.args && i.args.success && (z(!1), V(e, 0), t(0)); else if (i.action === w.MessageBoxNS.Action.Close && i.args) {
                                    o = i.args.errorCount, V(e, o);
                                    let n = i.args.from;
                                    if ("forget" === n || "more" === n) {
                                        let i = yield W(e, n);
                                        0 === i && 0 === (i = yield H(e)) && t(0)
                                    }
                                }
                            })).catch(() => {
                                t(-1)
                            })
                        } else t(0)
                    } else t(0); else t(-1)
                })
            })
        }, e.setNeedPassword = z, e.getNeedPassword = X, e.init = function () {
            return n(this, void 0, void 0, function* () {
                (function () {
                    return n(this, void 0, void 0, function* () {
                        t = r.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => n(this, void 0, void 0, function* () {
                            A.information("OnUserLogin userId:", e), l = e, D.setUserInfo(e, "")
                        })), i = r.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                            A.information("OnUserLogout currentUserId:", l), l = "", f = !0, D.setUserInfo("", "")
                        })
                    })
                })().then().catch(), g = _.attachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    do {
                        if (!e) break;
                        if (e[0] !== s.DownloadKernel.TaskEventType.StatusChanged) break;
                        if (!e[1]) break;
                        let t = e[1];
                        t.length > 0 && P(t)
                    } while (0)
                }), y = _.attachTaskEvent(s.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                    do {
                        if (!e) break;
                        if (e[0] !== s.DownloadKernel.TaskEventType.InsertToCategoryView) break;
                        if (void 0 === e[1] || !e[2] || !e[3]) break;
                        let t = e[1], i = e[2];
                        A.information("insertTaskCallback categoryId:", t, ", categoryViewId:", i);
                        let n = e[3], o = e[4];
                        n.length > 0 && o === s.DownloadKernel.TaskInsertReason.MoveThoughCategory && O(t, i, n)
                    } while (0)
                }), (yield a.asyncRemoteCall.getIpcMain()).on(v.ThunderChannelList.channelRMGetPrivateSpaceInfo, e => n(this, void 0, void 0, function* () {
                    do {
                        if (!e) break;
                        if (yield e.sender.isDestroyed()) break;
                        let t = !0, i = D.getCurrentPrivateCategory();
                        if (i) {
                            let e = i.getPassword();
                            e && "" !== e && (t = !0)
                        }
                        let n = m.default.getCurrentCategoryId();
                        e.sender.send(v.ThunderChannelList.channelMRGetPrivateSpaceInfoResult, t, n)
                    } while (0)
                }))
            })
        }, e.uninit = function () {
            r.NativeCallModule.nativeCall.DetachNativeEvent("onLoginSuc", t), r.NativeCallModule.nativeCall.DetachNativeEvent("onLogout", i), _.detachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, g), _.detachTaskEvent(s.DownloadKernel.TaskEventType.InsertToCategoryView, y)
        }
    }(t.PrivateSpaceHelperNS || (t.PrivateSpaceHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(8), r = i(7), s = i(515), l = i(47), d = i(5), u = i(13), c = i(10), h = i(77),
        f = d.promisify, p = r.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        g = i(0).default.getLogger("SettingConfigHelper");
    !function (e) {
        e.configBrowserHelper = new class {
            constructor() {
                this.browserconfig = null, this.installWatchBrowsers = [], this.configShowBrowsers = [], this.eventContainer = new l.default, this.isInit = !1
            }

            init() {
                return n(this, void 0, void 0, function* () {
                    g.information("ConfigBrowserHelper enter init ");
                    let e = yield this.onConfigInit(), t = yield this.onBhoConfigInit();
                    g.information("ConfigBrowserHelper init isConfigInit:", e, ";isBhoConfigInit:", t), e && t && (yield this.readBrowserConfigXml(), yield this.writeNewBrowserToConfigINI(), this.isInit = !0, g.information("ConfigBrowserHelper init Finished"), this.eventContainer.fireEvent(u.NodeEventMesssageNS.eventConfigBrowserInitFinished))
                })
            }

            attachListener(e, t) {
                do {
                    if (e === u.NodeEventMesssageNS.eventConfigBrowserInitFinished) {
                        if (this.isInit) {
                            t(this.isInit);
                            break
                        }
                        this.eventContainer.attachOnceListener(e, t);
                        break
                    }
                    this.eventContainer.attachListener(e, t)
                } while (0)
            }

            detachListener(e, t) {
                this.eventContainer.detachListener(e, t)
            }

            getConfigShowBrowsers() {
                let e = [];
                do {
                    if (null === this.configShowBrowsers || void 0 === this.configShowBrowsers || this.configShowBrowsers.length <= 0) break;
                    for (let t = 0; t < this.configShowBrowsers.length; ++t) {
                        let i = this.configShowBrowsers[t], n = i.browserName, o = "Motitor" + n, a = !1;
                        0 !== c.ConfigNS.getValue("Motitor", o, 2) && (a = !0);
                        let r = {content: n, name: i.name, key: o, isSelect: a};
                        e.push(r)
                    }
                } while (0);
                return g.information("getConfigShowBrowsers:", e), e
            }

            getWriteIniConfigShowBrowsers() {
                let e = "||";
                do {
                    let t = this.getConfigShowBrowsers();
                    if (null === t || void 0 === t || t.length <= 0) break;
                    for (let i = 0; i < t.length; ++i) {
                        let n = t[i], o = n.name;
                        "IE浏览器" !== n.content && n.isSelect && (void 0 !== e && null !== e && "" !== e ? "edge" === o || "edgecp" === o ? e += "edge||edgecp||" : e = e + o + "||" : e = "edge" === o || "edgecp" === o ? "edge||edgecp||" : o + "||")
                    }
                } while (0);
                return e
            }

            getWatchBrowerByName(e) {
                let t = null;
                do {
                    if (null === this.installWatchBrowsers || void 0 === this.installWatchBrowsers || this.installWatchBrowsers.length <= 0) break;
                    for (let i = 0; i < this.installWatchBrowsers.length; ++i) {
                        let n = this.installWatchBrowsers[i];
                        if (n.browserName.toLowerCase() === e.toLowerCase()) {
                            t = n;
                            break
                        }
                    }
                } while (0);
                return t
            }

            savaMotiorBrowserToConfig() {
                do {
                    let e = this.getConfigShowBrowsers();
                    if (null === e || void 0 === e || e.length <= 0) break;
                    let t = !1;
                    for (let i = 0; i < e.length; ++i) {
                        let n = e[i];
                        n.isSelect && (t = !0), "IE浏览器" === n.content && (n.isSelect ? (h.BHOConfigNS.setValue("Monitor", "ConfigWatch_Browser", 1), h.BHOConfigNS.setValue("Monitor", "MonitorIE", 1)) : (h.BHOConfigNS.setValue("Monitor", "ConfigWatch_Browser", 0), h.BHOConfigNS.setValue("Monitor", "MonitorIE", 0)))
                    }
                    t || h.BHOConfigNS.setValue("Monitor", "ConfigWatch_Browser", 0)
                } while (0)
            }

            onConfigInit() {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        c.ConfigNS.attachListener(u.NodeEventMesssageNS.eventConfigInitFinished, () => {
                            e(!0)
                        })
                    })
                })
            }

            onBhoConfigInit() {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        h.BHOConfigNS.attachListener(u.NodeEventMesssageNS.eventBHOConfigInitFinished, () => {
                            e(!0)
                        })
                    })
                })
            }

            readBrowserConfigXml() {
                return n(this, void 0, void 0, function* () {
                    g.information("enter readBrowserConfigXml");
                    do {
                        if (null !== this.browserconfig && void 0 !== this.browserconfig) break;
                        let e = this.getShortThunderVersion();
                        if (null === e || void 0 === e || "" === e) break;
                        let t = p.getCommonFilesPath(),
                            i = "XLWFPDOWNLOAD-SSID-{DB09E578-4ECF-486e-90A5-505A33219F71}_" + e + ".xml",
                            n = o.join(t, "Thunder Network\\ServicePlatform\\"), r = o.join(n, i);
                        if (!(yield a.FileSystemAWNS.existsAW(r))) break;
                        let l = yield a.FileSystemAWNS.readFileAW(r);
                        if (!l || "" === l.toString()) break;
                        try {
                            let e = {explicitArray: !1}, t = yield f(s.parseString)(l, e);
                            null !== t && void 0 !== t && (this.browserconfig = t.browserconfig, yield this.setInstallWatchBrowserList())
                        } catch (e) {
                            g.information(e)
                        }
                    } while (0);
                    this.setConfigShowBrowsers(), g.information("leave readBrowserConfigXml")
                })
            }

            writeNewBrowserToConfigINI() {
                return n(this, void 0, void 0, function* () {
                    g.information("enter writeNewBrowserToConfigINI");
                    let e = "||";
                    for (let t = 0; t < this.configShowBrowsers.length; ++t) {
                        let i = this.configShowBrowsers[t], n = "Motitor" + i.browserName,
                            o = c.ConfigNS.getValue("Motitor", n, 2);
                        2 === o && c.ConfigNS.setValue("Motitor", n, 1);
                        let a = i.name;
                        void 0 !== a && null !== a && "" !== a && 0 !== o && (void 0 !== e && null !== e && "" !== e ? "edge" === a || "edgecp" === a ? e += "edge||edgecp||" : e = e + a + "||" : e = "edge" === a || "edgecp" === a ? "edge||edgecp||" : a + "||")
                    }
                    h.BHOConfigNS.setValue("Monitor", "ConfigBrowsers", e), g.information("leave writeNewBrowserToConfigINI", e)
                })
            }

            getShortThunderVersion() {
                let e = "";
                do {
                    let t = o.join(__rootDir, "../../Thunder.exe"), i = p.getFileVersion(t);
                    if (null === i || void 0 === i || "" === i) break;
                    let n = i.split(/\./);
                    null !== n && void 0 !== n && n.length >= 3 && (e = n[0] + "." + n[1] + "." + n[2])
                } while (0);
                return e
            }

            setInstallWatchBrowserList() {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (null === this.browserconfig || void 0 === this.browserconfig) break;
                        if (null === this.browserconfig.browsers || void 0 === this.browserconfig.browsers) break;
                        let e = this.browserconfig.browsers;
                        if (null === e || void 0 === e || e.browser.length <= 0) break;
                        for (let t = 0; t < e.browser.length; ++t) {
                            let i = e.browser[t], n = !1;
                            "appReg" === i.type ? n = yield this.checkInstallByappReg(i) : "appPath" === i.type && (n = this.checkInstallByappPath(i)), n && this.installWatchBrowsers.push(i)
                        }
                        g.information("配置初始化时,安装的浏览器:", this.installWatchBrowsers)
                    } while (0)
                })
            }

            checkInstallByappReg(e) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (null === e || void 0 === e) break;
                        if (null === e.reg || void 0 === e.reg) break;
                        let i = e.reg.regRoot;
                        if (null === i || void 0 === i || "" === i) break;
                        let n = e.reg.regKey;
                        if (null === n || void 0 === n || "" === n) break;
                        let r = e.reg.regName, s = p.queryRegValue(i, n, r);
                        if (g.information("checkInstallByappReg:", s, i, n, r), null === s || void 0 === s || "" === s) break;
                        s = this.getPathFromRegString(s);
                        let l = p.getLongPathName(s);
                        null !== l && void 0 !== l && "" !== l && (s = l);
                        let d = e.proName, u = d.toLowerCase();
                        if (s.toLowerCase().search(u) < 0) {
                            let e = o.extname(s);
                            if (void 0 === e || null === e || "" === e) s = o.join(s, d); else {
                                let e = o.dirname(s);
                                s = o.join(e, d)
                            }
                            if (!(t = yield a.FileSystemAWNS.existsAW(s))) {
                                let e = o.dirname(s);
                                s = this.getFilePathByDir(e, d)
                            }
                        }
                        t || (t = yield a.FileSystemAWNS.existsAW(s))
                    } while (0);
                    return t
                })
            }

            getPathFromRegString(e) {
                let t = e, i = t.search(/\,/);
                return i >= 0 && (t = t.substring(0, i)), t = t.replace(/\"/g, "")
            }

            getFilePathByDir(e, t) {
                return g.information("getFilePathByDir:", e, t), ""
            }

            checkInstallByappPath(e) {
                let t = !1;
                do {
                    if (null === e || void 0 === e) break;
                    if (null === e.filePath || void 0 === e.filePath || "" === e.filePath) break;
                    let i = p.getSystemTempPath();
                    if (null === i || void 0 === i || "" === i) break;
                    let n = i.substring(0, 1);
                    if (null === n || void 0 === n || "" === n) break;
                    n += ":\\";
                    let a = o.join(n, e.filePath);
                    t = p.queryFileExists(a)
                } while (0);
                return t
            }

            setConfigShowBrowsers() {
                do {
                    let e = {browserName: "IE浏览器", icoUrl: ""};
                    if (this.configShowBrowsers.push(e), void 0 === this.installWatchBrowsers || null === this.installWatchBrowsers || this.installWatchBrowsers.length <= 0) break;
                    for (let e = 0; e < this.installWatchBrowsers.length; ++e) {
                        let t = this.installWatchBrowsers[e], i = !1;
                        for (let e = 0; e < this.configShowBrowsers.length; ++e) {
                            let n = this.configShowBrowsers[e];
                            if (n.browserName.toLowerCase() === t.browserName.toLowerCase()) {
                                null !== n.icoUrl && void 0 !== n.icoUrl && "" !== n.icoUrl || (this.configShowBrowsers[e].icoUrl = t.icoUrl), i = !0;
                                break
                            }
                        }
                        i || this.configShowBrowsers.push(t)
                    }
                } while (0)
            }
        }
    }(t.SettingConfigHelperNS || (t.SettingConfigHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(0), r = i(14), s = a.default.getLogger("MenuSkinNS");
    !function (e) {
        e.setStyle = function (e, t) {
            return n(this, void 0, void 0, function* () {
                if (s.information("setStyle", e, t), null !== e) {
                    const {WindowPreferenceNS: e} = yield Promise.resolve().then(() => i(672));
                    let t = {windowPreference: e.getWindowPreference()};
                    s.information("skinOpts", t)
                }
            })
        }, e.popEditableDefaultContextMenu = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                let i = yield o.asyncRemoteCall.getCurrentWebContents();
                i.once("context-menu", (a, l) => n(this, void 0, void 0, function* () {
                    if (s.verbose(a), l.isEditable) {
                        let n = [{
                            label: "撤销", enabled: l.editFlags.canUndo, click: () => {
                                i.undo()
                            }
                        }, {type: "separator"}, {
                            label: "剪切", enabled: l.editFlags.canCut, click: () => {
                                i.cut()
                            }
                        }, {
                            label: "复制", enabled: l.editFlags.canCopy, click: () => {
                                i.copy()
                            }
                        }, {
                            label: "粘贴",
                            enabled: l.editFlags.canPaste && r.ThunderUtil.isClipboardTextFormatAvailable(),
                            click: () => {
                                i.paste()
                            }
                        }, {
                            label: "删除", enabled: l.editFlags.canDelete, click: () => {
                                i.delete()
                            }
                        }, {type: "separator"}, {
                            label: "全选", enabled: l.editFlags.canSelectAll, click: () => {
                                i.selectAll()
                            }
                        }];
                        if (void 0 !== e && "function" == typeof e) {
                            let i = e(l);
                            void 0 !== i && i.length > 0 && (void 0 === t ? t = n.length : (t < 0 && (t = n.length + 1 + t) < 0 && (t = 0), t > n.length && (t = n.length)), n.splice(t, 0, ...i))
                        }
                        let a = yield(yield o.asyncRemoteCall.getMenu()).buildFromTemplate(n),
                            s = yield o.asyncRemoteCall.getCurrentWindow();
                        yield a.popup({window: s})
                    }
                }))
            })
        }
    }(t.MenuSkinNS || (t.MenuSkinNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), a = i(0), r = i(15), s = i(71), l = i(113), d = i(56), u = i(53), c = i(114), h = i(84),
        f = i(147), p = i(78), g = i(115).MsgQueueManagerNS.MsgQueue.getInstance().getQueue("notification"),
        m = a.default.getLogger("plugin-ui"), v = l.PluginWebviewMgrNS.getWebViewMgr();
    !function (e) {
        const t = new class extends o.EventEmitter {
            constructor() {
                super(), this.isRegister = !1, this.isRegister = !1, this.buttonCreated = {}, this.index = 0
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        CreateButton: this.createButton.bind(this),
                        UpdateButton: this.updateButton.bind(this),
                        RemoveButton: this.removeButton.bind(this),
                        CreateWebview: this.createWebview.bind(this),
                        RegisterMenuEvent: this.registerMenuEvent.bind(this),
                        UnRegisterMenuEvent: this.unRegisterMenuEvent.bind(this),
                        SetDefaultVipSpeedStatus: this.setDefaultVipSpeedStatus.bind(this),
                        UpdateVipSpeedStatus: this.updateVipSpeedStatus.bind(this),
                        GetDownloadingActiveTaskId: this.getDownloadingActiveTaskId.bind(this),
                        ShowToast: this.showToast.bind(this),
                        CloseToast: this.closeToast.bind(this),
                        CreateBrowserWindow: this.createBrowserWindow,
                        RoundRectWindow: this.roundRectWindow,
                        OpenCommunityGroup: this.openCommunityGroup.bind(this),
                        PushNotify: this.pushNotify.bind(this)
                    };
                    r.server.registerFunctions(e), r.server.on("end", e => {
                        c.downloadContextMenu.unRegisterMenuEvent(void 0, e)
                    })
                }
            }

            constructButtonInfo(e, t, i, n) {
                let o = `${i}`;
                if (n.id && (o = `${i}|${n.id}`), this.buttonCreated.hasOwnProperty(o)) throw new Error(`${o} try to add toolbar button repeatedly`);
                this.buttonCreated[o] = e, t && "toolbar-vip-button" === t.name && (n.position || (n.position = -2))
            }

            createButton(e, t, ...i) {
                m.information("createButton in");
                do {
                    if (!e) break;
                    if (!i || !i[0] || !i[1]) break;
                    let n = i[0], o = i[1];
                    switch (n) {
                        case"toolbar_button":
                            if (!o.id) break;
                            this.constructButtonInfo(e, t, n, o), this.emit("add_toolbar_button", o);
                            break;
                        case"vip_renew_button":
                            if (!o.imgSrc) break;
                            this.constructButtonInfo(e, t, n, o), this.emit("add_vip_renew_button", o);
                            break;
                        case"onething":
                            this.constructButtonInfo(e, t, n, o), this.emit("add_pc_node_button", o, e);
                            break;
                        case"kuainiao_plugin":
                            this.constructButtonInfo(e, t, n, o), this.emit("add_kuainiao_button", o, e)
                    }
                } while (0)
            }

            updateButtonInfo(e, t, i, n) {
                let o = `${i}`;
                if (n.id && (o = `${i}|${n.id}`), this.buttonCreated[o] !== e) throw this.buttonCreated[o] ? new Error(`${o} update failed cause button is created by others`) : new Error(`${o} update failed, please make sure that button is created`)
            }

            removeButtonInfo(e, t, i, n) {
                let o = `${i}`;
                if (n && n.id && (o = `${i}|${n.id}`), this.buttonCreated[o] !== e) throw this.buttonCreated[o] ? new Error(`${o} remove failed cause button is created by others`) : new Error(`${o} remove failed, please make sure that button is created`);
                delete this.buttonCreated[o]
            }

            updateButton(e, t, ...i) {
                m.information("updateButton in", i && i[1]);
                do {
                    if (!e) break;
                    if (!i || !i[0] || !i[1]) break;
                    let n = i[0], o = i[1];
                    switch (n) {
                        case"toolbar_button":
                            this.updateButtonInfo(e, t, n, o), this.emit("update_toolbar_button", o);
                            break;
                        case"vip_renew_button":
                            this.emit("update_vip_renew_button", o);
                            break;
                        case"onething":
                            this.updateButtonInfo(e, t, n, o), this.emit("update_pc_node_button", o, e);
                            break;
                        case"kuainiao_plugin":
                            this.updateButtonInfo(e, t, n, o), this.emit("update_kuainiao_button", o, e)
                    }
                } while (0)
            }

            removeButton(e, t, ...i) {
                do {
                    if (!e) break;
                    if (!i || !i[0]) break;
                    let n = i[0], o = i[1];
                    switch (n) {
                        case"kuainiao_plugin":
                            this.removeButtonInfo(e, t, n, o), this.emit("remove_kuainiao_button", o, e)
                    }
                } while (0)
            }

            createWebview(e, t, ...i) {
                let n = !1;
                do {
                    if (!e) break;
                    if (!i && !i[0] || !i[1]) break;
                    let o = i[0], a = i[1];
                    if (!a.src) break;
                    n = v.create(t, o, a)[0]
                } while (0);
                return n
            }

            registerMenuEvent(e, t, ...i) {
                do {
                    if (!e) break;
                    if (!t && !t.name) throw Error("registerMenuEvent but no context name");
                    if (!i && !i[0]) break;
                    let n = i[0];
                    if (n <= c.DownloadMenuType.Unknown || n >= c.DownloadMenuType.Upper) break;
                    c.downloadContextMenu.registerMenuEvent(n, e)
                } while (0)
            }

            unRegisterMenuEvent(e, t, ...i) {
                do {
                    if (!e) break;
                    let t = void 0;
                    if (i && i[0] && ((t = i[0]) <= c.DownloadMenuType.Unknown || t >= c.DownloadMenuType.Upper)) break;
                    c.downloadContextMenu.unRegisterMenuEvent(t, e)
                } while (0)
            }

            setDefaultVipSpeedStatus(e, t, ...i) {
                do {
                    if (!e) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    this.emit("init_vip_task_status", t)
                } while (0)
            }

            updateVipSpeedStatus(e, t, ...i) {
                do {
                    if (!e) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    this.emit("update_vip_task_status", t)
                } while (0)
            }

            getDownloadingActiveTaskId(e, t, ...i) {
                return v.getActiveTaskId()
            }

            showToast(e, t, ...i) {
                let n = void 0;
                do {
                    if (!e || !t) break;
                    if (!i || !i[0]) break;
                    let o = i[0];
                    if (o.type < u.ToastNotifyItemType.GreenNotify || o.type > u.ToastNotifyItemType.RedCancelNotify) break;
                    o.id || (o.id = `${t.name || ""}_totast_${this.index++}`), n = o.id;
                    let a = d.ToastNotifyManagerNS.getToastNotifyManger().showNotify(o.id, o.type, o.message, o.duration);
                    a && o.type === u.ToastNotifyItemType.RedCancelNotify && a.onCancel(() => {
                        o.onCancle && o.onCancle()
                    })
                } while (0);
                return n
            }

            closeToast(e, t, ...i) {
                do {
                    if (!e) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    d.ToastNotifyManagerNS.getToastNotifyManger().closeNotify(t)
                } while (0)
            }

            createBrowserWindow(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return (yield r.server.callClientFunctionByName(s.CommonIPCBase.mainProcessContext, "CreateBrowserWindow", ...i))[0]
                })
            }

            roundRectWindow(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return (yield r.server.callClientFunctionByName(s.CommonIPCBase.mainProcessContext, "RoundRectWindow", ...i))[0]
                })
            }

            openCommunityGroup(e, t, ...i) {
                do {
                    let e = null;
                    if (!i[0]) break;
                    if ("object" == typeof i[0]) e = i[0]; else if ("string" == typeof i[0]) try {
                        e = JSON.parse(i[0])
                    } catch (e) {
                    }
                    if (!e) break;
                    this.emit("openComunityGroup", e)
                } while (0)
            }

            pushNotify(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (!i[0]) break;
                        let e = i[1] || {};
                        e = Object.assign({}, e, {
                            type: h.Notification.TipsType.CommonPushTip,
                            priority: p.MsgQueueNS.MsgPriority.Download,
                            data: {exData: i[0]},
                            width: 400,
                            height: 172
                        }), g.enQueue({
                            callback: () => {
                                f.NotificationNS.notify(e).catch()
                            }, name: "push", priority: p.MsgQueueNS.MsgPriority.Download
                        }), (yield f.NotificationNS.getCurrentWindow()) ? g.getCurrentProperty() < p.MsgQueueNS.MsgPriority.Download && f.NotificationNS.close().catch() : g.deQueue()
                    } while (0)
                })
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }, e.on = function (e, i) {
            t.on(e, i)
        }, e.removeListener = function (e, i) {
            t.removeListener(e, i)
        }
    }(t.PluginFunctionUINS || (t.PluginFunctionUINS = {}))
}, function (e, t, i) {
    e.exports = i(97).Buffer
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(452), o = i(349);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(901);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-select.vue", t.default = s.exports
}, function (e, t) {
    e.exports = require("net")
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), t.assert = t.log = t.error = t.warn = t.info = t.trace = t.timeEnd = t.time = t.traceback = void 0;
    const n = i(2);
    let o, a = console;

    function r(e = 5) {
        let t = /at\s+(.*)\s+\((.*):(\d*):(\d*)\)/i, i = /at\s+()(.*):(\d*):(\d*)/i,
            o = (new Error).stack.split("\n").slice(e + 1);
        o.shift();
        let a = [];
        return o.forEach((e, o) => {
            let r = t.exec(e) || i.exec(e), s = {};
            r && 5 === r.length && (s.method = r[1], s.path = r[2], s.line = r[3], s.pos = r[4], s.file = n.basename(s.path), a.push(s))
        }), a
    }

    if (o = "renderer" === process.type ? "[Renderer] [async-remote]:" : "browser" === process.type ? "[Browser] [async-remote]:" : `[${process.type}] [async-remote]`, t.traceback = function (e = 5) {
        return r(e).map(e => e.method + "@(" + e.file + ")").join(" <= ")
    }, t.time = function (...e) {
        a.time(...e)
    }, t.timeEnd = function (...e) {
        a.timeEnd(...e)
    }, t.trace = function (...e) {
        let t = r(), i = "";
        t[0] && t[0].method && (i = i), a.trace(o, ...e)
    }, t.info = function (...e) {
        let t = r(), i = "anonymous";
        t[0] && t[0].method && (i = i), a.info(o, "[" + i + "]", e.join(","))
    }, t.warn = function (...e) {
        let t = r(), i = "";
        t[0] && t[0].method && (i = i), a.warn("<WARN>" + o, "[" + i + "]", e.join(","))
    }, t.error = function (...e) {
        let t = r(), i = "";
        t[0] && t[0].method && (i = i), a.error("<ERROR>" + o, "[" + i + "]", e.join(","))
    }, t.log = function (...e) {
        a.log(o, ...e)
    }, t.assert = function (e, t) {
        if (!e) throw new Error(t)
    }, !process.env.DEBUG_ASYNC_REMOTE) {
        let e = function () {
        };
        t.traceback = e, t.time = e, t.timeEnd = e, t.trace = e, t.info = e, t.warn = e, t.error = e, t.log = e, t.assert = e
    }
}, function (e, t) {
    e.exports = require("buffer")
}, function (e, t, i) {
    e.exports = i(65)(45)
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e[e.ValueNull = 0] = "ValueNull", e[e.ValueInt = 1] = "ValueInt", e[e.ValueBigint = 2] = "ValueBigint", e[e.ValueDouble = 3] = "ValueDouble", e[e.ValueString = 4] = "ValueString", e[e.ValueBlob = 5] = "ValueBlob"
    }(t.ValueType || (t.ValueType = {})), function (e) {
        e[e.StatementBengin = -1] = "StatementBengin", e[e.CreateTaskBase = 0] = "CreateTaskBase", e[e.CreateP2spTask = 1] = "CreateP2spTask", e[e.CreateBtTask = 2] = "CreateBtTask", e[e.CreateBtFile = 3] = "CreateBtFile", e[e.CreateEmuleTask = 4] = "CreateEmuleTask", e[e.CreateGroupTask = 5] = "CreateGroupTask", e[e.CreateMagnetTask = 6] = "CreateMagnetTask", e[e.DestroyTaskBase = 7] = "DestroyTaskBase", e[e.DestroyP2spTask = 8] = "DestroyP2spTask", e[e.DestroyBtTask = 9] = "DestroyBtTask", e[e.DestroyBtFile = 10] = "DestroyBtFile", e[e.DestroyEmuleTask = 11] = "DestroyEmuleTask", e[e.DestroyGroupTask = 12] = "DestroyGroupTask", e[e.DestroyMagnetTask = 13] = "DestroyMagnetTask", e[e.LoadTaskBase = 14] = "LoadTaskBase", e[e.LoadP2spTask = 15] = "LoadP2spTask", e[e.LoadBtTask = 16] = "LoadBtTask", e[e.LoadBtFile = 17] = "LoadBtFile", e[e.LoadEmuleTask = 18] = "LoadEmuleTask", e[e.LoadGroupTask = 19] = "LoadGroupTask", e[e.SetTaskSavePath = 20] = "SetTaskSavePath", e[e.SetTaskUrl = 21] = "SetTaskUrl", e[e.SetTaskName = 22] = "SetTaskName", e[e.SetTaskNamingType = 23] = "SetTaskNamingType", e[e.SetTaskDescription = 24] = "SetTaskDescription", e[e.SetTaskCid = 25] = "SetTaskCid", e[e.SetTaskGcid = 26] = "SetTaskGcid", e[e.SetTaskStatus = 27] = "SetTaskStatus", e[e.SetTaskFileCreated = 28] = "SetTaskFileCreated", e[e.SetTaskFileSize = 29] = "SetTaskFileSize", e[e.SetTaskReceiveSize = 30] = "SetTaskReceiveSize", e[e.SetTaskDownloadSize = 31] = "SetTaskDownloadSize", e[e.SetTaskCompletionTime = 32] = "SetTaskCompletionTime", e[e.SetTaskDownloadingPeriod = 33] = "SetTaskDownloadingPeriod", e[e.SetTaskRemovingToRecycleTime = 34] = "SetTaskRemovingToRecycleTime", e[e.SetTaskFailureErrorCode = 35] = "SetTaskFailureErrorCode", e[e.SetTaskUserRead = 36] = "SetTaskUserRead", e[e.SetTaskOpenOnCompelete = 37] = "SetTaskOpenOnCompelete", e[e.SetTaskForbidden = 38] = "SetTaskForbidden", e[e.SetTaskUserData = 39] = "SetTaskUserData", e[e.SetTaskDownload = 40] = "SetTaskDownload", e[e.SetTaskOrigin = 41] = "SetTaskOrigin", e[e.SetTaskChannelInfo = 42] = "SetTaskChannelInfo", e[e.SetP2spTaskUseOriginOnly = 43] = "SetP2spTaskUseOriginOnly", e[e.SetP2spTaskThreadCount = 44] = "SetP2spTaskThreadCount", e[e.SetBtTaskSeedFile = 45] = "SetBtTaskSeedFile", e[e.SetBtFileInfo = 46] = "SetBtFileInfo", e[e.SetBtFileCid = 47] = "SetBtFileCid", e[e.SetBtFileUserRead = 48] = "SetBtFileUserRead", e[e.SetCategoryId = 49] = "SetCategoryId", e[e.LoadCategory = 50] = "LoadCategory", e[e.CreateCategory = 51] = "CreateCategory", e[e.SetCategoryPassword = 52] = "SetCategoryPassword", e[e.SetCategoryAccountPassword = 53] = "SetCategoryAccountPassword", e[e.SearchTaskByName = 54] = "SearchTaskByName", e[e.SearchTaskByBtDisplayName = 55] = "SearchTaskByBtDisplayName", e[e.SetBtFileFailureErrorCode = 56] = "SetBtFileFailureErrorCode", e[e.BatchFindP2spTask = 57] = "BatchFindP2spTask", e[e.BatchFindEmuleTask = 58] = "BatchFindEmuleTask", e[e.BatchFindBtTask = 59] = "BatchFindBtTask", e[e.BatchFindGroupTask = 60] = "BatchFindGroupTask", e[e.BatchLoadBtFile = 61] = "BatchLoadBtFile", e[e.SetTaskPlayPosition = 62] = "SetTaskPlayPosition", e[e.SetTaskDuration = 63] = "SetTaskDuration", e[e.SetBtFilePlayPosition = 64] = "SetBtFilePlayPosition", e[e.SetBtFileDuration = 65] = "SetBtFileDuration", e[e.SetYunTaskId = 66] = "SetYunTaskId", e[e.StatementEnd = 67] = "StatementEnd"
    }(t.StatementType || (t.StatementType = {}))
}, function (e, t) {
    e.exports = require("http")
}, function (e, t) {
    e.exports = require("stream")
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(32), a = i(0), r = i(5), s = i(15), l = a.default.getLogger("download-panel-thunderPanTask");
    !function (e) {
        e.createPanTable = function () {
            let e = o.ThunderKernel.beginTransaction();
            o.ThunderKernel.execSqlite("CREATE TABLE if not exists ThunderPanTask (       id  INTEGER PRIMARY KEY,       TaskId BIGINT not null,       PanTaskId varchar(255),       Data Blob,       FileId varchar(255),       UserId varchar(20) not null,       FOREIGN KEY(TaskId) REFERENCES TaskBase(TaskId)      );", (e, t) => {
            }), o.ThunderKernel.execSqlite("CREATE INDEX if not exists PanTaskId ON ThunderPanTask (PanTaskId);                              CREATE INDEX if not exists FileId ON ThunderPanTask (FileId);                              CREATE INDEX if not exists TaskId ON ThunderPanTask (TaskId);    ", (e, t) => {
            }), o.ThunderKernel.commitTransaction(e)
        }, e.insertTask = function (e, t, i, n) {
            let a;
            return r.isNullOrUndefined(n) ? (l.warning("error param, expect data, got 0. "), !1) : (a = `INSERT INTO ThunderPanTask (TaskId, PanTaskId, UserId, Data) VALUES (${e}, '${t}', '${i}', '${n}')`, o.ThunderKernel.execSqlite(a, (e, t) => {
            }), s.server.fireClientEvent("OnInsertThunderPanTask"), !0)
        }, e.queryTask = function (e, t) {
            return n(this, void 0, void 0, function* () {
                let i = {};
                return new Promise(function (n, a) {
                    o.ThunderKernel.querySqlite(`SELECT PanTaskId, FileId, Data from ThunderPanTask where TaskId = ${e} and userId = '${t}'`, (e, t, o) => {
                        if (!t || t.length < 1) n(void 0); else if (1 === t.length) {
                            for (let e of t[0]) i[e.key] = e.value;
                            n(i)
                        } else {
                            let e = [];
                            for (let i of t) {
                                let t = {};
                                for (let e of i) t[e.key] = e.value;
                                e.push(t)
                            }
                            n(e)
                        }
                    })
                })
            })
        }, e.deleteTask = function (e, t, i) {
            let n;
            if (e) n = `DELETE FROM ThunderPanTask where PanTaskId = '${e}'`; else if (t) n = `DELETE FROM ThunderPanTask WHERE FileId = '${t}'`; else {
                if (!i) return l.warning("deleteTask got wrong param, expect 1, get 0"), !1;
                n = `DELETE FROM ThunderPanTask where TaskId = ${i}`
            }
            return o.ThunderKernel.execSqlite(n, (e, t) => {
            }), !1
        }, e.updateTaskPath = function (e, t) {
            return o.ThunderKernel.execSqlite(`UPDATE ThunderPanTask SET Data = '${t}' where fileId = '${e}'`, (e, t) => {
            }), !1
        }, e.updateTaskFileId = function (e, t) {
            return "" !== e ? o.ThunderKernel.execSqlite(`UPDATE ThunderPanTask SET FileId = '${t}' WHERE PanTaskId = '${e}';`, (e, t) => {
            }) : "" !== t && o.ThunderKernel.execSqlite(`UPDATE ThunderPanTask SET PanTaskId = '${e}' WHERE FileId = '${t}';`, (e, t) => {
            }), !1
        }
    }(t.ThunderPanTaskNS || (t.ThunderPanTaskNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(9), r = i(4), s = i(4), l = i(512), d = i(11), u = i(16),
        c = o.default.getLogger("download-jammed"), h = d.DownloadKernelTaskManager.getTaskManager(),
        f = u.DownloadKernelEventManager.getEventManager(), p = 3, g = 10;
    const m = new class {
        constructor() {
            this.taskListInfo = {}, this.removeTaskIdList = {}, this.recordTaskRestartList = {}, this.stopPendingTaskList = {}, this.refreshInfoTimerId = void 0
        }

        isStopPending(e) {
            let t = !1;
            return this.stopPendingTaskList.hasOwnProperty(String(e)) && (t = this.stopPendingTaskList[e]), t
        }

        isJammedOnce(e) {
            let t = !1;
            return this.recordTaskRestartList.hasOwnProperty(String(e)) && (t = !0), t
        }

        attach() {
            this.startRefreshTaskListInfoTimer(), this.attachTaskEvent()
        }

        isJammed(e) {
            let t = !1;
            do {
                let i = e.taskTotalSize;
                if (i <= 0) break;
                let n = e.receiveValidDataSize;
                if (n <= 0) break;
                let o = 100 * n / i;
                if (o >= 99.9 && o < 100) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }

        constructJammedTaskInfo(e) {
            let t = null;
            do {
                let i = h.getTaskFromTaskId(e);
                if (!i) break;
                if (i.getTaskStatus() !== r.DownloadKernel.TaskStatus.Started) break;
                let n = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.FileSize),
                    o = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSize);
                t = {
                    taskId: e,
                    taskTotalSize: n,
                    receiveDataSize: i.getTaskAttribute(r.DownloadKernel.TaskAttribute.ReceivedSize),
                    receiveValidDataSize: o,
                    addReceiveDataSize: 0,
                    time: 0,
                    peering: i.getTaskAttribute(r.DownloadKernel.TaskAttribute.SrcUsing)
                }
            } while (0);
            return t
        }

        getExistJammedTaskInfo(e) {
            let t = null;
            do {
                if (!e) break;
                let i = e.getId();
                this.taskListInfo.hasOwnProperty(String(i)) && (t = this.taskListInfo[i])
            } while (0);
            return t
        }

        getNewJammedTaskInfo(e) {
            let t = null;
            do {
                if (!e) break;
                let i = e.taskId, n = this.constructJammedTaskInfo(i);
                if (!n) break;
                let o = e.time;
                if (n.receiveValidDataSize > e.receiveValidDataSize) {
                    t = n;
                    break
                }
                let a = n.receiveDataSize - e.receiveDataSize;
                a > e.addReceiveDataSize ? o = 0 : 0 === n.peering ? o = 0 : o += 1, t = {
                    taskId: i,
                    taskTotalSize: n.taskTotalSize,
                    peering: n.peering,
                    time: o,
                    receiveValidDataSize: e.receiveValidDataSize,
                    receiveDataSize: e.receiveDataSize,
                    addReceiveDataSize: a
                }
            } while (0);
            return t
        }

        handleTaskByNewInfo(e) {
            let t = !1;
            do {
                if (!e) break;
                if (!this.isJammed(e)) {
                    c.information("jammed false", e.taskId, e.taskTotalSize);
                    break
                }
                if (e.time === g && e.receiveValidDataSize >= e.taskTotalSize) {
                    c.information("already 10 seconds but still no speed", e.taskId, e.taskTotalSize), this.restartTask(e.taskId);
                    break
                }
                let i = .05 * e.taskTotalSize;
                if (e.addReceiveDataSize > i) {
                    c.information("addReceiveDataSize over %5", e.addReceiveDataSize, e.taskTotalSize), this.restartTask(e.taskId);
                    break
                }
                t = !0
            } while (0);
            return t
        }

        addJammedTaskInfo(e, t) {
            this.taskListInfo[e] = t
        }

        removeTaskListInfoById(e) {
            this.taskListInfo.hasOwnProperty(String(e)) && (delete this.taskListInfo[e], this.setIsRemoveTaskId(e))
        }

        removeTaskListInfoByTask(e) {
            let t = e.getId();
            this.taskListInfo.hasOwnProperty(String(t)) && delete this.taskListInfo[t]
        }

        setIsRemoveTaskId(e) {
            this.removeTaskIdList.hasOwnProperty(String(e)) || (this.removeTaskIdList[e] = 0)
        }

        getIsRemoveTaskId(e) {
            let t = 0;
            return this.removeTaskIdList.hasOwnProperty(String(e)) && (t = this.removeTaskIdList[e], this.removeTaskIdList[e] = t + 1), t
        }

        getRestartCountById(e) {
            let t = 0;
            return this.recordTaskRestartList.hasOwnProperty(String(e)) && (t = this.recordTaskRestartList[e]), t
        }

        addRestartCountById(e) {
            this.recordTaskRestartList.hasOwnProperty(String(e)) || (this.recordTaskRestartList[e] = 0), this.recordTaskRestartList[e] = this.recordTaskRestartList[e] + 1
        }

        restartTask(e) {
            do {
                if (this.getRestartCountById(e) >= p) {
                    c.information("restart break beacause reach max restart");
                    break
                }
                this.addRestartCountById(e), this.addStopPending(e);
                let t = h.getTaskFromTaskId(e);
                l.statCoreEvent(t, "download_jammed").catch(), h.stopTaskAW(e, r.DownloadKernel.TaskStopReason.TaskJammed).then(t => n(this, void 0, void 0, function* () {
                    t && (yield h.startTask(e))
                })).catch()
            } while (0)
        }

        addStopPending(e) {
            this.stopPendingTaskList[e] = !0
        }

        removeStopPending(e) {
            this.isStopPending(e) && delete this.stopPendingTaskList[e]
        }

        startRefreshTaskListInfoTimer() {
            void 0 !== this.refreshInfoTimerId && (clearInterval(this.refreshInfoTimerId), this.refreshInfoTimerId = void 0), this.refreshInfoTimerId = setInterval(() => {
                do {
                    if (!this.taskListInfo) break;
                    if (0 === Object.keys(this.taskListInfo).length) break;
                    let e = [];
                    for (let t in this.taskListInfo) {
                        let i = this.taskListInfo[t];
                        if (!i) continue;
                        let n = this.getNewJammedTaskInfo(i);
                        this.handleTaskByNewInfo(n) ? this.addJammedTaskInfo(i.taskId, n) : e.push(i.taskId)
                    }
                    for (let t of e) this.removeTaskListInfoById(t)
                } while (0)
            }, 1e3)
        }

        attachTaskEvent() {
            f.attachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== r.DownloadKernel.TaskEventType.StatusChanged) break;
                    let t = e[1];
                    if (!t) break;
                    if (0 === t.length) break;
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        if (i.getTaskAttribute(r.DownloadKernel.TaskAttribute.Background)) continue;
                        let n = i.getTaskStatus();
                        n !== r.DownloadKernel.TaskStatus.StopPending && n !== r.DownloadKernel.TaskStatus.Stopped || this.removeTaskListInfoByTask(i), n === r.DownloadKernel.TaskStatus.Started && this.removeStopPending(i.getId())
                    }
                } while (0)
            }), f.attachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== r.DownloadKernel.TaskEventType.DetailChanged) break;
                    if (!e[1]) break;
                    let t = e[1];
                    if (!t) break;
                    for (let e of t) {
                        let t = e.getId(), i = this.constructJammedTaskInfo(t);
                        if (!i) continue;
                        if (!this.isJammed(i)) continue;
                        if (this.getExistJammedTaskInfo(e)) continue;
                        let n = this.getIsRemoveTaskId(t);
                        n && (n > 15 || n % 5 != 0) || (c.information("detailchange to add"), this.addJammedTaskInfo(t, i))
                    }
                } while (0)
            })
        }
    };
    const v = new class {
        constructor() {
            this.map = {}, this.validationSizeList = [], f.attachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, this.onTaskStatusChanged.bind(this)), f.attachTaskEvent(s.DownloadKernel.TaskEventType.DetailChanged, this.onTaskDetailChanged.bind(this))
        }

        isValidatingFileData(e) {
            let t = this.map[e];
            return !!t && !!t.isValidating
        }

        getValidationDuration(e) {
            let t = this.map[e], i = null;
            return t && t.isValidating && (i = {remainSeconds: t.validation.remainSeconds}), i
        }

        isCorrectingPieces(e) {
            let t = this.map[e];
            return !!t && !!t.isCorrecting
        }

        onTaskStatusChanged(e, t) {
            for (let e of t) {
                if (e.getTaskAttribute(r.DownloadKernel.TaskAttribute.Background)) continue;
                let t = e.getId(), i = e.getTaskStatus();
                if (i === s.DownloadKernel.TaskStatus.StopPending || i === s.DownloadKernel.TaskStatus.Stopped) delete this.map[t]; else if (i === s.DownloadKernel.TaskStatus.Succeeded || i === s.DownloadKernel.TaskStatus.Failed) {
                    if (this.isValidatingFileData(t) && i === s.DownloadKernel.TaskStatus.Succeeded) {
                        let e = this.map[t], i = Date.now() - e.validation.startTime;
                        a.XLStatNS.trackEvent("download_leftpanel", "check_data_end", "", 0, 0, 0, 0, "dur=" + i)
                    }
                    delete this.map[t]
                }
            }
        }

        calcValidatingSpeed(e) {
            return this.validationSizeList.length > 6 && this.validationSizeList.splice(0, 1), this.validationSizeList.push(e), this.validationSizeList.reduce((e, t) => e + t) / this.validationSizeList.length
        }

        updateValidationInfo(e) {
            let t = e.taskId;
            e.isValidating = !1, e.dlSize >= e.fileSize && e.validSize < e.fileSize && (e.isValidating = !0);
            let i = this.map[t];
            if (i && i.isValidating) {
                let t = e.validSize - i.validSize, n = this.calcValidatingSpeed(t), o = e.fileSize - e.validSize,
                    a = n > 0 ? Math.round(o / n) : 1 / 0;
                e.validation.remainSize = o, e.validation.speed = n, e.validation.remainSeconds = a
            }
            e.isValidating && (i && i.isValidating || (e.validation.startTime = Date.now(), a.XLStatNS.trackEvent("download_leftpanel", "checking_data", "", 0, 0, 0, 0, ""))), window.__validating && (e.isValidating = !0)
        }

        updateCorrectionInfo(e) {
            let t = e.taskId, i = this.map[t];
            i && (i.isCorrecting ? e.realSize >= e.dlSize ? (e.isCorrecting = !1, c.warning("DownloadKernel. correcting down")) : e.isCorrecting = !0 : e.isCorrecting = i.realSize > e.realSize, e.isCorrecting && (i && i.isCorrecting || (a.XLStatNS.trackEvent("download_leftpanel", "data_error_correction", "", 0, 0, 0, 0, ""), e.dlSize < e.fileSize && a.XLStatNS.trackEvent("download_leftpanel", "data_error_correction_icon_show", "", 0, 0, 0, 0, ""))), window.__correcting && (e.isCorrecting = !0), i.isCorrecting !== e.isCorrecting && c.warning("DownloadKernel. correction state changed. from ", i.isCorrecting, " ==> ", e.isCorrecting))
        }

        onTaskDetailChanged(e, t, i) {
            for (let e of t) {
                if (e.getTaskAttribute(r.DownloadKernel.TaskAttribute.Background)) continue;
                if (e.getTaskStatus() !== s.DownloadKernel.TaskStatus.Started) continue;
                let t = e.getId(), i = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSize),
                    n = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.RealDownloadSize),
                    o = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.ValidDownloadSize),
                    a = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.FileSize), l = {
                        taskId: t,
                        dlSize: i,
                        realSize: n,
                        validSize: o,
                        fileSize: a,
                        validation: {remainSize: a - o, speed: 0, remainSeconds: 1 / 0},
                        isCorrecting: !1,
                        isValidating: !1
                    };
                this.updateValidationInfo(l), this.updateCorrectionInfo(l), this.map[t] ? Object.assign(this.map[t], l) : this.map[t] = l
            }
        }
    };
    !function (e) {
        e.init = function () {
            m.attach()
        }, e.isStopPending = function (e) {
            return m.isStopPending(e)
        }, e.isJammedOnce = function (e) {
            return m.isJammedOnce(e)
        }, e.isValidatingFileData = function (e) {
            return v.isValidatingFileData(e)
        }, e.getValidationDuration = function (e) {
            return v.getValidationDuration(e)
        }, e.isCorrectingData = function (e) {
            return v.isCorrectingPieces(e)
        }
    }(t.DownloadJammedNS || (t.DownloadJammedNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), a = i(2), r = i(41), s = i(0), l = i(12), d = s.default.getLogger("Browser"),
        u = require || i(639);

    function c() {
        return n(this, void 0, void 0, function* () {
            let e = yield(yield l.asyncRemoteCall.getApp()).getAppPath();
            return window.__rootDir ? window.__rootDir : e
        })
    }

    function h(e) {
        let t = process.env.PATH.split(";");
        -1 === t.indexOf(e) && (t.splice(0, 0, e), process.env.PATH = t.join(";"))
    }

    function f(e) {
        let t = process.env.PATH.split(";"), i = t.indexOf(e);
        -1 !== i && (t.splice(i, 1), process.env.PATH = t.join(";"))
    }

    let p = null;
    const g = new Proxy(function () {
    }, {
        getPrototypeOf: e => p ? Reflect.getPrototypeOf(p.Browser) : null,
        setPrototypeOf: (e, t) => p ? Reflect.setPrototypeOf(p.Browser, t) : null,
        isExtensible: e => !!p && Reflect.isExtensible(p.Browser),
        preventExtensions: e => !!p && Reflect.preventExtensions(p.Browser),
        getOwnPropertyDescriptor: (e, t) => p ? Reflect.getOwnPropertyDescriptor(p.Browser, t) : null,
        has: (e, t) => !!p && Reflect.has(p.Browser, t),
        deleteProperty: (e, t) => !!p && Reflect.deleteProperty(p.Browser, t),
        defineProperty: (e, t, i) => !!p && Reflect.defineProperty(e.Browser, t, i),
        get: (e, t, i) => {
            let n = p ? Reflect.get(p.Browser, t, i) : null;
            return "function" == typeof n ? n.bind(p.Browser) : n
        },
        set: (e, t, i, n) => !!p && Reflect.set(p.Browser, t, n),
        ownKeys: e => p ? Reflect.ownKeys(p.Browser) : [],
        apply: (e, t, i) => {
            throw new Error("only allow calling Browser as constructor ")
        },
        construct: (e, t, i) => p ? Reflect.construct(p.Browser, t, i) : null
    });
    Object.defineProperty(e.exports, "Browser", {value: g}), t.context = new class extends o.EventEmitter {
        constructor() {
            super(...arguments), this.ctx = null, this.dead = !1
        }

        init(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    if (d.information("[tbc] init", e, p), null === p) {
                        let i = yield c(), n = e.tbc_dir ? e.tbc_dir : a.join(i, "../bin/TBC"),
                            r = a.join(n, "libCef.dll");
                        if (!(t = yield this.fileExists(r))) break;
                        let s = e.node_module_path ? e.node_module_path : a.join(i, "../bin/TBC/xlbrowsernode.node");
                        if (!(t = yield this.fileExists(s))) break;
                        if (d.information("[tbc] myRequire", s), h(n), p = u(s), f(n), d.information("[tbc] myRequire tbcModule", p), !p) {
                            t = !1;
                            break
                        }
                        global.tbcModule = p, Object.setPrototypeOf(p.Context.prototype, o.EventEmitter.prototype), Object.setPrototypeOf(p.Browser.prototype, o.EventEmitter.prototype), this.ctx = new p.Context, this.ctx.on("init-done", (...e) => {
                            this.emit("init-done", ...e)
                        }), this.ctx.on("will-uninit", (...e) => {
                            this.emit("will-uninit", ...e)
                        }), this.ctx.on("uninit", (...e) => {
                            this.emit("uninit", ...e)
                        }), this.ctx.on("browser-created", (...e) => {
                            this.emit("browser-created", ...e)
                        }), this.ctx.on("browser-destroyed", (...e) => {
                            this.emit("browser-destroyed", ...e)
                        }), d.information("[tbc] innerInit"), t = yield this.innerInit(e), d.information("[tbc] innerInit", t)
                    }
                } while (0);
                return t
            })
        }

        uninit() {
            this.ctx && !this.dead && (this.dead = !0, this.ctx.uninit())
        }

        getUserAgent() {
            return this.ctx ? this.ctx.getUserAgent() : ""
        }

        innerInit(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise((t, i) => {
                    d.information("[tbc] this.ctx.init"), this.ctx.init(e, e => {
                        d.information("[tbc] this.ctx.init", e), t(e)
                    })
                })
            })
        }

        fileExists(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise((t, i) => {
                    r.exists(e, e => {
                        t(e)
                    })
                })
            })
        }
    }, function (e) {
        for (var i in e) t.hasOwnProperty(i) || (t[i] = e[i])
    }(i(640))
}, function (e, t) {
    e.exports = require("child_process")
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(7).default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        e.uncompressZipFile = function (e, t) {
            return n(this, void 0, void 0, function* () {
                return new Promise(i => {
                    a.asyncUnZipFile(t, e, e => {
                        i(e)
                    })
                })
            })
        }
    }(t.UnzipUtilitiesAWNS || (t.UnzipUtilitiesAWNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(55), a = i(105), r = i(2), s = i(8), l = i(4), d = i(11), u = i(16), c = i(48), h = i(0), f = i(142),
        p = i(652), g = i(7), m = i(106), v = i(39), y = i(14), T = i(67), w = i(22), k = i(38), C = i(15), b = i(10),
        I = g.default(r.join(__rootDir, "../bin/ThunderHelper.node")), S = h.default.getLogger("DownloadAndPlayHelper"),
        _ = d.DownloadKernelTaskManager.getTaskManager(), D = u.DownloadKernelEventManager.getEventManager();
    const A = new class {
        constructor() {
            this.taskStatusChangedEventTable = [], S.information("constructor DownloadAndPlayHelper object")
        }

        init() {
            return n(this, void 0, void 0, function* () {
                if (S.information("init DownloadAndPlayHelper"), !1 === (yield this.isCodecsIntegral())) {
                    let e = o.tmpdir(), t = "APlayerCodecs3.exe", i = r.join(e, "..\\..\\"), n = r.join(i, t);
                    (yield s.FileSystemAWNS.existsAW(n)) && (yield s.FileSystemAWNS.unlinkAW(n)), S.information("downloadplay:", i, n);
                    let d = "NONE";
                    S.information(i, n);
                    let u = {
                        taskBaseInfo: {savePath: i, taskName: t},
                        p2spTaskInfo: {url: d, nameFixed: 0},
                        isBackground: !0
                    }, h = yield _.createTask(l.DownloadKernel.TaskType.P2sp, u);
                    if (null !== h) {
                        let e = h.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                        this.attachTaskStatusChangedEvent(e, t => {
                            let i = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath),
                                n = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName), o = r.join(i, n);
                            s.FileSystemAWNS.existsAW(o).then(t => {
                                t && I.checkDigitalSignature(o, t => {
                                    if (S.information("cqm getVideoMediaInfo CheckDigitalSignature exePath", o, " result", t), !t) return;
                                    S.information("downloadplay:运行exe = ", o);
                                    let i = r.join(__rootDir, "../.."), n = `${o} -path=${i}`;
                                    S.information("install args ", n), a.exec(n), null !== this.taskStatusChangedEventTable[e] && void 0 !== this.taskStatusChangedEventTable[e] && (S.information("downloadplay:取消监听 ", this.taskStatusChangedEventTable[e]), D.detachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventTable[e]), this.taskStatusChangedEventTable[e] = null)
                                })
                            }).catch()
                        }), yield c.DownloadDispatchNS.startTask(e)
                    }
                }
                p.DownloadAndPlayNodeIPCNS.init()
            })
        }

        uninit() {
            p.DownloadAndPlayNodeIPCNS.uninit()
        }

        installXmp() {
        }

        autoInstallXmp() {
            return n(this, void 0, void 0, function* () {
                if (S.information("enter auto installXmp"), 0 !== b.ConfigNS.getValue("CompletedTaskPlay", "isXmpInited", 1)) return !0;
                let e = f.DownloadAndPlayNS.getXmpPath();
                return null !== e && void 0 !== e && "" !== e && (yield s.FileSystemAWNS.existsAW(e)) ? (S.information("Xmp installed"), !0) : (yield this.downloadXmpZip(), !0)
            })
        }

        openXmp(e = "") {
            return n(this, void 0, void 0, function* () {
                let t = 0;
                {
                    let i = f.DownloadAndPlayNS.getXmpPath();
                    if (null !== i && void 0 !== i && "" !== i && (yield s.FileSystemAWNS.existsAW(i))) {
                        let n = r.dirname(i);
                        I.shellExecute(0, "open", i, e, n, "SW_SHOW") > 32 && (t = 1)
                    } else yield this.installXmp()
                }
                return t
            })
        }

        getXmpCoreVersion() {
            return n(this, void 0, void 0, function* () {
                let e = "", t = f.DownloadAndPlayNS.getXmpPath();
                return (yield s.FileSystemAWNS.existsAW(t)) && (e = I.getFileVersion(t)), e
            })
        }

        getXmpUserDataPath() {
            return n(this, void 0, void 0, function* () {
                let e = "";
                do {
                    let t = yield this.getXmpCoreVersion();
                    if (null === t || void 0 === t || "" === t) break;
                    let i = r.join(__rootDir, "../../XMP");
                    t = "V" + t, e = r.join(i, t) + "\\XMP5\\" + t
                } while (0);
                return e
            })
        }

        getXmpBuildNum() {
            return n(this, void 0, void 0, function* () {
                let e = "";
                do {
                    let t = yield this.getXmpCoreVersion();
                    if (null === t || void 0 === t || "" === t) break;
                    let i = t.split(/\./);
                    null !== i && void 0 !== i && 4 === i.length && (e = i[3])
                } while (0);
                return e
            })
        }

        downloadXmpEx() {
        }

        downloadXmpZip() {
            return n(this, void 0, void 0, function* () {
                S.information("enter downloadXmpEx");
                const e = d.DownloadKernelTaskManager.getTaskManager();
                let t = r.resolve(__rootDir, "../../../profiles"), i = {taskName: "XMPSetup_xmpxl11.zip", savePath: t},
                    n = r.resolve(t, "XMPSetup_xmpxl11.zip");
                if (yield s.FileSystemAWNS.existsAW(n)) return void this.uncompressXmp(n).catch();
                yield s.FileSystemAWNS.unlinkAW(r.resolve(t, "XMPSetup_xmpxl11.zip.xltd")), yield s.FileSystemAWNS.unlinkAW(r.resolve(t, "XMPSetup_xmpxl11.zip.xltd.cfg"));
                let o = yield e.createTask(l.DownloadKernel.TaskType.P2sp, {
                    taskBaseInfo: i,
                    p2spTaskInfo: {
                        url: "NONE",
                        refUrl: "",
                        cookie: "",
                        nameFixed: 1
                    },
                    isBackground: !0
                });
                if (null !== o) {
                    let t = o.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                    this.attachTaskStatusChangedEvent(t, e => {
                        let i = e.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath),
                            n = e.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName), o = r.join(i, n);
                        this.uncompressXmp(o).catch(), null !== this.taskStatusChangedEventTable[t] && void 0 !== this.taskStatusChangedEventTable[t] && (S.information("downloadplay:取消监听 ", this.taskStatusChangedEventTable[t]), D.detachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventTable[t]), this.taskStatusChangedEventTable[t] = null)
                    }), yield e.startTask(t)
                }
            })
        }

        uncompressXmp(e) {
            return n(this, void 0, void 0, function* () {
                S.information("enter uncompressXmp");
                let t = r.resolve(__rootDir, "../../XMP");
                S.information("downloadplay: xmp exe path = ", e, ", uncompress path: ", t), S.information("uncompress paths ", t, e);
                let i = yield m.UnzipUtilitiesAWNS.uncompressZipFile(t, e);
                "100004" !== I.getChannelID() ? i && (S.information("uncompress xmpzip success, begin write xmp reg"), f.DownloadAndPlayNS.writeXmpReg(t), f.DownloadAndPlayNS.associateForXmp().catch(), C.server.fireClientEvent("OnUncompressXmpEnd")) : b.ConfigNS.setValue("CompletedTaskPlay", "isXmpInited", 2)
            })
        }

        isCodecsIntegral() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                {
                    let t = r.join(__rootDir, "../../codecs"), i = r.join(t, "avisplitter.dll"),
                        n = r.join(t, "realmediasplitter.dll"), o = r.join(t, "d3dcompiler_43.dll"),
                        a = r.join(t, "audioswitcher.dll");
                    (yield s.FileSystemAWNS.existsAW(i)) && (yield s.FileSystemAWNS.existsAW(n)) && (yield s.FileSystemAWNS.existsAW(o)) && (yield s.FileSystemAWNS.existsAW(a)) && (e = !0), S.information("cqm avicodecsPath", i, "realcodecsPath", n, "bIntegral", e)
                }
                return e
            })
        }

        attachTaskStatusChangedEvent(e, t) {
            void 0 !== this.taskStatusChangedEventTable[e] && null !== this.taskStatusChangedEventTable[e] || (this.taskStatusChangedEventTable[e] = D.attachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, (...i) => {
                do {
                    if (!i) break;
                    if (i[0] !== l.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!i[1]) break;
                    let n = i[1];
                    for (let i of n) if (i.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId) === e) {
                        let e = i.getTaskStatus();
                        e !== l.DownloadKernel.TaskStatus.Succeeded && e !== l.DownloadKernel.TaskStatus.Seeding || t(i);
                        break
                    }
                } while (0)
            }))
        }
    };
    t.default = A
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(2), r = i(7), s = i(82), l = i(14), d = i(13), u = i(8), c = i(39), h = i(4), f = i(67),
        p = i(34), g = i(33), m = i(63), v = i(9), y = i(0), T = i(653), w = i(29), k = i(11), C = i(15), b = i(391),
        I = i(523), S = y.default.getLogger("command_line"), _ = k.DownloadKernelTaskManager.getTaskManager(),
        D = r.default(a.join(__rootDir, "../bin/ThunderHelper.node"));
    const A = new class {
        constructor() {
            this.readyToShow = !0, this.startArgs = "", this.uploadfiles = [], this.delayUploadTimerId = void 0
        }

        init() {
            return n(this, void 0, void 0, function* () {
                C.server.registerFunctions({
                    ProcessCommandLine: (e, t, ...i) => {
                        let n = i[0];
                        if (S.information("on command", n), this.readyToShow && this.needBringToTop(n) && this.bringMainWindowToTop().catch(), void 0 !== n && "" !== n.trim()) {
                            let e = l.ThunderUtil.parseCommandLine(n);
                            e.length > 0 && this.executeCmdLine(e).catch()
                        }
                    }, GetStartArgs: (e, t, ...i) => this.getStartArgs()
                })
            })
        }

        setStartArgs(e) {
            this.startArgs = e
        }

        getStartArgs() {
            return this.startArgs
        }

        onCommand(e, t, o) {
            return n(this, void 0, void 0, function* () {
                if (S.information(e, t), "path" === e) {
                    let e = a.extname(t);
                    ".torrent" === (e = e.toLowerCase()) ? (this.readyToShow && (yield this.bringMainWindowToTop()), o = "command" === o ? "Torrent" : o, this.ensureDkLoaded(e => n(this, void 0, void 0, function* () {
                        if (e) {
                            let e = yield f.TaskUtilitiesAWNS.parserBtFileInfoAW(t);
                            if (null === e) c.ThunderNewTask.createBtTaskWindow({
                                type: "file",
                                seedFile: t
                            }, {source: o}); else {
                                let i = JSON.stringify(e);
                                c.ThunderNewTask.createBtTaskWindow({data: i, type: "file", seedFile: t}, {source: o})
                            }
                        }
                    }))) : ".td" !== e && ".bc!" !== e && ".part" !== e && ".xltd" !== e || (o = "command" === o ? "TD" : o, this.ensureDkLoaded(e => {
                        e && p.TaskOperatorNs.importUncompletedFromFile(t, o)
                    }))
                } else if ("task" === e) {
                    if ("newtask" === t) {
                        let e = "button=create";
                        v.XLStatNS.trackEvent("client_quick", "taskbar_rk_click", "", 0, 0, 0, 0, e), v.XLStatNS.trackEvent("core_event", "create_task_click", "", 0, 0, 0, 0, "click_source=taskbar"), S.information("trackEvent", "core_event", "create_task_click", "click_source=taskbar"), c.ThunderNewTask.createPreNewTaskWindow(null)
                    } else if ("startall" === t) {
                        let e = "button=start";
                        v.XLStatNS.trackEvent("client_quick", "taskbar_rk_click", "", 0, 0, 0, 0, e), g.DownloadKernelManager.attachListener(d.NodeEventMesssageNS.eventDownloadKernelInitEnd, () => {
                            p.TaskOperatorNs.startAll()
                        })
                    } else if ("pauseall" === t) {
                        let e = "button=pause";
                        v.XLStatNS.trackEvent("client_quick", "taskbar_rk_click", "", 0, 0, 0, 0, e), p.TaskOperatorNs.pauseAll(h.DownloadKernel.TaskStopReason.PauseAll).catch()
                    }
                } else if ("shell" === e) {
                    if ("exit" === t) {
                        let e = "button=exit";
                        v.XLStatNS.trackEvent("client_quick", "taskbar_rk_click", "", 0, 0, 0, 0, e), yield m.quitPromises.run()
                    }
                } else if ("speedMode" === e) ; else if ("unionfile" === e) {
                    let e = t;
                    c.ThunderNewTask.createUnionTask(e).catch()
                } else if ("-autotestinjectfile" === e) {
                    if (yield u.FileSystemAWNS.existsAW(t)) {
                        let e = require(t);
                        const {DownloadKernelTestNS: n} = yield Promise.resolve().then(() => i(654));
                        e.init(n)
                    }
                } else "shellupload" === e.toLowerCase() && this.delayUpload(t)
            })
        }

        bringMainWindowToTop() {
            return n(this, void 0, void 0, function* () {
                if (this.readyToShow) {
                    let e = yield o.asyncRemoteCall.getCurrentWindow();
                    null !== e && ((yield e.isMinimized()) && e.restore(), yield w.ToolsUtilitiesAWNS.setForegroundWindow(D, e), (yield e.isVisible()) ? e.focus() : e.show())
                }
            })
        }

        delayUpload(e) {
            this.uploadfiles.push(e), this.delayUploadTimerId && (clearInterval(this.delayUploadTimerId), this.delayUploadTimerId = void 0), this.delayUploadTimerId = setTimeout(() => {
                this.bringMainWindowToTop().catch(), c.ThunderNewTask.upload2ThunderPan([...this.uploadfiles], "yunpan_tab").catch(), this.uploadfiles = [], v.XLStatNS.trackEvent("client_quick", "resource_management_rk_click", "", 0, 0, 0, 0, "button=upload_to_yunpan")
            }, 300)
        }

        ensureDkLoaded(e) {
            _.isDkLoaded() ? e(!0) : g.DownloadKernelManager.attachListener(d.NodeEventMesssageNS.eventDownloadKernelInitEnd, t => {
                e(0 === t)
            })
        }

        needBringToTop(e) {
            let t = !1;
            do {
                if (void 0 === e || null === e) break;
                if (-1 !== e.indexOf("-window:bringtotop")) {
                    t = !0;
                    break
                }
            } while (0);
            return t
        }

        executeCmdLine(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1, i = void 0, n = !1;
                for (let o = 0; o < e.length; ++o) e[o] && (e[o].indexOf("play:true") > -1 ? t = !0 : e[o].indexOf("yunfetchback") > -1 ? n = !0 : e[o].indexOf("unionfile") > -1 && (i = e[o]));
                if (S.information("executeCmdLine", t, n, i), t && i) return void (yield b.DownloadAndPlayUnionNS.createUnionPlayTasks(i, t));
                if (n && i) return void (yield I.ThunderUnionYunFetchBackNS.createYunFetchBackTask(i));
                let o = {};
                for (let t of e) {
                    if ("" === t) continue;
                    let i = "", n = "";
                    if (yield u.FileSystemAWNS.existsAW(t)) i = "path", n = t; else if (s.URLHelperNS.isSupportUrl(t)) i = "url", n = t; else {
                        let e = t.indexOf(":");
                        if (-1 === e) i = t; else if (e > 1 && (i = t.substring(1, e), e !== t.length - 1)) {
                            let i = (n = t.substring(e + 1)).match(/^"(.*)"$/);
                            i && i.length > 0 && (n = i[1])
                        }
                    }
                    this.onCommand(i, n, "command").catch(), T.default.fireEvent(d.NodeEventMesssageNS.eventOnCommand, e), o[i] = n
                }
                C.server.fireClientEvent(d.NodeEventMesssageNS.eventOnCommandline, o)
            })
        }
    };
    t.default = A
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(10), a = i(33), r = i(22), s = i(38), l = i(0).default.getLogger("DownloadMode");
    !function (e) {
        let t = void 0, i = void 0;

        function d() {
            void 0 !== t && (clearTimeout(t), t = void 0), void 0 !== i && (clearTimeout(i), i = void 0)
        }

        function u(e, t) {
            l.information("setSpeedLimit Enter maxDownloadSpeed = ", e, "maxUploadSpeed = ", t), a.DownloadKernelManager.setDownloadSpeedLimit(e), a.DownloadKernelManager.setUploadSpeedLimit(t)
        }

        function c() {
            return o.ConfigNS.getValue("ConfigNet", "ConfigNet_Type", "1")
        }

        function h(e) {
            l.information("setCustomDownloadMode Enter"), o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_DownloadSpeedChk", e.maxDownloadSpeedEnabled.value), o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_UploadSpeedChk", e.maxUploadSpeedEnabled.value);
            let t = 51200, i = 2048;
            if (t = Number(e.maxDownloadSpeed.value) || 1024, o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_MaxDownloadSpeedTmp", t), i = Number(e.maxUploadSpeed.value) || 1024, o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_MaxUploadSpeedTmp", i), e.maxDownloadSpeedEnabled.value ? o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_MaxDownloadSpeed", t) : o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_MaxDownloadSpeed", -1), e.maxUploadSpeedEnabled.value ? o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_MaxUploadSpeed", i) : o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_MaxUploadSpeed", -1), o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_Time_Switch", e.limitTimeEnabled.value), e.limitTimeEnabled.value) {
                let t = e.limitTime[0].value, i = e.limitTime[1].value, n = e.limitTime[2].value,
                    a = e.limitTime[3].value;
                o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_Time_Begin_Hour", t), o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_Time_Begin_Minute", i), o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_Time_End_Hour", n), o.ConfigNS.setValue("ConfigNet", "ConfigNet_Custom_Time_End_Minute", a)
            }
            o.ConfigNS.setValue("ConfigNet", "ConfigNet_Type", "0")
        }

        e.handleCustomDownloadMode = function e() {
            if ("1" === c()) return;
            d();
            let n = o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_MaxDownloadSpeed", 1024),
                a = o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_MaxUploadSpeed", 1024),
                r = o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_Switch", !1);
            if (l.information("handleCustomDownloadMode Enter maxDownloadSpeed = ", n, ", maxUploadSpeed = ", a, ", timeSwitch = ", r), r) {
                let r = Number(o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_Begin_Hour", 0)),
                    s = Number(o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_Begin_Minute", 0)),
                    l = Number(o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_End_Hour", 23)),
                    d = Number(o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_End_Minute", 59)), c = new Date,
                    h = c.getHours(), f = c.getMinutes(), p = c.getSeconds();
                (r > l || r === l && s > d) && (l += 24), (h > l || h === l && f > d) && (r += 24, l += 24);
                let g = 60 * h + f, m = 60 * r + s, v = 60 * l + d;
                if (m <= g && g < v) u(n, a), i = setTimeout(() => {
                    u(-1, -1), clearTimeout(i), i = void 0, e()
                }, 6e4 * (v - g)); else {
                    u(-1, -1), t = setTimeout(() => {
                        u(n, a), clearTimeout(t), t = void 0
                    }, 6e4 * (m - g));
                    let o = v - g;
                    o = o ? 6e4 * o : 1e3 * (60 - p), i = setTimeout(() => {
                        u(-1, -1), clearTimeout(i), i = void 0, e()
                    }, o)
                }
            } else u(n, a)
        }, e.getFreeDownLoad = function () {
            return o.ConfigNS.getValue("ConfigNet", "ConfigNet_IdleDownload", !1)
        }, e.getCurrentDownloadMode = c, e.getCustomModeDownloadSpeed = function () {
            return o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_MaxDownloadSpeed", 1024)
        }, e.getCustomModeUploadSpeed = function () {
            return o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_MaxUploadSpeed", 1024)
        }, e.setFullDownloadMode = function () {
            l.information("setFullDownloadMode Enter"), o.ConfigNS.setValue("ConfigNet", "ConfigNet_Type", "1"), a.DownloadKernelManager.setDownloadSpeedLimit(-1), a.DownloadKernelManager.setUploadSpeedLimit(-1), d()
        }, e.setFreeDownLoadConfig = function (e) {
            o.ConfigNS.setValue("ConfigNet", "ConfigNet_IdleDownload", e)
        }, e.setCustomDownloadMode = h, e.showCustomDownloadModeDlg = function () {
            return n(this, void 0, void 0, function* () {
                let e = o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_MaxDownloadSpeedTmp", 1024),
                    t = o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_MaxUploadSpeedTmp", 1024),
                    i = yield r.MessageBox.custom("CustomDownloadMode", {
                        title: "限制我的下载速度",
                        formData: {
                            maxDownloadSpeedEnabled: {value: o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_DownloadSpeedChk", !0)},
                            maxDownloadSpeed: {value: e},
                            maxUploadSpeedEnabled: {value: o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_UploadSpeedChk", !0)},
                            maxUploadSpeed: {value: t},
                            limitTimeEnabled: {value: o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_Switch", !1)},
                            limitTime: [{value: o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_Begin_Hour", 0)}, {value: o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_Begin_Minute", 0)}, {value: o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_End_Hour", 23)}, {value: o.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_Time_End_Minute", 59)}]
                        }
                    });
                return i.action === s.MessageBoxNS.Action.OK && (h(i.args), !0)
            })
        }
    }(t.DownloadModeNS || (t.DownloadModeNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(90), r = i(392), s = i(10), l = i(0), d = i(22), u = i(12), c = i(9), h = i(111), f = i(3),
        p = l.default.getLogger("BrowserConfigGuide");

    class g {
        constructor() {
            this.isPopWndExist = !1, this.isManualPopUp = !1
        }

        whetherShowEntry() {
            return this.getBrowserInfos().length > 0
        }

        whetherPopUp() {
            let e, t = this.getBrowserInfos(), i = "";
            if (t && t.length > 0) for (let n = 0; n < t.length; n++) if (t[n].browserName) {
                if (!(i = t[n].browserName.startsWith("360") ? t[n].browserName : "other")) continue;
                if (e = s.ConfigNS.getValue("ThunderFirstInstall", `IsFirstInstall${i}`, 1), p.information(`是否是第一次安装${i}: `, e), 1 === e) break
            }
            return 1 === e
        }

        initConfigGuide() {
            return n(this, void 0, void 0, function* () {
                let e = !1, t = "360安全浏览器", i = "", n = new Map, a = {}, s = [];
                do {
                    if (!(yield f.client.callServerFunction("IsConfigBrowserInitFinish"))) {
                        p.warning("cqm isBrowserConfigInit not inited");
                        break
                    }
                    let l = (i = r.BrowserHelperNs.getDefaultBrowserPath()).split("\\"), d = "";
                    l && l.length > 0 && (d = l[l.length - 1]), n = yield r.BrowserHelperNs.getInfos(), p.information("browserInfos", n);
                    let u = o.basename(d, ".exe"),
                        c = {icon: "", name: "", default: !1, install: !1, open: !1, exeName: ""},
                        h = ["360se", "chrome", "msedge", "QQBrowser", "360chrome"];
                    if (-1 === h.indexOf(u)) for (let i of h) {
                        let o = n.get(i);
                        if (o && o.browserExist) {
                            o.browserAddonInstall && o.browserAddonOpen || (t = o.browserTitle, e = !0);
                            break
                        }
                    } else {
                        let o = n.get(u);
                        o && (c = {
                            icon: o.icon,
                            name: o.browserTitle,
                            default: !0,
                            install: o.browserAddonInstall,
                            open: o.browserAddonOpen,
                            exeName: u
                        }, s.push(c), !o.browserExist || o.browserAddonInstall && o.browserAddonOpen || (t = o.browserTitle, e = !0), o.browserExist = !0, o.browserPath = i, p.information("installed", o.browserAddonInstall, "opened", o.browserAddonOpen))
                    }
                    n.forEach((e, t) => {
                        p.information("info", e, s), a[t] = e, (!s || s.length < 1 || t !== s[0].exeName) && e.browserExist && (c = {
                            icon: e.icon,
                            name: e.browserTitle,
                            default: !1,
                            install: e.browserAddonInstall,
                            open: e.browserAddonOpen,
                            exeName: t
                        }, s.push(c))
                    }), p.information("browserList", s), p.information("browserList", s, "browserInfos", n), p.information("exeName:", d, "name", u, "默认浏览器运行地址为:", i)
                } while (0);
                return {isShow: e, title: t, defaulBrowserPath: i, browserInfos: a, browserList: s}
            })
        }

        popUpBrowserGuide(e = !1, t = "other", i) {
            return n(this, void 0, void 0, function* () {
                if (this.isPopWndExist) return;
                let n = yield this.initConfigGuide();
                if (!e && !n.isShow) return void p.information("popUpBrowserGuide break", e, n.isShow);
                this.isManualPopUp = i;
                const o = yield u.asyncRemoteCall.getCurrentWindow();
                o && !(yield o.isVisible()) ? o.once("show", () => {
                    setTimeout(() => {
                        this.interalShow(e, t, n).catch()
                    }, 1e3)
                }) : this.interalShow(e, t, n).catch()
            })
        }

        interalShow(e, t, i) {
            return n(this, void 0, void 0, function* () {
                this.isPopWndExist = !0, !0 !== this.isManualPopUp && c.XLStatNS.trackEvent("setting_center", "use_xl_download_show", "", 0, 0, 0, 0), f.client.callServerFunction("PopMutualCreated", h.PopView.BROWSER_GUIDE, t).catch(), yield d.MessageBox.custom("BrowserConfigGuide", {
                    isManual: this.isManualPopUp,
                    showMoreSupport: e,
                    from: t,
                    data: i
                }, {
                    modal: !0,
                    show: !1
                }), f.client.callServerFunction("ClosePopMutual", h.PopView.BROWSER_GUIDE).catch(), this.isPopWndExist = !1
            })
        }

        getBrowserInfos() {
            let e = [], t = a.SettingConfigHelperNS.configBrowserHelper.getWatchBrowerByName("360安全浏览器");
            t && e.push(t);
            let i = a.SettingConfigHelperNS.configBrowserHelper.getWatchBrowerByName("QQ浏览器");
            return i && e.push(i), p.information("已安装的浏览器:", e), e
        }
    }

    t.default = function () {
        return g.instance || (g.instance = new g), g.instance
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.PRE_NEW_TASK = "pre-newtask-dlg", e.BT_NEW_TASK = "bt-newtask-dlg", e.NEW_TASK = "newtask-dlg", e.LOGIN = "login-dlg", e.BROWSER_GUIDE = "browser-guide-dlg", e.SIGN = "sign-dlg", e.THUNDER_PAN_IMPORT = "thunder-pan-import", e.VIP_RENEW = "vip-renew", e.LOGIN_NONE_VIP_ACTIVITY = "login-none-vip-activity", e.VIP_PACK_TRY_GUIDE = "vip-pack-try-guide", e.VIP_TRY_GUIDE = "vip-try-guide", e.VIP_HUDDLE_NOVICE_GUIDE = "vip-huddle-novice-guide", e.KUAINIAO_AUTO = "kuainiao-auto"
    }(t.PopView || (t.PopView = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(525), r = i(12), s = i(2), l = i(17), d = i(394), u = i(657), c = i(0), h = i(5), f = i(29),
        p = i(15), g = i(3), m = i(70), v = i(7), y = c.default.getLogger("Thunder.Main.Renderer.Embedded.Browser"),
        T = v.default(s.join(__rootDir, "../bin/ThunderHelper.node"));
    t.EmbeddedBrowser = class {
        constructor() {
            this.isAlreadyClose = !1, this.width = 460, this.height = 500, this.browserCtr = null, this.wnd = null, this.leftMargin = 5, this.rigthMargin = 5, this.topMargin = 58, this.bottomMargin = 2, this.callBackShow = null, this.callBackClose = null, this.callBackClosed = null, this.browserEventHandler = null, this.isAutoShow = !0, this.autoCloseAtError = !0, this.isTopLevel = !1, this.isToolWindow = !1, this.attachListener().catch()
        }

        createWnd(e, t, i, s, l, c, f, v, y, w, k, C, b, I, S, _, D, A, N, x, E) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (yield this.isWindow()) {
                        if (!h.isNullOrUndefined(this.browserCtr)) {
                            let e = this.browserCtr.getBrowser();
                            if (!h.isNullOrUndefined(e)) {
                                e.refresh(), this.isAutoShow && this.showWnd().catch();
                                break
                            }
                            yield this.closeWnd()
                        }
                        yield this.closeWnd()
                    }
                    this.isAlreadyClose = !1, this.width = l, this.height = c, this.leftMargin = f, this.rigthMargin = v, this.topMargin = y, this.bottomMargin = w, this.callBackShow = C, this.callBackClose = b, this.callBackClosed = I;
                    let O = "development" === process.env.RUN_ENV ? "http://localhost:9080/embedded-browser-renderer/" : `file:///${__dirname}/../embedded-browser-renderer/index.html`;
                    O += `?browserType=${s}&title=${t}&minimizable=${_ ? 1 : 0}`;
                    let P = yield r.asyncRemoteCall.getCurrentWindow();
                    x || (x = this.isTopLevel);
                    let M = x ? null : P, F = yield r.asyncRemoteCall.getBrowserWindow();
                    this.wnd = yield new F({
                        width: this.width,
                        height: this.height,
                        resizable: !!N,
                        frame: !1,
                        parent: M,
                        center: !this.startX || !this.startY,
                        show: !1,
                        modal: i,
                        alwaysOnTop: !!S,
                        minimizable: !!_,
                        minHeight: this.height,
                        minWidth: this.width,
                        webPreferences: {
                            spellcheck: !1,
                            nodeIntegration: !0,
                            webSecurity: "development" !== process.env.RUN_ENV,
                            preload: `file:///${__rootDir}/out/plugin-boot.js`
                        },
                        title: E
                    }), o.ipcRenderer.send("embedded-browser-create", this.wnd.id, x), x || d.ThunderWindowNS.fitWindowPosInParent(this.wnd, P).catch(), this.browserCtr = new a.BrowserCtrl, this.wnd.once("show", () => {
                        if (D && D.length > 0) {
                            let e = `EmbeddedBrowserRendererContext${s}`;
                            p.server.isRemoteClientExist(e) && g.client.callRemoteClientFunction(e, "AddMenu", D).catch()
                        }
                    }), this.wnd.once("ready-to-show", () => n(this, void 0, void 0, function* () {
                        if (!(yield this.isWindow())) return;
                        if (this.isAutoShow && (yield this.showWnd()), !this.wnd) return;
                        let t = (yield this.wnd.getNativeWindowHandle()).readUIntLE(0, 4),
                            i = u.CommonFunctionNs.getBrowserWindowRect(t, this.width, this.height, this.leftMargin, this.rigthMargin, this.topMargin, this.bottomMargin);
                        this.browserCtr.createChromiumBrowser(t, e, !1, i, this.getDefaultEvents()).catch(), this.browserCtr.setNativeOptions(A), this.registerNativeFunctions(k), T.setWindowLong(t, m.SetWindowType.GWL_STYLE, m.WindowStyle.WS_CLIPCHILDREN), this.isToolWindow && T.setWindowLong(t, m.SetWindowType.GWL_EXSTYLE, m.WindowStyleEx.WS_EX_TOOLWINDOW)
                    })), this.wnd.on("resize", () => n(this, void 0, void 0, function* () {
                        let e = yield this.wnd.getBounds();
                        this.width = e.width, this.height = e.height, this.browserCtr.getBrowser() && u.CommonFunctionNs.resizeBrowserWindow(this.browserCtr.getBrowser().getWindowHandle(), this.width, this.height, this.leftMargin, this.rigthMargin, this.topMargin, this.bottomMargin)
                    })), this.wnd.on("move", () => {
                        this.browserCtr && this.browserCtr.getBrowser() && u.CommonFunctionNs.resizeBrowserWindow(this.browserCtr.getBrowser().getWindowHandle(), this.width, this.height, this.leftMargin, this.rigthMargin, this.topMargin, this.bottomMargin)
                    }), this.wnd.once("show", () => {
                        this.wnd.setSize(this.width, this.height)
                    }), this.wnd.once("close", () => {
                        null !== this.callBackClose && void 0 !== this.callBackClose && "function" == typeof this.callBackClose && this.callBackClose().catch(), this.browserCtr && this.browserCtr.destroyBrowser(!1)
                    }), this.wnd.once("closed", () => {
                        null !== this.callBackClosed && void 0 !== this.callBackClosed && "function" == typeof this.callBackClosed && this.callBackClosed(), this.isAlreadyClose = !1, this.wnd = null, this.browserCtr = null
                    }), yield this.wnd.loadURL(O)
                } while (0)
            })
        }

        setToolWindow(e) {
            this.isToolWindow = e
        }

        setBrowserEventHandler(e) {
            this.browserEventHandler = e
        }

        setWindowTopLevel(e) {
            this.isTopLevel = e
        }

        setStartPosition(e, t) {
            this.startX = e, this.startY = t
        }

        getWnd() {
            return this.wnd
        }

        bringToTop() {
            let e = this.getWnd();
            h.isNullOrUndefined(e) || f.ToolsUtilitiesAWNS.setForegroundWindow(T, e).catch()
        }

        closeWnd() {
            return n(this, void 0, void 0, function* () {
                (yield this.isWindow()) && !1 === this.isAlreadyClose && (this.isAlreadyClose = !0, yield this.wnd.close())
            })
        }

        minimizeWnd() {
            return n(this, void 0, void 0, function* () {
                (yield this.isWindow()) && (yield this.wnd.minimize())
            })
        }

        setWndSize(e, t) {
            return n(this, void 0, void 0, function* () {
                (yield this.isWindow()) && (this.width = e, this.height = t, yield this.wnd.setSize(e, t))
            })
        }

        getWndPosition() {
            return n(this, void 0, void 0, function* () {
                return (yield this.isWindow()) ? this.wnd.getPosition() : [0, 0]
            })
        }

        setWndPosition(e, t) {
            return n(this, void 0, void 0, function* () {
                if (yield this.isWindow()) return this.wnd.setPosition(e, t)
            })
        }

        centerWnd() {
            return n(this, void 0, void 0, function* () {
                (yield this.isWindow()) && (yield this.wnd.center())
            })
        }

        hideWnd() {
            return n(this, void 0, void 0, function* () {
                (yield this.isWindow()) && (yield this.wnd.hide())
            })
        }

        showWnd(e) {
            return n(this, void 0, void 0, function* () {
                (yield this.isWindow()) && (null !== this.callBackShow && void 0 !== this.callBackShow && "function" == typeof this.callBackShow ? (yield this.callBackShow()) ? e ? yield this.wnd.showInactive() : yield this.wnd.show() : yield this.closeWnd() : e ? yield this.wnd.showInactive() : yield this.wnd.show())
            })
        }

        setAutoShow(e) {
            this.isAutoShow = e
        }

        setAutoCloseAtError(e) {
            this.autoCloseAtError = e
        }

        setMinimizable(e) {
            return n(this, void 0, void 0, function* () {
                (yield this.isWindow()) && (yield this.wnd.setMinimizable(e))
            })
        }

        setMaximizable(e) {
            return n(this, void 0, void 0, function* () {
                (yield this.isWindow()) && (yield this.wnd.setMaximizable(e))
            })
        }

        registerNativeFunction(e, t) {
            do {
                if (null === this.browserCtr || void 0 === this.browserCtr) break;
                if (null === e || void 0 === e || "" === e) break;
                if (null === t || void 0 === t) break;
                this.browserCtr.registerNativeFunction(e, t, !0)
            } while (0)
        }

        getBrowserObj() {
            return this.browserCtr
        }

        onLoadError(e, t, i, o, a, r) {
            return n(this, void 0, void 0, function* () {
                if (y.information("OnLoadError isMainFrame, errorCode, isAlreadyClose, url: ", t, o, this.isAlreadyClose, i), (yield this.isWindow()) && t) if (-3 === o) {
                    let t = e.target.getWindowHandle();
                    T.showWindow(t, m.CmdShow.SW_SHOW)
                } else !1 === this.isAlreadyClose && this.autoCloseAtError && (yield this.closeWnd());
                this.browserEventHandler && t && this.browserEventHandler("OnLoadError", t, i, o, a, r)
            })
        }

        onLoadEnd(e, t, i, o, a) {
            return n(this, void 0, void 0, function* () {
                if (y.information("OnLoadEnd isMainframe", t, i), (yield this.isWindow()) && t) {
                    let t = e.target.getWindowHandle();
                    T.showWindow(t, m.CmdShow.SW_SHOW)
                }
                this.browserEventHandler && t && this.browserEventHandler("OnLoadEnd", t, i, o, a)
            })
        }

        onBeforeNavigate(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                if (y.information("OnBeforeNavigate isMainframe", t, i), (yield this.isWindow()) && t) {
                    let t = e.target.getWindowHandle();
                    T.showWindow(t, m.CmdShow.SW_HIDE)
                }
                this.browserEventHandler && this.browserEventHandler("OnBeforeNavigate", t, i, o)
            })
        }

        onNewBrowserPopup(e, t, i, n, o, a) {
            y.information("onNewBrowserPopup url", i);
            let r = !1;
            this.browserEventHandler && (r = this.browserEventHandler("OnNewBrowserPopup", i)), r || g.client.callServerFunction("openNewTab", i).catch()
        }

        getDefaultEvents() {
            return [{eventName: "before-nav", listener: this.onBeforeNavigate.bind(this)}, {
                eventName: "load-error",
                listener: this.onLoadError.bind(this)
            }, {eventName: "load-end", listener: this.onLoadEnd.bind(this)}, {
                eventName: "new-browser-popup",
                listener: this.onNewBrowserPopup.bind(this)
            }]
        }

        attachListener() {
            return n(this, void 0, void 0, function* () {
                l.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => {
                    null !== this.browserCtr && void 0 !== this.browserCtr && this.browserCtr.fireEvent("OnUserLogin", e)
                }), l.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", e => {
                    null !== this.browserCtr && void 0 !== this.browserCtr && this.browserCtr.fireEvent("OnUserLogout", e)
                }), (yield r.asyncRemoteCall.getIpcMain()).on("eventShowDevTool", (e, t) => n(this, void 0, void 0, function* () {
                    "browser" === t ? null !== this.browserCtr && void 0 !== this.browserCtr && this.browserCtr.showDevTool(!0) : "wnd" === t && (yield this.isWindow()) && (yield function (e) {
                        return n(this, void 0, void 0, function* () {
                            null !== e && ((yield e.webContents.isDevToolsOpened()) ? e.webContents.closeDevTools() : e.webContents.openDevTools({mode: "undocked"}))
                        })
                    }(this.wnd))
                }))
            })
        }

        isWindow() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                return this.wnd && !(yield this.wnd.isDestroyed()) && (e = !0), e
            })
        }

        registerNativeFunctions(e) {
            do {
                if (null === this.browserCtr || void 0 === this.browserCtr) break;
                if (null === e || void 0 === e || e.length <= 0) break;
                for (let t = 0; t < e.length; ++t) this.browserCtr.registerNativeFunction(e[t].functionName, e[t].nativeFunc, !0)
            } while (0)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(20), r = i(3), s = i(15), l = i(0), d = i(403), u = i(4), c = i(13), h = i(30), f = i(79),
        p = i(35), g = i(12), m = "vip-download", v = "ThunderPanPlugin", y = "ThunderIM", T = [m, v, y],
        w = l.default.getLogger("plugin-ui-webview");

    class k extends a.EventEmitter {
        constructor() {
            super(), this.webviewInfoMap = {}, this.vipPluginEnable = !1, this.activeTasks = [], this.activeContainerMap = {}, this.webviewCreatedMap = {}, this.isSorting = !1
        }

        isVipPluginEnable() {
            return this.vipPluginEnable
        }

        setSorting(e) {
            this.isSorting = e
        }

        getActiveTaskId() {
            let e = void 0;
            do {
                let t = this.activeTasks.length;
                if (0 === t) break;
                if (e = this.activeTasks[t - 1], !this.activeContainerMap[e]) {
                    e = void 0;
                    break
                }
            } while (0);
            return e
        }

        showTaskAdWebview(e, t) {
            do {
                if (!this.vipPluginEnable) break;
                this.activeContainerMap[e] ? (w.information("webview alreay in map", e, this.activeTasks, this.activeContainerMap), this.show()) : (this.activeTasks.push(e), this.activeContainerMap[e] = t, this.show())
            } while (0)
        }

        show() {
            do {
                if (this.isSorting) break;
                let e = this.activeTasks.length;
                if (0 === e) break;
                let t = this.activeTasks[e - 1], i = this.activeContainerMap[t];
                if (!i) break;
                if (!i.isShowExpand) break;
                this.updateTaskAdWebview(), document.querySelector(`#webview_${m}`).parentElement.style.opacity = "1"
            } while (0)
        }

        updateTaskAdWebview() {
            do {
                if (this.isSorting) break;
                let e = this.activeTasks.length;
                if (0 === e) break;
                let t = this.activeTasks[e - 1], i = this.activeContainerMap[t];
                if (!i) break;
                if (!i.isShowExpand) break;
                let n = document.querySelector(`#webview_${m}`), o = n.parentElement, a = o.parentElement,
                    r = i.$el.parentElement.parentElement;
                if (!r) break;
                let s = i.$refs.pluginPlaceholder;
                if (!s) break;
                let l = r.getBoundingClientRect(), d = l.top, u = document.querySelector(".xly-side"), c = l.height;
                void 0 !== u && null !== u && (c = u.clientHeight - 40);
                let h = `position:absolute;left: 0px;top: ${d - 42}px;\n        width: ${l.width}px;height: ${c}px; overflow:hidden;`;
                a.style = h;
                let f = s.getBoundingClientRect(),
                    p = `position:absolute;left: ${s.offsetLeft}px; top: ${f.top - d}px;\n      width: ${f.width}px; height: 40px; z-index: 1;`;
                o.style = p;
                {
                    let e = n.shadowRoot.childElementCount;
                    for (let t = 0; t < e; t++) {
                        let e = n.shadowRoot.children[t];
                        if (!e) break;
                        if (e.type && "application/browser-plugin" === e.type.toLowerCase()) {
                            e.style = "width: 284px; height: 100%;";
                            break
                        }
                    }
                }
                w.information("show webview", f, p)
            } while (0)
        }

        hideTaskAdWebview(e) {
            do {
                if (!this.vipPluginEnable) break;
                let t = "-10000px",
                    i = `position:absolute;left: ${t};top: 142px;width: 540px;height: 40px; z-index=1; opacity:0;`;
                if (void 0 === e) {
                    let e = document.querySelector(`#webview_${m}`).parentElement;
                    e.style.left !== t && (e.style = i);
                    break
                }
                if (0 === this.activeTasks.length) break;
                let n = this.activeTasks.indexOf(e);
                if (delete this.activeContainerMap[e], -1 !== n && this.activeTasks.splice(n, 1), document.querySelector(`#webview_${m}`).parentElement.style.left === t) break;
                if (w.information("active hide", this.activeTasks.length, e, this.activeTasks), 0 === this.activeTasks.length) {
                    document.querySelector(`#webview_${m}`).parentElement.style = i
                }
            } while (0)
        }

        create(e, t, i) {
            let n = [!1, ""];
            switch (-1 === T.indexOf(t) && (n = [!1, `support for ${t} will coming soon`]), t) {
                case m:
                    n = e.name === m ? this.createTaskAdWebview(t, i) : [!1, "the client can not create this webview"];
                    break;
                case v:
                    e.name === v ? (n = this.createPanWebview(t, i), this.emit("create_pan_tab")) : n = [!1, "the client can not create this webview"];
                    break;
                case y:
                    e.name === y ? (n = this.createMessageWebView(t, i), this.emit("create_message_view")) : n = [!1, "the client can not create this webview"]
            }
            return w.information("create webview", n), n
        }

        attachDownloadItemActiveChange() {
            h.default.attachListener(c.NodeEventMesssageNS.eventDownloadItemActive, (e, t, i, n, o, a) => {
                if (e === u.DownloadKernel.CategroyViewID.Downloading) if (t) {
                    let e = n.__vue__;
                    e && e.$nextTick(() => {
                        this.showTaskAdWebview(i, e)
                    })
                } else this.hideTaskAdWebview(i)
            })
        }

        createTaskAdWebview(e, t) {
            let i = [!1, ""];
            do {
                let a = `webview_${m}`;
                if (document.querySelector(`#${a}`)) {
                    i = this.webviewCreatedMap[a] === e ? [!0, "success"] : [!1, `webview already created by other ${this.webviewCreatedMap[a]}`];
                    break
                }
                let r = document.createElement("webview");
                r.spellcheck = !1, r.nodeintegration = !0, r.id = a, r.style = "height: 100%; width: 100%;", r.src = t.src, r.preload = `file:///${__rootDir}/out/plugin-boot.js`, r.addEventListener("did-finish-load", () => n(this, void 0, void 0, function* () {
                    let e = r.getWebContentsId(), t = yield(yield g.asyncRemoteCall.getWebContents()).fromId(e);
                    if (t && !(yield t.isDestroyed())) {
                        let e = yield t.getOSProcessId(), i = yield t.getURL();
                        o.ipcRenderer.send(p.ThunderChannelList.channelRMSetEnvironmentVariable, e.toString(), i), t.once("destroyed", () => {
                            o.ipcRenderer.send(p.ThunderChannelList.channelRMSetEnvironmentVariable, e.toString())
                        })
                    }
                })), document.querySelector("#webview_container").appendChild(r), i = [!0, "success"], this.webviewCreatedMap[a] = e, r.addEventListener("dom-ready", e => {
                    this.vipPluginEnable = !0, this.emit("vip_plugin_enable", this.vipPluginEnable)
                }), this.attachDownloadItemActiveChange(), window.addEventListener("keyup", e => {
                    "F12" === e.key && e.altKey && f.DevEnvHelperNS.isDevToolsEnable() && r && r.openDevTools()
                }, !0)
            } while (0);
            return i
        }

        createPanWebview(e, t) {
            let a = [!1, ""];
            do {
                let s = `webview_${t.id}`;
                if (s || (s = `webview_${v}`), document.querySelector(`#${s}`)) {
                    a = this.webviewCreatedMap[s] === e ? [!0, "success"] : [!1, `webview already created by other ${this.webviewCreatedMap[s]}`];
                    break
                }
                let l = document.createElement("webview");
                l.spellcheck = !1, l.nodeintegration = !0, "development" !== process.env.RUN_ENV && (l.disablewebsecurity = !0), l.id = s, l.style = "height: 100%; width: 100%;", l.src = t.src, l.preload = `file:///${__rootDir}/out/plugin-boot.js`, l.addEventListener("did-finish-load", () => n(this, void 0, void 0, function* () {
                    let e = l.getWebContentsId(), t = yield(yield g.asyncRemoteCall.getWebContents()).fromId(e);
                    if (t && !(yield t.isDestroyed())) {
                        let e = yield t.getOSProcessId(), i = yield t.getURL();
                        o.ipcRenderer.send(p.ThunderChannelList.channelRMSetEnvironmentVariable, e.toString(), i), t.once("destroyed", () => {
                            o.ipcRenderer.send(p.ThunderChannelList.channelRMSetEnvironmentVariable, e.toString())
                        })
                    }
                })), document.querySelector("#pan-18BE0BEB-6C82-4D16-83C8-5566BE72D176").appendChild(l), a = [!0, "success"], this.webviewCreatedMap[s] = e, l.addEventListener("dom-ready", e => n(this, void 0, void 0, function* () {
                    let e = l.getWebContentsId(), t = yield(yield g.asyncRemoteCall.getWebContents()).fromId(e);
                    t && t.on("context-menu", (e, t) => {
                        d.ContextMenuNS.popContextMenu(e, t)
                    })
                })), l.addEventListener("new-window", e => {
                    let t = e.url;
                    const n = i(50).parse(t).protocol;
                    "http:" !== n && "https:" !== n || r.client.callServerFunction("openNewTab", t).catch()
                }), window.addEventListener("keyup", e => {
                    "F12" === e.key && e.shiftKey && f.DevEnvHelperNS.isDevToolsEnable() && l && l.openDevTools()
                }, !0), window.addEventListener("resize", () => {
                })
            } while (0);
            return a
        }

        createMessageWebView(e, t) {
            let i = [!1, ""];
            return this.webviewInfoMap[y] = t, i = [!0, "success"], s.server.fireClientEvent("CreateMessageWebViewEnd"), i
        }

        getWebViewInfo(e) {
            return this.webviewInfoMap[e] || {}
        }
    }

    t.PluginWebviewMgr = k, function (e) {
        const t = new k;
        e.getWebViewMgr = function () {
            return t
        }
    }(t.PluginWebviewMgrNS || (t.PluginWebviewMgrNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(20), r = i(0), s = i(4), l = i(59), d = i(11), u = i(679), c = i(40), h = i(34), f = i(13),
        p = i(9), g = i(51), m = i(74), v = i(10), y = i(22), T = i(126), w = i(401), k = i(26), C = i(89), b = i(58),
        I = i(533), S = i(39), _ = i(30), D = i(5), A = i(2), N = i(143), x = i(38), E = i(91), O = i(25), P = i(15),
        M = i(127), F = i(3), L = i(37), R = i(43), B = r.default.getLogger("Thunder.ContextMenu"),
        U = k.DownloadKernelCategoryManager.getCategoryManager(), V = d.DownloadKernelTaskManager.getTaskManager(),
        K = I.GroupAccelerateWebManagerNS.getManager(), G = N.SubtitleManagerNS.getSubtitleManger();
    var W;
    !function (e) {
        e[e.Unknown = 0] = "Unknown", e[e.DownloadingCategory = 1] = "DownloadingCategory", e[e.DownloadingBlank = 2] = "DownloadingBlank", e[e.DownloadingItem = 3] = "DownloadingItem", e[e.CompletedCategory = 4] = "CompletedCategory", e[e.CompletedItem = 5] = "CompletedItem", e[e.RecycleCategory = 6] = "RecycleCategory", e[e.RecycleBlank = 7] = "RecycleBlank", e[e.RecycleItem = 8] = "RecycleItem", e[e.ToolbarMore = 9] = "ToolbarMore", e[e.ChangeCategory = 10] = "ChangeCategory", e[e.PrivateSpaceHome = 11] = "PrivateSpaceHome", e[e.SearchMultiSel = 12] = "SearchMultiSel", e[e.Upper = 13] = "Upper"
    }(W = t.DownloadMenuType || (t.DownloadMenuType = {}));
    t.downloadContextMenu = new class {
        constructor() {
            this.contextInfo = null, this.count = 0, this.categoryId = -1, this.emitter = null, this.searchMode = !1, this.shouleiDownloadEnable = !0, this.emitter = new a.EventEmitter, this.menuEventClients = {}
        }

        registerMenuEvent(e, t) {
            this.menuEventClients.hasOwnProperty(String(e)) ? this.menuEventClients[e].push(t) : this.menuEventClients[e] = [].concat(t)
        }

        unRegisterMenuEvent(e, t) {
            if (void 0 === e) for (let e in this.menuEventClients) {
                let i = this.menuEventClients[e];
                for (let n = 0; n < i.length; n++) if (i[n] === t) {
                    this.menuEventClients[e].splice(n, 1);
                    break
                }
            } else {
                let i = this.menuEventClients[e];
                for (let n = 0; n < i.length; n++) if (i[n] === t) {
                    this.menuEventClients[e].splice(n, 1);
                    break
                }
            }
        }

        setContextInfo(e, t, i, n) {
            this.contextInfo = e, D.isNullOrUndefined(i) || (this.count = i), D.isNullOrUndefined(t) || (this.categoryId = t), D.isNullOrUndefined(n) ? this.searchMode = !1 : this.searchMode = n
        }

        canShare() {
            let e = !0;
            do {
                let t = this.getSelectdTaskInfos();
                if (!t) {
                    e = !1;
                    break
                }
                if (1 !== t.length) {
                    e = !1;
                    break
                }
                let i = t[0];
                if (i.taskStatus === s.DownloadKernel.TaskStatus.Failed || i.taskStatus === s.DownloadKernel.TaskStatus.Unkown) {
                    e = !1;
                    break
                }
                if (i.taskType === s.DownloadKernel.TaskType.Group) {
                    e = !1;
                    break
                }
            } while (0);
            return e
        }

        canDownloadByShoulei() {
            let e = !0;
            do {
                if (0 === O.default.getConfigInfo("shouleiDownload", "enable") && (this.shouleiDownloadEnable = !1), !this.shouleiDownloadEnable) {
                    e = !1;
                    break
                }
                if (null === this.contextInfo) {
                    e = !1;
                    break
                }
                let t = this.getSelectdTaskInfos();
                if (!t) {
                    e = !1;
                    break
                }
                if (t.length > 1) {
                    e = !1;
                    break
                }
                let i = t[0];
                if (!i || i.taskType === s.DownloadKernel.TaskType.Group) {
                    e = !1;
                    break
                }
            } while (0);
            return e
        }

        handleDownloadByShoulei() {
            return n(this, void 0, void 0, function* () {
                let e = "https://mobile.xunlei.com/m/channel.html?from=xunlei10daoliang";
                if (this.canDownloadByShoulei()) {
                    let t = this.getSelectdTaskInfos()[0];
                    e = yield M.getShouleiShareLinkDlj(t.taskId, "pic", "leftlist_rk_phone")
                }
                y.MessageBox.custom("ShouleiQRCode", {data: e}).catch()
            })
        }

        handleShouleiFileTransfer() {
            return n(this, void 0, void 0, function* () {
                let e = this.getSelectdTaskInfos()[0];
                c.TaskCtrlOperatorNS.shouleiFileTransfer(e).catch()
            })
        }

        attachListener(e, t) {
            this.emitter.addListener(e, t)
        }

        detachListener(e, t) {
            this.emitter.removeListener(e, t)
        }

        popMenu(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = [];
                switch (e) {
                    case W.DownloadingCategory: {
                        let e = this.contextInfo.canStartAll();
                        i = [{
                            type: "submenu",
                            label: "排序",
                            submenu: this.getSortSubMenuOptions(this.contextInfo)
                        }, {
                            type: "normal",
                            label: "全选(&A)",
                            id: u.ContextMenuIdsNS.contextMenuDownloadSelectAll,
                            statId: "dl_downloading_more_btn_click",
                            extData: "clickid=all_select"
                        }, {
                            type: "normal",
                            label: "全部开始",
                            enabled: e,
                            id: u.ContextMenuIdsNS.contextMenuDownloadStartAll,
                            statId: "dl_downloading_more_btn_click",
                            extData: "clickid=all_start"
                        }, {
                            type: "normal",
                            label: "全部暂停",
                            id: u.ContextMenuIdsNS.contextMenuDownloadPauseAll,
                            statId: "dl_downloading_more_btn_click",
                            extData: "clickid=all_pause"
                        }];
                        let t = this.contextInfo.currentCategoryId;
                        U.isPrivateCategory(t) && i.push({
                            type: "normal",
                            label: "私人空间下载设置",
                            id: u.ContextMenuIdsNS.contextMenuToolbarPrivateSpaceDownloadSetting
                        }, {
                            type: "normal",
                            label: "修改私人空间密码",
                            id: u.ContextMenuIdsNS.contextMenuToolbarPrivateSpacePasswwordChange
                        })
                    }
                        break;
                    case W.CompletedCategory: {
                        let e = this.contextInfo.currentCategoryId,
                            t = l.TaskStatusHelper.canMarkAsOpened(this.contextInfo.getCompletedTaskBaseList());
                        i = [{
                            type: "submenu",
                            label: "排序",
                            submenu: this.getSortSubMenuOptions(this.contextInfo)
                        }, {
                            type: "normal",
                            label: "全选(&A)",
                            id: u.ContextMenuIdsNS.contextMenuDownloadSelectAll,
                            statId: "dl_finish_more_btn_click",
                            extData: "clickid=all_select"
                        }, {
                            type: "normal",
                            label: "删除不存在任务",
                            id: u.ContextMenuIdsNS.contextMenuDownloadDeleteNonexisting,
                            statId: "dl_finish_more_btn_click",
                            extData: "clickid=delete_invalid"
                        }, {
                            type: "normal",
                            label: "全部标记为已打开",
                            id: u.ContextMenuIdsNS.contextMenuDownloadAsReadedAll,
                            enabled: t,
                            statId: "dl_finish_more_btn_click",
                            extData: "clickid=all_mark_open"
                        }, {
                            type: "submenu",
                            label: "筛选任务",
                            submenu: yield w.CompletedFilterNS.getMenuOptions(e, this.contextInfo.onFilterMenuClick)
                        }], -1 !== e && (i = [{
                            type: "normal",
                            label: "全部标记为已打开",
                            id: u.ContextMenuIdsNS.contextMenuDownloadAsReadedAll,
                            enabled: t,
                            statId: "dl_finish_more_btn_click",
                            extData: "clickid=all_mark_open"
                        }])
                    }
                        break;
                    case W.RecycleCategory: {
                        let e = !0;
                        null === this.contextInfo ? e = !1 : 0 === this.contextInfo.recycleTaskList.length && (e = !1), i = [{
                            type: "submenu",
                            label: "排序",
                            submenu: this.getSortSubMenuOptions(this.contextInfo)
                        }, {
                            type: "normal",
                            label: "全选(&A)",
                            id: u.ContextMenuIdsNS.contextMenuDownloadSelectAll,
                            statId: "dl_rubbish_more_btn_click",
                            extData: "clickid=all_select"
                        }, {
                            type: "normal",
                            label: "清空回收站",
                            id: u.ContextMenuIdsNS.contextMenuDownloadClear,
                            enabled: e,
                            statId: "dl_rubbish_more_btn_click",
                            extData: "clickid=clear_empty"
                        }]
                    }
                        break;
                    case W.DownloadingBlank:
                        i = [{
                            type: "normal",
                            label: "导入未完成任务(&I)",
                            id: u.ContextMenuIdsNS.contextMenuDownloadImportUncomplete
                        }];
                        break;
                    case W.DownloadingItem: {
                        let e = this.getSelectdTaskInfos();
                        if (null !== e && e.length > 0) {
                            let t = [], n = l.TaskStatusHelper.canMoveSelectedTask(void 0, e);
                            -1 === this.categoryId ? (t = yield this.getLastestSavePathsOptions(n, "MoveToDir", "LatestSavePath"), -1 === e[0].categoryId && t.push({
                                type: "normal",
                                label: "私人空间",
                                enabled: n,
                                id: u.ContextMenuIdsNS.contextMenuDownloadMoveFilePrivateSpace,
                                statId: "downloading_rk_move_click",
                                extData: "button=private"
                            }), t.push({
                                type: "normal",
                                label: "其他目录",
                                enabled: n,
                                id: u.ContextMenuIdsNS.contextMenuDownloadMoveFileOther,
                                statId: "downloading_rk_move_click",
                                extData: "button=other"
                            })) : t.push({
                                type: "normal",
                                label: "移出私人空间",
                                enabled: n,
                                id: u.ContextMenuIdsNS.contextMenuDownloadMoveFileOutPrivateSpace,
                                statId: "downloading_rk_move_click",
                                extData: "button=private"
                            });
                            let o = l.TaskStatusHelper.canDeleteSelectedTask(void 0, e);
                            if (i = [], !this.canShare() || -1 !== e[0].categoryId && -1 === this.categoryId || i.push({
                                type: "normal",
                                label: "分享",
                                id: u.ContextMenuIdsNS.contextMenuDownloadShare,
                                statId: "downloading_rk_share_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Downloading
                            }), l.TaskStatusHelper.canAdd2CloudSelectedTask(s.DownloadKernel.CategroyViewID.Downloading, e) && i.push({
                                type: "normal",
                                label: "添加到云盘",
                                id: u.ContextMenuIdsNS.contextMenuDownloadAdd2Cloud,
                                statId: "downloading_rk_yunadd_click",
                                userData: "download/left/downloading",
                                categoryView: s.DownloadKernel.CategroyViewID.Downloading
                            }), -1 === this.categoryId ? (-1 === e[0].categoryId && i.push({
                                type: "normal",
                                label: "删除(&D)",
                                enabled: o,
                                icon: `${__rootDir}/static/icon/deletetask.png`,
                                id: u.ContextMenuIdsNS.contextMenuDownloadDelete,
                                statId: "downloading_rk_delete_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Downloading
                            }), i.push({
                                type: "normal",
                                label: "彻底删除(&Q)",
                                enabled: o,
                                icon: `${__rootDir}/static/icon/destroytask.png`,
                                id: u.ContextMenuIdsNS.contextMenuDownloadDestroy,
                                statId: "downloading_rk_completedelete_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Downloading
                            }, {type: "submenu", label: "移动文件到", submenu: t})) : i.push({
                                type: "normal",
                                label: "彻底删除(&D)",
                                enabled: o,
                                icon: `${__rootDir}/static/icon/destroytask.png`,
                                id: u.ContextMenuIdsNS.contextMenuDownloadDestroy,
                                statId: "downloading_rk_completedelete_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Downloading
                            }, {
                                type: "submenu",
                                label: "移动文件到",
                                submenu: t
                            }), !this.searchMode && this.count > 3 && e.length !== this.count && i.splice(4, 0, {type: "separator"}, {
                                type: "normal",
                                label: "上移到顶部",
                                id: u.ContextMenuIdsNS.contextMenuDownloadMoveTop
                            }, {
                                type: "normal",
                                label: "下移到底部",
                                id: u.ContextMenuIdsNS.contextMenuDownloadMoveBottom
                            }, {type: "separator"}), 1 === e.length) {
                                if (l.TaskStatusHelper.canStopSelectedTask(s.DownloadKernel.CategroyViewID.Downloading, e)) i.unshift({
                                    type: "normal",
                                    label: "暂停(&P)",
                                    icon: `${__rootDir}/static/icon/stoptask.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadPause,
                                    statId: "downloading_rk_pause_click"
                                }); else {
                                    let t = l.TaskStatusHelper.canStartSelectedTask(s.DownloadKernel.CategroyViewID.Downloading, e);
                                    i.unshift({
                                        type: "normal",
                                        label: "开始(&S)",
                                        enabled: t,
                                        icon: `${__rootDir}/static/icon/startalltask.png`,
                                        id: u.ContextMenuIdsNS.contextMenuDownloadStart,
                                        statId: "downloading_rk_start_click"
                                    })
                                }
                                let t = yield c.TaskCtrlOperatorNS.canOpenSelectedTaskFolder(e[0]),
                                    n = V.getTaskFromTaskId(e[0].taskId).isSupportPlay(), o = 1;
                                n && (i.unshift({
                                    type: "normal",
                                    label: "播放(&O)",
                                    icon: `${__rootDir}/static/icon/play.png`,
                                    id: u.ContextMenuIdsNS.contextMenuPlayFile,
                                    statId: "downloading_rk_playfiles_click",
                                    visible: t,
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Downloading
                                }), ++o), i.splice(o, 0, {
                                    type: "normal",
                                    label: "打开文件夹(&F)",
                                    icon: `${__rootDir}/static/icon/openfolder.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadFolder,
                                    extData: this.searchMode ? void 0 : this.getOpenFolderExtData(),
                                    statId: "downloading_rk_openfolders_click",
                                    visible: t,
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Downloading
                                }), ++o, this.searchMode && (i.splice(3, 0, {
                                    type: "normal",
                                    label: "打开任务位置(&G)",
                                    id: u.ContextMenuIdsNS.contextMenuOpenTaskPosition,
                                    statId: "openfile_position_click",
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Downloading
                                }), ++o), n ? i.splice(o, 0, {
                                    type: "normal",
                                    label: "字幕搜索",
                                    icon: `${__rootDir}/static/icon/sunbtitle.png`,
                                    id: u.ContextMenuIdsNS.contxtMenuSubtitleSearch,
                                    statId: "downloading_rk_subtitlesearch_click"
                                }, {type: "separator"}) : i.splice(o, 0, {type: "separator"}), e[0].taskType === s.DownloadKernel.TaskType.Bt ? (i.push({
                                    type: "normal",
                                    label: "种子文件另存为(&C)",
                                    id: u.ContextMenuIdsNS.contextMenuDownloadTorrentSaveAs,
                                    statId: "downloading_rk_torrentsave_click"
                                }), -1 !== e[0].categoryId && -1 === this.categoryId || i.push({
                                    type: "normal",
                                    label: "复制下载链接",
                                    id: u.ContextMenuIdsNS.contextMenuDownloadCopyMagnet,
                                    statId: "downloading_rk_copymagnet_click",
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Downloading
                                })) : -1 !== e[0].categoryId && -1 === this.categoryId || i.push({
                                    type: "normal",
                                    label: "复制下载链接(&C)",
                                    id: u.ContextMenuIdsNS.contextMenuDownloadCopyLink,
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Downloading
                                })
                            } else {
                                let t = l.TaskStatusHelper.canStopSelectedTask(s.DownloadKernel.CategroyViewID.Downloading, e),
                                    n = l.TaskStatusHelper.canStartSelectedTask(s.DownloadKernel.CategroyViewID.Downloading, e);
                                t && i.unshift({
                                    type: "normal",
                                    label: "暂停(&P)",
                                    icon: `${__rootDir}/static/icon/stoptask.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadPause
                                }), n && i.unshift({
                                    type: "normal",
                                    label: "开始(&S)",
                                    icon: `${__rootDir}/static/icon/startalltask.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadStart
                                });
                                let o = l.TaskStatusHelper.canCopySelectTaskLink(e);
                                i.push({
                                    type: "normal",
                                    label: "复制下载链接(&C)",
                                    id: u.ContextMenuIdsNS.contextMenuDownloadCopyLink,
                                    enabled: o,
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Downloading
                                })
                            }
                        }
                    }
                        break;
                    case W.CompletedItem: {
                        let e = this.getSelectdTaskInfos();
                        if (null !== e && e.length > 0) {
                            i = [];
                            let t = l.TaskStatusHelper.canDeleteSelectedTask(void 0, e),
                                n = l.TaskStatusHelper.canMoveSelectedTask(void 0, e);
                            if (-1 === this.categoryId ? (-1 === e[0].categoryId && i.push({
                                type: "normal",
                                label: "删除(&D)",
                                enabled: t,
                                icon: `${__rootDir}/static/icon/deletetask.png`,
                                id: u.ContextMenuIdsNS.contextMenuDownloadDelete,
                                statId: "finished_rk_delete_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Completed
                            }), i.push({
                                type: "normal",
                                label: "彻底删除(&Q)",
                                enabled: t,
                                icon: `${__rootDir}/static/icon/destroytask.png`,
                                id: u.ContextMenuIdsNS.contextMenuDownloadDestroy,
                                statId: "finished_rk_completedelete_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Completed
                            }), -1 === e[0].categoryId && i.push({
                                type: "normal",
                                label: "重新下载(&T)",
                                icon: `${__rootDir}/static/icon/redownload.png`,
                                id: u.ContextMenuIdsNS.contextMenuDownloadRedownload,
                                categoryView: s.DownloadKernel.CategroyViewID.Completed
                            })) : i.push({
                                type: "normal",
                                label: "彻底删除(&D)",
                                enabled: t,
                                icon: `${__rootDir}/static/icon/destroytask.png`,
                                id: u.ContextMenuIdsNS.contextMenuDownloadDestroy,
                                statId: "downloading_rk_completedelete_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Completed
                            }), -1 === this.categoryId) {
                                let e = yield this.getLastestSavePathsOptions(!0, "CopyToDir", "LatestSavePath", !0);
                                e.push({
                                    type: "normal",
                                    label: "其他目录",
                                    id: u.ContextMenuIdsNS.contextMenuDownloadCopyFileOther,
                                    statId: "finished_rk_copyfiles_click",
                                    extData: "button=other"
                                }), i.splice(2, 0, {type: "submenu", label: "复制文件到", submenu: e})
                            }
                            let o = [];
                            if (-1 === this.categoryId ? (o = yield this.getLastestSavePathsOptions(n, "MoveToDir", "LatestSavePath"), -1 === e[0].categoryId && o.push({
                                type: "normal",
                                label: "私人空间",
                                enabled: n,
                                id: u.ContextMenuIdsNS.contextMenuDownloadMoveFilePrivateSpace,
                                statId: "downloading_rk_move_click",
                                extData: "button=private"
                            }), o.push({
                                type: "normal",
                                label: "其他目录",
                                enabled: n,
                                id: u.ContextMenuIdsNS.contextMenuDownloadMoveFileOther,
                                statId: "finished_rk_move_click",
                                extData: "button=other"
                            })) : o.push({
                                type: "normal",
                                label: "移出私人空间",
                                enabled: n,
                                id: u.ContextMenuIdsNS.contextMenuDownloadMoveFileOutPrivateSpace,
                                statId: "downloading_rk_move_click",
                                extData: "button=private"
                            }), i.splice(2, 0, {type: "separator"}, {
                                type: "submenu",
                                label: "移动文件到",
                                submenu: o
                            }), 1 === e.length) {
                                i.splice(2, 0, {
                                    type: "normal",
                                    label: "重命名(&R)",
                                    enabled: !e[0].isMoving,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadRename,
                                    statId: "finished_rk_rename_click"
                                });
                                let t = yield c.TaskCtrlOperatorNS.canOpenSelectedTaskFolder(e[0]),
                                    n = yield c.TaskCtrlOperatorNS.canOpenSelectedTaskFile(e[0]),
                                    o = yield c.TaskCtrlOperatorNS.canOpenAsSelectedTaskFile(e[0]);
                                i.splice(0, 0, {
                                    type: "normal",
                                    label: "打开方式",
                                    icon: `${__rootDir}/static/icon/openas.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadOpenAs,
                                    categoryView: s.DownloadKernel.CategroyViewID.Completed,
                                    statId: "finished_rk_openas_click",
                                    visible: o,
                                    userData: this.searchMode
                                }, {
                                    type: "normal",
                                    label: "打开文件夹(&F)",
                                    icon: `${__rootDir}/static/icon/openfolder.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadFolder,
                                    extData: this.searchMode ? void 0 : this.getOpenFolderExtData(),
                                    statId: "finished_rk_openfolders_click",
                                    categoryView: s.DownloadKernel.CategroyViewID.Completed,
                                    visible: t,
                                    userData: this.searchMode
                                });
                                let a = V.getTaskFromTaskId(e[0].taskId).isSupportPlay();
                                a ? i.splice(0, 0, {
                                    type: "normal",
                                    label: "播放(&O)",
                                    icon: `${__rootDir}/static/icon/play.png`,
                                    id: u.ContextMenuIdsNS.contextMenuPlayFile,
                                    statId: "finished_rk_playfiles_click",
                                    categoryView: s.DownloadKernel.CategroyViewID.Completed,
                                    visible: n,
                                    userData: this.searchMode
                                }) : i.splice(0, 0, {
                                    type: "normal",
                                    label: "打开文件(&O)",
                                    icon: `${__rootDir}/static/icon/open.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadFile,
                                    statId: "finished_rk_openfiles_click",
                                    categoryView: s.DownloadKernel.CategroyViewID.Completed,
                                    visible: n,
                                    userData: this.searchMode
                                });
                                let r = 3;
                                this.searchMode && i.splice(r, 0, {
                                    type: "normal",
                                    label: "打开任务位置(&G)",
                                    id: u.ContextMenuIdsNS.contextMenuOpenTaskPosition,
                                    statId: "openfile_position_click",
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Completed
                                }), a ? i.splice(r, 0, {
                                    type: "normal",
                                    label: "字幕搜索",
                                    icon: `${__rootDir}/static/icon/sunbtitle.png`,
                                    id: u.ContextMenuIdsNS.contxtMenuSubtitleSearch,
                                    statId: "finished_rk_subtitlesearch_click"
                                }, {type: "separator"}) : i.splice(r, 0, {type: "separator"}), e[0].taskType === s.DownloadKernel.TaskType.Bt ? (i.push({
                                    type: "normal",
                                    label: "种子文件另存为(&C)",
                                    id: u.ContextMenuIdsNS.contextMenuDownloadTorrentSaveAs,
                                    statId: "finished_rk_torrent_click"
                                }), -1 !== e[0].categoryId && -1 === this.categoryId || i.push({
                                    type: "normal",
                                    label: "复制下载链接",
                                    id: u.ContextMenuIdsNS.contextMenuDownloadCopyMagnet,
                                    statId: "finished_rk_copymagnet_click",
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Completed
                                })) : -1 !== e[0].categoryId && -1 === this.categoryId || i.push({
                                    type: "normal",
                                    label: "复制下载链接(&C)",
                                    id: u.ContextMenuIdsNS.contextMenuDownloadCopyLink,
                                    statId: "finished_rk_copyurl_click",
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Completed
                                })
                            } else {
                                let t = l.TaskStatusHelper.canCopySelectTaskLink(e);
                                i.push({
                                    type: "normal",
                                    label: "复制下载链接(&C)",
                                    id: u.ContextMenuIdsNS.contextMenuDownloadCopyLink,
                                    statId: "finished_rk_copyurl_click",
                                    enabled: t,
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Completed
                                })
                            }
                            let a = i.findIndex(e => e.id === u.ContextMenuIdsNS.contextMenuDownloadDelete);
                            -1 === a && (a = i.findIndex(e => e.id === u.ContextMenuIdsNS.contextMenuDownloadDestroy)), !this.canShare() || -1 !== e[0].categoryId && -1 === this.categoryId || i.splice(a++, 0, {
                                type: "normal",
                                label: "分享",
                                id: u.ContextMenuIdsNS.contextMenuDownloadShare,
                                statId: "finished_rk_share_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Completed
                            }), l.TaskStatusHelper.canAdd2CloudSelectedTask(s.DownloadKernel.CategroyViewID.Completed, e) && i.splice(a++, 0, {
                                type: "normal",
                                label: "添加到云盘",
                                id: u.ContextMenuIdsNS.contextMenuDownloadAdd2Cloud,
                                statId: "finished_rk_yunadd_click",
                                userData: "download/left/complete",
                                categoryView: s.DownloadKernel.CategroyViewID.Completed
                            })
                        }
                    }
                        break;
                    case W.RecycleBlank: {
                        let e = !0;
                        this.contextInfo && this.contextInfo.recycleTaskList && 0 === this.contextInfo.recycleTaskList.length && (e = !1), i = [{
                            type: "normal",
                            label: "清空(&B)",
                            enabled: e,
                            id: u.ContextMenuIdsNS.contextMenuDownloadClear
                        }]
                    }
                        break;
                    case W.RecycleItem: {
                        let e = this.getSelectdTaskInfos();
                        if (null !== e && e.length > 0) if (i = [{
                            type: "normal",
                            label: "打开任务位置(&G)",
                            id: u.ContextMenuIdsNS.contextMenuOpenTaskPosition,
                            statId: "openfile_position_click",
                            userData: this.searchMode,
                            categoryView: s.DownloadKernel.CategroyViewID.Recycle
                        }, {
                            type: "normal",
                            label: "还原(&R)",
                            id: u.ContextMenuIdsNS.contextMenuDownloadRecover,
                            statId: "dustbin_rk_undo_click"
                        }, {
                            type: "normal",
                            label: "清空(&B)",
                            id: u.ContextMenuIdsNS.contextMenuDownloadClear,
                            statId: "dustbin_rk_clear_click"
                        }, {
                            type: "normal",
                            label: "彻底删除(&Q)",
                            icon: `${__rootDir}/static/icon/destroytask.png`,
                            id: u.ContextMenuIdsNS.contextMenuDownloadDestroy,
                            statId: "dustbin_rk_completedelete_click",
                            userData: this.searchMode,
                            categoryView: s.DownloadKernel.CategroyViewID.Recycle
                        }, {type: "separator"}, {
                            type: "normal",
                            label: "重新下载(&T)",
                            icon: `${__rootDir}/static/icon/redownload.png`,
                            categoryView: s.DownloadKernel.CategroyViewID.Recycle,
                            id: u.ContextMenuIdsNS.contextMenuDownloadRedownload
                        }], this.searchMode || i.shift(), 1 === e.length) {
                            let t = yield c.TaskCtrlOperatorNS.canOpenSelectedTaskFolder(e[0]), n = e[0].taskStatus;
                            if (n === s.DownloadKernel.TaskStatus.Succeeded || n === s.DownloadKernel.TaskStatus.Seeding) {
                                let n = yield c.TaskCtrlOperatorNS.canOpenSelectedTaskFile(e[0]),
                                    o = yield c.TaskCtrlOperatorNS.canOpenAsSelectedTaskFile(e[0]);
                                i.splice(2, 0, {type: "separator"}, {
                                    type: "normal",
                                    label: "打开文件(&O)",
                                    icon: `${__rootDir}/static/icon/open.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadFile,
                                    categoryView: s.DownloadKernel.CategroyViewID.Recycle,
                                    statId: "dustbin_rk_openfiles_click",
                                    visible: n,
                                    userData: this.searchMode
                                }, {
                                    type: "normal",
                                    label: "打开方式",
                                    icon: `${__rootDir}/static/icon/openas.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadOpenAs,
                                    categoryView: s.DownloadKernel.CategroyViewID.Recycle,
                                    statId: "dustbin_rk_openas_click",
                                    visible: o,
                                    userData: this.searchMode
                                }, {
                                    type: "normal",
                                    label: "打开文件夹(&F)",
                                    icon: `${__rootDir}/static/icon/openfolder.png`,
                                    id: u.ContextMenuIdsNS.contextMenuDownloadFolder,
                                    statId: "dustbin_rk_openfolders_click",
                                    visible: t,
                                    userData: this.searchMode,
                                    categoryView: s.DownloadKernel.CategroyViewID.Recycle
                                })
                            } else i.splice(2, 0, {type: "separator"}, {
                                type: "normal",
                                label: "打开文件夹(&F)",
                                icon: `${__rootDir}/static/icon/openfolder.png`,
                                id: u.ContextMenuIdsNS.contextMenuDownloadFolder,
                                statId: "dustbin_rk_openfolders_click",
                                visible: t,
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Recycle
                            });
                            e[0].taskType === s.DownloadKernel.TaskType.Bt ? i.push({
                                type: "normal",
                                label: "种子文件另存为(&C)",
                                id: u.ContextMenuIdsNS.contextMenuDownloadTorrentSaveAs
                            }, {
                                type: "normal",
                                label: "复制下载链接",
                                id: u.ContextMenuIdsNS.contextMenuDownloadCopyMagnet,
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Recycle
                            }) : i.push({
                                type: "normal",
                                label: "复制下载链接(&C)",
                                id: u.ContextMenuIdsNS.contextMenuDownloadCopyLink,
                                statId: "dustbin_rk_copyurl_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Recycle
                            });
                            let o = [];
                            !this.canShare() || -1 !== e[0].categoryId && -1 === this.categoryId || o.push({
                                type: "normal",
                                label: "分享",
                                id: u.ContextMenuIdsNS.contextMenuDownloadShare,
                                statId: "dustbin_rk_share_click",
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Recycle
                            }), o.length > 0 && (o.splice(0, 0, {type: "separator"}), i.splice(2, 0, ...o))
                        } else {
                            i.splice(1, 0, {type: "separator"});
                            let t = l.TaskStatusHelper.canCopySelectTaskLink(e);
                            i.push({
                                type: "normal",
                                label: "复制下载链接(&C)",
                                id: u.ContextMenuIdsNS.contextMenuDownloadCopyLink,
                                statId: "dustbin_rk_copyurl_click",
                                enabled: t,
                                userData: this.searchMode,
                                categoryView: s.DownloadKernel.CategroyViewID.Recycle
                            })
                        }
                    }
                        break;
                    case W.ToolbarMore:
                        if (null !== this.contextInfo) {
                            let e = this.getSelectdTaskInfos(), t = l.TaskStatusHelper.canDeleteSelectedTask(void 0, e);
                            i = [{
                                type: "normal",
                                label: "彻底删除任务",
                                id: u.ContextMenuIdsNS.contextMenuToolbarMoreDestroy,
                                icon: `${__rootDir}/static/icon/destroytask.png`,
                                enabled: t,
                                statId: "top_morelist_click",
                                extData: "button=completedelete"
                            }, {
                                type: "submenu",
                                label: "排序",
                                submenu: this.getSortSubMenuOptions(this.contextInfo)
                            }, {
                                type: "normal",
                                label: "下载帮助",
                                icon: `${__rootDir}/static/icon/help.png`,
                                id: u.ContextMenuIdsNS.contextMenuToolbarMoreOpenHelp,
                                statId: "top_help_click",
                                extData: "button=dl_panel"
                            }, {
                                type: "normal",
                                label: "设置中心",
                                icon: `${__rootDir}/static/icon/config.png`,
                                id: u.ContextMenuIdsNS.contextMenuToolbarMoreConfig,
                                statId: "top_morelist_click",
                                extData: "button=setting"
                            }, {
                                type: "normal",
                                label: "搜索下载记录",
                                id: u.ContextMenuIdsNS.contextMenuToolbarMoreOpenSearch,
                                statId: "top_morelist_click",
                                extData: "button=searchtask"
                            }], p.XLStatNS.trackEvent("download_detail", "help_tips_entry_show", "", 0, 0, 0, 0, "position=dl_page")
                        }
                        break;
                    case W.ChangeCategory: {
                        let e = this.contextInfo.currentCategoryId;
                        i = [{
                            type: "checkbox",
                            label: "我的电脑",
                            id: u.ContextMenuIdsNS.contextMenuTabChangeCategoryMyComputer,
                            checked: -1 === e,
                            statId: "top_dropdownlist_click",
                            extData: "button=computer"
                        }, {
                            type: "checkbox",
                            label: "私人空间",
                            id: u.ContextMenuIdsNS.contextMenuTabChangeCategoryPrivateSpace,
                            checked: -1 !== e,
                            statId: "top_dropdownlist_click",
                            extData: "button=private"
                        }]
                    }
                        break;
                    case W.PrivateSpaceHome:
                        i = [{
                            type: "normal",
                            label: "全选",
                            id: u.ContextMenuIdsNS.contextMenuToolbarPrivateSpaceSelectAll
                        }, {
                            type: "submenu",
                            label: "排序",
                            submenu: this.getSortSubMenuOptions(this.contextInfo)
                        }, {type: "separator"}, {
                            type: "normal",
                            label: "私人空间下载设置",
                            id: u.ContextMenuIdsNS.contextMenuToolbarPrivateSpaceDownloadSetting
                        }, {
                            type: "normal",
                            label: "修改私人空间密码",
                            id: u.ContextMenuIdsNS.contextMenuToolbarPrivateSpacePasswwordChange
                        }];
                        break;
                    case W.SearchMultiSel: {
                        let e = this.contextInfo.currentSelSearchTaskInfos,
                            t = l.TaskStatusHelper.canCopySelectTaskLink(e);
                        i = [{
                            type: "normal",
                            label: "删除(&D)",
                            icon: `${__rootDir}/static/icon/deletetask.png`,
                            id: u.ContextMenuIdsNS.contextMenuDownloadDelete,
                            userData: this.searchMode
                        }, {
                            type: "normal",
                            label: "彻底删除(&Q)",
                            icon: `${__rootDir}/static/icon/destroytask.png`,
                            id: u.ContextMenuIdsNS.contextMenuDownloadDestroy,
                            userData: this.searchMode
                        }, {
                            type: "normal",
                            label: "复制下载链接(&C)",
                            id: u.ContextMenuIdsNS.contextMenuDownloadCopyLink,
                            enabled: t,
                            userData: this.searchMode
                        }]
                    }
                }
                this.popMenuInternal(i, e, t).catch()
            })
        }

        getSortConfig(e) {
            let t = {sortBy: T.SortNS.SortType.Default, asce: !0};
            do {
                if (null === e || void 0 === e) break;
                let i = e.currentCategoryViewId;
                if (null === i || void 0 === i) break;
                let n = e.currentCategoryId;
                t = T.SortNS.getSortConfig(i, n)
            } while (0);
            return t
        }

        getSortSubMenuOptions(e) {
            let t = [];
            do {
                if (null === e || void 0 === e) break;
                let i = e.currentCategoryViewId;
                if (null === i || void 0 === i) break;
                let n = this.getSortConfig(e);
                B.information("sort_by", n);
                let o = n.sortBy === T.SortNS.SortType.ByTime_Remain || n.sortBy === T.SortNS.SortType.ByTime_Creation || n.sortBy === T.SortNS.SortType.ByTime_Completion,
                    a = "按时间", r = "";
                i === s.DownloadKernel.CategroyViewID.Downloading ? (a = "按创建时间", r = "downloading_rk_rank_click") : i === s.DownloadKernel.CategroyViewID.Completed ? (a = "按完成时间", r = "finished_rk_rank_click") : i === s.DownloadKernel.CategroyViewID.Recycle && (a = "按删除时间", r = "dustbin_rk_rank_click"), t = [{
                    type: "checkbox",
                    label: "默认",
                    id: u.ContextMenuIdsNS.contextMenuToolbarMoreSortByDefault,
                    statId: r,
                    extData: "rank_type=default",
                    checked: n.sortBy === T.SortNS.SortType.Default
                }, {
                    type: "checkbox",
                    label: a,
                    id: u.ContextMenuIdsNS.contextMenuToolbarMoreSortByTime,
                    checked: o,
                    statId: r,
                    extData: "rank_type=create_time",
                    userData: o ? n.asce : void 0
                }, {
                    type: "checkbox",
                    label: "按文件名 A-Z",
                    id: u.ContextMenuIdsNS.contextMenuToolbarMoreSortByName,
                    checked: n.sortBy === T.SortNS.SortType.ByName,
                    statId: r,
                    extData: "rank_type=file_name",
                    userData: n.sortBy === T.SortNS.SortType.ByName ? n.asce : void 0
                }, {
                    type: "checkbox",
                    label: "按文件大小",
                    id: u.ContextMenuIdsNS.contextMenuToolbarMoreSortBySize,
                    checked: n.sortBy === T.SortNS.SortType.BySize,
                    statId: r,
                    extData: "rank_type=file_size",
                    userData: n.sortBy === T.SortNS.SortType.BySize ? n.asce : void 0
                }], i === s.DownloadKernel.CategroyViewID.Downloading && t.splice(2, 0, {
                    type: "checkbox",
                    label: "按当前进度",
                    id: u.ContextMenuIdsNS.contextMenuToolbarMoreSortByProgress,
                    checked: n.sortBy === T.SortNS.SortType.ByProgress,
                    statId: r,
                    extData: "rank_type=progress_speed",
                    userData: n.sortBy === T.SortNS.SortType.ByProgress ? n.asce : void 0
                })
            } while (0);
            return t
        }

        getLastestSavePathsOptions(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                let n = v.ConfigNS.getValue(t, i, []), a = [],
                    r = u.ContextMenuIdsNS.contextMenuDownloadMoveFileLastest;
                o && (r = u.ContextMenuIdsNS.contextMenuDownloadCopyFileLastest);
                for (let t of n) {
                    let i = /&/gi;
                    t = t.replace(i, "&&"), a.push({type: "normal", label: t, enabled: e, id: r})
                }
                return a
            })
        }

        getOpenFolderExtData() {
            let e = "";
            do {
                let t = this.getSelectdTaskInfos();
                if (!t || 0 === t.length) break;
                let i = t[0];
                if (i.taskType === s.DownloadKernel.TaskType.Bt) e = "folder_type=bt"; else if (i.taskType === s.DownloadKernel.TaskType.Group) e = "folder_type=task_group"; else {
                    let t = A.extname(i.taskName);
                    t && t.length > 1 && (t = t.length > 10 ? "" : t.slice(1)), e = `folder_type=${t || ""}`
                }
            } while (0);
            return e
        }

        handleMenuClick(e) {
            return n(this, void 0, void 0, function* () {
                let t = e.id, i = e.label, o = e.categoryView;
                switch (t) {
                    case u.ContextMenuIdsNS.contextMenuDownloadSelectAll:
                        this.emitter.emit(f.NodeEventMesssageNS.eventDownloadContextMenuClick, "select_all");
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadDeleteNonexisting:
                        do {
                            if (void 0 === this.contextInfo || null === this.contextInfo) break;
                            let e = this.contextInfo.getCompletedTaskBaseList();
                            if (void 0 === e || null === e) break;
                            if (0 === e.length) break;
                            h.TaskOperatorNs.removeNonExistingTask(e).catch(e => {
                                B.warning(e)
                            })
                        } while (0);
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadAsReadedAll:
                        do {
                            if (void 0 === this.contextInfo || null === this.contextInfo) break;
                            let e = this.contextInfo.getCompletedTaskBaseList();
                            if (void 0 === e || null === e) break;
                            if (0 === e.length) break;
                            h.TaskOperatorNs.markReadStatus(e, 1)
                        } while (0);
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadImportUncomplete:
                        h.TaskOperatorNs.importUncompleted().catch();
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadFolder: {
                        !0 === e.userData && p.XLStatNS.trackEvent("download_leftpanel", "search_rk_openfolders_click", "", 0, 0, 0, 0, this.getStatExtData(o));
                        let t = this.getSelectdTaskInfos();
                        t.length > 0 && (h.TaskOperatorNs.openTaskFolder(t[0]).catch(e => {
                            B.warning(e)
                        }), void 0 !== o && o === s.DownloadKernel.CategroyViewID.Completed && h.TaskOperatorNs.markReadStatus(t, 1))
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuGroupAccelerate: {
                        let e = this.getSelectdTaskInfos();
                        o === s.DownloadKernel.CategroyViewID.Downloading ? K.openGroupAccelerateTabByTaskId(e[0].taskId, "menu", "downloading", void 0).catch() : K.openGroupAccelerateTabByTaskId(e[0].taskId, "menu", "complete", void 0).catch()
                    }
                        break;
                    case u.ContextMenuIdsNS.contxtMenuSubtitleSearch: {
                        let e = this.getSelectdTaskInfos()[0].taskId, t = V.getTaskFromTaskId(e), i = t.getTaskName(),
                            n = t.getType(), o = "";
                        t && (o = t.getSavePath()), n === s.DownloadKernel.TaskType.Bt && t.getExtraObject().getDownloadFile().length > 1 && (o = A.join(o, i));
                        let a = t.getTaskAttribute(s.DownloadKernel.TaskAttribute.CategoryViewId),
                            r = G.getDisaplayName(e), l = 0;
                        (l = r.length) > 1 ? y.MessageBox.custom("SubtitleTaskFilelist", {
                            size: "large",
                            taskId: e,
                            taskName: i,
                            taskType: n,
                            fileList: r,
                            saveDir: o,
                            categoryViewId: a
                        }, {
                            center: !0,
                            width: 500,
                            height: 329
                        }).catch() : y.MessageBox.custom("SubtitleSearch", {
                            taskId: e,
                            taskName: r[0].fileName,
                            cid: r[0].cid,
                            saveDir: o,
                            from: "taskList",
                            categoryViewId: a
                        }, {center: !0, width: 500, height: 323}).catch()
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadStartAll:
                        do {
                            if (void 0 === this.contextInfo || null === this.contextInfo) break;
                            let e = this.contextInfo.downloadingTaskList;
                            if (!e) break;
                            if (0 === e.length) break;
                            -1 === this.categoryId ? h.TaskOperatorNs.startAll() : h.TaskOperatorNs.startCategoryAllTask(this.categoryId)
                        } while (0);
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadStart: {
                        let e = this.getSelectdTaskInfos();
                        e.length > 0 && h.TaskOperatorNs.startTasks(e);
                        for (let t of e) F.client.callServerFunction("SetPerformanceItemStart", "StartTask_" + t.taskId, (new Date).getTime()).catch()
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadPauseAll:
                        do {
                            if (void 0 === this.contextInfo || null === this.contextInfo) break;
                            let e = this.contextInfo.downloadingTaskList;
                            if (!e) break;
                            if (0 === e.length) break;
                            -1 === this.categoryId ? yield h.TaskOperatorNs.pauseAll(s.DownloadKernel.TaskStopReason.PauseAll) : h.TaskOperatorNs.pauseCategoryAllTask(this.categoryId, s.DownloadKernel.TaskStopReason.PauseAll)
                        } while (0);
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadPause: {
                        let e = this.getSelectdTaskInfos();
                        e.length > 0 && h.TaskOperatorNs.pauseTasks(e, s.DownloadKernel.TaskStopReason.Manual)
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadDelete: {
                        !0 === e.userData && p.XLStatNS.trackEvent("download_leftpanel", "search_rk_delete_click", "", 0, 0, 0, 0, this.getStatExtData(o));
                        let t = this.getSelectdTaskInfos(), i = [], n = [];
                        for (let e = 0; e < t.length; e++) -1 === t[e].categoryId ? i.push(t[e]) : n.push(t[e]);
                        i.length > 0 && h.TaskOperatorNs.deleteTasks(i), n.length > 0 && h.TaskOperatorNs.destroyTasks(n)
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadDestroy: {
                        !0 === e.userData && p.XLStatNS.trackEvent("download_leftpanel", "search_rk_completedelete_click", "", 0, 0, 0, 0, this.getStatExtData(o));
                        let t = this.getSelectdTaskInfos();
                        t.length > 0 && h.TaskOperatorNs.destroyTasks(t)
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadMoveFilePrivateSpace: {
                        let e = this.getSelectdTaskInfos();
                        e.length > 0 && b.default(!1, !0, "privatespace").then(t => n(this, void 0, void 0, function* () {
                            if (t && "" !== t) {
                                let i = 0;
                                if (!1 === C.PrivateSpaceHelperNS.isPrivateSpaceOpen(t) && 0 !== (i = yield C.PrivateSpaceHelperNS.phoneVerifyPrivateCategory(t))) return;
                                if (0 === (i = yield C.PrivateSpaceHelperNS.openPrivateCategory(t)) && 0 === (i = yield C.PrivateSpaceHelperNS.accessPrivateCategory(t))) {
                                    let i = yield C.PrivateSpaceHelperNS.getPrivateSavePath(t);
                                    if (i = A.join(i, t), yield h.TaskOperatorNs.move2Dir(e, i, !1)) {
                                        let i = U.getPrivateCategoryFromUserId(t);
                                        i && h.TaskOperatorNs.moveCategoryTask(e, i.getId())
                                    }
                                }
                            }
                        })).catch()
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadMoveFileOutPrivateSpace: {
                        let e = this.getSelectdTaskInfos();
                        if (e.length > 0) {
                            let t = v.ConfigNS.getValue("PathAndCategory", "LastUsedPath", "");
                            null !== t && void 0 !== t && "" !== t || (t = v.ConfigNS.getValue("TaskDefaultSettings", "DefaultPath", "")), h.TaskOperatorNs.move2Dir(e, t, !1).then(t => {
                                t && U.getCurrentPrivateCategory() && h.TaskOperatorNs.moveCategoryTask(e, -1)
                            }).catch()
                        }
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadMoveFileOther: {
                        let e = this.getSelectdTaskInfos();
                        e.length > 0 && h.TaskOperatorNs.move2Dir(e).catch(e => {
                            B.warning(e)
                        })
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadMoveFileLastest: {
                        let e = this.getSelectdTaskInfos();
                        if (e.length > 0) {
                            let t = /&&/gi, n = i.replace(t, "&");
                            h.TaskOperatorNs.move2Dir(e, n).catch(e => {
                                B.warning(e)
                            })
                        }
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadMoveTop:
                        this.emitter.emit(f.NodeEventMesssageNS.eventDownloadContextMenuClick, "move_up");
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadMoveBottom:
                        this.emitter.emit(f.NodeEventMesssageNS.eventDownloadContextMenuClick, "move_down");
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadMerge:
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadCopyLink: {
                        !0 === e.userData && p.XLStatNS.trackEvent("download_leftpanel", "search_rk_copyurl_click", "", 0, 0, 0, 0, this.getStatExtData(o));
                        let t = this.getSelectdTaskInfos();
                        t.length > 0 && h.TaskOperatorNs.copyLink(t, this.getPanel(o))
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadCopyMagnet: {
                        !0 === e.userData && p.XLStatNS.trackEvent("download_leftpanel", "search_rk_copyurl_click", "", 0, 0, 0, 0, this.getStatExtData(o));
                        let t = this.getSelectdTaskInfos();
                        t.length > 0 && h.TaskOperatorNs.copyMagnetLink(t[0], this.getPanel(o))
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadTorrentSaveAs: {
                        let e = this.getSelectdTaskInfos();
                        e.length > 0 && h.TaskOperatorNs.saveAsTorrent(e[0]).catch()
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuPlayFile: {
                        let t = this.getSelectdTaskInfos();
                        if (-1 === this.categoryId && t.length > 0 && -1 !== t[0].categoryId) {
                            let i = t[0].taskName.split("."), n = i[i.length - 1], o = "video";
                            L.TaskUtilHelper.getTaskFileType(t[0].taskName) === L.TaskUtilHelper.FileExtType.Music && (o = "music"), p.XLStatNS.trackEvent("pc_yunpan", "yunpan_consumption_click", "", 0, 0, 0, 0, "from=" + (e.categoryView === s.DownloadKernel.CategroyViewID.Completed ? "download_left_gotback_play_click" : "download_left_gettingback_play_click") + ",file_type=" + o + ",suffix=" + n)
                        } else !0 === e.userData && p.XLStatNS.trackEvent("download_leftpanel", "search_rk_playfiles_click", "", 0, 0, 0, 0, this.getStatExtData(o));
                        let i = "download_left_downloading_rk", n = !1;
                        if (t[0] && t[0].taskId) {
                            let e = V.getTaskFromTaskId(t[0].taskId).getExtraObject().getUserData(R.TaskUserDataGUID.guidThunderYunDownloadUserData, "extras");
                            if (e) {
                                let t = null;
                                try {
                                    t = JSON.parse(e)
                                } catch (e) {
                                }
                                t && 1 === t.isInSafe && (n = !0)
                            }
                        }
                        e.categoryView === s.DownloadKernel.CategroyViewID.Completed ? i = -1 === this.categoryId && t.length > 0 && -1 !== t[0].categoryId ? n ? "safebox_download_getback_complete_play" : "download_getback_complete_play" : "download_left_complate_rk" : -1 === this.categoryId && t.length > 0 && -1 !== t[0].categoryId && (i = n ? "safebox_download_getbacking_play" : "download_getbacking_play"), -1 !== this.categoryId && (i = e.categoryView === s.DownloadKernel.CategroyViewID.Completed ? "download_private_space_local_play" : "download_private_space_bxbb_play"), t.length > 0 && (F.client.callServerFunction("OperateTask", t[0].taskId, "play", {
                            panel: "finished",
                            playFrom: i
                        }).catch(), h.TaskOperatorNs.markReadStatus(t, 1))
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadFile: {
                        !0 === e.userData && p.XLStatNS.trackEvent("download_leftpanel", "search_rk_openfiles_click", "", 0, 0, 0, 0, this.getStatExtData(o));
                        let t = "";
                        e.categoryView === s.DownloadKernel.CategroyViewID.Completed ? t = "finished" : e.categoryView === s.DownloadKernel.CategroyViewID.Recycle && (t = "dustbin");
                        let i = this.getSelectdTaskInfos();
                        if (i.length > 0) {
                            let e = i[0];
                            if (e.taskType === s.DownloadKernel.TaskType.Bt) {
                                let t = V.getTaskFromTaskId(e.taskId);
                                g.SingleBtTaskNS.isSingleBtTask(t).then(t => {
                                    t ? h.TaskOperatorNs.openTaskItem(e).catch() : h.TaskOperatorNs.openTaskFolder(e, !0).catch()
                                }).catch()
                            } else if (e.taskType === s.DownloadKernel.TaskType.Group) {
                                let t = V.getTaskFromTaskId(e.taskId);
                                h.TaskOperatorNs.executeInstallFile(t).then(t => {
                                    t || h.TaskOperatorNs.openTaskFolder(e, !0).catch()
                                }).catch()
                            } else h.TaskOperatorNs.openTaskItem(e, void 0, void 0, t, this.categoryId).catch(e => {
                                B.warning(e)
                            });
                            void 0 !== o && o === s.DownloadKernel.CategroyViewID.Completed && h.TaskOperatorNs.markReadStatus(i, 1)
                        }
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadOpenAs:
                        let a = this.getSelectdTaskInfos();
                        if (a.length > 0) {
                            let e = a[0];
                            if (e.taskType === s.DownloadKernel.TaskType.Bt) {
                                let t = V.getTaskFromTaskId(e.taskId);
                                g.SingleBtTaskNS.isSingleBtTask(t).then(t => {
                                    t && h.TaskOperatorNs.openAsTaskItem(e).catch()
                                }).catch()
                            } else e.taskType !== s.DownloadKernel.TaskType.Group && h.TaskOperatorNs.openAsTaskItem(e).catch()
                        }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadRename: {
                        let e = this.getSelectdTaskInfos();
                        e.length > 0 && h.TaskOperatorNs.renameTask(e[0])
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadCopyFileOther: {
                        let e = this.getSelectdTaskInfos();
                        e.length > 0 && h.TaskOperatorNs.copy2Dir(e).catch(e => {
                            B.warning(e)
                        })
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadCopyFileLastest: {
                        let e = this.getSelectdTaskInfos();
                        if (e.length > 0) {
                            let t = /&&/gi, n = i.replace(t, "&");
                            h.TaskOperatorNs.copy2Dir(e, n).catch(e => {
                                B.warning(e)
                            })
                        }
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadRedownload: {
                        let e = this.getSelectdTaskInfos();
                        if (e.length > 0) {
                            let t = "";
                            void 0 !== o && o === s.DownloadKernel.CategroyViewID.Completed ? t = "finished_rk_reload_click" : o === s.DownloadKernel.CategroyViewID.Recycle && (t = "dustbin_rk_reload_click"), c.TaskCtrlOperatorNS.redownloadTask(e, void 0, t).catch()
                        }
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadRecover: {
                        let e = this.getSelectdTaskInfos();
                        e.length > 0 && h.TaskOperatorNs.recoverTask(e)
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadClear:
                        h.TaskOperatorNs.clearRecycle();
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreConfig:
                        if (null !== this.contextInfo) {
                            let e = {tabType: m.TabType.XDAS, tabParam: {title: "设置中心", name: "conf-setting"}};
                            p.XLStatNS.trackEvent("setting_center", "setting_panel_show", "", 0, 0, 0, 0, "entry=download_panel"), this.contextInfo.CREATE_NEW_TAB(e)
                        }
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreOpenHelp:
                        if (null !== this.contextInfo) {
                            let e = {
                                tabType: m.TabType.Chromium,
                                tabParam: {
                                    title: "下载帮助",
                                    url: "http://pc.xunlei.com/pages/#/help",
                                    name: "下载帮助",
                                    showUrl: !0
                                }
                            };
                            p.XLStatNS.trackEvent("download_detai", "help_tips_entry_show", "", 0, 0, 0, 0, "position=dl_panel"), this.contextInfo.CREATE_NEW_TAB(e)
                        }
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreOpenSearch:
                        _.default.fireEvent(f.NodeEventMesssageNS.eventShowSearchTaskPage, !0);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByDefault:
                        T.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, T.SortNS.SortType.Default, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByTime:
                        T.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, T.SortNS.SortType.ByTime, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByType:
                        T.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, T.SortNS.SortType.ByType, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByName:
                        T.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, T.SortNS.SortType.ByName, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortBySize:
                        T.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, T.SortNS.SortType.BySize, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByStatus:
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreSortByProgress:
                        T.SortNS.handleSortMenuClick(this.contextInfo.SORT_CATEGORY_BY_FUNCTION, T.SortNS.SortType.ByProgress, e.userData, this.contextInfo.currentCategoryViewId, this.contextInfo.currentCategoryId);
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarMoreDestroy:
                        if (null !== this.contextInfo) {
                            let e = this.getSelectdTaskInfos();
                            null !== e && void 0 !== e && e.length > 0 && h.TaskOperatorNs.destroyTasks(e)
                        }
                        break;
                    case u.ContextMenuIdsNS.contextMenuTabChangeCategoryMyComputer:
                        this.emitter.emit(f.NodeEventMesssageNS.eventDownloadContextMenuClick, "my_computer");
                        break;
                    case u.ContextMenuIdsNS.contextMenuTabChangeCategoryPrivateSpace:
                        this.emitter.emit(f.NodeEventMesssageNS.eventDownloadContextMenuClick, "private_space");
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarPrivateSpaceSelectAll:
                        this.emitter.emit(f.NodeEventMesssageNS.eventDownloadContextMenuClick, "select_all");
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarPrivateSpaceDownloadSetting:
                        F.client.callServerFunction("GetUserID").then(e => n(this, void 0, void 0, function* () {
                            if (e && "" !== e) {
                                let t = yield C.PrivateSpaceHelperNS.getPrivateSavePath(e),
                                    i = v.ConfigNS.getValue("PrivateSpaceLockUserTask", e, 1);
                                y.MessageBox.custom("private-space-download-setting", {
                                    savePath: t,
                                    hideLocalDir: 1 === i
                                }).then(t => n(this, void 0, void 0, function* () {
                                    t.action === x.MessageBoxNS.Action.OK && (v.ConfigNS.setValue("PrivateSpaceDefaultPath", e, t.args.savePath), v.ConfigNS.setValue("PrivateSpaceLockUserTask", e, t.args.hideLocalDir), C.PrivateSpaceHelperNS.setPrivateSavePath(e, t.args.savePath).then().catch(), C.PrivateSpaceHelperNS.setAllTaskFileHidden(e, 1 === t.args.hideLocalDir))
                                })).catch()
                            }
                        })).catch();
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarPrivateSpacePasswwordChange:
                        F.client.callServerFunction("GetUserID").then(e => n(this, void 0, void 0, function* () {
                            e && "" !== e && 0 === (yield C.PrivateSpaceHelperNS.phoneVerifyPrivateCategory(e)) && C.PrivateSpaceHelperNS.changePrivateSpacePassword(e).catch()
                        })).catch();
                        break;
                    case u.ContextMenuIdsNS.contextMenuToolbarPrivateSpaceTaskManager:
                        y.MessageBox.custom("private-space-task-manager", {}).catch();
                        break;
                    case u.ContextMenuIdsNS.contextMenuShouleiFileTransfer:
                        this.handleShouleiFileTransfer().catch();
                        break;
                    case u.ContextMenuIdsNS.contextMenuOpenTaskPosition: {
                        !0 === e.userData && p.XLStatNS.trackEvent("download_leftpanel", "search_rk_openlocation_click", "", 0, 0, 0, 0, this.getStatExtData(o)), _.default.fireEvent(f.NodeEventMesssageNS.eventShowSearchTaskPage, !1);
                        let t = this.getSelectdTaskInfos()[0];
                        S.ThunderNewTask.selectTask(t.taskId).catch()
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadByShoulei:
                        this.handleDownloadByShoulei().catch();
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadShare: {
                        let e = this.getSelectdTaskInfos();
                        1 === e.length && h.TaskOperatorNs.shareLink(e[0], this.getPanel(o), "leftlist_rk_share").catch()
                    }
                        break;
                    case u.ContextMenuIdsNS.contextMenuDownloadAdd2Cloud: {
                        let t = this.getSelectdTaskInfos();
                        if (t.length > 0) {
                            let i = e.userData || "", n = yield h.TaskOperatorNs.save2Cloud(t, i, o);
                            n && (yield F.client.callServerFunction("ShowMessageToast", {message: n, type: "error"}))
                        }
                    }
                }
            })
        }

        getStatExtData(e) {
            let t = "mypc";
            return -1 !== _.default.getCurrentCategoryId() && (t = "private"), "panel_type=" + t + ",panel=" + this.getPanel(e)
        }

        getPanel(e) {
            let t = "unknown";
            switch (e) {
                case s.DownloadKernel.CategroyViewID.Completed:
                    t = "finished";
                    break;
                case s.DownloadKernel.CategroyViewID.Downloading:
                    t = "downloading";
                    break;
                case s.DownloadKernel.CategroyViewID.Recycle:
                    t = "dustbin"
            }
            return t
        }

        getSelectdTaskInfos() {
            let e = [], t = this.contextInfo.currentSelectdTaskIds;
            for (let i of t) {
                let t = V.getTaskFromTaskId(i);
                if (!t) continue;
                let n = t.getTaskBaseInfo();
                e.push(n)
            }
            return e
        }

        popMenuInternal(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = this.buildMenuTemplate(e);
                if (n.length > 0) {
                    let e = [];
                    if (this.menuEventClients.hasOwnProperty(t)) {
                        let i = this.menuEventClients[t];
                        for (let t of i) {
                            let i = yield P.server.callClientFunctionByName(t, "GetContextMenuExtra", this.contextInfo.currentCategoryId, this.contextInfo.currentCategoryViewId, this.getSelectdTaskInfos());
                            i && i[0] && i[0].length > 0 && e.push(...this.buildMenuTemplateFromRemote(t, i[0]))
                        }
                    }
                    e.length > 0 && n.push(...e);
                    const a = yield o.asyncRemoteCall.getCurrentWindow();
                    this.emitter.emit(f.NodeEventMesssageNS.eventDownloadContextMenuPopup, n);
                    const r = yield(yield o.asyncRemoteCall.getMenu()).buildFromTemplate(n);
                    yield E.MenuSkinNS.setStyle(r, {}), i ? r.popup({
                        window: a,
                        x: i.clientX,
                        y: i.clientY,
                        async: !1
                    }) : r.popup({
                        window: a,
                        async: !1
                    }), this.emitter.emit(f.NodeEventMesssageNS.eventDownloadContextMenuEnd)
                }
            })
        }

        statExtData(e) {
            let t = "panel_type=mypc";
            return -1 !== this.categoryId && (t = "panel_type=private"), void 0 !== e && "" !== e && (t = t + "," + e), t
        }

        buildMenuTemplateFromRemote(e, t) {
            let i = [];
            for (let e = 0; e < t.length; e++) {
                let n = null, o = t[e];
                if (o) {
                    if ("submenu" === o.type) {
                        let e = this.buildMenuTemplate(o.submenu);
                        n = {type: o.type, label: o.label, submenu: e}
                    } else if ("separator" === o.type) n = {type: o.type}; else {
                        let e = Object.assign({}, o), t = o.click;
                        void 0 !== t && null !== t && (o.click = (() => {
                            if (void 0 !== o.statId && "" !== o.statId) {
                                void 0 === o.extData && (o.extData = "");
                                let e = this.statExtData(o.extData);
                                B.information("trackEvent", "download_leftpanel", o.statId, e), p.XLStatNS.trackEvent("download_leftpanel", o.statId, "", 0, 0, 0, 0, e)
                            }
                            o.statId = void 0, t(e)
                        })), n = {
                            type: o.type,
                            label: o.label,
                            enabled: o.enabled,
                            icon: o.icon,
                            id: o.id,
                            checked: o.checked,
                            click: o.click
                        }
                    }
                    null !== n && i.push(n)
                }
            }
            return i
        }

        buildMenuTemplate(e) {
            let t = [];
            for (let i = 0; i < e.length; i++) {
                let o = null, a = e[i];
                if (!D.isBoolean(a.visible) || a.visible) {
                    if ("submenu" === a.type) {
                        let e = this.buildMenuTemplate(a.submenu);
                        o = {type: a.type, label: a.label, submenu: e}
                    } else o = "separator" === a.type ? {type: a.type} : {
                        type: a.type,
                        label: a.label,
                        enabled: a.enabled,
                        icon: a.icon,
                        id: a.id,
                        checked: a.checked,
                        click: (...e) => n(this, void 0, void 0, function* () {
                            if ("function" != typeof a.click) {
                                if (void 0 !== a.statId && "" !== a.statId) {
                                    void 0 === a.extData && (a.extData = "");
                                    let e = this.statExtData(a.extData);
                                    B.information("trackEvent", "download_leftpanel", a.statId, e), p.XLStatNS.trackEvent("download_leftpanel", a.statId, "", 0, 0, 0, 0, e)
                                }
                                yield this.handleMenuClick(a)
                            } else a.click(...e)
                        })
                    };
                    null !== o && t.push(o)
                }
            }
            return t
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(78);
    !function (e) {
        class t {
            constructor() {
            }

            static getInstance() {
                return null === t.instance ? new t : t.instance
            }

            getQueue(e) {
                return null === t.queueMap && (t.queueMap = new Map), t.queueMap.has(e) || t.queueMap.set(e, new n.MsgQueueNS.Queue), t.queueMap.get(e)
            }
        }

        t.queueMap = null, t.instance = null, e.MsgQueue = t
    }(t.MsgQueueManagerNS || (t.MsgQueueManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(20), r = i(406), s = i(4), l = i(11), d = i(16), u = i(44), c = i(48), h = i(0), f = i(3),
        p = i(57), g = i(40), m = i(67), v = i(14), y = i(31), T = i(68), w = i(25), k = i(17), C = i(513), b = i(8),
        I = l.DownloadKernelTaskManager.getTaskManager(), S = d.DownloadKernelEventManager.getEventManager(),
        _ = u.DownloadKernelCategoryViewManager.getCategoryViewManager(), D = h.default.getLogger("ShouleiSync"),
        A = 1e4, N = 12e4 / A;
    !function (e) {
        class t {
            constructor(e) {
                this.action = void 0, this.action = e
            }

            getAction() {
                return this.action
            }
        }

        class i extends t {
            constructor() {
                super("sync")
            }

            execute() {
                return n(this, void 0, void 0, function* () {
                    return this.report(yield this.getSyncTaskDatas()), !0
                })
            }

            report(e) {
                p.fetchSlRes({url: "/xlppc.downloadlist.sync/api/list", data: e, method: "post"}).catch()
            }

            getTaskStatus(e) {
                let t = "pause";
                switch (e) {
                    case s.DownloadKernel.TaskStatus.StartWaiting:
                        t = "waiting";
                        break;
                    case s.DownloadKernel.TaskStatus.Started:
                        t = "downloading";
                        break;
                    case s.DownloadKernel.TaskStatus.Failed:
                        t = "fail";
                        break;
                    case s.DownloadKernel.TaskStatus.StopPending:
                    case s.DownloadKernel.TaskStatus.Stopped:
                        t = "pause";
                        break;
                    case s.DownloadKernel.TaskStatus.Succeeded:
                    case s.DownloadKernel.TaskStatus.Seeding:
                        t = "complete"
                }
                return t
            }

            getTaskCategory(e) {
                let t;
                switch (e) {
                    case s.DownloadKernel.CategroyViewID.Downloading:
                        t = "downloading";
                        break;
                    case s.DownloadKernel.CategroyViewID.Completed:
                        t = "complete"
                }
                return t
            }

            getSyncTaskDatas() {
                return n(this, void 0, void 0, function* () {
                    let e = [], t = _.getCategoryViewFromId(s.DownloadKernel.CategroyViewID.Downloading),
                        n = _.getCategoryViewFromId(s.DownloadKernel.CategroyViewID.Completed), o = t.getTasks(),
                        a = n.getTasks(), r = [...o.values(), ...a.values()];
                    r.sort((e, t) => t.getTaskAttribute(s.DownloadKernel.TaskAttribute.CreateTime) - e.getTaskAttribute(s.DownloadKernel.TaskAttribute.CreateTime)), r = r.filter(e => {
                        let t = e.getType();
                        return t !== s.DownloadKernel.TaskType.Group && t !== s.DownloadKernel.TaskType.Unkown
                    });
                    let l = 0;
                    for (let t = 0; t < r.length && l < i.maxSyncCount; ++t) {
                        let i, n, o, a = r[t], d = a.getTaskBaseInfo(),
                            u = a.getTaskAttribute(s.DownloadKernel.TaskAttribute.CategoryViewId);
                        if (u !== s.DownloadKernel.CategroyViewID.Completed || (yield g.TaskCtrlOperatorNS.isExistTaskFile(d))) {
                            if (d.taskType === s.DownloadKernel.TaskType.Bt) {
                                i = "bt";
                                let e = a.getExtraObject();
                                o = e.getInfoId();
                                let t = e.getFileCount();
                                n = "";
                                for (let i = 0; i < t; ++i) {
                                    let t = e.getBtFileByRealIndex(i);
                                    t && 1 === t.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.Download) ? n += "1" : n += "0"
                                }
                            } else i = "url", o = d.url;
                            e.push({
                                task_id: String(d.taskId),
                                task_type: i,
                                name: d.taskName,
                                link: o,
                                source: d.origin,
                                source_url: d.url,
                                index: n,
                                status: this.getTaskStatus(d.taskStatus),
                                error_code: d.errorCode,
                                category: this.getTaskCategory(u),
                                speed: d.downloadSpeed,
                                total_size: a.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize),
                                download_size: a.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize)
                            }), ++l
                        }
                    }
                    return D.information("taskInfos", e), JSON.stringify(e)
                })
            }
        }

        i.maxSyncCount = 100;

        class l extends t {
            constructor(e) {
                super("add"), this.taskList = null, this.magnetTaskIdMap = null, this.taskList = e, this.magnetTaskIdMap = new Map
            }

            execute() {
                return n(this, void 0, void 0, function* () {
                    return yield this.batchCreateTask(), !0
                })
            }

            doRepeatTasks(e, t) {
                return n(this, void 0, void 0, function* () {
                    for (let i = 0; i < e.length; ++i) {
                        let n = e[i], o = n.getType(), a = null;
                        for (let e = t.length - 1; e >= 0; --e) {
                            let i = t[e];
                            if (i.dk_task_type === o) if (o === s.DownloadKernel.TaskType.Bt) {
                                let o = n.getExtraObject();
                                if (i.link.toLocaleLowerCase() === o.getInfoId().toLocaleLowerCase()) {
                                    a = i, t.splice(e, 1);
                                    continue
                                }
                            } else if (o === s.DownloadKernel.TaskType.Emule) {
                                let o = n.getExtraObject();
                                if (i.ed2k_hash.toLocaleLowerCase() === o.getFileHash().toLocaleLowerCase()) {
                                    a = i, t.splice(e, 1);
                                    continue
                                }
                            } else if (o === s.DownloadKernel.TaskType.P2sp && i.link.toLocaleLowerCase() === n.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskUrl).toLocaleLowerCase()) {
                                a = i, t.splice(e, 1);
                                continue
                            }
                        }
                        if (a && -1 === n.getTaskAttribute(s.DownloadKernel.TaskAttribute.CategoryId)) {
                            if (o === s.DownloadKernel.TaskType.Bt) {
                                let e = n.getExtraObject(), t = e.getFileCount(), i = "";
                                for (let n = 0; n < t; ++n) {
                                    let t = e.getBtFileByRealIndex(n);
                                    t && 1 === t.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.Download) ? i += "1" : i += "0", t && s.DownloadKernel.BtFileStatus.Complete === t.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileStatus) && "1" !== a.index[n] && (a.index = a.index.substr(0, n) + "1" + a.index.substr(n + 1))
                                }
                                if (i !== a.index) {
                                    let t = [];
                                    for (let i = 0; i < a.index.length; ++i) if ("1" === a.index[i]) t.push(i); else {
                                        let n = e.getBtFileByRealIndex(i);
                                        s.DownloadKernel.BtFileStatus.Complete === n.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileStatus) && t.push(i)
                                    }
                                    let i = n.getId();
                                    (yield I.downloadTaskSelectFiles(i, JSON.stringify(t))) && (yield c.DownloadDispatchNS.startTask(i));
                                    continue
                                }
                            }
                            let e = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.CategoryViewId);
                            e === s.DownloadKernel.CategroyViewID.Downloading ? yield c.DownloadDispatchNS.startTask(n.getId()) : e === s.DownloadKernel.CategroyViewID.Completed ? (yield g.TaskCtrlOperatorNS.isExistTaskFile(n.getTaskBaseInfo())) || (yield this.reDownloadTask(n, a)) : e === s.DownloadKernel.CategroyViewID.Recycle && (yield this.reDownloadTask(n, a))
                        }
                    }
                })
            }

            reDownloadTask(e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = {
                        taskBaseInfo: {savePath: void 0, taskName: void 0, origin: t.source},
                        p2spTaskInfo: {url: void 0}
                    }, n = yield I.reDownloadTask(e.getId(), i);
                    if (null !== n) {
                        let e = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId);
                        yield c.DownloadDispatchNS.startTask(e)
                    }
                })
            }

            btRepeatDeleteExist(e) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (void 0 === e) break;
                        if (null === e) break;
                        for (let t of e) yield b.FileSystemAWNS.unlinkAW(t.fullPath)
                    } while (0)
                })
            }

            batchCreateTask() {
                return n(this, void 0, void 0, function* () {
                    let e = [];
                    for (let t = 0; t < this.taskList.length; t++) {
                        let i = this.taskList[t];
                        if (!i || !i.task_type || !i.link) {
                            D.warning("invalid taskData!", i), this.taskList.splice(t, 1);
                            continue
                        }
                        if ("bt" === i.task_type && !i.index) {
                            D.warning("invalid bt task, no index!", i), this.taskList.splice(t, 1);
                            continue
                        }
                        let n, o = s.DownloadKernel.TaskType.Unkown;
                        if ((o = "bt" === i.task_type ? s.DownloadKernel.TaskType.Bt : y.ThunderHelper.getTaskTypeFromUrl(i.link)) !== s.DownloadKernel.TaskType.Unkown) {
                            if (o === s.DownloadKernel.TaskType.Emule) {
                                let e = T.ParseUrlFileNameNS.parseEd2kUrl(i.link);
                                i.ed2k_hash = e.fileHash, n = e.fileHash
                            } else o !== s.DownloadKernel.TaskType.P2sp && o !== s.DownloadKernel.TaskType.Bt || (n = i.link);
                            !n || n.length <= 0 ? (D.warning("findInfo unknown value!", i, o), this.taskList.splice(t, 1)) : (i.dk_task_type = o, e.push({
                                taskType: o,
                                value: n
                            }), ++t)
                        } else D.warning("unknown task type!", i.link), this.taskList.splice(t, 1)
                    }
                    let t = [...this.taskList], i = yield m.TaskUtilitiesAWNS.batchFindTaskAW(e);
                    if (D.information("repeatTasks", i), i.length > 0 && (yield this.doRepeatTasks(i, t)), D.information("newTaskDatas", t), t.length > 0) {
                        let e = [], i = v.ThunderUtil.getDefaultDownloadDir(), a = [];
                        for (let n = 0; n < t.length; ++n) {
                            let o = t[n];
                            if (o.dk_task_type === s.DownloadKernel.TaskType.Bt) e.push(o); else {
                                let e = g.TaskCtrlOperatorNS.constructProductInfo(""), t = {
                                    taskName: T.ParseUrlFileNameNS.getNameFromUrl(o.link),
                                    savePath: i,
                                    productInfo: e,
                                    origin: o.source
                                }, n = {taskType: o.dk_task_type, taskBaseInfo: t};
                                o.dk_task_type === s.DownloadKernel.TaskType.P2sp ? (n.p2spTaskInfo = {
                                    url: o.link,
                                    cookie: o.cookie
                                }, a.push(n)) : o.dk_task_type === s.DownloadKernel.TaskType.Emule && (n.taskType = s.DownloadKernel.TaskType.Emule, n.emuleTaskInfo = {url: o.link}, a.push(n))
                            }
                        }
                        if (a.length > 0) {
                            D.information("createBatchTask newTaskInfos", a);
                            let e = yield I.createBatchTask(a);
                            if (D.information("createBatchTask tasks", e), e.length > 0) {
                                let t = [];
                                e.forEach(e => {
                                    t.push(e.getId())
                                }), D.information("startTasks taskIds", t), yield c.DownloadDispatchNS.startTasks(t)
                            }
                        }
                        e.length > 0 && (D.information("btNewTasks", e), e.forEach(e => n(this, void 0, void 0, function* () {
                            let t = (e, t, a) => n(this, void 0, void 0, function* () {
                                    do {
                                        if (t) {
                                            let t = I.getTaskFromTaskId(e);
                                            if (!t) {
                                                D.warning("getTaskFromTaskId failed!", e);
                                                break
                                            }
                                            let n = t.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath),
                                                a = t.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName),
                                                r = o.join(n, a), l = yield m.TaskUtilitiesAWNS.parserBtFileInfoAW(r);
                                            if (null === l) {
                                                D.warning("parserBtFileInfoAW!", r);
                                                break
                                            }
                                            let d = this.magnetTaskIdMap.get(e);
                                            if (d) {
                                                let e = g.TaskCtrlOperatorNS.constructProductInfo(""),
                                                    t = {savePath: i, taskName: l.title, productInfo: e, origin: d.source},
                                                    o = [];
                                                for (let e = 0; e < l.fileLists.length; ++e) "1" === d.index[e] && o.push(l.fileLists[e].realIndex);
                                                let a = yield g.TaskCtrlOperatorNS.getBtExistFilePathList(n, l, o);
                                                a.length > 0 && (yield this.btRepeatDeleteExist(a));
                                                let u = "magnet:?xt=urn:btih:" + d.link, h = {
                                                    originUrl: d.source_url || u,
                                                    seedFile: r,
                                                    displayName: l.title,
                                                    fileLists: l.fileLists,
                                                    infoId: l.infoId,
                                                    fileRealIndexLists: o,
                                                    tracker: l.trackerUrls.join("\n")
                                                }, f = {
                                                    taskType: s.DownloadKernel.TaskType.Bt,
                                                    taskBaseInfo: t,
                                                    btTaskInfo: h
                                                }, p = yield I.createTask(s.DownloadKernel.TaskType.Bt, f);
                                                if (D.information("create task magnet productinfo", e), null !== p) {
                                                    let e = p.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId);
                                                    yield c.DownloadDispatchNS.startTask(e)
                                                }
                                            }
                                        } else D.warning("onTaskFinish download magnet fialed!", e, a)
                                    } while (0);
                                    this.magnetTaskIdMap.delete(e)
                                }), a = yield v.ThunderUtil.getThunderTempPath(!0), r = "magnet:?xt=urn:btih:" + e.link,
                                l = T.ParseUrlFileNameNS.parseMagnetUrl(r) + ".torrent", d = o.join(a, l), u = {
                                    taskName: l,
                                    savePath: a,
                                    productInfo: g.TaskCtrlOperatorNS.constructProductInfo(""),
                                    origin: e.source
                                }, h = {url: r, torrentFilePath: d}, f = {
                                    taskType: s.DownloadKernel.TaskType.Magnet,
                                    taskBaseInfo: u,
                                    magnetTaskInfo: h,
                                    isBackground: !0
                                };
                            D.information("create task magnet", f);
                            let p = yield I.createTask(s.DownloadKernel.TaskType.Magnet, f);
                            if (null !== p) {
                                let i = p.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId);
                                C.MagnetListenerNS.addRef(i, t.bind(this)), this.magnetTaskIdMap.set(i, e), yield c.DownloadDispatchNS.startTask(i, !0)
                            }
                        })))
                    }
                })
            }
        }

        class d extends t {
            constructor(e, t) {
                super(e), this.taskIds = null, this.taskIds = [], t.forEach(e => {
                    this.taskIds.push(parseInt(e, 10))
                })
            }
        }

        class u extends d {
            constructor(e) {
                super("delete", e)
            }

            execute() {
                return n(this, void 0, void 0, function* () {
                    let e = !1;
                    do {
                        if (!this.taskIds || this.taskIds.length <= 0) break;
                        yield I.batchRemoveToRecycle(this.taskIds).catch(), e = !0
                    } while (0);
                    return e
                })
            }
        }

        class h extends d {
            constructor(e) {
                super("pause", e)
            }

            execute() {
                return n(this, void 0, void 0, function* () {
                    let e = !1;
                    do {
                        if (!this.taskIds || this.taskIds.length <= 0) break;
                        I.batchStopTask(this.taskIds, s.DownloadKernel.TaskStopReason.Manual), e = !0
                    } while (0);
                    return e
                })
            }
        }

        class x extends d {
            constructor(e) {
                super("continue", e)
            }

            execute() {
                return n(this, void 0, void 0, function* () {
                    let e = !1;
                    do {
                        if (!this.taskIds || this.taskIds.length <= 0) break;
                        yield c.DownloadDispatchNS.startTasks(this.taskIds), e = !0
                    } while (0);
                    return e
                })
            }
        }

        class E {
            static createCommand(e) {
                let t = null;
                switch (e.action) {
                    case"add":
                        "object" == typeof e.task_list && e.task_list.length > 0 && (t = new l(e.task_list));
                        break;
                    case"delete":
                        "object" == typeof e.task_ids && e.task_ids.length > 0 && (t = new u(e.task_ids));
                        break;
                    case"pause":
                        "object" == typeof e.task_ids && e.task_ids.length > 0 && (t = new h(e.task_ids));
                        break;
                    case"continue":
                        "object" == typeof e.task_ids && e.task_ids.length > 0 && (t = new x(e.task_ids));
                        break;
                    case"sync":
                        t = new i
                }
                return D.information("createCommand", t), t
            }
        }

        class O {
            constructor(e) {
                this.timer = null, this.heartBeatTimes = 0, this.delegate = null, this.delegate = e
            }

            start() {
                this.timer || (this.timer = setInterval(() => {
                    ++this.heartBeatTimes, this.delegate && (this.delegate.onHeartBeat(this.heartBeatTimes) || this.stop())
                }, A))
            }

            stop() {
                this.timer && (clearInterval(this.timer), this.timer = null), this.heartBeatTimes = 0
            }

            reset() {
                this.heartBeatTimes = 0, this.start()
            }
        }

        class P extends a.EventEmitter {
            constructor() {
                super(), this.syncStateEventCookie = void 0, this.logoutCookie = void 0, this.syncMessageCookie = void 0, this.taskStatusChangedCookie = void 0, this.removeCategoryCookie = void 0, this.insertToCategoryCookie = void 0, this.syncState = "offline", this.topic = "/user/me/downloadlist", this.heartBeat = null, this.delayReportTimer = null, this.heartBeat = new O(this)
            }

            enable() {
                return n(this, void 0, void 0, function* () {
                    return yield w.default.isInitedAw(), 1 === w.default.getConfigInfo("shouleiDownload", "enableSync2")
                })
            }

            init() {
                return n(this, void 0, void 0, function* () {
                    if (yield this.enable()) {
                        this.syncStateEventCookie = r.SyncMsgHelperNS.attachSyncMsgStateChangeEvent(this.onSyncMsgStateChangeEvent.bind(this));
                        let e = r.SyncMsgHelperNS.getSyncMsgState();
                        D.information("SyncMsgState", e), e === r.SyncMsgHelperNS.SyncMsgState.Connected && this.registerTopic().catch(), this.logoutCookie = k.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", this.onUserLogout.bind(this))
                    }
                })
            }

            uninit() {
                this.syncStateEventCookie && (r.SyncMsgHelperNS.detachSyncMsgStateChangeEvent(this.syncStateEventCookie), this.syncStateEventCookie = void 0), this.syncMessageCookie && (f.client.detachServerEvent("SyncMessage", this.syncMessageCookie), this.syncMessageCookie = void 0), this.delayReportTimer && (clearTimeout(this.delayReportTimer), this.delayReportTimer = null), this.detachTaskEvents(), this.logoutCookie && (k.NativeCallModule.nativeCall.DetachNativeEvent("onLogout", this.logoutCookie), this.logoutCookie = void 0)
            }

            getState() {
                return this.syncState
            }

            onHeartBeat(e) {
                if (e >= N) return "online" === this.syncState && (this.syncState = "offline", this.detachTaskEvents(), this.fireEvent("OnConnectStateChanged", this.syncState)), !1;
                return (new i).execute().then(e => {
                    D.information("onHeartBeat, sync command ret:", e)
                }).catch(), !0
            }

            attachEvent(e, t) {
                return this.on(e, t), t
            }

            attachEventOnce(e, t) {
                return this.once(e, t), t
            }

            detachEvent(e, t) {
                this.detachEvent(e, t)
            }

            fireEvent(e, ...t) {
                D.information("fireEvent", e, ...t), this.emit(e, ...t)
            }

            onSyncMsgStateChangeEvent(e, t) {
                return n(this, void 0, void 0, function* () {
                    D.information("onSyncMsgStateChangeEvent", e, t), e === r.SyncMsgHelperNS.SyncMsgState.Connected && this.registerTopic().catch()
                })
            }

            onUserLogout() {
                "online" === this.syncState && (this.syncState = "offline", this.heartBeat.stop(), this.detachTaskEvents(), this.fireEvent("OnConnectStateChanged", this.syncState))
            }

            registerTopic() {
                return n(this, void 0, void 0, function* () {
                    let e = yield f.client.callRemoteClientFunction("User", "SyncStartReceiver", this.topic);
                    D.information("receving from topics: ", e), void 0 !== e[1] ? D.information("error = ", e[1]) : (D.information("receving from topics: ", e[0]), this.syncMessageCookie || (this.syncMessageCookie = f.client.attachServerEvent("SyncMessage", this.onSyncMessage.bind(this))))
                })
            }

            onSyncMessage(e, t) {
                return n(this, void 0, void 0, function* () {
                    D.information("onSyncMessage: ", t);
                    let e = null;
                    try {
                        e = JSON.parse(t)
                    } catch (e) {
                        D.warning(e)
                    }
                    if (e && e.subject === this.topic) {
                        let t = e.data;
                        if (t) {
                            let e = null;
                            if ("sync" === t.action ? "online" === this.syncState ? this.heartBeat.reset() : (this.heartBeat.start(), this.attachTaskEvents(), this.syncState = "online", this.fireEvent("OnConnectStateChanged", this.syncState), e = E.createCommand(t)) : e = E.createCommand(t), e) {
                                let i = yield e.execute();
                                D.information("command execute ret", i, t)
                            }
                        }
                    }
                })
            }

            attachTaskEvents() {
                this.taskStatusChangedCookie || (this.taskStatusChangedCookie = S.attachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, this.onTaskStatusChanged.bind(this))), this.insertToCategoryCookie || (this.insertToCategoryCookie = S.attachTaskEvent(s.DownloadKernel.TaskEventType.InsertToCategoryView, this.onInsertToCategoryView.bind(this))), this.removeCategoryCookie || (this.removeCategoryCookie = S.attachTaskEvent(s.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.onRemoveFromCategoryView.bind(this)))
            }

            detachTaskEvents() {
                this.taskStatusChangedCookie && (S.detachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedCookie), this.taskStatusChangedCookie = void 0), this.insertToCategoryCookie && (S.detachTaskEvent(s.DownloadKernel.TaskEventType.InsertToCategoryView, this.insertToCategoryCookie), this.insertToCategoryCookie = void 0), this.removeCategoryCookie && (S.detachTaskEvent(s.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.removeCategoryCookie), this.removeCategoryCookie = void 0)
            }

            onTaskStatusChanged(e, t) {
                do {
                    if (e !== s.DownloadKernel.TaskEventType.StatusChanged || !t || t.length <= 0) break;
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (i && !(i.getTaskAttribute(s.DownloadKernel.TaskAttribute.Background) || -1 !== i.getTaskAttribute(s.DownloadKernel.TaskAttribute.CategoryId) || i.getType() === s.DownloadKernel.TaskType.Group || i.getTaskAttribute(s.DownloadKernel.TaskAttribute.GroupTaskId) > 0)) {
                            this.reportDownloadList(!0);
                            break
                        }
                    }
                } while (0)
            }

            onInsertToCategoryView(e, t, i, n) {
                do {
                    if (e !== s.DownloadKernel.TaskEventType.InsertToCategoryView) break;
                    if (void 0 === t || !i || !n || n.length <= 0) break;
                    if (i !== s.DownloadKernel.CategroyViewID.Downloading && i !== s.DownloadKernel.CategroyViewID.Completed) break;
                    this.reportDownloadList(!0)
                } while (0)
            }

            onRemoveFromCategoryView(e, t, i, n) {
                do {
                    if (e !== s.DownloadKernel.TaskEventType.RemoveFromCategoryView) break;
                    if (void 0 === t || !i || !n || n.length <= 0) break;
                    if (i !== s.DownloadKernel.CategroyViewID.Downloading && i !== s.DownloadKernel.CategroyViewID.Completed) break;
                    this.reportDownloadList(!0)
                } while (0)
            }

            reportDownloadList(e = !1) {
                if (e) {
                    this.delayReportTimer && (clearTimeout(this.delayReportTimer), this.delayReportTimer = null), (new i).execute().then(e => {
                        D.information("reportDownloadList", e)
                    }).catch()
                } else this.delayReportTimer || (this.delayReportTimer = setTimeout(() => {
                    this.delayReportTimer = null, (new i).execute().then(e => {
                        D.information("reportDownloadList", e)
                    }).catch()
                }, 1e3))
            }
        }

        e.ShouleiListSyncManager = P;
        let M = null;
        e.getMananger = function () {
            return M || (M = new P), M
        }
    }(t.ShouleiListSyncNS || (t.ShouleiListSyncNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), a = i(3), r = i(0).default.getLogger("UserHelper");
    var s;
    !function (e) {
        e.login = "OnLogin", e.logout = "OnLogout", e.authorityChanged = "OnAuthorityChanged"
    }(s = t.UserEventNS || (t.UserEventNS = {}));

    class l extends o.EventEmitter {
        constructor() {
            super(), this.mPeerId = void 0, this.mUserId = "0", this.mSessionId = void 0, this.mIsLogin = !1, this.mIsVip = !1, this.mVipLevel = 0, this.mVasType = 0, this.mIsYear = !1, this.mPreUserIsVip = !1, this.init()
        }

        init() {
            this.setMaxListeners(0), this.attachUserEvents().catch()
        }

        getPeerId() {
            return n(this, void 0, void 0, function* () {
                if (this.mPeerId) return this.mPeerId;
                {
                    let e = yield a.client.callServerFunction("GetPeerID");
                    return e && "" !== e && (this.mPeerId = e), this.mPeerId || ""
                }
            })
        }

        getSessionId() {
            return n(this, void 0, void 0, function* () {
                if (this.mSessionId) return this.mSessionId;
                {
                    let e = yield a.client.callServerFunction("GetSessionID");
                    return e && "" !== e && (this.mSessionId = e), this.mSessionId || "0"
                }
            })
        }

        getUserinfo() {
            return n(this, void 0, void 0, function* () {
                return yield a.client.callServerFunction("GetAllUserInfo")
            })
        }

        get jumpKey() {
            return ""
        }

        get userId() {
            return this.mUserId
        }

        get isLogin() {
            return this.mIsLogin
        }

        get isVip() {
            return this.mIsVip
        }

        get isPreUserIsVip() {
            return this.mPreUserIsVip
        }

        get isYear() {
            return this.mIsYear
        }

        get isPlatinumVip() {
            return this.isVip && this.vasType > 2
        }

        get isSuperVip() {
            return this.isVip && 5 === this.vasType
        }

        get vipLevel() {
            return this.mVipLevel
        }

        get vasType() {
            return this.mVasType
        }

        get userLevel() {
            return 1
        }

        get vipType() {
            let e = 0;
            return this.isSuperVip ? e = 5 : this.isPlatinumVip ? e = 3 : this.isVip && (e = 2), e
        }

        get authority() {
            return this.isVip
        }

        get offlineAuthority() {
            return this.isLogin
        }

        authorityChanged(e, t) {
            this.emit(s.authorityChanged, e, t)
        }

        attachUserEvents() {
            return n(this, void 0, void 0, function* () {
                let e = yield a.client.callServerFunction("IsLogined");
                if (null === e) {
                    let t = setInterval(() => n(this, void 0, void 0, function* () {
                        (e = yield a.client.callServerFunction("IsLogined")) && this.onLogin().catch(), null !== e && (clearInterval(t), a.client.attachServerEvent("onUserInfoChange", this.onUserInfoChange.bind(this)), a.client.attachServerEvent("onLoginStatusChange", this.onLoginStatusChange.bind(this)))
                    }), 50)
                } else e && this.onLogin().catch(), a.client.attachServerEvent("onUserInfoChange", this.onUserInfoChange.bind(this)), a.client.attachServerEvent("onLoginStatusChange", this.onLoginStatusChange.bind(this))
            })
        }

        onLogin() {
            return n(this, void 0, void 0, function* () {
                r.information("--\x3eonLogin"), this.mPreUserIsVip = this.mIsVip, this.clear(), this.mIsLogin = !0, yield this.parseUserInfo(), this.emit(s.login), this.authorityChanged(this.authority), r.information("<--onLogin")
            })
        }

        onLogout() {
            r.information("--\x3eonLogout"), this.mPreUserIsVip = this.mIsVip, this.clear(), this.emit(s.logout), this.authorityChanged(!1), r.information("<--onLogout")
        }

        onUserInfoChange(e, t, i) {
            return n(this, void 0, void 0, function* () {
                r.information("--\x3eonUserInfoChange"), "vipinfo" === t && (r.information("data", i), yield this.parseUserInfo(), this.mIsVip && this.authorityChanged(this.authority, !0)), r.information("<--onUserInfoChange")
            })
        }

        onLoginStatusChange(e, t, i) {
            r.information("--\x3eonLoginStatusChange", "newStatus", i), "unlogin" === i || "offline" === i ? this.onLogout() : "online" === i && this.onLogin().catch(), r.information("<--onLoginStatusChange")
        }

        clear() {
            this.mUserId = "0", this.mSessionId = void 0, this.mIsVip = !1, this.mIsLogin = !1, this.mVasType = 0, this.mVipLevel = 0
        }

        parseUserInfo() {
            return n(this, void 0, void 0, function* () {
                let e = yield this.getUserinfo();
                if (r.information("userinfo", e), e) if (this.mUserId = e.userID || "0", e.vipList && e.vipList[0]) {
                    if (e.vipList[0].isVip) {
                        let t = Number(e.vipList[0].isVip).valueOf();
                        this.mIsVip = t > 0
                    } else this.mIsVip = !1;
                    if (e.vipList[0].vipLevel && (this.mVipLevel = Number(e.vipList[0].vipLevel).valueOf()), e.vipList[0].vasType && (this.mVasType = Number(e.vipList[0].vasType).valueOf()), e.vipList[0].isYear) {
                        let t = Number(e.vipList[0].isYear).valueOf();
                        this.mIsYear = 1 === t
                    }
                } else this.mIsVip = !1
            })
        }
    }

    t.UserHelper = l, t.default = new l
}, function (e, t, i) {
    "use strict";
    e.exports = {
        PNG_SIGNATURE: [137, 80, 78, 71, 13, 10, 26, 10],
        TYPE_IHDR: 1229472850,
        TYPE_IEND: 1229278788,
        TYPE_IDAT: 1229209940,
        TYPE_PLTE: 1347179589,
        TYPE_tRNS: 1951551059,
        TYPE_gAMA: 1732332865,
        COLORTYPE_GRAYSCALE: 0,
        COLORTYPE_PALETTE: 1,
        COLORTYPE_COLOR: 2,
        COLORTYPE_ALPHA: 4,
        COLORTYPE_PALETTE_COLOR: 3,
        COLORTYPE_COLOR_ALPHA: 6,
        COLORTYPE_TO_BPP_MAP: {0: 1, 2: 3, 3: 1, 4: 2, 6: 4},
        GAMMA_DIVISION: 1e5
    }
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(466), o = i(343);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-tip.vue", t.default = s.exports
}, function (e, t, i) {
    (function (e) {
        var i;
        !function () {
            var n = "object" == typeof self && self.self === self && self || "object" == typeof global && global.global === global && global || this || {},
                o = n._, a = Array.prototype, r = Object.prototype,
                s = "undefined" != typeof Symbol ? Symbol.prototype : null, l = a.push, d = a.slice, u = r.toString,
                c = r.hasOwnProperty, h = Array.isArray, f = Object.keys, p = Object.create, g = function () {
                }, m = function (e) {
                    return e instanceof m ? e : this instanceof m ? void (this._wrapped = e) : new m(e)
                };
            void 0 === t || t.nodeType ? n._ = m : (void 0 !== e && !e.nodeType && e.exports && (t = e.exports = m), t._ = m), m.VERSION = "1.9.1";
            var v, y = function (e, t, i) {
                if (void 0 === t) return e;
                switch (null == i ? 3 : i) {
                    case 1:
                        return function (i) {
                            return e.call(t, i)
                        };
                    case 3:
                        return function (i, n, o) {
                            return e.call(t, i, n, o)
                        };
                    case 4:
                        return function (i, n, o, a) {
                            return e.call(t, i, n, o, a)
                        }
                }
                return function () {
                    return e.apply(t, arguments)
                }
            }, T = function (e, t, i) {
                return m.iteratee !== v ? m.iteratee(e, t) : null == e ? m.identity : m.isFunction(e) ? y(e, t, i) : m.isObject(e) && !m.isArray(e) ? m.matcher(e) : m.property(e)
            };
            m.iteratee = v = function (e, t) {
                return T(e, t, 1 / 0)
            };
            var w = function (e, t) {
                return t = null == t ? e.length - 1 : +t, function () {
                    for (var i = Math.max(arguments.length - t, 0), n = Array(i), o = 0; o < i; o++) n[o] = arguments[o + t];
                    switch (t) {
                        case 0:
                            return e.call(this, n);
                        case 1:
                            return e.call(this, arguments[0], n);
                        case 2:
                            return e.call(this, arguments[0], arguments[1], n)
                    }
                    var a = Array(t + 1);
                    for (o = 0; o < t; o++) a[o] = arguments[o];
                    return a[t] = n, e.apply(this, a)
                }
            }, k = function (e) {
                if (!m.isObject(e)) return {};
                if (p) return p(e);
                g.prototype = e;
                var t = new g;
                return g.prototype = null, t
            }, C = function (e) {
                return function (t) {
                    return null == t ? void 0 : t[e]
                }
            }, b = function (e, t) {
                return null != e && c.call(e, t)
            }, I = function (e, t) {
                for (var i = t.length, n = 0; n < i; n++) {
                    if (null == e) return;
                    e = e[t[n]]
                }
                return i ? e : void 0
            }, S = Math.pow(2, 53) - 1, _ = C("length"), D = function (e) {
                var t = _(e);
                return "number" == typeof t && t >= 0 && t <= S
            };
            m.each = m.forEach = function (e, t, i) {
                var n, o;
                if (t = y(t, i), D(e)) for (n = 0, o = e.length; n < o; n++) t(e[n], n, e); else {
                    var a = m.keys(e);
                    for (n = 0, o = a.length; n < o; n++) t(e[a[n]], a[n], e)
                }
                return e
            }, m.map = m.collect = function (e, t, i) {
                t = T(t, i);
                for (var n = !D(e) && m.keys(e), o = (n || e).length, a = Array(o), r = 0; r < o; r++) {
                    var s = n ? n[r] : r;
                    a[r] = t(e[s], s, e)
                }
                return a
            };
            var A = function (e) {
                return function (t, i, n, o) {
                    var a = arguments.length >= 3;
                    return function (t, i, n, o) {
                        var a = !D(t) && m.keys(t), r = (a || t).length, s = e > 0 ? 0 : r - 1;
                        for (o || (n = t[a ? a[s] : s], s += e); s >= 0 && s < r; s += e) {
                            var l = a ? a[s] : s;
                            n = i(n, t[l], l, t)
                        }
                        return n
                    }(t, y(i, o, 4), n, a)
                }
            };
            m.reduce = m.foldl = m.inject = A(1), m.reduceRight = m.foldr = A(-1), m.find = m.detect = function (e, t, i) {
                var n = (D(e) ? m.findIndex : m.findKey)(e, t, i);
                if (void 0 !== n && -1 !== n) return e[n]
            }, m.filter = m.select = function (e, t, i) {
                var n = [];
                return t = T(t, i), m.each(e, function (e, i, o) {
                    t(e, i, o) && n.push(e)
                }), n
            }, m.reject = function (e, t, i) {
                return m.filter(e, m.negate(T(t)), i)
            }, m.every = m.all = function (e, t, i) {
                t = T(t, i);
                for (var n = !D(e) && m.keys(e), o = (n || e).length, a = 0; a < o; a++) {
                    var r = n ? n[a] : a;
                    if (!t(e[r], r, e)) return !1
                }
                return !0
            }, m.some = m.any = function (e, t, i) {
                t = T(t, i);
                for (var n = !D(e) && m.keys(e), o = (n || e).length, a = 0; a < o; a++) {
                    var r = n ? n[a] : a;
                    if (t(e[r], r, e)) return !0
                }
                return !1
            }, m.contains = m.includes = m.include = function (e, t, i, n) {
                return D(e) || (e = m.values(e)), ("number" != typeof i || n) && (i = 0), m.indexOf(e, t, i) >= 0
            }, m.invoke = w(function (e, t, i) {
                var n, o;
                return m.isFunction(t) ? o = t : m.isArray(t) && (n = t.slice(0, -1), t = t[t.length - 1]), m.map(e, function (e) {
                    var a = o;
                    if (!a) {
                        if (n && n.length && (e = I(e, n)), null == e) return;
                        a = e[t]
                    }
                    return null == a ? a : a.apply(e, i)
                })
            }), m.pluck = function (e, t) {
                return m.map(e, m.property(t))
            }, m.where = function (e, t) {
                return m.filter(e, m.matcher(t))
            }, m.findWhere = function (e, t) {
                return m.find(e, m.matcher(t))
            }, m.max = function (e, t, i) {
                var n, o, a = -1 / 0, r = -1 / 0;
                if (null == t || "number" == typeof t && "object" != typeof e[0] && null != e) for (var s = 0, l = (e = D(e) ? e : m.values(e)).length; s < l; s++) null != (n = e[s]) && n > a && (a = n); else t = T(t, i), m.each(e, function (e, i, n) {
                    ((o = t(e, i, n)) > r || o === -1 / 0 && a === -1 / 0) && (a = e, r = o)
                });
                return a
            }, m.min = function (e, t, i) {
                var n, o, a = 1 / 0, r = 1 / 0;
                if (null == t || "number" == typeof t && "object" != typeof e[0] && null != e) for (var s = 0, l = (e = D(e) ? e : m.values(e)).length; s < l; s++) null != (n = e[s]) && n < a && (a = n); else t = T(t, i), m.each(e, function (e, i, n) {
                    ((o = t(e, i, n)) < r || o === 1 / 0 && a === 1 / 0) && (a = e, r = o)
                });
                return a
            }, m.shuffle = function (e) {
                return m.sample(e, 1 / 0)
            }, m.sample = function (e, t, i) {
                if (null == t || i) return D(e) || (e = m.values(e)), e[m.random(e.length - 1)];
                var n = D(e) ? m.clone(e) : m.values(e), o = _(n);
                t = Math.max(Math.min(t, o), 0);
                for (var a = o - 1, r = 0; r < t; r++) {
                    var s = m.random(r, a), l = n[r];
                    n[r] = n[s], n[s] = l
                }
                return n.slice(0, t)
            }, m.sortBy = function (e, t, i) {
                var n = 0;
                return t = T(t, i), m.pluck(m.map(e, function (e, i, o) {
                    return {value: e, index: n++, criteria: t(e, i, o)}
                }).sort(function (e, t) {
                    var i = e.criteria, n = t.criteria;
                    if (i !== n) {
                        if (i > n || void 0 === i) return 1;
                        if (i < n || void 0 === n) return -1
                    }
                    return e.index - t.index
                }), "value")
            };
            var N = function (e, t) {
                return function (i, n, o) {
                    var a = t ? [[], []] : {};
                    return n = T(n, o), m.each(i, function (t, o) {
                        var r = n(t, o, i);
                        e(a, t, r)
                    }), a
                }
            };
            m.groupBy = N(function (e, t, i) {
                b(e, i) ? e[i].push(t) : e[i] = [t]
            }), m.indexBy = N(function (e, t, i) {
                e[i] = t
            }), m.countBy = N(function (e, t, i) {
                b(e, i) ? e[i]++ : e[i] = 1
            });
            var x = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
            m.toArray = function (e) {
                return e ? m.isArray(e) ? d.call(e) : m.isString(e) ? e.match(x) : D(e) ? m.map(e, m.identity) : m.values(e) : []
            }, m.size = function (e) {
                return null == e ? 0 : D(e) ? e.length : m.keys(e).length
            }, m.partition = N(function (e, t, i) {
                e[i ? 0 : 1].push(t)
            }, !0), m.first = m.head = m.take = function (e, t, i) {
                return null == e || e.length < 1 ? null == t ? void 0 : [] : null == t || i ? e[0] : m.initial(e, e.length - t)
            }, m.initial = function (e, t, i) {
                return d.call(e, 0, Math.max(0, e.length - (null == t || i ? 1 : t)))
            }, m.last = function (e, t, i) {
                return null == e || e.length < 1 ? null == t ? void 0 : [] : null == t || i ? e[e.length - 1] : m.rest(e, Math.max(0, e.length - t))
            }, m.rest = m.tail = m.drop = function (e, t, i) {
                return d.call(e, null == t || i ? 1 : t)
            }, m.compact = function (e) {
                return m.filter(e, Boolean)
            };
            var E = function (e, t, i, n) {
                for (var o = (n = n || []).length, a = 0, r = _(e); a < r; a++) {
                    var s = e[a];
                    if (D(s) && (m.isArray(s) || m.isArguments(s))) if (t) for (var l = 0, d = s.length; l < d;) n[o++] = s[l++]; else E(s, t, i, n), o = n.length; else i || (n[o++] = s)
                }
                return n
            };
            m.flatten = function (e, t) {
                return E(e, t, !1)
            }, m.without = w(function (e, t) {
                return m.difference(e, t)
            }), m.uniq = m.unique = function (e, t, i, n) {
                m.isBoolean(t) || (n = i, i = t, t = !1), null != i && (i = T(i, n));
                for (var o = [], a = [], r = 0, s = _(e); r < s; r++) {
                    var l = e[r], d = i ? i(l, r, e) : l;
                    t && !i ? (r && a === d || o.push(l), a = d) : i ? m.contains(a, d) || (a.push(d), o.push(l)) : m.contains(o, l) || o.push(l)
                }
                return o
            }, m.union = w(function (e) {
                return m.uniq(E(e, !0, !0))
            }), m.intersection = function (e) {
                for (var t = [], i = arguments.length, n = 0, o = _(e); n < o; n++) {
                    var a = e[n];
                    if (!m.contains(t, a)) {
                        var r;
                        for (r = 1; r < i && m.contains(arguments[r], a); r++) ;
                        r === i && t.push(a)
                    }
                }
                return t
            }, m.difference = w(function (e, t) {
                return t = E(t, !0, !0), m.filter(e, function (e) {
                    return !m.contains(t, e)
                })
            }), m.unzip = function (e) {
                for (var t = e && m.max(e, _).length || 0, i = Array(t), n = 0; n < t; n++) i[n] = m.pluck(e, n);
                return i
            }, m.zip = w(m.unzip), m.object = function (e, t) {
                for (var i = {}, n = 0, o = _(e); n < o; n++) t ? i[e[n]] = t[n] : i[e[n][0]] = e[n][1];
                return i
            };
            var O = function (e) {
                return function (t, i, n) {
                    i = T(i, n);
                    for (var o = _(t), a = e > 0 ? 0 : o - 1; a >= 0 && a < o; a += e) if (i(t[a], a, t)) return a;
                    return -1
                }
            };
            m.findIndex = O(1), m.findLastIndex = O(-1), m.sortedIndex = function (e, t, i, n) {
                for (var o = (i = T(i, n, 1))(t), a = 0, r = _(e); a < r;) {
                    var s = Math.floor((a + r) / 2);
                    i(e[s]) < o ? a = s + 1 : r = s
                }
                return a
            };
            var P = function (e, t, i) {
                return function (n, o, a) {
                    var r = 0, s = _(n);
                    if ("number" == typeof a) e > 0 ? r = a >= 0 ? a : Math.max(a + s, r) : s = a >= 0 ? Math.min(a + 1, s) : a + s + 1; else if (i && a && s) return n[a = i(n, o)] === o ? a : -1;
                    if (o != o) return (a = t(d.call(n, r, s), m.isNaN)) >= 0 ? a + r : -1;
                    for (a = e > 0 ? r : s - 1; a >= 0 && a < s; a += e) if (n[a] === o) return a;
                    return -1
                }
            };
            m.indexOf = P(1, m.findIndex, m.sortedIndex), m.lastIndexOf = P(-1, m.findLastIndex), m.range = function (e, t, i) {
                null == t && (t = e || 0, e = 0), i || (i = t < e ? -1 : 1);
                for (var n = Math.max(Math.ceil((t - e) / i), 0), o = Array(n), a = 0; a < n; a++, e += i) o[a] = e;
                return o
            }, m.chunk = function (e, t) {
                if (null == t || t < 1) return [];
                for (var i = [], n = 0, o = e.length; n < o;) i.push(d.call(e, n, n += t));
                return i
            };
            var M = function (e, t, i, n, o) {
                if (!(n instanceof t)) return e.apply(i, o);
                var a = k(e.prototype), r = e.apply(a, o);
                return m.isObject(r) ? r : a
            };
            m.bind = w(function (e, t, i) {
                if (!m.isFunction(e)) throw new TypeError("Bind must be called on a function");
                var n = w(function (o) {
                    return M(e, n, t, this, i.concat(o))
                });
                return n
            }), m.partial = w(function (e, t) {
                var i = m.partial.placeholder, n = function () {
                    for (var o = 0, a = t.length, r = Array(a), s = 0; s < a; s++) r[s] = t[s] === i ? arguments[o++] : t[s];
                    for (; o < arguments.length;) r.push(arguments[o++]);
                    return M(e, n, this, this, r)
                };
                return n
            }), m.partial.placeholder = m, m.bindAll = w(function (e, t) {
                var i = (t = E(t, !1, !1)).length;
                if (i < 1) throw new Error("bindAll must be passed function names");
                for (; i--;) {
                    var n = t[i];
                    e[n] = m.bind(e[n], e)
                }
            }), m.memoize = function (e, t) {
                var i = function (n) {
                    var o = i.cache, a = "" + (t ? t.apply(this, arguments) : n);
                    return b(o, a) || (o[a] = e.apply(this, arguments)), o[a]
                };
                return i.cache = {}, i
            }, m.delay = w(function (e, t, i) {
                return setTimeout(function () {
                    return e.apply(null, i)
                }, t)
            }), m.defer = m.partial(m.delay, m, 1), m.throttle = function (e, t, i) {
                var n, o, a, r, s = 0;
                i || (i = {});
                var l = function () {
                    s = !1 === i.leading ? 0 : m.now(), n = null, r = e.apply(o, a), n || (o = a = null)
                }, d = function () {
                    var d = m.now();
                    s || !1 !== i.leading || (s = d);
                    var u = t - (d - s);
                    return o = this, a = arguments, u <= 0 || u > t ? (n && (clearTimeout(n), n = null), s = d, r = e.apply(o, a), n || (o = a = null)) : n || !1 === i.trailing || (n = setTimeout(l, u)), r
                };
                return d.cancel = function () {
                    clearTimeout(n), s = 0, n = o = a = null
                }, d
            }, m.debounce = function (e, t, i) {
                var n, o, a = function (t, i) {
                    n = null, i && (o = e.apply(t, i))
                }, r = w(function (r) {
                    if (n && clearTimeout(n), i) {
                        var s = !n;
                        n = setTimeout(a, t), s && (o = e.apply(this, r))
                    } else n = m.delay(a, t, this, r);
                    return o
                });
                return r.cancel = function () {
                    clearTimeout(n), n = null
                }, r
            }, m.wrap = function (e, t) {
                return m.partial(t, e)
            }, m.negate = function (e) {
                return function () {
                    return !e.apply(this, arguments)
                }
            }, m.compose = function () {
                var e = arguments, t = e.length - 1;
                return function () {
                    for (var i = t, n = e[t].apply(this, arguments); i--;) n = e[i].call(this, n);
                    return n
                }
            }, m.after = function (e, t) {
                return function () {
                    if (--e < 1) return t.apply(this, arguments)
                }
            }, m.before = function (e, t) {
                var i;
                return function () {
                    return --e > 0 && (i = t.apply(this, arguments)), e <= 1 && (t = null), i
                }
            }, m.once = m.partial(m.before, 2), m.restArguments = w;
            var F = !{toString: null}.propertyIsEnumerable("toString"),
                L = ["valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"],
                R = function (e, t) {
                    var i = L.length, n = e.constructor, o = m.isFunction(n) && n.prototype || r, a = "constructor";
                    for (b(e, a) && !m.contains(t, a) && t.push(a); i--;) (a = L[i]) in e && e[a] !== o[a] && !m.contains(t, a) && t.push(a)
                };
            m.keys = function (e) {
                if (!m.isObject(e)) return [];
                if (f) return f(e);
                var t = [];
                for (var i in e) b(e, i) && t.push(i);
                return F && R(e, t), t
            }, m.allKeys = function (e) {
                if (!m.isObject(e)) return [];
                var t = [];
                for (var i in e) t.push(i);
                return F && R(e, t), t
            }, m.values = function (e) {
                for (var t = m.keys(e), i = t.length, n = Array(i), o = 0; o < i; o++) n[o] = e[t[o]];
                return n
            }, m.mapObject = function (e, t, i) {
                t = T(t, i);
                for (var n = m.keys(e), o = n.length, a = {}, r = 0; r < o; r++) {
                    var s = n[r];
                    a[s] = t(e[s], s, e)
                }
                return a
            }, m.pairs = function (e) {
                for (var t = m.keys(e), i = t.length, n = Array(i), o = 0; o < i; o++) n[o] = [t[o], e[t[o]]];
                return n
            }, m.invert = function (e) {
                for (var t = {}, i = m.keys(e), n = 0, o = i.length; n < o; n++) t[e[i[n]]] = i[n];
                return t
            }, m.functions = m.methods = function (e) {
                var t = [];
                for (var i in e) m.isFunction(e[i]) && t.push(i);
                return t.sort()
            };
            var B = function (e, t) {
                return function (i) {
                    var n = arguments.length;
                    if (t && (i = Object(i)), n < 2 || null == i) return i;
                    for (var o = 1; o < n; o++) for (var a = arguments[o], r = e(a), s = r.length, l = 0; l < s; l++) {
                        var d = r[l];
                        t && void 0 !== i[d] || (i[d] = a[d])
                    }
                    return i
                }
            };
            m.extend = B(m.allKeys), m.extendOwn = m.assign = B(m.keys), m.findKey = function (e, t, i) {
                t = T(t, i);
                for (var n, o = m.keys(e), a = 0, r = o.length; a < r; a++) if (t(e[n = o[a]], n, e)) return n
            };
            var U, V, K = function (e, t, i) {
                return t in i
            };
            m.pick = w(function (e, t) {
                var i = {}, n = t[0];
                if (null == e) return i;
                m.isFunction(n) ? (t.length > 1 && (n = y(n, t[1])), t = m.allKeys(e)) : (n = K, t = E(t, !1, !1), e = Object(e));
                for (var o = 0, a = t.length; o < a; o++) {
                    var r = t[o], s = e[r];
                    n(s, r, e) && (i[r] = s)
                }
                return i
            }), m.omit = w(function (e, t) {
                var i, n = t[0];
                return m.isFunction(n) ? (n = m.negate(n), t.length > 1 && (i = t[1])) : (t = m.map(E(t, !1, !1), String), n = function (e, i) {
                    return !m.contains(t, i)
                }), m.pick(e, n, i)
            }), m.defaults = B(m.allKeys, !0), m.create = function (e, t) {
                var i = k(e);
                return t && m.extendOwn(i, t), i
            }, m.clone = function (e) {
                return m.isObject(e) ? m.isArray(e) ? e.slice() : m.extend({}, e) : e
            }, m.tap = function (e, t) {
                return t(e), e
            }, m.isMatch = function (e, t) {
                var i = m.keys(t), n = i.length;
                if (null == e) return !n;
                for (var o = Object(e), a = 0; a < n; a++) {
                    var r = i[a];
                    if (t[r] !== o[r] || !(r in o)) return !1
                }
                return !0
            }, U = function (e, t, i, n) {
                if (e === t) return 0 !== e || 1 / e == 1 / t;
                if (null == e || null == t) return !1;
                if (e != e) return t != t;
                var o = typeof e;
                return ("function" === o || "object" === o || "object" == typeof t) && V(e, t, i, n)
            }, V = function (e, t, i, n) {
                e instanceof m && (e = e._wrapped), t instanceof m && (t = t._wrapped);
                var o = u.call(e);
                if (o !== u.call(t)) return !1;
                switch (o) {
                    case"[object RegExp]":
                    case"[object String]":
                        return "" + e == "" + t;
                    case"[object Number]":
                        return +e != +e ? +t != +t : 0 == +e ? 1 / +e == 1 / t : +e == +t;
                    case"[object Date]":
                    case"[object Boolean]":
                        return +e == +t;
                    case"[object Symbol]":
                        return s.valueOf.call(e) === s.valueOf.call(t)
                }
                var a = "[object Array]" === o;
                if (!a) {
                    if ("object" != typeof e || "object" != typeof t) return !1;
                    var r = e.constructor, l = t.constructor;
                    if (r !== l && !(m.isFunction(r) && r instanceof r && m.isFunction(l) && l instanceof l) && "constructor" in e && "constructor" in t) return !1
                }
                i = i || [], n = n || [];
                for (var d = i.length; d--;) if (i[d] === e) return n[d] === t;
                if (i.push(e), n.push(t), a) {
                    if ((d = e.length) !== t.length) return !1;
                    for (; d--;) if (!U(e[d], t[d], i, n)) return !1
                } else {
                    var c, h = m.keys(e);
                    if (d = h.length, m.keys(t).length !== d) return !1;
                    for (; d--;) if (c = h[d], !b(t, c) || !U(e[c], t[c], i, n)) return !1
                }
                return i.pop(), n.pop(), !0
            }, m.isEqual = function (e, t) {
                return U(e, t)
            }, m.isEmpty = function (e) {
                return null == e || (D(e) && (m.isArray(e) || m.isString(e) || m.isArguments(e)) ? 0 === e.length : 0 === m.keys(e).length)
            }, m.isElement = function (e) {
                return !(!e || 1 !== e.nodeType)
            }, m.isArray = h || function (e) {
                return "[object Array]" === u.call(e)
            }, m.isObject = function (e) {
                var t = typeof e;
                return "function" === t || "object" === t && !!e
            }, m.each(["Arguments", "Function", "String", "Number", "Date", "RegExp", "Error", "Symbol", "Map", "WeakMap", "Set", "WeakSet"], function (e) {
                m["is" + e] = function (t) {
                    return u.call(t) === "[object " + e + "]"
                }
            }), m.isArguments(arguments) || (m.isArguments = function (e) {
                return b(e, "callee")
            });
            var G = n.document && n.document.childNodes;
            "function" != typeof /./ && "object" != typeof Int8Array && "function" != typeof G && (m.isFunction = function (e) {
                return "function" == typeof e || !1
            }), m.isFinite = function (e) {
                return !m.isSymbol(e) && isFinite(e) && !isNaN(parseFloat(e))
            }, m.isNaN = function (e) {
                return m.isNumber(e) && isNaN(e)
            }, m.isBoolean = function (e) {
                return !0 === e || !1 === e || "[object Boolean]" === u.call(e)
            }, m.isNull = function (e) {
                return null === e
            }, m.isUndefined = function (e) {
                return void 0 === e
            }, m.has = function (e, t) {
                if (!m.isArray(t)) return b(e, t);
                for (var i = t.length, n = 0; n < i; n++) {
                    var o = t[n];
                    if (null == e || !c.call(e, o)) return !1;
                    e = e[o]
                }
                return !!i
            }, m.noConflict = function () {
                return n._ = o, this
            }, m.identity = function (e) {
                return e
            }, m.constant = function (e) {
                return function () {
                    return e
                }
            }, m.noop = function () {
            }, m.property = function (e) {
                return m.isArray(e) ? function (t) {
                    return I(t, e)
                } : C(e)
            }, m.propertyOf = function (e) {
                return null == e ? function () {
                } : function (t) {
                    return m.isArray(t) ? I(e, t) : e[t]
                }
            }, m.matcher = m.matches = function (e) {
                return e = m.extendOwn({}, e), function (t) {
                    return m.isMatch(t, e)
                }
            }, m.times = function (e, t, i) {
                var n = Array(Math.max(0, e));
                t = y(t, i, 1);
                for (var o = 0; o < e; o++) n[o] = t(o);
                return n
            }, m.random = function (e, t) {
                return null == t && (t = e, e = 0), e + Math.floor(Math.random() * (t - e + 1))
            }, m.now = Date.now || function () {
                return (new Date).getTime()
            };
            var W = {"&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#x27;", "`": "&#x60;"},
                j = m.invert(W), H = function (e) {
                    var t = function (t) {
                        return e[t]
                    }, i = "(?:" + m.keys(e).join("|") + ")", n = RegExp(i), o = RegExp(i, "g");
                    return function (e) {
                        return e = null == e ? "" : "" + e, n.test(e) ? e.replace(o, t) : e
                    }
                };
            m.escape = H(W), m.unescape = H(j), m.result = function (e, t, i) {
                m.isArray(t) || (t = [t]);
                var n = t.length;
                if (!n) return m.isFunction(i) ? i.call(e) : i;
                for (var o = 0; o < n; o++) {
                    var a = null == e ? void 0 : e[t[o]];
                    void 0 === a && (a = i, o = n), e = m.isFunction(a) ? a.call(e) : a
                }
                return e
            };
            var z = 0;
            m.uniqueId = function (e) {
                var t = ++z + "";
                return e ? e + t : t
            }, m.templateSettings = {
                evaluate: /<%([\s\S]+?)%>/g,
                interpolate: /<%=([\s\S]+?)%>/g,
                escape: /<%-([\s\S]+?)%>/g
            };
            var X = /(.)^/, q = {"'": "'", "\\": "\\", "\r": "r", "\n": "n", "\u2028": "u2028", "\u2029": "u2029"},
                Y = /\\|'|\r|\n|\u2028|\u2029/g, J = function (e) {
                    return "\\" + q[e]
                };
            m.template = function (e, t, i) {
                !t && i && (t = i), t = m.defaults({}, t, m.templateSettings);
                var n,
                    o = RegExp([(t.escape || X).source, (t.interpolate || X).source, (t.evaluate || X).source].join("|") + "|$", "g"),
                    a = 0, r = "__p+='";
                e.replace(o, function (t, i, n, o, s) {
                    return r += e.slice(a, s).replace(Y, J), a = s + t.length, i ? r += "'+\n((__t=(" + i + "))==null?'':_.escape(__t))+\n'" : n ? r += "'+\n((__t=(" + n + "))==null?'':__t)+\n'" : o && (r += "';\n" + o + "\n__p+='"), t
                }), r += "';\n", t.variable || (r = "with(obj||{}){\n" + r + "}\n"), r = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + r + "return __p;\n";
                try {
                    n = new Function(t.variable || "obj", "_", r)
                } catch (e) {
                    throw e.source = r, e
                }
                var s = function (e) {
                    return n.call(this, e, m)
                }, l = t.variable || "obj";
                return s.source = "function(" + l + "){\n" + r + "}", s
            }, m.chain = function (e) {
                var t = m(e);
                return t._chain = !0, t
            };
            var Z = function (e, t) {
                return e._chain ? m(t).chain() : t
            };
            m.mixin = function (e) {
                return m.each(m.functions(e), function (t) {
                    var i = m[t] = e[t];
                    m.prototype[t] = function () {
                        var e = [this._wrapped];
                        return l.apply(e, arguments), Z(this, i.apply(m, e))
                    }
                }), m
            }, m.mixin(m), m.each(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function (e) {
                var t = a[e];
                m.prototype[e] = function () {
                    var i = this._wrapped;
                    return t.apply(i, arguments), "shift" !== e && "splice" !== e || 0 !== i.length || delete i[0], Z(this, i)
                }
            }), m.each(["concat", "join", "slice"], function (e) {
                var t = a[e];
                m.prototype[e] = function () {
                    return Z(this, t.apply(this._wrapped, arguments))
                }
            }), m.prototype.value = function () {
                return this._wrapped
            }, m.prototype.valueOf = m.prototype.toJSON = m.prototype.value, m.prototype.toString = function () {
                return String(this._wrapped)
            }, void 0 === (i = function () {
                return m
            }.apply(t, [])) || (e.exports = i)
        }()
    }).call(this, i(970)(e))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), t.information = function (...e) {
    }, t.error = function (...e) {
    }, t.warning = function (...e) {
    }, t.critical = function (...e) {
    }, t.verbose = function (...e) {
    }, "development" === process.env.LOGGER_ENV && (t.information = function (...e) {
        console.log("information", e)
    }, t.error = function (...e) {
        console.log("error", e)
    }, t.warning = function (...e) {
        console.log("warning", e)
    }, t.critical = function (...e) {
        console.log("critical", e)
    }, t.verbose = function (...e) {
        console.log("verbose", e)
    })
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.msgIPCCommunicatorForward = "ipc_communicator_forward", e.msgIPCSendToMain = "ipc_send_to_main", e.msgIPCSendToRenderer = "ipc_send_to_renderer", e.msgIPCRendererConnect = "ipc_renderer_connect", e.msgIPCRendererDisconnect = "ipc_renderer_disconnect", e.msgNCCallNativeFunction = "nc_call_native_function", e.msgNCCheckNativeFunction = "nc_check_native_function", e.msgNCCallJsFunctionById = "nc_call_js_function_by_id", e.msgNCCallJsFunctionByName = "nc_call_js_function_by_name", e.msgNCNativeFireEvent = "nc_native_fire_event", e.msgNCNativeCallReady = "nc_native_call_ready"
    }(t.CommonIPCMessage || (t.CommonIPCMessage = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), t.information = ((...e) => {
    }), t.error = ((...e) => {
    }), t.warning = ((...e) => {
    }), t.critical = ((...e) => {
    }), t.verbose = ((...e) => {
    })
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(609), a = i(5), r = i(32), s = n.default.getLogger("DownloadKernel.TaskUserData");
    t.TaskUserData = class {
        constructor(e, t) {
            this.userData = new o.BencodeMap.BencodeMap, s.information("new TaskUserData userData:", t), this.task = e, this.userData.decode(t)
        }

        getTask() {
            return this.task
        }

        setTaskPriorityLevel(e, t) {
            r.ThunderKernel.setTaskPriorityLevel(this.task.getId(), e, t)
        }

        setUserData(e, t, i) {
            let n = !1;
            if (!e || 38 !== e.length) return s.warning("setUserData invalid userGuid:", e), n;
            let o = this.userData.addMapItem("UserData").addMapItem(e);
            if (a.isNumber(i) ? (n = o.addItem(t, i), s.information("addItem number key:", t, ", value:", i)) : a.isString(i) ? (n = o.addItem(t, i), s.information("addItem string key:", t, ", value:", i)) : a.isObject(i) ? (n = o.addItem(t, i), s.information("addItem map key:", t, ", value:", i)) : s.information("addItem not support value type. key:", t, ", value:", i), n) {
                let e = "";
                e = this.userData.encode(e), s.information("bencodingUserData:", e), r.ThunderKernel.saveTaskUserData(this.task.getTaskBaseInfo().taskId, e)
            }
            return n
        }

        getUserData(e, t) {
            if (!e || 38 !== e.length) return void s.warning("getUserData invalid userGuid:", e);
            let i = this.userData.getItem("UserData");
            if (!i) return;
            let n = i.getItem(e);
            if (!n) return;
            if (!t) return n.getValue();
            let a = n.getItem(t);
            if (a) switch (a.getType()) {
                case o.BencodeMap.BencodeDataType.Integer:
                case o.BencodeMap.BencodeDataType.String:
                case o.BencodeMap.BencodeDataType.List:
                case o.BencodeMap.BencodeDataType.Map:
                    return a.getValue()
            }
        }

        getAllUserData() {
            return this.userData.encode("")
        }

        setAllUserData(e) {
            this.userData.decode(e);
            let t = "";
            t = this.userData.encode(t), r.ThunderKernel.saveTaskUserData(this.task.getTaskBaseInfo().taskId, t)
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(17), o = i(3), a = i(14), r = i(9), s = i(0);
    let {isDef: l, isUndef: d} = a.ThunderUtil;
    const u = s.default.getLogger("login-option");
    !function (e) {
        let t;
        !function (e) {
            e[e.Low = 0] = "Low", e[e.High = 1] = "High"
        }(t = e.Priority || (e.Priority = {}));
        e.loginOption = new class {
            constructor() {
                this.eventListener = !1, this.onLoginSucCookie = 0, this.onLoginFailedCookie = 0, this.option = null
            }

            setOption(e) {
                u.information("option", e);
                do {
                    if (d(e)) break;
                    if (e.priority = e.priority || t.Low, l(this.option) && e.priority <= this.option.priority) break;
                    this.option = e
                } while (0)
            }

            getOption() {
                return this.option
            }

            attachListenerEvent() {
                do {
                    if (d(this.option)) break;
                    if (!1 === this.eventListener) {
                        this.eventListener = !0;
                        let e = "logtype=client";
                        l(this.option.stat) && l(this.option.stat.logfrom) && (e = e + ",logfrom=" + this.option.stat.logfrom), r.XLStatNS.trackEvent("user_info", "loginpanel_show", "", 0, 0, 0, 0, e), this.onLoginSucCookie = n.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", () => {
                            this.eventListener = !1, this.detachListenerEvent(), l(this.option.tabUrl) && "" !== this.option.tabUrl && o.client.callServerFunction("OpenNewTab", this.option.tabUrl).catch()
                        }), this.onLoginFailedCookie = n.NativeCallModule.nativeCall.AttachNativeEvent("onLoginFailed", (t, i) => {
                            "close" === i && (this.option.perpetual || (this.option = null), r.XLStatNS.trackEvent("user_info", "loginpanel_close", "", 0, 0, 0, 0, e)), this.eventListener = !1, this.detachListenerEvent()
                        })
                    }
                } while (0)
            }

            detachListenerEvent() {
                n.NativeCallModule.nativeCall.DetachNativeEvent("onLoginSuc", this.onLoginSucCookie), n.NativeCallModule.nativeCall.DetachNativeEvent("onLoginFailed", this.onLoginFailedCookie)
            }
        }
    }(t.LoginOptionNS || (t.LoginOptionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(31), a = i(4), r = i(10), s = i(59);
    !function (e) {
        let t;

        function i(e, i) {
            let n = {sortBy: t.Default, asce: !0};
            do {
                if (void 0 === e || null === e) break;
                let o = "", s = "";
                if (e === a.DownloadKernel.CategroyViewID.Downloading) -1 === i ? (o = "CategoryViewId1_SortAttr", s = "CategoryViewId1_SortState") : (o = "CategoryViewId4_SortAttr", s = "CategoryViewId4_SortState"); else if (e === a.DownloadKernel.CategroyViewID.Completed) -1 === i ? (o = "CategoryViewId2_SortAttr", s = "CategoryViewId2_SortState") : (o = "CategoryViewId5_SortAttr", s = "CategoryViewId5_SortState"); else {
                    if (e !== a.DownloadKernel.CategroyViewID.Recycle) break;
                    o = "CategoryViewId3_SortAttr", s = "CategoryViewId3_SortState"
                }
                let l = r.ConfigNS.getValue("TaskList", o, t.Default);
                e !== a.DownloadKernel.CategroyViewID.Downloading && (l !== t.ByProgress && l !== t.ByState || (l = t.Default));
                let d = 0 === r.ConfigNS.getValue("TaskList", s, -1);
                n.sortBy = l, n.asce = d
            } while (0);
            return n
        }

        function l(e, t, i) {
            do {
                if (void 0 === t || null === t) break;
                let n = "", o = "";
                if (t === a.DownloadKernel.CategroyViewID.Downloading) -1 === i ? (n = "CategoryViewId1_SortAttr", o = "CategoryViewId1_SortState") : (n = "CategoryViewId4_SortAttr", o = "CategoryViewId4_SortState"); else if (t === a.DownloadKernel.CategroyViewID.Completed) -1 === i ? (n = "CategoryViewId2_SortAttr", o = "CategoryViewId2_SortState") : (n = "CategoryViewId5_SortAttr", o = "CategoryViewId5_SortState"); else {
                    if (t !== a.DownloadKernel.CategroyViewID.Recycle) break;
                    n = "CategoryViewId3_SortAttr", o = "CategoryViewId3_SortState"
                }
                r.ConfigNS.setValue("TaskList", n, e.sortBy);
                let s = e.asce ? 0 : -1;
                r.ConfigNS.setValue("TaskList", o, s)
            } while (0)
        }

        function d(e, t) {
            let i = null;
            return e === a.DownloadKernel.CategroyViewID.Downloading ? i = ((e, i) => {
                let n = e.createTime, o = i.createTime;
                return t ? n - o : o - n
            }) : e === a.DownloadKernel.CategroyViewID.Completed ? i = ((e, i) => {
                let n = e.completionTime, o = i.completionTime;
                return t ? n - o : o - n
            }) : e === a.DownloadKernel.CategroyViewID.Recycle && (i = ((e, i) => {
                let n = e.recycleTime, o = i.recycleTime;
                return t ? n - o : o - n
            })), i
        }

        function u(e) {
            return (t, i) => {
                let o = t.taskType, a = i.taskType;
                if (e) {
                    if (o === a) {
                        let e = n.extname(t.taskName).toLowerCase(), o = n.extname(i.taskName).toLowerCase();
                        return e === o ? 0 : e < o ? -1 : 1
                    }
                    return o - a
                }
                if (o === a) {
                    let e = n.extname(t.taskName).toLowerCase(), o = n.extname(i.taskName).toLowerCase();
                    return e === o ? 0 : e < o ? 1 : -1
                }
                return a - o
            }
        }

        function c(e) {
            return (t, i) => {
                let n = t.fileSize, o = i.fileSize;
                return e ? n - o : o - n
            }
        }

        function h(e) {
            return (t, i) => {
                let n = t.taskName, a = i.taskName;
                return e ? o.ThunderHelper.compareStr(a, n) : o.ThunderHelper.compareStr(n, a)
            }
        }

        function f(e) {
            return (t, i) => {
                let n = s.TaskStatusHelper.getValueForSort(t), o = s.TaskStatusHelper.getValueForSort(i);
                return e ? n - o : o - n
            }
        }

        function p(e) {
            return (t, i) => {
                if (0 === t.fileSize && i.fileSize > 0) return e ? -1 : 1;
                if (t.fileSize > 0 && 0 === i.fileSize) return e ? 1 : -1;
                if (0 === t.fileSize && 0 === i.fileSize) return 0;
                {
                    let n = t.downloadSize / t.fileSize, o = i.downloadSize / i.fileSize;
                    return e ? n - o : o - n
                }
            }
        }

        function g(e, n, o) {
            let a = null;
            void 0 !== o && null !== o || (o = i(e, n));
            do {
                if (o.sortBy === t.Default) {
                    a = d(e, !1);
                    break
                }
                if (o.sortBy === t.ByTime_Creation || o.sortBy === t.ByTime_Completion || o.sortBy === t.ByTime_Remain) {
                    a = d(e, o.asce);
                    break
                }
                if (o.sortBy === t.BySize) {
                    a = c(o.asce);
                    break
                }
                if (o.sortBy === t.ByType) {
                    a = u(o.asce);
                    break
                }
                if (o.sortBy === t.ByName) {
                    a = h(o.asce);
                    break
                }
                if (o.sortBy === t.ByProgress) {
                    a = p(o.asce);
                    break
                }
                if (o.sortBy === t.ByState) {
                    a = f(o.asce);
                    break
                }
            } while (0);
            return null === a && (a = d(e, !1)), a
        }

        function m(e, t, i) {
            let n = void 0, o = void 0;
            return e === a.DownloadKernel.CategroyViewID.Downloading ? o = 0 : e === a.DownloadKernel.CategroyViewID.Completed ? o = 1 : e === a.DownloadKernel.CategroyViewID.Recycle && (o = 2), void 0 !== o && (n = {
                compareFn: g(e, t, i),
                index: o,
                categoryId: t,
                categoryViewId: e
            }), n
        }

        !function (e) {
            e[e.Default = -10] = "Default", e[e.ByTime_Remain = 14] = "ByTime_Remain", e[e.ByTime_Creation = 17] = "ByTime_Creation", e[e.ByTime_Completion = 19] = "ByTime_Completion", e[e.ByType = 16] = "ByType", e[e.ByName = 1] = "ByName", e[e.BySize = 9] = "BySize", e[e.ByProgress = 18] = "ByProgress", e[e.ByState = 10] = "ByState", e[e.ByTime = 99] = "ByTime"
        }(t = e.SortType || (e.SortType = {})), e.getSortConfig = i, e.setSortConfig = l, e.getSortFuncByConfig = g, e.getSortCommitParamByConfig = m, e.handleSortMenuClick = function (e, i, n, o, r) {
            let s = !1;
            i === t.ByTime && (i = o === a.DownloadKernel.CategroyViewID.Downloading ? t.ByTime_Creation : o === a.DownloadKernel.CategroyViewID.Completed ? t.ByTime_Completion : o === a.DownloadKernel.CategroyViewID.Recycle ? t.ByTime_Remain : t.Default), i !== t.Default && (s = void 0 === n || n), l({
                sortBy: i,
                asce: !s
            }, o, r), e(m(o, r))
        }
    }(t.SortNS || (t.SortNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(57), r = i(383), s = i(25), l = i(4), d = i(11).DownloadKernelTaskManager.getTaskManager(),
        u = o.default.getLogger("ShouleiShareLink");

    function c(e) {
        let t = "";
        do {
            t = e.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskUrl);
            let i = e.getType();
            if (i === l.DownloadKernel.TaskType.Emule || i === l.DownloadKernel.TaskType.P2sp) break;
            if (i === l.DownloadKernel.TaskType.Bt) {
                if (!t || "" === t) {
                    t = "magnet:?xt=urn:btih:" + e.getExtraObject().getInfoId()
                }
                break
            }
        } while (0);
        return t
    }

    function h(e) {
        let t = -1;
        do {
            if (e.getType() !== l.DownloadKernel.TaskType.Bt) break;
            let i = e.getExtraObject().getBtFileList();
            for (let e = 0; e < i.size; ++e) {
                let n = i.get(e);
                if (n && n.isSupportPlay()) {
                    t = e;
                    break
                }
            }
        } while (0);
        return t
    }

    function f(e) {
        let t = "";
        {
            let i = e.getType();
            if (i === l.DownloadKernel.TaskType.Emule || i === l.DownloadKernel.TaskType.P2sp) t = e.getTaskAttribute(l.DownloadKernel.TaskAttribute.Gcid); else if (i === l.DownloadKernel.TaskType.Bt) {
                t = e.getExtraObject().getInfoId()
            }
        }
        return t
    }

    function p(e, t, i = "download", o = null) {
        return n(this, void 0, void 0, function* () {
            let n = "";
            do {
                let r = c(e);
                if (!r || "" === r) break;
                let s = e.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName),
                    d = e.getTaskAttribute(l.DownloadKernel.TaskAttribute.RefUrl),
                    p = e.getTaskAttribute(l.DownloadKernel.TaskAttribute.FileSize), g = h(e), m = f(e);
                try {
                    let e = {
                        url: r,
                        title: s,
                        refUrl: d,
                        fileSize: p,
                        type: i,
                        gcid: m,
                        videobtindex: g,
                        share_from: t
                    };
                    o && (e.peerID = o.peerId, e.hostIPv4 = o.hostIp, e.tcpPort = o.tcpPort, e.udpPort = o.udpPort, e.peerCapability = o.peerCapability);
                    let l = yield a.fetchSlRes({url: "/remotestorage/wechart_set", data: e, method: "post"});
                    if (u.warning("fetchSlRes response", l), null !== l && void 0 !== l && 200 === l.status && null !== l.data && void 0 !== l.data) {
                        let e = l.data;
                        "ok" === e.result && "" !== e.storid && (n = e.storid)
                    }
                } catch (e) {
                    u.warning("fetchSlRes failed!", e)
                }
            } while (0);
            return n
        })
    }

    function g(e, t, i, o, r, s, l, d = "download", c = null) {
        return n(this, void 0, void 0, function* () {
            let n = "";
            do {
                if (!e || "" === e) break;
                try {
                    let h = {
                        url: e,
                        title: t,
                        refUrl: i,
                        fileSize: o,
                        type: d,
                        gcid: r,
                        videobtindex: s,
                        share_from: l
                    };
                    c && (h.peerID = c.peerId, h.hostIPv4 = c.hostIp, h.tcpPort = c.tcpPort, h.udpPort = c.udpPort, h.peerCapability = c.peerCapability);
                    let f = yield a.fetchSlRes({url: "/remotestorage/wechart_set", data: h, method: "post"});
                    if (u.information("fetchSlRes data", h, "response", f), null !== f && void 0 !== f && 200 === f.status && null !== f.data && void 0 !== f.data) {
                        let e = f.data;
                        "ok" === e.result && "" !== e.storid && (n = e.storid)
                    }
                } catch (e) {
                    u.warning("fetchSlRes failed!", e)
                }
            } while (0);
            return n
        })
    }

    function m(e, t = "pic", i = "") {
        return n(this, void 0, void 0, function* () {
            let n = "";
            do {
                let o = d.getTaskFromTaskId(e);
                if (!o) break;
                let a = yield p(o, i);
                if (a && "" !== a) {
                    yield s.default.isInitedAw();
                    let e = s.default.getConfigInfo("shouleiDownload", "shareLink");
                    e && "" !== e || (e = "https://sl-m-ssl.xunlei.com/h5/page/download-share/index.html");
                    let r = h(o);
                    n = `${e}?entry=${t}&appType=PC&videobtindex=${r}&storid=${a}&share_from=${i}`, u.information("shareLink", n)
                }
            } while (0);
            return n
        })
    }

    function v(e, t, i, o, a, r, l = "pic", d = "") {
        return n(this, void 0, void 0, function* () {
            let n = "";
            {
                let c = yield g(e, t, i, o, a, r, d);
                if (c && "" !== c) {
                    yield s.default.isInitedAw();
                    let e = s.default.getConfigInfo("shouleiDownload", "shareLink");
                    e && "" !== e || (e = "https://sl-m-ssl.xunlei.com/h5/page/download-share/index.html"), n = `${e}?entry=${l}&appType=PC&videobtindex=${r}&storid=${c}&share_from=${d}`, u.information("shareLink", n)
                }
            }
            return n
        })
    }

    function y(e, t, i = "pic", o = "") {
        return n(this, void 0, void 0, function* () {
            let n = "";
            do {
                let a = d.getTaskFromTaskId(e);
                if (!a) break;
                let r = yield p(a, o, "file_transfer", t);
                if (r && "" !== r) {
                    yield s.default.isInitedAw();
                    let e = s.default.getConfigInfo("shouleiDownload", "fileTransferLink");
                    e && "" !== e || (e = "https://sl-m-ssl.xunlei.com/h5/page/download-share/index.html");
                    let t = h(a);
                    n = `${e}?entry=${i}&appType=PC&videobtindex=${t}&storid=${r}&share_from=${o}&pcfiletransfer=1`, u.information("shareLink", n)
                }
            } while (0);
            return n
        })
    }

    function T(e, t, i, o, a, r, l, d = "pic", c = "") {
        return n(this, void 0, void 0, function* () {
            let n = "";
            {
                let h = yield g(e, t, i, o, a, r, c, "file_transfer", l);
                if (h && "" !== h) {
                    yield s.default.isInitedAw();
                    let e = s.default.getConfigInfo("shouleiDownload", "fileTransferLink");
                    e && "" !== e || (e = "https://sl-m-ssl.xunlei.com/h5/page/download-share/index.html"), n = `${e}?entry=${d}&appType=PC&videobtindex=${r}&storid=${h}&share_from=${c}&pcfiletransfer=1`, u.information("shareLink", n)
                }
            }
            return n
        })
    }

    t.getShouleiShareLink = m, t.getShouleiShareLink2 = v, t.getShouleiShareLinkDlj = function (e, t = "pic", i = "") {
        return n(this, void 0, void 0, function* () {
            let n = "", o = yield m(e, t, i);
            return o && "" !== o && (n = yield r.getBaiduDWZ(o), u.information("GetBaiduDWZ", n)), n
        })
    }, t.getShouleiShareLinkDlj2 = function (e, t, i, o, a, s, l = "pic", d = "") {
        return n(this, void 0, void 0, function* () {
            let n = "", c = yield v(e, t, i, o, a, s, l, d);
            return c && "" !== c && (n = yield r.getBaiduDWZ(c), u.information("GetBaiduDWZ", n)), n
        })
    }, t.getShouleiFileTransferLink = y, t.getShouleiFileTransferDlj = function (e, t, i = "pic", o = "") {
        return n(this, void 0, void 0, function* () {
            let n = "", a = yield y(e, t, i, o);
            return a && "" !== a && (n = yield r.getBaiduDWZ(a), u.information("GetBaiduDWZ", n)), n
        })
    }, t.getShouleiFileTransferLink2 = T, t.getShouleiFileTransferDlj2 = function (e, t, i, o, a, s, l, d = "pic", c = "") {
        return n(this, void 0, void 0, function* () {
            let n = "", h = yield T(e, t, i, o, a, s, l, d, c);
            return h && "" !== h && (n = yield r.getBaiduDWZ(h), u.information("GetBaiduDWZ", n)), n
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(104), r = i(2), s = i(0), l = i(20), d = i(8), u = i(7), c = i(384), h = i(70),
        f = s.default.getLogger("Browser.Support"), p = u.default(r.join(__rootDir, "../bin/ThunderHelper.node"));
    let g = !1, m = !1;
    !function (e) {
        const t = new l.EventEmitter;
        e.isTabInit = function () {
            return m
        }, e.setTabInit = function (e) {
            m = e
        }, e.isTBCAvailable = function () {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    let t = r.join(__rootDir, "../bin/TBC/"), i = r.join(t, "libCef.dll");
                    if (!(e = yield d.FileSystemAWNS.existsAW(i))) break;
                    let n = r.join(__rootDir, "../bin/TBC/xlbrowsernode.node");
                    if (!(e = yield d.FileSystemAWNS.existsAW(n))) break
                } while (0);
                return e
            })
        }, e.initTBC = function () {
            return n(this, void 0, void 0, function* () {
                if (g) return g;
                f.information("[tbc] initTBC"), a.context.on("browser-created", (e, t) => {
                    f.information("new browser-created:", JSON.stringify(t))
                }), a.context.on("browser-destroyed", (e, t) => {
                    f.information("browser destroyed: ", JSON.stringify(t))
                });
                let e = r.join(__rootDir, "../bin/TBC/"), i = p.getPeerID(), n = r.join(__rootDir, "../../Thunder.exe"),
                    o = p.getFileVersion(n);
                return g = yield a.context.init({
                    data_path: r.join(e, "Data"),
                    product_version: o,
                    peer_id: i,
                    user_agent: "Thunder/" + o,
                    tbc_dir: e,
                    node_module_path: r.join(__rootDir, "../bin/TBC/xlbrowsernode.node"),
                    flash_allow_list_path: r.join(__rootDir, "../bin/TBC/PepperFlash/flash_allow_list.cfg")
                }), f.information("[tbc] initTBC", g), t.emit("BrowserSupportInit", g), g
            })
        }, e.browserIsInitFinish = function () {
            return g
        }, e.attachInit = function (e) {
            do {
                if (g) {
                    e(g);
                    break
                }
                t.on("BrowserSupportInit", e)
            } while (0)
        }, e.getDpiAwareSupport = function () {
            return p.getDPIAwareSupport()
        }, e.resizeBrowserWindow = function (e, t = !1) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                {
                    let n = yield o.asyncRemoteCall.getCurrentWindow(),
                        a = yield c.BrowserWindowNS.getBrowserWindowPosition(p, n, t);
                    p.setWindowPos(e, h.OptionOfHWNDInAfter.HWND_TOP, a.x, a.y, a.width, a.height, 0), i = !0
                }
                return i
            })
        }
    }(t.BrowserSupportNS || (t.BrowserSupportNS = {}))
}, function (e, t, i) {
    (function () {
        var t, n, o, a, r, s = {}.hasOwnProperty;
        r = i(76), a = r.isObject, o = r.isFunction, n = i(54), t = i(516), e.exports = function (e) {
            function i(e, t, n) {
                if (i.__super__.constructor.call(this, e), null == t) throw new Error("Missing element name");
                this.name = this.stringify.eleName(t), this.attributes = {}, null != n && this.attribute(n), e.isDocument && (this.isRoot = !0, this.documentObject = e, e.rootObject = this)
            }

            return function (e, t) {
                for (var i in t) s.call(t, i) && (e[i] = t[i]);

                function n() {
                    this.constructor = e
                }

                n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
            }(i, n), i.prototype.clone = function () {
                var e, t, i, n;
                for (t in(i = Object.create(this)).isRoot && (i.documentObject = null), i.attributes = {}, n = this.attributes) s.call(n, t) && (e = n[t], i.attributes[t] = e.clone());
                return i.children = [], this.children.forEach(function (e) {
                    var t;
                    return (t = e.clone()).parent = i, i.children.push(t)
                }), i
            }, i.prototype.attribute = function (e, i) {
                var n, r;
                if (null != e && (e = e.valueOf()), a(e)) for (n in e) s.call(e, n) && (r = e[n], this.attribute(n, r)); else o(i) && (i = i.apply()), this.options.skipNullAttributes && null == i || (this.attributes[e] = new t(this, e, i));
                return this
            }, i.prototype.removeAttribute = function (e) {
                var t, i, n;
                if (null == e) throw new Error("Missing attribute name");
                if (e = e.valueOf(), Array.isArray(e)) for (i = 0, n = e.length; i < n; i++) t = e[i], delete this.attributes[t]; else delete this.attributes[e];
                return this
            }, i.prototype.toString = function (e) {
                return this.options.writer.set(e).element(this)
            }, i.prototype.att = function (e, t) {
                return this.attribute(e, t)
            }, i.prototype.a = function (e, t) {
                return this.attribute(e, t)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n = {}.hasOwnProperty;
        t = i(54), e.exports = function (e) {
            function i(e, t) {
                if (i.__super__.constructor.call(this, e), null == t) throw new Error("Missing CDATA text");
                this.text = this.stringify.cdata(t)
            }

            return function (e, t) {
                for (var i in t) n.call(t, i) && (e[i] = t[i]);

                function o() {
                    this.constructor = e
                }

                o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
            }(i, t), i.prototype.clone = function () {
                return Object.create(this)
            }, i.prototype.toString = function (e) {
                return this.options.writer.set(e).cdata(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n = {}.hasOwnProperty;
        t = i(54), e.exports = function (e) {
            function i(e, t) {
                if (i.__super__.constructor.call(this, e), null == t) throw new Error("Missing comment text");
                this.text = this.stringify.comment(t)
            }

            return function (e, t) {
                for (var i in t) n.call(t, i) && (e[i] = t[i]);

                function o() {
                    this.constructor = e
                }

                o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
            }(i, t), i.prototype.clone = function () {
                return Object.create(this)
            }, i.prototype.toString = function (e) {
                return this.options.writer.set(e).comment(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n, o = {}.hasOwnProperty;
        n = i(76).isObject, t = i(54), e.exports = function (e) {
            function i(e, t, o, a) {
                var r;
                i.__super__.constructor.call(this, e), n(t) && (t = (r = t).version, o = r.encoding, a = r.standalone), t || (t = "1.0"), this.version = this.stringify.xmlVersion(t), null != o && (this.encoding = this.stringify.xmlEncoding(o)), null != a && (this.standalone = this.stringify.xmlStandalone(a))
            }

            return function (e, t) {
                for (var i in t) o.call(t, i) && (e[i] = t[i]);

                function n() {
                    this.constructor = e
                }

                n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
            }(i, t), i.prototype.toString = function (e) {
                return this.options.writer.set(e).declaration(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n, o, a, r, s, l = {}.hasOwnProperty;
        s = i(76).isObject, r = i(54), t = i(134), o = i(135), n = i(136), a = i(137), e.exports = function (e) {
            function i(e, t, n) {
                var o, a;
                i.__super__.constructor.call(this, e), this.documentObject = e, s(t) && (t = (o = t).pubID, n = o.sysID), null == n && (n = (a = [t, n])[0], t = a[1]), null != t && (this.pubID = this.stringify.dtdPubID(t)), null != n && (this.sysID = this.stringify.dtdSysID(n))
            }

            return function (e, t) {
                for (var i in t) l.call(t, i) && (e[i] = t[i]);

                function n() {
                    this.constructor = e
                }

                n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
            }(i, r), i.prototype.element = function (e, t) {
                var i;
                return i = new n(this, e, t), this.children.push(i), this
            }, i.prototype.attList = function (e, i, n, o, a) {
                var r;
                return r = new t(this, e, i, n, o, a), this.children.push(r), this
            }, i.prototype.entity = function (e, t) {
                var i;
                return i = new o(this, !1, e, t), this.children.push(i), this
            }, i.prototype.pEntity = function (e, t) {
                var i;
                return i = new o(this, !0, e, t), this.children.push(i), this
            }, i.prototype.notation = function (e, t) {
                var i;
                return i = new a(this, e, t), this.children.push(i), this
            }, i.prototype.toString = function (e) {
                return this.options.writer.set(e).docType(this)
            }, i.prototype.ele = function (e, t) {
                return this.element(e, t)
            }, i.prototype.att = function (e, t, i, n, o) {
                return this.attList(e, t, i, n, o)
            }, i.prototype.ent = function (e, t) {
                return this.entity(e, t)
            }, i.prototype.pent = function (e, t) {
                return this.pEntity(e, t)
            }, i.prototype.not = function (e, t) {
                return this.notation(e, t)
            }, i.prototype.up = function () {
                return this.root() || this.documentObject
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n = {}.hasOwnProperty;
        t = i(54), e.exports = function (e) {
            function i(e, t, n, o, a, r) {
                if (i.__super__.constructor.call(this, e), null == t) throw new Error("Missing DTD element name");
                if (null == n) throw new Error("Missing DTD attribute name");
                if (!o) throw new Error("Missing DTD attribute type");
                if (!a) throw new Error("Missing DTD attribute default");
                if (0 !== a.indexOf("#") && (a = "#" + a), !a.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");
                if (r && !a.match(/^(#FIXED|#DEFAULT)$/)) throw new Error("Default value only applies to #FIXED or #DEFAULT");
                this.elementName = this.stringify.eleName(t), this.attributeName = this.stringify.attName(n), this.attributeType = this.stringify.dtdAttType(o), this.defaultValue = this.stringify.dtdAttDefault(r), this.defaultValueType = a
            }

            return function (e, t) {
                for (var i in t) n.call(t, i) && (e[i] = t[i]);

                function o() {
                    this.constructor = e
                }

                o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
            }(i, t), i.prototype.toString = function (e) {
                return this.options.writer.set(e).dtdAttList(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n, o = {}.hasOwnProperty;
        n = i(76).isObject, t = i(54), e.exports = function (e) {
            function i(e, t, o, a) {
                if (i.__super__.constructor.call(this, e), null == o) throw new Error("Missing entity name");
                if (null == a) throw new Error("Missing entity value");
                if (this.pe = !!t, this.name = this.stringify.eleName(o), n(a)) {
                    if (!a.pubID && !a.sysID) throw new Error("Public and/or system identifiers are required for an external entity");
                    if (a.pubID && !a.sysID) throw new Error("System identifier is required for a public external entity");
                    if (null != a.pubID && (this.pubID = this.stringify.dtdPubID(a.pubID)), null != a.sysID && (this.sysID = this.stringify.dtdSysID(a.sysID)), null != a.nData && (this.nData = this.stringify.dtdNData(a.nData)), this.pe && this.nData) throw new Error("Notation declaration is not allowed in a parameter entity")
                } else this.value = this.stringify.dtdEntityValue(a)
            }

            return function (e, t) {
                for (var i in t) o.call(t, i) && (e[i] = t[i]);

                function n() {
                    this.constructor = e
                }

                n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
            }(i, t), i.prototype.toString = function (e) {
                return this.options.writer.set(e).dtdEntity(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n = {}.hasOwnProperty;
        t = i(54), e.exports = function (e) {
            function i(e, t, n) {
                if (i.__super__.constructor.call(this, e), null == t) throw new Error("Missing DTD element name");
                n || (n = "(#PCDATA)"), Array.isArray(n) && (n = "(" + n.join(",") + ")"), this.name = this.stringify.eleName(t), this.value = this.stringify.dtdElementValue(n)
            }

            return function (e, t) {
                for (var i in t) n.call(t, i) && (e[i] = t[i]);

                function o() {
                    this.constructor = e
                }

                o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
            }(i, t), i.prototype.toString = function (e) {
                return this.options.writer.set(e).dtdElement(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n = {}.hasOwnProperty;
        t = i(54), e.exports = function (e) {
            function i(e, t, n) {
                if (i.__super__.constructor.call(this, e), null == t) throw new Error("Missing notation name");
                if (!n.pubID && !n.sysID) throw new Error("Public or system identifiers are required for an external entity");
                this.name = this.stringify.eleName(t), null != n.pubID && (this.pubID = this.stringify.dtdPubID(n.pubID)), null != n.sysID && (this.sysID = this.stringify.dtdSysID(n.sysID))
            }

            return function (e, t) {
                for (var i in t) n.call(t, i) && (e[i] = t[i]);

                function o() {
                    this.constructor = e
                }

                o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
            }(i, t), i.prototype.toString = function (e) {
                return this.options.writer.set(e).dtdNotation(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n = {}.hasOwnProperty;
        t = i(54), e.exports = function (e) {
            function i(e, t) {
                if (i.__super__.constructor.call(this, e), null == t) throw new Error("Missing raw text");
                this.value = this.stringify.raw(t)
            }

            return function (e, t) {
                for (var i in t) n.call(t, i) && (e[i] = t[i]);

                function o() {
                    this.constructor = e
                }

                o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
            }(i, t), i.prototype.clone = function () {
                return Object.create(this)
            }, i.prototype.toString = function (e) {
                return this.options.writer.set(e).raw(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n = {}.hasOwnProperty;
        t = i(54), e.exports = function (e) {
            function i(e, t) {
                if (i.__super__.constructor.call(this, e), null == t) throw new Error("Missing element text");
                this.value = this.stringify.eleText(t)
            }

            return function (e, t) {
                for (var i in t) n.call(t, i) && (e[i] = t[i]);

                function o() {
                    this.constructor = e
                }

                o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
            }(i, t), i.prototype.clone = function () {
                return Object.create(this)
            }, i.prototype.toString = function (e) {
                return this.options.writer.set(e).text(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n = {}.hasOwnProperty;
        t = i(54), e.exports = function (e) {
            function i(e, t, n) {
                if (i.__super__.constructor.call(this, e), null == t) throw new Error("Missing instruction target");
                this.target = this.stringify.insTarget(t), n && (this.value = this.stringify.insValue(n))
            }

            return function (e, t) {
                for (var i in t) n.call(t, i) && (e[i] = t[i]);

                function o() {
                    this.constructor = e
                }

                o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
            }(i, t), i.prototype.clone = function () {
                return Object.create(this)
            }, i.prototype.toString = function (e) {
                return this.options.writer.set(e).processingInstruction(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3);
    !function (e) {
        const t = "vip-download-webview";
        let i = void 0;
        e.getVipTaskInfo = function (e) {
            return n(this, void 0, void 0, function* () {
                let i = null;
                try {
                    i = (yield o.client.callRemoteClientFunction(t, "GetVipTaskInfo", e))[0]
                } catch (e) {
                }
                return i
            })
        }, e.getVipSubTaskInfo = function (e, i) {
            return n(this, void 0, void 0, function* () {
                let n = null;
                try {
                    n = (yield o.client.callRemoteClientFunction(t, "GetVipSubTaskInfo", e, i))[0]
                } catch (e) {
                }
                return n
            })
        }, e.getVipSpeedColor = function (e) {
            return n(this, void 0, void 0, function* () {
                let i = void 0;
                try {
                    i = (yield o.client.callRemoteClientFunction(t, "GetVipSpeedColor", e))[0]
                } catch (e) {
                }
                return i
            })
        }, e.clickTryAcclerateBtn = function (e, i) {
            return n(this, void 0, void 0, function* () {
                try {
                    yield o.client.callRemoteClientFunction(t, "ClickTryAcclerateBtn", e, i)
                } catch (e) {
                }
            })
        }, e.getThunderVersionNumber = function () {
            return n(this, void 0, void 0, function* () {
                if (void 0 === i) {
                    const e = yield o.client.callServerFunction("GetThunderVersion");
                    i = 0;
                    let t = e.split(".");
                    if (t && 4 === t.length) {
                        let e = Number(t[0]).valueOf(), n = Number(t[1]).valueOf(), o = Number(t[2]).valueOf();
                        i = 128 * Math.pow(2, 24) + e * Math.pow(2, 16) + n * Math.pow(2, 8) + o
                    }
                }
                return i
            })
        }
    }(t.VipPluginFunctionNS || (t.VipPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(7), r = i(42), s = i(45), l = i(0), d = i(9), u = i(10), c = i(55),
        h = l.default.getLogger("[DownloadAndPlayNS]"), f = a.default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        function t(e = "xmp") {
            let t = r.Common.getLastAssociateExts(),
                i = o.resolve(__rootDir, "..\\..\\XMP\\Program\\AssociateHelper.exe"), n = [];
            n.push("--associate=" + t), n.push("--xmpdesc=" + e);
            let a = n.join(" ");
            h.information("handleAssociate", i, a), f.shellExecute(0, "open", i, a, "", "SW_HIDE"), u.ConfigNS.setValue("CompletedTaskPlay", "isXmpInited", 1)
        }

        e.getXmpPath = function () {
            let e = "", t = "HKEY_CURRENT_USER", i = "SOFTWARE\\Thunder Network\\Xmp";
            return (e = f.readRegString(t, i, "Path")) || (t = "HKEY_LOCAL_MACHINE", e = f.readRegString(t, i, "Path")), h.information("get xmp path: ", e), e
        }, e.getXmpReg = function (e) {
            let t = "";
            do {
                if (null === e || void 0 === e || "" === e) break;
                let i = "HKEY_CURRENT_USER", n = "Software\\Thunder Network\\Xmp", o = e;
                t = f.queryRegValue(i, n, o);
                let a = f.getLongPathName(t);
                null !== a && void 0 !== a && "" !== a && (t = a)
            } while (0);
            return t
        }, e.writeXmpReg = function (e) {
            let t = "HKEY_CURRENT_USER", i = "Software\\Thunder Network\\Xmp";
            f.createRegKey(t, i), f.writeRegValue(t, i, "Path", o.resolve(e, "Program/Xmp.exe"), 1), f.writeRegValue(t, i, "dir", e, 1), f.queryRegValue(t, i, "AssociationFileExt") || f.writeRegValue(t, i, "AssociationFileExt", "", 1)
        }, e.associateForXmp = function () {
            return n(this, void 0, void 0, function* () {
                yield s.default.isInitedAW();
                let e = s.default.getConfigValue("main", "xmp", null);
                if (!e) return u.ConfigNS.setValue("CompletedTaskPlay", "isXmpInited", 2), void h.information("Get Xmp associate white list conf failed, break!");
                try {
                    let i = "HKEY_CURRENT_USER",
                        n = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\.mp4", o = "";
                    c.release().startsWith("10") && (n += "\\UserChoice", o = "Progid");
                    let a = f.queryRegValue(i, n, o);
                    h.information("current mp4player: ", a);
                    let r = e.associate_whitelist, s = !1;
                    for (let e of r) if (a.startsWith(e)) {
                        s = !0;
                        break
                    }
                    if (!s) return h.information("current mp4player not in white list, break!"), void u.ConfigNS.setValue("CompletedTaskPlay", "isXmpInited", 2);
                    d.XLStatNS.trackEvent("core_event", "xmp_auto_set_default_player"), t()
                } catch (e) {
                }
            })
        }, e.handleAssociate = t
    }(t.DownloadAndPlayNS || (t.DownloadAndPlayNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(18), r = i(8), s = i(0), l = i(47), d = i(4), u = i(11), c = i(16), h = i(48), f = i(37),
        p = i(35), g = i(19), m = i(12), v = u.DownloadKernelTaskManager.getTaskManager(),
        y = c.DownloadKernelEventManager.getEventManager(), T = s.default.getLogger("SubtiteManager");
    !function (e) {
        let t;
        !function (e) {
            e.DownloadSuccess = "DownloadSuccess", e.DownloadFail = "DownloadFail"
        }(t = e.SubtitleEvent || (e.SubtitleEvent = {}));
        const i = o.resolve(__profilesDir, "SubTitleDownload/"),
            s = o.resolve(__profilesDir, "SubTitleDownload/subtitledata.json");

        class u extends l.default {
            constructor() {
                super(...arguments), this.subtitleData = {}, this.taskStatusChangedEventTable = []
            }

            init() {
                return n(this, void 0, void 0, function* () {
                    T.information("Init");
                    let e = yield r.FileSystemAWNS.existsAW(s);
                    if (e) {
                        let e = yield r.FileSystemAWNS.readFileAW(s);
                        if (e) {
                            try {
                                this.subtitleData = JSON.parse(e.toString())
                            } catch (e) {
                                T.warning(e), this.subtitleData = {}
                            }
                            T.information("Init, subtitle data", this.subtitleData)
                        }
                    } else (e = yield r.FileSystemAWNS.mkdirsAW(i)) && (yield r.FileSystemAWNS.writeFileAW(s, "{}"));
                    let t = yield m.asyncRemoteCall.getIpcMain();
                    t.on(p.ThunderChannelList.channelRMGetSutitleByCid, (e, t, i) => n(this, void 0, void 0, function* () {
                        T.information("channelRMGetSutitleByCid cid and taskid ", t, i);
                        let n = yield this.querySubtitleByCid(t, i);
                        T.information("send channelMRGetSutitleByCidResult"), (yield e.sender.isDestroyed()) || e.sender.send(p.ThunderChannelList.channelMRGetSutitleByCidResult, n)
                    })), t.on(p.ThunderChannelList.channelRMGetSutitleByName, (e, t, i) => n(this, void 0, void 0, function* () {
                        T.information("channelRMGetSutitleByName name and taskid ", t, i);
                        let n = yield this.querySubtitleByName(t, i);
                        T.information("send channelMRGetSutitleByNameResult"), (yield e.sender.isDestroyed()) || e.sender.send(p.ThunderChannelList.channelMRGetSutitleByNameResult, n)
                    })), t.on(p.ThunderChannelList.channelRMDownloadSutitle, (e, t, i, o) => n(this, void 0, void 0, function* () {
                        T.information("channelRMDownloadSutitle taskid ", i), yield this.downloadSubtitle(t, i, o)
                    })), t.on(p.ThunderChannelList.channelRMGetDisplayName, (e, t) => n(this, void 0, void 0, function* () {
                        T.information("channelRMGetDisplayName taskid ", t);
                        let i = this.getDisaplayName(t);
                        e.sender.send(p.ThunderChannelList.channelMRGetDisplayNameResult, i)
                    }))
                })
            }

            getDisaplayName(e) {
                let t = [], i = v.getTaskFromTaskId(e), n = i.getTaskBaseInfo(), o = i.getType();
                if (o === d.DownloadKernel.TaskType.P2sp || o === d.DownloadKernel.TaskType.Emule) {
                    let e = n.taskName, o = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.Cid);
                    T.information(" fileName: ", e, " cid: ", o);
                    let a = {fileName: e, cid: o};
                    a && t.push(a)
                } else if (o === d.DownloadKernel.TaskType.Bt) {
                    let e = i.getExtraObject();
                    if (0 === e.getDownloadFile().length) return null;
                    let n = e.getBtFileList();
                    for (let [e, i]of n) {
                        let n = i.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName);
                        if (f.TaskUtilHelper.getTaskFileType(n) === f.TaskUtilHelper.FileExtType.Video) {
                            let o = i.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Cid);
                            T.information("btfile inde: ", e, " fileName: ", n, " cid: ", o);
                            let a = {fileName: n, cid: o};
                            a && t.push(a)
                        }
                    }
                } else if (o === d.DownloadKernel.TaskType.Group) {
                    let e = i.getExtraObject(), n = e.getSubTaskCount();
                    for (let i = 0; i < n; ++i) {
                        let n = e.getSubTaskByIndex(i), o = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskName);
                        if (f.TaskUtilHelper.getTaskFileType(o) === f.TaskUtilHelper.FileExtType.Video) {
                            let e = n.getTaskAttribute(d.DownloadKernel.TaskAttribute.Cid);
                            T.information(" fileName: ", o, " cid: ", e);
                            let i = {fileName: o, cid: e};
                            i && t.push(i)
                        }
                    }
                }
                return T.information("getDisaplayName ret ", t), t
            }

            querySubtitleByCid(e, t) {
                return n(this, void 0, void 0, function* () {
                    T.information("querySubtitleByCid");
                    let i = [], n = null;
                    try {
                        n = yield a.default.get(`http://sub.xmp.sandai.net:8000/subxl/${e}.json`), T.information("response: ", n)
                    } catch (e) {
                        T.warning(e)
                    }
                    if (null !== n && void 0 !== n.status && 200 === n.status && void 0 !== n.data && null !== n.data) {
                        T.information("sublist: ", n.data.sublist);
                        let e = n.data.sublist;
                        if (e && e.length > 1) for (let n of e) {
                            let e = {scid: "", surl: "", sname: "", language: "", path: "", rate: 0, status: 0};
                            e.scid = n.scid, e.surl = n.surl, e.sname = n.sname, e.language = n.language, e.rate = n.rate, (yield this.isAlreadyDownload(e.scid, t)) ? e.status = 1 : e.status = 0, e && i.push(e)
                        }
                    }
                    return i
                })
            }

            querySubtitleByName(e, t) {
                return n(this, void 0, void 0, function* () {
                    T.information("querySubtitleByName");
                    let i = [];
                    e = encodeURI(e);
                    let n = null;
                    try {
                        n = yield a.default.get(`http://subtitle.kankan.xunlei.com:8000/search.json/mname=${e}`), T.information("querySubtitleByName response: ", n)
                    } catch (e) {
                        T.warning(e)
                    }
                    if (null !== n && void 0 !== n.status && 200 === n.status && void 0 !== n.data && null !== n.data) {
                        let e = n.data.sublist;
                        if (e && e.length >= 1) for (let n of e) if (n.scid) {
                            let e = {scid: "", surl: "", sname: "", language: "", path: "", rate: 0, status: 0};
                            e.scid = n.scid, e.surl = n.surl, e.sname = n.sname, e.language = n.language;
                            let o = parseInt(n.simility, 10), a = 0;
                            a = (o *= 100) < 15 ? 0 : o < 35 ? 1 : o < 55 ? 2 : o < 85 ? 3 : o < 92 ? 4 : 5, e.rate = a, (yield this.isAlreadyDownload(e.scid, t)) ? e.status = 1 : e.status = 0, e && i.push(e)
                        }
                    }
                    return i
                })
            }

            downloadSubtitle(e, t, i) {
                return n(this, void 0, void 0, function* () {
                    T.information("downloadSubtitle");
                    let n = e.surl, a = n.substring(n.lastIndexOf(".")),
                        r = i.substring(0, i.lastIndexOf(".")) + ".XLSUB" + a, s = this.getSaveDir(t);
                    T.information("downloadSubtitle fileName", r), T.information("downloadSubtitle filePath", s);
                    let l = o.join(s, r);
                    T.information("downloadSubtitle:", s, l);
                    let u = {
                        taskBaseInfo: {savePath: s, taskName: r},
                        p2spTaskInfo: {url: n, nameFixed: 1},
                        isBackground: !0
                    }, c = void 0, f = yield v.createTask(d.DownloadKernel.TaskType.P2sp, u);
                    return null !== f && (c = f.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId), this.attachTaskStatusChangedEvent(c, e, t), yield h.DownloadDispatchNS.startTask(c)), c
                })
            }

            save(e) {
                return n(this, void 0, void 0, function* () {
                    T.information("save"), T.information(e);
                    let t = JSON.stringify(e, void 0, 2);
                    T.information("save jsonStr: ", t), yield r.FileSystemAWNS.writeFileAW(s, t)
                })
            }

            attachTaskStatusChangedEvent(e, i, a) {
                T.information("Sunbtitle taskId: ", e), T.information("item: ", i), void 0 !== this.taskStatusChangedEventTable[e] && null !== this.taskStatusChangedEventTable[e] || (this.taskStatusChangedEventTable[e] = y.attachTaskEvent(d.DownloadKernel.TaskEventType.StatusChanged, (...r) => n(this, void 0, void 0, function* () {
                    let n = !1;
                    do {
                        if (!r) {
                            T.information("args is null");
                            break
                        }
                        if (r[0] !== d.DownloadKernel.TaskEventType.StatusChanged) {
                            T.information("args[0] is not StatusChanged");
                            break
                        }
                        let s = r[1];
                        if (!s) {
                            T.information("taskList is null");
                            break
                        }
                        for (let r = 0; r < s.length; ++r) {
                            let l = s[r];
                            if (!l) continue;
                            if (l.getId() !== e) continue;
                            let u = l.getTaskStatus();
                            if (T.information("get status ", u), u === d.DownloadKernel.TaskStatus.Succeeded) {
                                T.information("send: channelMRDownloadSutitleSuc"), g.ipcRenderer.send(p.ThunderChannelList.channelMRDownloadSutitleSuc), this.fireEvent(t.DownloadSuccess, e, a, i);
                                let n = [];
                                T.information("subtitleData: ", this.subtitleData), T.information("befor has sutitleTaskId "), this.subtitleData[a] && (T.information("has sutitleTaskId ", e), n = this.subtitleData[a]), T.information("after has sutitleTaskId ");
                                let r = {scid: "", surl: "", sname: "", language: "", path: "", rate: 0, status: 0};
                                r.scid = i.scid, r.surl = i.surl, r.sname = l.getTaskName().replace(".XLSUB", ""), r.language = i.language, r.rate = i.rate, r.status = 1;
                                let s = this.getSaveDir(e), u = l.getTaskName();
                                r.path = o.join(s, u), n.push(r), this.subtitleData[a] = n, yield this.save(this.subtitleData), null !== this.taskStatusChangedEventTable[e] && void 0 !== this.taskStatusChangedEventTable[e] && (T.information("取消监听 ", this.taskStatusChangedEventTable[e]), y.detachTaskEvent(d.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventTable[e]), this.taskStatusChangedEventTable[e] = null)
                            } else u === d.DownloadKernel.TaskStatus.Failed && (T.information("send: channelMRDownloadSutitleFail"), g.ipcRenderer.send(p.ThunderChannelList.channelMRDownloadSutitleFail), this.fireEvent(t.DownloadFail, e, a, i), null !== this.taskStatusChangedEventTable[e] && void 0 !== this.taskStatusChangedEventTable[e] && (T.information("取消监听 ", this.taskStatusChangedEventTable[e]), y.detachTaskEvent(d.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventTable[e]), this.taskStatusChangedEventTable[e] = null));
                            n = !0
                        }
                    } while (0);
                    return n
                })))
            }

            getSaveDir(e) {
                T.information("getSaveDir");
                let t = "", i = v.getTaskFromTaskId(e), n = i.getTaskName(), a = i.getType();
                if (i && (t = i.getSavePath()), a === d.DownloadKernel.TaskType.Bt) {
                    i.getExtraObject().getFileCount() > 1 && (t = o.join(t, n))
                }
                return T.information("name and save dir: ", n, t), t
            }

            isAlreadyDownload(e, t) {
                return n(this, void 0, void 0, function* () {
                    T.information("isAlreadyDownload cid ", e);
                    let i = !1, n = this.subtitleData[t];
                    if (T.information("isAlreadyDownload subtitleList ", n), n && n.length >= 1) for (let t of n) if (t.scid === e) {
                        let e = t.path;
                        T.information("isAlreadyDownload fielPath ", e), (yield r.FileSystemAWNS.existsAW(e)) && (i = !0)
                    }
                    return T.information("isAlreadyDownload ret ", i), i
                })
            }
        }

        e.SubtitleManager = u;
        const c = new u;
        e.getSubtitleManger = function () {
            return c
        }, e.init = function () {
            return n(this, void 0, void 0, function* () {
                yield c.init()
            })
        }, e.attachListener = function (e, t) {
            c.attachListener(e, t)
        }, e.detachListener = function (e, t) {
            c.detachListener(e, t)
        }
    }(t.SubtitleManagerNS || (t.SubtitleManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(20), a = i(36), r = i(27), s = i(655), l = i(30), d = i(13), u = i(5),
        c = n.default.getLogger("CommunityNaviteFunction"), h = s.CommunityTaskManagerNS.getTaskManager();
    !function (e) {
        class t extends o.EventEmitter {
            constructor() {
                super(), this.isRegisted = !1, c.verbose("construct")
            }

            static getNativeModule() {
                return t.instance || (t.instance = new t), t.instance
            }

            registerNativeFunction() {
                if (!this.isRegisted) {
                    this.isRegisted = !0;
                    let e = [{
                        functionName: "GetTaskSpeedByGcid",
                        nativeFunc: this.getTaskSpeedByGcid
                    }, {
                        functionName: "GetTaskNameByGcid",
                        nativeFunc: this.getTaskNameByGcid
                    }, {functionName: "SwitchToTask", nativeFunc: this.switchToTask}, {
                        functionName: "NotifyUnreadNum",
                        nativeFunc: this.notifyUnreadNum
                    }, {functionName: "ShowChatPanel", nativeFunc: this.showChatPanel}, {
                        functionName: "NewMessage",
                        nativeFunc: this.newMessage
                    }, {functionName: "OpenCommunityGroup", nativeFunc: this.openCommunityGroup}];
                    a.NativeCallNS.registerNativeFunction(e), h.init()
                }
            }

            sendOpenCommunityEvent(e, t) {
                void 0 !== t && (c.information("sendOpenCommunityEvent", e), t.fireEvent("OnShowCommunity", e.type, e.entry, JSON.stringify(e.extra)))
            }

            showChatPanel(e, i, n, o) {
                do {
                    if (c.information("showChatPanel"), u.isNullOrUndefined(e) || u.isNullOrUndefined(i) || u.isNullOrUndefined(n)) break;
                    if (c.verbose(o), !o || !o[0]) {
                        e.callNativeFunctionCallback(i, n, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let a = {type: "chat", extra: {userId: o[0]}};
                    t.getNativeModule().emit("openComunityGroup", a), e.callNativeFunctionCallback(i, n, r.NativeFunctionErrorCode.Success)
                } while (0)
            }

            newMessage(e, i, n, o) {
                do {
                    if (u.isNullOrUndefined(e) || u.isNullOrUndefined(n) || u.isNullOrUndefined(i)) break;
                    if (c.information("newMessage", o), c.verbose(o), !o || !o[0]) {
                        e.callNativeFunctionCallback(i, n, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const a = o[0];
                    try {
                        let o = JSON.parse(a);
                        t.getNativeModule().emit("newMessage", o), e.callNativeFunctionCallback(i, n, r.NativeFunctionErrorCode.Success)
                    } catch (e) {
                        c.information("newMessage parse data error")
                    }
                } while (0)
            }

            getTaskSpeedByGcid(e, t, i, n) {
                do {
                    if (u.isNullOrUndefined(e) || u.isNullOrUndefined(i) || u.isNullOrUndefined(t)) break;
                    if (c.verbose(n), !n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const o = n[0];
                    let a = h.getTaskAverageSpeedByTaskUniqueID(o);
                    c.information("getTaskSpeedByGcid gcid:", o, ", taskAverageSpeed:", a), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, "" + a)
                } while (0)
            }

            getTaskNameByGcid(e, t, i, n) {
                do {
                    if (u.isNullOrUndefined(e) || u.isNullOrUndefined(i) || u.isNullOrUndefined(t)) break;
                    if (c.verbose(n), !n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const o = n[0];
                    let a = h.getTaskNameByTaskUniqueID(o);
                    c.information("getTaskSpeedByGcid gcid:", o, ", taskName:", a), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, a)
                } while (0)
            }

            switchToTask(e, t, i, n) {
                do {
                    if (u.isNullOrUndefined(e) || u.isNullOrUndefined(i) || u.isNullOrUndefined(t)) break;
                    if (c.verbose(n), !n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const o = n[0];
                    c.information("switchToTask", o);
                    let a = h.getTaskInfoByTaskUniqueID(o);
                    if (!a) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    c.information("switchToTask gcid:", o, ", taskInfo:", a), l.default.fireEvent(d.NodeEventMesssageNS.eventDownloadSwitchCategory, a.categoryId, a.categoryViewId, a.taskId), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
                } while (0)
            }

            notifyUnreadNum(e, i, n, o) {
                do {
                    if (u.isNullOrUndefined(e) || u.isNullOrUndefined(n) || u.isNullOrUndefined(i)) break;
                    if (c.verbose(o), !o || !Array.isArray(o) || o.length < 2) {
                        e.callNativeFunctionCallback(i, n, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    const a = o[0];
                    let s = null;
                    try {
                        s = JSON.parse(o[1])
                    } catch (e) {
                        break
                    }
                    t.getNativeModule().emit("NotifyUnreadNum", {
                        totalNum: o[0],
                        detail: s
                    }), c.information("notifyUnreadNum", a), e.callNativeFunctionCallback(i, n, r.NativeFunctionErrorCode.Success)
                } while (0)
            }

            openCommunityGroup(e, i, n, o) {
                do {
                    if (c.information("openCommunityGroup"), u.isNullOrUndefined(e) || u.isNullOrUndefined(n) || u.isNullOrUndefined(i)) break;
                    if (!o || !Array.isArray(o)) {
                        e.callNativeFunctionCallback(i, n, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let a = null;
                    try {
                        a = JSON.parse(o[0])
                    } catch (e) {
                        break
                    }
                    t.getNativeModule().emit("openComunityGroup", a), e.callNativeFunctionCallback(i, n, r.NativeFunctionErrorCode.Success)
                } while (0)
            }
        }

        t.instance = null, e.CommunityNaviteFunction = t
    }(t.CommunityNaviteFunctionNS || (t.CommunityNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(112), r = i(17), s = i(23), l = i(0).default.getLogger("PhoneAuth");
    t.phoneAuthObject = new class {
        constructor() {
            this.embeddedBrowserObj = null, this.title = "迅雷提示", this.url = "http://misc-xl9-ssl.xunlei.com/bindphone/dist/index.html", this.width = 346, this.height = 468, this.lefttMargin = 8, this.rigthMargin = 8, this.topMargin = 38, this.bootomMargin = 8, this.isType = !1, this.embeddedBrowserObj = new a.EmbeddedBrowser
        }

        createPhoneAuthDlg(e, t) {
            return n(this, void 0, void 0, function* () {
                this.isType = !1, yield this.embeddedBrowserObj.createWnd(this.url, this.title, !0, "phoneAuth", this.width, this.height, this.lefttMargin, this.rigthMargin, this.topMargin, this.bootomMargin, t, null, this.onWndCloseResult.bind(this))
            })
        }

        onWndCloseResult() {
            return n(this, void 0, void 0, function* () {
                this.isType || r.NativeCallModule.nativeCall.CallNativeFunction("FireEventFunction", "OnPhoneAuthResult", 0)
            })
        }

        closeDialog(e, t) {
            this.isType = !0;
            let i = e;
            null !== e && void 0 !== e || (i = 0), r.NativeCallModule.nativeCall.CallNativeFunction("FireEventFunction", "OnPhoneAuthResult", i), this.embeddedBrowserObj.closeWnd().catch()
        }

        isPhoneAuthAw() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    let t = yield s.LoginHelperNS.loginHelper.isLoginedAw();
                    if (!0 !== t) {
                        l.information("isPhoneAuthAw 没有登陆 isLogin：", t);
                        break
                    }
                    let i = yield s.LoginHelperNS.loginHelper.getUserInfoAw();
                    if (null === i || void 0 === i) {
                        l.information("isPhoneAuthAw userInfo有问题 userInfo:", i);
                        break
                    }
                    let n = i.sessionid;
                    if (null === n || void 0 === n || "" === n) {
                        l.information("isPhoneAuthAw sessionid有问题 sessionid:", n);
                        break
                    }
                    let a = i.deviceid, r = i.userid, d = i.usernewno, u = i.usrname, c = i.usernick;
                    try {
                        let t = yield s.LoginHelperNS.loginSDKHelper.getInitData(), i = JSON.parse(t), h = i.platform,
                            f = i.appid, p = "PC-" + i.package, g = i.thunderVersion,
                            m = `auth.deviceid=${encodeURIComponent(a)}&auth.sessionid=${encodeURIComponent(n)}&auth.userid=${encodeURIComponent(r)}&auth.usernewno=${encodeURIComponent(d)}&auth.usrname=${encodeURIComponent(u)}&auth.usernick=${encodeURIComponent(c)}&auth.platformVersion=${encodeURIComponent(h)}&auth.appid=${encodeURIComponent(f)}&auth.appName=${encodeURIComponent(p)}&auth.clientVersion=${encodeURIComponent(g)}&authType==${encodeURIComponent("phone")}&userid ==${encodeURIComponent("userid")}`,
                            v = null, y = "https://xluser-ssl.xunlei.com/certification/v1/isauth?";
                        if (y = `${y}${m}`, null !== (v = yield o.default.get(y)) && void 0 !== v.status && 200 === v.status && void 0 !== v.data && null !== v.data && "" !== v.data) {
                            let t = v.data;
                            "ISAUTH" === t.result ? e = !0 : l.information("isPhoneAuthAw:data=", t)
                        }
                    } catch (e) {
                        l.information("isPhoneAuthAw:error=", e);
                        break
                    }
                } while (0);
                return e
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(5), o = i(0), a = i(111), r = o.default.getLogger("pop-mutual"), s = 3e3;
    var l;
    !function (e) {
        e.UnKnown = "UnKnown", e.P0 = "p0", e.P1 = "p1", e.P2 = "P2", e.P3 = "p3"
    }(l || (l = {}));
    const d = {
        [a.PopView.PRE_NEW_TASK]: 0,
        [a.PopView.BT_NEW_TASK]: 0,
        [a.PopView.NEW_TASK]: 0,
        [a.PopView.LOGIN]: 1,
        [a.PopView.BROWSER_GUIDE]: 2,
        [a.PopView.SIGN]: 3,
        [a.PopView.THUNDER_PAN_IMPORT]: 4,
        [a.PopView.VIP_RENEW]: 5,
        [a.PopView.LOGIN_NONE_VIP_ACTIVITY]: 6,
        [a.PopView.VIP_PACK_TRY_GUIDE]: 7,
        [a.PopView.VIP_TRY_GUIDE]: 8,
        [a.PopView.VIP_HUDDLE_NOVICE_GUIDE]: 9,
        [a.PopView.KUAINIAO_AUTO]: 10
    }, u = {
        [a.PopView.PRE_NEW_TASK]: l.P0,
        [a.PopView.BT_NEW_TASK]: l.P0,
        [a.PopView.NEW_TASK]: l.P0,
        [a.PopView.LOGIN]: l.P1,
        [a.PopView.BROWSER_GUIDE]: l.P1,
        [a.PopView.SIGN]: l.UnKnown,
        [a.PopView.THUNDER_PAN_IMPORT]: l.P1,
        [a.PopView.VIP_RENEW]: l.P2,
        [a.PopView.LOGIN_NONE_VIP_ACTIVITY]: l.P2,
        [a.PopView.VIP_PACK_TRY_GUIDE]: l.P3,
        [a.PopView.VIP_TRY_GUIDE]: l.P3,
        [a.PopView.VIP_HUDDLE_NOVICE_GUIDE]: l.P3,
        [a.PopView.KUAINIAO_AUTO]: l.P3
    }, c = 2, h = {[l.P1]: 2, [l.P2]: 1, [l.P3]: 1};
    const f = new class {
        constructor() {
            this.showQueue = [], this.willPopQueue = {}, this.otherPopCount = 0, this.eachPopCount = {
                [l.P1]: 0,
                [l.P2]: 0,
                [l.P3]: 0
            }
        }

        canAutoPopNow(e, t) {
            let i = !1;
            do {
                if (t = t || "", e === a.PopView.LOGIN && t.toLowerCase() !== "autoLoginFail".toLowerCase() && "auto" !== t.toLowerCase() && t.toLowerCase() !== "Install".toLowerCase()) {
                    i = !0;
                    break
                }
                if (e === a.PopView.BROWSER_GUIDE && "auto" !== t.toLowerCase()) {
                    i = !0;
                    break
                }
                let n = d[e];
                if (void 0 === n) {
                    i = !0;
                    break
                }
                let o = !1;
                for (let e of this.showQueue) if (d[e.bid] < n) {
                    o = !0;
                    break
                }
                if (!o) for (let e in this.willPopQueue) if (d[e] < n) {
                    o = !0, r.information("query can pop but other delay to show", e);
                    break
                }
                if (o) break;
                i = this.tryPop(e, !1)
            } while (0);
            return r.information("query can pop", e, i), i
        }

        popNow(e, t) {
            r.information("popNow in", e, t), this.isAuto(e, t) && this.tryPop(e, !0), this.showQueue.push({
                bid: e,
                from: t
            })
        }

        enqueue(e, t, i) {
            r.information("setReady in", e, i);
            do {
                if (e === a.PopView.PRE_NEW_TASK || e === a.PopView.BT_NEW_TASK || e === a.PopView.NEW_TASK) break;
                if (i = i || "", e === a.PopView.LOGIN && i.toLowerCase() !== "autoLoginFail".toLowerCase() && "auto" !== i.toLowerCase() && i.toLowerCase() !== "Install".toLowerCase()) {
                    t && t();
                    break
                }
                if (e === a.PopView.BROWSER_GUIDE && "auto" !== i.toLowerCase()) {
                    t && t();
                    break
                }
                if (!t || !n.isFunction(t)) {
                    r.information("enqueue but callback not provided");
                    break
                }
                let o = d[e];
                if (void 0 === o) {
                    t && t();
                    break
                }
                let s = !1;
                for (let e of this.showQueue) if (d[e.bid] < o) {
                    s = !0;
                    break
                }
                s ? (r.information("setReady wait pop", e), this.willPopQueue[e] = [i, t]) : (r.information("setReady pop rightnow", e), this.tryPop(e, !1) && t && t())
            } while (0)
        }

        setFinish(e) {
            r.information("setFinish in", e);
            for (let t = 0; t < this.showQueue.length; t++) if (this.showQueue[t].bid === e) {
                this.showQueue.splice(t, 1);
                break
            }
            0 === this.showQueue.length ? this.popNext() : r.information(`${e} finished, but still other party show`, this.showQueue)
        }

        hasAutoPop() {
            let e = !1;
            for (let t of this.showQueue) if (t.bid === a.PopView.PRE_NEW_TASK || t.bid === a.PopView.BT_NEW_TASK) {
                if ("clipboard" === t.from) {
                    e = !0;
                    break
                }
            } else if (this.isAuto(t.bid, t.from)) {
                e = !0;
                break
            }
            return e
        }

        isAuto(e, t) {
            let i = !1;
            do {
                if (!t) break;
                if ("auto" === t.toLowerCase()) {
                    i = !0;
                    break
                }
                e === a.PopView.LOGIN && (t.toLowerCase() !== "autoLoginFail".toLowerCase() && t.toLowerCase() !== "Install".toLowerCase() || (i = !0))
            } while (0);
            return i
        }

        popNext() {
            do {
                let e = Object.keys(this.willPopQueue);
                if (0 === e.length) {
                    r.information("popNext no dlg wait");
                    break
                }
                setTimeout(() => {
                    do {
                        if (0 === (e = Object.keys(this.willPopQueue)).length) {
                            r.information("popNext onTimer no dlg wait");
                            break
                        }
                        e.sort((e, t) => d[e] - d[t]), r.information("popNext", e);
                        let t = e[0];
                        if (0 === d[t]) {
                            r.information("popNext but newtask dlg still exist");
                            break
                        }
                        let i = this.willPopQueue[t] || [];
                        this.tryPop(t, !1) ? (delete this.willPopQueue[t], r.information("popNext onTimer show", t), i[1] && i[1]()) : (r.information("popNext over limit count false clear willPopQueue", this.willPopQueue), this.willPopQueue = {})
                    } while (0)
                }, s)
            } while (0)
        }

        tryPop(e, t = !0) {
            let i = !1;
            do {
                if (this.otherPopCount >= c) {
                    r.information(e, "over total max popCount", this.otherPopCount, c);
                    break
                }
                let n = u[e];
                if (!n || n === l.UnKnown) {
                    r.information(e, "has no classify");
                    break
                }
                let o = this.eachPopCount[n];
                if (void 0 === o) break;
                if (o >= h[n]) {
                    r.information(n, "over self max popCount", e);
                    break
                }
                i = !0, t && (this.otherPopCount++, this.eachPopCount[n] = o + 1)
            } while (0);
            return i
        }
    };
    t.popMutual = f
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(19), r = i(12), s = i(84), l = i(115), d = i(35), u = i(7), c = i(0), h = i(680), f = i(3),
        p = l.MsgQueueManagerNS.MsgQueue.getInstance().getQueue("notification"),
        g = u.default(o.join(__rootDir, "../bin/ThunderHelper.node")), m = c.default.getLogger("notification");
    !function (e) {
        let t = null, i = null, o = !1, l = !1, u = !1, c = {}, v = 0;

        function y() {
            return n(this, void 0, void 0, function* () {
                if (l) return;
                l = !0, (yield r.asyncRemoteCall.getIpcMain()).on(d.ThunderChannelList.channelMRNotificationMsg, (e, ...i) => {
                    do {
                        if (m.information("notification-event"), null === i[0] || void 0 === i[0]) break;
                        let e = i[0];
                        switch (e) {
                            case"hover":
                                m.information("msg", e, i[1]), o = i[1];
                                break;
                            case"close":
                                if (m.information("msg", e), i && "close" === i[1]) {
                                    let e = t && c[t.id];
                                    if (e) {
                                        let t = e.data && e.data.exData;
                                        t.beforeClose && t.beforeClose()
                                    }
                                }
                                w().catch();
                                break;
                            case"click": {
                                let e = t && c[t.id];
                                if (e) {
                                    let t = e.data && e.data.exData;
                                    t.onClick && t.onClick(i[1])
                                }
                            }
                        }
                    } while (0)
                })
            })
        }

        function T(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => n(this, void 0, void 0, function* () {
                    a.ipcRenderer.once("notify-window-created", (i, o) => n(this, void 0, void 0, function* () {
                        u = !1;
                        let i = yield(yield r.asyncRemoteCall.getBrowserWindow()).fromId(o);
                        c[o] = e, t(i)
                    })), u = !0, a.ipcRenderer.send("create-notify-window", JSON.parse(JSON.stringify(e)))
                }))
            })
        }

        function w() {
            return n(this, void 0, void 0, function* () {
                try {
                    m.information("close"), t && !(yield t.isDestroyed()) && t.close()
                } catch (e) {
                    m.warning(e)
                }
            })
        }

        function k(e) {
            m.information("setTimer..."), o = !1, e = e || 1e4, i && C(), i = setInterval(() => {
                o || (e -= 1e3) <= 0 && w().catch()
            }, 1e3)
        }

        function C() {
            i && (m.information("killTimer..."), clearInterval(i), i = null)
        }

        function b() {
            I(), v = f.client.attachServerEvent("OnLoginStatusChange", (e, t, i) => {
                "unlogin" !== i && "offline" !== i || w().catch()
            })
        }

        function I() {
            v && (f.client.detachServerEvent("OnLoginStatusChange", v), v = 0)
        }

        e.notify = function (e, i) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (g.IsInFullScreen()) break;
                    let a = "development" === process.env.RUN_ENV ? "http://localhost:9080/notification-renderer/" : `file:///${__dirname}/../notification-renderer/index.html`;
                    if (e.url && (a = e.url), "AdvertisementWebPageTips" !== e.type) {
                        yield y();
                        let n = yield T(e);
                        if (t && t.id === n.id) {
                            m.warning("get duplicate window", n.id);
                            break
                        }
                        t = n, (yield r.asyncRemoteCall.getIpcMain()).once("notification-init", i => {
                            n === t && (m.information("notification-init"), i.sender.send("notification-init-reply", JSON.parse(JSON.stringify(e))))
                        }), m.information("notification...", e), t.once("ready-to-show", () => {
                            n === t && (m.information("ready-to-show..."), t.showInactive(), t.setAlwaysOnTop(!1), e.closeWhenLogout && b(), k(e.duration), i && i("ready-to-show"))
                        }), t.once("closed", () => {
                            n === t && (m.information("closed..."), C(), I(), delete c[t.id], t = null, p.deQueue())
                        }), t.loadURL(a).catch()
                    } else {
                        let s = (yield(yield r.asyncRemoteCall.getScreen()).getPrimaryDisplay()).workArea,
                            l = e.width || 300, d = e.height || 280, u = s.width - l, c = s.height - d, f = null;
                        h.default.createWebPageTipDlg(a, {
                            x: u,
                            y: c,
                            width: l,
                            height: d
                        }, null, e.title, (a, ...r) => {
                            if (m.information("callback", a, ...r), i && i(a, ...r), "webpage_loaded" === a) k(e.duration); else if ("mouse_hover" === a) o = !0; else if ("mouse_leave" === a) o = !1; else if ("webpage_load_failed" === a) ; else if ("click" === a) {
                                if (t) {
                                    t.hide();
                                    let e = t;
                                    f = setTimeout(() => n(this, void 0, void 0, function* () {
                                        (yield e.isDestroyed()) || e.close()
                                    }), 5e3)
                                }
                            } else "closed" === a && (f && (clearTimeout(f), f = null), t = null, C(), p.deQueue())
                        }).then(e => {
                            m.information("notifyWindow=", e), t = e
                        }).catch()
                    }
                } while (0)
            })
        }, e.close = w, e.closeByType = function (e) {
            return n(this, void 0, void 0, function* () {
                try {
                    if (m.information("close"), t && !(yield t.isDestroyed()) && c[t.id].type === e) return t.close(), !0
                } catch (e) {
                    m.warning(e)
                }
                return !1
            })
        }, e.getCurrentWindowType = function () {
            return n(this, void 0, void 0, function* () {
                try {
                    if (m.information("close"), t && !(yield t.isDestroyed())) {
                        let e = c[t.id].type;
                        if (e) return e
                    }
                } catch (e) {
                    m.warning(e)
                }
                return s.Notification.TipsType.DownloadComplete
            })
        }, e.getCurrentWindow = function () {
            return n(this, void 0, void 0, function* () {
                return m.information("waitCreateDone before", u), yield function () {
                    return n(this, void 0, void 0, function* () {
                        return new Promise(e => n(this, void 0, void 0, function* () {
                            u ? a.ipcRenderer.once("notify-window-created", (t, i) => n(this, void 0, void 0, function* () {
                                setTimeout(() => n(this, void 0, void 0, function* () {
                                    let t = yield(yield r.asyncRemoteCall.getBrowserWindow()).fromId(i);
                                    e(t)
                                }), 0)
                            })) : e(null)
                        }))
                    })
                }(), m.information("waitCreateDone end"), t
            })
        }, e.setTimer = k
    }(t.NotificationNS || (t.NotificationNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(84), r = i(147), s = i(115), l = i(25), d = i(405),
        u = s.MsgQueueManagerNS.MsgQueue.getInstance().getQueue("notification"),
        c = o.default.getLogger("NotificationHelper");
    !function (e) {
        function t(e) {
            return !e.type || e.type !== a.Notification.TipsType.DownloadComplete && e.type !== a.Notification.TipsType.DownloadFail && e.type !== a.Notification.TipsType.ConsumptionTips && e.type !== a.Notification.TipsType.CommunityTips && e.type !== a.Notification.TipsType.CommonPushTip
        }

        function i(e, t) {
            return n(this, void 0, void 0, function* () {
                (yield r.NotificationNS.getCurrentWindow()) ? u.getCurrentProperty() < e.priority ? (o(e, t), r.NotificationNS.close().catch()) : e.noDelay || o(e, t) : (o(e, t), u.deQueue())
            })
        }

        function o(e, i) {
            if (t(e)) {
                let e = (new Date).getTime();
                d.MemoryConfigNS.setValue("ad", "adTipsLastPopupTime", e), c.information("enQueueNotification, adTipsLastPopupTime:", e)
            }
            u.enQueue({
                callback: () => n(this, void 0, void 0, function* () {
                    r.NotificationNS.notify(e, i).catch()
                }), name: e.name, priority: e.priority
            })
        }

        e.notify = function e(n, o) {
            do {
                if (c.information("notify options:", n), n.priority = n.priority || 0, t(n)) {
                    let t = l.default.getConfigInfo("ad", "adTipsPopupMode"),
                        i = d.MemoryConfigNS.getValue("ad", "adTipsLastPopupTime", 0);
                    if ("single" === t) {
                        if (i) {
                            c.information("adTipsPopupMode single, adTipsLastPopupTime:", i);
                            break
                        }
                    } else if ("interval" === t) {
                        let t = l.default.getConfigInfo("ad", "adTipsInterval");
                        if (t) {
                            let a = (new Date).getTime();
                            if (a - i < 60 * t * 1e3) {
                                c.information("adTipsPopupMode interval, adTipsLastPopupTime:", i, "currentTime:", a, "interval:", t), setTimeout(() => {
                                    e(n, o)
                                }, 60 * t * 1e3 - (a - i) + 1e3);
                                break
                            }
                        }
                    }
                }
                i(n, o).catch()
            } while (0)
        }, e.clearNotificationsByName = function (e) {
            u.clearQueuesByName(e)
        }
    }(t.NotificationHelper || (t.NotificationHelper = {}))
}, function (e, t, i) {
    "use strict";
    var n;
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.unknown = "unknown", e.netdisk = "netdisk", e.browserPlugin = "browserPlugin", e.zipFile = "zipFile"
    }(n = t.NewIssueGuide || (t.NewIssueGuide = {}));
    const o = {currentGuide: n.unknown}, a = {
        SET_CURRENT_GUIDE(e, t, i) {
            e.currentGuide = t
        }
    };
    t.default = {state: o, mutations: a, actions: {}, getters: {CurrentGuide: e => e.currentGuide}}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t, i;
        !function (e) {
            e[e.tab = 1] = "tab", e[e.app = 2] = "app", e[e.download = 3] = "download", e[e.defaultBrowser = 5] = "defaultBrowser", e[e.ieBrowser = 6] = "ieBrowser"
        }(t = e.OpenType || (e.OpenType = {})), function (e) {
            e.AdPlatform = "AdPlatform", e.AdLeftBottomVip = "AdLeftBottomVip"
        }(i = e.AdName || (e.AdName = {})), e.eventAdShow = "event_ad_show"
    }(t.AdCommonNS || (t.AdCommonNS = {}))
}, function (e, t, i) {
    e.exports = i(793)
}, function (e, t) {
    function i(e) {
        if ("string" != typeof e) throw new Error("Color should be defined as hex string");
        var t = e.slice().replace("#", "").split("");
        if (t.length < 3 || 5 === t.length || t.length > 8) throw new Error("Invalid hex color: " + e);
        3 !== t.length && 4 !== t.length || (t = Array.prototype.concat.apply([], t.map(function (e) {
            return [e, e]
        }))), 6 === t.length && t.push("F", "F");
        var i = parseInt(t.join(""), 16);
        return {r: i >> 24 & 255, g: i >> 16 & 255, b: i >> 8 & 255, a: 255 & i, hex: "#" + t.slice(0, 6).join("")}
    }

    t.getOptions = function (e) {
        e || (e = {}), e.color || (e.color = {});
        var t = void 0 === e.margin || null === e.margin || e.margin < 0 ? 4 : e.margin,
            n = e.width && e.width >= 21 ? e.width : void 0, o = e.scale || 4;
        return {
            width: n,
            scale: n ? 4 : o,
            margin: t,
            color: {dark: i(e.color.dark || "#000000ff"), light: i(e.color.light || "#ffffffff")},
            type: e.type,
            rendererOpts: e.rendererOpts || {}
        }
    }, t.getScale = function (e, t) {
        return t.width && t.width >= e + 2 * t.margin ? t.width / (e + 2 * t.margin) : t.scale
    }, t.getImageWidth = function (e, i) {
        var n = t.getScale(e, i);
        return Math.floor((e + 2 * i.margin) * n)
    }, t.qrToImageData = function (e, i, n) {
        for (var o = i.modules.size, a = i.modules.data, r = t.getScale(o, n), s = Math.floor((o + 2 * n.margin) * r), l = n.margin * r, d = [n.color.light, n.color.dark], u = 0; u < s; u++) for (var c = 0; c < s; c++) {
            var h = 4 * (u * s + c), f = n.color.light;
            if (u >= l && c >= l && u < s - l && c < s - l) f = d[a[Math.floor((u - l) / r) * o + Math.floor((c - l) / r)] ? 1 : 0];
            e[h++] = f.r, e[h++] = f.g, e[h++] = f.b, e[h] = f.a
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(858), r = i(862);

    function s(e, t = 1, i, n, o = 90) {
        return `${e = l(e.split("?imageView2")[0])}?imageView2/${t}` + (i ? `/w/${i}` : "") + (n ? `/h/${n}` : "") + `/q/${o}/interlace/1`
    }

    function l(e) {
        let t, i = {
            "sl.wangpan.7niu.n0808.com": "static-movie.a.88cdn.com",
            "pc.wangpan.xycdn.n0808.com": "static-movie.a.88cdn.com",
            "sl.image.7niu.n0808.com": "shortvideo-image.a.88cdn.com",
            "static-xl9-ssl.xunlei.com": "static-xl.a.88cdn.com"
        };
        try {
            t = e.match(/http:\/\/(.+\.com)\/.+/)[1]
        } catch (t) {
            return e
        }
        return i[t] ? (() => (e = e.replace(/http:\/\//, "https://")).replace(t, i[t]))() : e
    }

    t.getUserLink = function (e, t = "", i = "") {
        return `http://pc.xunlei.com/d/#/users/${e}?entrypage=${t}&entry=${i}`
    }, t.QINIU_HOST = ["sl.wangpan.7niu.n0808.com", "pc.wangpan.xycdn.n0808.com", "sl.image.7niu.n0808.com", "static-movie.a.88cdn.com"], t.qiniuImageView2 = s, t.toHttps = l, t.getThumbUrl = function (e, i, n, o = {keepRatio: !1}) {
        if (!e) return "";
        const a = {
            qiniu: {hosts: t.QINIU_HOST, handler: () => s(e, o.keepRatio ? 2 : 1, i, n)},
            dnion: {hosts: ["static-xl9-ssl.xunlei.com"], handler: () => `${e}?w=${i}&h=${n}`},
            aliyun: {
                hosts: ["static-xl.a.88cdn.com"],
                handler: () => `${e}?x-oss-process=image/resize,m_mfit,h_${n},w_${i}`
            }
        };
        for (let t in a) {
            let {hosts: i, handler: n} = a[t];
            if (i.some(t => e.match(t))) return n()
        }
        return e
    }, t.ALIYUN_HOST = ["aliyuncs.com", "a.88cdn.com", "pic-comment-shoulei-ssl.xunlei.com"], t.isALi = (e => t.ALIYUN_HOST.some(t => e.includes(t))), t.aliImageView = function (e, i = 1, n, o, a = 90) {
        if (!t.isALi(e)) return;
        let r = "m_mfit";
        switch (i) {
            case 1:
                r = "m_mfit";
                break;
            case 2:
                r = "m_lfit"
        }
        return `${e}&x-oss-process=image/resize,${r}${o ? ",h_" + o : ""}${n ? ",w_" + n : ""}/quality,q_${a}`
    }, t.aliImageInfo = function (e) {
        return n(this, void 0, void 0, function* () {
            return t.isALi(e) ? e.indexOf("?") > 0 ? o.default.get(`${e}&x-oss-process=image/info`).then(e => e.data) : o.default.get(`${e}?x-oss-process=image/info`).then(e => e.data) : new Promise((t, i) => {
                let n = new Image;
                n.src = e, n.onload = (() => {
                    let e = {};
                    e.ImageWidth = n.width, e.ImageHeight = n.height, t(e)
                })
            })
        })
    }, t.lazyImgObj = function ({loadingImg: e = "", src: t}) {
        return {src: t, loading: e, error: e}
    }, t.replaceEmoji = function (e = "") {
        if ("string" != typeof e) return e;
        let t = (e = a(e, {whiteList: {br: []}})).match(/\[[^[\]]+\]/g);
        return t && t.forEach(t => {
            let i = r[t];
            i && (e = e.replace(t, `<span class="face-icon-emoji emoji-${i}"></span>`))
        }), e
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3);
    !function (e) {
        e.getValue = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                return yield o.client.callServerFunction("GetConfigValue", e, t, i)
            })
        }, e.setValue = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                yield o.client.callServerFunction("SetConfigValue", e, t, i)
            })
        }
    }(t.ConfigHelperNS || (t.ConfigHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(450), o = i(345);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-button.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(453), o = i(353);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-input.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(454), o = i(359);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-text.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(8), r = i(75), s = i(66), l = i(84), d = i(148), u = i(9), c = i(14), h = i(7), f = i(405),
        p = h.default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    var g, m;
    !function (e) {
        e.Market = "Market", e.Functional = "Functional", e.WebPage = "WebPage"
    }(g = t.OrderType || (t.OrderType = {})), function (e) {
        e[e.TextButton = 1] = "TextButton", e[e.SmallImageButton = 2] = "SmallImageButton", e[e.BigImageButton = 3] = "BigImageButton", e[e.Image = 4] = "Image", e[e.Flash = 5] = "Flash"
    }(m = t.StyleType || (t.StyleType = {}));
    t.AdTips = class {
    }
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(160), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(704), r = i(737), s = i(15), l = i(9), d = i(7), u = i(2),
        c = d.default(u.resolve(__rootDir, "../bin/ThunderHelper.node")), h = i(0).default.getLogger("[main-app]");
    let f = class extends o.Vue {
        constructor() {
            super(...arguments), this.inited = !1, this.performanceMap = {}
        }

        init() {
            if (!this.inited) {
                this.inited = !0;
                let e = {
                    SetPerformanceItemStart: this.setPerformanceItemStart.bind(this),
                    SetPerformanceItemEnd: this.setPerformanceItemEnd.bind(this),
                    ResetPerformanceItem: this.resetPerformanceItem.bind(this),
                    SendPerformanceItem: this.sendPerformanceItem.bind(this)
                };
                s.server.registerFunctions(e), window.__performanceMap = this.performanceMap
            }
        }

        setPerformanceItemStart(e, t, ...i) {
            i && null !== i[0] && void 0 !== i[0] && (this.performanceMap[i[0]] || (this.performanceMap[i[0]] = c.getTickCount()))
        }

        setPerformanceItemEnd(e, t, ...i) {
            if (!i || null === i[0] || void 0 === i[0]) return;
            let n = this.performanceMap[i[0]];
            if (!n) return;
            let o = c.getTickCount() - n;
            h.information("item: ", i[0], "  cost time: ", o), delete this.performanceMap[i[0]];
            let a = i[0];
            i[0].startsWith("StartTask") ? a = "StartTask" : i[0].startsWith("PauseTask") && (a = "PauseTask"), l.XLStatNS.trackEvent("core_event", "pc_response_stat", "", 0, 0, 0, 0, "operation=" + a + ",cost=" + o)
        }

        resetPerformanceItem(e, t, ...i) {
            i && null !== i[0] && void 0 !== i[0] && delete this.performanceMap[i[0]]
        }

        sendPerformanceItem(e, t, ...i) {
            i && null !== i[0] && void 0 !== i[0] && l.XLStatNS.trackEvent("core_event", "pc_response_stat", "", 0, 0, 0, 0, "operation=" + i[0] + ",cost=" + i[1])
        }

        mounted() {
            this.init()
        }
    };
    f = n([o.Component({components: {MainLeft: a.default, MainBody: r.default}})], f), t.default = f
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(162), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(705), o = i(24);
    t.default = o.connector.connect({
        mapCommitToProps: {
            selectNav: "SELECT_NAV",
            createNewTab: "CREATE_NEW_TAB",
            setCurrentGuide: "SET_CURRENT_GUIDE",
            insertNewNavs: "INSERT_NEW_NAVS",
            removeNavs: "REMOVE_NAVS"
        }, mapGettersToProps: {curNav: e => e.currentNav, navList: e => e.navList, currentGuide: e => e.CurrentGuide}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(164), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(706), s = i(716), l = i(3), d = i(735), u = i(49), c = i(58), h = i(9), f = i(144), p = i(92),
        g = i(12), m = i(146), v = i(149), y = i(10), T = i(13), w = i(45),
        k = f.CommunityNaviteFunctionNS.CommunityNaviteFunction.getNativeModule();
    k.registerNativeFunction();
    let C = class extends a.Vue {
        constructor() {
            super(...arguments), this.dragable = !0, this.curUserId = "", this.eventOnMessageLoadend = -1, this.hasClickNetdisk = !0, this.netdiskGuideTips = "全新云盘、最高领2T空间"
        }

        updateCurUserId(e) {
            this.curUserId = e, this.currentGuide === v.NewIssueGuide.netdisk && this.setCurrentGuide(v.NewIssueGuide.unknown)
        }

        isVisited(e) {
        }

        closeNetdiskTips() {
            this.currentGuide === v.NewIssueGuide.netdisk && (this.setCurrentGuide(v.NewIssueGuide.unknown), h.XLStatNS.trackEvent("clienttop", "guid_entry_yunpan_tips_click"))
        }

        onCurNavChange() {
            this.curNav === u.NavViewID.Cloud && this.closeNetdiskTips()
        }

        select(e) {
            return o(this, void 0, void 0, function* () {
                let t = "download";
                if (e === u.NavViewID.Download ? t = "download" : e === u.NavViewID.Cloud ? (t = "yunpan", this.hasClickNetdisk = !0) : t = e === u.NavViewID.Browser ? "discover" : e === u.NavViewID.Message ? "message" : e, h.XLStatNS.trackEvent("clienttop", "clienleft_tab_click", "", 0, 0, 0, 0, "clickid=" + t), e === u.NavViewID.Message) {
                    let e = this.navList.find(e => e.key === u.NavViewID.Message), t = 0;
                    e.unReadNum > 0 && (t = e.showRedDot ? 2 : 1), h.XLStatNS.trackEvent("community", "message_tab_click", "", 0, 0, 0, 0, "number_bubble=" + t);
                    let i = yield c.default(!1, !0);
                    if (!i || "" === i) return
                }
                this.selectNav(e), l.client.callServerFunction("CloseSettingCenter")
            })
        }

        mounted() {
            d.initGetCoinPrizeToast(), k.on("openComunityGroup", e => {
                this.communityData = e, this.openComunityGroup()
            }), p.PluginFunctionUINS.on("openComunityGroup", e => {
                this.communityData = e, this.openComunityGroup()
            }), setTimeout(() => {
                if (localStorage.getItem("isTaskImportShown_" + this.curUserId)) return;
                let e = y.ConfigNS.getValue("GuideTips", v.NewIssueGuide.netdisk, 0);
                m.popMutual.hasAutoPop() || this.hasClickNetdisk || 0 === e && (y.ConfigNS.setValue("GuideTips", v.NewIssueGuide.netdisk, 1), this.curUserId && (this.netdiskGuideTips = "视频存云盘、直接在线播"), this.setCurrentGuide(v.NewIssueGuide.netdisk), h.XLStatNS.trackEvent("clienttop", "guid_entry_yunpan_tips_show"))
            }, 8e3), this.initNavConfig()
        }

        initNavConfig() {
        }

        openComunityGroup() {
            this.showMainWindow(), this.select(u.NavViewID.Message), -1 !== this.eventOnMessageLoadend && l.client.detachServerEvent("OnMessageLoadend", this.eventOnMessageLoadend), this.eventOnMessageLoadend = l.client.attachServerEvent("OnMessageLoadend", () => {
                l.client.broadcastEvent("OpenMessageGroup", this.communityData)
            }), l.client.broadcastEvent("OpenMessageGroup", this.communityData)
        }

        showMainWindow() {
            return o(this, void 0, void 0, function* () {
                let e = yield this.mainWindow();
                const t = yield e.isMinimized(), i = yield e.isVisible();
                !t && (t || i) && i || (yield e.restore(), yield e.show())
            })
        }

        mainWindow() {
            return o(this, void 0, void 0, function* () {
                return yield g.asyncRemoteCall.getCurrentWindow()
            })
        }
    };
    n([a.Prop({})], C.prototype, "curNav", void 0), n([a.Prop({})], C.prototype, "navList", void 0), n([a.Prop({})], C.prototype, "selectNav", void 0), n([a.Prop()], C.prototype, "currentGuide", void 0), n([a.Prop()], C.prototype, "setCurrentGuide", void 0), n([a.Prop({})], C.prototype, "createNewTab", void 0), n([a.Prop()], C.prototype, "insertNewNavs", void 0), n([a.Prop()], C.prototype, "removeNavs", void 0), n([a.Watch("curNav")], C.prototype, "onCurNavChange", null), C = n([a.Component({
        components: {
            LoginArea: r.default,
            SystemButtons: s.default
        }
    })], C), t.default = C
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(166), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(12), r = i(6), s = i(2), l = i(17), d = i(29), u = i(23), c = i(0), h = i(9), f = i(14), p = i(7),
        g = i(707), m = i(709), v = i(15), y = i(92), T = i(406), w = i(3), k = i(511), C = i(45);
    let {isDef: b} = f.ThunderUtil;
    const I = p.default(s.join(__rootDir, "../bin/ThunderHelper.node")), S = i(714), _ = i(715),
        D = c.default.getLogger("login-area");
    let A = class extends r.Vue {
        constructor() {
            super(...arguments), this.vipRenewEnable = !1, this.buttonShakeTimerId = void 0, this.title = "", this.vipText = "", this.badge = "", this.hoverImg = "", this.isHoverImgShow = !1, this.canShowVipText = !1, this.overflow = !1, this.overFlowPath = `${__rootDir}/static/transparent-img.png`, this.userNick = "", this.curLoginStatus = "unlogin", this.oldLoginStatus = "unlogin", this.isLogin = !1, this.isShowPersonalInfoWnd = !1, this.curUserid = "", this.isVip = 0, this.isYear = 0, this.vipLevel = 0, this.vipType = 2, this.headerUrl = "", this.curLoginHeaderUrl = S, this.yearIcon = "vip-icon-nian is-large is-disabled", this.rectDatas = "", this.bShowUserInfoPanle = !1, this.yearTipsText = "", this.strOpenVip = "", this.isShowYearTip = !1, this.isCanShowOpenVipBtn = !1, this.isShowVipPluginBtn = !1, this.isCanShowXufeiBtn = !1, this.curIconUrl = null, this.curIconText = "", this.cashTipTrigger = null, this.promptData = null, this.promptTextClicked = !1, this.personalInfoWnd = null, this.nVipGrow = 0, this.vipData = null, this.syncMsgEventId = void 0, this.syncMsgState = T.SyncMsgHelperNS.SyncMsgState.Connected, this.syncMsgOnceTimerID = null, this.eventHoverWindowReadyToShow = -1, this.userHeaderText = "登录送云盘"
        }

        onLoginChange(e) {
            return o(this, void 0, void 0, function* () {
                e ? this.syncMsgOnceTimerID = setTimeout(() => o(this, void 0, void 0, function* () {
                    (yield T.SyncMsgHelperNS.checkSyncMsg()) ? (this.syncMsgEventId = T.SyncMsgHelperNS.attachSyncMsgStateChangeEvent((e, t) => o(this, void 0, void 0, function* () {
                        this.syncMsgState = e
                    })), this.syncMsgState = T.SyncMsgHelperNS.getSyncMsgState()) : this.syncMsgState = T.SyncMsgHelperNS.SyncMsgState.Error
                }), 15e3) : (this.syncMsgOnceTimerID && (clearTimeout(this.syncMsgOnceTimerID), this.syncMsgOnceTimerID = null), this.syncMsgEventId && (T.SyncMsgHelperNS.detachSyncMsgStateChangeEvent(this.syncMsgEventId), this.syncMsgEventId = void 0))
            })
        }

        onHeaderChange(e, t) {
            D.information("curLoginHeaderUrl cur=", e, ";old=", t)
        }

        onVipButtonShow() {
            if (!this.vipRenewEnable) return;
            let e = this.$refs.userNick.clientWidth, t = !1;
            do {
                if (!this.vipButtonShow) break;
                if (!this.vipIconShow) break;
                if (e <= 126) break;
                t = !0
            } while (0);
            D.information("vip renew ", this.vipIconShow, e, t), this.overflow = t
        }

        get vipIconShow() {
            return this.isLogin && !this.isCanShowOpenVipBtn
        }

        get renewTitle() {
            return this.vipText ? this.vipText : ""
        }

        get toolTipTitle() {
            let e = "您有代金券可使用";
            do {
                if (!this.vipRenewEnable || !this.title) break;
                e = this.title
            } while (0);
            return e
        }

        get tooltipTrigger() {
            let e = null;
            do {
                if (!this.vipRenewEnable) {
                    e = this.cashTipTrigger;
                    break
                }
                if (!this.title) break;
                e = "hover"
            } while (0);
            return e
        }

        get vipButtonShow() {
            return "online" === this.curLoginStatus && (this.isShowVipPluginBtn || this.isCanShowOpenVipBtn || this.isCanShowXufeiBtn)
        }

        get strNickCss() {
            let e = "";
            return this.isLogin && 0 !== this.isVip && (e = "is-vip"), e
        }

        get userYearIcon() {
            return 0 !== this.isYear && 0 !== this.isVip ? (this.yearIcon = "vip-icon-nian", this.yearTipsText = "迅雷年费会员", this.strOpenVip = "") : (this.yearIcon = "vip-icon-nian is-disabled", this.yearTipsText = "年费会员享更低价格 更高特权", this.strOpenVip = "开通会员"), this.yearIcon
        }

        get strIsOffline() {
            let e = "";
            return "offline" === this.curLoginStatus && (e = "is-offline"), D.information("strIsOffline:", e), e
        }

        get showInfoIcon() {
            return this.isLogin && (this.syncMsgState === T.SyncMsgHelperNS.SyncMsgState.Close || this.syncMsgState === T.SyncMsgHelperNS.SyncMsgState.Error)
        }

        get showRestoreIcon() {
            return this.isLogin && this.syncMsgState === T.SyncMsgHelperNS.SyncMsgState.Connecting
        }

        closePersonalInfoWnd() {
            return o(this, void 0, void 0, function* () {
                null !== this.personalInfoWnd && ((yield this.personalInfoWnd.isDestroyed()) || this.personalInfoWnd && this.personalInfoWnd.close(), this.personalInfoWnd = null)
            })
        }

        setDefaultHeader() {
            D.information("setDefaultHeader"), this.curLoginHeaderUrl = S
        }

        setDefaultIcon() {
            D.information("setDefaultIcon"), this.curIconUrl = _
        }

        showPersonalInfoWnd(e) {
            return o(this, void 0, void 0, function* () {
                let t = this.getClientRectsEx(), i = yield this.isLoginInfoRect(t);
                if (D.information("datastr", t, i), t = JSON.stringify({
                    width: 100,
                    height: JSON.parse(t).height
                }), i && null === this.personalInfoWnd && (this.personalInfoWnd = yield u.LoginHelperNS.loginUIHelper.createPersonalInfoWnd(e, t), null !== this.personalInfoWnd)) {
                    let e = () => o(this, void 0, void 0, function* () {
                        t = this.getClientRectsEx(), (i = yield this.isLoginInfoRect(t)) ? (null != this.personalInfoWnd && (this.personalInfoWnd.show(), d.ToolsUtilitiesAWNS.setForegroundWindow(I, this.personalInfoWnd)), this.isLogin && this.stat("userinfo_show")) : yield this.closePersonalInfoWnd(), w.client.detachServerEvent(k.ThunderEvent.hoverWindowReadyToShow, this.eventHoverWindowReadyToShow)
                    });
                    this.personalInfoWnd.once("ready-to-show", () => {
                        e().catch()
                    }), this.eventHoverWindowReadyToShow = w.client.attachServerEvent(k.ThunderEvent.hoverWindowReadyToShow, () => {
                        e().catch()
                    }), this.personalInfoWnd.once("closed", () => {
                        this.personalInfoWnd = null
                    })
                }
            })
        }

        onPromptTitleShow(e) {
            if (D.information("onPromptTitleShow", e), e) {
                let e = "";
                e = "is_ad=1";
                let t = encodeURIComponent(e);
                D.information(e, t), h.XLStatNS.trackEvent("clienttop", "nolog_head_nickname_show", "", 0, 0, 0, 0, t)
            }
        }

        onToolYearTip(e) {
            if (e) {
                if (this.$emit("tooltip-show"), "开通会员" === this.strOpenVip) {
                    let e = "";
                    e = "is_vip=" + this.isVip + ",vip_type=" + this.vipType, 0 === this.isVip && 0 === this.nVipGrow ? e += ",show_type=1" : 0 === this.isVip && 0 !== this.nVipGrow && (e += ",show_type=2");
                    let t = encodeURIComponent(e);
                    D.information(e, t), h.XLStatNS.trackEvent("clienttop", "xufei_botton_show", "", 0, 0, 0, 0, t)
                }
            } else this.$emit("tooltip-hide");
            this.isShowYearTip = e
        }

        onIconClick() {
            m.VipRenewIconManagerNS.getIconManager().onIconClick()
        }

        onRenewMouseEnter() {
            this.isHoverImgShow = !0, this.hoverImg && this.vipBtnShow && this.vipBtnShow("hover")
        }

        onRenewClick(e) {
            this.isHoverImgShow = !1, this.vipBtnClick && this.vipBtnClick(e)
        }

        getClientRectsEx() {
            let e = null, t = 60, i = 110;
            b(this.$refs.userAvatar) && null !== (e = this.$refs.userAvatar.$el.getClientRects()) && void 0 !== e && e.length > 0 && null !== e[0] && void 0 !== e[0] && (t = e[0].left, i = e[0].right);
            let n = i - t + 5, o = n;
            return JSON.stringify({width: n, height: o})
        }

        isLoginInfoRect(e) {
            return o(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    let i = yield(yield a.asyncRemoteCall.getScreen()).getCursorScreenPoint(), n = null;
                    try {
                        n = JSON.parse(e)
                    } catch (e) {
                        D.warning(e)
                    }
                    if (null === n) break;
                    let o = yield(yield a.asyncRemoteCall.getCurrentWindow()).getBounds(), r = o.x + 26, s = o.y + 60,
                        l = o.x + 26 + Number(n.width), d = o.y + 60 + Number(n.height);
                    i.x >= r && i.x <= l && i.y >= s && i.y <= d && (t = !0)
                } while (0);
                return t
            })
        }

        getUserAvatarRect() {
            return o(this, void 0, void 0, function* () {
                let e = yield(yield a.asyncRemoteCall.getCurrentWindow()).getBounds(),
                    t = this.$refs.userAvatar.$el.getClientRects(), i = e.x + t[0].left, n = e.y + t[0].top,
                    o = t[0].right - t[0].left, r = t[0].bottom - t[0].top;
                return JSON.stringify({x: i, y: n, width: o, height: r})
            })
        }

        enter(e) {
            return o(this, void 0, void 0, function* () {
                if (D.information("enter:", e, this.isLogin, this.curLoginStatus, this.personalInfoWnd), "offline" !== this.curLoginStatus && null === this.personalInfoWnd) this.showPersonalInfoWnd(e).catch(); else if ("offline" === this.curLoginStatus && "head" === e) {
                    let e = yield this.getUserAvatarRect();
                    yield this.closePersonalInfoWnd(), u.LoginHelperNS.loginUIHelper.createRetryLoginWnd("userAvatar", e)
                }
            })
        }

        clickPromptTitle(e) {
            if (D.information("点击促销文案", this.promptData.title), D.information("islogin", this.isLogin), D.information("curLoginStatus", this.curLoginStatus), !this.isLogin) {
                let t = `button=${e}`;
                t += ",is_ad=1", D.information("extData", t);
                let i = encodeURIComponent(t);
                D.information(t, i), h.XLStatNS.trackEvent("clienttop", "nolog_head_nickname_click", "", 0, 0, 0, 0, i), this.promptTextClicked = !0, D.information("this.curLoginHeaderUrl", this.curLoginHeaderUrl), u.LoginHelperNS.loginHelper.showLoginDlg("clienthead", !0), D.information("this.curLoginHeaderUrl", this.curLoginHeaderUrl)
            }
        }

        clickUserHeader(e) {
            if (D.information("点击登录", this.curLoginStatus), this.isLogin && "online" === this.curLoginStatus) {
                let t = "http://pc.xunlei.com/d#/users/" + this.curUserid + "?entrypage=client_leftright_login&entry=client_leftright_login_head";
                w.client.callServerFunction("OpenNewTab", t);
                let i = `button=${e}`;
                i = i + ",is_vip=" + this.isVip + ",vip_type=" + this.vipType + ",referfrom=v_pc_xlx_ggong_head_nickname";
                let n = encodeURIComponent(i);
                D.information(i, n), h.XLStatNS.trackEvent("clienttop", "head_nickname_click", "", 0, 0, 0, 0, n)
            } else if ("unlogin" === this.curLoginStatus) {
                let t = "head_below_button" === e ? "head_below_button" : "clienthead";
                u.LoginHelperNS.loginHelper.showLoginDlg(t, !0)
            }
            let t = `button=${e}`, i = "no";
            this.isLogin && (i = "yes"), t = `${t},is_login=${i}`, !this.isLogin && this.promptData && this.clickPromptTitle("head"), h.XLStatNS.trackEvent("clienttop", "clienttop_userinfo_click", "", 0, 0, 0, 0, t)
        }

        onClick(e) {
            let t = "", i = "", n = "";
            if ("nian" === e ? (t = "https://vip.xunlei.com/vip_service/year/?referfrom=v_pc_xlx_ggong_yearicon", i = "nf_icon_click", n = "v_pc_xlx_ggong_yearicon") : "vip" === e ? (t = 0 !== this.isVip ? "https://vip.xunlei.com/vip_service/rule/?referfrom=v_pc_xlx_ggong_vipicon" : "https://pay.xunlei.com/pay.html?bizNo=baijin?referfrom=v_pc_xlx_ggong_vipicon", i = "vip_icon_click", n = "v_pc_xlx_ggong_vipicon") : "nian_tip" === e ? (this.isShowYearTip = !1, t = "https://vip.xunlei.com/vip_service/year/?referfrom=v_pc_xlx_ggong_pay_top", i = "xufei_botton_click", n = "v_pc_xlx_ggong_pay_top") : "vip-center" === e && (t = "https://vip.xunlei.com/", i = "vip_center_click", n = "v_pc_xlx_ggong_vipcenter"), "" !== t) {
                w.client.callServerFunction("OpenNewTab", t);
                let o = "";
                o = "is_vip=" + this.isVip + ",vip_type=" + this.vipType + ",referfrom=" + n, "vip" === e ? 0 === this.isVip && 0 === this.nVipGrow ? o += ",show_type=1,aidfrom=ktnovip" : 0 === this.isVip && 0 !== this.nVipGrow && (o += ",show_type=2,aidfrom=ktnovip1") : "nian_tip" === e && (0 === this.isVip && 0 === this.nVipGrow ? o += ",show_type=1,aidfrom=xfbtn_exp7_kt" : 0 === this.isVip && 0 !== this.nVipGrow && (o += ",show_type=2,aidfrom=xfbtn_exp7_kt"));
                let a = encodeURIComponent(o);
                D.information(e, o, a), h.XLStatNS.trackEvent("clienttop", i, "", 0, 0, 0, 0, a)
            }
        }

        switchAccount() {
            this.isLogin = !1, this.curUserid = "", this.curLoginStatus = "unlogin", this.userNick = "", this.curLoginHeaderUrl = S, this.rectDatas = "", this.updateLoginStatus(), this.$emit("updateCurUserId", this.curUserid), u.LoginHelperNS.loginHelper.switchAccount("changeaccount")
        }

        personalCenter() {
            w.client.callServerFunction("OpenNewTab", "http://i.xunlei.com/login.html")
        }

        updateLoginStatus() {
            if (D.information(this.oldLoginStatus, this.curLoginStatus), this.oldLoginStatus === this.curLoginStatus) ; else {
                let e = this.oldLoginStatus;
                this.oldLoginStatus = this.curLoginStatus, l.NativeCallModule.nativeCall.CallNativeFunction("NativeFireEvent", "onLoginStatusChange", e, this.curLoginStatus, e => {
                }), v.server.fireClientEvent("onLoginStatusChange", e, this.curLoginStatus), v.server.fireClientEvent("OnLoginStatusChange", e, this.curLoginStatus)
            }
            this.checkPromptState()
        }

        updateUserInfo(e) {
            return o(this, void 0, void 0, function* () {
                return new Promise(t => {
                    u.LoginHelperNS.loginHelper.getAllUserInfo(i => o(this, void 0, void 0, function* () {
                        do {
                            if (D.information("收到 getAllUserInfo 返回数据 userInfo:", i), null === i || void 0 === i) {
                                D.information("getAllUserInfo 得到数据是 null");
                                break
                            }
                            "login" === e && (this.isLogin = !0, this.curLoginStatus = "online", this.updateLoginStatus()), this.curUserid = i.userID, this.$emit("updateCurUserId", this.curUserid), this.userNick = f.ThunderUtil.unescapeHTML(i.nickName), this.rectDatas = "", "login" === e && h.XLStatNS.setUserID(Number(this.curUserid));
                            let t = i.imgURL;
                            t = null === t || void 0 === t || "" === t ? S : t.replace("%s", "100x100"), this.headerUrl = t;
                            let n = yield u.LoginHelperNS.loginHelper.updateHeaderAw(this.headerUrl, this.curUserid);
                            if ("online" === this.curLoginStatus && null !== n && void 0 !== n && "" !== n && (this.curLoginHeaderUrl = n), null === i.vipList || void 0 === i.vipList) break;
                            if (null === i.vipList[0] || void 0 === i.vipList[0]) break;
                            let o = i.vipList[0];
                            o.isYear = 1;
							if (o.isVip == 0) {
								o.vipLevel = 10;
								o.isVip = 1;								
								o.vasType = 5;
							}
                            if (this.vipData = [{
                                VIPLevel: o.vipLevel,
                                isVIP: o.isVip,
                                isYear: o.isYear,
                                uid: i.userID,
                                vasID: 2,
                                vasType: o.vasType
                            }], "update" === e) {
                                let e = {isVip: Number(o.isVip), vasType: Number(o.vasType), expireDate: o.expireDate};
                                m.VipRenewIconManagerNS.getIconManager().updateUserVipData(e)
                            }
                            this.isYear = Number(o.isYear), this.isVip = Number(o.isVip), this.vipLevel = Number(o.vipLevel), this.vipType = Number(o.vasType), "" !== o.vipGrow && (this.nVipGrow = Number(o.vipGrow))
                        } while (0);
                        t()
                    }))
                })
            })
        }

        setChangeData(e, t) {
            return o(this, void 0, void 0, function* () {
                if (D.information("onLoginFailed:getCurInternetState: setChangeData: ", e, t), 0 === e && 2 === t) {
                    this.isLogin = !1, this.curLoginStatus = "offline", this.updateLoginStatus();
                    let e = yield this.getUserAvatarRect();
                    yield this.closePersonalInfoWnd(), u.LoginHelperNS.loginUIHelper.createRetryLoginWnd("userAvatar", e)
                } else this.isLogin = !1, this.curLoginStatus = "unlogin", this.userNick = "", this.rectDatas = "", this.curLoginHeaderUrl = S, this.updateLoginStatus()
            })
        }

        checkPromptState() {
            if (D.information("islogin", this.isLogin, "currentloginstatus", this.curLoginStatus, "nickname", this.userNick), this.isLogin || "unlogin" !== this.curLoginStatus) "online" === this.curLoginStatus && (this.promptData = null); else {
                let e = g.LoginPromptManagerNS.getPromptData();
                e && (null != this.promptData && this.promptData.id === e.id || this.onPromptTitleShow(!0), this.promptData = e, this.curLoginHeaderUrl = this.promptData.imgLocalPath, D.information("prompt data", this.promptData))
            }
        }

        stat(e) {
            let t = `is_login=${this.isLogin ? 1 : 0},is_vip=${this.isVip}`;
            D.information(e, t), h.XLStatNS.trackEvent("user_info", e, "", 0, 0, 0, 0, t)
        }

        pingThroughXLUserServer() {
            return o(this, void 0, void 0, function* () {
                try {
                    const e = yield i(18);
                    return e.defaults.adapter = i(21), e.request({
                        method: "options",
                        url: "https://xluser-ssl.xunlei.com/xluser.core.login"
                    }).then(e => !!(e && e.status >= 200 && e.status <= 300)).catch(e => !1)
                } catch (e) {
                    return !1
                }
            })
        }

        startButtonShake(e) {
            do {
                if (this.buttonShakeTimerId) break;
                this.buttonShakeTimerId = setInterval(() => {
                    this.$refs.button && (this.$refs.button.$el.classList.remove("is-animation"), setTimeout(() => {
                        this.$refs.button.$el.classList.add("is-animation")
                    }, 30))
                }, 1e3 * e)
            } while (0)
        }

        stopButtonShake() {
            this.buttonShakeTimerId && (clearInterval(this.buttonShakeTimerId), this.buttonShakeTimerId = void 0)
        }

        updateVipRenew(e) {
            do {
                if (!this.vipRenewEnable) break;
                if (!e) break;
                void 0 !== e.title && (this.title = e.title), e.text ? (this.vipText = e.text, void 0 !== e.badge && (this.badge = e.badge ? e.badge.trim() : ""), this.canShowVipText = !0) : (this.vipText = "", this.canShowVipText = !1), e.onClick && (this.vipBtnClick = e.onClick), e.onShow && (this.vipBtnShow = e.onShow), void 0 !== e.isVisible && (this.isShowVipPluginBtn = e.isVisible, this.isShowVipPluginBtn ? void 0 !== e.buttonType && ("kt" === e.buttonType ? this.isCanShowOpenVipBtn = !0 : this.isCanShowOpenVipBtn = !1) : (this.isCanShowOpenVipBtn = !1, this.isCanShowXufeiBtn = !1)), e.frametime > 0 ? this.startButtonShake(e.frametime) : 0 === e.frametime && this.stopButtonShake(), void 0 !== e.hoverImg && (this.hoverImg = e.hoverImg)
            } while (0)
        }

        getSyncMsgState() {
            return this.syncMsgState
        }

        initUserHeaderText() {
            C.default.isInited() ? this.userHeaderText = C.default.getConfigValue("main", "nologinbutton", {text: "登录送云盘"}).text || "登录送云盘" : C.default.attachListener("OnRemoteGlobalConfigLoaded", () => {
                this.userHeaderText = C.default.getConfigValue("main", "nologinbutton", {text: "登录送云盘"}).text || "登录送云盘"
            })
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                let e = {GetSyncMsgState: this.getSyncMsgState.bind(this)};
                v.server.registerFunctions(e), y.PluginFunctionUINS.on("update_vip_renew_button", e => {
                    this.updateVipRenew(e)
                }), this.vipRenewEnable = !0, this.initUserHeaderText(), w.client.attachServerEvent("OnLoginBefore", (e, t, i) => {
                    if (D.information("收到onLoginBefore事件：this.oldLoginStatus = ", this.oldLoginStatus, t, i), "unlogin" === this.oldLoginStatus) if (this.rectDatas = "", this.curLoginStatus = "loging", this.updateLoginStatus(), null !== i && void 0 !== i && "" !== i && null !== t && void 0 !== t && "" !== t) {
                        this.userNick = t, this.curLoginHeaderUrl = S;
                        let e = u.LoginHelperNS.loginHelper.getUserHeader(i);
                        D.information("onLoginBefore:getUserHeader = ", e, "this.curLoginStatus:", this.curLoginStatus), "loging" === this.curLoginStatus && null !== e && void 0 !== e && "" !== e && (this.curLoginHeaderUrl = e)
                    } else this.userNick = "正在登录...", this.curLoginHeaderUrl = S
                }), w.client.attachServerEvent("OnLoginSuc", e => o(this, void 0, void 0, function* () {
                    if (D.information("收到 onLoginSuc 事件"), this.promptTextClicked && this.promptData && this.promptData.url) {
                        this.promptTextClicked = !1;
                        let e = this.promptData.url;
                        D.information("prompt url", e), w.client.callServerFunction("OpenNewTab", e)
                    }
                    yield this.updateUserInfo("login"), yield this.enter("onLoginSuc")
                })), w.client.attachServerEvent("OnGetUserInfoFinished", e => o(this, void 0, void 0, function* () {
                    D.information("收到 onGetUserInfoFinished 事件"), yield this.updateUserInfo("update");
                    let e = yield u.LoginHelperNS.loginHelper.updateHeaderAw(this.headerUrl, this.curUserid);
                    D.information("下载头像成功：", e, this.curLoginStatus), "online" === this.curLoginStatus && null !== e && void 0 !== e && "" !== e && (this.curLoginHeaderUrl = e, l.NativeCallModule.nativeCall.CallNativeFunction("NativeFireEvent", "onUserHeaderChange", e, t => {
                        D.information("onUserHeaderChange", e, t)
                    }))
                })), w.client.attachServerEvent("OnLoginFailed", (e, t, i) => {
                    D.information("收到 onLoginFailed 事件, this.oldLoginStatus:", this.oldLoginStatus, ";erro:", t, ";code:", i);
                    let n = Number(t), o = u.LoginHelperNS.loginHelper.getCurInternetState();
                    "offline" !== this.oldLoginStatus ? 0 === o ? setTimeout(() => {
                        let e = u.LoginHelperNS.loginHelper.getCurInternetState();
                        this.setChangeData(n, e).catch()
                    }, 3e3) : this.setChangeData(n, o).catch() : 1 === n && (this.isLogin = !1, this.curLoginStatus = "unlogin", this.userNick = "", this.rectDatas = "", this.curLoginHeaderUrl = S, this.updateLoginStatus())
                }), w.client.attachServerEvent("OnLogout", e => o(this, void 0, void 0, function* () {
                    D.information("收到 onLogout 事件"), this.isLogin = !1, this.curLoginStatus = "unlogin", this.userNick = "", this.curLoginHeaderUrl = S, this.rectDatas = "", this.updateLoginStatus(), yield this.closePersonalInfoWnd(), m.VipRenewIconManagerNS.getIconManager().onLogout(), h.XLStatNS.setUserID(0)
                })), w.client.attachServerEvent("OnSwitchAccount", e => o(this, void 0, void 0, function* () {
                    this.switchAccount(), yield this.closePersonalInfoWnd()
                })), w.client.attachServerEvent("OnInternetConnectChange", (e, t, i) => o(this, void 0, void 0, function* () {
                    if (2 === i) {
                        let e = yield this.pingThroughXLUserServer();
                        if ("online" === this.curLoginStatus && !e) {
                            this.isLogin = !1, this.curLoginStatus = "offline", this.updateLoginStatus();
                            let e = yield this.getUserAvatarRect();
                            yield this.closePersonalInfoWnd(), u.LoginHelperNS.loginUIHelper.createRetryLoginWnd("userAvatar", e)
                        }
                    } else 1 === i && (D.information("onInternetConnectChange:", this.curLoginStatus), "offline" === this.curLoginStatus && setTimeout(() => o(this, void 0, void 0, function* () {
                        (yield this.pingThroughXLUserServer()) && (h.XLStatNS.trackEvent("user_info", "broken_net_to_login", "", 0, 0, 0, 0, "type=1"), u.LoginHelperNS.loginHelper.logIn("RetryLogin"))
                    }), 3e3))
                })), w.client.attachServerEvent("OnUserDetailInfoChange", (e, t) => {
                    if (null !== t && void 0 !== t && "" !== t) try {
                        let e = JSON.parse(t);
                        this.userNick = f.ThunderUtil.unescapeHTML(e.nickName), this.$nextTick(() => {
                            this.onVipButtonShow()
                        })
                    } catch (e) {
                        D.warning(e)
                    }
                }), w.client.attachServerEvent("OnLoginUpdate", (e, t, i) => {
                    D.information("收到事件 onLoginUpdate:", t, i), "vipinfo" !== t && "userinfo" !== t || this.updateUserInfo("update").catch(), w.client.broadcastEvent("onUserInfoChange", t, i, e => {
                        D.information("fire onUserInfoChange:", e)
                    }), v.server.fireClientEvent("onUserInfoChange", t, i), v.server.fireClientEvent("OnUserInfoChange", t, i)
                }), (yield a.asyncRemoteCall.getIpcMain()).on("onCancelRetry", () => {
                    D.information("收到 onCancelRetry 事件"), this.isLogin = !1, this.curLoginStatus = "unlogin", this.userNick = "", this.curLoginHeaderUrl = S, this.rectDatas = "", this.updateLoginStatus(), u.LoginHelperNS.loginHelper.logout()
                });
                let t = g.LoginPromptManagerNS.getManager();
                t.attachListener(g.LoginPromptManagerEventNS.promptDataGet, e => {
                    D.information("prompt data event result", e), e && this.checkPromptState()
                }), t.init(), D.information("attach prompt data event")
            })
        }
    };
    n([r.Watch("isLogin")], A.prototype, "onLoginChange", null), n([r.Watch("curLoginHeaderUrl", {immediate: !0})], A.prototype, "onHeaderChange", null), n([r.Watch("vipButtonShow")], A.prototype, "onVipButtonShow", null), A = n([r.Component({})], A), t.default = A
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(168), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(717), o = i(24);
    t.default = o.connector.connect({
        mapCommitToProps: {createNewTab: "CREATE_NEW_TAB"},
        mapGettersToProps: {
            currentTab: e => e.currentTab,
            curNav: e => e.currentNav,
            navList: e => e.navList,
            currentNavView: e => e.currentNavView
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(170), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(12), s = i(10), l = i(22), d = i(2), u = i(7), c = i(49), h = i(9), f = i(0), p = i(3),
        g = i(13), m = i(14), v = i(537), y = i(64), T = i(45), w = i(718), k = i(392),
        C = u.default(d.join(__rootDir, "../bin/ThunderHelper.node")),
        b = f.default.getLogger("system-buttons"), {isDef: I} = m.ThunderUtil, S = i(46), _ = i(719);
    let D = !1, A = class extends a.Vue {
        constructor() {
            super(...arguments), this.maximized = !1, this.disableHover = !1, this.showNewIcon = !1, this.communityName = "community", this.blankPage = "新标签页", this.bSelectShowBookmark = !1, this.isShowNewTag = !1, this.isShowMenu = !1, this.showBrowserIcon = !1, this.popTimerId = void 0, this.popShow = !1, this.configurableButton = {
                aid: "",
                isShow: !1,
                title: "",
                img: "",
                imgBeforeClick: "",
                imgAfterClick: "",
                link: "",
                imagePop: "",
                type: "A"
            }, this.gameLink = ""
        }

        get isPopShow() {
            return this.configurableButton.imagePop && this.popShow
        }

        get isGameIconShow() {
        }

        onPopShow(e) {
            e && this.trackVipEvent("sidebar_acti_entrance_bubble_show", {
                aidfrom: this.configurableButton.aid,
                type: this.popTimerId ? "auto" : "hover"
            })
        }

        onGameIconShow(e) {
        }

        onMaximizedChange(e, t) {
        }

        onShowNewTag(e) {
            return o(this, void 0, void 0, function* () {
                if (e) {
                    let e = 0, t = 0, i = 0;
                    try {
                        e = Number(yield p.client.callServerFunction("IsLogined"))
                    } catch (e) {
                        b.warning(e)
                    }
                    try {
                        let e = JSON.parse(yield p.client.callServerFunction("GetUserInfo", 2));
                        I(e) && (i = Number(e.vasType), t = Number(e.isVip))
                    } catch (e) {
                        b.warning(e)
                    }
                    h.XLStatNS.trackEvent("user_info", "clienttop_skincenter_red_show", "", 0, 0, 0, 0, `is_login=${e},is_vip=${t},vip_type=${i},is_red=1`)
                }
            })
        }

        onMenuBlur() {
            this.$nextTick(() => {
                this.isShowMenu = !1
            })
        }

        showMenu(e) {
            if (!this.currentNavView.isEmbeddedBrowser && (this.curNav !== c.NavViewID.Browser || this.currentTab && 1 === this.currentTab.key)) this.isShowMenu = !this.isShowMenu, this.isShowMenu && setTimeout(() => {
                this.$refs.mainMenu && this.$refs.mainMenu.focus()
            }, 200); else {
                let e = document.querySelector(".xly-icon-menu").getBoundingClientRect(), t = screenX + 100 - 10,
                    i = 360, n = screenY + e.bottom - i;
                l.MessageBox.custom("MainMenuView", {
                    showBrowserIcon: this.showBrowserIcon,
                    roundRectWindow: !1,
                    parentId: -1
                }, {
                    transparent: !0,
                    resizable: !1,
                    minimizable: !1,
                    width: 338,
                    height: i,
                    alwaysOnTop: !0,
                    backgroundColor: "#0000",
                    hasShadow: !1,
                    x: t,
                    y: n
                })
            }
        }

        appendUrlParams(e, t) {
            let i = e;
            const n = Object.keys(t || {});
            for (let o = 0; o < n.length; o++) i = -1 === e.indexOf("?") && n.length > 0 && 0 === o ? `${i}?${n[o]}=${t[n[o]]}` : `${i}&${n[o]}=${t[n[o]]}`;
            return i
        }

        isClickedToday(e) {
            let t = !1;
            do {
                if (!e) break;
                let i = new Date, n = y.TimeHelperNS.formatDate(i, "yyyy-MM-dd");
                s.ConfigNS.getValue("SystemButtons", "Ad_TheDate", "") === `${e}_${n}` && (t = !0)
            } while (0);
            return t
        }

        setClickedToday(e) {
            do {
                if (!e) break;
                let t = new Date, i = y.TimeHelperNS.formatDate(t, "yyyy-MM-dd");
                s.ConfigNS.setValue("SystemButtons", "Ad_TheDate", `${e}_${i}`)
            } while (0)
        }

        getConfigurableButton() {
            return o(this, void 0, void 0, function* () {
                const e = yield p.client.callServerFunction("GetVipLabelConfig", "xl11_acti_siderbar_icon");
                do {
                    if (!e) {
                        this.configurableButton.isShow = !1;
                        break
                    }
                    let t = S(e, "xl11_acti_siderbar_icon");
                    if (!t) {
                        this.configurableButton.isShow = !1;
                        break
                    }
                    let i = t.find(e => "image_link_before_click" === e.id);
                    if (!i || !i.img) {
                        this.configurableButton.isShow = !1;
                        break
                    }
                    this.configurableButton.aid = S(t, "0", "aidfrom"), this.configurableButton.title = S(t, "0", "hover"), this.configurableButton.link = this.appendUrlParams(S(t, "0", "url"), {
                        aidfrom: this.configurableButton.aid,
                        referfrom: S(t, "0", "referfrom")
                    });
                    let n = t.find(e => "type" === e.id), o = n ? n.text.toUpperCase() : "A";
                    "A" !== o && "B" !== o && (o = "A"), this.configurableButton.type = o, this.configurableButton.imgBeforeClick = i ? i.img : "";
                    let a = t.find(e => "image_link_after_click" === e.id);
                    if (this.configurableButton.imgAfterClick = a ? a.img : "", "A" === o) {
                        let e = null;
                        try {
                            e = JSON.parse(window.localStorage.getItem("system_buttons_clicked_ad"))
                        } catch (e) {
                        }
                        const t = !!Array.isArray(e) && e.includes(this.configurableButton.aid);
                        this.configurableButton.img = t ? this.configurableButton.imgAfterClick : this.configurableButton.imgBeforeClick
                    } else this.configurableButton.img = this.configurableButton.imgBeforeClick;
                    if (this.configurableButton.isShow = !0, this.trackVipEvent("sidebar_acti_entrance_show", {
                        aidfrom: this.configurableButton.aid,
                        type: "A" === this.configurableButton.type ? "red_packet" : "bubble"
                    }), "A" === this.configurableButton.type) break;
                    let r = t.find(e => "image_pop" === e.id);
                    if (!r || !r.img) break;
                    let s = this.isClickedToday(this.configurableButton.aid);
                    this.configurableButton.imagePop = s ? "" : r.img, this.autoPopHover()
                } while (0)
            })
        }

        autoPopHover() {
            do {
                if (D) break;
                D = !0, this.popShow = !0, this.popTimerId = setTimeout(() => {
                    this.popShow = !1, this.popTimerId = void 0
                }, 5e3)
            } while (0)
        }

        mouseEnterConfigurableButton() {
            do {
                if (this.popTimerId) break;
                this.popShow = !0
            } while (0)
        }

        mouseLeaveConfigurableButton() {
            do {
                if (this.popTimerId) break;
                this.popShow = !1
            } while (0)
        }

        onCloseImagePop() {
            this.setClickedToday(this.configurableButton.aid), this.configurableButton.imagePop = ""
        }

        clickConfigurableButton(e) {
            return o(this, void 0, void 0, function* () {
                let t = "A" === this.configurableButton.type ? "red_packet" : "bubble";
                "sidebar_acti_entrance_bubble_click" === e && (t = this.popTimerId ? "auto" : "hover"), this.trackVipEvent(e, {
                    aidfrom: this.configurableButton.aid,
                    type: t
                }), "A" === this.configurableButton.type && this.configurableButton.imgAfterClick && (this.configurableButton.img = this.configurableButton.imgAfterClick), this.configurableButton.imagePop && this.onCloseImagePop();
                let i = null;
                try {
                    i = JSON.parse(window.localStorage.getItem("system_buttons_clicked_ad"))
                } catch (e) {
                }
                i = Array.isArray(i) ? Array.from(new Set([...i, this.configurableButton.aid])) : [this.configurableButton.aid], window.localStorage.setItem("system_buttons_clicked_ad", JSON.stringify(i)), p.client.callServerFunction("OpenNewTab", this.configurableButton.link)
            })
        }

        openMobileQRCode() {
            l.MessageBox.custom("img-dlg", {src: _, width: 320, height: 420}, {
                width: 320,
                height: 420
            }).catch(), h.XLStatNS.trackEvent("clienttop", "clienleft_phone_click")
        }

        showNewTag() {
            return o(this, void 0, void 0, function* () {
                do {
                    let e = s.ConfigNS.getValue("Skin", "ClickTag", 0), t = new Date,
                        i = yield v.default.getWallpapers();
                    if (i) for (let n of i) if (t.getTime() - n.updated_at < 6048e5 && e < n.updated_at) {
                        this.isShowNewTag = !0;
                        break
                    }
                    if (this.isShowNewTag) break;
                    let n = yield v.default.getCoolWallpapers();
                    if (n) for (let i of n) if (t.getTime() - i.updated_at < 6048e5 && e < i.updated_at) {
                        this.isShowNewTag = !0;
                        break
                    }
                    if (this.isShowNewTag) break;
                    let o = yield v.default.getCoolShakes();
                    if (o) for (let i of o) if (t.getTime() - i.updated_at < 6048e5 && e < i.updated_at) {
                        this.isShowNewTag = !0;
                        break
                    }
                } while (0)
            })
        }

        showIndividuation() {
            return o(this, void 0, void 0, function* () {
                let e = 0, t = 0, i = 0;
                try {
                    e = Number(yield p.client.callServerFunction("IsLogined"))
                } catch (e) {
                    b.warning(e)
                }
                try {
                    let e = JSON.parse(yield p.client.callServerFunction("GetUserInfo", 2));
                    I(e) && (i = Number(e.vasType), t = Number(e.isVip))
                } catch (e) {
                    b.warning(e)
                }
                let n = this.isShowNewTag ? 1 : 0;
                if (this.isShowNewTag) {
                    let e = new Date;
                    s.ConfigNS.setValue("Skin", "ClickTag", e.getTime()), this.isShowNewTag = !1
                }
                h.XLStatNS.trackEvent("user_info", "personalized_center_entrance", "", 0, 0, 0, 0, `is_login=${e},is_vip=${t},vip_type=${i},source=right_corner,is_red=${n}`), yield p.client.callServerFunction("ShowIndividuation")
            })
        }

        trackVipEvent(e, t) {
            return o(this, void 0, void 0, function* () {
                let i = 0, n = 0;
                try {
                    i = Number(yield p.client.callServerFunction("IsLogined"))
                } catch (e) {
                    b.warning(e)
                }
                try {
                    let e = JSON.parse(yield p.client.callServerFunction("GetUserInfo", 2));
                    I(e) && (n = Number(e.vasType))
                } catch (e) {
                    b.warning(e)
                }
                let o = d.join(__rootDir, "../../Thunder.exe"),
                    a = `is_login=${i},vip_type=${n},client_version=${C.getFileVersion(o)}`;
                for (let e in t) a += `,${e}=${t[e]}`;
                h.XLStatNS.trackEvent("xlx_vip_event", e, "", 0, 0, 0, 0, a), b.information("trackEvent", e, a)
            })
        }

        clickVipCenter() {
            return o(this, void 0, void 0, function* () {
                p.client.callServerFunction("OpenNewTab", "https://vip.xunlei.com/?referfrom=v_pc_xlx_ggong_sidebar_hygw"), this.trackVipEvent("sidebar_hygw_entrance_click")
            })
        }

        clickGameCenter() {
        }

        getGameConfig() {
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                setTimeout(() => o(this, void 0, void 0, function* () {
                    yield this.getConfigurableButton(), p.client.attachServerEvent("OnLoginStatusChange", () => {
                        this.getConfigurableButton()
                    }), (yield k.BrowserHelperNs.getInfos()).forEach((e, t) => {
                        e.browserExist && (this.showBrowserIcon = !0)
                    })
                }), 3e3), s.ConfigNS.attachListener(g.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    this.showNewTag()
                }), this.trackShow(), p.client.attachServerEvent("OnMainWindowVisibleChange", e => o(this, void 0, void 0, function* () {
                    this.trackShow()
                })), this.getGameConfig().catch()
            })
        }

        trackShow() {
            return o(this, void 0, void 0, function* () {
                let e = yield r.asyncRemoteCall.getCurrentWindow(), t = yield e.isMinimized(), i = yield e.isVisible();
                e && !t && i && this.trackVipEvent("sidebar_hygw_entrance_show")
            })
        }
    };
    n([a.Prop({})], A.prototype, "createNewTab", void 0), n([a.Prop()], A.prototype, "curNav", void 0), n([a.Prop()], A.prototype, "navList", void 0), n([a.Prop()], A.prototype, "currentNavView", void 0), n([a.Prop()], A.prototype, "currentTab", void 0), n([a.Watch("isPopShow")], A.prototype, "onPopShow", null), n([a.Watch("isGameIconShow")], A.prototype, "onGameIconShow", null), n([a.Watch("maximized")], A.prototype, "onMaximizedChange", null), n([a.Watch("isShowNewTag")], A.prototype, "onShowNewTag", null), A = n([a.Component({components: {MainMenu: w.default}})], A), t.default = A
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(172), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(9), r = i(3), s = i(7), l = i(18), d = i(2), u = i(0).default.getLogger("system-buttons"),
        c = s.default(d.join(__rootDir, "../bin/ThunderHelper.node")), h = i(6);
    let f = class extends h.Vue {
        constructor() {
            super(...arguments), this.downloadCompleteTaskType = -1, this.showNewIcon = !1
        }

        get scheduleText() {
            switch (this.downloadCompleteTaskType) {
                case 0:
                    return "(关机)";
                case 1:
                    return "(睡眠)";
                case 2:
                    return "(退出)";
                default:
                    return ""
            }
            return ""
        }

        clickBrowserHelper() {
        }

        clickXmp() {
        }

        clickNewTask() {
            r.client.callServerFunction("CreatePreNewTaskWindow"), a.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=newtask"), this.$emit("update:isShowMenu", !1)
        }

        clickUnfinished() {
            r.client.callServerFunction("ImportUncompleted"), a.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=unfinished"), this.$emit("update:isShowMenu", !1)
        }

        clickDownloadDetectTools() {
        }

        clickSetting() {
            r.client.callServerFunction("OpenSettingCenter"), a.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=setting"), this.$emit("update:isShowMenu", !1)
        }

        clickFeedback() {
        }

        clickCheckUpdate() {
        }

        clickAboutThunder() {
            return o(this, void 0, void 0, function* () {
                r.client.callServerFunction("MessageBoxCustom", "About", {
                    windowWidth: 450,
                    windowHeight: 296
                }), a.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=more_about"), this.$emit("update:isShowMenu", !1)
            })
        }

        clickCustomHelp() {
        }

        clickThunderBbs() {
        }

        clickPrivacy() {
        }

        clickQuit() {
            r.client.callServerFunction("ExitThunder"), a.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=quit"), this.$emit("update:isShowMenu", !1)
        }

        clickSchedutleTask(e) {
            return o(this, void 0, void 0, function* () {
                this.downloadCompleteTaskType = yield r.client.callServerFunction("GetDownloadCompleteTaskType"), e === this.downloadCompleteTaskType ? yield r.client.callServerFunction("CancelDownloadCompleteTask") : yield r.client.callServerFunction("SetDownloadCompleteTaskType", e);
                a.XLStatNS.trackEvent("clienttop", "clienttop_dropdownlist_click", "", 0, 0, 0, 0, "button=" + ["dl_finish_switch_off", "dl_finish_sleep", "dl_finish_quit"][e]), this.$emit("update:isShowMenu", !1)
            })
        }

        loadUpgradeConfig(e) {
            return o(this, void 0, void 0, function* () {
                if (0 === e.code && e.data) if (e.data.md5 && e.data.t) {
                    (yield r.client.callServerFunction("GetValue", "XLUpdate", "UpdateMd5", "")) !== e.data.md5 && 2 === parseInt(e.data.t, 10) && (yield r.client.callServerFunction("SetValue", "XLUpdate", "UpdateMd5", e.data.md5), yield r.client.callServerFunction("SetValue", "XLUpdate", "ShowMainUpdateIcon", !0), yield r.client.callServerFunction("SetValue", "XLUpdate", "ShowMenuUpdateIcon", !0)), (yield r.client.callServerFunction("GetValue", "XLUpdate", "ShowMainUpdateIcon", !0)) && (this.showNewIcon = !0)
                } else yield r.client.callServerFunction("SetValue", "XLUpdate", "UpdateMd5", ""), yield r.client.callServerFunction("SetValue", "XLUpdate", "ShowMainUpdateIcon", !1), yield r.client.callServerFunction("SetValue", "XLUpdate", "ShowMenuUpdateIcon", !1); else yield r.client.callServerFunction("SetValue", "XLUpdate", "UpdateMd5", ""), yield r.client.callServerFunction("SetValue", "XLUpdate", "ShowMainUpdateIcon", !1), yield r.client.callServerFunction("SetValue", "XLUpdate", "ShowMenuUpdateIcon", !1)
            })
        }

        checkUpgrade() {
        }

        listenKeyDown(e) {
            e && (e.altKey || e.ctrlKey || e.shiftKey || ("x" === e.key ? this.clickQuit() : "n" === e.key && this.clickNewTask()))
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                this.downloadCompleteTaskType = yield r.client.callServerFunction("GetDownloadCompleteTaskType"), setTimeout(() => {
                    this.checkUpgrade()
                }, 5e3), a.XLStatNS.trackEvent("clienttop", "clienttop_main_menu_click", "", 0, 0, 0, 0), document.addEventListener("keydown", this.listenKeyDown)
            })
        }

        beforeDestroy() {
            document.removeEventListener("keydown", this.listenKeyDown)
        }
    };
    n([h.Prop()], f.prototype, "isShowMenu", void 0), n([h.Prop({default: !0})], f.prototype, "showBrowserIcon", void 0), f = n([h.Component({components: {}})], f), t.default = f
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(174), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(738), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            tabs: e => e.Tabs.tabs,
            currentTabId: e => e.Tabs.current,
            preloadPath: e => `file:///${__rootDir}/out/common-preload.js`,
            formData: e => e.SettingConf.formData,
            confSchema: e => e.SettingConf.confSchema
        },
        mapCommitToProps: {
            setConfigValue: "SET_CONFIG_VALUE",
            createNewTab: "CREATE_NEW_TAB",
            selectNav: "SELECT_NAV",
            showOrHideBrowser: "SHOW_OR_HIDE_BROWSER",
            showOrHiedEmbeddedBrowser: "SHOW_OR_HIDE_EMBEDDED_BROWSER",
            addNavUnreadNum: "ADD_NAV_UNREAD_NUM",
            setNavUnreadNum: "SET_NAV_UNREAD_NUM",
            setNavShowUnreadNum: "SET_NAV_SHOW_UNREAD_NUM",
            setNavShowRedDot: "SET_NAV_SHOW_RED_DOT",
            setSettingCenterStatus: "SET_SETTING_CENTER_STATUS"
        },
        mapDispatchToProps: {selectTab: "selectTab", getUnreadNums: "getUnreadNums"},
        mapGettersToProps: {
            currentTab: e => e.currentTab,
            curNav: e => e.currentNav,
            currentNavView: e => e.currentNavView,
            showTabs: e => e.showTabs,
            startTaskCount: e => e.startTaskCount,
            messageUnreadNum: e => e.messageUnreadNum
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(176), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(739), s = i(74), l = i(746), d = i(757), u = i(49), c = i(23), h = i(3), f = i(15), p = i(70),
        g = i(113), m = i(17), v = i(397), y = i(147), T = i(84), w = i(78), k = i(115), C = i(0), b = i(10), I = i(22),
        S = i(9), _ = g.PluginWebviewMgrNS.getWebViewMgr(), D = C.default.getLogger("main-body"),
        A = k.MsgQueueManagerNS.MsgQueue.getInstance().getQueue("notification"), N = i(46);
    let x = class extends a.Vue {
        constructor() {
            super(...arguments), this.text = "", this.isLogined = !1, this.settingTab = !1, this.lastTabId = 0, this.timeoutMessagePageClose = void 0, this.isMessagePageLoaded = !1, this.messageWebViewInfo = {}, this.isSetXmpPause = !1, this.curUid = "", this.eventSyncMessage = -1, this.eventThunderImTotalUreadChange = -1, this.eventOnConfigValueChanged = -1, this.notifyDuration = 5e3, this.width = 300, this.height = 100, this.communityMsgProperty = w.MsgQueueNS.MsgPriority.Community, this.isMsgTipsShowing = !1, this.settingNotifyFlag = !0, this.eventThunderImPluginReady = -1, this.messageList = [], this.userSilentList = {}, this.globalSilentFlag = !1, this.isThunderImPluginReady = !1, this.messageDataToOpen = void 0, this.isShowGroupMessage = !1, this.hasShowLatestMessageBox = !1, this.timerMsgTipsShow = void 0, this.isEmbeddedBrowserViewCreated = !1
        }

        onCurNavChange(e, t) {
            if (f.server.fireClientEvent("OnCurNavChange", e, t), e === u.NavViewID.Cloud && !this.isLogined) {
                let e = "yunpan_tab";
                c.LoginHelperNS.loginHelper.showLoginDlg(e, !0)
            }
            e === u.NavViewID.Browser ? this.setNavUnreadNum({
                nav: u.NavViewID.Browser,
                unReadNum: 0
            }) : this.setNavUnreadNum({
                nav: u.NavViewID.Browser,
                unReadNum: this.getBrowserTabCount()
            }), this.$nextTick(() => {
                this.currentNavView.isEmbeddedBrowser && (this.isEmbeddedBrowserViewCreated = !0)
            })
        }

        getBrowserTabCount() {
            let e = 0;
            if (this.showTabs) for (let t = 0; t < this.showTabs.length; ++t) this.showTabs[t].tab && this.showTabs[t].tab.getTabType() === s.TabType.Chromium && e++;
            return e
        }

        oncurrentTabIdChange() {
            0 !== this.currentTabId && (this.settingTab = !1)
        }

        onStartTaskCountChange(e) {
            this.setNavUnreadNum({nav: u.NavViewID.Download, unReadNum: e || 0})
        }

        onSettingTabChange(e) {
            return o(this, void 0, void 0, function* () {
                this.setSettingCenterStatus(e);
                let t = yield h.client.callServerFunction("GetXmpMode");
                !0 === this.settingTab ? t !== p.XMPShowMode.MINI_MODE && t !== p.XMPShowMode.EMBED_CHILD_MODE || (h.client.callServerFunction("SetXmpPause"), this.isSetXmpPause = !0) : this.isSetXmpPause && (t !== p.XMPShowMode.MINI_MODE && t !== p.XMPShowMode.EMBED_CHILD_MODE || (h.client.callServerFunction("SetXmpPlay"), this.isSetXmpPause = !1))
            })
        }

        onMessageListChange(e, t) {
            e > 0 && 0 === t && this.curNav !== u.NavViewID.Message ? (h.client.callServerFunction("FlashMessageTray", () => {
                this.openMessagePage(), S.XLStatNS.trackEvent("community", "message_tray_flicker_click", "", 0, 0, 0, 0)
            }), S.XLStatNS.trackEvent("community", "message_tray_flicker_show", "", 0, 0, 0, 0)) : (0 === e && t > 0 || this.curNav === u.NavViewID.Message) && h.client.callServerFunction("DisFlashMessageTray")
        }

        get messageListLength() {
            return this.messageList.length || 0
        }

        get messageElementId() {
            return this.messageWebViewInfo.id || ""
        }

        get messagePageUrl() {
            return this.messageWebViewInfo.src || ""
        }

        get panViewShow() {
            return "pan-plugin" === N(this.currentTab, "tab", "name") && N(this.currentTab, "tab", "type") === s.TabType.XDAS
        }

        get panStyle() {
            let e = !1;
            return e = !(!(this.curNav === u.NavViewID.Cloud) || this.settingTab)
        }

        get findPageStyle() {
            let e = !1;
            return e = !(!(this.curNav === u.NavViewID.Browser) || this.settingTab)
        }

        get messagePageStyle() {
            let e = !1;
            return e = !(!(this.curNav === u.NavViewID.Message) || this.settingTab), this.curNav === u.NavViewID.Message ? (A.clearQueuesByName("community"), void 0 !== this.timeoutMessagePageClose && (clearTimeout(this.timeoutMessagePageClose), this.timeoutMessagePageClose = void 0), this.isMessagePageLoaded = !0) : void 0 === this.timeoutMessagePageClose && (this.timeoutMessagePageClose = setTimeout(() => {
                this.isMessagePageLoaded = !1, this.isThunderImPluginReady = !1
            }, 3e5)), e
        }

        get embeddedPageStyle() {
            return !!this.currentNavView.isEmbeddedBrowser
        }

        closeSettingCenter() {
            this.settingTab = !1, this.curNav === u.NavViewID.Browser ? this.showOrHideBrowser(!0) : this.currentNavView.isEmbeddedBrowser && this.$nextTick(() => {
                this.showOrHiedEmbeddedBrowser({nav: this.curNav, show: !0})
            }), f.server.fireClientEvent("OnOpenOrCloseSettingCenter", !1)
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                h.client.attachServerEvent("OnLoginSuc", (e, ...t) => {
                    this.isLogined = !0
                }), h.client.attachServerEvent("OnLogout", (e, ...t) => {
                    this.isLogined = !1
                }), h.client.attachServerEvent("OnAppTrapMouseMoveEvent", (e, ...t) => {
                    let i = t[0];
                    this.messageListLength > 0 && !this.hasShowLatestMessageBox && (this.hasShowLatestMessageBox = !0, I.MessageBox.custom("LatestMessages", {
                        windowWidth: 160,
                        windowHeight: 72 + 30 * this.messageListLength,
                        singleton: !0,
                        parentId: -1
                    }, {
                        x: i.x - 160,
                        y: i.y - (72 + 30 * this.messageListLength),
                        alwaysOnTop: !0,
                        skipTaskbar: !0
                    }).then(e => {
                        this.hasShowLatestMessageBox = !1
                    }))
                }), this.isLogined = yield c.LoginHelperNS.loginHelper.isLoginedAw(), f.server.registerFunctions({
                    GetCurrentNav: (e, t, ...i) => this.curNav,
                    SelectNav: (e, t, ...i) => {
                        let n = i[0];
                        n && this.selectNav(n)
                    },
                    SetNavUnreadNum: (e, t, ...i) => {
                        let n = i[0];
                        n && this.setNavUnreadNum({nav: n, unReadNum: i[1] || 0})
                    },
                    OpenSettingCenter: (e, t, ...i) => o(this, void 0, void 0, function* () {
                        this.showOrHideBrowser(!1), this.currentNavView.isEmbeddedBrowser && this.showOrHiedEmbeddedBrowser({
                            nav: this.curNav,
                            show: !1
                        }), this.settingTab = !0, f.server.fireClientEvent("OnOpenOrCloseSettingCenter", !0)
                    }),
                    CloseSettingCenter: (e, t, ...i) => {
                        this.settingTab = !1, f.server.fireClientEvent("OnOpenOrCloseSettingCenter", !1)
                    },
                    IsSettingCenterOpened: (e, t, ...i) => o(this, void 0, void 0, function* () {
                        return this.settingTab
                    }),
                    ShowMessageToast: (e, t, ...i) => {
                        if (!i || i.length < 1) return;
                        let n = i[0];
                        n && void 0 === n.duration && (n.duration = 3e3), n && void 0 === n.position && (n.position = "middle"), this.$message(n)
                    },
                    "Main-Renderer-ThunderIMSetUnreadMessageList": this.setUnReadMessageList.bind(this),
                    "Main-Renderer-ThunderIMGetUnReadMessageList": this.getUnReadMessageList.bind(this),
                    "Main-Renderer-ThunderIMGetMessageUnreadNum": this.getMessageUnreadNum.bind(this),
                    "Main-Renderer-ThunderIMOpenUnreadMessage": this.openUnreadMessage.bind(this),
                    "Main-Renderer-ThunderIMSetUserSilentFlag": this.setUserSilentFlag.bind(this),
                    "Main-Renderer-ThunderIMSetGlobalSilentFlag": this.setGlobalSilentFlag.bind(this)
                }), this.messageWebViewInfo = _.getWebViewInfo("ThunderIM"), void 0 === this.messageWebViewInfo.id && h.client.attachServerEvent("CreateMessageWebViewEnd", () => {
                    this.messageWebViewInfo = _.getWebViewInfo("ThunderIM")
                }), this.initMessage()
            })
        }

        initMessage() {
            return o(this, void 0, void 0, function* () {
                this.curUid = yield h.client.callServerFunction("GetUserID"), "" !== this.curUid && this.getUnreadNums(this.curUid), m.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => {
                    D.information("onLoginSuc uid", e), this.curUid = e, setTimeout(() => o(this, void 0, void 0, function* () {
                        v.getUserSilenceList().then(e => {
                            for (let t of e) this.userSilentList[t.group_id] = t.enable
                        }), v.getGlobalSilenceFlag().then(e => {
                            this.globalSilentFlag = e
                        }), this.isShowGroupMessage = (yield h.client.callServerFunction("GetRemoteGlobalConfigValue", "main", "message", {ShowGroupMessage: !1})).ShowGroupMessage, this.setConfNotifyFlag(), this.isMessagePageLoaded || this.getUnreadNums(this.curUid), this.eventSyncMessage = h.client.attachServerEvent("SyncMessage", (e, t) => o(this, void 0, void 0, function* () {
                            try {
                                "string" == typeof t && (t = JSON.parse(t)), D.information("### syncMessage ", t);
                                do {
                                    if ("/user/me/group_chat" !== t.subject) break;
                                    let e = N(t, "data", "sender");
                                    if (String(e) === this.curUid) break;
                                    let i = t.data;
                                    if (i.group && i.group.class !== E.GroupChat && i.group.class !== E.PrivateChat) break;
                                    if (i.record && 1 !== i.record.class) break;
                                    if (!this.isShowGroupMessage && i.group.class === E.GroupChat) break;
                                    if (this.isSilentMessage(i)) break;
                                    this.isMessagePageLoaded || "/user/me/group_chat" !== t.subject || (this.addNavUnreadNum(u.NavViewID.Message), this.enqueueMessageList(i));
                                    let n = O.PrivateMessage, o = N(t, "data", "record", "content");
                                    if (i.group.class === E.GroupChat) {
                                        let e = this.isReferCurrentUser(i.record.extra),
                                            t = !e && this.isAtCurrentUser(i.record.content);
                                        if (o = this.replaceAtMessage(i.record.content), e) n = O.ReferMessage; else {
                                            if (!t) break;
                                            n = O.AtMessage
                                        }
                                    }
                                    let a = yield h.client.callServerFunction("GetMainWindowStates");
                                    if (this.curNav !== u.NavViewID.Message && this.settingNotifyFlag && "/user/me/group_chat" === N(t, "subject") || !a.visible || a.minimized) {
                                        let a = parseInt(N(t, "id"), 10), r = N(t, "data", "group", "name"),
                                            s = N(t, "data", "group", "avatar"), l = N(t, "data", "group", "id"), d = {
                                                msgType: n,
                                                msgid: a,
                                                userId: e,
                                                userName: r,
                                                userAvatar: s,
                                                messageContent: o,
                                                createTime: N(t, "data", "record", "created_at"),
                                                groupId: l
                                            }, u = yield y.NotificationNS.getCurrentWindowType(), c = {
                                                type: T.Notification.TipsType.CommunityGroupTips,
                                                duration: this.notifyDuration,
                                                data: {communityMsgs: [d], msgType: 0},
                                                width: i.group.class === E.PrivateChat ? this.width : 300,
                                                height: i.group.class === E.PrivateChat ? this.height : 100
                                            };
                                        if (u === T.Notification.TipsType.CommunityGroupTips) {
                                            f.server.fireClientEvent("OnThunderIMDataChange", c), y.NotificationNS.setTimer(this.notifyDuration);
                                            break
                                        }
                                        A.clearQueuesByName("community"), A.enQueue({
                                            callback: () => {
                                                y.NotificationNS.notify(c).catch()
                                            }, name: "community", priority: this.communityMsgProperty
                                        });
                                        let h = !(yield y.NotificationNS.getCurrentWindow());
                                        h && !this.isMsgTipsShowing && (D.information("deQueue", h), A.deQueue(), this.isMsgTipsShowing = !0, this.timerMsgTipsShow = setTimeout(() => {
                                            this.isMsgTipsShowing = !1
                                        }, this.notifyDuration))
                                    }
                                } while (0)
                            } catch (e) {
                                D.warning(e)
                            }
                        })), this.eventThunderImTotalUreadChange = h.client.attachServerEvent("ThunderImTotalUreadChange", (e, t) => {
                            this.isMessagePageLoaded && this.setNavUnreadNum({
                                nav: u.NavViewID.Message,
                                unReadNum: t || 0
                            })
                        }), this.eventThunderImPluginReady = h.client.attachServerEvent("ThunderImPluginReady", () => o(this, void 0, void 0, function* () {
                            this.isThunderImPluginReady = !0, this.messageDataToOpen && (f.server.fireClientEvent("ThunderImOpenMessage", this.messageDataToOpen), this.messageDataToOpen = null)
                        }))
                    }), 1e3);
                    let t = b.ConfigNS.getValue("UserCommunitySet", `radio_id_${e}`, !0);
                    D.information("setting-center:handleConfChange", t), "1" === t ? t = !0 : "3" === t && (t = !1), b.ConfigNS.setValue("UserCommunitySet", "radio_id_", t), this.handleConfChange(t, "UserCommunitySet-radio_id_")
                }), m.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                    D.information("OnLogout"), this.curUid = "", this.setNavUnreadNum({
                        nav: u.NavViewID.Message,
                        unReadNum: 0
                    }), -1 !== this.eventSyncMessage && h.client.detachServerEvent("SyncMessage", this.eventSyncMessage), -1 !== this.eventThunderImTotalUreadChange && h.client.detachServerEvent("ThunderImTotalUreadChange", this.eventThunderImTotalUreadChange), -1 !== this.eventThunderImPluginReady && h.client.detachServerEvent("ThunderImPluginReady", this.eventThunderImPluginReady), A.clearQueuesByName("community"), this.messageList = []
                }), -1 === this.eventOnConfigValueChanged && (this.eventOnConfigValueChanged = h.client.attachServerEvent("OnConfigValueChanged", (e, ...t) => {
                    !t || t.length < 4 || "UserCommunitySet" === t[0] && t[1] === `radio_id_${this.curUid}` && this.setConfNotifyFlag()
                }))
            })
        }

        getUnreadNums(e) {
            return o(this, void 0, void 0, function* () {
                return D.information("getUnreadNums"), v.getUnreadMsgNum(e).then(e => {
                    if (!e.error && "ok" === e.data.result) {
                        let t = N(e, "data", "data", "chitchat");
                        this.isMessagePageLoaded || (D.information("获取未读数消息", e, t), this.setNavUnreadNum({
                            nav: u.NavViewID.Message,
                            unReadNum: t || 0
                        }))
                    }
                }).catch(e => {
                    D.information("getUnreadNums error")
                })
            })
        }

        setConfNotifyFlag() {
            this.settingNotifyFlag = b.ConfigNS.getValue("UserCommunitySet", `radio_id_${this.curUid}`, !0), "1" === this.settingNotifyFlag ? this.settingNotifyFlag = !0 : "3" === this.settingNotifyFlag && (this.settingNotifyFlag = !1), this.setNavShowRedDot({
                nav: u.NavViewID.Message,
                show: !this.settingNotifyFlag
            })
        }

        enqueueMessageList(e) {
            let t = {
                msg_id: e.record.id,
                group_id: e.group.id,
                user_id: String(e.record.sender),
                class_type: e.group.class,
                title: e.group.name,
                avatar: e.group.avatar,
                unread_num: e.unread_num
            };
            for (let e = 0; e < this.messageList.length; e++) if (this.messageList[e].group_id === t.group_id) {
                this.messageList.splice(e, 1);
                break
            }
            this.messageList.unshift(t), this.messageList.length > 3 && this.messageList.pop()
        }

        isAtCurrentUser(e) {
            let t = !1;
            {
                let i = "@[所有人]", n = "@[" + this.curUid + "]";
                "" !== this.curUid && (-1 !== e.indexOf(i) ? t = !0 : -1 !== e.indexOf(n) && (t = !0))
            }
            return t
        }

        replaceAtMessage(e) {
            let t = e;
            return t = (t = t.replace("@[所有人] ", "@")).replace(/\@\[\d*\] /g, "@")
        }

        isReferCurrentUser(e) {
            let t = !1;
            try {
                let i = JSON.parse(e);
                i && String(i.refer_uid) === this.curUid && (t = !0)
            } catch (e) {
            }
            return t
        }

        isSilentMessage(e) {
            let t = !1;
            do {
                if (this.globalSilentFlag) {
                    t = !0;
                    break
                }
                let i = e.group.id;
                this.userSilentList[i] && (t = !0)
            } while (0);
            return t
        }

        setUnReadMessageList(e, t, i) {
            return o(this, void 0, void 0, function* () {
                this.messageList = i
            })
        }

        getUnReadMessageList(e, t) {
            return o(this, void 0, void 0, function* () {
                return this.messageList
            })
        }

        setUserSilentFlag(e, t, i) {
            return o(this, void 0, void 0, function* () {
                this.userSilentList = i
            })
        }

        setGlobalSilentFlag(e, t, i) {
            return o(this, void 0, void 0, function* () {
                this.globalSilentFlag = i
            })
        }

        getMessageUnreadNum() {
            return o(this, void 0, void 0, function* () {
                return this.messageUnreadNum
            })
        }

        openUnreadMessage(e, t, i, n, a, r) {
            return o(this, void 0, void 0, function* () {
                this.isThunderImPluginReady ? f.server.fireClientEvent("ThunderImOpenMessage", {
                    groupId: i,
                    classType: a,
                    msgId: n,
                    from: r
                }) : this.messageDataToOpen = {groupId: i, classType: a, msgId: n, from: r}, this.openMessagePage()
            })
        }

        openMessagePage() {
            return o(this, void 0, void 0, function* () {
                h.client.callServerFunction("BringMainWndToTop").catch(), this.selectNav(u.NavViewID.Message)
            })
        }

        handleConfChange(e, t = "") {
            if ("" === t || void 0 === this.formData[t]) return;
            let i = void 0 !== this.formData[t].isReleventUser ? this.curUid : "",
                n = {section: this.formData[t].section, key: this.formData[t].key, value: e, name: t, userId: i};
            this.setConfigValue(n)
        }
    };
    var E, O;
    n([a.Prop({})], x.prototype, "setConfigValue", void 0), n([a.Prop({})], x.prototype, "formData", void 0), n([a.Prop({})], x.prototype, "confSchema", void 0), n([a.Prop()], x.prototype, "curNav", void 0), n([a.Prop({})], x.prototype, "currentTab", void 0), n([a.Prop({})], x.prototype, "currentTabId", void 0), n([a.Prop({})], x.prototype, "showTabs", void 0), n([a.Prop({})], x.prototype, "startTaskCount", void 0), n([a.Prop({})], x.prototype, "selectNav", void 0), n([a.Prop({})], x.prototype, "selectTab", void 0), n([a.Prop({})], x.prototype, "createNewTab", void 0), n([a.Prop({})], x.prototype, "showOrHideBrowser", void 0), n([a.Prop()], x.prototype, "currentNavView", void 0), n([a.Prop()], x.prototype, "showOrHiedEmbeddedBrowser", void 0), n([a.Prop()], x.prototype, "setNavUnreadNum", void 0), n([a.Prop()], x.prototype, "addNavUnreadNum", void 0), n([a.Prop()], x.prototype, "messageUnreadNum", void 0), n([a.Prop()], x.prototype, "setNavShowUnreadNum", void 0), n([a.Prop()], x.prototype, "setNavShowRedDot", void 0), n([a.Prop()], x.prototype, "setSettingCenterStatus", void 0), n([a.Watch("curNav", {immediate: !0})], x.prototype, "onCurNavChange", null), n([a.Watch("currentTabId")], x.prototype, "oncurrentTabIdChange", null), n([a.Watch("startTaskCount")], x.prototype, "onStartTaskCountChange", null), n([a.Watch("settingTab")], x.prototype, "onSettingTabChange", null), n([a.Watch("messageListLength")], x.prototype, "onMessageListChange", null), x = n([a.Component({
        components: {
            MainTopContainer: r.default,
            PanPluginView: () => Promise.resolve().then(() => i(760)),
            DownloadPanel: () => Promise.resolve().then(() => i(762)),
            FindPage: l.default,
            MessagePage: d.default,
            SettingViewContainer: () => Promise.resolve().then(() => i(897)),
            embeddedBrowserViewContainer: () => Promise.resolve().then(() => i(912))
        }
    })], x), t.default = x, function (e) {
        e[e.PrivateChat = 1] = "PrivateChat", e[e.GroupChat = 3] = "GroupChat"
    }(E || (E = {})), function (e) {
        e[e.PrivateMessage = 1] = "PrivateMessage", e[e.AtMessage = 2] = "AtMessage", e[e.ReferMessage = 3] = "ReferMessage"
    }(O || (O = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(178), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(740), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {tabs: e => e.Tabs.tabs.filter(e => !e.tab.hideUI)},
        mapCommitToProps: {},
        mapDispatchToProps: {closeTabByName: "closeTabByName", selectTab: "selectTab"},
        mapGettersToProps: {
            hideTabs: e => e.hideTabs,
            curNav: e => e.currentNav,
            navList: e => e.navList,
            currentNavView: e => e.currentNavView
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(180), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(0), r = i(6), s = i(9), l = i(399), d = i(19), u = i(28), c = i(35), h = i(12), f = i(15), p = i(3),
        g = i(39), m = i(49), v = i(23);
    i(994);
    const y = a.default.getLogger("main-top-search");
    let T = class extends r.Vue {
        constructor() {
            super(...arguments), this.text = "", this.disableHover = !1, this.maximized = !1, this.dragable = !0, this.isPopupMenu = !1, this.allowUploadFolder = !1, this.isInSafeSpace = !1
        }

        onUserLogin() {
            return o(this, void 0, void 0, function* () {
                if (!this.isLogined) return void (this.allowUploadFolder = !1);
                let e = p.client.attachServerEvent("ThunderPanPluginReady", () => o(this, void 0, void 0, function* () {
                    p.client.detachServerEvent("ThunderPanPluginReady", e);
                    let t = yield f.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcCheckPrivilege", "upload_folder");
                    t && t[0] && "ACCEPTED" === t[0].result && (this.allowUploadFolder = !0)
                }))
            })
        }

        clickRefresh() {
            do {
                if (!this.currentEmbeddedTab || !this.currentEmbeddedTab.tab) break;
                this.currentEmbeddedTab.tab.refresh(!1)
            } while (0)
        }

        clickGoBack() {
            do {
                if (!this.currentEmbeddedTab || !this.currentEmbeddedTab.tab) break;
                this.currentEmbeddedTab.tab.goBack()
            } while (0)
        }

        clickGoForward() {
            do {
                if (!this.currentEmbeddedTab || !this.currentEmbeddedTab.tab) break;
                this.currentEmbeddedTab.tab.goForward()
            } while (0)
        }

        get canGoBack() {
            return this.currentEmbeddedTab && this.currentEmbeddedTab.tab && this.currentEmbeddedTab.tab.canGoBack || !1
        }

        get canGoForward() {
            return this.currentEmbeddedTab && this.currentEmbeddedTab.tab && this.currentEmbeddedTab.tab.canGoForward || !1
        }

        get currentEmbeddedTab() {
            return this.currentNavView && this.currentNavView.isEmbeddedBrowser ? this.hideTabs.find(e => e.tab.name === this.currentNavView.key) : null
        }

        get transferringTasksCount() {
            let e = 0, t = this.navList.findIndex(e => e.key === m.NavViewID.Cloud);
            return -1 !== t && (e = this.navList[t].unReadNum), e
        }

        get isFindPage() {
        }

        get isSearchPage() {
            return "pan-plugin-view" === this.curNav || "download-panel" === this.curNav
        }

        get buttonText() {
            return "download-panel" === this.curNav ? "新建" : "添加"
        }

        closeMainWindow() {
            return o(this, void 0, void 0, function* () {
                s.XLStatNS.trackEvent("clienttop", "clienttop_close_click"), this.disableHover = !0, yield l.QuitMessageBoxMgrNS.popupCreateShortcutMessageBox(), this.$nextTick(() => {
                    d.ipcRenderer.send("closeMainWindow")
                })
            })
        }

        minizeMainWindow(e) {
            this.disableHover = !0;
            let t = encodeURIComponent("button=small_get");
            s.XLStatNS.trackEvent("clienttop", "clienttop_maxminum_click", "", 0, 0, 0, 0, t), this.$nextTick(() => {
                d.ipcRenderer.send("minizeMainWindow")
            })
        }

        popupMenu() {
            return o(this, void 0, void 0, function* () {
                if ("download-panel" === this.curNav) return g.ThunderNewTask.createPreNewTaskWindow(null, "download");
                {
                    let e = yield p.client.callRemoteClientFunction("ThunderPanPluginWebview", "IpcInSafeSpace");
                    y.information("is In Safe Space: ", e), e && null !== e[0] && void 0 !== e[0] && (this.isInSafeSpace = !!e[0]), this.isPopupMenu = !0, setTimeout(() => {
                        this.$refs.menuButton.focus()
                    }, 100)
                }
                let e = v.LoginHelperNS.loginHelper.getVipInfo();
                s.XLStatNS.trackEvent("pc_yunpan", "top_operation_click", "", 0, 0, 0, 0, `clickid=add,is_safebox=${this.isInSafeSpace ? 1 : 0},vip_type=${e.vasType},is_year=${e.isYear}`)
            })
        }

        onBlur() {
            this.isPopupMenu = !1
        }

        uploadLocalFiles() {
            this.isPopupMenu = !1, y.information("uploadLocalFiles"), f.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcUploadLocalFiles", "file"), this.trackEvent_topAddBtnChildClick("local_upload")
        }

        uploadLocalDir() {
            this.isInSafeSpace || (this.isPopupMenu = !1, y.information("uploadLocalDir"), f.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcUploadLocalFiles", "dir"), this.trackEvent_topAddBtnChildClick("local_upload_dir"))
        }

        addLink() {
            this.isInSafeSpace || (this.isPopupMenu = !1, y.information("addLink"), g.ThunderNewTask.createPreNewTaskWindow(null, "yunpan"), this.trackEvent_topAddBtnChildClick("link"))
        }

        addBt() {
            this.isInSafeSpace || (this.isPopupMenu = !1, y.information("addBt"), p.client.callServerFunction("ImportTorrent", {clickFrom: "yunpan"}), this.trackEvent_topAddBtnChildClick("BT_link"))
        }

        createFolder() {
            this.isPopupMenu = !1, y.information("createFolder"), this.$nextTick(() => {
                document.getElementById("webview_home-1EAC214F-7644-4163-9EB8-AF4BAA62D144").focus(), f.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcCreateFolder")
            }), this.trackEvent_topAddBtnChildClick("new_folder")
        }

        trackEvent_topAddBtnChildClick(e) {
            let t = v.LoginHelperNS.loginHelper.getVipInfo();
            s.XLStatNS.trackEvent("pc_yunpan", "top_add_btn_child_click", "", 0, 0, 0, 0, `clickid=${e},is_safebox=${this.isInSafeSpace ? 1 : 0},vip_type=${t.vasType},is_year=${t.isYear}`)
        }

        toggleMaximizeMainWindow() {
            this.disableHover = !0;
            let e = `button=${this.maximized ? "get_back" : "big_get"}`, t = encodeURIComponent(e);
            s.XLStatNS.trackEvent("clienttop", "clienttop_maxminum_click", "", 0, 0, 0, 0, t), this.$nextTick(() => {
                this.maximized ? d.ipcRenderer.send("restoreMainWindow") : d.ipcRenderer.send("maximizeMainWindow")
            })
        }

        closeSettingCenter() {
            this.$emit("close")
        }

        handleTransport() {
            f.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcShowTransferWindow")
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                const e = yield h.asyncRemoteCall.getCurrentWindow();
                (yield e.isMaximized()) && (this.maximized = !0), e.on("maximize", () => {
                    this.maximized = !0
                }), e.on("minimize", () => {
                    this.maximized = !1
                }), e.on("unmaximize", () => {
                    this.maximized = !1
                }), d.ipcRenderer.on(c.ThunderChannelList.channelMRMainWndMax, function () {
                    u.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnMainWindowVisibleChange", !0), f.server.fireClientEvent("OnMainWindowVisibleChange", !0)
                }), d.ipcRenderer.on(c.ThunderChannelList.channelMRMainWndMin, function () {
                    u.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnMainWindowVisibleChange", !1), f.server.fireClientEvent("OnMainWindowVisibleChange", !1)
                }), d.ipcRenderer.on(c.ThunderChannelList.channelMRMainWndRestore, function () {
                    u.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnMainWindowVisibleChange", !0), f.server.fireClientEvent("OnMainWindowVisibleChange", !0)
                })
            })
        }

        openThemeWindow() {
            p.client.callServerFunction("MessageBoxCustom", "Individuation"), s.XLStatNS.trackEvent("clienttop", "clienttop_skin_icon_click", "", 0, 0, 0, 0)
        }
    };
    n([r.Prop()], T.prototype, "curNav", void 0), n([r.Prop({})], T.prototype, "navList", void 0), n([r.Prop()], T.prototype, "currentNavView", void 0), n([r.Prop()], T.prototype, "isLogined", void 0), n([r.Prop()], T.prototype, "settingTab", void 0), n([r.Prop()], T.prototype, "hideTabs", void 0), n([r.Watch("isLogined")], T.prototype, "onUserLogin", null), T = n([r.Component({components: {FindPageMainTop: () => Promise.resolve().then(() => i(741))}})], T), t.default = T
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(182), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(742);
    let r = class extends o.Vue {
    };
    n([o.Prop()], r.prototype, "isFindPage", void 0), r = n([o.Component({components: {AddressBarContainer: a.default}})], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(184), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(743), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            currentTabIndex: e => e.Tabs.current,
            bookMarks: e => e.BookMarks.bookMarks,
            allNetGroups: e => e.Group.all
        },
        mapGettersToProps: {
            currentTab: e => e.currentTab,
            currentSelectdTaskIds: e => e.currentSelectdTaskIds,
            curNav: e => e.currentNav
        },
        mapCommitToProps: {
            createNewTab: "CREATE_NEW_TAB",
            closeTabByName: "CLOSE_TAB_BY_NAME",
            onOriginalUrlChange: "ON_ORIGINAL_URL_CHANGE",
            addBookMarksItem: "ADD_BOOK_MARKS_ITEM",
            deleteBookMarksItem: "REMOVE_BOOK_MARKS_ITEM",
            setBookMarksItemTop: "SET_BOOK_MARKS_ITEM_TOP"
        },
        mapDispatchToProps: {getGroupData: "getGroupData", initBookMarks: "initBookMarks"}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(186), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(62), r = i(12), s = i(2), l = i(6), d = i(5), u = i(74), c = i(14), h = i(82), f = i(9), p = i(22),
        g = i(144), m = i(0), v = i(7), y = i(73), T = i(25), w = i(38), k = i(91), C = i(10), b = i(18), I = i(8),
        S = i(29), _ = i(3), D = i(45), A = i(49), N = i(15), x = i(68), E = i(4), O = i(77), P = i(23), M = i(13),
        F = v.default(s.join(__rootDir, "../bin/ThunderHelper.node")), L = m.default.getLogger("address-bar"),
        R = g.CommunityNaviteFunctionNS.CommunityNaviteFunction.getNativeModule(), B = i(46);
    let U = class extends l.Vue {
        constructor() {
            super(...arguments), this.clearTextTimer = void 0, this.textData = "", this.relatedKeyList = ["迅雷", "720p", "1080p", "蓝光", "4K"], this.animate = !1, this.defaultPlaceholder = "搜全网、搜本地、访问网址", this.safeSpacePlaceHolder = "搜索保险箱空间内文件", this.isInSafeSpace = !1, this.placeholder = "", this.placeholders = [], this.placeholderSwitchTimer = null, this.isMunuOpenUrl = !1, this.isCanUndo = !0, this.flag = !0, this.curText = "", this.inputFocus = !1, this.communityName = "community", this.blankPage = "新标签页", this.timer = 0, this.switchOn = 0, this.searchSuffix = [], this.isSelectDropItem = !1, this.showFavanimation = !1, this.showFavoritesTip = !1, this.favTipTimerId = void 0, this.curRelatedKey = "迅雷", this.headerHeight = 48, this.dialogWidth = 400, this.groupEntrySection = "groupEntry", this.groupEntryKey = "open", this.isBrowserInited = !1, this.isSelectRelatedKey = !1, this.emptyRelatedKey = "无", this.isSearchWindowExist = !1, this.commandid = 0
        }

        get relatedKeyWord() {
            let e = "";
            return this.curRelatedKey !== this.emptyRelatedKey && (e = this.curRelatedKey), e
        }

        onCurrentTabChange(e) {
            this.isCanUndo = !1, this.hideCollectIcon || (this.$refs.collect && this.$refs.collect.classList.remove("is-animation"), this.showFavanimation = !1)
        }

        popEditableDefaultContextMenuForAddressBar(e, t, i, n) {
            return o(this, void 0, void 0, function* () {
                (yield r.asyncRemoteCall.getCurrentWebContents()).once("context-menu", (n, a) => o(this, void 0, void 0, function* () {
                    if (a.isEditable) {
                        let n = [{
                            label: "撤销",
                            enabled: a.editFlags.canUndo && e,
                            click: () => o(this, void 0, void 0, function* () {
                                f.XLStatNS.trackEvent("clienttop", "clienttop_address_rmenu_click", "", 0, 0, 0, 0, "button=undo"), (yield r.asyncRemoteCall.getCurrentWebContents()).undo()
                            })
                        }, {type: "separator"}, {
                            label: "剪切",
                            enabled: a.editFlags.canCut,
                            click: () => o(this, void 0, void 0, function* () {
                                f.XLStatNS.trackEvent("clienttop", "clienttop_address_rmenu_click", "", 0, 0, 0, 0, "button=shear"), (yield r.asyncRemoteCall.getCurrentWebContents()).cut()
                            })
                        }, {
                            label: "复制",
                            enabled: a.editFlags.canCopy,
                            click: () => o(this, void 0, void 0, function* () {
                                f.XLStatNS.trackEvent("clienttop", "clienttop_address_rmenu_click", "", 0, 0, 0, 0, "button=copy"), (yield r.asyncRemoteCall.getCurrentWebContents()).copy()
                            })
                        }, {
                            label: "粘贴",
                            enabled: a.editFlags.canPaste && c.ThunderUtil.isClipboardTextFormatAvailable(),
                            click: () => o(this, void 0, void 0, function* () {
                                f.XLStatNS.trackEvent("clienttop", "clienttop_address_rmenu_click", "", 0, 0, 0, 0, "button=paste"), (yield r.asyncRemoteCall.getCurrentWebContents()).paste()
                            })
                        }, {
                            label: "删除",
                            enabled: a.editFlags.canDelete,
                            click: () => o(this, void 0, void 0, function* () {
                                f.XLStatNS.trackEvent("clienttop", "clienttop_address_rmenu_click", "", 0, 0, 0, 0, "button=delete"), (yield r.asyncRemoteCall.getCurrentWebContents()).delete()
                            })
                        }, {type: "separator"}, {
                            label: "全选",
                            enabled: a.editFlags.canSelectAll,
                            click: () => o(this, void 0, void 0, function* () {
                                f.XLStatNS.trackEvent("clienttop", "clienttop_address_rmenu_click", "", 0, 0, 0, 0, "button=chooseall"), (yield r.asyncRemoteCall.getCurrentWebContents()).selectAll()
                            })
                        }];
                        if (void 0 !== t && "function" == typeof t) {
                            let e = t(a);
                            void 0 !== e && e.length > 0 && (void 0 === i ? i = n.length : (i < 0 && (i = n.length + 1 + i) < 0 && (i = 0), i > n.length && (i = n.length)), n.splice(i, 0, ...e))
                        }
                        let s = yield(yield r.asyncRemoteCall.getMenu()).buildFromTemplate(n);
                        yield k.MenuSkinNS.setStyle(s, {});
                        let l = yield r.asyncRemoteCall.getCurrentWindow();
                        s.popup({window: l})
                    }
                }))
            })
        }

        get canGoBack() {
            let e = !1;
            do {
                if (d.isNullOrUndefined(this.currentTab) || d.isNullOrUndefined(this.currentTab.tab)) break;
                e = this.currentTab.tab.canGoBack
            } while (0);
            return e
        }

        get canGoForward() {
            let e = !1;
            do {
                if (d.isNullOrUndefined(this.currentTab) || d.isNullOrUndefined(this.currentTab.tab)) break;
                e = this.currentTab.tab.canGoForward
            } while (0);
            return e
        }

        get canRefresh() {
            let e = !1;
            do {
                if (d.isNullOrUndefined(this.currentTab) || d.isNullOrUndefined(this.currentTab.tab)) break;
                if (this.isShowHomepage) {
                    e = !0;
                    break
                }
                if (this.currentTab.tab.getTabType() !== u.TabType.Chromium) break;
                e = !0
            } while (0);
            return e
        }

        get text() {
            let e = "";
            do {
                if (d.isNullOrUndefined(this.currentTab) || d.isNullOrUndefined(this.currentTab.tab)) break;
                if (this.curNav !== A.NavViewID.Browser || this.currentTab.tab.getTabType() !== u.TabType.Chromium || this.currentTab.tab.isDefaultTab()) {
                    e = this.curText;
                    break
                }
                if (!this.currentTab.tab.showUrl) break;
                e = this.currentTab.tab.url
            } while (0);
            return this.textData = e, e
        }

        onFindPageSelect() {
            if (this.isFindPage) {
                let e = "";
                do {
                    if (d.isNullOrUndefined(this.currentTab) || d.isNullOrUndefined(this.currentTab.tab)) break;
                    if (this.currentTab.tab.getTabType() !== u.TabType.Chromium || this.currentTab.tab.isDefaultTab()) {
                        this.textData = this.curText;
                        break
                    }
                    if (!this.currentTab.tab.showUrl) break;
                    e = this.currentTab.tab.url, this.textData = e
                } while (0)
            } else do {
                if (d.isNullOrUndefined(this.currentTab) || d.isNullOrUndefined(this.currentTab.tab)) break;
                if (this.currentTab.tab.getTabType() !== u.TabType.Chromium || this.currentTab.tab.isDefaultTab()) break;
                if (!this.currentTab.tab.showUrl) break;
                this.textData = this.curText
            } while (0);
            this.showFavanimation = !1
        }

        get isHttps() {
            return /^https/.test(this.text)
        }

        get isShowHomepage() {
            return 0 === this.currentTabIndex && 1 !== this.currentSelectdTaskIds.length
        }

        get domain() {
            let e = "";
            if (void 0 !== this.curUrl && "" !== this.curUrl) {
                e = new URL(this.curUrl).host
            }
            return e
        }

        get curUrl() {
            return B(this.currentTab, "tab", "url")
        }

        get hideCollectIcon() {
            return B(this.currentTab, "tab", "type") === u.TabType.XDAS || B(this.currentTab, "tab", "name") === this.communityName || !1 === B(this.currentTab, "tab", "showUrl")
        }

        get showGroupEnrty() {
            return !1
        }

        get groupIsOpen() {
            return T.default.getConfigInfo(this.groupEntrySection, this.groupEntryKey)
        }

        downloadIcon(e, t) {
            return o(this, void 0, void 0, function* () {
                let i = null, n = !1;
                try {
                    i = yield b.default.get(e, {responseType: "arraybuffer"})
                } catch (e) {
                    L.warning("error=====" + e)
                }
                return null !== i && void 0 !== i.status && 200 === i.status && null !== i.data && (n = yield I.FileSystemAWNS.writeFileAW(t, i.data)), n
            })
        }

        addressbarCollect() {
            f.XLStatNS.trackEvent("clienttop", "clienttop_address_click", "", 0, 0, 0, 0, `button=collect,url=${encodeURIComponent(this.curUrl)}`), this.handleCollect()
        }

        handleCollect() {
            return o(this, void 0, void 0, function* () {
                let e = yield(yield r.asyncRemoteCall.getCurrentWindow()).getBounds(), t = {
                    y: e.y + this.headerHeight,
                    x: e.x + (e.width - this.dialogWidth) / 2,
                    width: 450,
                    height: 196,
                    modal: !1
                }, i = void 0 === this.bookMarks[this.curUrl] ? "add" : "edit", n = "";
                "add" === i ? (n = B(this.currentTab, "tab", "title"), f.XLStatNS.trackEvent("clienttop", "bookmarks_add")) : (n = this.bookMarks[this.curUrl].name, f.XLStatNS.trackEvent("clienttop", "bookmarks_modify"));
                let a = {state: i, title: n};
                p.MessageBox.custom("BookMarks", a, t).then(e => o(this, void 0, void 0, function* () {
                    if (e.action === w.MessageBoxNS.Action.OK) {
                        if ("ok" === e.args.state) {
                            let t = "";
                            if (-1 === this.curUrl.indexOf("ftp://")) {
                                let e = S.ToolsUtilitiesAWNS.genarateMd5(this.domain), i = this.currentTab.tab.iconUrl;
                                if (L.information("iconMd5 ", e, i), "" !== i) {
                                    t = __profilesDir + "/BookMarksIcon/" + e + ".png";
                                    let i = yield I.FileSystemAWNS.readdirAW(__profilesDir);
                                    do {
                                        let e = !1;
                                        for (let t of i) if ("BookMarksIcon" === t) {
                                            e = !0;
                                            break
                                        }
                                        if (e) break;
                                        (yield I.FileSystemAWNS.mkdirAW(__profilesDir + "/BookMarksIcon")) || L.information("创建保存书签icon文件夹失败")
                                    } while (0)
                                }
                                (yield this.downloadIcon(i, t)) || (t = "")
                            }
                            let n = {};
                            n[this.curUrl] = {
                                name: e.args.title,
                                url: this.curUrl,
                                iconUrl: t
                            }, this.addBookMarksItem(n), "add" === i && this.showFavAnimation(), this.dialogClick("add-to", this.curUrl, e.args.title)
                        }
                    } else e.action === w.MessageBoxNS.Action.Cancel && void 0 !== this.bookMarks[this.curUrl] && (this.deleteBookMarksItem(this.curUrl), f.XLStatNS.trackEvent("clienttop", "bookmarks_delete"), this.dialogClick(e.args.state, this.curUrl, e.args.title))
                })).catch()
            })
        }

        showFavAnimation() {
            this.showFavanimation ? (this.$refs.collect.classList.remove("is-animation"), this.showFavanimation = !1, setTimeout(() => {
                this.showFavanimation = !0
            }, 0)) : this.showFavanimation = !0, setTimeout(() => {
                this.$refs.collect && this.$refs.collect.classList.remove("is-animation")
            }, 1500)
        }

        onOpenFavorites(e) {
            return o(this, void 0, void 0, function* () {
                f.XLStatNS.trackEvent("clienttop", "clienttop_address_click", "", 0, 0, 0, 0, "button=favorites"), this.closeFavoritesTip();
                let e = yield(yield r.asyncRemoteCall.getCurrentWindow()).getBounds(),
                    t = this.$refs.search_btn.getBoundingClientRect(), i = {
                        x: Math.round(e.x + t.right) - 300,
                        y: Math.round(e.y + t.bottom) + 3,
                        modal: !1,
                        width: 300,
                        height: 325
                    }, n = (Object.values(this.bookMarks) || []).reverse();
                p.MessageBox.custom("Favorites", n, i).catch();
                let o = "download";
                this.curNav === A.NavViewID.Cloud ? o = "云盘" : this.curNav === A.NavViewID.Browser && (o = "discover"), f.XLStatNS.trackEvent("download_leftpanel", "favorites_click", "", 0, 0, 0, 0, "from_tab=" + o)
            })
        }

        dialogClick(e, t, i) {
            let n = `button=${e},bookmarks_name=${i}, bookmarks_site=${t}`;
            f.XLStatNS.trackEvent("clienttop", "bookmarks_yitianjia", "", 0, 0, 0, 0, n)
        }

        goBack() {
            do {
                if (d.isNullOrUndefined(this.currentTab) || d.isNullOrUndefined(this.currentTab.tab)) break;
                f.XLStatNS.trackEvent("clienttop", "clienttop_address_click", "", 0, 0, 0, 0, "button=left"), this.currentTab.tab.goBack()
            } while (0)
        }

        goForward() {
            do {
                if (d.isNullOrUndefined(this.currentTab) || d.isNullOrUndefined(this.currentTab.tab)) break;
                f.XLStatNS.trackEvent("clienttop", "clienttop_address_click", "", 0, 0, 0, 0, "button=right"), this.currentTab.tab.goForward()
            } while (0)
        }

        goRefresh() {
            do {
                if (f.XLStatNS.trackEvent("clienttop", "clienttop_address_click", "", 0, 0, 0, 0, "button=refresh"), this.isShowHomepage) this.refreshHomepage(!1); else {
                    if (d.isNullOrUndefined(this.currentTab) || d.isNullOrUndefined(this.currentTab.tab)) break;
                    this.currentTab.tab.refresh(!1)
                }
            } while (0)
        }

        onSearchBtnClick(e = !1) {
            if (!e) {
                let e = this.$refs.input.$el.querySelector("input"), t = "";
                if (e && e.value && (t = e.value), t || this.placeholder !== this.defaultPlaceholder && (t = this.placeholder), f.XLStatNS.trackEvent("clienttop", "clienttop_address_click", "", 0, 0, 0, 0, `button=magnifier,url=${encodeURIComponent(t)}`), this.curNav === A.NavViewID.Cloud) {
                    let e = P.LoginHelperNS.loginHelper.getVipInfo();
                    f.XLStatNS.trackEvent("pc_yunpan", "top_operation_click", "", 0, 0, 0, 0, `button=search,url=${encodeURIComponent(t)},is_safebox=${this.isInSafeSpace ? 1 : 0},vip_type=${Number(e.vasType)},is_year=${Number(e.isYear)}`)
                }
            }
            this.navigate(void 0)
        }

        navigate(e, t) {
            do {
                if (this.isSelectDropItem) break;
                let i = void 0;
                if (i = void 0 === e ? this.$refs.input.$el.querySelector("input") : e.target, d.isNullOrUndefined(i) || d.isNullOrUndefined(i.value)) break;
                let n = i.value.trim();
                if (n || (this.isFindPage || this.inputFocus ? n = "https://www.baidu.com/s?tn=48021271_21_hao_pg&" : this.placeholder !== this.defaultPlaceholder && (n = this.placeholder)), this.handleBirdKey(n)) {
                    f.XLStatNS.trackEvent("download_leftpanel", "search_direct_click", "", 0, 0, 0, 0, `birdkey=${n}`), L.information("顶部地址栏输入为迅雷口令,已中断Tab导航");
                    break
                }
                L.information("顶部地址栏输入不是迅雷口令", n);
                let o = F.getTaskTypeFromUrl(n), a = void 0;
                if (o === E.DownloadKernel.TaskType.P2sp || o === E.DownloadKernel.TaskType.Emule) if (void 0 === (a = x.ParseUrlFileNameNS.getNameFromUrl(n)) || a.endsWith(".html") || -1 === a.indexOf(".")) a = null; else {
                    let e = a.split("."), t = e[e.length - 1];
                    t && (t = t.toLowerCase()), -1 === O.BHOConfigNS.getValue("Monitor", "ExtendNames", O.BHOConfigNS.getDefaultExtendNames()).indexOf(t) && (a = null)
                }
                if (o !== E.DownloadKernel.TaskType.Unkown && null !== a) {
                    L.information("顶部地址栏输入为下载链接, 中断Tab导航");
                    let e = {0: {url: n, type: "com", cid: "", stat: "search", refer: ""}};
                    _.client.callServerFunction("CreateNewTaskEx", e), this.curText = "", this.textData = "";
                    break
                }
                this.openUrl(n, void 0, t), this.curText === this.textData ? this.curText = "" : this.clearTextTimer = setTimeout(() => {
                    this.curText = "", this.textData = ""
                }, 3e4)
            } while (0);
            N.server.fireClientEvent("OnHideDropDownWindow"), this.isCanUndo = !1, this.isSelectDropItem = !1
        }

        needNewTab() {
            let e = !1;
            do {
                if (this.currentTab.tab.getTabType() !== u.TabType.Chromium || !this.isFindPage) {
                    e = !0;
                    break
                }
                if ("community" === this.currentTab.tab.name) {
                    e = !0;
                    break
                }
            } while (0);
            return e
        }

        openUrl(e, t, i) {
            L.information("openUrl", e, t);
            do {
                if (d.isNullOrUndefined(e)) break;
                let n = "word=" + encodeURIComponent(e), o = this.curRelatedKey;
                "" === this.curText && (o = this.relatedKeyList[0]), n += `,key_word=${encodeURIComponent(o)}`, f.XLStatNS.trackEvent("clienttop", "clienttop_address_search", "", 0, 0, 0, 0, n), i && i.endsWith("carousel_word_click") && (n = "carousel_word=" + encodeURIComponent(o + " " + this.placeholder), f.XLStatNS.trackEvent("download_leftpanel", "carousel_word_click", "", 0, 0, 0, 0, n));
                let a = e, r = h.URLHelperNS.isUrl(e);
                if (r.ret && void 0 !== r.suggest && (a = r.suggest), null !== t && void 0 !== t || (t = !1 === r.ret), t) {
                    a = D.default.getConfigValue("search", "search_engine_url", "https://www.baidu.com/s?tn=48021271_21_hao_pg&wd=$word$");
                    let t = this.curRelatedKey;
                    "" === this.curText && (t = this.relatedKeyList[0]), a = t === this.emptyRelatedKey || this.isFindPage ? a.replace("$word$", encodeURIComponent(e)) : a.replace("$word$", encodeURIComponent(`${e} ${t}`)), _.client.callServerFunction("AddSearchKeyword", {keyword: e}).catch()
                } else _.client.callServerFunction("AddSearchKeyword", {url: e}).catch();
                if (L.information("open url", a, t), void 0 !== i && null !== i || (i = "top_search_address-enter_btn_click"), this.needNewTab()) {
                    let e = {
                        tabType: u.TabType.Chromium,
                        tabParam: {url: a, extData: JSON.stringify({search_from: i})}
                    };
                    this.createNewTab(e)
                } else {
                    this.currentTab.tab.navigate(a), this.currentTab.tab.setExtData(JSON.stringify({search_from: i}));
                    let e = this.currentTab.tab.getBrowser();
                    this.onOriginalUrlChange({originalUrl: a, browser: e}), this.isCanUndo = !0
                }
                if (t) {
                    let e = "yes";
                    this.curRelatedKey === this.emptyRelatedKey && (e = "no"), f.XLStatNS.trackEvent("download_leftpanel", "search_direct_click", "", 0, 0, 0, 0, "type=search_word,search_word=" + a + ",prefix_type=" + e)
                } else f.XLStatNS.trackEvent("download_leftpanel", "search_direct_click", "", 0, 0, 0, 0, `type=search_url,search_url=${a}`)
            } while (0)
        }

        handleBirdKey(e) {
            let t = h.URLHelperNS.isBirdKey(e);
            return !!(t && t.length > 0) && (y.openBirdKeyDecodeDialog(e, {from: "address"}), !0)
        }

        onInputFocus(e) {
            do {
                if (this.inputFocus) break;
                " " === this.curText && (this.curText = ""), this.initBrowser(), _.client.broadcastEvent("OnSearchBarInputFocus", !0), this.inputFocus = !0, this.$refs.input.$el.querySelector("input").select();
                let t = this.$el.getBoundingClientRect();
                "" === this.textData && this.placeholders.length, N.server.fireClientEvent("CreateSearchWindow", Math.round(t.left), Math.round(t.top + t.height + 3), Math.round(t.width), !0), this.isSearchWindowExist = !0;
                let i = "download-panel" === this.curNav ? "download" : "pan-plugin-view" === this.curNav ? "yunpan" : "discover",
                    n = "mouse";
                e || (n = "keyboard"), f.XLStatNS.trackEvent("download_leftpanel", "search_cursor_type", "", 0, 0, 0, 0, "tab=" + i + ",cursor_type=" + n + ",is_safebox=" + (this.isInSafeSpace ? 1 : 0))
            } while (0)
        }

        onInputBlur() {
            _.client.broadcastEvent("OnSearchBarInputFocus", !1), this.inputFocus = !1, this.startPlaceholderSwitchTimer()
        }

        handle(e) {
            return o(this, void 0, void 0, function* () {
                e = e.trimLeft(), this.curText = e, this.textData = e, this.isCanUndo = !0, !this.isMunuOpenUrl && this.flag && (clearTimeout(this.timer), this.timer = setTimeout(() => o(this, void 0, void 0, function* () {
                    if (this.flag) {
                        let t = this.$el.getBoundingClientRect();
                        N.server.fireClientEvent("OnAddressBarInputChanged", e, Math.round(t.left), Math.round(t.top + t.height + 3), Math.round(t.width), Math.round(t.height)), N.server.fireClientEvent("ShowSearchWindow", !0)
                    }
                }), 200)), this.clearTextTimer && (clearTimeout(this.clearTextTimer), this.clearTextTimer = void 0)
            })
        }

        handle2() {
            return o(this, void 0, void 0, function* () {
                this.isCanUndo = !0;
                let e = this.curText;
                if (!this.isMunuOpenUrl) {
                    let t = this.$el.getBoundingClientRect();
                    N.server.fireClientEvent("OnAddressBarInputChanged", e, Math.round(t.left), Math.round(t.top + t.height + 3), Math.round(t.width), Math.round(t.height)), N.server.fireClientEvent("ShowSearchWindow", !0)
                }
                setTimeout(() => {
                    this.flag = !0
                }, 10), this.clearTextTimer && (clearTimeout(this.clearTextTimer), this.clearTextTimer = void 0)
            })
        }

        handlePopInputMenu(e) {
            this.popEditableDefaultContextMenuForAddressBar(this.isCanUndo, e => {
                let t = [], i = c.ThunderUtil.isClipboardTextFormatAvailable(), n = !1;
                if (i) {
                    let e = F.getClipBoardText();
                    n = h.URLHelperNS.isUrl(e).ret
                }
                return t.push({
                    label: "粘贴并立即打开", click: () => {
                        f.XLStatNS.trackEvent("clienttop", "clienttop_address_rmenu_click", "", 0, 0, 0, 0, "button=open"), this.isMunuOpenUrl = !0;
                        let e = F.getClipBoardText();
                        this.openUrl(e, !1), setTimeout(() => {
                            this.isMunuOpenUrl = !1
                        }, 1e3)
                    }, enabled: e.editFlags.canPaste && i && n
                }), t.push({
                    label: "粘贴并全网搜索", click: () => {
                        f.XLStatNS.trackEvent("clienttop", "clienttop_address_rmenu_click", "", 0, 0, 0, 0, "button=search"), this.isMunuOpenUrl = !0;
                        let e = F.getClipBoardText();
                        this.openUrl(e, !0), setTimeout(() => {
                            this.isMunuOpenUrl = !1
                        }, 1e3)
                    }, enabled: e.editFlags.canPaste && i && !n
                }), t
            }, -4).catch()
        }

        refreshHomepage(e = !1) {
            return o(this, void 0, void 0, function* () {
                let t = document.querySelector(".iframe-home");
                do {
                    if (!t || !0 !== global.__homepageWebviewReady) break;
                    if (e) {
                        let e = t.getWebContentsId();
                        (yield(yield r.asyncRemoteCall.getWebContents()).fromId(e)).session.clearCache().then(() => {
                            t.reload()
                        }).catch()
                    } else t.reload()
                } while (0)
            })
        }

        handleAddressFocus() {
            let e = this.$refs.input;
            if (e) e.$el.querySelector("input").blur(); else {
                document.querySelector("#addressbar-input").blur()
            }
        }

        getRecommends() {
            return o(this, void 0, void 0, function* () {
                let e = void 0, t = null;
                try {
                    b.default.defaults.adapter = i(21);
                    let e = new a.Agent({rejectUnauthorized: !1});
                    t = yield b.default.get("https://static-xl.a.88cdn.com/json/thunderx_search_bar.json", {
                        timeout: 1e4,
                        httpsAgent: e
                    })
                } catch (e) {
                    L.warning(e)
                }
                if (null !== t && void 0 !== t.status && 200 === t.status && void 0 !== t.data && null !== t.data) {
                    for (let e = 0; e < t.data.length; e++) t.data[e].url && "" !== t.data[e].url || this.placeholders.push(t.data[e].title);
                    try {
                        e = JSON.stringify(t.data)
                    } catch (e) {
                        L.warning(e)
                    }
                }
                return null !== e && void 0 !== e || (e = ""), this.placeholder = this.placeholders[0] || "", this.startPlaceholderSwitchTimer(), _.client.callServerFunction("SetSearchRecommends", e), e
            })
        }

        closeFavoritesTip() {
            this.favTipTimerId && (clearTimeout(this.favTipTimerId), this.favTipTimerId = void 0), this.showFavoritesTip && (this.showFavoritesTip = !1, C.ConfigNS.setValue("SearchBar", "FavoritesTip", !1))
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                N.server.registerFunctions({
                    GetAddressBarInputText: (e, t, ...i) => this.textData,
                    DeleteBookMarksItem: (e, t, ...i) => {
                        i && i[0] && this.deleteBookMarksItem(i[0])
                    },
                    HandleSearchShortcut: (e, t, ...i) => {
                        this.handleSearchShortcut()
                    }
                }), C.ConfigNS.attachListener(M.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    this.curRelatedKey = C.ConfigNS.getValue("SearchBar", "RelatedKey", "迅雷"), this.showFavoritesTip = C.ConfigNS.getValue("SearchBar", "FavoritesTip", !0), this.showFavoritesTip && (this.favTipTimerId = setTimeout(() => {
                        this.closeFavoritesTip()
                    }, 5e3))
                }), this.getGroupData(), _.client.attachServerEvent("SelectAddressDropItem", (e, ...t) => {
                    t && !d.isNullOrUndefined(t[0]) && (this.textData = t[0], d.isNullOrUndefined(t[1]) || (this.isSelectDropItem = t[1]))
                }), _.client.attachServerEvent("AddressDropWndKeyDown", (e, ...t) => {
                    if (!t || !t[0]) return;
                    13 === t[0] && this.navigate()
                }), _.client.attachServerEvent("SearchBarFocusChange", (e, ...t) => {
                    t[1] ? this.inputFocus = !0 : this.handleAddressFocus()
                }), document.addEventListener("keydown", e => {
                    e.ctrlKey && 65 === e.keyCode && e.preventDefault(), this.inputFocus ? (40 !== e.keyCode && 38 !== e.keyCode && 13 !== e.keyCode || N.server.fireClientEvent("AddressKeyDown", e.keyCode), 13 === e.keyCode && this.handleAddressFocus()) : e.ctrlKey && "f" === e.key && this.handleSearchShortcut()
                }), document.addEventListener("keyup", this.handleKeyUp, !0), document.addEventListener("compositionstart", () => {
                    this.inputFocus && (this.flag = !1)
                }), document.addEventListener("compositionend", () => {
                    if (!this.inputFocus) return;
                    this.$refs.input.$el.querySelector("input").placeholder === document.activeElement.placeholder && this.handle2()
                }), R.on("handleCollent", e => {
                    this.handleCollect()
                }), R.on("bookmarks.top", e => {
                    this.setBookMarksItemTop(e)
                }), R.on("bookmarks.editfinish", (e, t) => o(this, void 0, void 0, function* () {
                    let i = t.url, n = "";
                    if (i) {
                        n = new URL(i).host
                    }
                    if (e.action === w.MessageBoxNS.Action.OK) {
                        if ("ok" === e.args.state) {
                            let o = "";
                            if (-1 === i.indexOf("ftp://")) {
                                let e = S.ToolsUtilitiesAWNS.genarateMd5(n), i = t.iconUrl;
                                if (L.information("iconMd5 ", e, i), "" !== i) {
                                    o = __profilesDir + "/BookMarksIcon/" + e + ".png";
                                    let t = yield I.FileSystemAWNS.readdirAW(__profilesDir);
                                    do {
                                        let e = !1;
                                        for (let i of t) if ("BookMarksIcon" === i) {
                                            e = !0;
                                            break
                                        }
                                        if (e) break;
                                        (yield I.FileSystemAWNS.mkdirAW(__profilesDir + "/BookMarksIcon")) || L.information("创建保存书签icon文件夹失败")
                                    } while (0)
                                }
                                (yield this.downloadIcon(i, o)) || (o = "")
                            }
                            let a = {};
                            a[i] = {
                                name: e.args.title,
                                url: i,
                                iconUrl: o
                            }, this.addBookMarksItem(a), "add" === t.state && this.showFavAnimation()
                        }
                    } else e.action === w.MessageBoxNS.Action.Cancel && void 0 !== this.bookMarks[i] && this.deleteBookMarksItem(i)
                })), setTimeout(() => {
                    this.switchOn = T.default.getConfigInfo("searchBar", "enableAssociativeWord"), null !== this.switchOn && void 0 !== this.switchOn || (this.switchOn = 1), this.searchSuffix = T.default.getConfigInfo("searchBar", "searchSuffix") || this.searchSuffix, C.ConfigNS.setValue("SearchBar", "EnableAssociativeWord", this.switchOn), C.ConfigNS.setValue("SearchBar", "SearchSuffix", this.searchSuffix.toString());
                    let e = D.default.getConfigValue("search", "RelatedKey", null);
                    e && e.length > 0 && (this.relatedKeyList = e);
                    let t = D.default.getConfigValue("search", "emptyRelatedKey", "无");
                    this.emptyRelatedKey = t
                }, 3e3), (yield r.asyncRemoteCall.getCurrentWindow()).hookWindowMessage(528, () => {
                    do {
                        if (!this.$refs.input) break;
                        let e = F.getCursorPos(),
                            t = this.$refs.input.$el.querySelector("input").getBoundingClientRect();
                        N.server.fireClientEvent("OnSearchWindowClickMouse", e.x, e.y, Math.round(t.left), Math.round(t.top), Math.round(t.right), Math.round(t.bottom))
                    } while (0)
                }), yield this.getRecommends(), this.startPlaceholderSwitchTimer(), C.ConfigNS.attachListener(M.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    this.initBookMarks()
                }), N.server.registerFunctions({SearchBookMark: this.searchBookMark}), _.client.attachServerEvent("StartClearTextTimer", () => {
                    this.clearTextTimer = setTimeout(() => {
                        this.curText = "", this.textData = ""
                    }, 3e4)
                }), _.client.attachServerEvent("OnSearchWindowCreateOrClose", (e, ...t) => {
                    t && void 0 !== t[0] && (this.isSearchWindowExist = t[0])
                }), _.client.attachServerEvent("ThunderPanPluginSafeSpaceStateChange", (e, ...t) => {
                    if (!t || void 0 === t[0]) return;
                    let i = t[0];
                    this.isInSafeSpace = i
                })
            })
        }

        get isShowSafeSpacePlaceHolder() {
            return this.curNav === A.NavViewID.Cloud && this.isInSafeSpace ? (this.defaultPlaceholder = this.safeSpacePlaceHolder, !0) : (this.defaultPlaceholder = "", !1)
        }

        handleSearchShortcut() {
            return o(this, void 0, void 0, function* () {
                if (F.IsInFullScreen() || this.curNav === A.NavViewID.Message || (yield _.client.callServerFunction("IsSettingCenterOpened"))) return;
                this.onInputFocus();
                let e = document.getElementById("addressbar-input");
                e && e.focus && e.focus()
            })
        }

        startPlaceholderSwitchTimer() {
            this.defaultPlaceholder = "", null === this.placeholderSwitchTimer && this.placeholders.length > 0 && (this.placeholderSwitchTimer = setInterval(() => {
                this.animate = !0, setTimeout(() => {
                    this.isSearchWindowExist || (this.placeholders.push(this.placeholders[0]), this.placeholders.shift(), this.placeholder = this.placeholders[0], this.relatedKeyList.push(this.relatedKeyList[0]), this.relatedKeyList.shift(), this.animate = !1)
                }, 700)
            }, 4e3))
        }

        stopPlaceholderSwitchTimer() {
            this.placeholderSwitchTimer && (clearInterval(this.placeholderSwitchTimer), this.placeholderSwitchTimer = null)
        }

        beforeDestroy() {
            document.removeEventListener("keyup", this.handleKeyUp, !0), this.stopPlaceholderSwitchTimer()
        }

        handleKeyUp(e) {
            this.isShowHomepage && 116 === e.keyCode && this.refreshHomepage(e.ctrlKey)
        }

        searchBookMark(e, t, ...i) {
            if (!i || !i[0]) return [];
            let n = i[0].split(" "), o = [], a = (Object.values(this.bookMarks) || []).reverse();
            for (let e = 0; e < a.length; e++) {
                let t = !0;
                for (let i = 0; i < n.length; i++) if (!a[e].url.includes(n[i]) && !a[e].name.includes(n[i])) {
                    t = !1;
                    break
                }
                if (t && (o.push(a[e]), o.length >= 2)) return o
            }
            return o
        }

        initBrowser() {
            if (!this.isBrowserInited) {
                L.information("initBrowser"), this.isBrowserInited = !0;
                let e = {
                    tabType: u.TabType.Chromium,
                    tabParam: {
                        url: "https://pc.xunlei.com/pages/#/new-tab",
                        hideUI: !0,
                        name: "initBrowserTab",
                        extData: JSON.stringify({search_from: "top_search_address-enter_btn_click"})
                    }
                };
                this.createNewTab(e), setTimeout(() => {
                    this.closeTabByName("initBrowserTab")
                }, 6e4)
            }
        }

        setCurRelatedKey(e) {
            if (e) {
                this.curRelatedKey = e, C.ConfigNS.setValue("SearchBar", "RelatedKey", e);
                let t = "yes";
                e === this.emptyRelatedKey && (t = "no"), f.XLStatNS.trackEvent("download_leftpanel", "search_prefix_dropbox_click", "", 0, 0, 0, 0, "prefix_type=" + t), this.$nextTick(() => {
                    this.curText = " "
                })
            }
            this.isSelectRelatedKey = !1, this.startPlaceholderSwitchTimer()
        }

        clickSelectRelatedKey() {
            this.isSelectRelatedKey = !0, this.stopPlaceholderSwitchTimer(), N.server.fireClientEvent("ShowSearchWindow", !1), this.$nextTick(() => {
                let e = document.getElementById("dropdown_selectRelatedKey");
                e && e.focus()
            }), f.XLStatNS.trackEvent("download_leftpanel", "search_prefix_dropbox_show", "", 0, 0, 0, 0, "")
        }
    };
    n([l.Prop()], U.prototype, "initBookMarks", void 0), n([l.Prop()], U.prototype, "isFindPage", void 0), n([l.Prop({})], U.prototype, "currentTab", void 0), n([l.Prop({})], U.prototype, "curNav", void 0), n([l.Prop({})], U.prototype, "currentSelectdTaskIds", void 0), n([l.Prop({})], U.prototype, "currentTabIndex", void 0), n([l.Prop({})], U.prototype, "bookMarks", void 0), n([l.Prop({})], U.prototype, "allNetGroups", void 0), n([l.Prop({})], U.prototype, "addBookMarksItem", void 0), n([l.Prop({})], U.prototype, "deleteBookMarksItem", void 0), n([l.Prop({})], U.prototype, "setBookMarksItemTop", void 0), n([l.Prop({})], U.prototype, "getGroupData", void 0), n([l.Watch("currentTab")], U.prototype, "onCurrentTabChange", null), n([l.Prop({})], U.prototype, "createNewTab", void 0), n([l.Prop({})], U.prototype, "closeTabByName", void 0), n([l.Prop({})], U.prototype, "onOriginalUrlChange", void 0), n([l.Watch("isFindPage")], U.prototype, "onFindPageSelect", null), U = n([l.Component], U), t.default = U
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(188), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(747), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            bookMarks: e => e.BookMarks.bookMarks,
            currentCategoryId: e => e.DownloadListState.currentCategoryId,
            tabs: e => e.Tabs.tabs.filter(e => !e.tab.hideUI),
            current: e => e.Tabs.current
        },
        mapCommitToProps: {
            createNewTab: "CREATE_NEW_TAB",
            onBrowserBindWindowHandle: "ON_BIND_WND_HANDLE",
            onBrowserTitleChange: "ON_TITLE_CHANGE",
            onBrowserLoadStatusChange: "ON_LOAD_STATUS_CHANGE",
            onBrowserAddressChange: "ON_ADDRESS_CHANGE",
            onBrowserNewBrowserPopupCompleted: "ON_NEW_BROWSER_POPUP_COMPLETED",
            onBrowserLoadStart: "ON_LOAD_START",
            onBrowserLoadEnd: "ON_LOAD_END",
            onBrowserLoadError: "ON_LOAD_ERROR",
            onBrowserFavIconChange: "ON_FAV_ICON_GET",
            onAppQuit: "ON_APP_QUIT",
            updateTabs: "UPDATE_TABS",
            updateCurrent: "UPDATE_CURRENT",
            updateBookMarksIconUrl: "UPDATE_BOOK_MARKS_ICONURL"
        },
        mapDispatchToProps: {
            closeTab: "closeTab",
            closeTabByName: "closeTabByName",
            selectTab: "selectTab",
            onJsCallNativeFunction: "onChromiumCallNativeFunction",
            onJsCheckNativeFunction: "onChromiumCheckNativeFunction",
            onBrowserNewBrowserPopup: "onNewBrowserPopup",
            removeTabCtrl: "removeTabCtrl",
            onCreateNewTab: "onCreateNewTab"
        },
        mapGettersToProps: {
            unread: e => e.totalUnread,
            allTabs: e => e.allTabs,
            hideTabs: e => e.hideTabs,
            currentTab: e => e.currentTab,
            currentNav: e => e.currentNav,
            currentNavView: e => e.currentNavView
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(190), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(748), s = i(74), l = i(83), d = i(128), u = i(27), c = i(751), h = i(104), f = i(19),
        p = i(12), g = i(17), m = i(36), v = i(63), y = i(752), T = i(5), w = i(2), k = i(0), C = i(7), b = i(39),
        I = i(9), S = i(394), _ = i(22), D = i(38), A = i(91), N = i(29), x = i(18), E = i(8), O = i(15), P = i(50),
        M = i(4), F = i(11), L = i(14), R = i(67), B = i(68), U = i(25), V = i(396), K = i(398), G = i(49),
        W = k.default.getLogger("Thunder.Main.Renderer.view.tabs"),
        j = C.default(w.join(__rootDir, "../bin/ThunderHelper.node")), H = l.TabEventManagerNS.getEventEmitter(),
        z = i(46), X = i(79), q = i(35);
    let Y = class extends a.Vue {
        constructor() {
            super(...arguments), this.titleCue = "推荐", this.tabStyle = "simple", this.isLoading = !1, this.hasDownloading = !1, this.newCount = 0, this.totalTabsOpened = !1, this.totalTabsCreated = !1, this.appendChild = null, this.tabsCount = 1, this.nextListenerCookie = 0, this.listenerMap = new Map, this.lastMainWndVisible = !1, this.lastMainWndMinimized = !1, this.tabEventEmiting = !1, this.panPluginAttachFunc = null, this.isLoaded = !1, this.timeoutLoadClose = void 0, this.shortcutRegistered = !1
        }

        onTabsUpdated(e) {
            this.tabsCount = e.length, f.ipcRenderer.send("total-tabs-update", {
                tabs: JSON.parse(JSON.stringify(this.tabs)),
                current: this.current
            })
        }

        onCurrentUpdated(e) {
            f.ipcRenderer.send("total-tabs-update", {tabs: JSON.parse(JSON.stringify(this.tabs)), current: e})
        }

        get browserTabStyle() {
        }

        get homepageShow() {
        }

        get currentTabIsChromium() {
            return z(this.currentTab, "tab", "type") === s.TabType.Chromium
        }

        get currentTabName() {
            return z(this.currentTab, "tab", "name")
        }

        get currentTabTitle() {
            return z(this.currentTab, "title")
        }

        isTabLoading(e) {
            let t = !1;
            do {
                let i = this.tabs[e].tab;
                if (T.isNullOrUndefined(i)) break;
                "loading" === i.state && (t = !0)
            } while (0);
            return t
        }

        handleAdd(e) {
            I.XLStatNS.trackEvent("clienttop", "clienttop_newtab_add");
            let t = {tabType: s.TabType.Chromium, tabParam: {showUrl: !1}};
            T.isNullOrUndefined(e) ? t.tabParam.index = this.tabs.length : t.tabParam.index = e + 1, this.createNewTab(t), this.$root.$emit("tab.createTab", t)
        }

        handleRemove({tab: e, index: t}) {
            return o(this, void 0, void 0, function* () {
                I.XLStatNS.trackEvent("clienttop", "clienttop_newtab_close");
                do {
                    let i = e.tab.getBeforeCloseExtra();
                    if (i && i.content) {
                        let n = yield _.MessageBox.confirm(i);
                        if (n.action === D.MessageBoxNS.Action.OK) {
                            void 0 === i.okCallbackId || null === i.okCallbackId || isNaN(i.okCallbackId) || e.tab.callNativeFunctionCallback(i.nativeCallId, i.okCallbackId, t);
                            break
                        }
                        if (n.action === D.MessageBoxNS.Action.Close) break
                    }
                    let n = {tabInfo: e, index: t};
                    this.closeTab(n), this.$root.$emit("tab.closeTab", n);
                    let o = n.tabInfo.tab.getCurUrl();
                    this.trackBrowserEvent("new_tab_close", o, "load_status=" + this.getLoadStatus(n.tabInfo.tab.state))
                } while (0)
            })
        }

        handleChange({tab: e, index: t}) {
            W.verbose(e), this.selectTab(t)
        }

        handleClick() {
            W.information("tab.click", z(this.tabs, `${this.current}`)), this.$root.$emit("tab.click", z(this.tabs, `${this.current}`))
        }

        tabListeners(e, t) {
            return {
                contextmenu: () => {
                    this.handlePopInputMenu(e, t)
                }
            }
        }

        handlePopInputMenu(e, t) {
            let i = e.getTitle();
            0 !== t && "设置中心" !== i && this.popEditableDefaultContextMenu(t)
        }

        handleOpenCopyTab(e, t) {
            let i = {tabType: s.TabType.Chromium, tabParam: {url: e, index: t + 1}};
            this.createNewTab(i)
        }

        getLoadStatus(e) {
            let t = "loading";
            switch (e) {
                case"loaded":
                    t = "success";
                    break;
                case"error":
                    t = "fail";
                    break;
                default:
                    t = "loading"
            }
            return t
        }

        handleCloseTab(e) {
            if (e > 0) {
                let t = {tabInfo: this.tabs[e], index: e};
                this.closeTab(t), this.$root.$emit("tab.closeTab", t);
                let i = t.tabInfo.tab.getCurUrl();
                this.trackBrowserEvent("new_tab_close", i, "load_status=" + this.getLoadStatus(t.tabInfo.tab.state))
            }
        }

        handleMiddleClick(e) {
            W.information("MiddleEventObject"), e.index > 0 && this.handleCloseTab(e.index)
        }

        popEditableDefaultContextMenu(e) {
            return o(this, void 0, void 0, function* () {
                (yield p.asyncRemoteCall.getCurrentWebContents()).once("context-menu", (t, i) => o(this, void 0, void 0, function* () {
                    let t = this.tabs.length > 2, i = e !== this.tabs.length - 1, n = [{
                            label: "打开新的标签页", accelerator: "CmdOrCtrl+T", click: () => {
                                this.menuItemClick("add", e)
                            }
                        }, {type: "separator"}, {
                            label: "重新加载", accelerator: "CmdOrCtrl+R", click: () => {
                                this.menuItemClick("reload", e)
                            }
                        }, {
                            label: "复制", enabled: "社区" !== this.tabs[e].tab.getTitle(), click: () => {
                                this.menuItemClick("copy", e)
                            }
                        }, {
                            label: "关闭标签页", accelerator: "CmdOrCtrl+W", click: () => {
                                this.menuItemClick("close", e)
                            }
                        }, {
                            label: "关闭其他标签页", enabled: t, click: () => {
                                this.menuItemClick("close-other-tabs", e)
                            }
                        }, {
                            label: "关闭右侧标签页", enabled: i, click: () => {
                                this.menuItemClick("close-tabs-to-the-right", e)
                            }
                        }], o = yield(yield p.asyncRemoteCall.getMenu()).buildFromTemplate(n),
                        a = yield p.asyncRemoteCall.getCurrentWindow();
                    yield A.MenuSkinNS.setStyle(o, {}), yield o.popup({window: a})
                }))
            })
        }

        menuItemClick(e, t, i) {
            if ("add" === e) this.handleAdd(t); else if ("close" === e) this.handleCloseTab(t); else if ("reload" === e) this.tabs[t].tab.refresh(!1); else if ("copy" === e) this.handleOpenCopyTab(this.tabs[t].tab.url, t); else if ("close-other-tabs" === e) {
                let e = t;
                for (let t = this.tabs.length - 1; t > 0; t--) t !== e && this.handleCloseTab(t)
            } else if ("close-tabs-to-the-right" === e) {
                let e = t;
                for (let t = this.tabs.length - 1; t > 0; t--) t > e && this.handleCloseTab(t)
            }
        }

        handleKeydownHotkey(e) {
            do {
                if (!e.ctrlKey) break;
                if ("t" === e.key || "T" === e.key) {
                    this.handleAdd(this.current);
                    break
                }
                if ("r" === e.key || "R" === e.key) {
                    let e = z(this.tabs, `${this.current}`, "tab");
                    e && e.refresh(!1)
                }
                if ("w" === e.key || "W" === e.key) {
                    this.handleCloseTab(this.current);
                    break
                }
            } while (0)
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                if (H.on(l.TabEventManagerNS.EventType.CreateNewTab, this.onCreateTab), X.DevEnvHelperNS.isLogEnable()) {
                    let e = yield p.asyncRemoteCall.getGlobalShortcut();
                    this.shortcutRegistered = yield e.register("ctrl+shift+f12", () => {
                        let e = z(this.tabs, `${this.current}`, "tab");
                        e && e.showDevTool(!0)
                    })
                }
                f.ipcRenderer.on(q.ThunderChannelList.channelMRUpdateLogEnviroment, () => o(this, void 0, void 0, function* () {
                    if (k.default.enableLogger && !this.shortcutRegistered) {
                        let e = yield p.asyncRemoteCall.getGlobalShortcut();
                        this.shortcutRegistered = yield e.register("ctrl+shift+f12", () => {
                            let e = z(this.tabs, `${this.current}`, "tab");
                            e && e.showDevTool(!0)
                        })
                    }
                })), window.addEventListener("keydown", this.handleKeydownHotkey, !0), window.addEventListener("keyup", e => {
                    if ("F5" === e.key) {
                        let e = z(this.tabs, `${this.current}`, "tab");
                        e && e.refresh(!1)
                    }
                }, !0);
                let e = [{eventName: "init-done", listener: this.onInit}, {
                    eventName: "before-nav",
                    listener: this.onBeforeNavigate
                }, {eventName: "title-change", listener: this.onTitleChange}, {
                    eventName: "favicon-url-change",
                    listener: this.onFaviconURLChange
                }, {eventName: "address-change", listener: this.onAddressChange}, {
                    eventName: "new-browser-popup",
                    listener: this.onNewBrowserPopup
                }, {
                    eventName: "new-browser-popup-done",
                    listener: this.onNewBrowserPopupCompleted
                }, {eventName: "open-url-from-tab", listener: this.onOpenURLFromTab}, {
                    eventName: "destroyed",
                    listener: this.onAfterBrowserDestroy
                }, {eventName: "load-start", listener: this.onLoadStart}, {
                    eventName: "load-end",
                    listener: this.onLoadEnd
                }, {eventName: "loading-state-change", listener: this.onLoadingStateChange}, {
                    eventName: "load-error",
                    listener: this.onLoadError
                }, {eventName: "got-focus", listener: this.onGotFocus}, {
                    eventName: "before-download",
                    listener: this.onBeforeDownload.bind(this)
                }, {
                    eventName: "custom-protocol-execution",
                    listener: this.onCustomProtocalExecution.bind(this)
                }, {
                    eventName: "call-native-func",
                    listener: this.onChromiumJsCallNativeFunction
                }, {eventName: "check-native-func", listener: this.onChromiumCheckNativeFunction}, {
                    eventName: "close",
                    listener: this.onClose
                }, {eventName: "hotkey", listener: this.onHotKey}];
                l.setDefaultListeners(e);
                let t = [{
                    functionName: "openNewTab",
                    nativeFunc: this.openNewTab.bind(this)
                }, {
                    functionName: "OpenNewTab",
                    nativeFunc: this.openNewTab.bind(this)
                }, {
                    functionName: "GetTabIndexByTitleAndName",
                    nativeFunc: this.getTabIndexByTitleAndName.bind(this)
                }, {
                    functionName: "SelectTab",
                    nativeFunc: this.selectTabByIndex.bind(this)
                }, {
                    functionName: "IsTabSelected",
                    nativeFunc: this.isTabSelected.bind(this)
                }, {
                    functionName: "CloseCurrentTab",
                    nativeFunc: this.closeCurrentTab.bind(this)
                }, {
                    functionName: "CloseTabByIndex",
                    nativeFunc: this.closeTabByIndex.bind(this)
                }, {
                    functionName: "TabBeforeClose",
                    nativeFunc: this.tabBeforeClose.bind(this)
                }, {
                    functionName: "CloseTabByName",
                    nativeFunc: this.closeTabName.bind(this)
                }, {
                    functionName: "AttachTabEvent",
                    nativeFunc: this.attachTabEvent.bind(this)
                }, {functionName: "DetachTabEvent", nativeFunc: this.detachTabEvent.bind(this)}];
                m.NativeCallNS.registerNativeFunction(t);
                let i = {
                    openNewTab: this.plugin_openNewTab.bind(this),
                    OpenNewTab: (e, t, ...i) => {
                        do {
                            let n = i[0], o = "vip-download-webview";
                            if (t.name.toLowerCase() !== o.toLowerCase() && this.isVipPayUrl(n) && O.server.isRemoteClientExist(o)) {
                                O.server.callClientFunctionByName(o, "OpenPayVipUrl", n);
                                break
                            }
                            this.plugin_openNewTab(e, t, ...i)
                        } while (0)
                    },
                    GetTabIndexByTitleAndName: this.plugin_getTabIndexByTitleAndName.bind(this),
                    SelectTab: this.plugin_selectTabByIndex.bind(this),
                    CloseTabByIndex: this.plugin_closeTabByIndex.bind(this),
                    GetCurrentSelectTabValue: (e, t, ...i) => {
                        let n = void 0;
                        {
                            let e = i[0], t = i[1];
                            t || (t = "tab"), n = z(this.currentTab, t, e)
                        }
                        return n
                    }
                };
                O.server.registerFunctions(i);
                let n = yield p.asyncRemoteCall.getCurrentWindow();
                v.quitPromises.add(this.quitBrowser), g.NativeCallModule.nativeCall.AttachNativeEvent("onWebEvent", (...e) => {
                    if (0 === this.tabs.length) return;
                    if (T.isNullOrUndefined(e) || T.isNullOrUndefined(e[0])) return;
                    let t = e[0];
                    e.splice(0, 1);
                    for (let i = 0; i < this.tabs.length; i++) this.tabs[i].tab.fireEvent(t, ...e)
                }), g.NativeCallModule.nativeCall.AttachNativeEvent("onFireLoginEvent", (e, t) => {
                    if (0 !== this.tabs.length) for (let i = 0; i < this.tabs.length; i++) {
                        let n = this.tabs[i];
                        n && n.tab.getTabType() !== s.TabType.XDAS && this.tabs[i].tab.fireEvent("onFireLoginEvent", e, t)
                    }
                }), g.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => {
                    if (0 !== this.tabs.length) for (let t = 0; t < this.tabs.length; t++) this.tabs[t].tab.fireEvent("OnUserLogin", e)
                }), g.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", e => {
                    if (0 !== this.tabs.length) {
                        W.information("监听到了退出事件！onLogout");
                        for (let t = 0; t < this.tabs.length; t++) this.tabs[t].tab.fireEvent("OnUserLogout", e)
                    }
                }), g.NativeCallModule.nativeCall.AttachNativeEvent("onLoginWndClose", e => {
                    if (0 !== this.tabs.length) {
                        W.information("监听到了关闭事件：onLoginWndClose：", e);
                        for (let t = 0; t < this.tabs.length; t++) this.tabs[t].tab.fireEvent("OnLoginWndClose", e)
                    }
                }), this.lastMainWndVisible = yield n.isVisible(), this.lastMainWndMinimized = yield n.isMinimizable(), n.on("hide", this.fireTabVisibleChangeEvent), n.on("minimize", this.fireTabVisibleChangeEvent), n.on("show", this.fireTabVisibleChangeEvent), n.on("restore", this.fireTabVisibleChangeEvent), n.on("maximize", this.fireTabVisibleChangeEvent), n.on("unmaximize", this.fireTabVisibleChangeEvent), H.on(l.TabEventManagerNS.EventType.RemoveTab, this.onTabEvent), H.on(l.TabEventManagerNS.EventType.AddTab, this.onTabEvent), H.on(l.TabEventManagerNS.EventType.ChangeTab, this.onTabEvent), H.on(l.TabEventManagerNS.EventType.VisibleChange, this.onTabVisibleChange), V.CommonSitesMgrNS.getInstance().init().catch()
            })
        }

        onCurrentNavChange() {
            return o(this, void 0, void 0, function* () {
                if (this.currentNav === G.NavViewID.Browser) {
                    let e = z(this.tabs, `${this.current}`, "tab");
                    if (T.isNullOrUndefined(e)) return;
                    if (e.getTabType() === s.TabType.Chromium) return void (yield this.addAllListener())
                } else if (this.currentNavView.isEmbeddedBrowser) return void this.addAllListener().catch();
                this.removeAllListener().catch()
            })
        }

        onCurrentTabChange(e, t) {
        }

        addAllListener() {
            return o(this, void 0, void 0, function* () {
                let e = yield p.asyncRemoteCall.getCurrentWindow();
                e.on("resize", this.resizeCurrentBrowserWindow), e.on("move", this.resizeCurrentBrowserWindow), e.on("restore", this.resizeCurrentBrowserWindow), e.on("show", this.resizeCurrentBrowserWindow)
            })
        }

        removeAllListener() {
            return o(this, void 0, void 0, function* () {
                let e = yield p.asyncRemoteCall.getCurrentWindow();
                e.removeListener("resize", this.resizeCurrentBrowserWindow), e.removeListener("move", this.resizeCurrentBrowserWindow), e.removeListener("restore", this.resizeCurrentBrowserWindow), e.removeListener("show", this.resizeCurrentBrowserWindow)
            })
        }

        trackBrowserEvent(e, t, i = "") {
            do {
                if (!t || "" === t) break;
                let n = P.parse(t);
                if (n.host && n.host.indexOf(".xunlei.com") < 0) break;
                i = i + (i.length > 0 ? "," : "") + "url=" + encodeURIComponent(t), I.XLStatNS.trackEvent("new_tab", e, "", 0, 0, 0, 0, i)
            } while (0)
        }

        fireTabVisibleChangeEvent() {
            return o(this, void 0, void 0, function* () {
                let e = yield p.asyncRemoteCall.getCurrentWindow();
                if (e && !(yield e.isDestroyed())) {
                    let t = yield e.isVisible(), i = yield e.isMinimized();
                    if (this.tabEventEmiting || (t && !i) !== (this.lastMainWndVisible && !this.lastMainWndMinimized)) {
                        W.information("发送tab状态和主窗口状态改变事件 visible:", t, ", minimized:", i, ", current:", this.current);
                        for (let e = 0; e < this.tabs.length; e++) this.tabs[e].tab.fireEvent("OnTabVisibleChange", t && !i, this.current === e), H.emit(l.TabEventManagerNS.EventType.VisibleChange, this.tabs[e].tab, t && !i, this.current === e)
                    }
                    this.lastMainWndVisible = t, this.lastMainWndMinimized = i
                }
            })
        }

        onTabEvent() {
            this.$nextTick(() => o(this, void 0, void 0, function* () {
                this.tabEventEmiting = !0, yield this.fireTabVisibleChangeEvent(), this.tabEventEmiting = !1
            }))
        }

        onTabVisibleChange(e, t, i) {
            if (W.information("onTabVisibleChange", e, t, i), t && i && e.getTabType() === s.TabType.Chromium) do {
                let t = e.getBrowser();
                if (T.isNullOrUndefined(t)) {
                    W.warning(t);
                    break
                }
                let i = t.getWindowHandle();
                if (!1 === j.isWindowHandle(i)) break;
                j.setWindowFocus(i, !0)
            } while (0)
        }

        onCreateTab(e, t) {
            W.information("[tbc] onCreateTab", t), this.onCreateNewTab({newTab: e, createTabParam: t})
        }

        quitBrowser() {
            return o(this, void 0, void 0, function* () {
                if (this.shortcutRegistered) {
                    (yield p.asyncRemoteCall.getGlobalShortcut()).unregister("ctrl+shift+f12")
                }
                return new Promise(e => {
                    this.onAppQuit(), e(!0)
                })
            })
        }

        getBrowserTab(e) {
            let t = null;
            if (this.allTabs) {
                let i = null;
                for (let n = 0; n < this.allTabs.length; ++n) i = this.allTabs[n].tab.getBrowser(), T.isNullOrUndefined(i) || e === i && (t = this.allTabs[n].tab)
            }
            return t
        }

        fireBrowserEvent(e, t) {
            W.information("fireBrowserEvent eventName", e, "tabName", t);
            let i = this.listenerMap.get(e);
            i && i.forEach((e, i) => {
                e.tabName === t && e.tab.callNativeFunctionCallback(e.nativeCallId, e.callBackId, t)
            })
        }

        onInit(e, t) {
            let i = e.target;
            if (i) {
                let e = {hwnd: i.getWindowHandle(), browser: i};
                this.onBrowserBindWindowHandle(e), i.addCustomProtocol("ed2k://"), i.addCustomProtocol("thunder://"), i.addCustomProtocol("magnet:?"), i.registerHotKey(h.Key.F5, h.KeyModifiers.CTRL_DOWN), i.registerHotKey(h.Key.F5, h.KeyModifiers.NONE), i.registerHotKey(h.Key.T, h.KeyModifiers.CTRL_DOWN), i.registerHotKey(h.Key.R, h.KeyModifiers.CTRL_DOWN), i.registerHotKey(h.Key.W, h.KeyModifiers.CTRL_DOWN), c.registerContextMenu(i)
            }
        }

        onTitleChange(e, t) {
            W.information("onTitleChange title", t);
            let i = {title: t, browser: e.target}, n = this.getBrowserTab(e.target);
            if (!T.isNullOrUndefined(n)) {
                this.fireBrowserEvent("OnTitleChange", n.name);
                let e = n.url;
                V.CommonSitesMgrNS.getInstance().updateItem({
                    url: e,
                    name: t
                }, "OnTitleChange"), K.historyManager.update({url: e, name: t}, "OnTitleChange")
            }
            this.onBrowserTitleChange(i)
        }

        onBeforeNavigate(e, t, i, n) {
            W.information("beforenavigate", t, i, n), t && this.trackBrowserEvent("browser_load_before_navigation", i)
        }

        onFaviconURLChange(e, t) {
            W.information("icon", t);
            let i = "", n = 0;
            for (n = 0; n < this.tabs.length; n++) if (this.tabs[n].tab.getBrowser() === e.target) {
                i = this.tabs[n].tab.url;
                break
            }
            let o = {iconUrl: t, browser: e.target};
            do {
                if (!i) break;
                if ("" === i) break;
                if (!t) {
                    t = "https://" + new URL(i).host + "/favicon.ico"
                }
                this.getIcon(i, t).catch(), T.isNullOrUndefined(this.tabs[n]) || this.fireBrowserEvent("OnFaviconURLChange", this.tabs[n].tab.name), this.onBrowserFavIconChange(o)
            } while (0)
        }

        onAddressChange(e, t, i) {
            W.information("onAddressChange", t, i);
            let n = {isMainFrame: t, url: i, browser: e.target}, o = this.getBrowserTab(e.target);
            if (!T.isNullOrUndefined(o) && (this.fireBrowserEvent("OnAddressChange", o.name), t)) {
                let e = ["http://misc.xl9.xunlei.com/chrome/client/view/dist/1.0/new_tab.html", "http://pc.xunlei.com/pages/#/new-tab", "http://pc.xunlei.com/pages/#/help/question?tab=user_guide", "http://pc.xunlei.com/pages/#/help/question?tab=usually_question"];
                "community" === o.name || e.includes(i) || (V.CommonSitesMgrNS.getInstance().updateItem({url: i}, "OnAddressChange"), K.historyManager.update({url: i}, "OnAddressChange"))
            }
            this.onBrowserAddressChange(n)
        }

        onNewBrowserPopup(e, t, i, n, a, r) {
            return o(this, void 0, void 0, function* () {
                let t = e.target.getURL(), n = {url: i, refUrl: t, ev: e};
                I.XLStatNS.trackEvent("clienttop", "browsertabpage_show", "", 0, 0, 0, 0, "source=url_click");
                let o = this.getBrowserTab(e.target);
                T.isNullOrUndefined(o) || this.fireBrowserEvent("OnNewBrowserPopup", o.name), o && o.extData && (n.extData = o.extData), yield this.onBrowserNewBrowserPopup(n)
            })
        }

        onNewBrowserPopupCompleted(e, t) {
            W.information(t);
            let i = {url: t, browser: e.target}, n = this.getBrowserTab(e.target);
            T.isNullOrUndefined(n) || this.fireBrowserEvent("OnNewBrowserPopupCompleted", n.name), this.onBrowserNewBrowserPopupCompleted(i)
        }

        onOpenURLFromTab(e, t, i) {
            W.information(t), W.information(i)
        }

        onAfterBrowserDestroy(e) {
            W.information(e.target)
        }

        onLoadStart(e, t, i, n) {
            W.information("OnLoadStart", t, i, n);
            let o = e.target, a = {isMainFrame: t, url: i, transitionType: n, browser: o}, r = this.getBrowserTab(o);
            T.isNullOrUndefined(r) || this.fireBrowserEvent("OnLoadStart", r.name), this.onBrowserLoadStart(a), t && this.trackBrowserEvent("browser_load_navigation_start", i)
        }

        onLoadEnd(e, t, i, n, o) {
            W.information("onLoadEnd", t, i, n, o);
            let a = e.target, r = {isMainFrame: t, url: i, frameName: n, httpStatusCode: o, browser: a},
                s = this.getBrowserTab(a);
            T.isNullOrUndefined(s) || this.fireBrowserEvent("OnLoadEnd", s.name), this.onBrowserLoadEnd(r), t && "error" !== s.state && this.trackBrowserEvent("browser_load_navigation_result", i, "result=success")
        }

        onLoadingStateChange(e, t, i, n) {
            W.information("onLoadingStateChange", t, i, n);
            let o = e.target, a = {isLoading: t, canGoBack: i, canGoForward: n, browser: o}, r = this.getBrowserTab(o);
            T.isNullOrUndefined(r) || this.fireBrowserEvent("OnLoadingStateChange", r.name), this.onBrowserLoadStatusChange(a)
        }

        onLoadError(e, t, i, n, o, a) {
            W.information("OnLoadError", t, n, o, a, i);
            let r = e.target, s = {isMainFrame: t, url: i, errorCode: n, errorText: o, failedUrl: a, browser: r},
                l = this.getBrowserTab(r);
            T.isNullOrUndefined(l) || this.fireBrowserEvent("OnLoadError", l.name), this.onBrowserLoadError(s), t && this.trackBrowserEvent("browser_load_navigation_result", i, "result=fail")
        }

        onGotFocus(e) {
            return o(this, void 0, void 0, function* () {
                let t = void 0;
                for (let i = 0; i < this.tabs.length; i++) T.isNullOrUndefined(this.tabs[i]) || T.isNullOrUndefined(this.tabs[i].tab) || (t = this.tabs[i].tab.getBrowser(), T.isNullOrUndefined(t) || e.target === t && H.emit(l.TabEventManagerNS.EventType.GotFocus, this.tabs[i].tab));
                let i = (yield(yield p.asyncRemoteCall.getCurrentWindow()).getNativeWindowHandle()).readUInt32LE(0);
                S.ThunderWindowNS.bringWindowToTop(i)
            })
        }

        onBeforeDownload(e, t, i, n, a) {
        }

        onCustomProtocalExecution(e, t) {
            let i = this.getBrowserTab(e.target), n = i && i.getSearchFrom(),
                o = {referer: e.target.getURL(), browser: "xlbrowser.exe", searchFrom: n};
            b.ThunderNewTask.createTaskByUrl(t, o)
        }

        onChromiumJsCallNativeFunction(e, t, i, n) {
            let o = {nativeCallId: 0, functionName: t, callBackId: i, browser: e.target, args: n};
            this.onJsCallNativeFunction(o)
        }

        onChromiumCheckNativeFunction(e, t, i) {
            let n = {nativeCallId: 0, functionName: t, callBackId: i, browser: e.target};
            this.onJsCheckNativeFunction(n)
        }

        onClose(e) {
            W.information("onClose");
            let t = void 0;
            for (let i = 0; i < this.allTabs.length; i++) if (!T.isNullOrUndefined(this.allTabs[i]) && !T.isNullOrUndefined(this.allTabs[i].tab) && (t = this.allTabs[i].tab.getBrowser(), !T.isNullOrUndefined(t) && e.target === t)) {
                let e = {tabInfo: this.allTabs[i], index: i};
                this.fireBrowserEvent("OnCloseBrowser", z(e, "tabInfo", "tab", "name")), this.closeTab(e);
                break
            }
        }

        onHotKey(e, t, i) {
            W.information("onHotKey", i, t);
            let n = void 0;
            for (let o = 0; o < this.tabs.length; o++) if (!T.isNullOrUndefined(this.tabs[o]) && !T.isNullOrUndefined(this.tabs[o].tab) && (n = this.tabs[o].tab.getBrowser(), !T.isNullOrUndefined(n) && e.target === n)) {
                116 === t && e.target.refresh();
                do {
                    if (4 !== i) break;
                    if (84 === t && this.handleAdd(this.current), 82 === t) {
                        let e = z(this.tabs, `${this.current}`, "tab");
                        e && e.refresh(!1)
                    }
                    87 === t && this.handleCloseTab(this.current)
                } while (0);
                break
            }
        }

        getIcon(e, t) {
            return o(this, void 0, void 0, function* () {
                let i = new URL(e).host, n = N.ToolsUtilitiesAWNS.genarateMd5(i),
                    o = __profilesDir + "/BookMarksIcon/" + n + ".png";
                return yield this.downloadIcon(e, t, o)
            })
        }

        downloadIcon(e, t, i) {
            return o(this, void 0, void 0, function* () {
                let n = null, o = !1;
                try {
                    n = yield x.default.get(t, {responseType: "arraybuffer"})
                } catch (i) {
                    W.warning("error " + i), "ECONNRESET" === i.code && (this.updateBookMarksIconUrl({
                        url: e,
                        iconUrl: t
                    }), V.CommonSitesMgrNS.getInstance().updateItem({
                        url: e,
                        iconUrl: t
                    }, "OnFaviconURLChange"), K.historyManager.update({url: e, iconUrl: t}, "OnFaviconURLChange"))
                }
                if (null !== n && void 0 !== n.status && 200 === n.status && null !== n.data && (o = yield E.FileSystemAWNS.writeFileAW(i, n.data))) {
                    let t = {url: e, iconUrl: i};
                    this.updateBookMarksIconUrl(t), V.CommonSitesMgrNS.getInstance().updateItem({
                        url: e,
                        iconUrl: i
                    }, "OnFaviconURLChange"), K.historyManager.update({url: e, iconUrl: i}, "OnFaviconURLChange")
                }
                return o
            })
        }

        internal_openNewTab(e, t) {
            let i = {url: e};
            if (t) try {
                i = Object.assign(i, JSON.parse(t))
            } catch (e) {
                W.warning(e)
            }
            let n = {tabType: s.TabType.Chromium, tabParam: i};
            W.information("tabParam:", i), this.createNewTab(n)
        }

        openNewTab(e, t, i, n) {
            do {
                if (W.information(e), T.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                if (T.isNullOrUndefined(n) || T.isNullOrUndefined(n[0])) {
                    let n = e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.ParamError);
                    !0 !== n && W.warning(n);
                    break
                }
                this.internal_openNewTab(n[0], n[1]), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success, "create_new_tab_ok")
            } while (0)
        }

        plugin_openNewTab(e, t, ...i) {
            do {
                if (!e) break;
                if (!i || !i[0]) break;
                this.internal_openNewTab(i[0], i[1])
            } while (0)
        }

        internal_getTabIndexByTitleAndName(e) {
            let t = -1;
            do {
                let i = null;
                try {
                    i = JSON.parse(e)
                } catch (e) {
                    W.warning(e)
                }
                if (!i) break;
                if (void 0 !== this.tabs) for (let e = 0; e < this.tabs.length; e++) if (this.tabs[e].title === i.title && this.tabs[e].tab.name === i.name) {
                    t = e;
                    break
                }
            } while (0);
            return t
        }

        getTabIndexByTitleAndName(e, t, i, n) {
            do {
                if (W.information(e), T.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                if (T.isNullOrUndefined(n) || T.isNullOrUndefined(n[0])) {
                    let n = e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.ParamError);
                    !0 !== n && W.warning(n);
                    break
                }
                let o = this.internal_getTabIndexByTitleAndName(n[0]);
                e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success, o)
            } while (0)
        }

        plugin_getTabIndexByTitleAndName(e, t, ...i) {
            let n = -1;
            do {
                if (!e) break;
                if (!i || !i[0]) break;
                n = this.internal_getTabIndexByTitleAndName(i[0])
            } while (0);
            return n
        }

        isVipPayUrl(e) {
            let t = !1;
            do {
                if (!e) break;
                let i = P.parse(e);
                if (!i) break;
                if ("http:" !== i.protocol && "https:" !== i.protocol) break;
                if ("pay.xunlei.com" === i.host) {
                    if (L.ThunderUtil.getQueryString(e, "referfrom")) {
                        t = !0;
                        break
                    }
                }
            } while (0);
            return t
        }

        closeCurrentTab(e, t, i, n) {
            do {
                if (W.information("closeCurrentTab", e), T.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                if (e === z(this.tabs, `${this.current}`, "tab")) {
                    let e = {tabInfo: this.tabs[this.current], index: this.current};
                    this.closeTab(e)
                }
            } while (0)
        }

        tabBeforeClose(e, t, i, n) {
            do {
                if (W.information("tabBeforeClose", e), T.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                let o = null;
                if (n[0]) try {
                    o = JSON.parse(n[0])
                } catch (e) {
                }
                let a = n[1];
                o && "object" == typeof o && (o = Object.assign({}, o, {
                    nativeCallId: t,
                    okCallbackId: a
                })), e.setBeforeCloseExtra(o), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success)
            } while (0)
        }

        closeTabName(e, t, i, n) {
            W.information("closeTabName args", n);
            do {
                if (T.isNullOrUndefined(e) || T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) break;
                if (T.isNullOrUndefined(n) || T.isNullOrUndefined(n[0])) {
                    e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.ParamError);
                    break
                }
                this.closeTabByName(n[0]), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success)
            } while (0)
        }

        attachTabEvent(e, t, i, n) {
            W.information("attachTabEvent args", n);
            do {
                if (T.isNullOrUndefined(e) || T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) break;
                if (T.isNullOrUndefined(n) || T.isNullOrUndefined(n[0]) || T.isNullOrUndefined(n[1])) {
                    e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.ParamError);
                    break
                }
                let o = n[0], a = {};
                a.tab = e, a.nativeCallId = t, a.tabName = n[1], a.callBackId = n[2];
                let r = this.nextListenerCookie, s = this.listenerMap.get(o);
                s || (s = new Map, this.listenerMap.set(o, s)), s.set(r, a), ++this.nextListenerCookie, W.information("attachTabEvent listenerMap", this.listenerMap, r), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success, r)
            } while (0)
        }

        detachTabEvent(e, t, i, n) {
            W.information("detachEvent enter");
            do {
                if (T.isNullOrUndefined(e) || T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) break;
                if (T.isNullOrUndefined(n) || T.isNullOrUndefined(n[0])) {
                    e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.ParamError);
                    break
                }
                let o = n[0];
                W.information("detachEvent cookie:", o), this.listenerMap.forEach(e => {
                    e.delete(o)
                }), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success)
            } while (0)
        }

        internal_closeTabByIndex(e) {
            {
                let t = {tabInfo: this.tabs[e], index: e};
                this.closeTab(t), this.$root.$emit("tab.closeTab", t)
            }
        }

        closeTabByIndex(e, t, i, n) {
            do {
                if (T.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                const o = n[0];
                if (T.isNullOrUndefined(o)) break;
                this.internal_closeTabByIndex(o), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success, {
                    tabs: this.tabs,
                    current: this.current
                })
            } while (0)
        }

        plugin_closeTabByIndex(e, t, ...i) {
            let n = void 0;
            do {
                if (!e) break;
                if (!i || !i[0]) break;
                this.internal_closeTabByIndex(i[0]), n = {tabs: this.tabs, current: this.current}
            } while (0);
            return n
        }

        isTabSelected(e, t, i, n) {
            let o = !1;
            do {
                if (W.information("isTabSelected tab:", e), T.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                e === z(this.tabs, `${this.current}`, "tab") && (o = !0), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success, o)
            } while (0);
            return o
        }

        selectTabByIndex(e, t, i, n) {
            do {
                if (W.information("selectTabByIndex", e), T.isNullOrUndefined(e)) {
                    W.warning(e);
                    break
                }
                if (T.isNullOrUndefined(t) || T.isNullOrUndefined(i)) {
                    W.warning(t, i);
                    break
                }
                let o = n[0];
                W.information("selectTabByIndex index", o), this.selectTab(o), e.callNativeFunctionCallback(t, i, u.NativeFunctionErrorCode.Success, "create_new_tab_ok")
            } while (0)
        }

        plugin_selectTabByIndex(e, t, ...i) {
            do {
                if (!e) break;
                if (!i || !i[0]) break;
                let t = i[0];
                this.selectTab(t)
            } while (0)
        }

        resizeCurrentBrowserWindow() {
            do {
                if (this.currentNavView.isEmbeddedBrowser) {
                    this.resizeEmbeddedBrowserWindow();
                    break
                }
                if (0 === this.tabs.length) break;
                let e = z(this.tabs, `${this.current}`, "tab");
                if (T.isNullOrUndefined(e)) break;
                if (e.getTabType() === s.TabType.Chromium) {
                    let t = e.getBrowser();
                    if (T.isNullOrUndefined(t)) break;
                    if (!0 === e.isErrorPage) break;
                    let i = t.getWindowHandle();
                    if (!1 === j.isWindowHandle(i)) {
                        W.warning(i);
                        break
                    }
                    d.BrowserSupportNS.resizeBrowserWindow(i)
                }
            } while (0)
        }

        resizeEmbeddedBrowserWindow() {
            do {
                if (this.currentNavView.isEmbeddedBrowser) {
                    let e = this.hideTabs.find(e => e.tab.name === this.currentNavView.key);
                    if (!e || !e.tab || !e.tab.isEmbeddedBrowser) break;
                    let t = e.tab.getBrowser();
                    if (T.isNullOrUndefined(t)) break;
                    if (!0 === e.tab.isErrorPage) break;
                    let i = t.getWindowHandle();
                    if (!1 === j.isWindowHandle(i)) {
                        W.warning(i);
                        break
                    }
                    d.BrowserSupportNS.resizeBrowserWindow(i, !0)
                }
            } while (0)
        }

        handleTotalClick(e) {
            return o(this, void 0, void 0, function* () {
                if (this.totalTabsOpened) return;
                const t = e.currentTarget.getBoundingClientRect(), i = e.currentTarget.cloneNode();
                if (i.style.position = "fixed", i.style.zIndex = "100", i.style.opacity = "0", i.style.top = t.top + "px", i.style.left = t.left + "px", i.style.marginTop = "0", this.totalTabsCreated) document.body.appendChild(i), this.appendChild = i, f.ipcRenderer.send("message-box-open", {
                    name: "TotalTabs",
                    position: {
                        x: Math.floor(window.screenX + t.left - 147 + 28),
                        y: Math.floor(window.screenY + t.top + 28)
                    }
                }); else {
                    this.totalTabsOpened = this.totalTabsCreated = !0, document.body.appendChild(i), this.appendChild = i, _.MessageBox.custom("TotalTabs", {
                        tabs: this.tabs,
                        current: this.current
                    }, {
                        width: 147,
                        height: 395,
                        x: Math.floor(window.screenX + t.left - 147 + 28),
                        y: Math.floor(window.screenY + t.top + 28),
                        modal: !1,
                        transparent: !1
                    }), (yield p.asyncRemoteCall.getIpcMain()).on("total-tabs-hide", () => {
                        this.totalTabsOpened = !1, this.appendChild && (document.body.removeChild(this.appendChild), this.appendChild = null)
                    })
                }
            })
        }
    };
    n([a.Prop({})], Y.prototype, "bookMarks", void 0), n([a.Prop({})], Y.prototype, "currentCategoryId", void 0), n([a.Prop({})], Y.prototype, "currentTab", void 0), n([a.Prop({})], Y.prototype, "tabs", void 0), n([a.Prop({})], Y.prototype, "allTabs", void 0), n([a.Prop()], Y.prototype, "hideTabs", void 0), n([a.Prop({})], Y.prototype, "unread", void 0), n([a.Prop({})], Y.prototype, "updateBookMarksIconUrl", void 0), n([a.Prop({})], Y.prototype, "createNewTab", void 0), n([a.Prop({})], Y.prototype, "onBrowserBindWindowHandle", void 0), n([a.Prop({})], Y.prototype, "onBrowserTitleChange", void 0), n([a.Prop({})], Y.prototype, "onBrowserFavIconChange", void 0), n([a.Prop({})], Y.prototype, "onBrowserLoadStatusChange", void 0), n([a.Prop({})], Y.prototype, "onBrowserAddressChange", void 0), n([a.Prop({})], Y.prototype, "onBrowserNewBrowserPopup", void 0), n([a.Prop({})], Y.prototype, "onBrowserNewBrowserPopupCompleted", void 0), n([a.Prop({})], Y.prototype, "onBrowserLoadStart", void 0), n([a.Prop({})], Y.prototype, "onBrowserLoadEnd", void 0), n([a.Prop({})], Y.prototype, "onBrowserLoadError", void 0), n([a.Prop({})], Y.prototype, "selectTab", void 0), n([a.Prop({})], Y.prototype, "closeTab", void 0), n([a.Prop({})], Y.prototype, "closeTabByName", void 0), n([a.Prop({})], Y.prototype, "removeTabCtrl", void 0), n([a.Prop({})], Y.prototype, "onCreateNewTab", void 0), n([a.Prop({})], Y.prototype, "onAppQuit", void 0), n([a.Prop({})], Y.prototype, "onJsCallNativeFunction", void 0), n([a.Prop({})], Y.prototype, "onJsCheckNativeFunction", void 0), n([a.Prop({default: "transparent"})], Y.prototype, "background", void 0), n([a.Prop({default: 0})], Y.prototype, "current", void 0), n([a.Prop({})], Y.prototype, "updateCurrent", void 0), n([a.Prop({})], Y.prototype, "updateTabs", void 0), n([a.Prop({})], Y.prototype, "currentNav", void 0), n([a.Prop()], Y.prototype, "currentNavView", void 0), n([a.Watch("tabs", {deep: !0})], Y.prototype, "onTabsUpdated", null), n([a.Watch("current")], Y.prototype, "onCurrentUpdated", null), n([a.Watch("currentNav")], Y.prototype, "onCurrentNavChange", null), n([a.Watch("current")], Y.prototype, "onCurrentTabChange", null), Y = n([a.Component({
        filters: {unread: y.unread},
        components: {HomePage: r.default, BrowserViewContainer: () => Promise.resolve().then(() => i(753))}
    })], Y), t.default = Y
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(192), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(749), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            tabs: e => e.Tabs.tabs,
            homePageUrl: e => e.WebView.homePageUrl,
            preloadPath: e => `file:///${__rootDir}/out/common-preload.js`
        },
        mapCommitToProps: {onMounted: "ON_MOUNTED", createNewTab: "CREATE_NEW_TAB"},
        mapDispatchToProps: {selectTab: "selectTab"}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(194), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(12), r = i(2), s = i(6), l = i(74), d = i(544), u = i(0), c = i(79), h = i(3),
        f = u.default.getLogger("home-page"), p = i(28), g = i(403);
    let m = class extends s.Vue {
        constructor() {
            super(...arguments), this.elementId = "home-1EAC214F-7644-4163-9EB8-AF4BAA62D144", this.performanceStart = 0
        }

        indexOfTab(e) {
            let t = -1;
            for (let i = 0; i < this.tabs.length; i++) if (this.tabs[i].tab.getTabType() === l.TabType.Chromium && this.tabs[i].tab.getOriginalUrl() === e) {
                t = i;
                break
            }
            return t
        }

        created() {
            this.performanceStart = (new Date).getTime()
        }

        mounted() {
            this.enableDevTools(), this.initNativeCall()
        }

        enableDevTools() {
            window.addEventListener("keyup", e => {
                "F12" === e.key && e.shiftKey && c.DevEnvHelperNS.isDevToolsEnable() && this.$refs.webview && this.$refs.webview.openDevTools()
            }, !0)
        }

        initNativeCall() {
            return o(this, void 0, void 0, function* () {
                let e = d.default.getPluginUpdater(r.join(__rootDir, "plugins/ThunderXWebXDAS"));
                p.NativeCallHostModule.nativeCallHost.initialize();
                let t = yield e.getCurFilePath();
                f.information("url", t), this.onMounted(`file:///${r.join(t, "index.html")}`), e.active();
                const n = document.querySelector(`#${this.elementId}`);
                n.addEventListener("new-window", e => {
                    let t = e.url;
                    const n = i(50).parse(t).protocol;
                    if ("http:" === n || "https:" === n) {
                        let e = {tabType: l.TabType.Chromium, tabParam: {url: t}};
                        this.createNewTab(e)
                    }
                });
                let s = void 0;
                n.addEventListener("did-finish-load", e => o(this, void 0, void 0, function* () {
                    if (global.__homepageWebviewReady = !0, !s && !n.isLoading) {
                        let e = n.getWebContentsId(), t = yield a.asyncRemoteCall.getWebContents();
                        (s = yield t.fromId(e)).on("context-menu", (e, t) => {
                            g.ContextMenuNS.popContextMenu(e, t)
                        })
                    }
                })), n.addEventListener("dom-ready", () => o(this, void 0, void 0, function* () {
                    this.performanceStart && (h.client.callServerFunction("SendPerformanceItem", "LoadFindPage", (new Date).getTime() - this.performanceStart).catch(), this.performanceStart = 0)
                }))
            })
        }
    };
    n([s.Prop({})], m.prototype, "tabs", void 0), n([s.Prop({})], m.prototype, "homePageUrl", void 0), n([s.Prop({})], m.prototype, "preloadPath", void 0), n([s.Prop({})], m.prototype, "onMounted", void 0), n([s.Prop({})], m.prototype, "createNewTab", void 0), n([s.Prop({})], m.prototype, "selectTab", void 0), m = n([s.Component], m), t.default = m
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(196), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(754), o = i(24);
    t.default = o.connector.connect({mapGettersToProps: {currentTab: e => e.currentTab}})(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(198), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(5), r = i(46);
    let s = class extends o.Vue {
        get canGoBack() {
            let e = !1;
            do {
                if (a.isNullOrUndefined(this.currentTab) || a.isNullOrUndefined(this.currentTab.tab)) break;
                e = this.currentTab.tab.canGoBack
            } while (0);
            return e
        }

        goBack() {
            do {
                if (a.isNullOrUndefined(this.currentTab) || a.isNullOrUndefined(this.currentTab.tab)) break;
                this.currentTab.tab.goBack()
            } while (0)
        }

        refresh() {
            do {
                if (a.isNullOrUndefined(this.currentTab) || a.isNullOrUndefined(this.currentTab.tab)) break;
                this.currentTab.tab.refresh(!1)
            } while (0)
        }

        isDownloadTab() {
            return "" === r(this.currentTab, "tab", "url") && "下载" === r(this.currentTab, "title")
        }

        get isError() {
            return !this.isDownloadTab() && !0 === r(this.currentTab, "tab", "isErrorPage")
        }

        get isLoading() {
            return !this.isDownloadTab() && !0 === r(this.currentTab, "tab", "isLoadingPage")
        }
    };
    n([o.Prop({})], s.prototype, "currentTab", void 0), s = n([o.Component({components: {Loading: () => Promise.resolve().then(() => i(419))}})], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(200), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(758), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {preloadPath: e => `file:///${__rootDir}/out/plugin-boot.js`},
        mapCommitToProps: {onMounted: "ON_MOUNTED", createNewTab: "CREATE_NEW_TAB"},
        mapDispatchToProps: {selectTab: "selectTab"}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(202), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(12), r = i(6), s = i(79), l = i(28), d = i(403), u = i(5);
    let c = class extends r.Vue {
        mounted() {
            return o(this, void 0, void 0, function* () {
                this.enableDevTools(), this.initNativeCall()
            })
        }

        enableDevTools() {
            window.addEventListener("keyup", e => {
                "F12" === e.key && e.shiftKey && s.DevEnvHelperNS.isDevToolsEnable() && this.$refs.messagePage && this.$refs.messagePage.openDevTools()
            }, !0)
        }

        initNativeCall() {
            return o(this, void 0, void 0, function* () {
                let e;
                l.NativeCallHostModule.nativeCallHost.initialize(), u.isNullOrUndefined(this.elementId) || "" === this.elementId || (e = document.querySelector(`#${this.elementId}`)), e || (e = this.$refs.messagePage);
                let t = void 0;
                e.addEventListener("did-finish-load", i => o(this, void 0, void 0, function* () {
                    if (!t) {
                        let i = e.getWebContentsId(), n = yield a.asyncRemoteCall.getWebContents();
                        (t = yield n.fromId(i)).on("context-menu", (e, t) => {
                            d.ContextMenuNS.popContextMenu(e, t)
                        })
                    }
                }))
            })
        }
    };
    n([r.Prop()], c.prototype, "elementId", void 0), n([r.Prop()], c.prototype, "messagePageUrl", void 0), n([r.Prop({})], c.prototype, "preloadPath", void 0), c = n([r.Component], c), t.default = c
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(204), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(5), r = i(46);
    let s = class extends o.Vue {
        get canGoBack() {
            let e = !1;
            do {
                if (a.isNullOrUndefined(this.currentTab) || a.isNullOrUndefined(this.currentTab.tab)) break;
                e = this.currentTab.tab.canGoBack
            } while (0);
            return e
        }

        goBack() {
            do {
                if (a.isNullOrUndefined(this.currentTab) || a.isNullOrUndefined(this.currentTab.tab)) break;
                this.currentTab.tab.goBack()
            } while (0)
        }

        refresh() {
            do {
                if (a.isNullOrUndefined(this.currentTab) || a.isNullOrUndefined(this.currentTab.tab)) break;
                this.currentTab.tab.refresh(!1)
            } while (0)
        }

        isDownloadTab() {
            return "" === r(this.currentTab, "tab", "url") && "下载" === r(this.currentTab, "title")
        }

        get isError() {
            return !this.isDownloadTab() && !0 === r(this.currentTab, "tab", "isErrorPage")
        }

        get isLoading() {
            return !this.isDownloadTab() && !0 === r(this.currentTab, "tab", "isLoadingPage")
        }
    };
    n([o.Prop({})], s.prototype, "currentTab", void 0), s = n([o.Component({components: {Loading: () => Promise.resolve().then(() => i(419))}})], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(206), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(763), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            currentCategoryId: e => e.DownloadListState.currentCategoryId,
            currentCategoryViewId: e => e.DownloadListState.currentCategoryViewId,
            showPrivateSpaceOpenPage: e => e.PrivateSpaceState.showPrivateSpaceOpenPage,
            showUpgradeTask: e => e.UpgradeTaskState.showUpgradeTask,
            currentTabId: e => e.Tabs.current
        },
        mapCommitToProps: {
            UPDATE_CATEGORY: "UPDATE_CATEGORY",
            UPDATE_CATEGORYVIEW: "UPDATE_CATEGORYVIEW",
            SHOW_PRIVATE_SPACE_OPEN_PAGE: "SHOW_PRIVATE_SPACE_OPEN_PAGE",
            SHOW_UPGRADE_TASK: "SHOW_UPGRADE_TASK",
            UPDATE_VIP_SPEED_STATUS: "UPDATE_VIP_SPEED_STATUS",
            UPDATE_DEFAULT_SPEED_STATUS: "UPDATE_DEFAULT_SPEED_STATUS",
            initPanCategoryTaskList: "INIT_PAN_CATEGORY_TASKLIST",
            uninitPanCategoryTaskList: "UNINIT_PAN_CATEGORY_TASKLIST"
        },
        mapDispatchToProps: {selectTab: "selectTab"},
        mapGettersToProps: {downloadingOrder: e => e.downloadingOrder, completedTaskList: e => e.completedTaskList}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(208), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(19), r = i(0), s = i(12), l = i(6), d = i(764), u = i(771), c = i(775), h = i(778), f = i(781),
        p = i(782), g = i(783), m = i(878), v = i(892), y = i(893), T = i(4), w = i(26), k = i(89), C = i(13),
        b = i(114), I = i(58), S = i(17), _ = i(34), D = i(30), A = i(49), N = i(3), x = i(48), E = i(33), O = i(16),
        P = i(546), M = i(11), F = i(895), L = i(83), R = i(92), B = i(113), U = i(23), V = i(15), K = i(9), G = i(410),
        W = i(25), j = i(126), H = i(10), z = r.default.getLogger("DownloadPanel"),
        X = B.PluginWebviewMgrNS.getWebViewMgr(), q = M.DownloadKernelTaskManager.getTaskManager(),
        Y = O.DownloadKernelEventManager.getEventManager(), J = w.DownloadKernelCategoryManager.getCategoryManager(),
        Z = P.DownloadKernelUpgradeNS.getUpgrade();
    let Q = !1, $ = class extends l.Vue {
        constructor() {
            super(...arguments), this.adShow = !1, this.isFengxingAdShow = !1, this.removeCategoryCookie = -1, this.leftBottomAdShow = !1, this.canLeftBottomAdShow = !1, this.isSearch = !1, this.taskDbLoadFinished = !1, this.taskDbLoadCookie = void 0, this.curUserId = "", this.vipInfo = {}
        }

        onCurUserIdChange() {
            if ("" === this.curUserId) this.uninitPanCategoryTaskList(); else {
                let e = J.getCategoryFromUserId("ThunderPanPlugin", this.curUserId, "ThunderPan Download Category"),
                    t = null;
                e && (t = e.getCategoryData()), t && this.initPanCategoryTaskList(t.categoryId)
            }
        }

        onIsSearchChange(e) {
            this.$emit("show-download-list-search", e)
        }

        onCacheDownloadingSkeleton() {
            do {
                if (!this.taskDbLoadFinished) break;
                let e = D.default.getTaskBases(-1, T.DownloadKernel.CategroyViewID.Downloading),
                    t = Object.values(e).filter(e => -1 === e.categoryId);
                if (t.length > 0) {
                    t.sort(j.SortNS.getSortFuncByConfig(T.DownloadKernel.CategroyViewID.Downloading, -1)), localStorage.setItem("skeleton_downloading", JSON.stringify([{count: t.length}, ...t.slice(0, 15)]));
                    break
                }
                localStorage.removeItem("skeleton_downloading")
            } while (0)
        }

        onCacheCompletedSkeleton() {
            do {
                if (!this.taskDbLoadFinished) break;
                let e = D.default.getTaskBases(-1, T.DownloadKernel.CategroyViewID.Completed),
                    t = Object.values(e).filter(e => -1 === e.categoryId);
                if (t.length > 0) {
                    t.sort(j.SortNS.getSortFuncByConfig(T.DownloadKernel.CategroyViewID.Completed, -1)), localStorage.setItem("skeleton_completed", JSON.stringify([{count: t.length}, ...t.slice(0, 15)]));
                    break
                }
                localStorage.removeItem("skeleton_completed")
            } while (0)
        }

        onTabSelectChange(e) {
            return o(this, void 0, void 0, function* () {
                L.setCurrentTabID(e), V.server.fireClientEvent("OnThunderTabSelectChange", e), this.tryRestorePrivate()
            })
        }

        onCategoryChange(e, t) {
            if (-1 !== e) {
                let t = J.getCategoryFromId(e);
                if (t) {
                    K.XLStatNS.trackEvent("download_leftpanel", "private_page_show", "", 0, 0, 0, 0, "");
                    let i = J.getCategoryView(e, T.DownloadKernel.CategroyViewID.Downloading), n = i.getTaskCount();
                    n += (i = J.getCategoryView(e, T.DownloadKernel.CategroyViewID.Completed)).getTaskCount();
                    let o = t.getPassword();
                    if ((!o || "" === o) && 0 === n) return void this.SHOW_PRIVATE_SPACE_OPEN_PAGE(!0)
                }
            }
            this.SHOW_PRIVATE_SPACE_OPEN_PAGE(!1)
        }

        onDownloadingOrderChange(e) {
            q.isLoadStorageTaskFinish() && x.DownloadDispatchNS.updateTasksOrder(e), this.onCacheDownloadingSkeleton()
        }

        onShowLeftBottomAdChange(e) {
            e && G.adLeftBottomHelper.handleEvent("ad_show"), this.$nextTick(() => {
                X.updateTaskAdWebview()
            })
        }

        get bShowLeftBottomAd() {
            return !this.isFengxingAdShow && this.leftBottomAdShow && this.canLeftBottomAdShow
        }

        handleLeftBottomAdShow(e) {
            this.leftBottomAdShow = e
        }

        handleAdShow(e) {
            this.adShow = e, this.currentCategoryViewId === T.DownloadKernel.CategroyViewID.Downloading && this.$nextTick(() => {
                X.updateTaskAdWebview()
            })
        }

        get isShowPrivateSpace() {
            return -1 !== this.currentCategoryId
        }

        myComputer() {
            -1 !== this.currentCategoryId && this.UPDATE_CATEGORY(-1)
        }

        keydownShowSearchUI(e) {
            if (e.ctrlKey && 70 === e.keyCode) ; else if (e.ctrlKey && 65 === e.keyCode) this.isSearch || this.$refs.downloadlist.selectAll(); else if (27 === e.keyCode) {
                if (this.isShowPrivateSpace) return;
                this.closeSearchUI(), this.$nextTick(() => {
                    this.$refs.downloadlist.$el.focus()
                })
            } else !this.isSearch && e.ctrlKey
        }

        closeSearchUI() {
            this.isSearch = !1, this.currentCategoryViewId === T.DownloadKernel.CategroyViewID.Downloading && this.$nextTick(() => {
                X.updateTaskAdWebview()
            })
        }

        keyOpenSearchUI() {
            K.XLStatNS.trackEvent("download_leftpanel", "search_start_click", "", 0, 0, 0, 0, "entry=ctrlf"), this.openSearchUI()
        }

        openSearchUI() {
            this.isShowPrivateSpace || (this.isSearch = !0)
        }

        isVipUser() {
            return o(this, void 0, void 0, function* () {
                let e = !1;
                if (yield U.LoginHelperNS.loginHelper.isLoginedAw()) {
                    "0" !== (yield U.LoginHelperNS.loginHelper.getUserInfoByKeyAw("isVip", "vip_xl")) && (e = !0)
                }
                return e
            })
        }

        privateSpace() {
            return o(this, void 0, void 0, function* () {
                let e = yield I.default(!1, !0, "privatespace");
                if (e && "" !== e) {
                    let t = J.getPrivateCategoryFromUserId(e);
                    if (t && this.currentCategoryId !== t.getId()) {
                        0 === (yield k.PrivateSpaceHelperNS.accessPrivateCategory(e)) && this.UPDATE_CATEGORY(t.getId())
                    }
                }
            })
        }

        handleMenuClick(e) {
            switch (e) {
                case"my_computer":
                    this.myComputer();
                    break;
                case"private_space":
                    this.privateSpace()
            }
        }

        onUpgradeProgress(e, t) {
            e > t ? this.SHOW_UPGRADE_TASK(!0) : setTimeout(() => {
                this.SHOW_UPGRADE_TASK(!1)
            }, 10)
        }

        handleSwitchCategory(e, t, i, n) {
            return o(this, void 0, void 0, function* () {
                this.isSearch = !1;
                let o = yield s.asyncRemoteCall.getCurrentWindow();
                if (n && ((yield o.isMinimized()) && (yield o.restore()), yield o.show(), 0 !== this.currentTabId && this.selectTab(0)), (yield N.client.callServerFunction("GetCurrentNav")) !== A.NavViewID.Download && (yield N.client.callServerFunction("SelectNav", A.NavViewID.Download)), this.currentCategoryId !== e) if (-1 !== e && J.isPrivateCategory(e)) {
                    let t = yield N.client.callServerFunction("GetUserID");
                    if (0 !== (yield k.PrivateSpaceHelperNS.accessPrivateCategory(t))) return;
                    this.UPDATE_CATEGORY(e), yield this.$nextTick()
                } else this.UPDATE_CATEGORY(-1), yield this.$nextTick();
                this.currentCategoryViewId !== t && (this.UPDATE_CATEGORYVIEW(t), yield this.$nextTick()), this.$refs.downloadlist.selectTask(t, i)
            })
        }

        handleOpenSearchPage(e) {
            if (e) {
                let e = "entry=morelist";
                K.XLStatNS.trackEvent("download_leftpanel", "search_start_click", "", 0, 0, 0, 0, e), this.openSearchUI()
            } else this.closeSearchUI()
        }

        needUpgradeTask() {
            return o(this, void 0, void 0, function* () {
                let e = "", t = 0, i = yield s.asyncRemoteCall.getProcess();
                for (let n = 0; n < i.argv.length; n++) {
                    if (0 === i.argv[n].indexOf("-StartType:")) e = i.argv[n].substr("-StartType:".length); else {
                        if (0 === i.argv[n].indexOf("-PreVersion:")) {
                            let e = i.argv[n].substr("-PreVersion:".length), o = e.indexOf(".");
                            o && (e = e.substr(0, o)) && (t = parseInt(e, 10))
                        }
                    }
                }
                let n = !1;
                return ("Install" === e && t < 9 || "LiveUD" === e && (0 === t || t < 9)) && (n = !0), n
            })
        }

        protectPrivate() {
            this.UPDATE_CATEGORY(-1), k.PrivateSpaceHelperNS.setNeedPassword(!0), -1 !== this.currentCategoryId && (Q = !0)
        }

        tryRestorePrivate() {
            Q && 0 === this.currentTabId && (Q = !1, this.handleMenuClick("private_space"))
        }

        created() {
            return o(this, void 0, void 0, function* () {
                k.PrivateSpaceHelperNS.init(), this.onLogoutEventId = S.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", e => {
                    -1 !== this.currentCategoryId && this.UPDATE_CATEGORY(-1);
                    let t = J.getPrivateCategoryFromUserId(e);
                    t && _.TaskOperatorNs.pauseCategoryAllTask(t.getId(), T.DownloadKernel.TaskStopReason.PrivateLoginOut), this.canLeftBottomAdShow = !1, this.curUserId = "", this.vipInfo = {}
                });
                let e = yield s.asyncRemoteCall.getCurrentWindow();
                e.on("hide", () => {
                    this.protectPrivate()
                }), e.on("minimize", () => {
                    this.protectPrivate()
                }), a.ipcRenderer.on("main-window-state-active-show", () => {
                    this.tryRestorePrivate()
                }), b.downloadContextMenu.attachListener(C.NodeEventMesssageNS.eventDownloadContextMenuClick, this.handleMenuClick), D.default.attachListener(C.NodeEventMesssageNS.eventDownloadSwitchCategory, this.handleSwitchCategory), D.default.attachListener(C.NodeEventMesssageNS.eventShowSearchTaskPage, this.handleOpenSearchPage), E.DownloadKernelManager.attachListener(C.NodeEventMesssageNS.eventDownloadKernelInitEnd, () => o(this, void 0, void 0, function* () {
                    (yield this.needUpgradeTask()) && Z.init() && (Z.attachListener(Z.eventUpgradeProgress, this.onUpgradeProgress), Z.startUpgrade());
                    const {LoginHelperNS: e} = yield Promise.resolve().then(() => i(23));
                    this.onLoginEventId = S.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", t => {
                        Z.init() && Z.upgradePrivateSpace(t), e.loginHelper.getAllUserInfo(e => {
                            this.setUserVipAdConfig(e).catch()
                        }), this.curUserId = t
                    }), this.onUserInfoChangeCookie = S.NativeCallModule.nativeCall.AttachNativeEvent("onUserInfoChange", (t, i) => {
                        "vipinfo" === t && e.loginHelper.getAllUserInfo(e => {
                            this.setUserVipAdConfig(e).catch()
                        })
                    }), (yield e.loginHelper.isLoginedAw()) && e.loginHelper.getAllUserInfo(e => {
                        Z.init() && e && Z.upgradePrivateSpace(e.userID), e && (this.setUserVipAdConfig(e).catch(), this.curUserId = e.userID)
                    })
                })), N.client.attachServerEvent("fengxing_ad_show", (e, t) => {
                    this.isFengxingAdShow = t, this.currentCategoryViewId === T.DownloadKernel.CategroyViewID.Downloading && this.$nextTick(() => {
                        X.updateTaskAdWebview()
                    })
                })
            })
        }

        setUserVipAdConfig(e) {
            return o(this, void 0, void 0, function* () {
                if (!e || !e.vipList || !e.vipList[0]) return;
                this.vipInfo = e.vipList[0];
                let t = e.vipList[0], i = Number(t.isVip), n = W.default.getConfigInfo("cooperateAd", "allShow");
                0 !== i && 1 !== n && ((yield G.adLeftBottomHelper.isNoDisturb()) || (this.canLeftBottomAdShow = !0))
            })
        }

        onUpdateVipTaskStatus(e) {
            this.UPDATE_VIP_SPEED_STATUS(e)
        }

        onDefaultVipTaskStatus(e) {
            this.UPDATE_DEFAULT_SPEED_STATUS(e)
        }

        onTaskDataBaseLoadEnd() {
            let e = H.ConfigNS.isInitConfigFinished();
            z.information("[skeleton] onTaskDataBaseLoadEnd", e), e ? this.$nextTick(() => {
                this.taskDbLoadFinished = !0
            }) : H.ConfigNS.attachListener(C.NodeEventMesssageNS.eventConfigInitFinished, () => {
                this.taskDbLoadFinished = !0
            })
        }

        mounted() {
            this.taskDbLoadFinished = q.isLoadStorageTaskFinish(), this.taskDbLoadFinished || (this.taskDbLoadCookie = 1, E.DownloadKernelManager.attachListener(C.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, this.onTaskDataBaseLoadEnd)), R.PluginFunctionUINS.on("update_vip_task_status", this.onUpdateVipTaskStatus.bind(this)), R.PluginFunctionUINS.on("init_vip_task_status", this.onDefaultVipTaskStatus.bind(this)), this.removeCategoryCookie = Y.attachTaskEvent(T.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== T.DownloadKernel.TaskEventType.RemoveFromCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    if (e[2] !== T.DownloadKernel.CategroyViewID.Downloading) break;
                    let t = e[3], i = {};
                    for (let e of t) i[e.getId()] = null;
                    this.UPDATE_VIP_SPEED_STATUS(i)
                } while (0)
            })
        }

        destroyed() {
            this.onCacheDownloadingSkeleton(), this.onCacheCompletedSkeleton(), this.taskDbLoadCookie && (this.taskDbLoadCookie = void 0, E.DownloadKernelManager.detachListener(C.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, this.onTaskDataBaseLoadEnd)), R.PluginFunctionUINS.removeListener("update_vip_task_status", this.onUpdateVipTaskStatus.bind(this)), R.PluginFunctionUINS.removeListener("init_vip_task_status", this.onDefaultVipTaskStatus.bind(this)), -1 !== this.removeCategoryCookie && (Y.detachTaskEvent(T.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.removeCategoryCookie), this.removeCategoryCookie = -1), k.PrivateSpaceHelperNS.uninit(), void 0 !== this.onLogoutEventId && (S.NativeCallModule.nativeCall.DetachNativeEvent("onLogout", this.onLogoutEventId), this.onLogoutEventId = void 0), void 0 !== this.onLoginEventId && (S.NativeCallModule.nativeCall.DetachNativeEvent("onLoginSuc", this.onLoginEventId), this.onLoginEventId = void 0), void 0 !== this.onUserInfoChangeCookie && (S.NativeCallModule.nativeCall.DetachNativeEvent("onUserInfoChange", this.onUserInfoChangeCookie), this.onUserInfoChangeCookie = void 0), b.downloadContextMenu.detachListener(C.NodeEventMesssageNS.eventDownloadContextMenuClick, this.handleMenuClick), D.default.detachListener(C.NodeEventMesssageNS.eventDownloadSwitchCategory, this.handleSwitchCategory), Z.detachListener(Z.eventUpgradeProgress, this.onUpgradeProgress)
        }
    };
    n([l.Prop({})], $.prototype, "currentTabId", void 0), n([l.Prop({})], $.prototype, "currentCategoryId", void 0), n([l.Prop({})], $.prototype, "currentCategoryViewId", void 0), n([l.Prop({})], $.prototype, "showPrivateSpaceOpenPage", void 0), n([l.Prop({})], $.prototype, "showUpgradeTask", void 0), n([l.Prop({})], $.prototype, "downloadingOrder", void 0), n([l.Prop({})], $.prototype, "completedTaskList", void 0), n([l.Prop({})], $.prototype, "SHOW_PRIVATE_SPACE_OPEN_PAGE", void 0), n([l.Prop({})], $.prototype, "SHOW_UPGRADE_TASK", void 0), n([l.Prop({})], $.prototype, "selectTab", void 0), n([l.Prop({})], $.prototype, "UPDATE_CATEGORY", void 0), n([l.Prop({})], $.prototype, "UPDATE_CATEGORYVIEW", void 0), n([l.Prop({})], $.prototype, "UPDATE_VIP_SPEED_STATUS", void 0), n([l.Prop({})], $.prototype, "UPDATE_DEFAULT_SPEED_STATUS", void 0), n([l.Prop()], $.prototype, "uninitPanCategoryTaskList", void 0), n([l.Prop()], $.prototype, "initPanCategoryTaskList", void 0), n([l.Watch("curUserId")], $.prototype, "onCurUserIdChange", null), n([l.Watch("isSearch")], $.prototype, "onIsSearchChange", null), n([l.Watch("completedTaskList", {immediate: !0})], $.prototype, "onCacheCompletedSkeleton", null), n([l.Watch("currentTabId")], $.prototype, "onTabSelectChange", null), n([l.Watch("currentCategoryId", {immediate: !0})], $.prototype, "onCategoryChange", null), n([l.Watch("downloadingOrder", {immediate: !0})], $.prototype, "onDownloadingOrderChange", null), n([l.Watch("bShowLeftBottomAd")], $.prototype, "onShowLeftBottomAdChange", null), $ = n([l.Component({
        components: {
            ToolBarContainer: d.default,
            DownloadListContainer: m.default,
            PrivateSpaceOpenPageContainer: y.default,
            DownloadSearchContainer: F.default,
            UpgradeTaskContainer: c.default,
            ToastNotify: h.default,
            StatusBarContainer: u.default,
            AdPlatformCtrl: f.default,
            AdLeftBottom: p.default,
            TaskDetail: g.default,
            DownloadListSkeleton: v.default
        }
    })], $), t.default = $
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(210), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(765), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            currentCategoryId: e => e.DownloadListState.currentCategoryId,
            currentCategoryViewId: e => e.DownloadListState.currentCategoryViewId,
            downloadingButtons: e => e.ToolbarState.downloadingButtons,
            completedButtons: e => e.ToolbarState.completedButtons,
            recycleButtons: e => e.ToolbarState.recycleButtons,
            privateDownloadingButtons: e => e.ToolbarState.privateDownloadingButtons,
            privateCompletedButtons: e => e.ToolbarState.privateCompletedButtons
        }, mapDispatchToProps: {attachToolbarEvent: "attachToolbarEvent"}, mapGettersToProps: {}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(212), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(0), s = i(3), l = i(9), d = i(22), u = i(4), c = i(766), h = i(768), f = i(541), p = i(116),
        g = i(10), m = i(64), v = i(529), y = i(16), T = i(5), w = i(25),
        k = y.DownloadKernelEventManager.getEventManager(), C = r.default.getLogger("tool-bar");
    let b = class extends a.Vue {
        constructor() {
            super(...arguments), this.timerId = -1, this.vipButtonPluginEnable = -1, this.lastMobileQRCode = "", this.syncStateChangedCookie = null, this.shouleiSyncState = "offline", this.shouleiButtonNewIcon = !1, this.shouleiButtonTooltip = !1, this.taskCreatedCookie = void 0
        }

        get toolbarButtons() {
            let e = [];
            return -1 === this.currentCategoryId ? this.currentCategoryViewId === u.DownloadKernel.CategroyViewID.Downloading ? e = this.downloadingButtons : this.currentCategoryViewId === u.DownloadKernel.CategroyViewID.Completed ? e = this.completedButtons : this.currentCategoryViewId === u.DownloadKernel.CategroyViewID.Recycle && (e = this.recycleButtons) : this.currentCategoryViewId === u.DownloadKernel.CategroyViewID.Downloading ? e = this.privateDownloadingButtons : this.currentCategoryViewId === u.DownloadKernel.CategroyViewID.Completed && (e = this.privateCompletedButtons), e
        }

        onShouleiButtonClick() {
            if (this.shouleiButtonNewIcon) {
                this.shouleiButtonNewIcon = !1;
                let e = m.TimeHelperNS.formatDate(new Date, "yyyy-MM-dd");
                g.ConfigNS.setValue("ShouleiDownload", "SyncButtonNewClickDate", e), setTimeout(() => {
                    s.client.callServerFunction("UpdateButton", "toolbar_button", this.getShouleiButtonInfo())
                }, 0)
            }
            let e = "status=" + ("online" === this.shouleiSyncState ? "connected" : "disconnected");
            l.XLStatNS.trackEvent("download_leftpanel", "top_connect_shoulei_click", "", 0, 0, 0, 0, e), d.MessageBox.custom("shoulei-sync-guide", {
                type: "online" === this.shouleiSyncState ? "remoting" : "open",
                sfrom: "list",
                statFrom: "top_icon"
            }).catch()
        }

        onShouleiButtonTooltipClose() {
            this.shouleiButtonTooltip = !1, setTimeout(() => {
                s.client.callServerFunction("UpdateButton", "toolbar_button", this.getShouleiButtonInfo())
            }, 0), l.XLStatNS.trackEvent("download_leftpanel", "top_connect_shoulei_toast_click", "", 0, 0, 0, 0, "button=close")
        }

        onShouleiButtonTooltipClick() {
            this.shouleiButtonTooltip = !1, this.shouleiButtonNewIcon = !1, d.MessageBox.custom("shoulei-sync-guide", {
                type: "online" === this.shouleiSyncState ? "remoting" : "open",
                sfrom: "list",
                statFrom: "icon_toast"
            }).catch(), setTimeout(() => {
                s.client.callServerFunction("UpdateButton", "toolbar_button", this.getShouleiButtonInfo())
            }, 0), l.XLStatNS.trackEvent("download_leftpanel", "top_connect_shoulei_toast_click", "", 0, 0, 0, 0, "button=bubble")
        }

        getShouleiButtonInfo() {
            return {
                id: "mobile-sync",
                onClick: this.onShouleiButtonClick.bind(this),
                onTooltipClose: this.shouleiButtonTooltip ? this.onShouleiButtonTooltipClose.bind(this) : null,
                onTooltipClick: this.shouleiButtonTooltip ? this.onShouleiButtonTooltipClick.bind(this) : null,
                position: 1,
                tooltipTitle: "手机可以遥控电脑下载啦！",
                tooltipSubTitle: "回家直接看大片",
                imgSrc: "online" === this.shouleiSyncState ? "xdas://res/xlx-icon-control" : "xdas://res/xlx-icon-control is-animation",
                title: "online" === this.shouleiSyncState ? "手机遥控下载中" : "手机遥控下载",
                loading: "online" === this.shouleiSyncState,
                newIcon: "online" !== this.shouleiSyncState && this.shouleiButtonNewIcon,
                tooltip: this.shouleiButtonTooltip
            }
        }

        detachTaskCreated() {
            this.taskCreatedCookie && (k.detachTaskEvent(u.DownloadKernel.TaskEventType.TaskCreated, this.taskCreatedCookie), this.taskCreatedCookie = void 0)
        }

        onTaskCreated(e, t) {
            do {
                if (e !== u.DownloadKernel.TaskEventType.TaskCreated || !t || t.length <= 0) break;
                if ("online" === this.shouleiSyncState) break;
                for (let e = 0; e < t.length; ++e) {
                    let i = t[e];
                    if (!i) continue;
                    if (i.getTaskAttribute(u.DownloadKernel.TaskAttribute.Background)) continue;
                    if (-1 !== i.getTaskAttribute(u.DownloadKernel.TaskAttribute.CategoryId)) continue;
                    this.detachTaskCreated();
                    let n = m.TimeHelperNS.formatDate(new Date, "yyyy-MM-dd");
                    g.ConfigNS.setValue("ShouleiDownload", "SyncButtonToolTip", n), this.shouleiButtonTooltip = !0, s.client.callServerFunction("UpdateButton", "toolbar_button", this.getShouleiButtonInfo()), l.XLStatNS.trackEvent("download_leftpanel", "top_connect_shoulei_toast_show");
                    break
                }
            } while (0)
        }

        addShouleiButton() {
            return o(this, void 0, void 0, function* () {
                const e = p.ShouleiListSyncNS.getMananger();
                if (yield e.enable()) {
                    this.shouleiSyncState = e.getState();
                    let t = w.default.getConfigInfo("shouleiDownload", "enableSyncNewIcon"),
                        i = w.default.getConfigInfo("shouleiDownload", "syncNewIconLimitTimes") || 1,
                        n = g.ConfigNS.getValue("ShouleiDownload", "SyncButtonNewTimes", 0);
                    if (T.isNullOrUndefined(t) || 1 === t) {
                        let e = m.TimeHelperNS.formatDate(new Date, "yyyy-MM-dd");
                        this.shouleiButtonNewIcon = g.ConfigNS.getValue("ShouleiDownload", "SyncButtonNewClickDate", "") !== e, this.shouleiButtonNewIcon && (n < i ? g.ConfigNS.getValue("ShouleiDownload", "SyncButtonShowDate", "") !== e && (g.ConfigNS.setValue("ShouleiDownload", "SyncButtonNewTimes", n + 1), g.ConfigNS.setValue("ShouleiDownload", "SyncButtonShowDate", e)) : n === i ? g.ConfigNS.getValue("ShouleiDownload", "SyncButtonShowDate", "") !== e && (this.shouleiButtonNewIcon = !1) : this.shouleiButtonNewIcon = !1)
                    }
                    s.client.callServerFunction("CreateButton", "toolbar_button", this.getShouleiButtonInfo()), l.XLStatNS.trackEvent("download_leftpanel", "top_connect_shoulei_show"), this.syncStateChangedCookie = e.attachEvent("OnConnectStateChanged", e => {
                        this.shouleiSyncState = e, s.client.callServerFunction("UpdateButton", "toolbar_button", this.getShouleiButtonInfo())
                    })
                } else v.getMobileImgSrc().then(e => {
                    if (C.information("getMobileImgSrc", e), e) {
                        this.lastMobileQRCode = e;
                        let t = {
                            id: "mobile",
                            imgSrc: `${__rootDir}/static/icon/mobile_xl.png`,
                            title: "手机迅雷",
                            onClick: () => {
                                l.XLStatNS.trackEvent("download_leftpanel", "top_shoulei_icon_click"), d.MessageBox.custom("img-dlg", {
                                    src: this.lastMobileQRCode,
                                    width: 400,
                                    height: 276
                                }, {width: 400, height: 276}).catch()
                            },
                            position: 4
                        };
                        l.XLStatNS.trackEvent("download_leftpanel", "top_shoulei_icon_show"), s.client.callServerFunction("CreateButton", "toolbar_button", t)
                    }
                })
            })
        }

        mounted() {
            this.attachToolbarEvent(), f.VipPluginSwitchConfigNS.getToolbarVipButtonEnable().then(e => {
                this.vipButtonPluginEnable = e
            }), setTimeout(() => {
                this.addShouleiButton().catch()
            }, 2e3);
            this.timerId = setInterval(() => {
                v.getMobileImgSrc().catch()
            }, 36e5)
        }

        destroyed() {
            if (-1 !== this.timerId && (clearInterval(this.timerId), this.timerId = -1), this.syncStateChangedCookie) {
                p.ShouleiListSyncNS.getMananger().detachEvent("OnConnectStateChanged", this.syncStateChangedCookie), this.syncStateChangedCookie = null
            }
            this.detachTaskCreated()
        }
    };
    n([a.Prop({})], b.prototype, "currentCategoryId", void 0), n([a.Prop({})], b.prototype, "currentCategoryViewId", void 0), n([a.Prop({})], b.prototype, "downloadingButtons", void 0), n([a.Prop({})], b.prototype, "completedButtons", void 0), n([a.Prop({})], b.prototype, "recycleButtons", void 0), n([a.Prop({})], b.prototype, "privateDownloadingButtons", void 0), n([a.Prop({})], b.prototype, "privateCompletedButtons", void 0), n([a.Prop({})], b.prototype, "attachToolbarEvent", void 0), b = n([a.Component({
        components: {
            ToolBarButtonContainer: c.default,
            ToolBarVipButtonContainer: h.default
        }
    })], b), t.default = b
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(214), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(767), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            currentCategoryId: e => e.DownloadListState.currentCategoryId,
            currentCategoryViewId: e => e.DownloadListState.currentCategoryViewId,
            showPrivateSpaceOpenPage: e => e.PrivateSpaceState.showPrivateSpaceOpenPage
        },
        mapCommitToProps: {CREATE_NEW_TAB: "CREATE_NEW_TAB", SORT_CATEGORY_BY_FUNCTION: "SORT_CATEGORY_BY_FUNCTION"},
        mapGettersToProps: {currentSelectdTaskInfos: e => e.currentSelectdTaskInfos}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(216), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let a = class extends o.Vue {
        constructor() {
            super(...arguments), this.disabled = !1
        }

        get customClass() {
            let e = "";
            do {
                if (this.imgSrc && "" !== this.imgSrc) {
                    let t = "xdas://res/";
                    0 === this.imgSrc.indexOf(t) && (e = this.imgSrc.substr(t.length));
                    break
                }
                e = this.id
            } while (0);
            return e
        }

        onSelectChange(e) {
            let t = this.buttonClassFilter;
            this.buttonClassFilter || (t = (() => ""));
            let i = t(this);
            i.then ? i.then(e => {
                this.disabled = "" !== e
            }) : this.disabled = "" !== i
        }

        handleClick(e) {
            this.disabled || this.click(e, this)
        }

        handleToolTipClose(e) {
            this.tooltipClose && this.tooltipClose(e, this)
        }

        handleToolTipClick(e) {
            this.tooltipClick && this.tooltipClick(e, this)
        }

        handleEnter(e) {
            this.disabled || this.enter && this.enter()
        }
    };
    n([o.Prop({})], a.prototype, "redDot", void 0), n([o.Prop({})], a.prototype, "imgSrc", void 0), n([o.Prop({})], a.prototype, "title", void 0), n([o.Prop({})], a.prototype, "id", void 0), n([o.Prop({})], a.prototype, "newIcon", void 0), n([o.Prop({})], a.prototype, "loading", void 0), n([o.Prop({})], a.prototype, "tooltip", void 0), n([o.Prop({})], a.prototype, "tooltipTitle", void 0), n([o.Prop({})], a.prototype, "tooltipSubTitle", void 0), n([o.Prop({})], a.prototype, "currentCategoryId", void 0), n([o.Prop({})], a.prototype, "currentCategoryViewId", void 0), n([o.Prop({})], a.prototype, "showPrivateSpaceOpenPage", void 0), n([o.Prop({})], a.prototype, "currentSelectdTaskInfos", void 0), n([o.Prop({})], a.prototype, "buttonClassFilter", void 0), n([o.Prop({})], a.prototype, "click", void 0), n([o.Prop({})], a.prototype, "tooltipClose", void 0), n([o.Prop({})], a.prototype, "tooltipClick", void 0), n([o.Prop({})], a.prototype, "enter", void 0), n([o.Prop({})], a.prototype, "CREATE_NEW_TAB", void 0), n([o.Prop({})], a.prototype, "SORT_CATEGORY_BY_FUNCTION", void 0), n([o.Watch("currentSelectdTaskInfos", {immediate: !0})], a.prototype, "onSelectChange", null), a = n([o.Component], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(218), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(769), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            currentCategoryId: e => e.DownloadListState.currentCategoryId,
            currentCategoryViewId: e => e.DownloadListState.currentCategoryViewId,
            showPrivateSpaceOpenPage: e => e.PrivateSpaceState.showPrivateSpaceOpenPage
        },
        mapCommitToProps: {CREATE_NEW_TAB: "CREATE_NEW_TAB", SORT_CATEGORY_BY_FUNCTION: "SORT_CATEGORY_BY_FUNCTION"},
        mapGettersToProps: {currentSelectdTaskInfos: e => e.currentSelectdTaskInfos}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(220), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(3), s = i(0).default.getLogger("DownloadPanel.ToolBarVipButton"), l = i(770);
    let d = class extends a.Vue {
        constructor() {
            super(...arguments), this.disabled = !1, this.disableClass = "", this.vipIcon = "", this.hoverTitle = "", this.newClick = null, this.hasRedPoint = !1, this.clickUrl = "https://vip.xunlei.com/index.html?referfrom=v_pc_xlx_ggong_taskbar_vip", this.cfgType = "", this.iconMgr = null
        }

        onSelectChange(e) {
            return o(this, void 0, void 0, function* () {
                "xlx-icon-nav-file" !== this.id && "xlx-icon-nav-folder" !== this.id || (this.disableClass = yield this.buttonClassFilter(this.currentCategoryId, this.currentCategoryViewId, e, this.showPrivateSpaceOpenPage), "" === this.disableClass ? this.disabled = !1 : this.disabled = !0)
            })
        }

        handleClick(e) {
            this.disabled || (s.information("handleClick, clickUrl=", this.clickUrl), "" !== this.cfgType && r.client.callServerFunction("SetValue", "ToolBarButtonVipIcon", this.cfgType, this.clickUrl).catch(), r.client.callServerFunction("OpenNewTab", this.clickUrl).catch(), this.iconMgr.sendStat("download_leftpanel", "top_vipicon_click"), this.hasRedPoint && (this.hasRedPoint = !1))
        }

        handleError(e) {
            this.vipIcon = ""
        }

        get handleTitle() {
            return "" === this.hoverTitle ? this.title : this.hoverTitle
        }

        handleEnter(e) {
            this.iconMgr.sendStat("download_leftpanel", "top_vipicon_hover_show")
        }

        get filterClass() {
            let e = this.disableClass;
            do {
                if ("" !== e) break;
                "string" == typeof (e = this.buttonClassFilter(this.currentCategoryId, this.currentCategoryViewId, this.currentSelectdTaskInfos, this.showPrivateSpaceOpenPage)) && (this.disabled = "" !== e), this.hasRedPoint && (e = "is-new")
            } while (0);
            return e
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                this.iconMgr = new l.VipIconMgr(this), this.iconMgr.init()
            })
        }
    };
    n([a.Prop({})], d.prototype, "title", void 0), n([a.Prop({})], d.prototype, "id", void 0), n([a.Prop({})], d.prototype, "currentCategoryId", void 0), n([a.Prop({})], d.prototype, "currentCategoryViewId", void 0), n([a.Prop({})], d.prototype, "showPrivateSpaceOpenPage", void 0), n([a.Prop({})], d.prototype, "currentSelectdTaskInfos", void 0), n([a.Prop({})], d.prototype, "buttonClassFilter", void 0), n([a.Prop({})], d.prototype, "CREATE_NEW_TAB", void 0), n([a.Prop({})], d.prototype, "SORT_CATEGORY_BY_FUNCTION", void 0), n([a.Watch("currentSelectdTaskInfos", {immediate: !0})], d.prototype, "onSelectChange", null), d = n([a.Component], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(222), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(772), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            tabs: e => e.Tabs.tabs,
            current: e => e.Tabs.current,
            currentCategoryId: e => e.DownloadListState.currentCategoryId
        },
        mapCommitToProps: {UPDATE_CATEGORY: "UPDATE_CATEGORY", setCurrentGuide: "SET_CURRENT_GUIDE"},
        mapDispatchToProps: {},
        mapGettersToProps: {currentGuide: e => e.CurrentGuide}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(224), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(14), s = i(13), l = i(109), d = i(33), u = i(408), c = i(773), h = i(17), f = i(3), p = i(23),
        g = i(10), m = i(9), v = i(28), y = i(50), T = i(2), w = i(7), k = i(4), C = i(16), b = i(25), I = i(528),
        S = i(22), _ = i(58), D = i(92), A = i(116), N = i(26), x = i(89), E = i(108), O = i(392), P = i(0), M = i(8),
        F = i(149), L = P.default.getLogger("StatusBar"), R = C.DownloadKernelEventManager.getEventManager(),
        B = w.default(T.join(__rootDir, "../bin/ThunderHelper.node")), U = i(774).urls,
        V = N.DownloadKernelCategoryManager.getCategoryManager();
    let K = class extends a.Vue {
        constructor() {
            super(...arguments), this.totalDownloadSpeed = 0, this.totalUploadSpeed = 0, this.todayDownSize = 0, this.todayUpSize = 0, this.downloadVipSpeed = 0, this.downloadCompleteTaskType = u.ScheduleCompleteTaskType.UnKnown, this.canShowVipSpeed = !1, this.canShowDiskBusy = !1, this.showVipText = "会员登录", this.wkyDisplay = "none", this.isFreeDownload = !1, this.vipType = void 0, this.isLimit = !1, this.popUp = !1, this.limitSpeetMenuText = "限速下载", this.entryText = "下载计划", this.scheduleTaskCount = 0, this.diskIdleInfo = [{
                name: "",
                percent: "0",
                percentBase: "0"
            }], this.onceDiskInfo = !1, this.diskInfo = [], this.everySecondDiskInfo = {}, this.timeDiskIdleId = -1, this.taskIds = [], this.taskPath = [], this.showTime = 0, this.hideTime = 0, this.shouleiSyncEnable = !1, this.shouleiSyncState = "offline", this.canShowPcNode = !1, this.pcNodeImgSrc = "", this.pcNodeTooltip = "", this.pcBtnClick = null, this.pcNodeOpened = !1, this.showIcon = !1, this.browserName = "", this.tipsInfo = null, this.pcNodePopOptions = {}, this.canShowKuainiaoTip = !1, this.canShowKuainiaoInterface = !1, this.kuainiaoImgSrc = "", this.kuaiNiaoText = "", this.kuaiNiaoTipText = "", this.kuaiNiaoClick = null, this.kuaiNiaoTipClick = null
        }

        get isInPrivateSpace() {
            return -1 !== this.currentCategoryId
        }

        showBrowserGuide() {
            return o(this, void 0, void 0, function* () {
                m.XLStatNS.trackEvent("download_leftpanel", "browser_plugin_entrance_click"), yield(yield Promise.resolve().then(() => i(110))).default().popUpBrowserGuide(!0, "status")
            })
        }

        findProcessAw(e) {
            return o(this, void 0, void 0, function* () {
                return new Promise(t => {
                    B.asyncFindProcess(e, e => {
                        let i = e && e.length > 0;
                        t(i)
                    })
                })
            })
        }

        openAddons(e, t) {
            return o(this, void 0, void 0, function* () {
                let i = "", n = yield M.FileSystemAWNS.readFileAW(e), o = null;
                if (n && n.length > 0) {
                    i = n.toString();
                    try {
                        (o = JSON.parse(i)).extensions.settings.ncennffkjdiamlpmcbajkmaiiiddgioo.state = 1, "360chrome" !== t && "360se" !== t || (o.extensions.settings.ncennffkjdiamlpmcbajkmaiiiddgioo.disable_reasons = 0), i = JSON.stringify(o);
                        let n = yield M.FileSystemAWNS.writeFileAW(e, i);
                        L.information("openAddons writeFileAW ret", n)
                    } catch (e) {
                        return L.warning(e), n
                    }
                }
                return L.information("isEdgeAndChromeAddonsOpened open", !1, "path", e), !1
            })
        }

        startBrowserGuide() {
            return o(this, void 0, void 0, function* () {
                if (!this.tipsInfo) return;
                let e = "";
                switch (this.browserName) {
                    case"360安全浏览器":
                        e = "360se";
                        break;
                    case"360极速浏览器":
                        e = "360chrome";
                        break;
                    case"QQ浏览器":
                        e = "QQBrowser";
                        break;
                    case"Edge浏览器":
                        e = "msedge";
                        break;
                    case"Chrome浏览器":
                        e = "chrome"
                }
                let t = this.tipsInfo.browserInfo;
                if (t && t.browserExist) {
                    let i = t.installCmdLine, n = !0, o = e + ".exe", a = yield this.findProcessAw(o);
                    t.browserAddonInstall && !t.browserAddonOpen && ("QQBrowser" === e ? i = t.openCmdLine : "msedge.exe" === o ? i = t.installCmdLine : a ? "360se.exe" === o ? i = "https://misc-xl9-ssl.xunlei.com/pages/dist/#/browser-plugin/360" : "chrome.exe" === o && (i = "https://misc-xl9-ssl.xunlei.com/pages/dist/#/browser-plugin/chrome") : (n = !1, yield this.openAddons(t.browserAddonConfigPath, e)));
                    let r = ",browser=" + this.tipsInfo.title + ",click_id=quick_start";
                    m.XLStatNS.trackEvent("download_leftpanel", "browser_plugin_guid_bubble_click", "", 0, 0, 0, 0, r), n ? B.shellExecute(0, "open", t.browserPath, i, "", "SW_SHOW") : f.client.callServerFunction("ShowMessageToast", {
                        message: "已开启下载支持",
                        type: "success"
                    }).catch()
                }
                this.setCurrentGuide(F.NewIssueGuide.unknown)
            })
        }

        closeTip() {
            let e = ",browser=" + this.tipsInfo.title + ",click_id=close";
            m.XLStatNS.trackEvent("download_leftpanel", "browser_plugin_guid_bubble_click", "", 0, 0, 0, 0, e), this.setCurrentGuide(F.NewIssueGuide.unknown)
        }

        handlePrivateSpace() {
            return o(this, void 0, void 0, function* () {
                let e = "state=" + (-1 === this.currentCategoryId ? "entry" : "quit");
                if (m.XLStatNS.trackEvent("download_leftpanel", "dl_private_space_btn_click", "", 0, 0, 0, 0, e), -1 === this.currentCategoryId) {
                    let e = yield _.default(!1, !0, "privatespace");
                    if (e && "" !== e) {
                        let t = V.getPrivateCategoryFromUserId(e);
                        if (t && this.currentCategoryId !== t.getId()) {
                            0 === (yield x.PrivateSpaceHelperNS.accessPrivateCategory(e)) && this.UPDATE_CATEGORY(t.getId())
                        }
                    }
                } else this.UPDATE_CATEGORY(-1)
            })
        }

        get kuainiaoClass() {
            let e = "";
            do {
                if (this.kuainiaoImgSrc) {
                    let t = "xdas://res/";
                    0 === this.kuainiaoImgSrc.indexOf(t) && (e = this.kuainiaoImgSrc.substr(t.length));
                    break
                }
            } while (0);
            return e
        }

        onIsDiskInfoChange(e) {
            if (e) m.XLStatNS.trackEvent("download_leftpanel", "disk_overload_icon_show"), this.showTime = (new Date).getTime(); else {
                this.hideTime = (new Date).getTime();
                let e = "dur=" + ((this.hideTime - this.showTime) / 1e3).toString();
                m.XLStatNS.trackEvent("download_leftpanel", "disk_overload_icon_show_dur", "", 0, 0, 0, 0, e)
            }
        }

        onIsLimtChanged(e) {
            e ? (this.limitSpeetMenuText = "限速下载中", this.entryText = "限速下载中") : (this.limitSpeetMenuText = "限速下载", this.entryText = "下载计划")
        }

        get pcNodeTooltipVisible() {
            let e = !1;
            return this.pcNodeTooltip && (e = !0), e
        }

        get pcNodePopEnable() {
            let e = !0;
            do {
                if (this.pcNodeOpened) {
                    this.pcNodePopOptions.statusDesc && this.pcNodePopOptions.actionText || (e = !1);
                    break
                }
                this.pcNodePopOptions.introduction && this.pcNodePopOptions.buttonText || (e = !1)
            } while (0);
            return e
        }

        get vipText() {
            return this.showVipText
        }

        get curHoverSpeed() {
            let e = "";
            return e = r.ThunderUtil.formatSize(this.totalDownloadSpeed, 1) + "/s"
        }

        get curSpeed() {
            let e = "";
            return e = this.totalDownloadSpeed >= 1024e3 ? r.ThunderUtil.formatSize(this.totalDownloadSpeed, 1) + "/s" : r.ThunderUtil.formatSize(this.totalDownloadSpeed, 0) + "/s"
        }

        get curUpSpeed() {
            let e = "";
            return e = r.ThunderUtil.formatSize(this.totalUploadSpeed, 1) + "/s"
        }

        get curVipSpeed() {
            let e = "";
            return e = this.downloadVipSpeed >= 1024e3 ? r.ThunderUtil.formatSize(this.downloadVipSpeed, 1) + "/s" : r.ThunderUtil.formatSize(this.downloadVipSpeed, 0) + "/s"
        }

        get downSize() {
            let e = "";
            return e = r.ThunderUtil.formatSize(this.todayDownSize)
        }

        get upSize() {
            let e = "";
            return e = r.ThunderUtil.formatSize(this.todayUpSize)
        }

        get shouleiRemoteSyncText() {
            return "online" === this.shouleiSyncState ? "手机遥控下载中" : "手机遥控下载"
        }

        showPop() {
            m.XLStatNS.trackEvent("download_leftpanel", "bottom_speed_hover"), this.popUpScheduleMenu(!1)
        }

        viewMoreData() {
            return o(this, void 0, void 0, function* () {
                m.XLStatNS.trackEvent("download_leftpanel", "bottom_speed_pop_click");
                let e = yield _.default(!1, !0, "download_data");
                e && "" !== e && S.MessageBox.custom("DownloadData", {
                    windowWidth: 450,
                    windowHeight: this.canShowVipSpeed ? 523 : 597
                })
            })
        }

        onKuainiaoTextClick(e) {
            this.kuaiNiaoClick && this.kuaiNiaoClick(e)
        }

        onKuainiaoTipClick() {
            this.kuaiNiaoTipClick && this.kuaiNiaoTipClick()
        }

        handClickleVipText() {
            if ("会员登录" === this.showVipText) p.LoginHelperNS.loginHelper.showLoginDlg("vip", !0); else if ("会员加速" === this.showVipText) {
                let e = "https://pay.xunlei.com/pay.html?bizNo=baijin&selectBizno=baijin&timeType=1001&referfrom=v_pc_xlx_hytq_js&aidfrom=bottom";
                f.client.callServerFunction("OpenNewTab", e).catch();
                let t = "clickid=bottom,vip_type=" + this.vipType;
                m.XLStatNS.trackEvent("xlx_vip_event", "hyjs_click", "", 0, 0, 0, 0, t)
            }
        }

        openTab() {
            f.client.callServerFunction("OpenNewTab", "http://yangtai.xunlei.com/?p=11111").catch()
        }

        hover() {
            m.XLStatNS.trackEvent("download_leftpanel", "disk_overload_popup_show")
        }

        onConfigInitFinished() {
            let e = l.DownloadModeNS.getCurrentDownloadMode();
            this.isLimit = "1" !== e, this.isFreeDownload = l.DownloadModeNS.getFreeDownLoad(), this.downloadCompleteTaskType = u.ScheduleTaskNS.getDownloadCompleteTaskType(), c.FlowMonitorNS.startMonitor(), I.default.init(), u.ScheduleTaskNS.init(), d.DownloadKernelManager.attachListener(s.NodeEventMesssageNS.eventGlobalDownloadSpeedChanged, e => {
                this.totalDownloadSpeed = c.FlowMonitorNS.getCurrentDownloadSpeed(), this.downloadVipSpeed = c.FlowMonitorNS.getCurrentVipSpeed(), this.todayDownSize = c.FlowMonitorNS.getTodayDownloadSize()
            }), d.DownloadKernelManager.attachListener(s.NodeEventMesssageNS.eventGlobalUploadSpeedChanged, e => {
                this.totalUploadSpeed = e, this.todayUpSize = c.FlowMonitorNS.getTodayUploadSize()
            })
        }

        onGetUserInfo() {
            p.LoginHelperNS.loginHelper.getAllUserInfo(e => {
                do {
                    if (null === e || void 0 === e) break;
                    let t = e.vipList[0], i = Number(t.isVip);
                    if (this.vipType = Number(t.vasType), 0 !== i) this.canShowVipSpeed = !0; else {
                        this.showVipText = "会员加速";
                        let e = "btn_type=bottom,vip_type=" + this.vipType;
                        m.XLStatNS.trackEvent("xlx_vip_event", "hyjs_show", "", 0, 0, 0, 0, e)
                    }
                } while (0)
            })
        }

        created() {
            g.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigInitFinished, () => {
                this.onConfigInitFinished()
            }), g.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigValueChanged, (e, t, i, n) => {
                switch (e) {
                    case"ConfigNet":
                        "ConfigNet_Type" === t && ("1" === String(n) ? this.isLimit = !1 : this.isLimit = !0)
                }
            }), h.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", () => {
                this.onGetUserInfo()
            }), h.NativeCallModule.nativeCall.AttachNativeEvent("onUserInfoChange", (e, t) => {
                "vipinfo" === e && this.onGetUserInfo()
            }), h.NativeCallModule.nativeCall.AttachNativeEvent("getCurrentTabUrl", e => {
                let t = !1, i = y.parse(this.tabs[this.current].tab.url).hostname;
                do {
                    if ("" === i) break;
                    for (let e = 0; e < U.length; e++) if (U[e].url === i) {
                        t = !0;
                        break
                    }
                } while (0);
                v.NativeCallHostModule.nativeCallHost.fireNativeEvent(e, t)
            }), h.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                this.canShowVipSpeed = !1, this.showVipText = "会员登录", this.vipType = void 0
            })
        }

        updateDiskInfo(e) {
            if (this.everySecondDiskInfo.hasOwnProperty(e.name) || (this.everySecondDiskInfo[e.name] = []), this.everySecondDiskInfo[e.name].length >= 6 && this.everySecondDiskInfo[e.name].splice(0, 1), this.everySecondDiskInfo[e.name].push(e.percent), 6 === this.everySecondDiskInfo[e.name].length) {
                let t = (this.everySecondDiskInfo[e.name][0] + this.everySecondDiskInfo[e.name][1] + this.everySecondDiskInfo[e.name][2] + this.everySecondDiskInfo[e.name][3] + this.everySecondDiskInfo[e.name][4] + this.everySecondDiskInfo[e.name][5]) / 6;
                t = Math.floor(t);
                let i = e.name, n = e.name,
                    o = {name: i = e.name.slice(0, 2) + "(" + n.slice(2), percent: t.toString()};
                if (t >= 99) {
                    for (let n of this.taskPath) if (-1 !== e.name.indexOf(n) || -1 !== e.name.indexOf(n.toLocaleUpperCase())) {
                        let e = !1;
                        for (let n of this.diskInfo) if (n.name === i) {
                            n.percent = t.toString(), e = !0;
                            break
                        }
                        e || this.diskInfo.push(o), this.canShowDiskBusy = !0
                    }
                } else this.diskInfo.some((e, t) => {
                    if (e.name === o.name) return this.diskInfo.splice(t), void (0 === this.diskInfo.length && (this.canShowDiskBusy = !1))
                })
            }
        }

        startAttchDiskIdleInfo() {
            0 !== b.default.getConfigInfo("diskIdleInfo", "enable") && (this.timeDiskIdleId = setInterval(() => {
                B.asyncDiskIdleInfo(e => {
                    do {
                        if (!e || 0 === e.length) break;
                        if (!this.onceDiskInfo) {
                            this.diskIdleInfo = e, this.onceDiskInfo = !0;
                            break
                        }
                        if (e.length !== this.diskIdleInfo.length) break;
                        for (let t in this.diskIdleInfo) {
                            if (!this.diskIdleInfo[t] || !e[t] || !e[t].name) break;
                            if (e[t].name === this.diskIdleInfo[t].name) {
                                let i = (Number(e[t].percent) - Number(this.diskIdleInfo[t].percent)) / (Number(e[t].percentBase) - Number(this.diskIdleInfo[t].percentBase));
                                i = Math.floor(100 * (1 - i));
                                let n = {name: e[t].name, percent: i};
                                "_Total" !== e[t].name && this.updateDiskInfo(n)
                            }
                        }
                        this.diskIdleInfo = e
                    } while (0)
                })
            }, 1e3))
        }

        handlePcNodeClick() {
            this.pcBtnClick && this.pcBtnClick()
        }

        showWkyPop() {
            "none" === this.wkyDisplay && (this.wkyDisplay = "block", this.pcNodePopOptions && this.pcNodePopOptions.onHover && this.pcNodePopOptions.onHover())
        }

        hideWkyPop(e) {
            do {
                if ("none" === this.wkyDisplay) break;
                if (!e) {
                    this.wkyDisplay = "none";
                    break
                }
                let t = document.getElementById("status-wky-pop");
                if (!t) break;
                let i = t.getBoundingClientRect();
                (e.clientX < i.left || e.clientX > i.right || e.clientY < i.top || e.clientY - 3 > i.bottom) && (this.wkyDisplay = "none")
            } while (0)
        }

        onWkyJoin() {
            this.hideWkyPop(), this.pcNodePopOptions && this.pcNodePopOptions.onJoin && this.pcNodePopOptions.onJoin()
        }

        onWkyAction() {
            this.hideWkyPop(), this.pcNodePopOptions && this.pcNodePopOptions.onAction && this.pcNodePopOptions.onAction()
        }

        onWkyDetail() {
            this.hideWkyPop(), this.pcNodePopOptions && this.pcNodePopOptions.onDetail && this.pcNodePopOptions.onDetail()
        }

        updatePcNodeButtonInfo(e, t) {
            do {
                if (!this.canShowPcNode) break;
                if (!e) break;
                e.imgSrc && (this.pcNodeImgSrc = e.imgSrc), void 0 !== e.opened && (this.pcNodeOpened = e.opened), e.onClick && (this.pcBtnClick = e.onClick), void 0 !== e.tooltip && (this.pcNodeTooltip = e.tooltip), e.popOptions && (this.pcNodePopOptions = Object.assign({}, this.pcNodePopOptions, e.popOptions))
            } while (0)
        }

        updateKuainiaoButtonInfo(e, t) {
            do {
                if (!this.canShowKuainiaoInterface) break;
                e.imgSrc && (this.kuainiaoImgSrc = e.imgSrc), e.text && (this.kuaiNiaoText = e.text), void 0 !== e.tooltip && (e.tooltip && (this.kuaiNiaoText || this.kuainiaoImgSrc) ? (this.kuaiNiaoTipText = e.tooltip, this.canShowKuainiaoTip = !0) : (this.kuaiNiaoTipText = "", this.canShowKuainiaoTip = !1)), e.onClick && (this.kuaiNiaoClick = e.onClick), e.onTipClick && (this.kuaiNiaoTipClick = (() => {
                    e.onTipClick()
                }))
            } while (0)
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                this.scheduleTaskCount = u.ScheduleTaskNS.getScheduleTaskCount(), u.ScheduleTaskNS.getEventEmitter().on(u.ScheduleTaskEventType.ScheduleTaskCountChange, e => {
                    this.scheduleTaskCount = e
                }), D.PluginFunctionUINS.on("add_pc_node_button", (e, t) => {
                    this.canShowPcNode = !0, this.updatePcNodeButtonInfo(e, t), this.pcNodePopOptions && this.pcNodePopOptions.onShow && this.pcNodePopOptions.onShow()
                }), D.PluginFunctionUINS.on("update_pc_node_button", (e, t) => {
                    this.updatePcNodeButtonInfo(e, t)
                }), D.PluginFunctionUINS.on("add_kuainiao_button", (e, t) => {
                    this.canShowKuainiaoInterface = !0, this.updateKuainiaoButtonInfo(e, t), e.onShow && e.onShow()
                }), D.PluginFunctionUINS.on("update_kuainiao_button", (e, t) => {
                    this.updateKuainiaoButtonInfo(e, t)
                }), D.PluginFunctionUINS.on("remove_kuainiao_button", e => {
                    this.canShowKuainiaoInterface = !1, this.canShowKuainiaoTip = !1, this.kuainiaoImgSrc = "", this.kuaiNiaoText = "", this.kuaiNiaoTipText = "", this.kuaiNiaoClick = null, this.kuaiNiaoTipClick = null
                }), R.attachTaskEvent(k.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    do {
                        if (!e) break;
                        if (e[0] !== k.DownloadKernel.TaskEventType.StatusChanged) break;
                        let t = e[1];
                        if (!t) break;
                        let i = "";
                        for (let e = 0; e < t.length; ++e) {
                            let n = t[e];
                            if (!n) continue;
                            let o = n.getTaskAttribute(k.DownloadKernel.TaskAttribute.GroupTaskId);
                            if (n.getTaskAttribute(k.DownloadKernel.TaskAttribute.Background) || o > 0) continue;
                            let a = n.getTaskStatus();
                            i = n.getTaskAttribute(k.DownloadKernel.TaskAttribute.SavePath).slice(0, 2);
                            let r = n.getTaskAttribute(k.DownloadKernel.TaskAttribute.TaskId),
                                s = this.taskIds.indexOf(r), l = this.taskPath.indexOf(i);
                            a === k.DownloadKernel.TaskStatus.StartWaiting || a === k.DownloadKernel.TaskStatus.StartPending || a === k.DownloadKernel.TaskStatus.Started ? -1 === s && (this.taskIds.push(r), this.taskPath.push(i)) : -1 !== s && (this.taskIds.splice(s, 1), -1 !== l && this.taskPath.splice(l, 1))
                        }
                        0 !== this.taskIds.length ? -1 === this.timeDiskIdleId && this.startAttchDiskIdleInfo() : (this.canShowDiskBusy = !1, clearInterval(this.timeDiskIdleId), this.timeDiskIdleId = -1)
                    } while (0)
                });
                const e = A.ShouleiListSyncNS.getMananger();
                this.shouleiSyncEnable = yield e.enable(), this.shouleiSyncEnable && (this.shouleiSyncState = e.getState(), e.attachEvent("OnConnectStateChanged", e => {
                    this.shouleiSyncState = e
                }));
                let t = E.default.getStartArgs();
                "Install" === t && (L.information("reset remove storage on install"), localStorage.removeItem("securePreferencesSetting"));
                let i = {};
                setTimeout(() => o(this, void 0, void 0, function* () {
                    O.BrowserHelperNs.resetAddons().catch();
                    let e = yield O.BrowserHelperNs.getInfos();
                    for (let [, t]of e) if (t.browserExist) {
                        this.showIcon = !0;
                        break
                    }
                    if (yield this.trackOpenAddon(), this.showIcon && m.XLStatNS.trackEvent("download_leftpanel", "browser_plugin_entrance_show"), "Install" !== t) {
                        if (this.tipsInfo = yield O.BrowserHelperNs.getShowTipInfo(), !this.tipsInfo || !this.tipsInfo.show) return;
                        this.browserName = this.tipsInfo.title;
                        let e = g.ConfigNS.getValue("GuideTips", F.NewIssueGuide.browserPlugin, '{ "showTipTimes": 0, "lastShowTipTime": 0 }');
                        try {
                            i = JSON.parse(e)
                        } catch (e) {
                            i = {showTipTimes: 0, lastShowTipTime: 0}
                        }
                        let t = (new Date).getTime();
                        if (i.showTipTimes < 2 && t - i.lastShowTipTime > 864e5 && this.currentGuide !== F.NewIssueGuide.browserPlugin) {
                            this.setCurrentGuide(F.NewIssueGuide.browserPlugin);
                            let e = ",browser=" + this.tipsInfo.title;
                            m.XLStatNS.trackEvent("download_leftpanel", "browser_plugin_guid_bubble_show", "", 0, 0, 0, 0, e), g.ConfigNS.setValue("GuideTips", F.NewIssueGuide.browserPlugin, JSON.stringify({
                                showTipTimes: i.showTipTimes + 1,
                                lastShowTipTime: t
                            }))
                        }
                    } else g.ConfigNS.setValue("GuideTips", F.NewIssueGuide.browserPlugin, '{ "showTipTimes": 0, "lastShowTipTime": 0 }')
                }), 5e3)
            })
        }

        trackOpenAddon() {
            return o(this, void 0, void 0, function* () {
                let e = "", t = !1;
                (yield O.BrowserHelperNs.getInfos(!0)).forEach((i, n) => {
                    if (!i.browserExist) return;
                    let o = 2;
                    i.browserAddonInstall ? i.browserAddonInstall && !i.browserAddonOpen && (o = 1) : o = 0, e += "plug_name=" + n + ",startup=" + o + ";", t = !0
                }), t && (e = "plug_list=" + encodeURIComponent(e), m.XLStatNS.trackEvent("plugin_stat", "browser_plug_install_startup", "", 0, 0, 0, 0, e))
            })
        }

        onPopUpBlur() {
            this.popUpScheduleMenu(!1)
        }

        popUpScheduleMenu(e) {
            this.popUp = e
        }

        handleClick(e) {
            let t = "";
            switch (this.isFreeDownload = l.DownloadModeNS.getFreeDownLoad(), this.downloadCompleteTaskType = u.ScheduleTaskNS.getDownloadCompleteTaskType(), e) {
                case"entry":
                    m.XLStatNS.trackEvent("download_leftpanel", "bottom_plan_click"), this.popUpScheduleMenu(!0);
                    break;
                case"totalSpeed":
                    t = "button=fullspeed", m.XLStatNS.trackEvent("download_leftpanel", "bottom_planlist_click", "", 0, 0, 0, 0, t), l.DownloadModeNS.setFullDownloadMode(), f.client.callServerFunction("ShowMessageToast", {
                        message: "已为您切换至全速下载模式",
                        type: "success"
                    }).catch(), this.popUpScheduleMenu(!1);
                    break;
                case"limitSpeed":
                    t = "button=limitspeed", m.XLStatNS.trackEvent("download_leftpanel", "bottom_planlist_click", "", 0, 0, 0, 0, t), l.DownloadModeNS.showCustomDownloadModeDlg().then(e => {
                        e && f.client.callServerFunction("ShowMessageToast", {
                            message: "已为您切换至限速下载模式",
                            type: "success"
                        }).catch()
                    }).catch(), this.popUpScheduleMenu(!1);
                    break;
                case"shouleiSync":
                    t = "button=connect_shoulei,status=" + ("online" === this.shouleiSyncState ? "on" : "off"), m.XLStatNS.trackEvent("download_leftpanel", "bottom_planlist_click", "", 0, 0, 0, 0, t), S.MessageBox.custom("shoulei-sync-guide", {
                        type: "online" === this.shouleiSyncState ? "remoting" : "open",
                        sfrom: "plan",
                        statFrom: "left_corner"
                    }).catch(), this.popUpScheduleMenu(!1);
                    break;
                case"freeDownload":
                    this.isFreeDownload ? (t = "button=freedom,status=off", m.XLStatNS.trackEvent("download_leftpanel", "bottom_planlist_click", "", 0, 0, 0, 0, t), u.ScheduleTaskNS.closeFreeDownLoad(), l.DownloadModeNS.setFreeDownLoadConfig(!1)) : u.ScheduleTaskNS.popMessageBox(() => {
                        t = "button=freedom,status=on", m.XLStatNS.trackEvent("download_leftpanel", "bottom_planlist_click", "", 0, 0, 0, 0, t), l.DownloadModeNS.setFreeDownLoadConfig(!0), u.ScheduleTaskNS.startFreeDownLoad()
                    }), this.popUpScheduleMenu(!1);
                    break;
                case"scheduleTask":
                    t = "button=plan", m.XLStatNS.trackEvent("download_leftpanel", "bottom_planlist_click", "", 0, 0, 0, 0, t), u.ScheduleTaskNS.showPlanTaskDlg(), this.popUpScheduleMenu(!1);
                    break;
                case"shutdown":
                    this.downloadCompleteTaskType !== u.ScheduleCompleteTaskType.ShutDown ? (t = "button=finished_close", m.XLStatNS.trackEvent("download_leftpanel", "bottom_planlist_click", "", 0, 0, 0, 0, t), u.ScheduleTaskNS.setDownloadCompleteTaskType(u.ScheduleCompleteTaskType.ShutDown)) : u.ScheduleTaskNS.cancelDownloadCompleteTask(), this.popUpScheduleMenu(!1);
                    break;
                case"sleep":
                    this.downloadCompleteTaskType !== u.ScheduleCompleteTaskType.Sleep ? (t = "button=finished_sleep", m.XLStatNS.trackEvent("download_leftpanel", "bottom_planlist_click", "", 0, 0, 0, 0, t), u.ScheduleTaskNS.setDownloadCompleteTaskType(u.ScheduleCompleteTaskType.Sleep)) : u.ScheduleTaskNS.cancelDownloadCompleteTask(), this.popUpScheduleMenu(!1);
                    break;
                case"exit":
                    this.downloadCompleteTaskType !== u.ScheduleCompleteTaskType.Exit ? (t = "button=finished_exit", m.XLStatNS.trackEvent("download_leftpanel", "bottom_planlist_click", "", 0, 0, 0, 0, t), u.ScheduleTaskNS.setDownloadCompleteTaskType(u.ScheduleCompleteTaskType.Exit)) : u.ScheduleTaskNS.cancelDownloadCompleteTask(), this.popUpScheduleMenu(!1);
                    break;
                default:
                    this.popUpScheduleMenu(!1)
            }
        }
    };
    n([a.Prop({})], K.prototype, "currentCategoryId", void 0), n([a.Prop()], K.prototype, "currentGuide", void 0), n([a.Prop()], K.prototype, "setCurrentGuide", void 0), n([a.Prop({})], K.prototype, "UPDATE_CATEGORY", void 0), n([a.Prop({})], K.prototype, "current", void 0), n([a.Prop({})], K.prototype, "tabs", void 0), n([a.Watch("canShowDiskBusy")], K.prototype, "onIsDiskInfoChange", null), n([a.Watch("isLimit")], K.prototype, "onIsLimtChanged", null), K = n([a.Component], K), t.default = K
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(226), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(776), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {showUpgradeTask: e => e.UpgradeTaskState.showUpgradeTask},
        mapCommitToProps: {SHOW_UPGRADE_TASK: "SHOW_UPGRADE_TASK"},
        mapDispatchToProps: {},
        mapGettersToProps: {}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(228), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0}), i(1013);
    const o = i(6), a = i(546).DownloadKernelUpgradeNS.getUpgrade();
    let r = class extends o.Vue {
        constructor() {
            super(...arguments), this.progress = 0
        }

        onUpgradeProgress(e, t) {
            this.progress = e > 0 ? Math.floor(100 * t / e) : 0
        }

        created() {
            a.attachListener(a.eventUpgradeProgress, this.onUpgradeProgress)
        }

        destroyed() {
            a.detachListener(a.eventUpgradeProgress, this.onUpgradeProgress)
        }
    };
    r = n([o.Component], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(230), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0}), i(1015);
    const o = i(6), a = i(56), r = i(53), s = a.ToastNotifyManagerNS.getToastNotifyManger();
    let l = class extends o.Vue {
        constructor() {
            super(...arguments), this.show = !1, this.showNotifyItem = null, this.message = "", this.type = "send", this.durationTimer = void 0, this.isUp = !1
        }

        onHasLeftBottomAdChange(e) {
            this.isUp = e
        }

        get cancel() {
            return !!this.showNotifyItem && this.showNotifyItem.getCancel()
        }

        get cancelText() {
            return this.showNotifyItem ? this.showNotifyItem.getCancelText() : ""
        }

        get component() {
            let e = "";
            return this.showNotifyItem && this.showNotifyItem.getType() === r.ToastNotifyItemType.Custom && (e = this.showNotifyItem.getComponentId()), e
        }

        handleClose() {
            this.showNotifyItem && (this.showNotifyItem.close(), s.closeNotify(this.showNotifyItem.getId()))
        }

        handleCancel() {
            this.showNotifyItem && (this.showNotifyItem.getCancel() && this.showNotifyItem.cancel(), s.closeNotify(this.showNotifyItem.getId()))
        }

        handleMouseMove() {
            void 0 !== this.durationTimer && (clearTimeout(this.durationTimer), this.durationTimer = void 0)
        }

        handleMouseOut() {
            if (this.showNotifyItem) {
                let e = this.showNotifyItem.getDuration();
                e && e > 0 && (this.durationTimer = setTimeout(() => {
                    this.durationTimer = void 0, this.showNotifyItem && s.closeNotify(this.showNotifyItem.getId())
                }, e))
            }
        }

        onShowNotify(e, t) {
            switch (void 0 !== this.durationTimer && (clearTimeout(this.durationTimer), this.durationTimer = void 0), this.showNotifyItem = t, this.message = t.getMessage(), t.getType()) {
                case r.ToastNotifyItemType.GreenNotify:
                    this.type = "send";
                    break;
                case r.ToastNotifyItemType.RedNotify:
                case r.ToastNotifyItemType.RedCancelNotify:
                    this.type = "fail"
            }
            this.show = !0;
            let i = t.getDuration();
            i && i > 0 && (this.durationTimer = setTimeout(() => {
                this.durationTimer = void 0, s.closeNotify(e)
            }, i))
        }

        onCloseNotify(e, t) {
            this.showNotifyItem && e === this.showNotifyItem.getId() && (this.show = !1, this.showNotifyItem = null), void 0 !== this.durationTimer && (clearTimeout(this.durationTimer), this.durationTimer = void 0)
        }

        onUpdateNotify(e, t) {
            this.onShowNotify(e, t)
        }

        created() {
            s.attachListener("OnShowNotify", this.onShowNotify), s.attachListener("OnUpdateNotify", this.onUpdateNotify), s.attachListener("OnCloseNotify", this.onCloseNotify)
        }

        destroyed() {
            s.detachListener("OnShowNotify", this.onShowNotify), s.detachListener("OnUpdateNotify", this.onUpdateNotify), s.detachListener("OnCloseNotify", this.onCloseNotify)
        }
    };
    n([o.Prop({})], l.prototype, "hasLeftBottomAd", void 0), n([o.Watch("hasLeftBottomAd")], l.prototype, "onHasLeftBottomAdChange", null), l = n([o.Component({components: {GetCoinPrizeToast: () => Promise.resolve().then(() => i(779))}})], l), t.default = l
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(232), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(14);
    let {isDef: s} = r.ThunderUtil;
    const l = i(3), d = i(9), u = i(10);
    let c = class extends a.Vue {
        constructor() {
            super(...arguments), this.coinCount = "", this.userId = ""
        }

        getIsVip() {
            return o(this, void 0, void 0, function* () {
                let e = !1;
                try {
                    let t = JSON.parse(yield l.client.callServerFunction("GetUserInfo", 2));
                    if (s(t)) {
                        e = Number(t.isVip) > 0
                    }
                } catch (e) {
                }
                return e
            })
        }

        handlePrize() {
            return o(this, void 0, void 0, function* () {
                yield l.client.callServerFunction("OpenNewTab", "https://misc-xl9-ssl.xunlei.com/welfare-pc/?entrypage=dltab_detail&entry=task_list");
                let e = yield this.getIsVip();
                d.XLStatNS.trackEvent("download_leftpanel", "coin_get_toast_click", "", 0, 0, 0, 0, {is_vip: e ? "1" : "0"}), u.ConfigNS.setValue("Toast", "GetCoinPrizePopDate" + this.userId, (new Date).toLocaleDateString()), u.ConfigNS.setValue("Toast", "GetCoinPrizePopClick" + this.userId, !0), this.$emit("ok")
            })
        }

        handleClose() {
            u.ConfigNS.setValue("Toast", "GetCoinPrizePopDate" + this.userId, (new Date).toLocaleDateString()), u.ConfigNS.setValue("Toast", "GetCoinPrizePopClick" + this.userId, !0), this.$emit("close")
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                let e = yield this.getIsVip();
                this.coinCount = e ? "+8" : "+5", this.userId = yield l.client.callServerFunction("GetUserID"), d.XLStatNS.trackEvent("download_leftpanel", "coin_get_toast_show", "", 0, 0, 0, 0, {is_vip: e ? "1" : "0"})
            })
        }
    };
    n([a.Prop({})], c.prototype, "data", void 0), n([a.Prop({})], c.prototype, "isUp", void 0), c = n([a.Component], c), t.default = c
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(234), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(547), s = i(75), l = i(3), d = i(0).default.getLogger("ad-platform-vue");
    let u = class extends a.Vue {
        constructor() {
            super(...arguments), this.cookie = null, this.closeCookie = null, this.content = "", this.btnText = "", this.iconUrl = "", this.sceneData = {}, this.orderData = {}, this.styleEx = {}, this.contextColor = "", this.contextBkgColor = "", this.btnColor = "", this.btnBkgColor = "", this.progress = 0, this.isLarge = !1, this.showProgress = !1, this.secondary = "", this.subtiles = [], this.btnVisible = !0, this.updateOrderScope = null
        }

        get adBackground() {
            let e = "";
            do {
                if (!this.styleEx) break;
                if (!this.styleEx.background) break;
                e = `background: ${this.styleEx.background};`
            } while (0);
            return e
        }

        get outerColor() {
            return this.isSuper ? "#737375" : "#eeebe1"
        }

        get adPColor() {
            let e = "";
            do {
                if (!this.styleEx) break;
                if (!this.styleEx.p_color) break;
                e = `color: ${this.styleEx.p_color};`
            } while (0);
            return e
        }

        get adOptionAStyle() {
            let e = "";
            do {
                if (!this.styleEx) break;
                this.styleEx.a_color && (e = `color: ${this.styleEx.a_color};`), this.styleEx.a_background && (e = `${e}background: ${this.styleEx.a_background};`)
            } while (0);
            return e
        }

        get sweepLight() {
            let e = !1;
            do {
                if (!this.styleEx) break;
                this.styleEx.sweepLight && (e = !0)
            } while (0);
            return e
        }

        get isSuper() {
            let e = !1;
            do {
                if (!this.styleEx) break;
                this.styleEx.isSuper && (e = !0)
            } while (0);
            return e
        }

        get closeBtnVisible() {
            let e = !0;
            return "pack_using" === this.adType && (e = this.btnVisible), e
        }

        checkStyleExValid(e) {
            let t = !0;
            do {
                if (!e) {
                    t = !1;
                    break
                }
                if (e.background && !/^#[a-fA-F0-9]{6}/.test(e.background)) {
                    t = !1;
                    break
                }
                if (e.p_color && !/^#[a-fA-F0-9]{6}/.test(e.p_color)) {
                    t = !1;
                    break
                }
                if (e.a_background && !/^#[a-fA-F0-9]{6}/.test(e.a_background)) {
                    t = !1;
                    break
                }
                if (e.a_color && !/^#[a-fA-F0-9]{6}/.test(e.a_color)) {
                    t = !1;
                    break
                }
            } while (0);
            return t
        }

        onClick(e) {
            return o(this, void 0, void 0, function* () {
                const {AdPlatformManagerNS: t, AdPlatformType: n, AdPlatformCloseReason: o} = yield Promise.resolve().then(() => i(85));
                switch (this.adType) {
                    case n.AdPlatform:
                        if (t.getInstance().close(o.Click, e), this.$emit("ad-show", !1), "btn" === e || "content" === e) {
                            let e = this.orderData.openType, t = this.orderData.targetUrl,
                                i = this.orderData.targetSubUrl;
                            s.AdHelperNS.execute(e, t, i)
                        }
                        r.adPlatform.handleEvent(e);
                        break;
                    case n.Functional:
                    case n.FunctionalHigh:
                        if ("close" === e) t.getInstance().close(o.Click, e), this.$emit("ad-show", !1); else {
                            let t = this.orderData;
                            t.onClick && t.onClick(e)
                        }
                        break;
                    case n.Exactly:
                    case n.Renew:
                        if (t.getInstance().close(o.Click, e), this.$emit("ad-show", !1), "btn" === e || "content" === e) {
                            let e = this.orderData, t = e.url;
                            if (e.aidfrom || e.referfrom) {
                                const {ThunderUtil: n} = yield Promise.resolve().then(() => i(14));
                                t = n.setQueryStringEx(t, {aidfrom: e.aidfrom || "", referfrom: e.referfrom || ""})
                            }
                            l.client.callServerFunction("OpenNewTab", t).catch()
                        }
                }
            })
        }

        updateOrder(e, t) {
            return o(this, void 0, void 0, function* () {
                do {
                    const {AdPlatformType: n} = yield Promise.resolve().then(() => i(85));
                    if (e === n.AdPlatform) break;
                    this.orderData = Object.assign({}, this.orderData, t);
                    let o = t;
                    void 0 !== o.showProgress && (this.showProgress = o.showProgress), void 0 !== o.progress && (this.progress = o.progress), void 0 !== o.subtitle && this.secondary !== o.subtitle && (this.secondary = o.subtitle || "", this.secondary && this.adType === n.FunctionalHigh && (d.information("update enter", o.subtitle, this.subtiles), this.subtiles.length > 1 ? (this.subtiles.splice(0, 1), this.subtiles.push(this.secondary)) : 1 === this.subtiles.length && this.subtiles.push(this.secondary), d.information("update moving", this.subtiles), setTimeout(() => {
                        this.subtiles.length > 1 && this.subtiles.splice(0, this.subtiles.length - 1), d.information("after moving", this.subtiles)
                    }, 700))), void 0 !== o.maintitle && (this.content = o.maintitle), void 0 !== o.buttonText && (this.btnText = o.buttonText), void 0 !== o.icon && (this.iconUrl = o.icon), void 0 !== o.btnVisible && (this.btnVisible = o.btnVisible), this.checkStyleExValid(o.styleEx) && (this.styleEx = o.styleEx)
                } while (0)
            })
        }

        created() {
            this.cookie = l.client.attachServerEvent("OnAdPlatformShow", (e, t, n) => o(this, void 0, void 0, function* () {
                this.adType = t;
                const {AdPlatformType: e, AdPlatformManagerNS: o} = yield Promise.resolve().then(() => i(85));
                switch (this.adType) {
                    case e.AdPlatform: {
                        let e = n.scene, t = n.orders[0], i = n.styleEx;
                        this.sceneData = e, this.orderData = t, this.content = t.content, this.btnText = t.btnText, this.iconUrl = t.iconUrl, this.isLarge = !1, this.showProgress = !1, this.btnVisible = !0, this.checkStyleExValid(i) ? this.styleEx = i : this.styleEx = {}, this.$emit("ad-show", !0), r.adPlatform.handleEvent("ad_show")
                    }
                        break;
                    case e.Functional:
                    case e.Exactly:
                    case e.Renew:
                    case e.FunctionalHigh: {
                        this.updateOrderScope || (this.updateOrderScope = this.updateOrder.bind(this), o.getInstance().on("adplatfor_update_order", this.updateOrderScope));
                        let t = n;
                        this.isLarge = !!t.subtitle, this.showProgress = !!t.showProgress, this.progress = t.progress, this.secondary = t.subtitle || "", this.secondary && this.adType === e.FunctionalHigh && (this.subtiles.length > 1 ? (this.subtiles.splice(0, 1), this.subtiles.push(this.secondary)) : 0 === this.subtiles.length && (this.subtiles = [this.secondary])), this.content = t.maintitle, this.btnText = t.buttonText, this.iconUrl = t.icon, this.btnVisible = void 0 === t.btnVisible || t.btnVisible, this.checkStyleExValid(n.styleEx) ? this.styleEx = n.styleEx : this.styleEx = {}, this.orderData = t, this.$emit("ad-show", !0)
                    }
                }
            })), this.closeCookie = l.client.attachServerEvent("OnAdPlatformClose", (e, ...t) => o(this, void 0, void 0, function* () {
                const {AdPlatformManagerNS: e, AdPlatformCloseReason: t} = yield Promise.resolve().then(() => i(85));
                e.getInstance().close(t.Expired, void 0), this.$emit("ad-show", !1)
            }))
        }

        destroyed() {
            return o(this, void 0, void 0, function* () {
                if (null !== this.cookie && (l.client.detachServerEvent("OnAdPlatformShow", this.cookie), this.cookie = null), this.closeCookie && (l.client.detachServerEvent("OnAdPlatformClose", this.closeCookie), this.closeCookie = null), this.updateOrderScope) {
                    const {AdPlatformManagerNS: e} = yield Promise.resolve().then(() => i(85));
                    e.getInstance().removeListener("adplatfor_update_order", this.updateOrderScope), this.updateOrderScope = null
                }
            })
        }
    };
    u = n([a.Component], u), t.default = u
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(236), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(410), r = i(75), s = i(150);
    let l = class extends o.Vue {
        constructor() {
            super(...arguments), this.cookie = null, this.content = "", this.picFile = "", this.orderData = {}
        }

        onClick(e) {
            if ("content" === e) {
                let e = this.orderData.openType, t = this.orderData.targetUrl, i = this.orderData.targetSubUrl;
                r.AdHelperNS.execute(e, t, i)
            } else "close" === e ? this.$emit("ad-left-bottom-show", !1) : "nodisturb" === e && (a.adLeftBottomHelper.setNoDisturb(), this.$emit("ad-left-bottom-show", !1));
            a.adLeftBottomHelper.handleEvent(e)
        }

        created() {
            this.cookie = a.adLeftBottomHelper.attachListener(s.AdCommonNS.eventAdShow, (e, t) => {
                e === s.AdCommonNS.AdName.AdLeftBottomVip && (this.orderData = t, this.picFile = t.picFile, this.$emit("ad-left-bottom-show", !0))
            })
        }

        destroyed() {
            null !== this.cookie && (a.adLeftBottomHelper.detachListener(s.AdCommonNS.eventAdShow, this.cookie), this.cookie = null)
        }
    };
    n([o.Prop({})], l.prototype, "isSearch", void 0), l = n([o.Component], l), t.default = l
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(238), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(784), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            currentCategoryId: e => e.DownloadListState.currentCategoryId,
            currentCategoryViewId: e => e.DownloadListState.currentCategoryViewId,
            tabs: e => e.Tabs.tabs,
            preloadPath: e => `file:///${__rootDir}/out/common-preload.js`
        },
        mapCommitToProps: {createNewTab: "CREATE_NEW_TAB", selectNav: "SELECT_NAV", setCurUser: "SET_CURRENT_USER"},
        mapDispatchToProps: {selectTab: "selectTab", getUser: "GetUser"},
        mapGettersToProps: {currentSelectdTaskIds: e => e.currentSelectdTaskIds}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(240), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(74), s = i(30), l = i(11), d = i(16), u = i(13), c = i(4), h = i(3), f = i(389), p = i(23),
        g = i(9), m = i(61), v = i(0), y = i(69), T = i(45), w = i(785), k = v.default.getLogger("task-detail"),
        C = l.DownloadKernelTaskManager.getTaskManager(), b = d.DownloadKernelEventManager.getEventManager();
    let I = class extends a.Vue {
        constructor() {
            super(...arguments), this.elementId = "home-1EAC214F-7644-4163-9EB8-AF4BAA62D144", this.transition = !1, this.curTaskId = 0, this.curTask = {}, this.select = !1, this.curPannel = "", this.curIndex = S.Comments, this.unFireIndex = S.Comments, this.playingMediaIndex = -1, this.playingCurTask = !1, this.playingTaskId = 0, this.playState = y.XmpMediaState.Invalid, this.updatePlayAreaTimer = void 0, this.timeoutOnTaskItemActive = void 0, this.checkedTaskNum = 0, this.completeTaskNum = 0, this.curUserId = "", this.isLogined = !1, this.userInfo = {}, this.vipInfo = {}, this.showComment = !1
        }

        get curTaskName() {
            return 0 !== this.curTaskId && this.curTask.getTaskAttribute ? (k.information("this.curTaskId", this.curTaskId), this.curTask.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskName)) : ""
        }

        get curTaskStatus() {
            return 0 !== this.curTaskId && this.curTask.getTaskAttribute ? this.curTask.getTaskStatus() : c.DownloadKernel.TaskStatus.Unkown
        }

        get isBtOrGroup() {
            if (0 !== this.curTaskId) {
                let e = this.curTask.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskType);
                return e === c.DownloadKernel.TaskType.Bt || e === c.DownloadKernel.TaskType.Group
            }
            return !1
        }

        switchNav(e) {
            this.selectNav(e)
        }

        indexOfTab(e) {
            let t = -1;
            for (let i = 0; i < this.tabs.length; i++) if (this.tabs[i].tab.getTabType() === r.TabType.Chromium && this.tabs[i].tab.getOriginalUrl() === e) {
                t = i;
                break
            }
            return t
        }

        updateTaskInfo(...e) {
            k.information("updateTaskInfo", this.curTaskId);
            do {
                if (!e) break;
                if (!e[1]) break;
                let t = e[1];
                for (let e = 0; e < t.length; ++e) {
                    let i = t[e];
                    if (i && i.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskId) === this.curTaskId) {
                        this.curTask = i;
                        break
                    }
                }
            } while (0)
        }

        operate(e, t = "right", ...i) {
            return o(this, void 0, void 0, function* () {
                return h.client.callServerFunction("OperateTask", this.curTaskId, e, ...i)
            })
        }

        updateUserInfo() {
            return o(this, void 0, void 0, function* () {
                this.$nextTick(() => o(this, void 0, void 0, function* () {
                    this.curUserId = yield p.LoginHelperNS.loginHelper.getUserInfoAw("userid"), "0" === this.curUserId && (this.curUserId = "");
                    let e = yield p.LoginHelperNS.loginHelper.getAllUserInfoAw(),
                        t = yield p.LoginHelperNS.loginHelper.getUserInfoAw();
                    this.userInfo = Object.assign({}, e, t), this.isLogined ? (this.getUser(this.userInfo.userID), this.setCurUser(this.userInfo)) : this.setCurUser({}), this.isLogined ? this.vipInfo = p.LoginHelperNS.loginHelper.getVipInfo() : this.vipInfo = {}
                }))
            })
        }

        onCurTaskChange() {
            if (this.getPlayMedia(), 0 !== this.curTaskId) {
                let e = (new Date).getTime();
                this.$once("hook:updated", () => {
                    this.$nextTick(() => {
                        let t = (new Date).getTime() - e;
                        h.client.callServerFunction("SendPerformanceItem", "RightPanel", t)
                    })
                })
            }
        }

        updatePosition() {
            return o(this, void 0, void 0, function* () {
                yield h.client.callServerFunction("ThunderResize")
            })
        }

        onScroll(e) {
            return o(this, void 0, void 0, function* () {
                this.$nextTick(() => o(this, void 0, void 0, function* () {
                    let t, i = document.querySelector("div#xly-task-detail-preview.xly-preview"),
                        n = {width: 0, height: 0, x: 0, y: 0};
                    if (i && (t = i.getBoundingClientRect()), t && (n.y = t.top > 42 ? t.top : 42, n.x = t.left, n.width = t.width, n.height = t.height, 0 !== n.x && 0 !== n.width && 0 !== n.height)) {
                        if (k.information("onscroll updateDownloadEmbedRect", JSON.stringify(n)), e && e.srcElement && e.srcElement.scrollTop > 100) n.y = 42, yield h.client.callServerFunction("UpdateDownloadEmbedRect", n), this.updatePosition(); else if (0 !== this.playingTaskId) if (this.playingTaskId === this.curTaskId) yield h.client.callServerFunction("UpdateDownloadEmbedRect", n), this.updatePosition(), g.XLStatNS.trackEvent("download_detail", "dl_detail_yunpan_ceiling_play"); else {
                            let e = C.getTaskFromTaskId(this.playingTaskId);
                            if (e) {
                                let t = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.GroupTaskId);
                                t > 0 && t === this.curTaskId && (yield h.client.callServerFunction("UpdateDownloadEmbedRect", n), this.updatePosition()), g.XLStatNS.trackEvent("download_detail", "dl_detail_yunpan_ceiling_play")
                            }
                        }
                        h.client.callRemoteClientFunction(m.mainRendererContext, "UpdateScrollShowOrHide")
                    }
                }))
            })
        }

        attachScrollEvent() {
            document.querySelector("div#xly-task-detail-down__main.xly-down__main").addEventListener("scroll", this.onScroll.bind(this))
        }

        getPlayMedia() {
            return o(this, void 0, void 0, function* () {
                let e = yield h.client.callServerFunction("GetPlayingTaskId");
                try {
                    this.playingTaskId = parseInt(e, 10)
                } catch (e) {
                    this.playingTaskId = 0
                }
                if (this.playingTaskId !== this.curTaskId) return this.playingMediaIndex = -1, void (this.playingCurTask = !1);
                this.playingCurTask = !0;
                let t = (yield h.client.callRemoteClientFunction(m.mainRendererContext, "XmpPlayerGetCurrentMediaAttribute", y.XmpMediaAttr.ThunderTaskSubId))[0];
                this.playingMediaIndex = t, this.playState = (yield h.client.callRemoteClientFunction(m.mainRendererContext, "XmpPlayerGetCurrentMediaAttribute", y.XmpMediaAttr.State))[0]
            })
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                f.HistoryTaskSpeedInfoNS.init().catch(), s.default.attachListener(u.NodeEventMesssageNS.eventDownloadItemActive, (e, t, i, n, o, a) => {
                    this.timeoutOnTaskItemActive && clearTimeout(this.timeoutOnTaskItemActive), t ? (this.curTaskId = i, this.curTask = C.getTaskFromTaskId(this.curTaskId), this.select = !0, this.curIndex = a, k.information("DownloadItemActive", i, e, a)) : (o || i === this.curTaskId) && (this.timeoutOnTaskItemActive = setTimeout(() => {
                        this.curTaskId = 0, this.curTask = {}, this.curPannel = "", this.select = !1
                    }, 100))
                }), s.default.attachListener(u.NodeEventMesssageNS.eventDetailSwitch2Index, (e, t) => {
                    k.information("DetailSwitch2Index", e, t), this.curTaskId = e, this.curIndex = t
                }), b.attachTaskEvent(c.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    this.updateTaskInfo(...e)
                }), h.client.attachServerEvent("OnLoginSuc", (e, ...t) => {
                    this.isLogined = !0
                }), h.client.attachServerEvent("OnLogout", (e, ...t) => {
                    this.isLogined = !1
                }), this.isLogined = yield p.LoginHelperNS.loginHelper.isLoginedAw(), yield this.getPlayMedia(), this.attachXmpEvent(), this.attachScrollEvent(), h.client.attachServerEvent("OnXmpBackUpEmbed", (e, ...t) => {
                    t && t[0] && h.client.callServerFunction("SwitchDetail", t[0])
                }), window.addEventListener("resize", this.updateViewPos), window.addEventListener("maximize", this.updateViewPos), T.default.isInited() ? this.handleRemoteConfig() : T.default.attachListener("OnRemoteGlobalConfigLoaded", () => o(this, void 0, void 0, function* () {
                    this.handleRemoteConfig()
                }))
            })
        }

        attachXmpEvent() {
            [y.XmpEvent.onError, y.XmpEvent.onPlaying, y.XmpEvent.onPreOpen, y.XmpEvent.onPaused, y.XmpEvent.onPlayCompleted, y.XmpEvent.onPreStop, y.XmpEvent.onStop, y.XmpEvent.onXmpClose, y.XmpEvent.onClearError, y.XmpEvent.onOpenSucceeded].forEach(e => {
                h.client.attachServerEvent(e, (e, ...t) => {
                    this.getPlayMedia().catch()
                })
            })
        }

        beforeDestroy() {
            window.removeEventListener("resize", this.updateViewPos), window.removeEventListener("maximize", this.updateViewPos);
            let e = document.querySelector("div#xly-task-detail-down__main.xly-down__main");
            e && e.removeEventListener("scroll", this.onScroll)
        }

        handleRemoteConfig() {
            this.showComment = T.default.getConfigValue("main", "show_comment", !1)
        }

        updateViewPos() {
            this.$nextTick(() => o(this, void 0, void 0, function* () {
                let e, t = document.querySelector("div.xly-file-detail div.td-tabs__pane"),
                    i = {width: 0, height: 0, x: 0, y: 0};
                t && (e = t.getBoundingClientRect()), e && (i.y = e.top > 42 ? e.top : 42, i.x = e.left, i.width = e.width, i.height = e.height, k.information("updateViewPos UpdateDownloadEmbedRect", JSON.stringify(i)), 0 !== i.x && 0 !== i.width && 0 !== i.height && (yield h.client.callServerFunction("UpdateDownloadEmbedRect", i), yield h.client.callServerFunction("ThunderResize")))
            }))
        }
    };
    var S;
    n([a.Prop({})], I.prototype, "tabs", void 0), n([a.Prop({})], I.prototype, "preloadPath", void 0), n([a.Prop()], I.prototype, "currentCategoryId", void 0), n([a.Prop({})], I.prototype, "currentSelectdTaskIds", void 0), n([a.Prop({})], I.prototype, "currentCategoryViewId", void 0), n([a.Prop({})], I.prototype, "createNewTab", void 0), n([a.Prop({})], I.prototype, "selectTab", void 0), n([a.Prop({})], I.prototype, "selectNav", void 0), n([a.Prop({})], I.prototype, "getUser", void 0), n([a.Prop({})], I.prototype, "setCurUser", void 0), n([a.Watch("isLogined")], I.prototype, "updateUserInfo", null), n([a.Watch("curTaskId", {immediate: !0})], I.prototype, "onCurTaskChange", null), I = n([a.Component({
        components: {
            XlTab: () => Promise.resolve().then(() => i(830)),
            XlHeader: () => Promise.resolve().then(() => i(846)),
            XlDetail: () => Promise.resolve().then(() => i(847)),
            FileList: () => Promise.resolve().then(() => i(848)),
            MultiChosenTasks: () => Promise.resolve().then(() => i(851)),
            Comment: () => Promise.resolve().then(() => i(854)),
            Recommend: () => Promise.resolve().then(() => i(875)),
            ScanCode: w.default
        }
    })], I), t.default = I, function (e) {
        e.Comments = "comments", e.FileList = "files", e.Attribute = "detail"
    }(S || (S = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(242), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(786), o = i(24), a = i(4), r = i(26).DownloadKernelCategoryManager.getCategoryManager();
    t.default = o.connector.connect({
        mapStateToProps: {
            taskBase: (e, t) => {
                let i = null, n = t.curTaskId, o = t.currentCategoryId;
                if (-1 === o) {
                    for (let t = 0; t < e.DownloadListState.taskList.length; t++) if (e.DownloadListState.taskList[t].id === a.DownloadKernel.CategroyViewID.Downloading) {
                        i = e.DownloadListState.taskList[t].tasksMap[n];
                        break
                    }
                } else if (r.isPrivateCategory(o)) for (let t = 0; t < e.DownloadListState.taskListPrivate.length; t++) e.DownloadListState.taskListPrivate[t].id === a.DownloadKernel.CategroyViewID.Downloading && (i = e.DownloadListState.taskListPrivate[t].tasksMap[n]);
                return i
            }, vipSpeedInfo: (e, t) => {
                let i = null, n = t.curTaskId;
                return i = e.VipSpeedState.vipSpeedMap[n] ? e.VipSpeedState.vipSpeedMap[n] : e.VipSpeedState.defaultStatus
            }, vipSpeedMap: e => e.VipSpeedState.vipSpeedMap
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(244), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(3), s = i(0), l = i(4), d = i(11), u = i(16), c = i(548), h = i(34), f = i(14), p = i(15),
        g = i(9), m = i(22), v = i(788), y = i(412), T = i(790), w = i(791), k = i(792),
        C = u.DownloadKernelEventManager.getEventManager(), b = d.DownloadKernelTaskManager.getTaskManager(),
        I = i(151), S = s.default.getLogger("ScanCode");
    let _ = class extends a.Vue {
        constructor() {
            super(...arguments), this.imgRunning = T, this.imgPause = w, this.imgFinish = k, this.showScancode = !0, this.curTask = {}, this.shortlink = "", this.accelerationTimes = 0, this.maxTimesPerWeek = 3, this.days = 0, this.eventSyncMessage = -1, this.tokenMap = {}, this.offlineSize = 0, this.intervalCalculateChannel = null, this.isAccelerating = !1, this.hasAccelerated = !1, this.maxSpeed = 0, this.saveTime = 0, this.allOfflineSize = "2G", this.qrcodeConfig = {
                right_panel_text: "免费加速",
                text: "扫码加速",
                zerotype_text: "单个任务享1次2G高速流量加持，助力更快下载",
                offlineSize: 2147483648,
                show_right_scancode: !1,
                guidePage: ""
            }, this.helpText = "帮助", this.autoShow = !0, this.hasClickShowMore = !1, this.nextDate = "", this.isHuddleOrTry = !1, this.vipTaskInfo = null
        }

        get isVip() {
            return !(!this.vipInfo || "1" !== this.vipInfo.isVip)
        }

        get curTaskStatus() {
            return this.taskBase ? this.taskBase.taskStatus : l.DownloadKernel.TaskStatus.Begin
        }

        onaccelerationTimesChange() {
            p.server.fireClientEvent("UpdateAccelerationTimes", this.accelerationTimes, this.days), this.accelerationTimes <= 0 && (this.autoShow = !1)
        }

        created() {
            this.attachTaskStatus()
        }

        attachTaskStatus() {
            r.client.attachServerEvent("OnVipTaskInfoChanged", (e, t, i) => {
                e && "vip-download-webview" === e.name && this.curTaskId === t && (this.vipTaskInfo = i)
            })
        }

        onVipSpeedInfoChange() {
            this.checkHuddleOrTry()
        }

        onVipTaskInfoChange() {
            this.checkHuddleOrTry()
        }

        checkHuddleOrTry() {
            this.vipTaskInfo && this.vipTaskInfo.enterType === y.VipDownloadDefineNS.VipTaskType.Try ? this.isHuddleOrTry = !0 : this.vipTaskInfo && this.vipTaskInfo.packagetrying ? this.isHuddleOrTry = !0 : this.vipSpeedInfo && this.vipSpeedInfo.isHuddle ? this.isHuddleOrTry = !0 : this.isHuddleOrTry = !1
        }

        get needShowMore() {
            return this.autoShow
        }

        get maxSpeedStr() {
            return `${f.ThunderUtil.formatSizeCustom(this.maxSpeed, 1, 4)}/s`
        }

        get isHuddle() {
            return this.vipSpeedInfo && this.vipSpeedInfo.isHuddle
        }

        get vipSpeed() {
            return "+" + f.ThunderUtil.formatSizeCustom(this.taskBase.vipSpeed, 1, 4) + "/s"
        }

        get progress() {
            return 100 * this.offlineSize / this.qrcodeConfig.offlineSize
        }

        get offlineNumber() {
            let e = f.ThunderUtil.formatSizeCustom(this.offlineSize, 1, 4);
            return e.substring(0, e.length - 1)
        }

        get remainSize() {
            let e = this.qrcodeConfig.offlineSize - this.offlineSize;
            e < 0 && (e = 0);
            let t = f.ThunderUtil.formatSizeCustom(e, 1, 4);
            return t.substring(0, t.length - 1)
        }

        get saveTimeStr() {
            return this.saveTime < 0 ? "0" : this.saveTime < 60 ? `${Math.floor(this.saveTime)}秒钟` : this.saveTime < 3600 ? `${(this.saveTime / 60).toFixed(1)}分钟` : this.saveTime < 86400 ? "1小时+" : "-"
        }

        get isList() {
            let e = 0;
            return !this.taskBase || this.taskBase.taskType !== l.DownloadKernel.TaskType.Bt && this.taskBase.taskType !== l.DownloadKernel.TaskType.Group || (e = 1), e
        }

        get switchShowType() {
            return this.accelerationTimes <= 0 ? 1 : this.curTaskStatus <= 5 && this.isAccelerating && "" === this.shortlink && !this.isHuddleOrTry ? 2 : [6, 7].includes(this.curTaskStatus) && this.isAccelerating && "" === this.shortlink && !this.isHuddleOrTry ? 3 : this.curTaskStatus < 8 && this.hasAccelerated && "" === this.shortlink ? 4 : "" === this.shortlink && this.isHuddleOrTry ? 5 : ""
        }

        onswitchShowTypeChange() {
            this.curCategoryViewid === l.DownloadKernel.CategroyViewID.Downloading && !this.isVip && this.qrcodeConfig.show_right_scancode && (this.accelerationTimes <= 0 ? g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_run_out_show", "", 0, 0, 0, 0, `task_id=${this.curTaskId}`) : this.curTaskStatus <= 5 && this.isAccelerating && "" === this.shortlink && !this.isHuddleOrTry ? g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_state_change", "", 0, 0, 0, 0, `if_child_tsak_list=${this.isList},type=accelerating,task_id=${this.curTaskId}`) : [6, 7].includes(this.curTaskStatus) && this.isAccelerating && "" === this.shortlink && !this.isHuddleOrTry ? g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_state_change", "", 0, 0, 0, 0, `if_child_tsak_list=${this.isList},type=pause,task_id=${this.curTaskId}`) : this.curTaskStatus < 8 && this.hasAccelerated && "" === this.shortlink ? g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_state_change", "", 0, 0, 0, 0, `if_child_tsak_list=${this.isList},type=complete,task_id=${this.curTaskId}`) : "" === this.shortlink && this.isHuddleOrTry && g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_state_change", "", 0, 0, 0, 0, `if_child_tsak_list=${this.isList},type=break,task_id=${this.curTaskId}`))
        }

        showMore() {
            this.autoShow = !this.autoShow, this.autoShow && "" !== this.shortlink && g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_2d_code_show", "", 0, 0, 0, 0, `position=right_center,if_child_task_list=${this.isList ? 1 : 0},task_id=${this.curTaskId}`)
        }

        onCurTaskIdChange() {
            if (this.curTaskId ? this.curTask = b.getTaskFromTaskId(this.curTaskId) : this.curTask = {}, this.hasAccelerated = !1, this.tokenMap[this.curTaskId] && this.tokenMap[this.curTaskId].timeoutTimer ? this.isAccelerating = !0 : (this.isAccelerating = !1, this.tokenMap[this.curTaskId] && null === this.tokenMap[this.curTaskId].timeoutTimer && (this.hasAccelerated = !0)), this.offlineSize = this.tokenMap[this.curTaskId] && this.tokenMap[this.curTaskId].downloadSizeSum || 0, this.maxSpeed = this.tokenMap[this.curTaskId] && this.tokenMap[this.curTaskId].maxSpeed ? this.tokenMap[this.curTaskId].maxSpeed : 0, this.isVip || !this.qrcodeConfig.show_right_scancode ? this.showScancode = !1 : this.showScancode = !0, this.tokenMap[this.curTaskId]) {
                let e = (this.tokenMap[this.curTaskId].downloadSizeSum - this.tokenMap[this.curTaskId].offlineSizeSum) / this.tokenMap[this.curTaskId].useTime;
                this.saveTime = this.tokenMap[this.curTaskId].downloadSizeSum / e - this.tokenMap[this.curTaskId].useTime
            }
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                C.attachTaskEvent(l.DownloadKernel.TaskEventType.DetailChanged, (...e) => o(this, void 0, void 0, function* () {
                    !e || e.length < 3 || 0 == (e[2] & l.DownloadKernel.TaskDetailChangedFlags.UserRead) && 0 == (e[2] & l.DownloadKernel.TaskDetailChangedFlags.PlayPosition) && this.updateTaskInfo(...e)
                })), C.attachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, (...e) => o(this, void 0, void 0, function* () {
                    if (!e || e.length < 2) return;
                    if (e[0] !== l.DownloadKernel.TaskEventType.StatusChanged) return;
                    let t = e[1];
                    t && this.onTaskStatusChange(t)
                })), r.client.attachServerEvent("OnQrCodeConfigUpdate", (e, t) => {
                    if (t && void 0 !== t.offlineSize && void 0 !== t.zerotype_text && void 0 !== t.right_panel_text) {
                        this.qrcodeConfig = t;
                        let e = f.ThunderUtil.formatSizeCustom(t.offlineSize, 0, 4);
                        this.allOfflineSize = e.substring(0, e.length - 1)
                    }
                }), r.client.attachServerEvent("UpdateShortLink", (e, t) => {
                    if (this.shortlink = t, "" === this.shortlink) return;
                    let i = document.getElementById("showCodeAcceleration");
                    this.accelerationTimes <= 0 && (i = document.getElementById("daoLiangCode"));
                    let n = "?qrcode_from=2";
                    "a" === this.qrcodeConfig.guidePage ? n = "?qrcode_from=3" : "b" === this.qrcodeConfig.guidePage && (n = "?qrcode_from=4");
                    let o = t + n;
                    I.toCanvas(i, o, {margin: 0, width: 74}, e => {
                        S.information("QRCode.toCanvas error = ", e)
                    }), !this.isVip && this.qrcodeConfig.show_right_scancode && g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_2d_code_show", "", 0, 0, 0, 0, `position=right_center,if_child_task_list=${this.isList ? 1 : 0},task_id=${this.curTaskId}`)
                }), this.eventSyncMessage = r.client.attachServerEvent("SyncMessage", (e, t) => o(this, void 0, void 0, function* () {
                    do {
                        try {
                            if ("string" == typeof t && (t = JSON.parse(t)), !t.subject.startsWith("/device/") || !t.subject.endsWith("/scancode_acceleration")) break;
                            S.information("### syncMessage- ", t), p.server.fireClientEvent("UpdateFirstShowScanCode");
                            let e = t.data, i = Number(e.task_id);
                            if (this.tokenMap[i]) break;
                            g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_success", "", 0, 0, 0, 0, `task_id=${i}`), i === this.curTaskId && (this.shortlink = "");
                            let n = e.token_list;
                            if (!n || 1 !== n.length) break;
                            this.accelerationTimes -= 1;
                            let o = n[0];
                            this.accelerateTask(i, o, !0)
                        } catch (e) {
                            S.warning(e)
                        }
                    } while (0)
                })), setTimeout(() => o(this, void 0, void 0, function* () {
                    let e = yield c.queryAccelerationTimes();
                    if (!e || void 0 === e.acceleration_times) return;
                    this.accelerationTimes = e.acceleration_times, this.maxTimesPerWeek = Number(e.max_times_per_week), this.days = e.days;
                    let t = new Date(1e3 * Number(e.date));
                    this.nextDate = `${t.getFullYear()}年${t.getMonth() + 1}月${t.getDate()}日0点重新发放`
                }), 3e3)
            })
        }

        updateTaskInfo(...e) {
            do {
                if (!e) break;
                if (!e[1]) break;
                let t = e[1];
                for (let e = 0; e < t.length; ++e) {
                    let i = t[e];
                    if (!i) continue;
                    let n = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                    if (this.tokenMap[n]) break
                }
            } while (0)
        }

        onTaskStatusChange(e) {
            for (let t = 0; t < e.length; t++) {
                let i = e[t], n = i.getId();
                if (!this.tokenMap[n]) continue;
                let o = i.getTaskStatus();
                o === l.DownloadKernel.TaskStatus.Started ? this.updateVipCert(n) : o !== l.DownloadKernel.TaskStatus.Seeding && o !== l.DownloadKernel.TaskStatus.Succeeded && o !== l.DownloadKernel.TaskStatus.Failed || this.tokenMap[n] && this.tokenMap[n].timeoutTimer && (clearTimeout(this.tokenMap[n].timeoutTimer), this.tokenMap[n].timeoutTimer = null, n === this.curTaskId && (this.isAccelerating = !1, this.hasAccelerated = !0), S.warning("#### 任务成功或失败, clean Accelerate"))
            }
        }

        exitAccelerate(e) {
            let t = b.getTaskFromTaskId(e);
            clearTimeout(this.tokenMap[e].timeoutTimer), this.tokenMap[e].timeoutTimer = null, r.client.callServerFunction("DisableDcdnWithVipCert", e, this.tokenMap[e].btIndex), t.setAcclerating(!1), p.server.fireClientEvent("on_qrcode_update_item", e, {}, "cleanup");
            let i = {
                [e]: {
                    isShowVipSpeed: !1,
                    isShowSuperSpeed: !1,
                    isAcclerated: !1,
                    isHuddle: !1,
                    isSensitive: !1,
                    sensitive: null,
                    isShowVipHover: !1,
                    isShowSuperHover: !1,
                    hoverText: "超级加速",
                    hoverType: "MixTry",
                    remindType: "none"
                }
            };
            if (r.client.callServerFunction("UpdateVipSpeedStatus", i), e === this.curTaskId) {
                let e = (this.tokenMap[this.curTaskId].downloadSizeSum - this.tokenMap[this.curTaskId].offlineSizeSum) / this.tokenMap[this.curTaskId].useTime;
                this.saveTime = this.tokenMap[this.curTaskId].downloadSizeSum / e - this.tokenMap[this.curTaskId].useTime, this.isAccelerating = !1, this.hasAccelerated = !0
            }
            let n = t.getTaskStatus();
            if (n > 0 && n < 8) {
                let e = t.getTaskName();
                e.length > 7 && (e = e.slice(0, 7) + "...");
                let i = "任务 " + e + " 扫码加速完成, 本周剩余" + this.accelerationTimes + "/" + this.maxTimesPerWeek + "次";
                r.client.callServerFunction("ShowToast", {id: "scancode", type: 0, message: i, duration: 4e3})
            }
        }

        updateVipCert(e, t = !0) {
            if (!this.vipSpeedMap[e].isShowVipSpeed && !this.vipSpeedMap[e].isHuddle) {
                b.getTaskFromTaskId(e).setAcclerating(!0), r.client.callServerFunction("UpdateDcdnWithVipCert", e, this.tokenMap[e].token, this.tokenMap[e].btIndex).catch();
                let t = {
                    [e]: {
                        isShowVipSpeed: !1,
                        isShowSuperSpeed: !1,
                        isAcclerated: !1,
                        isHuddle: !1,
                        isSensitive: !1,
                        sensitive: null,
                        isShowVipHover: !1,
                        isShowSuperHover: !1,
                        hoverText: "扫码加速",
                        hoverType: "ScanCode",
                        remindType: "none"
                    }
                };
                r.client.callServerFunction("UpdateVipSpeedStatus", t), p.server.fireClientEvent("on_qrcode_update_item", e, t, "setup")
            }
            t && !this.intervalCalculateChannel && (this.intervalCalculateChannel = setInterval(this.calculateChannel, 1e3))
        }

        calculateChannel() {
            let e = !0, t = Object.keys(this.tokenMap);
            for (let i = 0; i < t.length; i++) {
                let n = Number(t[i]);
                if (this.tokenMap[n] && this.tokenMap[n].timeoutTimer) {
                    e = !1;
                    let t = b.getTaskFromTaskId(n);
                    if (!t) {
                        delete this.tokenMap[n];
                        continue
                    }
                    let i = t.getTaskBaseInfo();
                    this.tokenMap[n].useTime += 1;
                    let o = t.getTaskChannelInfo();
                    if (void 0 !== this.tokenMap[n].lastOfflineSize && this.vipSpeedMap[n].isShowVipSpeed && this.vipSpeedMap[n].isHuddle && "MixTry" !== this.vipSpeedMap[n].hoverType && (this.tokenMap[n].offlineSizeSum += o.offlineSize - this.tokenMap[n].lastOfflineSize, this.tokenMap[n].downloadSizeSum += i.downloadSize - this.tokenMap[n].lastDownloadSize, this.tokenMap[n].maxSpeed = Math.max(t.getDownloadSpeed(), this.tokenMap[n].maxSpeed), this.tokenMap[n].downloadSizeSum >= this.qrcodeConfig.offlineSize)) {
                        this.exitAccelerate(n), S.warning("#### 流量用完, clean Accelerate");
                        continue
                    }
                    if (i.taskType === l.DownloadKernel.TaskType.Bt) {
                        let e = t.getExtraObject().getBtFileList();
                        for (let [, t]of e) t.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.RealIndex) === this.tokenMap[n].btIndex && t.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileStatus) === l.DownloadKernel.BtFileStatus.Complete && (this.exitAccelerate(n), S.warning("#### bt子文件下载完成, clean Accelerate"))
                    }
                    this.vipSpeedMap[n].isShowVipSpeed || this.vipSpeedMap[n].isShowSuperSpeed || this.vipSpeedMap[n].isHuddle || this.updateVipCert(n, !1), this.tokenMap[n].lastOfflineSize = o.offlineSize, this.tokenMap[n].lastDownloadSize = i.downloadSize, this.curTaskId === n && (this.maxSpeed = this.tokenMap[n].maxSpeed, this.offlineSize = this.tokenMap[n].downloadSizeSum)
                }
            }
            e && (clearInterval(this.intervalCalculateChannel), this.intervalCalculateChannel = null)
        }

        handleQRCodeHover() {
            g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_2d_code_show", "", 0, 0, 0, 0, `position=right_hover,if_child_task_list=${this.isList ? 1 : 0},task_id=${this.curTaskId}`)
        }

        testAccelerate() {
            c.accelerateTest({task_id: String(this.curTaskId)})
        }

        handleClickHelp() {
            m.MessageBox.custom("ScanCodeHelp", {windowWidth: 450, windowHeight: 388})
        }

        accelerateTask(e, t, i = !1) {
            return o(this, void 0, void 0, function* () {
                do {
                    let n = b.getTaskFromTaskId(e);
                    if (!n) break;
                    let o = n.getTaskBaseInfo();
                    if (i) {
                        t.btIndex = -1, t.offlineSizeSum = 0, t.useTime = 0, t.downloadSizeSum = 0, t.maxSpeed = 0, this.tokenMap[e] = t;
                        let i = -1, a = 0;
                        if (o.taskType === l.DownloadKernel.TaskType.Bt) {
                            let t = n.getExtraObject().getBtFileList();
                            for (let [, e]of t) if (e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.Download) && e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileStatus) < 3) {
                                let t = e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileSize);
                                t > a && (i = e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.RealIndex), a = t)
                            }
                            this.tokenMap[e].btIndex = i
                        }
                    }
                    let a = -1 === t.btIndex ? 0 : t.btIndex, r = yield this.queryToken(e, t.trial_verify_info, a);
                    if (!r || 0 === r.length) {
                        S.warning("get token failed, taskid: ", e, "token: ", JSON.stringify(t));
                        break
                    }
                    let s = r[0], d = Math.floor((new Date).getTime() / 1e3);
                    t.expire = s.maxTime + d, t.token = s.token, n.getTaskStatus() === l.DownloadKernel.TaskStatus.Started ? this.updateVipCert(e) : h.TaskOperatorNs.startTasks([o]), t.timeoutTimer = setTimeout(() => {
                        let i = b.getTaskFromTaskId(e).getTaskStatus();
                        i > 0 && i < 8 ? (this.exitAccelerate(e), S.warning("#### 任务状态异常, clean Accelerate")) : this.accelerateTask(e, t)
                    }, 1e3 * (t.expire - d)), e === this.curTaskId && (this.isAccelerating = !0, this.hasAccelerated = !1)
                } while (0)
            })
        }

        queryToken(e, t, i = 0) {
            return o(this, void 0, void 0, function* () {
                let n = b.getTaskFromTaskId(e), o = n.getTaskBaseInfo(),
                    a = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.Gcid),
                    r = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.Cid) || a, s = new v.VipTaskHttpSession, d = {
                        taskType: n.getType(),
                        files: [{
                            subId: i,
                            taskStatus: 6,
                            filePath: n.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath),
                            fileName: n.getTaskName(),
                            gcid: a,
                            cid: r,
                            url: n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskUrl),
                            refUrl: "",
                            fileSize: n.getTaskAttribute(l.DownloadKernel.TaskAttribute.FileSize),
                            downloadSize: 0,
                            isNeedDownload: 1
                        }],
                        userId: "" === this.curUserId ? "0" : this.curUserId,
                        verifyType: 1,
                        verify: t
                    };
                if (o.taskType === l.DownloadKernel.TaskType.Bt) {
                    d.btTitle = o.taskName, d.infoId = n.getExtraObject().getInfoId();
                    let e = n.getExtraObject().getBtFileList(), t = 0;
                    for (let [, i]of e) if (i.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.Download) && i.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileStatus) < 3) {
                        let e = i.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileSize);
                        e > t && (a = i.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.Gcid), r = i.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.Cid), t = e)
                    }
                    d.files[0].gcid = a, d.files[0].cid = r || a
                }
                let u = yield s.queryToken(d);
                return S.information("tokenResponse", u), u
            })
        }
    };
    n([a.Prop()], _.prototype, "curTaskId", void 0), n([a.Prop()], _.prototype, "curUserId", void 0), n([a.Prop()], _.prototype, "vipSpeedInfo", void 0), n([a.Prop({})], _.prototype, "taskBase", void 0), n([a.Prop()], _.prototype, "vipSpeedMap", void 0), n([a.Prop()], _.prototype, "vipInfo", void 0), n([a.Prop()], _.prototype, "curCategoryViewid", void 0), n([a.Watch("accelerationTimes")], _.prototype, "onaccelerationTimesChange", null), n([a.Watch("vipSpeedInfo")], _.prototype, "onVipSpeedInfoChange", null), n([a.Watch("vipTaskInfo")], _.prototype, "onVipTaskInfoChange", null), n([a.Watch("switchShowType")], _.prototype, "onswitchShowTypeChange", null), n([a.Watch("curTaskId")], _.prototype, "onCurTaskIdChange", null), _ = n([a.Component({components: {}})], _), t.default = _
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(246), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(4), s = i(11), l = i(16), d = i(40), u = i(15), c = i(3), h = i(9), f = i(45),
        p = l.DownloadKernelEventManager.getEventManager(), g = i(0).default.getLogger("XlTab.view"),
        m = s.DownloadKernelTaskManager.getTaskManager();
    let v = class extends a.Vue {
        constructor() {
            super(...arguments), this.tabs = [{title: "速度", key: "TaskChart"}, {
                title: "属性",
                key: "Attribute"
            }], this.activeKey = "TaskChart", this.eventOnTaskStatusChange = -1, this.eventOnTabChange = -1, this.eventOnInsertToCategoryView = -1, this.trackTimeOut = null
        }

        OnCurCategoryidChange() {
            this.curCategoryid === r.DownloadKernel.CategroyViewID.Completed && this.tabs && this.tabs.length > 0 && "边下边播" === this.tabs[0].title && (this.tabs[0].title = "播放")
        }

        onCurTaskIdChange() {
            return o(this, void 0, void 0, function* () {
                if (g.information("onCurTaskIdChange", this.curTaskId), 0 === this.curTaskId) return;
                let e = f.default.getConfigValue("main", "ZipFileList", !1);
                if (this.curTask = m.getTaskFromTaskId(this.curTaskId), !this.curTask) return;
                let t = this.curTask.isSupportPlay(), i = this.curTask.getTaskStatus(), n = !1,
                    o = this.curTask.getTaskBaseInfo(), a = o.taskName.toLocaleLowerCase().endsWith(".zip");
                i !== r.DownloadKernel.TaskStatus.Seeding && i !== r.DownloadKernel.TaskStatus.Succeeded || (n = yield d.TaskCtrlOperatorNS.isExistTaskFile(o));
                let s = [];
                t && this.curCategoryid === r.DownloadKernel.CategroyViewID.Downloading && i !== r.DownloadKernel.TaskStatus.Failed ? (s = [{
                    title: "边下边播",
                    key: "Preview"
                }, {
                    title: "速度",
                    key: "TaskChart"
                }], this.activeKey = "Preview") : t && n && this.curCategoryid === r.DownloadKernel.CategroyViewID.Completed ? (s = [{
                    title: "播放",
                    key: "Preview"
                }, {
                    title: "速度",
                    key: "TaskChart"
                }], this.activeKey = "Preview") : e && a && n && (this.curCategoryid === r.DownloadKernel.CategroyViewID.Completed || this.curCategoryid === r.DownloadKernel.CategroyViewID.Recycle) ? (s = [{
                    title: "文件",
                    key: "File"
                }, {title: "速度", key: "TaskChart"}], this.activeKey = "File") : (s = [{
                    title: "速度",
                    key: "TaskChart"
                }], this.activeKey = "TaskChart"), o && -1 === o.categoryId && s.push({
                    title: "属性",
                    key: "Attribute"
                }), this.tabs = s
            })
        }

        onActiveKeyChange() {
            u.server.fireClientEvent("OnSelectTabChange", this.activeKey, this.curTaskId.toString()), g.information("activeKey: ", this.activeKey), this.$emit("tabChange", this.activeKey)
        }

        onTrack() {
            this.trackTimeOut && clearTimeout(this.trackTimeOut), this.trackTimeOut = setTimeout(() => {
                if (null !== this.activeKey && 0 !== this.curTaskId) {
                    let e = "module_type=" + this.activeKey + ",current_tab=" + this.curCategoryid;
                    if (0 !== this.curTaskId) {
                        e += `,task_type=${this.curTask.getTaskBaseInfo().categoryId === this.currentCategoryId ? "download" : "getback"}`
                    }
                    h.XLStatNS.trackEvent("download_detail", "dl_detail_status_show", "", 0, 0, 0, 0, e)
                }
            }, 150)
        }

        get track1() {
            return null !== this.activeKey && 0 !== this.curTaskId ? this.activeKey + String(this.curTaskId) : 0
        }

        onTabChange(e) {
            this.activeKey = e
        }

        mounted() {
            this.eventOnInsertToCategoryView = p.attachTaskEvent(r.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                if (e && e[0] === r.DownloadKernel.TaskEventType.InsertToCategoryView && e[1] && e[2] && e[3]) {
                    g.information("eventOnInsertToCategoryView", e[2]);
                    for (let t of e[3]) if (t && t.taskId === this.curTaskId) {
                        g.information("eventOnInsertToCategoryView call", e[2], this.curTaskId), setTimeout(() => {
                            this.onCurTaskIdChange()
                        }, 5);
                        break
                    }
                }
            }), this.eventOnTaskStatusChange = p.attachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                if (!e || e[0] !== r.DownloadKernel.TaskEventType.StatusChanged) return;
                if (!e[1]) return;
                g.information("eventOnTaskStatusChange", e[1]);
                let t = e[1];
                for (let e of t) if (e.getId() === this.curTaskId) {
                    e.getTaskStatus() === r.DownloadKernel.TaskStatus.Failed && (this.tabs = [{
                        title: "速度",
                        key: "TaskChart"
                    }, {title: "属性", key: "Attribute"}], this.activeKey = "TaskChart");
                    break
                }
            }), this.eventOnTabChange = c.client.attachServerEvent("OnTabChange", (e, t) => {
                for (let e = 0; e < this.tabs.length; e++) if (this.tabs[e].key === t) return void (this.activeKey = t)
            })
        }

        beforeDestroy() {
            p.detachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, this.eventOnTaskStatusChange), c.client.detachServerEvent("OnTabChange", this.eventOnTabChange), p.detachTaskEvent(r.DownloadKernel.TaskEventType.InsertToCategoryView, this.eventOnInsertToCategoryView)
        }
    };
    n([a.Prop()], v.prototype, "checkedTaskNum", void 0), n([a.Prop()], v.prototype, "completeTaskNum", void 0), n([a.Prop({default: 0})], v.prototype, "curTaskId", void 0), n([a.Prop({default: ""})], v.prototype, "curUserId", void 0), n([a.Prop()], v.prototype, "curCategoryid", void 0), n([a.Prop()], v.prototype, "currentCategoryId", void 0), n([a.Watch("curCategoryid", {immediate: !0})], v.prototype, "OnCurCategoryidChange", null), n([a.Watch("curTaskId", {immediate: !0})], v.prototype, "onCurTaskIdChange", null), n([a.Watch("activeKey", {immediate: !0})], v.prototype, "onActiveKeyChange", null), n([a.Watch("track1")], v.prototype, "onTrack", null), v = n([a.Component({
        components: {
            Preview: () => Promise.resolve().then(() => i(831)),
            File: () => Promise.resolve().then(() => i(837)),
            Attribute: () => Promise.resolve().then(() => i(840)),
            TaskChart: () => Promise.resolve().then(() => i(842))
        }
    })], v), t.default = v
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(248), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(3), s = i(15), l = i(4), d = i(11), u = i(9), c = i(832), h = i(69), f = i(61), p = i(0),
        g = i(37), m = i(10), v = i(43), y = p.default.getLogger("Thunder-Preview"),
        T = d.DownloadKernelTaskManager.getTaskManager();
    let w = class extends a.Vue {
        constructor() {
            super(...arguments), this.pageHeight = 0, this.eventOnShowDownAndPlayToast = -1, this.isAnimation = !1, this.eventOnXMPDisconnected = -1, this.isCurTaskPlayingMedia = !1, this.xmpMode = h.XmpMode.UNKNOWN_MODE, this.curViewId = null, this.eventOnXMPModeChanged = -1, this.beginForceLoading = !1, this.clickTaskId = -1, this.playByXmpPlugin = !0, this.showYunPlay = !1, this.downAndPlayGuide = -1e3, this.eventOnPlayVideoByXmp = -1
        }

        get showDownAndPlay() {
            return this.curCategroyViewId === l.DownloadKernel.CategroyViewID.Downloading
        }

        OnCurCategoryidChange(e, t) {
            e !== l.DownloadKernel.CategroyViewID.Downloading && t === l.DownloadKernel.CategroyViewID.Downloading && this.downAndPlayGuide++
        }

        OnCurTaskChange() {
            let e = T.getTaskFromTaskId(this.curTaskId);
            if (e) {
                let t = e.getTaskBaseInfo(), i = e.getIsPrivate();
                -1 === t.categoryId ? this.showYunPlay = !1 : this.showYunPlay = !i, this.downAndPlayGuide <= 0 && this.curCategroyViewId === l.DownloadKernel.CategroyViewID.Downloading ? this.downAndPlayGuide = m.ConfigNS.getValue("GuideTips", "Preview", 0) : this.downAndPlayGuide++, 0 === this.downAndPlayGuide && (u.XLStatNS.trackEvent("download_detail", "bxbb_tab_guid_tips_show", "", 0, 0, 0, 0, ""), m.ConfigNS.setValue("GuideTips", "Preview", 1))
            }
            this.isAnimation = !1, this.checkUIChange(), setTimeout(() => {
                this.getXmpDivRect()
            }, 50)
        }

        OnCurViewChange() {
            this.checkUIChange()
        }

        closeGuide(e = !1) {
            this.downAndPlayGuide++, e && u.XLStatNS.trackEvent("download_detail", "bxbb_tab_guid_tips_click", "", 0, 0, 0, 0, "")
        }

        checkUIChange() {
            this.$nextTick(() => o(this, void 0, void 0, function* () {
                yield this.checkPlayingMedia(), this.isCurTaskPlayingMedia || (this.isAnimation = !0)
            }))
        }

        callXmp(e, ...t) {
            return o(this, void 0, void 0, function* () {
                let i = yield r.client.callRemoteClientFunction(f.mainRendererContext, e, ...t).catch();
                return i && i.length > 0 ? i[0] : {}
            })
        }

        getCurrentMediaId() {
            return o(this, void 0, void 0, function* () {
                return this.callXmp(h.XmpPlayerFunction.getPlayingTaskId)
            })
        }

        get showPlay() {
            return !this.playByXmpPlugin && this.curCategroyViewId === l.DownloadKernel.CategroyViewID.Completed || this.curTaskId !== this.clickTaskId && !this.isCurTaskPlayingMedia
        }

        checkPlayingMedia() {
            return o(this, void 0, void 0, function* () {
                let e = yield this.getCurrentMediaId();
                this.isCurTaskPlayingMedia = parseInt(e, 10) === this.curTaskId;
                let t = yield this.callXmp(h.XmpPlayerFunction.getLastPlayError);
                t && parseInt(t.taskId, 10) === this.curTaskId && (this.isCurTaskPlayingMedia = !0), y.information("checkPlayingMedia", "xmpMode", this.xmpMode, "curMediaId", e, "curTaskId", this.curTaskId, "isCurTaskPlayingMedia", this.isCurTaskPlayingMedia, "clickTaskId", this.clickTaskId), y.information("checkPlayingMedia", "lastPlayError", t)
            })
        }

        getXmpDivRect() {
            return o(this, void 0, void 0, function* () {
                this.$nextTick(() => o(this, void 0, void 0, function* () {
                    let e, t = document.querySelector("div.xly-file-detail div.td-tabs__pane"),
                        i = {width: 0, height: 0, x: 0, y: 0};
                    t && (e = t.getBoundingClientRect()), i.y = e.top > 42 ? e.top : 42, i.x = e.left, i.width = e.width, i.height = e.height, y.information("preview updateDownloadEmbedRect", JSON.stringify(i)), 0 !== i.x && 0 !== i.width && 0 !== i.height && (yield r.client.callServerFunction("UpdateDownloadEmbedRect", i), yield r.client.callServerFunction("ThunderResize"), y.information("play rect", i))
                }))
            })
        }

        play() {
            return o(this, void 0, void 0, function* () {
                this.beginForceLoading = !0, this.clickTaskId = this.curTaskId;
                let e = T.getTaskFromTaskId(this.curTaskId), t = e.getType(),
                    i = e.getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryId);
                if (e.setUserRead(1), yield this.getXmpDivRect(), t === l.DownloadKernel.TaskType.Bt || t === l.DownloadKernel.TaskType.Group) r.client.callServerFunction("PlayBtOrGroupTask", this.curTaskId).then().catch(); else {
                    let t = "download_right_downloading_embed";
                    if (this.curCategroyViewId === l.DownloadKernel.CategroyViewID.Completed && (t = "download_right_complate_play_embed"), -1 !== i) {
                        let i = e.getIsPrivate();
                        t = i ? "download_private_space_bxbb_play" : "download_right_gettingback_play_click", this.curCategroyViewId === l.DownloadKernel.CategroyViewID.Completed && (t = i ? "download_private_space_local_play" : "download_right_gotback_play_click")
                    }
                    let n = e.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName), o = n.split("."),
                        a = o[o.length - 1], s = "video";
                    if (g.TaskUtilHelper.getTaskFileType(n) === g.TaskUtilHelper.FileExtType.Music && (s = "music"), -1 === this.currentCategoryId && -1 !== e.getTaskBaseInfo().categoryId && u.XLStatNS.trackEvent("pc_yunpan", "yunpan_consumption_click", "", 0, 0, 0, 0, "from=" + t + ",file_type=" + s + ",suffix=" + a), -1 === this.currentCategoryId && -1 !== e.getTaskBaseInfo().categoryId) {
                        let e = !1,
                            i = T.getTaskFromTaskId(this.curTaskId).getExtraObject().getUserData(v.TaskUserDataGUID.guidThunderYunDownloadUserData, "extras");
                        if (i) {
                            let t = null;
                            try {
                                t = JSON.parse(i)
                            } catch (e) {
                            }
                            t && 1 === t.isInSafe && (e = !0)
                        }
                        this.curCategroyViewId === l.DownloadKernel.CategroyViewID.Downloading ? t = e ? "safebox_download_getbacking_play" : "download_getbacking_play" : this.curCategroyViewId === l.DownloadKernel.CategroyViewID.Completed && (t = e ? "safebox_download_getback_complete_play" : "download_getback_complete_play")
                    }
                    r.client.callServerFunction("OperateTask", this.curTaskId, "play", {playFrom: t}).then().catch()
                }
                yield this.checkPlayingMedia();
                let n = "current_tab=" + this.curCategroyViewId;
                if (0 !== this.curTaskId) {
                    n += `,task_type=${e.getTaskBaseInfo().categoryId === this.currentCategoryId ? "download" : "getback"}`
                }
                u.XLStatNS.trackEvent("download_detail", "dl_detail_play_btn_click", "", 0, 0, 0, 0, n)
            })
        }

        onShowDownAndPlayToast(e, ...t) {
            return o(this, void 0, void 0, function* () {
                yield this.checkPlayingMedia()
            })
        }

        attachPlayerEvent() {
            return o(this, void 0, void 0, function* () {
                [h.XmpEvent.onError, h.XmpEvent.onPlaying, h.XmpEvent.onPreOpen, h.XmpEvent.onPaused, h.XmpEvent.onPlayCompleted, h.XmpEvent.onPreStop, h.XmpEvent.onStop, h.XmpEvent.onXmpClose, h.XmpEvent.onClearError, h.XmpEvent.onOpenSucceeded].forEach(e => {
                    r.client.attachServerEvent(e, (t, ...i) => o(this, void 0, void 0, function* () {
                        switch (y.information("checkPlayingMedia", "xmpEvent", e), e) {
                            case h.XmpEvent.onPreOpen:
                            case h.XmpEvent.onPlaying:
                            case h.XmpEvent.onError:
                            case h.XmpEvent.onXmpClose:
                                this.beginForceLoading = !1, this.clickTaskId = -1
                        }
                        e === h.XmpEvent.onError && (yield this.checkPlayingMedia(), this.isCurTaskPlayingMedia && setTimeout(() => {
                            this.callXmp("showFloatWindow")
                        }, 200)), this.checkUIChange(), e === h.XmpEvent.onOpenSucceeded ? (s.server.fireClientEvent("CanShowStateByScroll", !0), yield this.getXmpDivRect().catch(), yield r.client.callServerFunction("ThunderResize")) : e !== h.XmpEvent.onPaused && e !== h.XmpEvent.onStop || s.server.fireClientEvent("CanShowStateByScroll", !1)
                    }))
                })
            })
        }

        attachUIEvent() {
            return o(this, void 0, void 0, function* () {
                r.client.attachServerEvent("OnCurNavChange", (e, t, i) => o(this, void 0, void 0, function* () {
                    this.curViewId = t
                }))
            })
        }

        OnXmpModeChanged(e, t, i) {
            this.getXmpDivRect().catch()
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                this.eventOnShowDownAndPlayToast = r.client.attachServerEvent("OnShowDownAndPlayToast", this.onShowDownAndPlayToast), this.attachPlayerEvent(), this.attachUIEvent(), this.curViewId = yield r.client.callServerFunction("GetCurrentNav").catch(), this.eventOnXMPModeChanged = r.client.attachServerEvent("OnXmpModeChanged", this.OnXmpModeChanged), this.playByXmpPlugin = "0" === m.ConfigNS.getValue("CompletedTaskPlay", "LanuchMediaPlayer", "1"), this.eventOnPlayVideoByXmp = r.client.attachServerEvent("OnPlayVideoByXmp", this.closeGuide.bind(this))
            })
        }

        beforeDestroy() {
            this.pageHeight = window.innerHeight, r.client.detachServerEvent("OnShowDownAndPlayToast", this.eventOnShowDownAndPlayToast), r.client.detachServerEvent("OnXmpModeChanged", this.eventOnXMPModeChanged), r.client.detachServerEvent("OnPlayVideoByXmp", this.eventOnPlayVideoByXmp)
        }
    };
    n([a.Prop({default: 0})], w.prototype, "curTaskId", void 0), n([a.Prop()], w.prototype, "currentCategoryId", void 0), n([a.Prop()], w.prototype, "curCategroyViewId", void 0), n([a.Watch("curCategroyViewId")], w.prototype, "OnCurCategoryidChange", null), n([a.Prop()], w.prototype, "playingCurTask", void 0), n([a.Watch("curTaskId", {immediate: !0})], w.prototype, "OnCurTaskChange", null), n([a.Watch("curViewId", {immediate: !0})], w.prototype, "OnCurViewChange", null), w = n([a.Component({components: {VideoState: c.default}})], w), t.default = w
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(250), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(3), r = i(6), s = i(117), l = i(61), d = i(81), u = i(69), c = i(833), h = i(0), f = i(568),
        p = h.default.getLogger("video-state");
    let g = class extends r.Vue {
        constructor() {
            super(...arguments), this.xmpMediaState = u.XmpMediaState.Invalid, this.xmpMediaStateDesc = "", this.isYunBo = !1, this.isDownloadAndPlay = !1, this.isLocalPlay = !1, this.errorText = "", this.errorCode = 0, this.speedText = "0KB", this.xmpMode = u.XmpMode.UNKNOWN_MODE, this.isDownloadCodecEvent = !1, this.name = "", this.progress = 0, this.progressStye = "width:0%", this.isDownloadCodec = !1, this.xmpClose = !1, this.bufferPercent = 100, this.isNewVideo = !0, this.readSpeedTimer = null, this.forceLoading = 0, this.codecTimeOut = null, this.preShowPage = ""
        }

        onPanFileIdChange() {
            this.isNewVideo = !0
        }

        onForceLoadingChange() {
            this.emitState()
        }

        onStateDescChange() {
            this.emitState()
        }

        onBufferPercentChange() {
            this.emitState()
        }

        onIsDownloadCodecChange() {
            this.emitState()
        }

        onXmpModeChange() {
            this.information("onXmpModeChange", this.xmpMode), this.$emit("xmp-mode-change", this.xmpMode)
        }

        onBeginForceLoadingChange() {
            this.emitState()
        }

        readSpeed() {
            return o(this, void 0, void 0, function* () {
                let e = Number(yield d.CommonNS.callXmp(u.XmpPlayerFunction.getConfig, u.APlayerConfigId.CONFIGID_READSPEED));
                this.information("readSpeed", e), e ? e > 1024 ? (e /= 1024, this.speedText = `${e.toFixed(2)}MB`) : this.speedText = `${e.toFixed(0)}KB` : this.speedText = "0KB"
            })
        }

        updateReadSpeed() {
            if (this.readSpeed(), this.isLoading || this.isBuffering || "" === this.xmpMediaStateDesc) {
                if (this.readSpeedTimer) return;
                this.readSpeedTimer = setInterval(() => {
                    this.readSpeed()
                }, 1e3)
            } else this.readSpeedTimer && (clearInterval(this.readSpeedTimer), this.readSpeedTimer = null)
        }

        emitState() {
            let e = "";
            this.isDownloadCodec ? e = "codec" : this.isLoading ? e = "loading" : this.isBuffering ? e = "buffering" : this.isError ? e = "error" : this.isPlaying ? e = "playing" : this.xmpClose && (e = "close"), this.updateReadSpeed(), this.information("video-state-change", e, "desc", this.xmpMediaStateDesc, "buffer", this.bufferPercent, "forceloading", this.forceLoading), this.$emit("video-state-change", e)
        }

        information(...e) {
            this.loggerEnable && p.information(this.isEmbed ? "in preview" : "in float", this.isXmpEmbedPlay ? "embedplay" : "windowplay", "xmpState", this.xmpMediaState, "userHelper.isVip", s.default.isVip, "xmpMode", this.xmpMode, "beginForceloading", this.beginForceLoading, ...e)
        }

        get fileName() {
            return this.name
        }

        get downloadProgress() {
            return this.progress + "%"
        }

        attachDownloadCodecEvent() {
            a.client.attachServerEvent("OnDownloadCodec", () => {
                this.isDownloadCodecEvent = !0, this.isDownloadCodec = !0, this.checkXmpStateDesc(), this.codecTimeOut && (clearTimeout(this.codecTimeOut), this.codecTimeOut = null)
            }), a.client.attachServerEvent("OnDownloadCodecProgress", (e, t, i, n) => o(this, void 0, void 0, function* () {
                this.name = t, this.progress = i, this.progressStye = "width:" + i + "%", n ? this.codecTimeOut = setTimeout(() => {
                    this.isDownloadCodec = !1, this.checkXmpStateDesc()
                }, 1500) : this.codecTimeOut && (clearTimeout(this.codecTimeOut), this.codecTimeOut = null)
            })), a.client.callRemoteClientFunction(l.mainRendererContext, "OnGetCachedDownloadCodecInfo").then(e => {
                !this.isDownloadCodecEvent && e[0] && e[0].downloading && (this.isDownloadCodec = !0, this.name = e[0].name, this.progress = e[0].progress, this.progressStye = "width:" + e[0].progress + "%", this.checkXmpStateDesc())
            })
        }

        cancelDownload() {
            a.client.callRemoteClientFunction(l.mainRendererContext, "OnCancelDownloadCodecs"), a.client.callRemoteClientFunction(l.mainRendererContext, "XmpPlayerClose")
        }

        created() {
            return o(this, void 0, void 0, function* () {
                this.xmpMode = yield d.CommonNS.callXmp(u.XmpPlayerFunction.getXmpCurrentMode), this.information("this.xmpMode", this.xmpMode), this.forceLoading = yield d.CommonNS.callXmp("IsForceloading"), this.attachPlayerEvent(), this.attachDownloadCodecEvent(), yield this.checkXmpStateDesc(), yield this.checkPlayType(), this.emitState()
            })
        }

        attachPlayerEvent() {
            return o(this, void 0, void 0, function* () {
                [u.XmpEvent.onError, u.XmpEvent.onOpenSucceeded, u.XmpEvent.onPlaying, u.XmpEvent.onPreOpen, u.XmpEvent.onPaused, u.XmpEvent.onPlayCompleted, u.XmpEvent.onPreStop, u.XmpEvent.onStop, u.XmpEvent.onForceLoadingState, u.XmpEvent.onBuffer, u.XmpEvent.onXmpClose, u.XmpEvent.onAllStoped, u.XmpEvent.onClearError].forEach(e => {
                    a.client.attachServerEvent(e, (t, ...i) => o(this, void 0, void 0, function* () {
                        switch (e === u.XmpEvent.onXmpClose || e === u.XmpEvent.onStop ? this.xmpClose = !0 : this.xmpClose = !1, e) {
                            case u.XmpEvent.onPreOpen:
                                this.bufferPercent = 100, this.forceLoading = yield d.CommonNS.callXmp("IsForceloading"), this.checkPlayType();
                                break;
                            case u.XmpEvent.onError:
                                this.errorText = u.XmpErrorCodeNS.getErrorTextByErrorCode(i[1]), this.errorCode = i[1];
                                break;
                            case u.XmpEvent.onForceLoadingState:
                                this.forceLoading = i[0];
                                break;
                            case u.XmpEvent.onClearError:
                                this.isError && (this.errorCode = 0, this.xmpMediaStateDesc = "");
                                break;
                            case u.XmpEvent.onBuffer:
                                this.bufferPercent = Number(i[0])
                        }
                        this.information("onXmpEvent", e, t, ...i), this.checkXmpStateDesc(void 0, e), this.emitState()
                    }))
                }), a.client.attachServerEvent(u.ModeChangeEvent.onXmpModeChanged, (e, t, i, n) => o(this, void 0, void 0, function* () {
                    this.xmpMode = i, this.information("onXmpModeChanged", t, i)
                }))
            })
        }

        backToEmbed() {
            return o(this, void 0, void 0, function* () {
                d.CommonNS.callXmp(u.XmpPlayerFunction.setXmpCurrentMode, u.XmpMode.EMBED_MODE).catch();
                let e = "button=embed_play,components_type=independent";
                e += `,gcid=${yield d.CommonNS.getCurrentTaskGcid()}`, e += `,playid=${yield d.CommonNS.callXmp(u.XmpPlayerFunction.getPlayId)}`, e += `,pos=${Math.floor((yield d.CommonNS.callXmp(u.XmpPlayerFunction.getPosition)) / 1e3)}`;
                let t = yield d.CommonNS.callXmp(u.XmpPlayerFunction.getPlayTick, 0);
                e += `,start_tick=${t[0]},off_tick=${t[1]}`, a.client.callServerFunction("TrackEvent", "core_event", "player_function_click", "", 0, 0, 0, 0, e).catch()
            })
        }

        get errCode() {
            let e = "0x0";
            return this.errorCode && (e = "0x" + this.errorCode.toString(16).toLocaleUpperCase()), e
        }

        get isError() {
            return "error" === this.xmpMediaStateDesc
        }

        get isLoading() {
            return !this.xmpClose && ("loading" === this.xmpMediaStateDesc || this.beginForceLoading)
        }

        get isBuffering() {
            return !this.xmpClose && (2 === this.forceLoading || 1 === this.forceLoading || 100 !== this.bufferPercent)
        }

        get isPlaying() {
            return "playing" === this.xmpMediaStateDesc
        }

        checkPlayType() {
            return o(this, void 0, void 0, function* () {
                this.isYunBo = yield d.CommonNS.isYunBo(), this.isDownloadAndPlay = yield d.CommonNS.isPlayAndDownload(), this.isLocalPlay = yield d.CommonNS.isLocalPlay(), this.information("checkPlayType", this.isYunBo, this.isDownloadAndPlay, this.isLocalPlay)
            })
        }

        checkXmpStateDesc(e, t) {
            return o(this, void 0, void 0, function* () {
                switch (this.xmpMediaState = e || (yield d.CommonNS.callXmp(u.XmpPlayerFunction.getState)), this.information("checkXmpStateDesc", this.xmpMediaState, this.bufferPercent), this.xmpMediaState) {
                    case u.XmpMediaState.PreOpen:
                    case u.XmpMediaState.Opening:
                        this.xmpMediaStateDesc = "loading";
                        break;
                    case u.XmpMediaState.Paused:
                    case u.XmpMediaState.Playing:
                    case u.XmpMediaState.Play:
                    case u.XmpMediaState.Pausing:
                        this.xmpMediaStateDesc = "playing";
                        break;
                    case u.XmpMediaState.Completed:
                        this.xmpMediaStateDesc = "stoped";
                        break;
                    case u.XmpMediaState.Stopped:
                        this.isError || (this.xmpMediaStateDesc = "stoped");
                        break;
                    case u.XmpMediaState.Error:
                        this.xmpMediaStateDesc = "error";
                        break;
                    default:
                        let t = yield d.CommonNS.callXmp(u.XmpPlayerFunction.getLastPlayError),
                            i = yield d.CommonNS.getCurrentTaskIdOrPanId();
                        t && t.taskId === i && (this.errorCode = t.error, this.errorText = u.XmpErrorCodeNS.getErrorTextByErrorCode(this.errorCode))
                }
                t === u.XmpEvent.onClearError && (this.xmpMediaStateDesc = "loading"), 0 !== this.errorCode && (this.xmpMediaStateDesc = "error"), this.xmpClose && !this.isError && (this.xmpMediaStateDesc = "close"), this.isBuffering && (this.xmpMediaStateDesc = "buffering"), this.isDownloadCodec && (this.xmpMediaStateDesc = "codec")
            })
        }

        onHangleRetry() {
            return o(this, void 0, void 0, function* () {
                p.warning(" onHangleRetry"), a.client.callServerFunction("TrackEvent", "core_event", "player_fail_play_click", "", 0, 0, 0, 0, `errorcode=${this.errCode}`).catch();
                let e = yield d.CommonNS.callXmp(u.ConfigFunction.getConfigValue, "APlayerConfig", "LastPlayMediaId", 0);
                this.errorCode = 0;
                let t = yield d.CommonNS.callXmp(u.XmpPlayerFunction.openMedia, e);
                p.warning(t)
            })
        }

        get isXmpEmbedPlay() {
            return !(this.xmpMode === u.XmpMode.INDEPENDENT_MODE)
        }

        openPayVip(e) {
            return o(this, void 0, void 0, function* () {
                if (e) this.trackOpenVipBtn(!1); else if (this.isTryReady) return d.CommonNS.callVipPlugin(c.PlayTryNS.Function.gotoPlayTry, Number(this.curTaskId)), void f.VipStatNS.playTryReadyClick(yield d.CommonNS.getCurrentTaskGcid(), this.playTryStateInfo.tryNum, "center", this.playTryStateInfo.isCloudTask, Math.floor(this.durationNum / 1e3));
                d.CommonNS.callXmp("BufferClickVipBtn")
            })
        }

        trackOpenVipBtnEx() {
            return setTimeout(() => {
                this.trackOpenVipBtn(!0).catch()
            }, 0), !0
        }

        trackShowErrorPage() {
            return setTimeout(() => {
                a.client.callServerFunction("TrackEvent", "core_event", "player_fail_play_show", "", 0, 0, 0, 0, `errorcode=${this.errCode}`).catch()
            }, 0), !0
        }

        trackPackageTryReadyEx() {
            return o(this, void 0, void 0, function* () {
                f.VipStatNS.playTryReadyShow(yield d.CommonNS.getCurrentTaskGcid(), this.playTryStateInfo.tryNum, "center", this.playTryStateInfo.isCloudTask, Math.floor(this.durationNum / 1e3))
            })
        }

        trackPackageTryReady() {
            setTimeout(() => {
                this.trackPackageTryReadyEx().catch()
            }, 0)
        }

        trackOpenVipBtn(e) {
            return o(this, void 0, void 0, function* () {
                let t = new Map;
                t.set("play_from", yield d.CommonNS.getStatPlayfrom()), t.set("components_type", this.isXmpEmbedPlay ? "embed" : "independent"), t.set("vip_type", s.default.vipType), t.set("btn_position", "play_buffer");
                let i = e ? "player_video_load_open_yunbo_btn_show" : "player_video_load_open_yunbo_btn_click";
                if (e) return void d.CommonNS.trackShowEvnet("core_event", i + "play_buffer", t);
                let n = function (e) {
                    let t = "";
                    return e.forEach((e, i) => {
                        "" !== t && (t += ","), t = t + i + "=" + e
                    }), t
                }(t);
                a.client.callServerFunction("TrackEvent", "core_event", i, "", 0, 0, 0, 0, n).catch()
            })
        }

        isCanShowPage1(e) {
            let t = !1;
            switch (e) {
                case"codec":
                    t = !1;
                    break;
                case"error":
                    t = this.isError;
                    break;
                case"yunbo_vip":
                    t = this.isLoading && this.isYunBo && s.default.isVip;
                    break;
                case"yobon_novip":
                    t = this.isLoading && this.isYunBo && !s.default.isVip;
                    break;
                case"play_and_download_vip":
                    t = this.isLoading && this.isDownloadAndPlay && s.default.isVip;
                    break;
                case"play_and_download_novip":
                    t = this.isLoading && this.isDownloadAndPlay && !s.default.isVip;
                    break;
                case"local_play":
                    t = this.isLoading && this.isLocalPlay;
                    break;
                case"back_to_embed":
                    t = !1
            }
            return t
        }

        isCanShowPage2(e) {
            let t = !1;
            switch (e) {
                case"codec":
                case"error":
                case"yunbo_vip":
                case"yobon_novip":
                case"play_and_download_vip":
                case"play_and_download_novip":
                case"local_play":
                    t = !1;
                    break;
                case"back_to_embed":
                    t = !0
            }
            return t
        }

        isCanShowPage3(e) {
            let t = !1;
            switch (e) {
                case"codec":
                    t = this.isDownloadCodec;
                    break;
                case"error":
                    t = !1;
                    break;
                case"yunbo_vip":
                    t = this.isNewVideo ? this.isBuffering && this.isYunBo && s.default.isVip : (this.isLoading || this.isBuffering) && this.isYunBo && s.default.isVip;
                    break;
                case"yobon_novip":
                    t = this.isNewVideo ? this.isBuffering && this.isYunBo && !s.default.isVip : (this.isLoading || this.isBuffering) && this.isYunBo && !s.default.isVip;
                    break;
                case"play_and_download_vip":
                    t = this.isBuffering && this.isDownloadAndPlay && s.default.isVip;
                    break;
                case"play_and_download_novip":
                    t = this.isBuffering && this.isDownloadAndPlay && !s.default.isVip;
                    break;
                case"local_play":
                case"back_to_embed":
                    t = !1
            }
            return t
        }

        isCanShowPage4(e) {
            let t = !1;
            switch (e) {
                case"codec":
                    t = this.isDownloadCodec;
                    break;
                case"error":
                    t = this.isError;
                    break;
                case"yunbo_vip":
                    t = (this.isLoading || this.isBuffering) && this.isYunBo && s.default.isVip;
                    break;
                case"yobon_novip":
                    t = (this.isLoading || this.isBuffering) && this.isYunBo && !s.default.isVip;
                    break;
                case"play_and_download_vip":
                    t = (this.isLoading || this.isBuffering) && this.isDownloadAndPlay && s.default.isVip;
                    break;
                case"play_and_download_novip":
                    t = (this.isLoading || this.isBuffering) && this.isDownloadAndPlay && !s.default.isVip;
                    break;
                case"local_play":
                    t = this.isLoading && this.isLocalPlay;
                    break;
                case"back_to_embed":
                    t = !1
            }
            return t
        }

        isCanShowPage(e) {
            let t = !1;
            if (t = this.isEmbed ? this.isXmpEmbedPlay ? this.isCanShowPage1(e) : this.isCanShowPage2(e) : this.isXmpEmbedPlay ? this.isCanShowPage3(e) : this.isCanShowPage4(e)) {
                if (this.information("showpage", e, this.isDownloadCodec), this.preShowPage !== e) switch (this.preShowPage = e, e) {
                    case"error":
                        this.trackShowErrorPage();
                        break;
                    case"yunbo_vip":
                        break;
                    case"yobon_novip":
                        this.trackOpenVipBtnEx();
                        break;
                    case"play_and_download_vip":
                        break;
                    case"play_and_download_novip":
                        this.isTryReady && this.trackPackageTryReady()
                }
            } else "nothing" === e && (this.preShowPage = "");
            return t
        }

        isCanShowPageEx(e) {
            return this.preShowPage === e
        }

        get isTryRuning() {
            return !!this.playTryStateInfo && (this.playTryStateInfo.state === c.PlayTryNS.State.runing || this.playTryStateInfo.state === c.PlayTryNS.State.commiting)
        }

        get isTryReady() {
            return !!this.playTryStateInfo && this.playTryStateInfo.state === c.PlayTryNS.State.ready
        }

        get openVipText() {
            return this.isTryReady ? "试用加速" : "立即开通"
        }

        get vipTipText() {
            return this.isTryReady ? "您有一次免费试用会员加速机会" : "会员尊享视频高速加载特权"
        }
    };
    n([r.Prop({default: !1})], g.prototype, "isEmbed", void 0), n([r.Prop({default: ""})], g.prototype, "panFileId", void 0), n([r.Prop({})], g.prototype, "curTaskId", void 0), n([r.Prop({default: !1})], g.prototype, "beginForceLoading", void 0), n([r.Prop({default: !0})], g.prototype, "loggerEnable", void 0), n([r.Prop()], g.prototype, "durationNum", void 0), n([r.Watch("panFileId")], g.prototype, "onPanFileIdChange", null), n([r.Watch("forceLoading")], g.prototype, "onForceLoadingChange", null), n([r.Watch("xmpMediaStateDesc")], g.prototype, "onStateDescChange", null), n([r.Watch("bufferPercent")], g.prototype, "onBufferPercentChange", null), n([r.Watch("isDownloadCodec")], g.prototype, "onIsDownloadCodecChange", null), n([r.Watch("xmpMode")], g.prototype, "onXmpModeChange", null), n([r.Watch("beginForceLoading")], g.prototype, "onBeginForceLoadingChange", null), n([r.Prop({})], g.prototype, "playTryStateInfo", void 0), g = n([r.Component], g), t.default = g
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(252), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(838), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            tabs: e => e.Tabs.tabs,
            current: e => e.Tabs.current,
            currentCategoryId: e => e.DownloadListState.currentCategoryId
        },
        mapCommitToProps: {setCurrentGuide: "SET_CURRENT_GUIDE"},
        mapDispatchToProps: {},
        mapGettersToProps: {currentGuide: e => e.CurrentGuide}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(254), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(4), s = i(11), l = i(37), d = i(2), u = i(14), c = i(0), h = i(3), f = i(81), p = i(22),
        g = i(38), m = i(40), v = i(149), y = i(10), T = i(9), w = i(43), k = i(69),
        C = c.default.getLogger("task-detail-ZipFileList"), b = s.DownloadKernelTaskManager.getTaskManager(),
        I = (e, t) => e < t ? -1 : e === t ? 0 : 1;
    var S;
    !function (e) {
        e.getMediaPlayed = "PlayList.GetMediaPlayed", e.setMediaPlayed = "PlayList.SetMediaPlayed"
    }(S || (S = {}));
    let _ = class extends a.Vue {
        constructor() {
            super(...arguments), this.isGuideTipsShowed = !1, this.taskFileExist = !0, this.curTask = {}, this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [], this.defaultExpandedKeys = [], this.eventZipListComplete = 0, this.eventZipListCompletedError = 0, this.eventZipIndexComplete = 0, this.eventZipPassWordError = 0, this.eventFileExitsChange = 0, this.eventZipIndexError = 0, this.eventZipIndexProgress = 0, this.zipFileError = !1, this.clickRow = null, this.isAllSelectedAndFinished = !1, this.isSingle = !1, this.isMoreFile = !1, this.tryReportClickExtData = "", this.zipListFailTry = null, this.isLoadingList = !1, this.saveModeOpenResult = null, this.columns = [{
                label: "文件名称",
                prop: "name",
                sortable: !0,
                sorter: (e, t) => I(e.data.fileName.toLowerCase(), t.data.fileName.toLowerCase())
            }, {
                label: "大小",
                prop: "fileSize",
                width: 78,
                sortable: !0,
                sorter: (e, t) => I(e.data.fileSize, t.data.fileSize)
            }], this.tabHeight = 0
        }

        onCurTaskChange() {
            C.information("onCurTaskChange"), 0 === this.curTaskId ? this.uninit() : this.init()
        }

        get taskType() {
            return this.curTask.taskType
        }

        closeTips() {
            this.currentGuide === v.NewIssueGuide.zipFile && (this.setCurrentGuide(v.NewIssueGuide.unknown), T.XLStatNS.trackEvent("download_detail", "compressed_package_open_newuser_guid_click"))
        }

        isUnread(e) {
            return "leaf" === e.type && !e.data.userRead && e.data.isSupportPlay
        }

        onClickName(e) {
            return o(this, void 0, void 0, function* () {
                if (this.tryReportClickExtData = "", "leaf" === e.type) {
                    let t = "", i = !1;
                    if (e.data.isSupportPlay) {
                        if (yield f.CommonNS.callXmp(k.ZipFunction.isFilePlaying, this.curTaskId, e.data.index)) return void f.CommonNS.callXmp(k.XmpPlayerFunction.showAplayerAndFloatWindow).catch();
                        if (t += "file_type=video", e.data.encryNoSurppor) this.$message({
                            message: "不支持的加密方式，无法播放",
                            type: "warning",
                            duration: 2e3
                        }); else if (e.data.encry) {
                            i = !0, this.clickRow = e;
                            let n = {
                                pathIndex: e.data.pathIndex,
                                file: e.name,
                                encry: e.encry,
                                encryNoSurppor: e.encryNoSurppor,
                                saveMode: e.data.saveMode
                            };
                            T.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_show"), p.MessageBox.custom("ZipPassword", {xmpFileItem: n}).then(e => {
                                e.action === g.MessageBoxNS.Action.OK ? this.tryShowZipIndexingDialog().catch() : e.action === g.MessageBoxNS.Action.Cancel ? (this.tryReportClickExtData = "", t += ";video_open_result=fail;errorcode=2", t += `;task_type=${this.curTask.categoryId === this.currentCategoryId ? "download" : "getback"}`, T.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, t), T.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_click", "", 0, 0, 0, 0, "click_id=cancel")) : e.action === g.MessageBoxNS.Action.Close && (this.tryReportClickExtData = "", t += ";video_open_result=fail;errorcode=2", t += `;task_type=${this.curTask.categoryId === this.currentCategoryId ? "download" : "getback"}`, T.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, t), T.XLStatNS.trackEvent("download_detail", "encrypted_compressed_package_pop_click", "", 0, 0, 0, 0, "click_id=close"))
                            }).catch()
                        } else this.clickRow = e, i = !0, this.makeZipIndex()
                    } else t += "file_type=other", this.openDir(e);
                    t += `;task_type=${this.curTask.categoryId === this.currentCategoryId ? "download" : "getback"}`, i ? this.tryReportClickExtData = t : (this.tryReportClickExtData = "", T.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, t)), this.setUserRead(e)
                } else this.$refs.table.expand(e.key)
            })
        }

        formatSize(e) {
            return u.ThunderUtil.formatSize(e)
        }

        rowIcon(e) {
            if (!e) return "xly-type-unknown";
            if ("leaf" !== e.type) return "xly-type-group";
            let t = e.name.substring(e.name.lastIndexOf(".") + 1), i = {
                doc: "txt|doc|docx|xls|xlsx|csv|wps|rtf",
                mkv: "avi|mp4|mkv|mpeg|mpg|wmv|rmvb|rm|mov|ts|m2ts|tp|3gp|flv",
                exe: "exe|msi|com|bat|cmd|py|vbs",
                rar: "rar|zip|7z|cab|lzh|jar",
                iso: "iso|img|bin|nrg|ccd|vcd|dts|cdi|gho|mds|mdf",
                pic: "png|jpg|jpeg|webp",
                gif: "gif",
                music: "mp3|flac|wav|ape",
                ppt: "ppt|pptx",
                pdf: "pdf"
            };
            for (let n of Object.keys(i)) if (i[n].includes(t)) {
                let t = "xly-type-" + n;
                return e.encry && (t += " is-secret"), t
            }
            return "xly-type-unknown"
        }

        parseFileList(e) {
            let t = {};
            this.branchMap = {}, this.leafMap = {}, this.setBranch("", ""), e.forEach(e => {
                const {filePath: i} = e;
                if (!t[i]) {
                    t[i] = !0;
                    let e = "";
                    i.split("/").forEach(t => {
                        "" !== t && (this.setBranch(e, t), e = e ? `${e}/${t}` : t)
                    })
                }
            }), e.forEach(e => {
                const {filePath: t} = e;
                this.setLeaf(t, e)
            }), this.isSingle = Object.keys(this.branchMap).length <= 1, this.tree = Object.freeze(this.branchMap[""].children)
        }

        setBranch(e, t) {
            let i = this.branchMap[e], n = e ? `${e}/${t}` : t, o = this.branchMap[n];
            return 0 === this.defaultExpandedKeys.length && n && this.defaultExpandedKeys.push(n), o || (o = this.branchMap[n] = {
                type: "branch",
                name: t,
                children: [],
                key: n,
                parent: i,
                data: {fileName: t, fileSize: 0}
            }, i && i.children.push(o)), o
        }

        setLeaf(e, t) {
            let i = e ? `${e}/${t.fileName}` : t.fileName, n = this.branchMap[e], o = this.leafMap[i];
            o || (o = this.leafMap[i] = {
                type: "leaf",
                fullPath: i,
                name: t.fileName,
                encry: t.encry,
                key: i,
                parent: n,
                data: t
            }, n.children.push(o)), n.data.fileSize += t.fileSize;
            let a = n.parent;
            for (; a;) a.data.fileSize += t.fileSize, a = a.parent;
            return o
        }

        setUserRead(e) {
            e.data.userRead = 1;
            let t = b.getTaskFromTaskId(this.curTask.taskId);
            if (!t) return;
            t.setUserRead(1);
            let i = t.getTaskAttribute(r.DownloadKernel.TaskAttribute.SavePath),
                n = t.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskName), o = d.join(i, n);
            f.CommonNS.callXmp(S.setMediaPlayed, {taskId: this.curTaskId, url: o, name: e.name}, e.data.index)
        }

        openFile(e) {
            return o(this, void 0, void 0, function* () {
                yield this.updateDstRect();
                let t = this.curTask.savePath, i = this.curTask.taskName, n = d.join(t, i, e.key);
                h.client.callServerFunction("ShellOpen", n).catch()
            })
        }

        playFile(e) {
            return o(this, void 0, void 0, function* () {
                let t = document.querySelector("div#xly-task-detail-down__main");
                t && t.scrollTo(0, 0), yield this.updateDstRect();
                let i = "download_right_downloading_filelist";
                if (this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Completed ? i = "download_right_complate_filelist" : this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Recycle && (i = "download_right_recycle_filelist"), -1 !== this.curTask.categoryId && -1 !== this.currentCategoryId) i = "download_private_space_bxbb_play", this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Completed && (i = "download_private_space_local_play"); else if (-1 === this.currentCategoryId && -1 !== this.curTask.categoryId) {
                    let e = !1,
                        t = b.getTaskFromTaskId(this.curTaskId).getExtraObject().getUserData(w.TaskUserDataGUID.guidThunderYunDownloadUserData, "extras");
                    if (t) {
                        let i = null;
                        try {
                            i = JSON.parse(t)
                        } catch (e) {
                        }
                        i && 1 === i.isInSafe && (e = !0)
                    }
                    i = e ? "safebox_download_getbacking_play" : "download_getbacking_play", this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Completed && (i = e ? "safebox_download_getback_complete_play" : "download_getback_complete_play")
                }
                h.client.callServerFunction("OperateTask", this.curTaskId, "play", {
                    fileIndex: e.data.index,
                    playFrom: i,
                    isZipPlay: !0,
                    fileName: this.clickRow.name
                }).then().catch()
            })
        }

        updateDstRect() {
            return o(this, void 0, void 0, function* () {
                let e, t = document.querySelector("div.xly-file-detail div.td-tabs__pane"),
                    i = {width: 0, height: 0, x: 0, y: 0};
                t && (e = t.getBoundingClientRect()), i.y = e.top > 42 ? e.top : 42, i.x = e.left, i.width = e.width, i.height = e.height, yield h.client.callServerFunction("UpdateDownloadEmbedRect", i), C.information("play rect", i)
            })
        }

        openDir(e) {
            let t = this.taskFile;
            h.client.callServerFunction("ShellOpen", t).catch()
        }

        isSupportPlay(e) {
            return "branch" !== e.type && (!!this.subFiles[e.data.index] && this.subFiles[e.data.index].isSupportPlay)
        }

        getFileList(e) {
            return o(this, void 0, void 0, function* () {
                let t = [], i = !1, n = [];
                for (let o = 0; o < e.fileItems.length; ++o) {
                    let a = {};
                    a.index = o, a.pathIndex = e.fileItems[o].pathIndex, a.filePath = e.pathItems[e.fileItems[o].pathIndex].full, a.fileName = e.fileItems[o].file, a.fileSize = e.fileItems[o].size, a.saveMode = e.fileItems[o].saveMode, a.isSupportPlay = l.TaskUtilHelper.isVideoFileExt(a.fileName), a.isSupportPlay && n.push(o), !this.isGuideTipsShowed && a.isSupportPlay && (i = !0), a.encry = e.fileItems[o].encry, a.encryNoSurppor = e.fileItems[o].encryNoSurppor, t.push(a)
                }
                if (i && (this.setCurrentGuide(v.NewIssueGuide.zipFile), y.ConfigNS.setValue("GuideTips", "ZipFile", !0), T.XLStatNS.trackEvent("download_detail", "compressed_package_open_newuser_guid_show")), n.length) {
                    let e = yield f.CommonNS.callXmp(S.getMediaPlayed, this.curTaskId, n);
                    if (C.information(S.getMediaPlayed, e), e) {
                        Object.keys(e).forEach(i => {
                            t[Number(i)] && (t[Number(i)].userRead = e[i])
                        })
                    }
                }
                return t
            })
        }

        uninit() {
            this.isLoadingList = !1, this.curTask = {}, this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [], this.zipListFailTry && (clearInterval(this.zipListFailTry), this.zipListFailTry = null)
        }

        init() {
            return o(this, void 0, void 0, function* () {
                if (this.zipListFailTry && (clearInterval(this.zipListFailTry), this.zipListFailTry = null), this.isLoadingList = !0, C.information("init FileList"), this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [], this.isMoreFile = !1, this.defaultExpandedKeys = [], this.curTask = b.getTaskFromTaskId(this.curTaskId).getTaskBaseInfo(), this.taskFileExist = yield m.TaskCtrlOperatorNS.isExistTaskFile(this.curTask), this.isZipFile && this.taskFileExist) {
                    this.attachEvent(), (yield f.CommonNS.callXmp(k.ZipFunction.doGetFileList, this.taskFile, this.curTaskId)) || this.tryGetZipList()
                }
            })
        }

        tryGetZipList() {
            this.zipListFailTry && (clearInterval(this.zipListFailTry), this.zipListFailTry = null), this.zipListFailTry = setInterval(() => o(this, void 0, void 0, function* () {
                let e = yield f.CommonNS.callXmp(k.ZipFunction.doGetFileList, this.taskFile, this.curTaskId);
                C.information(k.ZipFunction.doGetFileList, "time out 1000", e), e && (clearInterval(this.zipListFailTry), this.zipListFailTry = null)
            }), 1e3)
        }

        get taskFile() {
            return this.curTask ? d.join(this.curTask.savePath, this.curTask.taskName) : ""
        }

        get isZipFile() {
            return !(!this.curTask || !this.curTask.taskName) && this.curTask.taskName.toLocaleLowerCase().endsWith(".zip")
        }

        onZipListCompleted(e, ...t) {
            return o(this, void 0, void 0, function* () {
                C.information("onZipListCompleted", t[1]);
                let e = !1;
                do {
                    if (t.length < 2) break;
                    if (t[0] !== this.taskFile) break;
                    let i = t[1];
                    this.isMoreFile = i.isMoreFile, this.calcTabHeight(), this.subFiles = yield this.getFileList(i), this.parseFileList(this.subFiles), this.zipFileError = !1, this.isLoadingList = !1, e = !0
                } while (0);
                e || (this.isMoreFile = !1, this.isLoadingList = !1, this.zipFileError = !0, this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [])
            })
        }

        onZipListCompletedError(e, ...t) {
            this.isLoadingList = !1, this.zipFileError = !0, this.isMoreFile = !1, this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = []
        }

        onZipIndexCompleted(e, ...t) {
            let i = 0;
            this.clickRow.data.saveMode && this.clickRow.encry && (i = 2e3), this.saveModeOpenResult && (clearTimeout(this.saveModeOpenResult), this.saveModeOpenResult = null), this.saveModeOpenResult = setTimeout(() => {
                this.tryReportClickExtData && (this.tryReportClickExtData += ";video_open_result=success", T.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, this.tryReportClickExtData), this.tryReportClickExtData = "")
            }, i), this.playFile(this.clickRow)
        }

        onZipPassWordError(e, ...t) {
            if (this.saveModeOpenResult && (clearTimeout(this.saveModeOpenResult), this.saveModeOpenResult = null), this.tryReportClickExtData) {
                let e = this.tryReportClickExtData + ";video_open_result=fail;errorcode=1";
                T.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, e)
            }
        }

        onZipIndexError(e, ...t) {
            if (!(t.length > 1 && !0 === t[1])) {
                if (this.tryReportClickExtData) {
                    let e = this.tryReportClickExtData + ";video_open_result=fail;errorcode=0";
                    T.XLStatNS.trackEvent("download_detail", "dl_detail_file_tab_click", "", 0, 0, 0, 0, e)
                }
                this.$message({message: "当前视频的压缩方式暂不支持打开，请解压后播放", type: "warning", duration: 2e3})
            }
        }

        onZipIndexProgress(e, ...t) {
            this.clickRow && this.clickRow.data.saveMode && this.clickRow.encry && this.tryShowZipIndexingDialog().catch()
        }

        makeZipIndex(e = "") {
            let t = {
                pathIndex: this.clickRow.data.pathIndex,
                file: this.clickRow.name,
                encry: this.clickRow.encry,
                encryNoSurppor: this.clickRow.encryNoSurppor,
                saveMode: this.clickRow.data.saveMode
            };
            f.CommonNS.callXmp(k.ZipFunction.makeIndexFile, t, e), this.tryShowZipIndexingDialog().catch()
        }

        tryShowZipIndexingDialog() {
            return o(this, void 0, void 0, function* () {
                (yield f.CommonNS.callXmp(k.ZipFunction.needWaitIndexFile)) && p.MessageBox.custom("ZipIndexing").then(e => {
                    e.action === g.MessageBoxNS.Action.Close && f.CommonNS.callXmp(k.ZipFunction.abortMakeIndexFile)
                }).catch()
            })
        }

        onTaskFileExitsChange(e, ...t) {
            this.curTaskId === t[0] && (this.taskFileExist = t[1], this.taskFileExist ? this.init() : (this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [], this.isMoreFile = !1, f.CommonNS.callXmp(k.ZipFunction.doDelFileList, this.taskFile)))
        }

        attachEvent() {
            this.eventZipListComplete || (this.eventZipListComplete = h.client.attachServerEvent(k.ZipEvent.listCompleted, this.onZipListCompleted.bind(this)), this.eventZipListCompletedError = h.client.attachServerEvent(k.ZipEvent.listCompletedError, this.onZipListCompletedError.bind(this)), this.eventZipIndexComplete = h.client.attachServerEvent(k.ZipEvent.indexCompleted, this.onZipIndexCompleted.bind(this)), this.eventZipPassWordError = h.client.attachServerEvent(k.ZipEvent.passWordError, this.onZipPassWordError.bind(this)), this.eventZipIndexError = h.client.attachServerEvent(k.ZipEvent.indexError, this.onZipIndexError.bind(this)), this.eventZipIndexProgress = h.client.attachServerEvent(k.ZipEvent.indexProgress, this.onZipIndexProgress.bind(this)), this.eventFileExitsChange = h.client.attachServerEvent("TaskFileExitsChange", this.onTaskFileExitsChange.bind(this)))
        }

        mounted() {
            this.isGuideTipsShowed = y.ConfigNS.getValue("GuideTips", "ZipFile", !1), window.onresize = (() => {
                this.calcTabHeight()
            })
        }

        calcTabHeight() {
            let e, t = document.querySelector("div.xly-file-detail div.td-tabs__pane");
            return t && (e = t.getBoundingClientRect()), this.isMoreFile ? this.tabHeight = e.height - 72 : this.tabHeight = e.height - 36, C.information("calcTabHeight", this.tabHeight), this.tabHeight
        }

        beforeDestroy() {
            this.uninit(), this.eventZipListComplete && (h.client.detachServerEvent(k.ZipEvent.listCompleted, this.eventZipListComplete), h.client.detachServerEvent(k.ZipEvent.listCompletedError, this.eventZipListCompletedError), h.client.detachServerEvent(k.ZipEvent.indexCompleted, this.eventZipIndexComplete), h.client.detachServerEvent(k.ZipEvent.passWordError, this.eventZipPassWordError), h.client.detachServerEvent(k.ZipEvent.indexError, this.eventZipIndexError), h.client.detachServerEvent(k.ZipEvent.indexProgress, this.eventZipIndexProgress), h.client.detachServerEvent("TaskFileExitsChange", this.eventFileExitsChange)), this.closeTips()
        }
    };
    n([a.Prop()], _.prototype, "curTaskId", void 0), n([a.Prop()], _.prototype, "operate", void 0), n([a.Prop()], _.prototype, "playingCurTask", void 0), n([a.Prop()], _.prototype, "playingMediaIndex", void 0), n([a.Prop()], _.prototype, "curCategroyViewID", void 0), n([a.Prop()], _.prototype, "currentCategoryId", void 0), n([a.Prop()], _.prototype, "playstate", void 0), n([a.Prop()], _.prototype, "currentGuide", void 0), n([a.Prop()], _.prototype, "setCurrentGuide", void 0), n([a.Watch("curTaskId", {immediate: !0})], _.prototype, "onCurTaskChange", null), _ = n([a.Component], _), t.default = _
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(256), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(6), r = i(4), s = i(11), l = i(16);
    let d = i(841);
    const u = i(14), c = o.default.getLogger("task-detail-Attribute"), h = s.DownloadKernelTaskManager.getTaskManager(),
        f = l.DownloadKernelEventManager.getEventManager();
    let p = class extends a.Vue {
        constructor() {
            super(...arguments), this.eventOnTaskDetailChange = -1, this.myChart = null, this.originSize = 0, this.p2pSize = 0, this.p2sSize = 0, this.offlineSize = 0, this.channelSize = 0, this.downloadSize = 0, this.fileSize = 0
        }

        get originPercent() {
            return 0 === this.fileSize ? "0.00" : (this.originSize / this.fileSize * 100).toFixed(2)
        }

        get p2pPercent() {
            return 0 === this.fileSize ? "0.00" : (this.p2pSize / this.fileSize * 100).toFixed(2)
        }

        get p2sPercent() {
            return 0 === this.fileSize ? "0.00" : (this.p2sSize / this.fileSize * 100).toFixed(2)
        }

        get offlinePercent() {
            return 0 === this.fileSize ? "0.00" : (this.offlineSize / this.fileSize * 100).toFixed(2)
        }

        get undownloadSize() {
            return 0 === this.fileSize ? 1 : this.task.getTaskStatus() === r.DownloadKernel.TaskStatus.Seeding || this.task.getTaskStatus() === r.DownloadKernel.TaskStatus.Succeeded ? 0 : Math.max(this.fileSize - this.downloadSize, 0)
        }

        get undownloadPercent() {
            return 0 === this.fileSize ? "0.00" : (this.undownloadSize / this.fileSize * 100).toFixed(2)
        }

        get fileSizeFormat() {
            return this.formatSize(this.fileSize)
        }

        watchTaskInfoChange() {
            0 !== this.curTaskId && (this.task = h.getTaskFromTaskId(this.curTaskId), this.drawTaskInfo(!1))
        }

        drawPie(e = !0) {
            if (null == this.myChart) return;
            let t = {
                legend: {orient: "vertical", left: 10},
                series: [{
                    type: "pie",
                    radius: ["80%", "100%"],
                    avoidLabelOverlap: !1,
                    hoverAnimation: !1,
                    animation: e,
                    itemStyle: {normal: {label: {show: !1}, labelLine: {show: !1}}},
                    color: ["#7ee09e", "#23D9D6", "#3980FA", "#FECB56", "rgba(106,112,124,0.18)"],
                    data: [{value: this.originSize}, {value: this.p2sSize}, {value: this.p2pSize}, {value: this.offlineSize}, {value: this.undownloadSize}]
                }]
            };
            t && "object" == typeof t && this.myChart.setOption(t, !0)
        }

        formatSize(e) {
            return u.ThunderUtil.formatSize(e)
        }

        init() {
            if (0 === this.curTaskId) return;
            this.task = h.getTaskFromTaskId(this.curTaskId);
            let e = document.getElementById("chart");
            this.myChart = d.init(e), window.addEventListener("resize", () => {
                this.myChart.resize()
            }), this.drawTaskInfo(!1)
        }

        drawTaskInfo(e = !0) {
            if (!this.task) return;
            let t = this.task.getTaskChannelInfo(), i = this.task.getTaskBaseInfo();
            this.originSize = t.originSize, this.p2pSize = t.p2pSize, this.p2sSize = t.p2sSize, this.offlineSize = t.offlineSize, this.channelSize = this.originSize + this.p2pSize + this.p2sSize + this.offlineSize, this.downloadSize = i.downloadSize, this.fileSize = i.fileSize, this.channelSize < this.downloadSize && (this.p2pSize > 0 ? this.p2pSize = this.p2pSize + this.downloadSize - this.channelSize : this.offlineSize > 0 ? this.offlineSize = this.offlineSize + this.downloadSize - this.channelSize : this.originSize > 0 ? this.originSize = this.originSize + this.downloadSize - this.channelSize : this.p2sSize > 0 && (this.p2sSize = this.p2sSize + this.downloadSize - this.channelSize)), this.drawPie(e)
        }

        updateTaskInfo(...e) {
            do {
                if (!e) break;
                if (!e[1]) break;
                let t = e[1];
                for (let e = 0; e < t.length; ++e) {
                    let i = t[e];
                    if (i && i.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId) === this.curTaskId) {
                        this.task = i, this.drawTaskInfo();
                        break
                    }
                }
            } while (0)
        }

        mounted() {
            c.information("attribute mounted"), this.init(), this.eventOnTaskDetailChange = f.attachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                this.updateTaskInfo(...e)
            })
        }

        beforeDestroy() {
            c.information("### attribute beforeDestroy"), f.detachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, this.eventOnTaskDetailChange)
        }
    };
    n([a.Prop({default: 0})], p.prototype, "curTaskId", void 0), n([a.Watch("curTaskId")], p.prototype, "watchTaskInfoChange", null), p = n([a.Component], p), t.default = p
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(258), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(843), o = i(24), a = i(26).DownloadKernelCategoryManager.getCategoryManager();
    t.default = o.connector.connect({
        mapStateToProps: {
            currentCategoryViewId: e => e.DownloadListState.currentCategoryViewId,
            curTaskBase: (e, t) => {
                let i = null, n = t.curTaskId, o = t.currentCategoryId;
                if (-1 === o) {
                    for (let o = 0; o < e.DownloadListState.taskList.length; o++) if (e.DownloadListState.taskList[o].id === t.curCategroyViewId) {
                        i = e.DownloadListState.taskList[o].tasksMap[n];
                        break
                    }
                } else if (a.isPrivateCategory(o)) for (let o = 0; o < e.DownloadListState.taskListPrivate.length; o++) e.DownloadListState.taskListPrivate[o].id === t.curCategroyViewId && (i = e.DownloadListState.taskListPrivate[o].tasksMap[n]);
                return i
            },
            vipSpeedInfo: (e, t) => {
                let i = null, n = t.curTaskId;
                return i = e.VipSpeedState.vipSpeedMap[n] ? e.VipSpeedState.vipSpeedMap[n] : e.VipSpeedState.defaultStatus
            }
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(260), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(0), r = i(5), s = i(4), l = i(11), d = i(16), u = i(40), c = i(59), h = i(64), f = i(389), p = i(844),
        g = i(6), m = i(14), v = i(390), y = i(23), T = i(9), w = i(37), k = i(405), C = i(3), b = i(412), I = i(45),
        S = i(73), _ = i(43), D = i(151), A = d.DownloadKernelEventManager.getEventManager(),
        N = l.DownloadKernelTaskManager.getTaskManager(), x = a.default.getLogger("TaskChart");
    let E = class extends g.Vue {
        constructor() {
            super(...arguments), this.width = 0, this.height = 0, this.progress = 0, this.avgSpeed = 0, this.maxSpeed = !1, this.downloadSpeed = !1, this.vipSpeed = !1, this.taskSpeedInfo = {}, this.curTask = {}, this.speedCurveColor = {
                gradientColorEnd: "rgba(63,133,255,.1)",
                gradientColorStart: "rgba(63,133,255,.5)",
                lineColorEnd: "#3F85FF",
                lineColorStart: "#3F85FF"
            }, this.whiteVipSpeedCurveColor = {
                gradientColorEnd: "rgba(235,121,113,.1)",
                gradientColorStart: "rgba(240,134,127,.5)",
                lineColorEnd: "#eb7971",
                lineColorStart: "#eb7971"
            }, this.superVipSpeedCurveColor = {
                gradientColorEnd: "rgba(235,176,73,.1)",
                gradientColorStart: "rgba(235,176,73,.5)",
                lineColorEnd: "#ebb049",
                lineColorStart: "#ebb049"
            }, this.userSpeedCurveColor = {
                gradientColorEnd: "rgba(63,133,255,.1)",
                gradientColorStart: "rgba(63,133,255,.5)",
                lineColorEnd: "#3f85ff",
                lineColorStart: "#3f85ff"
            }, this.eventOnTaskDetailChange = -1, this.eventOnTaskStatusChange = -1, this.eventOnInsertToCategoryView = -1, this.options = [], this.lastPoint = 0, this.points = [], this.requireAnimation = -1, this.srcUsing = "0", this.srcTotal = "0", this.remain = "--:--:--", this.isBtOrGroup = !1, this.isSupportPlay = !1, this.vipInfo = {}, this.lastPoints = [], this.increasePoints = [], this.curveLeft = 0, this.curveTop = 155, this.downloadingPeriod = 1, this.lastData = [], this.curData = [], this.lastPointX = 0, this.lastPointY = 0, this.maxValue = 0, this.historyMaxValue = 0, this.lastMaxValue = 0, this.maxValueIncrease = 0, this.frame = 10, this.taskFileExist = !0, this.historyVipSpeedColorMap = {}, this.curTaskIsTryTask = !1, this.showCurveCutLine = !0, this.vipTaskInfo = null, this.sharelink = "", this.fileType = "", this.url = "https://sl-m-ssl.xunlei.com/h5/page/airplay/", this.taskChartRemoteConfig = {}
        }

        onActiveKeyChange() {
            return o(this, void 0, void 0, function* () {
                "TaskChart" === this.activeKey ? (yield this.init().catch(), this.onTaskChange()) : this.uninit()
            })
        }

        get curTaskStatus() {
            return this.curTaskBase && this.curTaskBase.taskStatus || s.DownloadKernel.TaskStatus.Unkown
        }

        get shareShowType() {
            return this.curTaskStatus >= s.DownloadKernel.TaskStatus.StartWaiting && this.curTaskStatus < s.DownloadKernel.TaskStatus.Stopped ? "" : [s.DownloadKernel.TaskStatus.Failed, s.DownloadKernel.TaskStatus.Stopped].includes(this.curTaskStatus) && this.curTaskErrorType ? "" : "" === this.scanIconClass ? "" : this.fileType && this.taskChartRemoteConfig.phoneShare || ""
        }

        get scanIconClass() {
            if (!this.fileType) return "";
            let e = this.fileType;
            return "unknown" === e ? e = "file" : "apk" === e && (e = "android"), "xly-icon-" + e + "-bold"
        }

        get scanButtonText() {
            return {file: "阅读", picture: "预览", apk: "安装", music: "聆听", unknown: "查看"}[this.fileType] || ""
        }

        checkHaveTry() {
            do {
                let e = "TryTask_" + this.curTaskId;
                if (this.curTaskIsTryTask = k.MemoryConfigNS.getValue("TaskChar", e, !1), this.curTaskIsTryTask) break;
                this.vipTaskInfo && this.vipTaskInfo.enterType === b.VipDownloadDefineNS.VipTaskType.Try && (this.curTaskIsTryTask = !0), this.curTaskIsTryTask && k.MemoryConfigNS.setValue("TaskChar", e, !0)
            } while (0)
        }

        attachTaskStatus() {
            C.client.attachServerEvent("OnVipTaskInfoChanged", (e, t, i) => {
                e && "vip-download-webview" === e.name && this.curTaskId === t && (this.vipTaskInfo = i)
            })
        }

        created() {
            this.attachTaskStatus()
        }

        onVipTaskInfoChange() {
            this.checkHaveTry()
        }

        onCurUserIdChange() {
            return o(this, void 0, void 0, function* () {
                if (this.userSpeedCurveColor = this.speedCurveColor, "" === this.curUserId) this.vipInfo = {}; else {
                    if (this.vipInfo = y.LoginHelperNS.loginHelper.getVipInfo(), "0" === this.vipInfo.isVip) return;
                    "3" === this.vipInfo.vasType || "2" === this.vipInfo.vasType ? this.userSpeedCurveColor = this.whiteVipSpeedCurveColor : "5" === this.vipInfo.vasType && (this.userSpeedCurveColor = this.superVipSpeedCurveColor)
                }
                let e = this.filteredData[0] ? [].concat(Object.values(Object.values(this.filteredData[0]))) : [];
                this.maxValue = this.getMaxValue(e), this.draw(!1)
            })
        }

        onTaskChange() {
            return o(this, void 0, void 0, function* () {
                if (0 === this.curTaskId || "TaskChart" !== this.activeKey) return;
                this.curveLeft = 0, this.curveTop = 155, this.lastPoint = 0, this.curTask = N.getTaskFromTaskId(this.curTaskId), this.isDestroyed(), this.isSupportPlay = this.isTaskSupportPlay();
                let e = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                    t = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize),
                    i = this.curTask.getTaskStatus(), n = 0;
                0 !== t && 0 !== e && (n = i === s.DownloadKernel.TaskStatus.Succeeded || i === s.DownloadKernel.TaskStatus.Seeding || e >= t ? 100 : Math.floor(e / t * 100)), this.taskSpeedInfo = yield this.getHistorySpeedInfo(this.curTaskId, n), yield this.getHistoryVipSpeedColor(), this.maxSpeed = this.taskSpeedInfo.maxSpeed;
                let a = this.curTask.getType();
                this.isBtOrGroup = a === s.DownloadKernel.TaskType.Bt || a === s.DownloadKernel.TaskType.Group, this.updateDownloadInfo();
                let r = this.filteredData[0] ? [].concat(Object.values(Object.values(this.filteredData[0]))) : [];
                this.maxValue = this.getMaxValue(r), this.draw(!1), this.fileType = this.getIconClass(this.curTask.getTaskName()), this.fileType && this.$nextTick(() => o(this, void 0, void 0, function* () {
                    let e = yield this.getShareLink(this.fileType), t = document.getElementById("easyShareA");
                    if ("b" === this.shareShowType && (t = document.getElementById("easyShareB")), this.sharelink = e, D.toCanvas(t, e, {
                        margin: 0,
                        width: 80
                    }, e => {
                        x.information("QRCode.toCanvas error = ", e)
                    }), "" === this.shareShowType) return;
                    let i = "unknown";
                    if (this.curTask.getType() !== s.DownloadKernel.TaskType.Group && this.curTask.getType() !== s.DownloadKernel.TaskType.Bt) {
                        let e = this.curTask.getTaskName().split(".");
                        i = e[e.length - 1]
                    }
                    let n = this.fileType;
                    if (this.curTask.getType() === s.DownloadKernel.TaskType.Bt && this.isSupportPlay) n = "bt"; else {
                        n = {music: "audio", picture: "picture", file: "document"}[n] || n
                    }
                    T.XLStatNS.trackEvent("core_event", "player_guid_yun_add_icon_show", "", 0, 0, 0, 0, "taskid=" + this.curTaskId + ",gcid=" + this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.Gcid) + ",is_moon=0,position=speed,task_type=" + n + ",file_suffix=" + i + ",qrcode_from=" + this.shareShowType.toUpperCase())
                }))
            })
        }

        getShareLink(e) {
            return o(this, void 0, void 0, function* () {
                let t = yield this.getBirdKey(this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskUrl), {
                    filename: this.curTask.getTaskName(),
                    filesize: String(this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize))
                });
                return e = {
                    music: "audio",
                    picture: "picture",
                    file: "documentation"
                }[e] || e, this.url + "?bird_key=" + t + "&extname=" + e + "&qrcode_from=" + this.taskChartRemoteConfig.phoneShare
            })
        }

        getBirdKey(e, t) {
            return o(this, void 0, void 0, function* () {
                let i = "";
                try {
                    let n = yield S.queryBirdKeyInfo(e, void 0, void 0, t);
                    x.information("getThunderDlj res = ", n), 200 === n.status && n.data && "ok" === n.data.result && (i = n.data.bird_key)
                } catch (e) {
                    i = ""
                }
                return i
            })
        }

        onMouseHoverShowCode() {
            let e = "unknown";
            if (this.curTask.getType() !== s.DownloadKernel.TaskType.Group && this.curTask.getType() !== s.DownloadKernel.TaskType.Bt) {
                let t = this.curTask.getTaskName().split(".");
                e = t[t.length - 1]
            }
            let t = this.fileType;
            t = {
                music: "audio",
                picture: "picture",
                file: "document"
            }[t] || t, T.XLStatNS.trackEvent("core_event", "player_guid_icon_2dcode_show", "", 0, 0, 0, 0, "taskid=" + this.curTaskId + ",gcid=" + (this.curTaskBase.gcid || "") + ",is_moon=0,position=speed,task_type=" + t + ",file_suffix=" + e + ",qrcode_from=" + this.shareShowType.toUpperCase())
        }

        getIconClass(e) {
            if (this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Completed && !this.taskFileExist) return "";
            if (this.isBtOrGroup && this.isSupportPlay) return "";
            if (this.isBtOrGroup) return "unknown";
            let t = e.substring(e.lastIndexOf(".") + 1);
            if ("avi|mp4|mkv|mpeg|mpg|wmv|rmvb|rm|mov|ts|m2ts|tp|3gp|flv".includes(t)) return "";
            let i = {
                file: "txt|doc|docx|xls|xlsx|csv|wps|rtf|pdf|ppt|epub|mobi|umd|chm",
                apk: "apk",
                picture: "png|jpg|jpeg|webp|gif",
                music: "aiff|cue|m3u|au|cdda|raw|wav|flac|tak|mp3|aac|wma|m4a|mid|mka|mp2|mpa|mpc|ape|ofr|ogg|ra|wv|tta|ac3|dts|nsf|mod|s3m|xm|it|vst"
            };
            for (let e of Object.keys(i)) if (i[e].includes(t)) return e;
            return "unknown"
        }

        updateOptions() {
            this.$set(this.options, 0, {
                speedCurveColor: this.speedCurveColor,
                data: this.taskSpeedInfo.historySpeedMap
            })
        }

        formatSize(e) {
            return m.ThunderUtil.formatSize(e)
        }

        trackEvent(e) {
            do {
                let t = "download_right_downloading_embed", i = this.curTask.getTaskBaseInfo().categoryId,
                    n = this.curTask.getIsPrivate();
                if (-1 === i || n) break;
                let o = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName), a = o.split("."),
                    r = a[a.length - 1], l = "video";
                if (w.TaskUtilHelper.getTaskFileType(o) === w.TaskUtilHelper.FileExtType.Music && (l = "music"), "play" === e) t = "download_right_gotback_play_click"; else {
                    if ("bianxiabianbo" !== e) break;
                    t = "download_right_gettingback_play_click"
                }
                T.XLStatNS.trackEvent("pc_yunpan", "yunpan_consumption_click", "", 0, 0, 0, 0, "from=" + t + ",file_type=" + l + ",suffix=" + r)
            } while (0)
        }

        operate(e, t) {
            if (this.trackEvent(e), "play" === e) {
                this.$emit("tabChange", "Preview"), t || (t = {});
                let e = "download_right_complate_speed_embed";
                if (-1 === this.currentCategoryId && -1 !== this.curTaskBase.categoryId) {
                    let t = !1,
                        i = N.getTaskFromTaskId(this.curTaskId).getExtraObject().getUserData(_.TaskUserDataGUID.guidThunderYunDownloadUserData, "extras");
                    if (i) {
                        let e = null;
                        try {
                            e = JSON.parse(i)
                        } catch (e) {
                        }
                        e && 1 === e.isInSafe && (t = !0)
                    }
                    this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading ? e = t ? "safebox_download_getbacking_play" : "download_getbacking_play" : this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Completed && (e = t ? "safebox_download_getback_complete_play" : "download_getback_complete_play")
                }
                t.playFrom = e
            }
            let i = "button=" + e + ",current_tab=" + this.currentCategoryViewId;
            if (0 !== this.curTaskId) {
                i += `,task_type=${this.curTask.getTaskBaseInfo().categoryId === this.currentCategoryId ? "download" : "getback"}`
            }
            T.XLStatNS.trackEvent("download_detail", "dl_detail_speed_btn_click", "", 0, 0, 0, 0, i), v.TaskOperate.operateTaskActions(this.curTaskId, e, t)
        }

        get isYunGetBackTask() {
            let e = !(!this.curTaskBase || -1 === this.curTaskBase.categoryId);
            return x.information("isYunGetBackTask curTaskBase", this.curTaskBase, "ret", e), e
        }

        get isFast() {
            return [8, 10].includes(this.curTaskStatus) && 1 === this.downloadingPeriod
        }

        get vipType() {
            let e = !1;
            if (this.curTaskIsTryTask && this.historyVipSpeedColorMap) {
                let t = Object.keys(this.historyVipSpeedColorMap), i = t[t.length - 1];
                if (!0 === (e = [1, 2].includes(+this.historyVipSpeedColorMap[i]))) return 1 == +this.historyVipSpeedColorMap[i] ? "is-vip" : "is-super"
            }
            return this.vipInfo ? 1 != +this.vipInfo.isVip || "3" !== this.vipInfo.vasType && "2" !== this.vipInfo.vasType ? 1 == +this.vipInfo.isVip && "5" === this.vipInfo.vasType ? "is-super" : "" : "is-vip" : ""
        }

        isDestroyed() {
            return o(this, void 0, void 0, function* () {
                let e = !0;
                this.curTaskStatus !== s.DownloadKernel.TaskStatus.Seeding && this.curTaskStatus !== s.DownloadKernel.TaskStatus.Succeeded || (e = yield u.TaskCtrlOperatorNS.isExistTaskFile(this.curTaskBase)), this.taskFileExist = e
            })
        }

        get curTaskErrorType() {
            if (0 === this.curTaskId || this.curTaskStatus !== s.DownloadKernel.TaskStatus.Failed) return "";
            let e = "", t = 0, i = N.getTaskFromTaskId(this.curTaskBase.taskId);
            return null !== i && (t = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.ErrorCode)), e = c.TaskStatusHelper.getTaskErrorInfoByCode(t)
        }

        isTaskSupportPlay() {
            return this.curTask.isSupportPlay()
        }

        get filteredData() {
            return this.filterData(this.options) || []
        }

        transformedData() {
            return this.filteredData.map(e => this.transformData(e))
        }

        getMaxValue(e = []) {
            let t = 0;
            return e.forEach(e => {
                t = Math.max(t, parseInt(e, 10))
            }), t
        }

        filterData(e) {
            return e.map(e => {
                let t = {};
                return Object.keys(e.data).forEach((i, n, o) => {
                    i % this.step != 0 && i !== o.length || (t[i] = e.data[i])
                }), t
            })
        }

        draw(e = !0) {
            let t = this.$refs.dataChart;
            if (this.clearCanvas(), cancelAnimationFrame(this.requireAnimation), x.information("draw canvas: ", JSON.stringify(this.transformedData())), 0 === this.width && this.initCanvas(), t && t.getContext) {
                let i = t.getContext("2d");
                this.options.forEach((t, n) => {
                    let o = this.transformedData()[n], a = this.bSplineRender(o);
                    if (this.points = a, e ? this.lastPoint > (o[o.length - 1].xValue || 0) && (e = !0, this.lastData = o, this.lastMaxValue = this.maxValue, this.lastPoint = o[o.length - 1].xValue || 0, this.lastPointX = o[o.length - 1].x || 0, this.lastPointY = o[o.length - 1].y || 0) : (this.lastData = o, this.lastMaxValue = this.maxValue, this.lastPoint = o[o.length - 1].xValue || 0, this.lastPointX = o[o.length - 1].x || 0, this.lastPointY = o[o.length - 1].y || 0), i.setLineDash([]), !1 !== this.curTaskIsTryTask || e) {
                        if (!e && 0 === n) {
                            let e = [], t = [], n = {
                                0: {
                                    gradientColorEnd: "rgba(63,133,255,.1)",
                                    gradientColorStart: "rgba(63,133,255,.5)",
                                    lineColorEnd: "#3F85FF",
                                    lineColorStart: "#3F85FF"
                                },
                                1: {
                                    gradientColorEnd: "rgba(235,121,113,.1)",
                                    gradientColorStart: "rgba(240,134,127,.5)",
                                    lineColorEnd: "#eb7971",
                                    lineColorStart: "#eb7971"
                                },
                                2: {
                                    gradientColorEnd: "rgba(235,176,73,.1)",
                                    gradientColorStart: "rgba(235,176,73,.5)",
                                    lineColorEnd: "#ebb049",
                                    lineColorStart: "#ebb049"
                                }
                            }, o = this.transformedData()[0], a = this.bSplineRender(o);
                            Object.keys(this.historyVipSpeedColorMap || {}).forEach(i => {
                                let n = this.historyVipSpeedColorMap[i] || 0;
                                if ("1" === this.vipInfo.isVip && 0 === n && (n = 1), t[t.length - 1] !== n) {
                                    let a = o.find(e => e.xValue === +i);
                                    a && (e.push((a || {x: 0}).x), t.push(n))
                                }
                            });
                            for (let r = 0; r < e.length; r++) {
                                let s = [];
                                if (r === e.length - 1) s = a; else {
                                    let t = a.findIndex(t => t.x >= e[r + 1]);
                                    (s = a.splice(0, t - 1)).push(a[0])
                                }
                                i.setLineDash([]), this.drawLineAndGradient(i, o, n[t[r]].lineColorStart, n[t[r]].lineColorEnd, n[t[r]].gradientColorStart, n[t[r]].gradientColorEnd, 2, s)
                            }
                        }
                    } else this.drawLineAndGradient(i, o, this.userSpeedCurveColor.lineColorStart, this.userSpeedCurveColor.lineColorEnd, this.userSpeedCurveColor.gradientColorStart, this.userSpeedCurveColor.gradientColorEnd, 2, a)
                }), e && (this.requireAnimation = requestAnimationFrame(() => this.drawPoints(i, 0)))
            }
        }

        drawPoints(e, t) {
            if (!(t >= 60)) {
                if (t % (60 / this.frame) != 0) return t += 1, void (this.requireAnimation = requestAnimationFrame(() => this.drawPoints(e, t)));
                59 === t && (this.maxValue = this.lastMaxValue), this.options.forEach((i, n) => {
                    if (0 === t) {
                        this.maxValue = this.lastMaxValue;
                        let e = this.filteredData[0] ? [].concat(Object.values(Object.values(this.filteredData[0]))) : [];
                        this.historyMaxValue = this.getMaxValue(e.slice(0, e.length - 1));
                        let t = e[e.length - 1];
                        t <= this.historyMaxValue ? this.lastMaxValue > this.historyMaxValue ? this.maxValueIncrease = (this.historyMaxValue - this.lastMaxValue) / this.frame : this.maxValueIncrease = 0 : t > this.lastMaxValue && (this.maxValueIncrease = (t - this.lastMaxValue) / this.frame), this.lastMaxValue = this.getMaxValue(e)
                    }
                    this.maxValue += this.maxValueIncrease;
                    let o = Object.assign({}, this.filteredData[0]);
                    o[this.progress] = Math.min(o[this.progress], this.maxValue);
                    let a = this.transformData(o);
                    if (0 === a.length) return;
                    let r = a.length - 1;
                    0 === t ? (this.lastData = a.slice(0, r), this.lastPoint === a[r].xValue || 0 === r ? (this.xPoint = 0, this.lastData[r] = {
                        x: this.lastPointX,
                        y: this.lastPointY
                    }, this.yPoint = (a[r].y - this.lastPointY) / this.frame) : (this.xPoint = (a[r].x - a[r - 1].x) / this.frame, this.yPoint = (a[r].y - a[r - 1].y) / this.frame, this.lastData[r] = {
                        xValue: a[r - 1].xValue,
                        yValue: a[r - 1].yValue,
                        x: a[r - 1].x,
                        y: a[r - 1].y
                    }), this.lastPoint = a[r].xValue, this.lastPointX = a[r].x, this.lastPointY = a[r].y) : (a[r].x = this.lastData[r].x, a[r].y = this.lastData[r].y, this.lastData = a), this.lastData[r].x = this.lastData[r].x + this.xPoint, this.lastData[r].y = this.lastData[r].y + this.yPoint;
                    let s = this.bSplineRender(this.lastData);
                    if (this.clearCanvas(), !1 === this.curTaskIsTryTask) this.drawLineAndGradient(e, this.lastData, this.userSpeedCurveColor.lineColorStart, this.userSpeedCurveColor.lineColorEnd, this.userSpeedCurveColor.gradientColorStart, this.userSpeedCurveColor.gradientColorEnd, 2, s); else if (0 === n) {
                        let t = [], i = [], n = {
                            0: {
                                gradientColorEnd: "rgba(63,133,255,.1)",
                                gradientColorStart: "rgba(63,133,255,.5)",
                                lineColorEnd: "#3F85FF",
                                lineColorStart: "#3F85FF"
                            },
                            1: {
                                gradientColorEnd: "rgba(235,121,113,.1)",
                                gradientColorStart: "rgba(240,134,127,.5)",
                                lineColorEnd: "#eb7971",
                                lineColorStart: "#eb7971"
                            },
                            2: {
                                gradientColorEnd: "rgba(235,176,73,.1)",
                                gradientColorStart: "rgba(235,176,73,.5)",
                                lineColorEnd: "#ebb049",
                                lineColorStart: "#ebb049"
                            }
                        };
                        Object.keys(this.historyVipSpeedColorMap || {}).forEach(e => {
                            let n = this.historyVipSpeedColorMap[e] || 0;
                            if ("1" === this.vipInfo.isVip && 0 === n && (n = 1), i[i.length - 1] !== n) {
                                let o = this.lastData.find(t => t.xValue === +e);
                                o && (t.push((o || {x: 0}).x), i.push(n))
                            }
                        });
                        for (let o = 0; o < t.length; o++) {
                            let a = [];
                            if (o === t.length - 1) a = s; else {
                                let e = s.findIndex(e => e.x >= t[o + 1]);
                                (a = s.splice(0, e - 1)).push(s[0])
                            }
                            this.drawLineAndGradient(e, this.lastData, n[i[o]].lineColorStart, n[i[o]].lineColorEnd, n[i[o]].gradientColorStart, n[i[o]].gradientColorEnd, 2, a)
                        }
                    }
                }), t += 1, this.requireAnimation = requestAnimationFrame(() => this.drawPoints(e, t))
            }
        }

        transformData(e = {}) {
            return Object.keys(e).map(e => parseInt(e, 10)).sort((e, t) => e - t).map(t => ({
                xValue: t,
                yValue: parseInt(e[t], 10),
                x: this.width * t / 100,
                y: this.height * this.paddingTopPercent / 100 + this.height * (100 - this.paddingTopPercent - this.paddingBottomPercent) / 100 * (1 - parseInt(e[t], 10) / (this.maxValue || 1))
            }))
        }

        drawLineAndGradient(e, t, i, n, o, a, r, s) {
            if (!t.length || !s.length) return void (this.curveTop = 20);
            e.lineWidth = r * this.scale, e.beginPath(), e.moveTo((s[0] || t[0]).x, (s[0] || t[0]).y);
            let l = this.renderPath(e, s);
            s[l] ? (this.curveLeft = s[l].x / this.scale - 8, this.curveTop = s[l].y / this.scale + 10) : 0 === s.length && (this.curveLeft = 0, this.curveTop = this.height / this.scale);
            let d = e.createLinearGradient(0, 0, t[t.length - 1].x, 0);
            d.addColorStop(0, i), d.addColorStop(1, n), e.strokeStyle = d, e.stroke(), e.lineTo(s[l].x, this.height), e.lineTo(s[0].x, this.height), e.lineTo(s[0].x, s[0].y);
            let u = e.createLinearGradient(0, 0, 0, this.height);
            u.addColorStop(0, o), u.addColorStop(1, a), e.fillStyle = u, e.closePath(), e.fill()
        }

        drawLine(e, t, i, n, o, a) {
            if (!t.length) return;
            if (!a.length) return;
            e.lineWidth = o * this.scale, e.beginPath(), e.moveTo((a[0] || t[0]).x, (a[0] || t[0]).y), this.renderPath(e, a);
            let r = e.createLinearGradient(0, 0, t[t.length - 1].x, 0);
            r.addColorStop(0, i), r.addColorStop(1, n), e.strokeStyle = r, e.stroke()
        }

        drawGradient(e, t, i, n, o) {
            if (!t.length) return;
            if (!o.length) return;
            e.beginPath(), e.moveTo((o[0] || t[0]).x, (o[0] || t[0]).y);
            let a = this.renderPath(e, o);
            e.lineTo(o[a].x, this.height), e.lineTo(o[0].x, this.height), e.lineTo(o[0].x, o[0].y);
            let r = e.createLinearGradient(0, 0, 0, this.height);
            r.addColorStop(0, i), r.addColorStop(1, n), e.fillStyle = r, e.closePath(), e.fill()
        }

        renderPath(e, t) {
            if (0 === t.length) return 0;
            e.moveTo(t[0].x, t[0].y);
            let i = 0;
            for (let n = 1; n < t.length; n++) t[n] && (e.lineTo(t[n].x, t[n].y), i = n);
            return i
        }

        clearCanvas() {
            let e = this.$refs.dataChart;
            if (e && e.getContext) {
                e.getContext("2d").clearRect(0, 0, this.width, this.height)
            }
        }

        bSplineRender(e) {
            return new p.BSpline({
                degree: 3,
                points: e,
                tessellation: Math.round(this.width * this.progress / 100 * 1.5)
            }).curvePoints.map(([e, t]) => Object.freeze({x: e, y: t}))
        }

        initCanvas() {
            let e = this.$refs.dataChart;
            if (this.$refs.canvasBox) if (this.width = Math.floor(this.$refs.canvasBox.clientWidth) * this.scale, this.height = Math.floor(this.$refs.canvasBox.clientHeight - 40 - this.topMargin) * this.scale, e.setAttribute("width", this.width), e.setAttribute("height", this.height), this.userSpeedCurveColor = this.speedCurveColor, "" === this.curUserId) this.vipInfo = {}; else {
                if (this.vipInfo = y.LoginHelperNS.loginHelper.getVipInfo(), "0" === this.vipInfo.isVip) return;
                "3" === this.vipInfo.vasType || "2" === this.vipInfo.vasType ? this.userSpeedCurveColor = this.whiteVipSpeedCurveColor : "5" === this.vipInfo.vasType && (this.userSpeedCurveColor = this.superVipSpeedCurveColor)
            }
        }

        updateDownloadInfo() {
            if (0 === this.curTaskId) return;
            this.downloadSpeed = this.curTask.getDownloadSpeed(), this.vipSpeed = this.curTask.getVipSpeed(), this.maxSpeed = Math.max(this.maxSpeed, this.downloadSpeed);
            let e = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                t = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadingPeriod);
            t < 1 && (t = 1), this.downloadingPeriod = t, this.avgSpeed = Math.round(e / t), this.avgSpeed > this.maxSpeed && (this.maxSpeed = this.avgSpeed);
            let i = this.curTask.getTaskStatus();
            if (i === s.DownloadKernel.TaskStatus.Succeeded || i === s.DownloadKernel.TaskStatus.Seeding) this.progress = 100; else {
                let t = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize);
                if (0 !== t && (this.progress = e / t * 100, this.progress = Math.floor(this.progress), this.progress > 100 ? this.progress = 100 : this.progress < 0 && (this.progress = 0)), this.downloadSpeed > 0 && t > 0) {
                    let i = "--:--:--", n = t - e;
                    if (n > 0) {
                        let e = n / this.downloadSpeed;
                        i = h.TimeHelperNS.formatSeconds(e)
                    }
                    this.remain = i
                }
            }
            if (this.srcUsing = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.SrcUsing), this.srcTotal = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.SrcTotal), r.isNullOrUndefined(this.taskSpeedInfo) || !this.taskSpeedInfo.historySpeedMap) return;
            100 === this.progress && this.taskSpeedInfo.historySpeedMap[this.progress] || (this.taskSpeedInfo.historySpeedMap[this.progress] = this.downloadSpeed);
            let n = Object.keys(this.taskSpeedInfo.historySpeedMap);
            for (let e = n.length - 1; e >= 0 && Number(n[e]) > this.progress; e--) delete this.taskSpeedInfo.historySpeedMap[Number(n[e])];
            this.updateOptions()
        }

        updateTaskInfo(...e) {
            do {
                if (!e) break;
                if (!e[1]) break;
                let t = e[1];
                for (let e = 0; e < t.length; ++e) {
                    let i = t[e];
                    if (i && i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId) === this.curTaskId) {
                        this.updateDownloadInfo(), this.$nextTick(() => this.draw());
                        break
                    }
                }
            } while (0)
        }

        onResize() {
            this.lastPoint = 0, this.initCanvas(), this.draw(!1)
        }

        judgeCurTaskIsTryTask(e) {
            this.checkHaveTry()
        }

        getHistoryVipSpeedColor() {
            return o(this, void 0, void 0, function* () {
                if (0 === this.curTaskId) return;
                let e = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                    t = this.curTask.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize),
                    i = this.curTask.getTaskStatus(), n = 0;
                0 !== t && 0 !== e && (n = i === s.DownloadKernel.TaskStatus.Succeeded || i === s.DownloadKernel.TaskStatus.Seeding || e >= t ? 100 : Math.floor(e / t * 100));
                let o = yield this.getHistorySpeedInfo(this.curTaskId, n);
                this.historyVipSpeedColorMap = o.historyVipSpeedColorMap, this.judgeCurTaskIsTryTask(this.historyVipSpeedColorMap)
            })
        }

        init() {
            return o(this, void 0, void 0, function* () {
                this.eventOnTaskDetailChange = A.attachTaskEvent(s.DownloadKernel.TaskEventType.DetailChanged, (...e) => o(this, void 0, void 0, function* () {
                    !e || e.length < 3 || 0 == (e[2] & s.DownloadKernel.TaskDetailChangedFlags.UserRead) && 0 == (e[2] & s.DownloadKernel.TaskDetailChangedFlags.PlayPosition) && (yield this.getHistoryVipSpeedColor(), this.updateTaskInfo(...e))
                })), this.eventOnInsertToCategoryView = A.attachTaskEvent(s.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                    if (e && e[0] === s.DownloadKernel.TaskEventType.InsertToCategoryView && e[1] && e[2] && e[3]) {
                        x.information("eventOnInsertToCategoryView", e[2]);
                        for (let t of e[3]) if (t && t.taskId === this.curTaskId) {
                            x.information("eventOnInsertToCategoryView call", e[2], this.curTaskId), this.onTaskChange();
                            break
                        }
                    }
                }), this.initCanvas(), window.addEventListener("resize", this.onResize), this.curveTop = this.height / this.scale
            })
        }

        uninit() {
            A.detachTaskEvent(s.DownloadKernel.TaskEventType.DetailChanged, this.eventOnTaskDetailChange), A.detachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, this.eventOnTaskStatusChange), A.detachTaskEvent(s.DownloadKernel.TaskEventType.InsertToCategoryView, this.eventOnInsertToCategoryView), window.removeEventListener("resize", this.onResize)
        }

        getHistorySpeedInfo(e, t) {
            return o(this, void 0, void 0, function* () {
                let i = {maxSpeed: 0, historySpeedMap: {}, historyIncreaseSpeedMap: {}},
                    n = yield f.HistoryTaskSpeedInfoNS.getTaskSpeedInfo(e);
                do {
                    if (!n) break;
                    if (!n.maxSpeed || n.maxSpeed < 0) break;
                    i.maxSpeed = n.maxSpeed;
                    let e = n.speedInfoMap;
                    if (!e) break;
                    void 0 === t && (t = 0), (!(t = parseInt(t.toString(), 10)) || t < 0) && (t = 0), t > 100 && (t = 100);
                    let o = {0: 0}, a = {0: 0}, r = {};
                    for (let i in e) if (void 0 !== e[i]) {
                        let n = parseInt(i, 10);
                        if (n <= t) {
                            let t = e[i];
                            o[n] = t.downloadSpeed, a[n] = t.addSpeed, r[n] = t.vipSpeedColor
                        }
                    }
                    i.historySpeedMap = o || {}, i.historyIncreaseSpeedMap = a || {}, i.historyVipSpeedColorMap = r || {}
                } while (0);
                return i
            })
        }

        mounted() {
            I.default.isInitedAW().then(() => {
                let e = I.default.getConfigValue("main", "task-detail", null);
                x.information("remote config: ", JSON.stringify(e)), e && e.TaskChart && (this.taskChartRemoteConfig = e.TaskChart)
            }).catch()
        }
    };
    n([g.Prop()], E.prototype, "currentCategoryId", void 0), n([g.Prop()], E.prototype, "currentCategoryViewId", void 0), n([g.Prop({default: 8})], E.prototype, "paddingTopPercent", void 0), n([g.Prop({default: 0})], E.prototype, "paddingBottomPercent", void 0), n([g.Prop({default: Math.max(window.devicePixelRatio, 2)})], E.prototype, "scale", void 0), n([g.Prop({default: 1})], E.prototype, "step", void 0), n([g.Prop({default: 21})], E.prototype, "topMargin", void 0), n([g.Prop({default: 0})], E.prototype, "curTaskId", void 0), n([g.Prop({default: ""})], E.prototype, "curUserId", void 0), n([g.Prop()], E.prototype, "activeKey", void 0), n([g.Prop()], E.prototype, "checkedTaskNum", void 0), n([g.Prop()], E.prototype, "completeTaskNum", void 0), n([g.Prop()], E.prototype, "curTaskBase", void 0), n([g.Watch("activeKey", {immediate: !0})], E.prototype, "onActiveKeyChange", null), n([g.Prop()], E.prototype, "vipSpeedInfo", void 0), n([g.Watch("vipTaskInfo")], E.prototype, "onVipTaskInfoChange", null), n([g.Watch("curUserId")], E.prototype, "onCurUserIdChange", null), n([g.Watch("curTaskId", {immediate: !0})], E.prototype, "onTaskChange", null), E = n([g.Component], E), t.default = E
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(262), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let a = class extends o.Vue {
        mounted() {
        }
    };
    n([o.Prop({default: ""})], a.prototype, "curTaskName", void 0), a = n([o.Component], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(264), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(19), s = i(34), l = i(4), d = i(11), u = i(3), c = i(15), h = i(64), f = i(23), p = i(102),
        g = i(9), m = i(8), v = i(0).default.getLogger("dltab_detail_detail"),
        y = d.DownloadKernelTaskManager.getTaskManager();
    let T = class extends a.Vue {
        constructor() {
            super(...arguments), this.showMore = !1, this.taskName = "", this.files = [], this.taskType = void 0, this.fileSize = 0, this.savePath = "", this.url = "", this.refUrl = "", this.signatureCode = "", this.createTime = "", this.downloadTime = 0, this.downloadTimeStr = "00:00:00", this.description = "", this.copyCodeSuccess = !1, this.serverModule = c.server, this.panFreeSpace = -1, this.panSavePathId = "", this.panFileId = "", this.panTaskId = "", this.panTaskData = {}, this.client = u.client, this.panTaskProgress = 100, this.saveStatus = w.pending, this.timeoutGetProcess = void 0, this.mediaType = "other", this.curTaskBase = {}, this.tracked = !1, this.panTaskType = 0
        }

        onTaskChange() {
            return o(this, void 0, void 0, function* () {
                if (v.information("XlDetail onTaskChange "), this.showMore = !1, clearTimeout(this.timeoutGetProcess), this.init(), 0 !== this.curTaskId) {
                    let e = y.getTaskFromTaskId(this.curTaskId);
                    this.curTaskBase = e.getTaskBaseInfo()
                }
                this.panTaskProgress = 100, this.saveStatus = w.complete, "" === this.curUserId ? (this.panTaskId = "", this.panSavePathId = "", this.panTaskData = {}, this.panFileId = "", this.getPanTaskType()) : this.queryTaskAndUpdate()
            })
        }

        onUserChange() {
            return o(this, void 0, void 0, function* () {
                clearTimeout(this.timeoutGetProcess), "" !== this.curUserId ? (this.refleshFreeSpace(!1), this.queryTaskAndUpdate()) : (this.panTaskId = "", this.panSavePathId = "", this.panTaskData = {}, this.panFileId = "", this.panFreeSpace = -1, this.panTaskProgress = 100, this.saveStatus = w.complete, this.getPanTaskType())
            })
        }

        onPanFileIdChange() {
            return o(this, void 0, void 0, function* () {
                if ("" !== this.panFileId) {
                    let e = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetFiles", [this.panFileId]);
                    e && e[0] && e[0].files.length > 0 && (this.mediaType = this.checkMediaType(e[0].files[0].file_extension), this.$nextTick(() => {
                        if (5 === this.panTaskType) {
                            let e = "";
                            e = this.isSupportPlay ? "play" : "look", this.statShow("show", e)
                        }
                    }))
                }
            })
        }

        get isYunGetBackTask() {
            return !(!this.curTaskBase || -1 === this.curTaskBase.categoryId || -1 !== this.currentCategoryId)
        }

        get isSupportPlay() {
            return "other" !== this.mediaType
        }

        queryTaskAndUpdate() {
            return o(this, void 0, void 0, function* () {
                let e = this.task && this.task.getType(), t = this.curTaskId;
                if (e === l.DownloadKernel.TaskType.Group) {
                    let e = yield p.ThunderPanTaskNS.queryTask(this.curTaskId, this.curUserId);
                    return void (t === this.curTaskId && this.updateGrouptask(e))
                }
                let i = yield p.ThunderPanTaskNS.queryTask(this.curTaskId, this.curUserId);
                if (t === this.curTaskId) {
                    if (i) {
                        if (v.information("### query task", i), i.length > 0 && (i = i[0]), i.FileId) {
                            let e = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetParentDirectoryPathById", {id: i.FileId});
                            if (t !== this.curTaskId) return void v.warning("queryTaskAndUpdate task changed", this.curTaskId, t);
                            if (v.information("### IpcGetParentDirectoryPathById", e), e && e[0] && "success" === e[0].status && e[0].path.length > 0) {
                                let t = "", n = "";
                                for (let i of e[0].path) t += "\\" + i.id, n += "\\" + i.title;
                                let o = JSON.parse(i.Data), a = {};
                                o.title !== n ? (a = Object.assign(o, {
                                    id: t.slice(1),
                                    title: n.slice(1)
                                }), p.ThunderPanTaskNS.updateTaskPath(i.FileId, JSON.stringify(a))) : a = o, this.panTaskData = a
                            } else if (null !== e[0] || null !== e[1]) {
                                if (!i.PanTaskId) return v.warning("### delete task", i, e), p.ThunderPanTaskNS.deleteTask(null, i.FileId), this.panTaskId = "", this.panSavePathId = "", this.panTaskData = {}, this.panFileId = "", void this.getPanTaskType();
                                p.ThunderPanTaskNS.updateTaskFileId(i.PanTaskId, ""), i.FileId = ""
                            }
                        }
                        return this.panTaskId = i.PanTaskId, this.panSavePathId = i.PathId, this.panFileId = i.FileId, this.panTaskData = JSON.parse(i.Data), this.getPanTaskProgress(), void this.getPanTaskType()
                    }
                    this.panTaskId = "", this.panSavePathId = "", this.panTaskData = {}, this.panFileId = "", this.getPanTaskType()
                } else v.warning("queryTaskAndUpdate task changed", this.curTaskId, t)
            })
        }

        onTaskStatusChange() {
            v.information("XlDetail onTaskStatusChange "), this.taskDownloadingInteval && clearInterval(this.taskDownloadingInteval), this.curTaskStatus === l.DownloadKernel.TaskStatus.Started && (this.taskDownloadingInteval = setInterval(() => {
                this.downloadTime += 1, this.downloadTimeStr = h.TimeHelperNS.formatSeconds(this.downloadTime)
            }, 1e3))
        }

        getPanTaskType() {
            "" === this.curUserId && this.curTaskStatus !== l.DownloadKernel.TaskStatus.Failed ? this.panTaskType = 1 : this.panTaskId || this.panFileId || 9 !== this.curTaskStatus ? this.panTaskId || this.panFileId || !(-1 === this.panFreeSpace || this.panFreeSpace >= this.fileSize) ? -1 !== this.panFreeSpace && this.panFreeSpace < this.fileSize ? this.panTaskType = 4 : (this.panTaskId || this.panFileId) && (this.panTaskType = 5) : this.panTaskType = 3 : this.panTaskType = 2
        }

        onPanTaskTypeChange(e, t) {
            e === t && void 0 !== e || (this.$nextTick(() => o(this, void 0, void 0, function* () {
                let e = "";
                1 === this.panTaskType ? e = "receive" : 2 === this.panTaskType ? e = "unsave" : 3 === this.panTaskType ? e = "save" : 4 === this.panTaskType && (e = "refresh"), e && this.statShow("show", e)
            })), c.server.fireClientEvent("OnPanTaskTypeChange", this.panTaskType))
        }

        onPanTaskDataChange() {
            c.server.fireClientEvent("OnPanTaskDataChange", this.panTaskData)
        }

        onSaveStatusChange() {
            c.server.fireClientEvent("UpdateSaveStatus", this.saveStatus)
        }

        showLoginWnd() {
            f.LoginHelperNS.loginHelper.showLoginDlg("TaskDetail"), this.statShow("click", "receive")
        }

        onClickPath() {
            return o(this, void 0, void 0, function* () {
                "" !== this.curUserId && this.curUserId ? (this.$emit("switchNav", "pan-plugin-view"), yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcRedirectCurrentDirectoryById", {id: this.panFileId})) : yield f.LoginHelperNS.loginHelper.showLoginDlg("download_left_panel")
            })
        }

        consumePanTask(e, t, ...i) {
            return o(this, void 0, void 0, function* () {
                if ("0" === this.curUserId || "" === this.curUserId) return void f.LoginHelperNS.loginHelper.showLoginDlg("TaskDetail");
                let e = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetParentDirectoryPathById", {id: this.panFileId});
                if (e && null !== e[2] && void 0 !== e[2]) return clearTimeout(this.timeoutGetProcess), this.task.getType() === l.DownloadKernel.TaskType.Group ? yield this.queryTaskAndUpdate() : (p.ThunderPanTaskNS.deleteTask(null, this.panFileId), this.reinit()), void this.getPanTaskType();
                let n = !1;
                if (i && void 0 !== i[0] && (n = i[0]), this.isSupportPlay) {
                    let e = this.task.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName).split("."),
                        i = e[e.length - 1];
                    t ? n || g.XLStatNS.trackEvent("pc_yunpan", "yunpan_consumption_click", "", 0, 0, 0, 0, `from=download_left_hanging_note,filetype=${this.mediaType},suffix=${i}`) : g.XLStatNS.trackEvent("pc_yunpan", "yunpan_consumption_click", "", 0, 0, 0, 0, `from=download_right_detail_play_click,filetype=${this.mediaType},suffix=${i}`);
                    let o = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "ShowFileDetail", {
                        fileId: this.panFileId,
                        isPlayInstantly: this.isSupportPlay && !n,
                        redirect: !0,
                        mode: "panel",
                        playFrom: "download_detail_yunpan_click"
                    });
                    if (o && o[0] && o[0].audit) {
                        let e = o[0].audit.status, t = o[0].audit.title;
                        "STATUS_OK" !== e && t && this.$message({message: t, type: "error", position: "middle"})
                    }
                } else this.$emit("switchNav", "pan-plugin-view"), this.task && this.task.getType() === l.DownloadKernel.TaskType.Group ? c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcRedirectCurrentDirectoryById", {id: this.panFileId}) : c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcRedirectCurrentDirectory", {
                    selectFileIdList: [this.panFileId],
                    titleList: this.panTaskData.title.split("\\"),
                    idList: this.panTaskData.id.split("\\")
                });
                t || this.statShow("click", this.isSupportPlay ? "play" : "look")
            })
        }

        getPanTaskProgress() {
            return o(this, void 0, void 0, function* () {
                if (!this.panTaskId) return this.saveStatus = w.complete, void (this.panTaskProgress = 100);
                let e = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetSingleUrlTask", this.panTaskId);
                if (v.information("### getPanTaskProgress", this.panTaskId, e, this.panFileId, this.panTaskProgress), e && null === e[0] && null === e[1]) this.timeoutGetProcess = setTimeout(this.getPanTaskProgress, 3e3); else {
                    if (!e || !e[0] && e[2]) return this.panFileId && (yield this.checkPanFileExist(this.panFileId)) ? (p.ThunderPanTaskNS.updateTaskFileId("", this.panFileId), this.panTaskId = "") : (p.ThunderPanTaskNS.deleteTask(this.panTaskId), this.reinit()), this.panTaskProgress = 100, this.saveStatus = w.complete, void this.getPanTaskType();
                    if (this.saveStatus = e[0].phase, this.saveStatus === w.error) return this.panFileId && p.ThunderPanTaskNS.updateTaskFileId(this.panTaskId, ""), this.panTaskId = "", this.panSavePathId = "", this.panTaskData = {}, this.panFileId = "", void this.getPanTaskType();
                    "" === e[0].file_id || this.panFileId || (this.panFileId = e[0].file_id, p.ThunderPanTaskNS.updateTaskFileId(this.panTaskId, this.panFileId)), e[0].phase !== w.complete ? (100 === e[0].progress ? this.panTaskProgress = 99 : this.panTaskProgress = e[0].progress, clearTimeout(this.timeoutGetProcess), this.timeoutGetProcess = setTimeout(this.getPanTaskProgress, 3e3)) : (this.panTaskProgress = 100, (yield this.checkPanFileExist(this.panFileId)) ? (p.ThunderPanTaskNS.updateTaskFileId("", this.panFileId), this.panTaskId = "") : (p.ThunderPanTaskNS.deleteTask(null, this.panFileId), this.reinit()), this.onPanFileIdChange()), this.getPanTaskType()
                }
            })
        }

        reinit() {
            this.panTaskId = "", this.panSavePathId = "", this.panTaskData = {}, this.panFileId = "", this.saveStatus = w.complete, this.panTaskProgress = 100
        }

        checkPanFileExist(e) {
            return o(this, void 0, void 0, function* () {
                let e = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetParentDirectoryPathById", {id: this.panFileId});
                return !e || null === e[2] || void 0 === e[2]
            })
        }

        onPanTaskProgressChange() {
            c.server.fireClientEvent("OnPanTaskUploadProgressChange", this.panTaskProgress)
        }

        clickSave(e, ...t) {
            return o(this, void 0, void 0, function* () {
                if (e || this.statShow("click", "save"), yield this.refleshFreeSpace(!1), this.panFreeSpace < this.fileSize) return;
                if (yield this.selectPanPath(), !this.panTaskData || !this.panTaskData.title) return;
                let t;
                if (this.task && this.task.getType() === l.DownloadKernel.TaskType.Group) {
                    let e = [], i = this.task.getExtraObject(), n = i.getSubTaskCount();
                    for (let t = 0; t < n; ++t) {
                        let n = i.getSubTaskByIndex(t);
                        n && e.push({
                            searchFrom: "",
                            url: n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskUrl),
                            name: n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName),
                            path: this.panTaskData.title,
                            parentId: this.panSavePathId,
                            files: [],
                            from: "download_detail"
                        })
                    }
                    if (!(t = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcAddUrlTaskGroup", {
                        groupName: this.taskName,
                        urlTasks: e
                    })) || !t[0]) return void v.warning("wrong result");
                    for (let e of t[0]) e.task && p.ThunderPanTaskNS.insertTask(this.curTaskId, e.task.id, this.curUserId, JSON.stringify(this.panTaskData));
                    let o = yield p.ThunderPanTaskNS.queryTask(this.curTaskId, this.curUserId);
                    this.updateGrouptask(o)
                } else {
                    if (!((t = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcBatchAddUrlsToDrive", [{
                        name: this.taskName,
                        url: this.url || "magnet:?xt=urn:btih:" + this.signatureCode,
                        parentId: this.panSavePathId,
                        files: [...this.files],
                        path: this.panTaskData.title,
                        from: "download_detail"
                    }])) && t[0] && t[0][0] && t[0][0].task)) return void v.warning("wrong result");
                    this.panTaskId = t[0][0].task.id, p.ThunderPanTaskNS.insertTask(this.curTaskId, this.panTaskId, this.curUserId, JSON.stringify(this.panTaskData))
                }
            })
        }

        selectPanPath() {
            return o(this, void 0, void 0, function* () {
                let e = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcTreePath", {});
                if (!e || !e[0] || e[0].error) return;
                this.panSavePathId = e[0].parentId;
                let t = "", i = "";
                for (let n of e[0].path) t += "\\" + n.title, i += "\\" + n.id;
                this.panTaskData = {id: i.slice(1), title: t.slice(1)}
            })
        }

        refleshFreeSpace(e = !0) {
            return o(this, void 0, void 0, function* () {
                let t = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetDriveInfo");
                t && t[0] && (this.panFreeSpace = t[0].limit - t[0].usage, e && this.statShow("click", "reflesh"))
            })
        }

        handleShow() {
            return o(this, void 0, void 0, function* () {
                this.showMore ? (this.showMore = !1, this.statShow("click", "fold")) : (this.showMore = !0, this.statShow("click", "unfold"))
            })
        }

        setDescription() {
            if (!this.description) return;
            y.getTaskFromTaskId(this.curTaskId).setDescription(this.description)
        }

        copyLink(e, t = "url") {
            r.clipboard.writeText(e), this.statShow("click", "copy_link"), this.$message({
                message: "复制成功",
                type: "success",
                position: "middle"
            })
        }

        openUrl() {
            u.client.callServerFunction("OpenNewTab", this.refUrl).catch()
        }

        openDir() {
            return o(this, void 0, void 0, function* () {
                (yield m.FileSystemAWNS.dirExistsAW(this.savePath)) ? s.TaskOperatorNs.openTaskFolder(this.task.getTaskBaseInfo(), !0).catch() : this.$message({
                    message: "文件目录不存在",
                    type: "warning",
                    position: "middle"
                }), this.statShow("click", "open_folder")
            })
        }

        checkMediaType(e) {
            const t = e.toLocaleLowerCase();
            return [".asf", ".mpg", ".rmvb", ".rm", ".wmv", ".avi", ".mp4", ".mpeg", ".mkv", ".mov", ".ts", ".flv", ".3gp"].includes(t) ? "video" : "other"
        }

        init() {
            if (this.taskDownloadingInteval && clearInterval(this.taskDownloadingInteval), 0 !== this.curTaskId) {
                if (this.task = y.getTaskFromTaskId(this.curTaskId), this.taskName = this.task.getTaskName(), this.taskType = this.task && this.task.getType(), this.fileSize = this.task.getTaskAttribute(l.DownloadKernel.TaskAttribute.FileSize), this.files = [], this.taskType === l.DownloadKernel.TaskType.Bt) {
                    let e = [], t = this.task.getExtraObject().getBtFileList();
                    for (let [, i]of t) i.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.Download) && e.push(String(i.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.RealIndex)));
                    this.files = e
                }
                this.savePath = this.task.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath), this.refUrl = this.task.getTaskAttribute(l.DownloadKernel.TaskAttribute.RefUrl), this.url = this.task.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskUrl), this.task.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskType) === l.DownloadKernel.TaskType.Bt ? this.signatureCode = this.task.getExtraObject().getInfoId() : this.signatureCode = "", this.createTime = h.TimeHelperNS.formatDate(new Date(this.task.getTaskAttribute(l.DownloadKernel.TaskAttribute.CreateTime)), "yyyy-MM-dd hh:mm:ss"), this.downloadTime = this.task.getTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadingPeriod), this.downloadTimeStr = h.TimeHelperNS.formatSeconds(this.downloadTime), this.task.getTaskStatus() === l.DownloadKernel.TaskStatus.Started && (this.taskDownloadingInteval = setInterval(() => {
                    this.downloadTime += 1, this.downloadTimeStr = h.TimeHelperNS.formatSeconds(this.downloadTime)
                }, 1e3)), this.description = this.task.getTaskBaseInfo().description, this.url && this.statShow("show", "copy_link"), this.tracked = !1, setTimeout(() => {
                    this.tracked || this.onPanTaskTypeChange()
                }, 50)
            } else this.files = []
        }

        updateGrouptask(e) {
            return o(this, void 0, void 0, function* () {
                if (this.panTaskProgress = 100, this.saveStatus = w.complete, !e) return this.panTaskId = "", this.panSavePathId = "", this.panTaskData = {}, this.panFileId = "", void this.getPanTaskType();
                e.hasOwnProperty("length") || (e = [e]);
                let t = "", i = !0, n = {};
                for (let o of e) if (o) if (o.FileId) {
                    if ("" === t) {
                        let e = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetParentDirectoryPathById", {id: o.FileId});
                        if (e && e[0] && "success" === e[0].status && e[0].path.length > 0) {
                            let i = "", a = "";
                            for (let t of e[0].path) i += "\\" + t.id, a += "\\" + t.title;
                            let r = JSON.parse(o.Data);
                            r.title !== a ? (n = Object.assign(r, {
                                id: i.slice(1),
                                title: a.slice(1)
                            }), p.ThunderPanTaskNS.updateTaskPath(o.FileId, JSON.stringify(n))) : n = r, t = o.FileId, this.saveStatus = w.complete, this.panFileId = o.FileId, this.panTaskData = n
                        } else null === e[0] && null === e[1] || (v.warning("### delete task", o, e), p.ThunderPanTaskNS.deleteTask(null, o.FileId))
                    }
                } else o.PanTaskId && (this.updatePanTask(o.PanTaskId).catch(), i = !1);
                "" === t && i && (this.panTaskId = "", this.panSavePathId = "", this.panTaskData = {}, this.panFileId = ""), this.getPanTaskType()
            })
        }

        updatePanTask(e) {
            return o(this, void 0, void 0, function* () {
                let t = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetSingleUrlTask", e);
                if (t && t[0] && t[0].phase !== w.error) {
                    if ("" !== t[0].file_id) {
                        let i = t[0].file_id;
                        p.ThunderPanTaskNS.updateTaskFileId(e, i), this.panFileId || (this.panFileId = i, this.panTaskId = e)
                    } else this.panTaskId || (this.panTaskId = e, this.getPanTaskProgress().catch());
                    this.getPanTaskType()
                } else p.ThunderPanTaskNS.deleteTask(this.panTaskId)
            })
        }

        savePlay(e, t, ...i) {
            return o(this, void 0, void 0, function* () {
                if ("" === this.curUserId || !this.curUserId) return void (yield f.LoginHelperNS.loginHelper.showLoginDlg("download_left_panel"));
                let e, t = !0;
                if (i && void 0 !== i[0] && (t = i[0]), yield this.refleshFreeSpace(!1), !(this.panFreeSpace < this.fileSize)) if (this.panSavePathId = "", this.panTaskData = {
                    title: "我的云盘",
                    id: ""
                }, this.task && this.task.getType() === l.DownloadKernel.TaskType.Group) {
                    let t = [], i = this.task.getExtraObject(), n = i.getSubTaskCount();
                    for (let e = 0; e < n; ++e) {
                        let n = i.getSubTaskByIndex(e);
                        n && t.push({
                            searchFrom: "",
                            url: n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskUrl),
                            name: n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName),
                            path: this.panTaskData.title,
                            parentId: this.panSavePathId,
                            files: [],
                            from: "download/left/hanging_note"
                        })
                    }
                    if (!(e = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcAddUrlTaskGroup", {
                        groupName: this.taskName,
                        urlTasks: t
                    })) || !e[0]) return void v.warning("wrong result");
                    for (let t of e[0]) t.task && p.ThunderPanTaskNS.insertTask(this.curTaskId, t.task.id, this.curUserId, JSON.stringify(this.panTaskData));
                    let o = yield p.ThunderPanTaskNS.queryTask(this.curTaskId, this.curUserId);
                    this.updateGrouptask(o)
                } else {
                    if (!((e = yield c.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcBatchAddUrlsToDrive", [{
                        name: this.taskName,
                        url: this.url || "magnet:?xt=urn:btih:" + this.signatureCode,
                        parentId: this.panSavePathId,
                        files: [...this.files],
                        path: this.panTaskData.title,
                        from: "download/left/hanging_note",
                        play: t,
                        playFrom: "download_left_panel"
                    }])) && e[0] && e[0][0] && e[0][0].task)) return void v.warning("wrong result");
                    this.panTaskId = e[0][0].task.id, p.ThunderPanTaskNS.insertTask(this.curTaskId, this.panTaskId, this.curUserId, JSON.stringify(this.panTaskData))
                }
            })
        }

        mounted() {
            v.information("XlDetail mounted"), u.client.attachServerEvent("OnInsertThunderPanTask", (e, t, i, n) => {
                this.queryTaskAndUpdate()
            }), c.server.registerFunctions({
                DetailSaveTask: this.savePlay.bind(this),
                DetailShowFileDetail: this.consumePanTask.bind(this),
                DetailClickPath: this.onClickPath.bind(this)
            })
        }

        beforeDestroy() {
            clearTimeout(this.timeoutGetProcess), this.taskDownloadingInteval && clearInterval(this.taskDownloadingInteval)
        }

        statShow(e, t) {
            let i;
            i = "show" === e ? "btn_type=" : "clickid=", i += t, i += ",current_tab=" + this.curCategroyViewID, g.XLStatNS.trackEvent("download_detail", "dl_detail_yunpan_save_module_" + e, "", 0, 0, 0, 0, i)
        }
    };
    var w;
    n([a.Prop()], T.prototype, "currentCategoryId", void 0), n([a.Prop({default: -1})], T.prototype, "curTaskId", void 0), n([a.Prop({})], T.prototype, "curTaskStatus", void 0), n([a.Prop()], T.prototype, "curCategroyViewID", void 0), n([a.Prop({default: ""})], T.prototype, "curUserId", void 0), n([a.Watch("curTaskId", {immediate: !0})], T.prototype, "onTaskChange", null), n([a.Watch("curUserId")], T.prototype, "onUserChange", null), n([a.Watch("panFileId", {immediate: !0})], T.prototype, "onPanFileIdChange", null), n([a.Watch("curTaskStatus", {immediate: !0})], T.prototype, "onTaskStatusChange", null), n([a.Watch("panTaskType")], T.prototype, "onPanTaskTypeChange", null), n([a.Watch("panTaskData")], T.prototype, "onPanTaskDataChange", null), n([a.Watch("saveStatus")], T.prototype, "onSaveStatusChange", null), n([a.Watch("panTaskProgress")], T.prototype, "onPanTaskProgressChange", null), T = n([a.Component], T), t.default = T, function (e) {
        e.pending = "PHASE_TYPE_PENDING", e.running = "PHASE_TYPE_RUNNING", e.error = "PHASE_TYPE_ERROR", e.complete = "PHASE_TYPE_COMPLETE"
    }(w || (w = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(266), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(849), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {},
        mapCommitToProps: {setCurrentGuide: "SET_CURRENT_GUIDE"},
        mapDispatchToProps: {},
        mapGettersToProps: {currentGuide: e => e.CurrentGuide}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(268), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(4), s = i(11), l = i(16), d = i(59), u = i(8), c = i(51), h = i(2), f = i(14), p = i(0),
        g = i(3), m = i(37), v = i(9), y = i(43), T = i(46), w = p.default.getLogger("task-detail-FileList"),
        k = l.DownloadKernelEventManager.getEventManager(), C = s.DownloadKernelTaskManager.getTaskManager(),
        b = (e, t) => e === t ? 0 : e < t ? -1 : 1;
    let I = class extends a.Vue {
        constructor() {
            super(...arguments), this.curTask = {}, this.eventBtSubFileDetailChanged = -1, this.eventGroupTaskSubFileDetailChanged = -1, this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [], this.disabledKeys = [], this.editingSelected = !1, this.checkedKeys = [], this.defaultCheckedKeys = [], this.originCheckedKeys = [], this.editingExpanded = [], this.expandedKeys = [], this.defaultExpandedKeys = [], this.selectedFailedSubFile = !1, this.selectedFileIndex = "", this.loading = !1, this.eventPlayBtOrGroupTask = -1, this.isAllSelectedAndFinished = !1, this.isSingle = !1, this.columns = [{
                label: "文件名称",
                prop: "name",
                sortable: !0,
                sorter: (e, t) => b(e.type, t.type) || b(e.data.fileName.toLowerCase(), t.data.fileName.toLowerCase())
            }, {
                label: "大小",
                prop: "fileSize",
                width: 78,
                sortable: !0,
                sorter: (e, t) => b(e.type, t.type) || b(e.data.fileSize, t.data.fileSize)
            }, {
                label: "进度",
                prop: "progress",
                width: 78,
                sortable: !0,
                sorter: (e, t) => b(e.type, t.type) || b(this.getProgress(e), this.getProgress(t))
            }]
        }

        onCurTaskChange() {
            w.information("onCurTaskChange"), 0 === this.curTaskId ? this.uninit() : (this.init(), v.XLStatNS.trackEvent("download_detail", "dl_detail_bt_filelist_show", "", 0, 0, 0, 0, "current_tab=" + this.currentTab))
        }

        get currentTab() {
            let e = this.curCategroyViewID;
            return -1 !== this.currentCategoryId && (e = "Private_Space"), e
        }

        get checkedKeysCache() {
            return this.checkedKeys.reduce((e, t) => (e[t] = !0, e), {})
        }

        get taskType() {
            return this.curTask.taskType
        }

        get selectedFailedSubFileRetryDownload() {
            let e = T(this.curTask, "status");
            return e = e ? parseInt(e, 10) : 0, !!(this.selectedFailedSubFile && e >= 7 && e <= 10)
        }

        isDisabled(e) {
            let t = !1;
            if ("leaf" === e.type) if (e.data.isSupportPlay) {
                if (this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Recycle && this.$refs.table.status[e.key].checked) return !0
            } else this.$refs.table.status[e.key].checked && (t = !this.isComplete(e));
            return t
        }

        isUnread(e) {
            return "leaf" === e.type && !e.data.userRead && e.data.isSupportPlay && this.isComplete(e)
        }

        onClickName(e) {
            let t = this.$refs.table.status[e.key];
            (t.checked || t.indeterminate) && (e.data.errMessage || ("branch" === e.type ? (this.$refs.table.expand(e.key), v.XLStatNS.trackEvent("download_detail", "dl_detail_bt_filelist_folder_click", "", 0, 0, 0, 0, "current_tab=" + this.currentTab + ",click_id=file_name")) : "leaf" === e.type && this.curCategroyViewID !== r.DownloadKernel.CategroyViewID.Recycle && (e.data.isSupportPlay ? this.playFile(e) : this.isComplete(e) && this.openFile(e))))
        }

        haveSelectItem(e) {
            let t = !1;
            if ("branch" === e.type) for (let i of e.children) {
                if (!0 === t) return !0;
                t = this.haveSelectItem(i)
            } else t = -1 !== this.checkedKeys.indexOf(e.key);
            return t
        }

        formatSize(e) {
            return f.ThunderUtil.formatSize(e)
        }

        rowIcon(e) {
            if (!e) return "xly-type-unknown";
            let t = this.getHoverClass(e);
            return "leaf" !== e.type ? "xly-type-group" : t + m.TaskUtilHelper.getTaskIcon(e.name, void 0, "xly-type-")
        }

        getHoverClass(e) {
            let t = this.isActive(e) ? "is-active " : "";
            if (!t) {
                let i = this.$refs.table.status[e.key];
                i.checked || i.indeterminate || (t = "is-disabled ")
            }
            return this.$set(e.data, "classType", t), t
        }

        isActive(e) {
            let t = !1;
            do {
                let i = this.$refs.table.status[e.key];
                if (!i.checked && !i.indeterminate) break;
                if ("branch" === e.type) {
                    t = !0;
                    break
                }
                if (this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Recycle) break;
                (e.data.isSupportPlay || this.isComplete(e)) && (t = !0)
            } while (0);
            return t
        }

        isComplete(e) {
            return e.data.isComplete || ("leaf" === e.type ? e.data.isComplete = this.taskType !== r.DownloadKernel.TaskType.Group ? e.data.downloadSize === e.data.fileSize && e.data.isNeedDownload && e.data.downloadSize && 3 === e.data.status : [r.DownloadKernel.TaskStatus.Succeeded, r.DownloadKernel.TaskStatus.Seeding].includes(e.data.status) : e.data.isComplete = e.data.isAllDownloadItemFinished && 0 !== e.data.fileSize && e.data.fileSize === e.data.downloadSize), e.data.isComplete
        }

        getProgress(e) {
            let t = 0;
            do {
                if (e && e.data && 0 === e.data.fileSize) {
                    t = 0;
                    break
                }
                if ("branch" === e.type) {
                    let i = e.data.downloadSize / e.data.fileSize;
                    if (e.data.isAllDownloadItemFinished) {
                        t = 1;
                        break
                    }
                    t = i >= 1 ? .9999 : i;
                    break
                }
                t = this.subFiles[e.data.index].downloadSize / this.subFiles[e.data.index].fileSize, (this.taskType !== r.DownloadKernel.TaskType.Group ? e.data.downloadSize === e.data.fileSize && e.data.isNeedDownload && e.data.downloadSize && 3 === e.data.status : [8, 10].includes(e.data.status)) || (t = t >= 1 ? .9999 : t)
            } while (0);
            return this.$set(e.data, "progress", t), t
        }

        parseFileList(e) {
            let t = {};
            this.branchMap = {}, this.leafMap = {}, this.setBranch("", ""), e.forEach(e => {
                const {filePath: i} = e;
                if (!t[i]) {
                    t[i] = !0;
                    let e = "";
                    i.split("\\").forEach(t => {
                        "" !== t && (this.setBranch(e, t), e = e ? `${e}\\${t}` : t)
                    })
                }
                this.setLeaf(i.slice(0, -1), e)
            }), this.updateTree(null), this.isSingle = Object.keys(this.branchMap).length <= 1, this.tree = Object.freeze(this.branchMap[""].children)
        }

        setBranch(e, t) {
            let i = this.branchMap[e], n = e ? `${e}\\${t}` : t, o = this.branchMap[n];
            return o || (o = this.branchMap[n] = {
                type: "branch",
                name: t,
                children: [],
                key: n,
                parent: i,
                data: {fileName: t}
            }, i && i.children.push(o)), o
        }

        updateTree(e) {
            let t = [];
            for (let e of Object.values(this.leafMap)) this.isComplete(e) && t.push(e);
            this.disabledKeys = t.map(e => e.key), this.editingSelected ? this.defaultCheckedKeys = this.checkedKeys : this.checkedKeys = this.defaultCheckedKeys = this.originCheckedKeys = e || Object.keys(this.leafMap).filter(e => this.leafMap[e].data.isNeedDownload), this.editingExpanded ? this.defaultExpandedKeys = this.expandedKeys : this.expandedKeys = this.defaultExpandedKeys = [], this.caculateBranch();
            let i = Object.values(this.branchMap), n = {};
            for (let e = i.length - 1; e >= 0; e--) {
                let t = i[e];
                0 !== t.data.fileSize && t.data.downloadSize === t.data.fileSize && t.data.isAllDownloadItemFinished && t.children.every(e => "leaf" === e.type && e.data.isNeedDownload || "branch" === e.type && n[t.key]) && (n[t.key] = !0)
            }
            this.disabledKeys = this.disabledKeys.concat(Object.keys(n)), this.curTask.taskStatus === r.DownloadKernel.TaskStatus.Seeding || this.curTask.taskStatus === r.DownloadKernel.TaskStatus.Succeeded ? this.isAllSelectedAndFinished = Object.values(this.leafMap).every(e => !!e.data.isNeedDownload && (this.taskType !== r.DownloadKernel.TaskType.Group ? e.data.downloadSize === e.data.fileSize && e.data.downloadSize && 3 === e.data.status : [8, 10].includes(e.data.status))) : this.isAllSelectedAndFinished = !1, this.$emit("update:checkedTaskNum", this.defaultCheckedKeys.length);
            let o = 0;
            for (let e of this.defaultCheckedKeys) this.leafMap[e] && 3 === this.getFileStatus(this.leafMap[e].data.status) && (o += 1);
            this.$emit("update:completeTaskNum", o), this.cacheCompleteTaskNum = o
        }

        caculateBranch() {
            this.caculateBranchProp(this.branchMap[""], ["fileSize", "downloadSize", "isAllDownloadItemFinished", "selectedFailedSubFile"], this.reduceFn.bind(this))
        }

        caculateBranchProp(e, t, i) {
            if (!e) return;
            let n = e.children.reduce((e, n) => {
                if ("branch" === n.type && this.caculateBranchProp(n, t, i), "function" == typeof i) return i(t, e, n);
                {
                    let i = [];
                    for (let o = 0; o < t.length; ++o) i[o] = e[o] + ("branch" === n.type || this.checkedKeysCache[n.key] ? n.data[t[o]] : 0);
                    return i
                }
            }, new Array(t.length).fill(0));
            for (let i = 0; i < n.length; ++i) e.data[t[i]] = n[i]
        }

        reduceFn(e, t, i) {
            let n = [];
            for (let o = 0; o < e.length; ++o) "isAllDownloadItemFinished" === e[o] ? n[o] = this.isAllDownloadItemFinished(t[o], i) : "selectedFailedSubFile" === e[o] ? this.updateSelectedFailedSubFile(i) : n[o] = t[o] + ("branch" === i.type || this.checkedKeysCache[i.key] ? i.data[e[o]] : 0);
            return n
        }

        updateSelectedFailedSubFile(e) {
            this.selectedFailedSubFile || e.data.errMessage && e.data.isNeedDownload && (this.selectedFailedSubFile = !0)
        }

        isAllDownloadItemFinished(e, t) {
            let i = !1;
            if (!1 !== e) {
                let n = !1;
                n = t.data.isNeedDownload ? this.taskType !== r.DownloadKernel.TaskType.Group ? t.data.downloadSize === t.data.fileSize && t.data.downloadSize && 3 === t.data.status : [8, 10].includes(t.data.status) : "branch" !== t.type || t.data.isAllDownloadItemFinished, i = 0 !== e ? n && e : n
            }
            return i
        }

        setLeaf(e, t) {
            let i = e ? `${e}\\${t.fileName}` : t.fileName, n = this.branchMap[e], o = this.leafMap[i];
            return o || (o = this.leafMap[i] = {
                type: "leaf",
                fullPath: i,
                name: t.fileName,
                key: i,
                parent: n,
                data: t
            }, n.children.push(o)), o
        }

        setUserRead(e) {
            e.data.userRead = 1;
            let t = C.getTaskFromTaskId(this.curTask.taskId);
            if (t && (t.setUserRead(1), "leaf" === e.type)) if (this.taskType === r.DownloadKernel.TaskType.Bt) {
                let i = t.getExtraObject().getBtFileList();
                for (let [, t]of i) if (t.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.RealIndex) === e.data.index) {
                    t.setUserRead(1);
                    break
                }
            } else if (this.taskType === r.DownloadKernel.TaskType.Group) {
                t.getExtraObject().getSubTaskByIndex(e.data.index).setUserRead(1)
            }
        }

        openFile(e, t = "file_name") {
            return o(this, void 0, void 0, function* () {
                yield this.updateDstRect();
                if ([".mht", ".htm", ".html", ".lnk", ".url"].some(t => e.key.toLowerCase().endsWith(t))) {
                    let t = this.curTask.savePath.replace("\\", "/"),
                        i = encodeURI("file:///" + t + "/" + this.curTask.taskName + "/" + e.key);
                    g.client.callServerFunction("OpenNewTab", i).catch()
                } else g.client.callServerFunction("OperateTask", this.curTaskId, "open", e.data.index);
                this.setUserRead(e), v.XLStatNS.trackEventEx("download_detail", "dl_detail_bt_filelist_file_click", "current_tab=" + this.currentTab + ",click_id=" + t + ",file_type=" + this.getFileType(e.name))
            })
        }

        playFile(e, t = "file_name") {
            return o(this, void 0, void 0, function* () {
                let i = document.querySelector("div#xly-task-detail-down__main");
                i && i.scrollTo(0, 0), yield this.updateDstRect();
                let n = "download_right_downloading_filelist";
                if (this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Completed ? n = "download_right_complate_filelist" : this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Recycle && (n = "download_right_recycle_filelist"), -1 !== this.curTask.categoryId && -1 !== this.currentCategoryId) n = "download_private_space_bxbb_play", this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Completed && (n = "download_private_space_local_play"); else if (-1 === this.currentCategoryId && -1 !== this.curTask.categoryId) {
                    let e = !1,
                        t = C.getTaskFromTaskId(this.curTaskId).getExtraObject().getUserData(y.TaskUserDataGUID.guidThunderYunDownloadUserData, "extras");
                    if (t) {
                        let i = null;
                        try {
                            i = JSON.parse(t)
                        } catch (e) {
                        }
                        i && 1 === i.isInSafe && (e = !0)
                    }
                    n = e ? "safebox_download_getbacking_play" : "download_getbacking_play", this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Completed && (n = e ? "safebox_download_getback_complete_play" : "download_getback_complete_play")
                }
                g.client.callServerFunction("OperateTask", this.curTaskId, "play", {
                    fileIndex: e.data.index,
                    playFrom: n
                }).then().catch(), this.setUserRead(e), g.client.broadcastEvent("OnTabChange", "Preview"), v.XLStatNS.trackEventEx("download_detail", "dl_detail_bt_filelist_file_click", "current_tab=" + this.currentTab + ",click_id=" + t + ",file_type=" + this.getFileType(e.name))
            })
        }

        getFileType(e) {
            let t = {
                video: "avi|mp4|mkv|mpeg|mpg|wmv|rmvb|rm|mov|ts|m2ts|tp|3gp|flv",
                image: "png|jpg|jpeg|webp|gif",
                music: "aiff|cue|m3u|au|cdda|raw|wav|flac|tak|mp3|aac|wma|m4a|mid|mka|mp2|mpa|mpc|ape|ofr|ogg|ra|wv|tta|ac3|dts|nsf|mod|s3m|xm|it|vst",
                document: "txt|doc|docx|xls|xlsx|csv|wps|rtf|pdf|ppt|epub|mobi|umd|chm",
                website: "lnk|url|mht|htm|html",
                exe: "exe|msi"
            }, i = h.extname(e).slice(1);
            for (let e of Object.keys(t)) if (t[e].includes(i)) return e;
            return "other"
        }

        updateDstRect() {
            return o(this, void 0, void 0, function* () {
                let e, t = document.querySelector("div.xly-file-detail div.td-tabs__pane"),
                    i = {width: 0, height: 0, x: 0, y: 0};
                t && (e = t.getBoundingClientRect()), i.y = e.top > 42 ? e.top : 42, i.x = e.left, i.width = e.width, i.height = e.height, yield g.client.callServerFunction("UpdateDownloadEmbedRect", i), w.information("play rect", i)
            })
        }

        openDir(e) {
            let t = this.curTask.savePath, i = this.curTask.taskName;
            2 === this.taskType && i && "" !== i && (i.indexOf(".") === i.length - 1 && (i = i.substring(0, i.length - 1)), t = h.join(t, i));
            let n = h.join(t, e.key);
            g.client.callServerFunction("ShellOpen", n).catch(), C.getTaskFromTaskId(this.curTask.taskId).setUserRead(1), v.XLStatNS.trackEvent("download_detail", "dl_detail_bt_filelist_folder_click", "", 0, 0, 0, 0, "current_tab=" + this.currentTab + ",click_id=open")
        }

        downloadSelected() {
            if (!this.selectedFailedSubFile && !this.editingSelected) return;
            let e = this.checkedKeys.filter(e => e in this.leafMap).map(e => this.leafMap[e].data.index),
                t = e.join("");
            if (this.selectedFileIndex === t) {
                if (!this.selectedFailedSubFile) return
            } else this.selectedFileIndex = t;
            this.loading = !0, this.operate("downloadSelectFiles", null, JSON.stringify(e)).then(() => {
                this.loading = !1, this.editingSelected = !1, this.updateTree(this.checkedKeys)
            });
            let i = this.curCategroyViewID;
            -1 !== this.currentCategoryId && (i = "Private_Space"), v.XLStatNS.trackEvent("download_detail", "dl_detail_bt_filelist_function_click", "", 0, 0, 0, 0, "current_tab=" + i + ",click_id=download")
        }

        isSupportPlay(e) {
            return "branch" !== e.type && (!!this.subFiles[e.data.index] && this.subFiles[e.data.index].isSupportPlay)
        }

        onCheckedChange(e, t, i) {
            let n = e.filter(e => e in this.leafMap).map(e => this.leafMap[e].data.index);
            n.length === this.originCheckedKeys.length && this.originCheckedKeys.every(e => n.includes(T(this.leafMap[e], "data", "index"))) ? this.editingSelected = !1 : this.editingSelected = !0, this.checkedKeys = e, this.caculateBranch()
        }

        getFileList(e) {
            return o(this, void 0, void 0, function* () {
                let t = "", i = !0, n = [], o = C.getTaskFromTaskId(e.taskId), a = e.taskType;
                if (a === r.DownloadKernel.TaskType.Bt) {
                    let a = o.getExtraObject().getBtFileList(), s = e.savePath, l = e.taskName;
                    void 0 !== l && "" !== l && l.indexOf(".") === l.length - 1 && (l = l.substring(0, l.length - 1));
                    let f = yield c.SingleBtTaskNS.isSingleBtTask(o);
                    for (let [, e]of a) {
                        let a = {};
                        a.index = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.RealIndex), a.filePath = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FilePath), a.fileName = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileName), a.isNeedDownload = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.Download), a.fileSize = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileSize), a.cid = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.Cid), a.gcid = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.Gcid), a.status = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileStatus), a.downloadSize = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.DownloadSize), a.errCode = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.ErrorCode), a.isSupportPlay = e.isSupportPlay(), a.userRead = e.getUserRead(), 0 !== a.errCode ? a.errMessage = d.TaskStatusHelper.getTaskErrorInfoByCode(a.errCode) : a.errMessage = "", a.status === r.DownloadKernel.BtFileStatus.Complete ? (t = f ? c.SingleBtTaskNS.getSinleBtTaskFilePath(o) : h.join(s, l, a.filePath, a.fileName), i = yield u.FileSystemAWNS.existsAW(t), a.isDelete = !i) : a.isDelete = !1, n[a.index] = a
                    }
                } else if (a === r.DownloadKernel.TaskType.Group) {
                    let e = o.getExtraObject(), a = e.getSubTaskCount(), s = "";
                    for (let o = 0; o < a; ++o) {
                        let a = e.getSubTaskByIndex(o);
                        if (a) {
                            let e = {};
                            e.index = o, e.filePath = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.RelativePath), e.taskId = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId), e.fileName = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskName), e.url = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskUrl), e.refUrl = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.RefUrl), e.isNeedDownload = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask), e.fileSize = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.FileSize), e.downloadSize = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSize), e.cid = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.Cid), e.gcid = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.Gcid), e.status = a.getTaskStatus(), e.errCode = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.ErrorCode), e.isSupportPlay = a.isSupportPlay(), e.userRead = a.getUserRead(), e.status === r.DownloadKernel.TaskStatus.Failed ? e.errMessage = d.TaskStatusHelper.getTaskErrorInfoByCode(e.errCode) : e.errMessage = "";
                            let l = a.getTaskChannelInfo();
                            e.dcdnStatus = l.dcdnStatus, s = a.getTaskAttribute(r.DownloadKernel.TaskAttribute.SavePath), e.status === r.DownloadKernel.TaskStatus.Succeeded || e.status === r.DownloadKernel.TaskStatus.Seeding ? (t = h.join(s, e.fileName), i = yield u.FileSystemAWNS.existsAW(t), e.isDelete = !i) : e.isDelete = !1, n.push(e)
                        }
                    }
                }
                return n
            })
        }

        updateTreeStatus(e) {
            if (!e.isNeedDownload) return void w.warning("error in updateTreeStatus ", e.fileName, "do not need download");
            let t = this.leafMap["" === e.filePath ? e.fileName : e.filePath + e.fileName];
            if (!t || !t.data) return void w.warning("error in updateTreeStatus", "node: ", t, "fileinfo: ", e);
            let i = t.data.downloadSize,
                n = this.taskType === r.DownloadKernel.TaskType.Group && t.data.fileSize === e.fileSize ? -1 : t.data.fileSize,
                o = this.getFileStatus(e.status);
            3 === o && 3 !== this.getFileStatus(t.data.status) && (this.cacheCompleteTaskNum += 1, this.$emit("update:completeTaskNum", this.cacheCompleteTaskNum)), this.$set(t, "data", e);
            do {
                if ("" === (t = t.parent).key) break;
                {
                    let a = T(t.data, "downloadSize") || 0, r = T(t.data, "fileSize") || 0;
                    if (this.$set(t.data, "downloadSize", e.downloadSize - i + a), -1 !== n && this.$set(t.data, "fileSize", e.fileSize - n + r), 3 === o) {
                        let e = !0;
                        for (let i = 0; i < t.children.length; i++) if ("branch" === t.children[i].type && !1 === t.children[i].data.isAllDownloadItemFinished || "leaf" === t.children[i].type && 3 !== this.getFileStatus(t.children[i].data.status)) {
                            e = !1;
                            break
                        }
                        t.data.isAllDownloadItemFinished = e
                    }
                }
            } while (t)
        }

        getFileStatus(e) {
            return this.taskType === r.DownloadKernel.TaskType.Bt ? e : [r.DownloadKernel.TaskStatus.Seeding, r.DownloadKernel.TaskStatus.Succeeded].includes(e) ? r.DownloadKernel.BtFileStatus.Complete : e === r.DownloadKernel.TaskStatus.Failed ? r.DownloadKernel.BtFileStatus.Error : r.DownloadKernel.BtFileStatus.Started
        }

        getBtSubFileList(e, t) {
            let i = [];
            do {
                let n = C.getTaskFromTaskId(e);
                if (!n) break;
                if (n.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskType) !== r.DownloadKernel.TaskType.Bt) break;
                let o = n.getExtraObject();
                if (!o) break;
                for (let e = 0; e < t.length; ++e) {
                    let n = t[e], a = o.getBtFileByRealIndex(n.realIndex);
                    if (!a) continue;
                    let s = {};
                    s.index = n.realIndex, s.filePath = n.relativePath, s.fileName = a.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileName), s.isNeedDownload = a.getIsDownload(), s.isSupportPlay = a.isSupportPlay(), s.fileSize = n.fileSize, s.cid = n.cid, s.gcid = n.gcid, s.status = n.fileStatus, s.downloadSize = n.downloadSize, s.errCode = n.errorCode, s.userRead = a.getUserRead(), 0 !== s.errCode ? s.errMessage = d.TaskStatusHelper.getTaskErrorInfoByCode(s.errCode) : s.errMessage = "", i.push(s)
                }
            } while (0);
            return i
        }

        onBtSubFileDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== r.DownloadKernel.TaskEventType.BtSubFileDetailChanged) break;
                if (!e[1] || !e[2]) break;
                let t = e[1];
                if (t !== this.curTaskId) break;
                let i = e[2], n = this.getBtSubFileList(t, i);
                for (let e of n) this.$set(this.subFiles, e.index, e), this.updateTreeStatus(e)
            } while (0)
        }

        getGroupTaskSubFileList(e) {
            let t = [];
            for (let i = 0; i < e.length; ++i) {
                let n = e[i];
                if (n) {
                    let e = {};
                    e.filePath = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.RelativePath), e.index = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.FileIndex), e.taskId = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId), e.fileName = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskName), e.url = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskUrl), e.refUrl = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.RefUrl), e.isNeedDownload = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask), e.fileSize = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.FileSize), e.downloadSize = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSize), e.cid = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.Cid), e.gcid = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.Gcid), e.status = n.getTaskStatus(), e.errCode = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.ErrorCode), e.userRead = n.getUserRead(), e.isSupportPlay = n.isSupportPlay(), e.status === r.DownloadKernel.TaskStatus.Failed ? e.errMessage = d.TaskStatusHelper.getTaskErrorInfoByCode(e.errCode) : e.errMessage = "";
                    let i = n.getTaskChannelInfo();
                    e.dcdnStatus = i.dcdnStatus, t.push(e)
                }
            }
            return t
        }

        onGroupTaskSubFileDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged) break;
                if (!e[1]) break;
                e[1].forEach((e, t) => {
                    if (t === this.curTaskId) {
                        let t = this.getGroupTaskSubFileList(e);
                        for (let e of t) this.$set(this.subFiles, e.index, e), this.updateTreeStatus(e)
                    }
                })
            } while (0)
        }

        uninit() {
            -1 !== this.eventBtSubFileDetailChanged && (k.detachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.eventBtSubFileDetailChanged), this.eventBtSubFileDetailChanged = -1), -1 !== this.eventGroupTaskSubFileDetailChanged && (k.detachTaskEvent(r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, this.eventGroupTaskSubFileDetailChanged), this.eventGroupTaskSubFileDetailChanged = -1), this.curTask = {}, this.subFiles = [], this.branchMap = {}, this.leafMap = {}, this.tree = [], this.checkedKeys = [], this.disabledKeys = [], this.defaultCheckedKeys = [], this.originCheckedKeys = [], this.editingExpanded = [], this.expandedKeys = [], this.defaultExpandedKeys = [], this.$emit("update:checkedTaskNum", 0), this.$emit("update:completeTaskNum", 0), this.cacheCompleteTaskNum = 0
        }

        init() {
            return o(this, void 0, void 0, function* () {
                if (w.information("init FileList"), this.cacheCompleteTaskNum = this.completeTaskNum, this.editingSelected = !1, this.curTask = C.getTaskFromTaskId(this.curTaskId).getTaskBaseInfo(), !this.curTask || ![r.DownloadKernel.TaskType.Bt, r.DownloadKernel.TaskType.Group].includes(this.curTask.taskType)) return;
                let e = (new Date).getTime();
                -1 !== this.eventBtSubFileDetailChanged && (k.detachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.eventBtSubFileDetailChanged), this.eventBtSubFileDetailChanged = -1), -1 !== this.eventGroupTaskSubFileDetailChanged && (k.detachTaskEvent(r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, this.eventGroupTaskSubFileDetailChanged), this.eventGroupTaskSubFileDetailChanged = -1), this.subFiles = yield this.getFileList(this.curTask), this.parseFileList(this.subFiles), this.taskType === r.DownloadKernel.TaskType.Bt ? this.eventBtSubFileDetailChanged = k.attachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileDetailChanged, (...e) => {
                    this.onBtSubFileDetailChanged(...e)
                }) : this.taskType === r.DownloadKernel.TaskType.Group && (this.eventGroupTaskSubFileDetailChanged = k.attachTaskEvent(r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, (...e) => {
                    this.onGroupTaskSubFileDetailChanged(...e)
                }));
                let t = (new Date).getTime() - e;
                g.client.callServerFunction("SendPerformanceItem", "FileList", t)
            })
        }

        playBtOrGroupTask(e, ...t) {
            return o(this, void 0, void 0, function* () {
                if (t.length < 1) return;
                if (parseInt(t[0], 10) !== this.curTaskId) return;
                let e = "download_right_downloading_embed";
                if (this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Completed && (e = "download_right_complated_embed"), -1 !== this.curTask.categoryId && -1 !== this.currentCategoryId) e = "download_private_space_bxbb_play", this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Completed && (e = "download_private_space_local_play"); else if (-1 === this.currentCategoryId && -1 !== this.curTask.categoryId) {
                    let t = !1,
                        i = C.getTaskFromTaskId(this.curTaskId).getExtraObject().getUserData(y.TaskUserDataGUID.guidThunderYunDownloadUserData, "extras");
                    if (i) {
                        let e = null;
                        try {
                            e = JSON.parse(i)
                        } catch (e) {
                        }
                        e && 1 === e.isInSafe && (t = !0)
                    }
                    this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Downloading ? e = t ? "safebox_download_getbacking_play" : "download_getbacking_play" : this.curCategroyViewID === r.DownloadKernel.CategroyViewID.Completed && (e = t ? "safebox_download_getback_complete_play" : "download_getback_complete_play")
                }
                for (let t of Object.values(this.leafMap)) if (!t.data.errMessage && 1 === t.data.isNeedDownload && !0 !== t.data.isDelete && !0 === t.data.isSupportPlay) {
                    t.data.status, g.client.callServerFunction("OperateTask", this.curTaskId, "downAndPlay", {
                        fileIndex: t.data.index,
                        playFrom: e
                    }).then().catch(), this.setUserRead(t);
                    break
                }
            })
        }

        mounted() {
            this.eventPlayBtOrGroupTask = g.client.attachServerEvent("PlayBtOrGroupTask", this.playBtOrGroupTask.bind(this))
        }

        beforeDestroy() {
            this.uninit(), g.client.detachServerEvent("PlayBtOrGroupTask", this.eventPlayBtOrGroupTask)
        }
    };
    n([a.Prop()], I.prototype, "curTaskId", void 0), n([a.Prop()], I.prototype, "operate", void 0), n([a.Prop()], I.prototype, "playingCurTask", void 0), n([a.Prop()], I.prototype, "playingMediaIndex", void 0), n([a.Prop()], I.prototype, "curCategroyViewID", void 0), n([a.Prop()], I.prototype, "currentCategoryId", void 0), n([a.Prop()], I.prototype, "playstate", void 0), n([a.Prop()], I.prototype, "currentGuide", void 0), n([a.Prop()], I.prototype, "setCurrentGuide", void 0), n([a.Prop()], I.prototype, "checkedTaskNum", void 0), n([a.Prop()], I.prototype, "completeTaskNum", void 0), n([a.Watch("curTaskId", {immediate: !0})], I.prototype, "onCurTaskChange", null), I = n([a.Component], I), t.default = I
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(270), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(852), o = i(24), a = i(4);
    t.default = o.connector.connect({
        mapStateToProps: {
            taskBaseMap: (e, t) => {
                let i = null;
                if (t.curCategoryViewId !== a.DownloadKernel.CategroyViewID.Downloading) return i;
                let n = 0, o = t.currentCategoryId;
                for (let i = 0; i < e.DownloadListState.taskList.length; i++) e.DownloadListState.taskList[i].id === t.curCategoryViewId && (n = i);
                return i = e.DownloadListState.taskList[n].tasksMap, -1 !== o && (i = e.DownloadListState.taskListPrivate[n].tasksMap), i
            }
        }, mapCommitToProps: {}, mapDispatchToProps: {}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(272), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(3), s = i(11), l = i(4), d = i(48), u = i(34), c = i(40), h = i(9), f = i(59),
        p = s.DownloadKernelTaskManager.getTaskManager();
    let g = class extends a.Vue {
        constructor() {
            super(...arguments), this.isDropdownShow = !1, this.hasErrorTask = !1, this.hasUnRemoveTask = !1, this.hasLogicTasks = !1, this.showCopy = !1, this.showAdd2Cloud = !1, this.removeText = "删除"
        }

        get hasStartedTask() {
            let e = !1;
            if (this.curCategoryViewId !== l.DownloadKernel.CategroyViewID.Downloading) return e;
            for (let t of this.taskIds) if (this.taskBaseMap[t]) {
                let i = this.taskBaseMap[t].taskStatus;
                if (i >= l.DownloadKernel.TaskStatus.StartWaiting && i <= l.DownloadKernel.TaskStatus.Started) {
                    e = !0;
                    break
                }
            }
            return e
        }

        onTaskIdsChange() {
            return o(this, void 0, void 0, function* () {
                this.hasErrorTask = !1;
                let e = !1;
                if (this.removeText = "删除", this.curCategoryViewId === l.DownloadKernel.CategroyViewID.Downloading) {
                    let t = [];
                    for (let i of this.taskIds) {
                        let n = p.getTaskFromTaskId(i);
                        if (!n) continue;
                        n.getTaskStatus() === l.DownloadKernel.TaskStatus.Failed && (this.hasErrorTask = !0);
                        let o = n.getTaskBaseInfo();
                        t.push(o);
                        let a = n.getIsPrivate();
                        -1 === o.categoryId || a ? e = !0 : this.removeText = "彻底删除"
                    }
                    this.showAdd2Cloud = f.TaskStatusHelper.canAdd2CloudSelectedTask(l.DownloadKernel.CategroyViewID.Downloading, t), this.showCopy = f.TaskStatusHelper.canCopySelectTaskLink(t)
                } else if (this.curCategoryViewId === l.DownloadKernel.CategroyViewID.Completed) {
                    this.showAdd2Cloud = !0;
                    let t = !1, i = [];
                    for (let n of this.taskIds) {
                        let o = p.getTaskFromTaskId(n);
                        if (!o) continue;
                        let a = o.getTaskBaseInfo();
                        i.push(a);
                        let r = o.getIsPrivate();
                        -1 === a.categoryId || r ? e = !0 : this.removeText = "彻底删除";
                        let s = yield c.TaskCtrlOperatorNS.isExistTaskFile(a);
                        s && !t && (t = s)
                    }
                    this.hasUnRemoveTask = t, this.showCopy = f.TaskStatusHelper.canCopySelectTaskLink(i)
                } else if (this.curCategoryViewId === l.DownloadKernel.CategroyViewID.Recycle) {
                    let e = [];
                    for (let t of this.taskIds) {
                        let i = p.getTaskFromTaskId(t);
                        if (!i) continue;
                        let n = i.getTaskBaseInfo();
                        e.push(n)
                    }
                    this.showCopy = f.TaskStatusHelper.canCopySelectTaskLink(e)
                }
                this.hasLogicTasks = !!e
            })
        }

        getSelectdTaskInfos(e = !1) {
            let t = [];
            for (let i of this.taskIds) {
                let n = p.getTaskFromTaskId(i);
                if (!n) continue;
                let o = n.getTaskBaseInfo(), a = n.getIsPrivate(), r = n.getTaskStatus();
                (-1 === o.categoryId || a) && (r !== l.DownloadKernel.TaskStatus.Started && r !== l.DownloadKernel.TaskStatus.StartPending || !e || p.stopTask(o.taskId, l.DownloadKernel.TaskStopReason.DeleteTask), t.push(o))
            }
            return t
        }

        getSelectdYunTaskInfos(e = !1) {
            let t = [];
            for (let i of this.taskIds) {
                let n = p.getTaskFromTaskId(i);
                if (!n) continue;
                let o = n.getTaskBaseInfo();
                if (-1 !== o.categoryId) {
                    let i = n.getTaskStatus();
                    i !== l.DownloadKernel.TaskStatus.Started && i !== l.DownloadKernel.TaskStatus.StartPending || !e || p.stopTask(o.taskId, l.DownloadKernel.TaskStopReason.DeleteTask), t.push(o)
                }
            }
            return t
        }

        start() {
            for (let e of this.taskIds) r.client.callServerFunction("SetPerformanceItemStart", "StartTask_" + e);
            d.DownloadDispatchNS.startTasks(this.taskIds), this.stat("all_download")
        }

        stop() {
            p.batchStopTask(this.taskIds, l.DownloadKernel.TaskStopReason.Manual), this.stat("all_pause")
        }

        remove() {
            let e = this.getSelectdTaskInfos(!0), t = this.getSelectdYunTaskInfos(!0);
            t.length > 0 ? (t = t.concat(e), u.TaskOperatorNs.destroyTasks(t)) : e.length > 0 && u.TaskOperatorNs.deleteTasks(e), this.stat("delete")
        }

        add2Cloud() {
            return o(this, void 0, void 0, function* () {
                {
                    let e = [];
                    for (let t of this.taskIds) {
                        let i = p.getTaskFromTaskId(t);
                        e.push(i.getTaskBaseInfo())
                    }
                    let t = "download/right/yunadd",
                        i = yield u.TaskOperatorNs.save2Cloud(e, t, this.curCategoryViewId);
                    i && r.client.callServerFunction("ShowMessageToast", {message: i, type: "error"})
                }
                this.stat("yunpan_add")
            })
        }

        copyLinks() {
            this.isDropdownShow = !1;
            let e = [];
            for (let t of this.taskIds) {
                let i = p.getTaskFromTaskId(t).getTaskBaseInfo();
                e.push(i)
            }
            u.TaskOperatorNs.copyLink(e, void 0), this.stat("copy_link")
        }

        move2Dir() {
            this.isDropdownShow = !1;
            let e = this.getSelectdTaskInfos();
            e.length > 0 && u.TaskOperatorNs.move2Dir(e).catch(() => {
            }), this.stat("move")
        }

        copy2Dir() {
            this.isDropdownShow = !1;
            let e = this.getSelectdTaskInfos();
            e.length > 0 && u.TaskOperatorNs.copy2Dir(e).catch(() => {
            }), this.stat("copy_file")
        }

        restore() {
            p.batchRecoverFromRecycle(this.taskIds), this.stat("recovery")
        }

        destroy() {
            let e = this.getSelectdTaskInfos();
            e.length > 0 && u.TaskOperatorNs.destroyTasks(e), this.stat("delete")
        }

        redownloadTask() {
            let e = this.getSelectdTaskInfos();
            if (e.length > 0) {
                let t = "";
                void 0 !== this.curCategoryViewId && this.curCategoryViewId === l.DownloadKernel.CategroyViewID.Completed ? t = "finished_rk_reload_click" : this.curCategoryViewId === l.DownloadKernel.CategroyViewID.Recycle && (t = "dustbin_rk_reload_click"), c.TaskCtrlOperatorNS.redownloadTask(e, void 0, t).catch()
            }
            this.stat("retry_download")
        }

        stat(e) {
            let t = "clild_tab=" + this.curCategoryViewId + ",clickid=" + e;
            h.XLStatNS.trackEvent("download_detail", "dl_filelist_batch_operation_click", "", 0, 0, 0, 0, t)
        }
    };
    n([a.Prop()], g.prototype, "taskBaseMap", void 0), n([a.Prop()], g.prototype, "currentCategoryId", void 0), n([a.Prop()], g.prototype, "taskIds", void 0), n([a.Prop()], g.prototype, "curCategoryViewId", void 0), n([a.Watch("taskIds", {immediate: !0})], g.prototype, "onTaskIdsChange", null), g = n([a.Component({components: {MultiChosenItem: () => Promise.resolve().then(() => i(853))}})], g), t.default = g
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(274), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(37), r = i(11), s = i(4), l = i(14), d = i(64),
        u = r.DownloadKernelTaskManager.getTaskManager();
    let c = class extends o.Vue {
        constructor() {
            super(...arguments), this.taskName = ""
        }

        onTaskIdChange() {
            let e = u.getTaskFromTaskId(this.taskId).getTaskBaseInfo();
            this.taskName = e.taskName, 0 === e.taskType ? this.iconType = "xlx-icon-type-group" : this.iconType = a.TaskUtilHelper.getTaskIcon(e.taskName, e.taskType), this.fileSize = l.ThunderUtil.formatSize(e.fileSize), e.taskStatus === s.DownloadKernel.TaskStatus.Seeding || e.taskStatus === s.DownloadKernel.TaskStatus.Succeeded ? this.displayTime = d.TimeHelperNS.formatDate(new Date(e.completionTime), "yyyy-MM-dd hh:mm") : this.displayTime = d.TimeHelperNS.formatDate(new Date(e.createTime), "yyyy-MM-dd hh:mm")
        }

        created() {
        }
    };
    n([o.Prop()], c.prototype, "taskId", void 0), n([o.Watch("taskId", {immediate: !0})], c.prototype, "onTaskIdChange", null), c = n([o.Component], c), t.default = c
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(276), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(855), o = i(24);
    t.default = o.connector.connect({mapStateToProps: {}, mapCommitToProps: {}, mapDispatchToProps: {}})(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(278), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(856), s = i(573), l = i(869), d = i(874), u = i(4), c = i(11), h = i(16), f = i(5), p = i(29),
        g = i(3), m = i(416), v = i(37), y = i(0), T = i(9), w = y.default.getLogger("comment"), k = i(46),
        C = c.DownloadKernelTaskManager.getTaskManager(), b = h.DownloadKernelEventManager.getEventManager();
    let I = class extends a.Vue {
        constructor() {
            super(...arguments), this.curTaskBase = {}, this.curTask = {}, this.gcid = "", this.deviceId = "", this.comments = [], this.hotComments = [], this.page = 1, this.rcount = 0, this.hasMore = !1, this.quickReviewConfigs = [], this.quickReviews = [], this.isInputFocused = !1, this.showReply = "0", this.eventOnGcidChange = void 0
        }

        get curUserNick() {
            return this.userInfo && this.userInfo.nickName || ""
        }

        get isYunTask() {
            return -1 === this.currentCategoryId && this.curTaskBase && -1 !== this.curTaskBase.categoryId
        }

        get taskType() {
            let e = "other";
            if (this.curTaskBase.taskType === u.DownloadKernel.TaskType.Bt) e = "seed"; else if (this.curTaskBase.taskType === u.DownloadKernel.TaskType.Group) e = "other"; else {
                let t = this.curTask.getTaskName(), i = v.TaskUtilHelper.getTaskFileType(t);
                i === v.TaskUtilHelper.FileExtType.Video ? e = "video" : i === v.TaskUtilHelper.FileExtType.Software ? e = "app" : i === v.TaskUtilHelper.FileExtType.Doc ? e = "doc" : i === v.TaskUtilHelper.FileExtType.Music ? e = "music" : i === v.TaskUtilHelper.FileExtType.Zip && (e = "zip")
            }
            return e
        }

        get totalPage() {
            return Math.ceil((this.rcount + this.hotComments.length) / 10)
        }

        get filteredHotComments() {
            return 1 === this.page ? this.hotComments : []
        }

        get filteredComments() {
            return this.comments.slice(10 * (this.page - 1), 10 * this.page)
        }

        onGcidChange() {
            return o(this, void 0, void 0, function* () {
                this.rcount = 0, this.hasMore = !1, this.gcid ? (m.default.getComments({
                    tid: this.gcid,
                    sourceId: this.gcid,
                    pageSize: 10
                }).then(e => {
                    e && 0 === e.result && (this.comments = e.conmments, this.hasMore = e.hasMore, this.rcount += e.rcount)
                }), m.default.getComments({
                    tid: this.gcid,
                    sourceId: this.gcid,
                    pageSize: 2,
                    category: "hot"
                }).then(e => {
                    e && 0 === e.result && (this.hotComments = e.conmments)
                })) : (this.hotComments = [], this.comments = [], this.hasMore = !1, this.rcount = 0)
            })
        }

        onCurTaskIdChange(e, t) {
            if (this.isInputFocused = !1, this.showReply = "0", this.page = 1, 0 === e) return this.curTask = {}, void (this.gcid = "");
            if (this.eventOnGcidChange && (b.detachTaskEvent(u.DownloadKernel.TaskEventType.DetailChanged, this.eventOnGcidChange), this.eventOnGcidChange = void 0), this.curTask = C.getTaskFromTaskId(e), this.curTaskBase = this.curTask.getTaskBaseInfo(), this.$set(this, "curTaskBase", this.curTaskBase), this.isYunTask) this.gcid = ""; else {
                this.curTaskBase.taskType === u.DownloadKernel.TaskType.Bt ? this.gcid = this.curTask.getExtraObject().getInfoId() : this.curTaskBase.taskType === u.DownloadKernel.TaskType.Group ? (w.information("calcGroupTaskUniqueId before"), this.gcid = this.calcGroupTaskUniqueId(this.curTask), w.information("calcGroupTaskUniqueId end, taskId: ", this.curTask.getId(), ", uniqueId: ", this.gcid)) : this.gcid = this.curTask.getTaskAttribute(u.DownloadKernel.TaskAttribute.Gcid), this.gcid || this.curTaskBase.taskType === u.DownloadKernel.TaskType.Group || this.curTaskBase.taskType === u.DownloadKernel.TaskType.Bt || (this.eventOnGcidChange = b.attachTaskEvent(u.DownloadKernel.TaskEventType.DetailChanged, this.onDetailChanged));
                for (let e of this.quickReviewConfigs) if (e.type === this.taskType) {
                    this.quickReviews = e.reviews;
                    break
                }
            }
        }

        onDetailChanged(...e) {
            !e || e.length < 3 || 0 != (e[2] & u.DownloadKernel.TaskDetailChangedFlags.Gcid) && this.curTask && (this.gcid = this.curTask.getTaskAttribute(u.DownloadKernel.TaskAttribute.Gcid), this.gcid && (b.detachTaskEvent(u.DownloadKernel.TaskEventType.DetailChanged, this.eventOnGcidChange), this.eventOnGcidChange = void 0))
        }

        switchPage(e) {
            T.XLStatNS.trackEvent("download_detail", "dltab_detail_comment_click", "", 0, 0, 0, 0, "button=" + e)
        }

        fetchCommentsByPage(e) {
            return o(this, void 0, void 0, function* () {
                if (this.hasMore && this.page < e && Math.floor((this.comments.length + this.hotComments.length) / 10) < e) {
                    let e = yield m.default.getComments({
                        tid: this.gcid,
                        sourceId: this.gcid,
                        pageSize: 10,
                        lastId: this.comments[this.comments.length - 1].comment_info.cid || 0
                    });
                    e && 0 === e.result && (this.hasMore = e.hasMore, this.rcount = e.rcount, this.comments = this.comments.concat(e.conmments))
                }
            })
        }

        getSingleComment(e) {
            e.gcid === this.gcid && (this.showReply = "0", m.default.getSingleComment({
                tid: this.gcid,
                sourceId: this.gcid,
                cid: k(e, "cid") || "",
                userId: this.curUserId
            }).then(e => {
                if (e && 0 === e.result && e.comments) {
                    if (e.comments[0].comment_info && e.comments[0].comment_info.sourceId && e.comments[0].comment_info.sourceId !== this.gcid) return;
                    this.comments.splice(0, 0, e.comments[0]), this.$set(this.comments, 0, e.comments[0]), this.rcount += 1
                }
            }).catch())
        }

        sendCommentRequest(e) {
            return o(this, void 0, void 0, function* () {
                w.information("sendCommentRequest", e), this.$refs.quickReviewInput && (this.$refs.quickReviewInput.text = e.comment || "", this.$refs.quickReviewInput.sendCommentHandler())
            })
        }

        deleteComment(e) {
            for (let t in this.hotComments) if (this.hotComments[t].comment_info.cid === e) {
                this.$delete(this.hotComments, t);
                break
            }
            for (let t in this.comments) if (this.comments[t].comment_info.cid === e) {
                this.$delete(this.comments, t);
                break
            }
        }

        praiseComment(e) {
            for (let t in this.hotComments) if (this.hotComments[t].comment_info.cid === e) {
                let e = parseInt(this.hotComments[t].comment_info.gcount, 10) || 0;
                this.$set(this.hotComments[t].comment_info, "gcount", e + 1), this.$set(this.hotComments[t].comment_info, "isPraise", !0);
                break
            }
            for (let t in this.comments) if (this.comments[t].comment_info.cid === e) {
                let e = parseInt(this.comments[t].comment_info.gcount, 10) || 0;
                this.$set(this.comments[t].comment_info, "gcount", e + 1), this.$set(this.comments[t].comment_info, "isPraise", !0);
                break
            }
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                this.deviceId = yield g.client.callServerFunction("GetPeerID"), this.quickReviewConfigs = yield m.default.getQuickReview()
            })
        }

        calcGroupTaskUniqueId(e) {
            let t = "", i = e.getExtraObject(), n = i.getSubTaskCount();
            if (n > 0) {
                let e = [];
                for (let t = 0; t < n; ++t) {
                    let n = i.getSubTaskByIndex(t).getTaskAttribute(u.DownloadKernel.TaskAttribute.TaskUrl);
                    f.isString(n) && n.length > 0 && e.push(n)
                }
                if (e.length > 0) {
                    e.sort();
                    let i = e.length, n = "#" + i + "#";
                    w.information("CalcGroupTaskUniqueID urlNum: ", i);
                    for (let t = 0; t < i; ++t) n += e[t] + "#";
                    let o = Buffer.alloc(n.length);
                    o.write(n), (t = p.ToolsUtilitiesAWNS.encryptSha1Buffer(o)) && (t = t.toUpperCase())
                }
            }
            return t
        }
    };
    n([a.Prop()], I.prototype, "curTaskId", void 0), n([a.Prop()], I.prototype, "currentCategoryId", void 0), n([a.Prop()], I.prototype, "currentCategoryViewId", void 0), n([a.Prop({})], I.prototype, "curUserId", void 0), n([a.Prop()], I.prototype, "userInfo", void 0), n([a.Prop()], I.prototype, "vipInfo", void 0), n([a.Watch("gcid", {immediate: !0})], I.prototype, "onGcidChange", null), n([a.Watch("curTaskId", {immediate: !0})], I.prototype, "onCurTaskIdChange", null), I = n([a.Component({
        components: {
            Avatar: r.default,
            CommentInput: s.default,
            CommentItem: l.default,
            QuickReview: d.default
        }
    })], I), t.default = I
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(280), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(857), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            allusers: e => e.Users.all,
            curUser: e => e.Users.curUser,
            preloadPath: e => `file:///${__rootDir}/out/common-preload.js`
        }, mapCommitToProps: {}, mapDispatchToProps: {}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(282), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(153), r = i(58), s = i(3), l = i(46);
    let d = class extends o.Vue {
        get isLogin() {
            return "" !== this.curUser.userID && void 0 !== this.curUser.userID
        }

        get avatar() {
            let e = l(this.curUser, "imgURL") || "";
            return e && (e = e.replace("%s", "100x100")), e || (e = l(this.allusers, this.curUser.userID, "portrait_url")), e
        }

        handleAvatarClick() {
            this.isLogin ? s.client.callServerFunction("OpenNewTab", this.getUserLink(this.curUser.userID)) : this.login()
        }

        login() {
            r.default()
        }

        getUserLink(e) {
            return a.getUserLink(e)
        }
    };
    n([o.Prop()], d.prototype, "curUser", void 0), n([o.Prop()], d.prototype, "allusers", void 0), n([o.Prop()], d.prototype, "curUserId", void 0), d = n([o.Component], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(284), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(863), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            allusers: e => e.Users.all,
            curUser: e => e.Users.curUser,
            preloadPath: e => `file:///${__rootDir}/out/common-preload.js`
        }, mapCommitToProps: {}, mapDispatchToProps: {}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(286), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(46), s = i(11), l = i(14), d = i(864), u = i(865), c = i(866), h = i(58), f = i(416),
        p = i(23), g = i(3), m = i(0), v = i(9), y = "download_detail", T = m.default.getLogger("comment-input"),
        w = s.DownloadKernelTaskManager.getTaskManager();
    let k = class extends a.Vue {
        constructor() {
            super(...arguments), this.curTaskBase = {}, this.curTask = {}, this.text = "", this.isSending = !1, this.messageConfig = null, this.isInputFocus = !1, this.canShowCommentNote = !1, this.imgUploadProgress = 0, this.isImgUploading = !1, this.isImageFrameShow = !1, this.commentImgUrl = [], this.imgUploadStatus = !1, this.showUploadTip = !1, this.maxSize = 30, this.tempText = "", this.isAuth = !1, this.inputCaches = {}
        }

        onCurTaskIDChange() {
            0 !== this.curTaskId ? (this.curTask = w.getTaskFromTaskId(this.curTaskId), this.curTaskBase = this.curTask.getTaskBaseInfo()) : this.curTaskBase = {}
        }

        onTidChange(e, t) {
            t && (this.inputCaches[t] = this.text, this.text = ""), e && (this.inputCaches && this.inputCaches[e] && (this.text = this.inputCaches[e]), this.isInputFocus = !1, this.canShowCommentNote = !1)
        }

        get userNick() {
            return r(this.comment, "userName") || ""
        }

        get trimedText() {
            return this.text.trim()
        }

        get textLen() {
            return this.trimedText.length
        }

        get isLogin() {
            return "0" !== this.curUserId
        }

        get disabled() {
            return !(this.textLen && !this.isSending && this.tid)
        }

        get placeholder() {
            return this.userNick ? "回复 " + this.userNick + "：" : this.isInputFocus ? "请大于" + this.minLength + "个字" : "来说两句吧~"
        }

        onTextChange(e, t) {
            do {
                if (this.canShowCommentNote = !1, e && e.length <= this.maxLength) break;
                this.text = e.slice(0, this.maxLength)
            } while (0)
        }

        onPlaceholderChange(e, t) {
            e === "请大于" + this.minLength + "个字" && e !== t && "" === this.text && v.XLStatNS.trackEvent(y, "dltab_detail_comment_tip1_show", "", 0, 0, 0, 0)
        }

        oncanShowCommentNoteChange(e) {
            e && v.XLStatNS.trackEvent(y, "dltab_detail_comment_tip2_show", "", 0, 0, 0, 0)
        }

        extra() {
            let e = r(this.curTaskBase, "fileSize") || "";
            "number" == typeof e && (e = e.toString());
            let t = this.curTaskBase && 0 !== this.curTaskBase.downloadingPeriod ? this.curTaskBase.downloadSize / this.curTaskBase.downloadingPeriod : 0,
                i = r(this.curTaskBase, "taskType") || "", n = r(this.curTaskBase, "taskName").split(".");
            const o = {
                kuaiNiaoSpeedup: "",
                bandWidth: "",
                taskSize: e,
                taskSuffix: n[n.length - 1],
                taskType: String(i),
                taskSpeed: String(t),
                taskUrl: encodeURIComponent(r(this.curTaskBase, "url") || ""),
                taskName: encodeURIComponent(r(this.curTaskBase, "taskName") || "")
            };
            return Object.assign({}, o, {
                extParams: Object.keys(o).join(","),
                downloadspeed: l.ThunderUtil.formatSize(t)
            })
        }

        get showCommentImgPreview() {
            return this.tid && this.commentImgUrl.length > 0
        }

        handlePickEmoji(e, t) {
            if (this.text.length + e.length > this.maxLength) return;
            let i = this.$refs.replyInput, n = this.text, o = e, a = i.selectionStart, s = i.selectionEnd,
                l = n.substring(0, a) + o + n.substring(s, n.length);
            this.text = l, this.$nextTick(() => {
                i.focus(), a += o.length, s += o.length, i.setSelectionRange(a, a)
            });
            let d = "button=emoji,is_login=" + ("" === this.curUserId ? 0 : 1);
            this.comment && (d += ",commentid=" + r(this.comment, "cid")), v.XLStatNS.trackEvent(y, "dltab_detail_comment_click", "", 0, 0, 0, 0, d), v.XLStatNS.trackEvent(y, "dltab_detail_comment_emoj_click", "", 0, 0, 0, 0, "emoji=" + t)
        }

        sendCommentHandler(e) {
            if ("" !== this.text && this.focus) {
                if (this.tid) {
                    let e = "" === this.curUserId ? 0 : 1;
                    this.comment ? v.XLStatNS.trackEvent(y, "dltab_detail_comment_click", "", 0, 0, 0, 0, "button=sendreply,is_login=" + e + ",commentid=" + r(this.comment, "cid")) : v.XLStatNS.trackEvent(y, "dltab_detail_comment_click", "", 0, 0, 0, 0, "button=sendcomment,is_login=" + e)
                }
                this.sendComment(e)
            }
        }

        sendComment(e) {
            return o(this, void 0, void 0, function* () {
                if (!this.disabled) {
                    if (this.textLen < this.minLength) return this.$refs.replyInput.focus(), void (this.canShowCommentNote = !0);
                    this.isSending = !0;
                    try {
                        let t = yield this.beforeComment();
                        t && "0" !== t && (yield this.sendCommentRequest(e))
                    } catch (t) {
                        T.warning("comment fail: ", e), "login error" !== e.message && "auth error" !== e.message ? this.showFailure("评论失败") : "login error" === e.message ? this.showFailure("登录失败") : "auth error" === e.message && this.showFailure("实名认证失败")
                    } finally {
                        this.isSending = !1
                    }
                }
            })
        }

        beforeComment() {
            return o(this, void 0, void 0, function* () {
                let e = yield this.login();
                if (!e || "0" === e) return "";
                if (this.isAuth || (this.isAuth = yield g.client.callServerFunction("IsPhoneAuth")), !this.isAuth) {
                    if (0 !== (yield this.auth()).action) return ""
                }
                return e
            })
        }

        sendCommentRequest(e) {
            return o(this, void 0, void 0, function* () {
                let e = this.commentImgUrl.length > 0 ? [{url: this.commentImgUrl[0]}] : [], t = "", i = {
                    tid: this.tid,
                    sourceId: this.tid,
                    comment: this.trimedText,
                    cid: r(this, "comment", "cid") || "",
                    username: this.curUserNick,
                    hugFlag: !1,
                    device: this.deviceId,
                    images: e,
                    extra: this.extra()
                };
                T.information("sendCommentRequest", i);
                let n = yield f.default.publishComment(i);
                if (!n || 0 !== n.code && 0 !== n.result) {
                    let e = n.result || n.code;
                    if (n.detail && n.detail.endsWith("NOAUTH")) return void this.auth();
                    t = 7 === e ? "您可能已掉线，请重新登录后发表评论" : 4018 === e || 4012 === e || 4011 === e ? "您发表内容太频繁了，已被禁言" : 70012 === e ? "您因涉嫌发布广告，已经被禁言" : `评论失败(${e})`, this.showFailure(t)
                } else {
                    this.text = "", this.showSuccess("评论成功"), this.$emit("update:focus", !1);
                    let e = "is_login=" + ("" === this.curUserId ? 0 : 1);
                    e += ",commentid=" + n.cid_str + ",gcid=" + this.tid, this.commentImgUrl && this.commentImgUrl.length > 0 ? e += ",is_pic=1" : e += ",is_pic=0", v.XLStatNS.trackEvent(y, "dltab_detail_comment_send_success", "", 0, 0, 0, 0, e), this.deleteCommentImg("send"), setTimeout(() => {
                        this.$emit("getSingleComment", {cid: n.cid_str, gcid: this.tid})
                    }, 1e3)
                }
            })
        }

        showFailure(e) {
            this.$message({message: e, type: "error", position: "middle"})
        }

        showSuccess(e) {
            this.$message({message: e, type: "success", position: "middle"})
        }

        handleInputFocus() {
            this.tid && (this.$emit("update:focus", !0), this.isInputFocus = !0, this.imgUploadStatus = !1)
        }

        handleInputBlur() {
            this.isInputFocus = !1, this.canShowCommentNote = !1
        }

        blurHandler(e) {
            this.$emit("update:focus", !1), this.canShowCommentNote = !1
        }

        deleteCommentImg(e = "click") {
            this.commentImgUrl = [], this.$refs.imgUploadItem && this.$refs.imgUploadItem.handleDeleteImg(), this.commentImgUrl.length <= 0 && (this.isImageFrameShow = !1), "click" === e && v.XLStatNS.trackEvent(y, "comment_pic_upload_result", "", 0, 0, 0, 0, "result=delete")
        }

        cancelImgUpload() {
            this.imgUploadStatus = !1
        }

        handleImgUpload(e, t = !0) {
            return o(this, void 0, void 0, function* () {
                if (!e) return;
                if (this.checkFile(e)) {
                    this.handlePreview();
                    try {
                        this.isImageFrameShow = !0, this.isImgUploading = !0, v.XLStatNS.trackEvent(y, "comment_pic_upload_start", "", 0, 0, 0, 0, "add_type=" + (t ? "local" : "paste"));
                        let i = yield f.default.aliUpload(e, e => {
                            T.information("callback progress", e), this.imgUploadProgress = 100 * e
                        });
                        if (!i) throw new Error("no url");
                        T.information("aliUpload url", i), v.XLStatNS.trackEvent(y, "comment_pic_upload_result", "", 0, 0, 0, 0, "result=success"), this.commentImgUrl.push(i), this.resetImgUpload()
                    } catch (e) {
                        T.warning("error", e), v.XLStatNS.trackEvent(y, "comment_pic_upload_result", "", 0, 0, 0, 0, "result=fail"), this.showFailure("上传图片失败，请重试"), this.resetImgUpload(), this.isImageFrameShow = !1
                    }
                }
            })
        }

        checkFile(e) {
            if (!/^image\//.test(e.type)) return this.showFailure("你上传的不是图片,请上传图片类型"), !1;
            if (e.size > 1024 * this.maxSize * 1024) return this.showFailure(`你上传的图片过大，请上传${this.maxSize}M以下的图片`), !1;
            const t = e.name.lastIndexOf("."), i = e.name.substring(t + 1).toLowerCase();
            return !(["jpg", "jpeg", "png", "gif", "webp", "bmp"].indexOf(i) < 0) || (this.showFailure("不支持的格式"), !1)
        }

        handlePreview() {
            let e = this.$el.getBoundingClientRect();
            if (e.bottom + 120 > innerHeight) {
                let t = document.getElementById("xly-task-detail-down__main");
                t.scrollTop = e.bottom + 120 - innerHeight + t.scrollTop
            }
        }

        resetImgUpload() {
            this.isImgUploading = !1, this.imgUploadProgress = 0
        }

        handleImgClick() {
            this.tid && (this.imgUploadStatus = !0)
        }

        mounted() {
            document.body.addEventListener("mousedown", this.blurHandler)
        }

        beforeDestroy() {
            document.body.removeEventListener("mousedown", this.blurHandler)
        }

        login() {
            return o(this, void 0, void 0, function* () {
                if ("" === this.curUserId || "0" === this.curUserId) {
                    return yield h.default()
                }
                return this.curUserId
            })
        }

        getAuthPlatformParamObj() {
            return o(this, void 0, void 0, function* () {
                const e = yield p.LoginHelperNS.loginHelper.getUserInfoAw(),
                    t = yield g.client.callServerFunction("GetThunderVersion");
                return Object.assign({}, e, {appid: 165, clientVersion: t})
            })
        }

        auth() {
            return o(this, void 0, void 0, function* () {
                return yield g.client.callServerFunction("MessageBoxCustom", "PhoneAuth", {from: "comment"}, {webPreferences: {webSecurity: !1}})
            })
        }

        triggerUpload(e) {
            let t = (e.clipboardData || window.clipboardData).items;
            if (t && t.length) for (let e = 0; e < t.length; e++) if (-1 !== t[e].type.indexOf("image")) {
                let i = t[e].getAsFile();
                if (!i) break;
                this.commentImgUrl = [], this.handleImgUpload(i, !1);
                break
            }
        }
    };
    n([a.Prop()], k.prototype, "curTaskId", void 0), n([a.Prop({default: "0"})], k.prototype, "curUserId", void 0), n([a.Prop({default: ""})], k.prototype, "tid", void 0), n([a.Prop({})], k.prototype, "curUserNick", void 0), n([a.Prop()], k.prototype, "comment", void 0), n([a.Prop({default: 100})], k.prototype, "maxLength", void 0), n([a.Prop({default: 6})], k.prototype, "minLength", void 0), n([a.Prop({default: !1})], k.prototype, "focus", void 0), n([a.Prop()], k.prototype, "deviceId", void 0), n([a.Prop({default: ""})], k.prototype, "autoSendCommentText", void 0), n([a.Prop()], k.prototype, "currentCategoryViewId", void 0), n([a.Prop()], k.prototype, "currentCategoryId", void 0), n([a.Watch("curTaskId")], k.prototype, "onCurTaskIDChange", null), n([a.Watch("tid")], k.prototype, "onTidChange", null), n([a.Watch("text")], k.prototype, "onTextChange", null), n([a.Watch("placeholder")], k.prototype, "onPlaceholderChange", null), n([a.Watch("canShowCommentNote")], k.prototype, "oncanShowCommentNoteChange", null), k = n([a.Component({
        components: {
            Emoji: d.default,
            imgUpload: u.default,
            imgUploadPanel: c.default
        }
    })], k), t.default = k
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(288), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let a = class extends o.Vue {
        constructor() {
            super(...arguments), this.isTop = !1
        }

        handleClick(e) {
            if ("SPAN" === e.target.tagName) {
                let t = e.target, i = "[" + e.target.parentElement.getAttribute("title") + "]",
                    n = t.className.split("-")[3];
                this.$emit("pick", i, n, t)
            }
        }

        handleShowEmoji() {
            this.$el.getBoundingClientRect().bottom + 180 > innerHeight ? this.isTop = !0 : this.isTop = !1
        }
    };
    a = n([o.Component], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(290), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(58), r = i(6), s = i(9);
    let l = class extends r.Vue {
        handleFormClick() {
            return o(this, void 0, void 0, function* () {
                this.isEnable && s.XLStatNS.trackEvent("download_detail", "comment_box_pic_icon_click", "", 0, 0, 0, 0), this.curUserId ? this.isEnable && this.$refs[this.refName].click() : yield a.default()
            })
        }

        handleChange(e) {
            this.$emit("change", e)
        }

        handleDeleteImg() {
            this.$refs[this.refName].value = ""
        }
    };
    n([r.Prop({default: "imgInput"})], l.prototype, "refName", void 0), n([r.Prop({default: !0})], l.prototype, "isEnable", void 0), n([r.Prop({default: "0"})], l.prototype, "curUserId", void 0), l = n([r.Component], l), t.default = l
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(292), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(153), a = i(6);
    let r = class extends a.Vue {
        deleteCommentImg() {
            this.$emit("delete")
        }

        thumbnail(e) {
            return o.getThumbUrl(e, 110, 110)
        }
    };
    n([a.Prop()], r.prototype, "imgUploadProgress", void 0), n([a.Prop()], r.prototype, "isImgUploading", void 0), n([a.Prop()], r.prototype, "isImageFrameShow", void 0), n([a.Prop()], r.prototype, "commentImgUrl", void 0), n([a.Prop()], r.prototype, "showCommentImgPreview", void 0), r = n([a.Component], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(294), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(870), r = i(871), s = i(573), l = i(153), d = i(3), u = i(64), c = i(416), h = i(873),
        f = i(46), p = i(151), g = i(9), m = "download_detail";
    let v = class extends o.Vue {
        constructor() {
            super(...arguments), this.birdTimer = void 0, this.isParseBird = !1, this.isPraised = !1, this.isPariseAnimation = !1, this.isCommentInputCreate = !1, this.gcount = 0, this.isShowReport = !1, this.thunderCipher = void 0, this.shareFrom = "download_detail_page", this.resource = void 0, this.imgCode = void 0, this.isInputFocused = !1
        }

        onCommentInfoChange() {
            this.gcount = this.commentInfo.gcount, this.isPraised = this.commentInfo.isPraise
        }

        get praiseTitle() {
            return this.isPraised ? "您已点过赞" : "赞"
        }

        get curUserNick() {
            return this.curUser && this.curUser.nickName || ""
        }

        get userName() {
            let e = this.commentInfo.userName;
            return this.userInfo && this.userInfo.uid === this.curUserId && "0" !== this.curUserId && (e = this.curUser.nickName), e
        }

        get showSpeed() {
            let e = this.commentInfo.downLoadSpeed || "", t = e.toLowerCase();
            return !e || t.includes("mb/s") || t.includes("gb/s") || (e = ""), e
        }

        get isFast() {
            let e = this.showSpeed;
            if (e && e.toLowerCase().includes("mb/s")) {
                if (Number(e.slice(0, -4)) > 4) return !0
            }
            return !1
        }

        get isSelfComment() {
            return String(this.commentInfo.uid) === this.curUserId
        }

        get isVip() {
            let e = !1;
            for (let t of f(this.userInfo, "vip_extra") || []) if (2 === f(t, "vasID") && "1" === f(t, "isVIP")) {
                e = !0;
                break
            }
            return e
        }

        get vipIcon() {
            let e = "vip-icon-";
            for (let t of f(this.userInfo, "vip_extra")) if (2 === f(t, "vasID")) {
                let i = f(t, "vasType"), n = "vip";
                "5" === i ? n = "svip" : "3" === i && (n = "pvip"), e = `${e}${n}${f(t, "VIPLevel")}`;
                break
            }
            return e
        }

        get formatTime() {
            return u.TimeHelperNS.getPubTime(new Date(parseInt(this.commentInfo.time, 10)).getTime())
        }

        get reply() {
            return f(this.commentInfo, "replys", 0)
        }

        get cid() {
            let e = this.commentInfo.cid;
            return this.isHot && (e = "hot_" + this.commentInfo.cid), e
        }

        triggerReply(e) {
            e && e.target && e.target.classList.contains("xly-comment__bird-link") && this.handleBirdPwClick(e.target.innerText)
        }

        handleBirdPw(e) {
            return e.replace(/(【迅雷口令#[Xx]+[0-9a-zA-Z]+#】)|((?!【迅雷口令)(#[Xx]+[0-9a-zA-Z]+#))/gi, (e, t) => `<a class="xly-comment__bird-link" href="javascript:;">${e} </a>`)
        }

        handleBirdPwClick(e) {
            this.isParseBird || (this.isParseBird = !0, d.client.callServerFunction("CreateNewTask", JSON.stringify({
                0: {
                    type: "bird",
                    url: e,
                    stat: "detail_comment_text"
                }
            })), this.birdTimer = setTimeout(() => {
                this.isParseBird = !1
            }, 2e3))
        }

        replaceEmoji(e) {
            return l.replaceEmoji(e)
        }

        openReportPanel() {
            let e = "" === this.curUserId ? 0 : 1;
            g.XLStatNS.trackEvent(m, "dltab_detail_comment_click", "", 0, 0, 0, 0, "button=inform,is_login=" + e), this.curUserId && "0" !== this.curUserId ? this.isShowReport = !0 : d.client.callServerFunction("ShowLoginDlg")
        }

        reportComment(e, t, i = "") {
            c.default.reportComment({cid: this.commentInfo.cid, reason: parseInt(e, 10), desc: i}).then(e => {
                0 === e.code ? this.$message({
                    type: "success",
                    message: "举报成功",
                    position: "middle"
                }) : this.$message({type: "error", message: "举报失败", position: "middle"}), this.isShowReport = !1
            }).catch(() => {
                this.$message({type: "error", message: "举报失败", position: "middle"}), this.isShowReport = !1
            })
        }

        cancelReport() {
            this.isShowReport = !1
        }

        openrawimage(e) {
            c.default.getSingleComment({
                tid: this.tid,
                sourceId: this.commentInfo.sourceId,
                cid: this.commentInfo.cid,
                userId: this.commentInfo.uid
            }).then(t => {
                let i = "";
                i = "comment" === e ? f(t.comments[0].comment_info, "images")[0].url : f(t.comments[0].comment_info.replys[0], "images")[0].url, l.aliImageInfo(i).then(e => {
                    d.client.callServerFunction("MessageBoxCustom", "imgViewer", {
                        windowWidth: 900,
                        windowHeight: 616,
                        singleton: !1,
                        imgSrc: i
                    }, {resizable: !0})
                }).catch(() => {
                })
            })
        }

        replyComment() {
            this.showReply === this.cid ? this.$emit("update:showReply", "0") : this.$emit("update:showReply", this.cid), this.isCommentInputCreate = !0;
            let e = "" === this.curUserId ? 0 : 1;
            g.XLStatNS.trackEvent(m, "dltab_detail_comment_click", "", 0, 0, 0, 0, "button=clickreply,is_login=" + e)
        }

        deleteComment() {
            c.default.deleteComment({tid: this.tid, sourceId: this.tid, cid: this.commentInfo.cid}).then(() => {
                this.$emit("deleteComment", this.commentInfo.cid)
            }).catch();
            let e = "button=delete,is_login=" + ("" === this.curUserId ? 0 : 1);
            this.commentInfo && (e += ",commentid=" + f(this.commentInfo, "cid")), g.XLStatNS.trackEvent(m, "dltab_detail_comment_click", "", 0, 0, 0, 0, e)
        }

        praise() {
            if (this.isPraised) return;
            this.isPraised = !0, this.isPariseAnimation = !0, this.gcount += 1, c.default.likeComment({
                tid: this.tid,
                cid: this.commentInfo.cid,
                username: ""
            }).then(e => {
                0 !== e.result ? (this.isPraised = !1, this.isPariseAnimation = !1, this.gcount -= 1) : this.$emit("praiseComment", this.commentInfo.cid)
            }).catch(() => {
                this.isPraised = !1, this.isPariseAnimation = !1, this.gcount -= 1
            });
            let e = "" === this.curUserId ? 0 : 1;
            g.XLStatNS.trackEvent(m, "dltab_detail_comment_click", "", 0, 0, 0, 0, "button=like,is_login=" + e)
        }

        getResource(e) {
            return !!e && c.default.getResource(e).then(e => (this.resource = e, e))
        }

        isThunderCipher(e) {
            return void 0 === this.thunderCipher && (!!(e && e.target && e.target.classList.contains("xly-comment__bird-link")) && e.target.innerText.split("#")[1].substring(1))
        }

        getShareCode(e) {
            let t = `https://sl-m-ssl.xunlei.com/h5/page/download-share/index.html?entry=pic&appType=PC_web&storid=${e}&share_from=${this.shareFrom}`;
            e || (t = "https://mobile.xunlei.com/m/channel.html?from=PC"), p.toDataURL(t, {margin: 0}, (e, t) => {
                e || (this.imgCode = t)
            })
        }

        getSingleComment(e) {
            this.$emit("getSingleComment", e)
        }

        handleAvatarClick() {
            d.client.callServerFunction("OpenNewTab", l.getUserLink(f(this.userInfo, "uid")));
            let e = "button=author,is_login=" + ("" === this.curUserId ? 0 : 1);
            this.commentInfo && (e += ",commentid=" + f(this.commentInfo, "cid")), g.XLStatNS.trackEvent(m, "dltab_detail_comment_click", "", 0, 0, 0, 0, e)
        }

        mounted() {
            this.isPraised = this.commentInfo.isPraise || !1, this.gcount = parseInt(this.commentInfo.gcount, 10) || 0, (this.commentInfo.images || this.reply && this.reply.images) && g.XLStatNS.trackEvent(m, "comment_pic_show", "", 0, 0, 0, 0)
        }
    };
    n([o.Prop({required: !0})], v.prototype, "curTaskId", void 0), n([o.Prop({default: !1})], v.prototype, "isHot", void 0), n([o.Prop({required: !0})], v.prototype, "userInfo", void 0), n([o.Prop({required: !0})], v.prototype, "commentInfo", void 0), n([o.Prop({required: !0})], v.prototype, "tid", void 0), n([o.Prop({default: "0"})], v.prototype, "curUserId", void 0), n([o.Prop({})], v.prototype, "curUser", void 0), n([o.Prop()], v.prototype, "deviceId", void 0), n([o.Prop()], v.prototype, "vipInfo", void 0), n([o.Prop()], v.prototype, "currentCategoryId", void 0), n([o.Prop()], v.prototype, "currentCategoryViewId", void 0), n([o.Prop()], v.prototype, "showReply", void 0), n([o.Watch("commentInfo.gcount")], v.prototype, "onCommentInfoChange", null), v = n([o.Component({
        components: {
            UserHeadCard: a.default,
            CommentImg: r.default,
            CommentInput: s.default,
            commentReport: h.default
        }
    })], v), t.default = v
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(296), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(46);
    let r = class extends o.Vue {
        get avatar() {
            let e = "";
            return this.userInfo && a(this.userInfo, "uid") === this.curUserId && (e = a(this.curUser, "imgURL")) && (e = e.replace("%s", "100x100")), e || (e = a(this.userInfo, "portrait_url") || a(this.comment, "userImg")), e
        }
    };
    n([o.Prop()], r.prototype, "userInfo", void 0), n([o.Prop()], r.prototype, "userImg", void 0), n([o.Prop()], r.prototype, "curUserId", void 0), n([o.Prop()], r.prototype, "comment", void 0), n([o.Prop()], r.prototype, "curUser", void 0), r = n([o.Component], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(298), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(153), r = i(3), s = i(6), l = i(9);
    let d = class extends s.Vue {
        constructor() {
            super(...arguments), this.loadingImg = i(872), this.imgWidth = 0, this.imgHeight = 0, this.isLarge = !1, this.showRawImg = !0
        }

        get imgViewUrl() {
            return a.aliImageView(this.imgUrl, 1, 390, 1e3)
        }

        get imgRatio() {
            return this.imgWidth / this.imgHeight
        }

        get isLong() {
            return this.imgRatio <= .5 && this.imgHeight >= 200
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                try {
                    a.aliImageInfo(this.imgUrl).then(e => {
                        this.imgWidth = e.ImageWidth.value, this.imgHeight = e.ImageHeight.value
                    }).catch()
                } catch (e) {
                }
            })
        }

        lazyImgObj(e) {
            return a.lazyImgObj(e)
        }

        toggleView() {
            this.isLarge = !this.isLarge, this.isLarge && l.XLStatNS.trackEvent("download_detail", "comment_pic_click", "", 0, 0, 0, 0, "button=enlarge")
        }

        openRawImage() {
            a.aliImageInfo(this.imgUrl).then(e => {
                r.client.callServerFunction("MessageBoxCustom", "imgViewer", {
                    windowWidth: 900,
                    windowHeight: 616,
                    singleton: !1,
                    imgSrc: this.imgUrl
                }, {resizable: !0})
            }).catch(() => {
                this.$emit("openrawimage")
            }), l.XLStatNS.trackEvent("download_detail", "comment_pic_click", "", 0, 0, 0, 0, "button=original_image")
        }
    };
    n([s.Prop({required: !0})], d.prototype, "imgUrl", void 0), n([s.Prop({default: !1})], d.prototype, "showReport", void 0), n([s.Prop({default: !1})], d.prototype, "isSelfComment", void 0), d = n([s.Component], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(300), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(46), r = i(9);
    let s = class extends o.Vue {
        constructor() {
            super(...arguments), this.reportOptions = [{label: "低俗色情", value: 1}, {
                label: "血腥暴力",
                value: 2
            }, {label: "政治言论", value: 3}, {label: "垃圾广告", value: 7}, {label: "人身攻击", value: 5}, {
                label: "其他",
                value: 6
            }], this.reportType = "", this.reportMessage = "", this.showReport = !0, this.typeKeyMap = {
                1: "porn",
                2: "violence",
                3: "political",
                5: "personal_attack",
                6: "other",
                7: "ad"
            }
        }

        handleReportSubmit() {
            this.$emit("report", this.reportType, this.typeKeyMap[this.reportType], this.reportMessage);
            let e = "report_type=" + this.typeKeyMap[this.reportType];
            this.commentInfo && (e += ",commentid=" + a(this.commentInfo, "cid")), this.userInfo && (e += ",userid=" + a(this.userInfo, "uid")), r.XLStatNS.trackEvent("download_detail", "dltab_detail_comment_report", "", 0, 0, 0, 0, e)
        }

        handleReportCancel() {
            this.$emit("cancelReport")
        }

        mounted() {
            let e = "";
            this.commentInfo && (e += "commentid=" + a(this.commentInfo, "cid")), this.userInfo && (e += ",userid=" + a(this.userInfo, "uid")), r.XLStatNS.trackEvent("download_detail", "dltab_detail_comment_report_float_show", "", 0, 0, 0, 0, e)
        }
    };
    n([o.Prop({default: 200})], s.prototype, "maxlength", void 0), n([o.Prop({required: !0})], s.prototype, "userInfo", void 0), n([o.Prop({required: !0})], s.prototype, "commentInfo", void 0), s = n([o.Component], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(302), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(9);
    let r = class extends o.Vue {
        constructor() {
            super(...arguments), this.index = 0
        }

        get quickReviews() {
            return this.quickReviewConfigs[this.index] || []
        }

        handlerTid(e) {
            e && this.refresh()
        }

        onQuickReviewShow(e) {
            if (!this.quickReviewConfigs[e]) return;
            let t = "";
            for (let i of this.quickReviewConfigs[e]) t += "|" + encodeURIComponent(i);
            a.XLStatNS.trackEvent("download_detail", "dltab_detail_quickcomment_show", "", 0, 0, 0, 0, "comments=" + t.slice(1))
        }

        refresh() {
            if (this.quickReviewConfigs.length <= 1) return;
            let e = this.index, t = e;
            for (; t === e;) t = Math.floor(Math.random() * this.quickReviewConfigs.length);
            this.index = t;
            let i = "button=author,is_login=" + ("" === this.curUserId ? 0 : 1);
            a.XLStatNS.trackEvent("download_detail", "dltab_detail_comment_click", "", 0, 0, 0, 0, i)
        }

        clickQuickReview(e) {
            this.$emit("sendQuickReview", {cid: "", comment: e});
            let t = "";
            t += encodeURIComponent(e), a.XLStatNS.trackEvent("download_detail", "dltab_detail_quickcomment_click", "", 0, 0, 0, 0, "comments=" + t)
        }
    };
    n([o.Prop({default: ""})], r.prototype, "tid", void 0), n([o.Prop({default: []})], r.prototype, "quickReviewConfigs", void 0), n([o.Prop({default: "0"})], r.prototype, "curUserId", void 0), n([o.Watch("tid")], r.prototype, "handlerTid", null), n([o.Watch("index", {immediate: !0})], r.prototype, "onQuickReviewShow", null), r = n([o.Component({components: {}})], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(304), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(542), s = i(3), l = i(10), d = i(45), u = i(9);
    let c = class extends a.Vue {
        constructor() {
            super(...arguments), this.movieList = [], this.showMore = !1, this.showList = !0, this.movieConfig = {yingyuan_dl_recommend: 0}, this.isOpen = !0, this.seeIndex = 0
        }

        get filterRecommendList() {
            return this.movieList || []
        }

        onCurTaskIdChange() {
            return o(this, void 0, void 0, function* () {
                if (0 === this.movieConfig.yingyuan_dl_recommend) return;
                let e = yield r.MovieRecommendNS.recommend();
                e && (this.movieList = e, this.handleSee()), this.seeIndex = 0
            })
        }

        handleSee() {
            let e = "0";
            this.vipInfo && "1" === this.vipInfo.isVip && (e = this.vipInfo.vasType);
            let t = "";
            for (let e = 0; e < this.movieList.length; e++) {
                let i = this.filterRecommendList[e];
                t += `video_type=${"movie" === i.category ? "电影" : "电视剧"},video_id=${i.aid},video_name=${i.work_name},position=${e + 1};`
            }
            let i = encodeURIComponent(t);
            u.XLStatNS.trackEvent("download_detail", "dl_detail_vip_special_content_show", "", 0, 0, 0, 0, `is_login=${this.isLogined ? 1 : 0},userid=${this.curUserId},usertype=${e},type=${this.showList ? "open" : "close"},referfrom=v_pc_xlx_ggong_dl_detail_vipsp,movielist=(${i})`)
        }

        handleSeeItem(e) {
            this.seeIndex < e && (this.seeIndex = e)
        }

        handleShowMore() {
            this.showMore = !this.showMore;
            let e = "0";
            this.vipInfo && "1" === this.vipInfo.isVip && (e = this.vipInfo.vasType), u.XLStatNS.trackEvent("download_detail", "dl_detail_vip_special_button_click", "", 0, 0, 0, 0, `is_login=${this.isLogined ? 1 : 0},userid=${this.curUserId},usertype=${e},referfrom=v_pc_xlx_ggong_dl_detail_vipsp,click_id=more`)
        }

        hideShowMore() {
            this.showMore = !1
        }

        showHomePage(e) {
            let t = `https://video-vip-ssl.xunlei.com/index_pc.html?referfrom=${e}`;
            s.client.callServerFunction("OpenNewTab", t).catch(), this.showMore = !1;
            let i = "0";
            this.vipInfo && "1" === this.vipInfo.isVip && (i = this.vipInfo.vasType), u.XLStatNS.trackEvent("download_detail", "dl_detail_vip_special_button_click", "", 0, 0, 0, 0, `is_login=${this.isLogined ? 1 : 0},userid=${this.curUserId},usertype=${i},referfrom=v_pc_xlx_ggong_dl_detail_vipsp,click_id=more`)
        }

        openMoviePage(e, t) {
            let i = `${e}&referfrom=v_pc_xlx_ggong_dl_detail_vipsp`;
            s.client.callServerFunction("OpenNewTab", i).catch();
            let n = "0";
            this.vipInfo && "1" === this.vipInfo.isVip && (n = this.vipInfo.vasType);
            let o = this.filterRecommendList[t],
                a = encodeURIComponent(`video_type=${"movie" === o.category ? "电影" : "电视剧"},video_id=${o.aid},video_name=${o.work_name},position=${t + 1}`);
            u.XLStatNS.trackEvent("download_detail", "dl_detail_vip_special_content_click", "", 0, 0, 0, 0, `is_login=${this.isLogined ? 1 : 0},userid=${this.curUserId},usertype=${n},referfrom=v_pc_xlx_ggong_dl_detail_vipsp,${a}`)
        }

        handleShowList() {
            let e = "0";
            this.vipInfo && "1" === this.vipInfo.isVip && (e = this.vipInfo.vasType), u.XLStatNS.trackEvent("download_detail", "dl_detail_vip_special_button_click", "", 0, 0, 0, 0, `is_login=${this.isLogined ? 1 : 0},userid=${this.curUserId},usertype=${e},referfrom=v_pc_xlx_ggong_dl_detail_vipsp,click_id=${this.showList ? "close" : "open"}`), this.showList = !this.showList, this.showMore = !1, 3 === this.movieConfig.yingyuan_dl_recommend && l.ConfigNS.setValue("yingyuan_search_dl", "yingyuan_dl_recommend_open", this.showList)
        }

        created() {
            return o(this, void 0, void 0, function* () {
                d.default.isInited() ? this.handleRemoteConfig() : d.default.attachListener("OnRemoteGlobalConfigLoaded", () => o(this, void 0, void 0, function* () {
                    this.handleRemoteConfig()
                }))
            })
        }

        handleRemoteConfig() {
            return o(this, void 0, void 0, function* () {
                let e = d.default.getConfigValue("vip", "yingyuan_search_dl", null);
                e && void 0 !== e.yingyuan_dl_recommend && (this.movieConfig = e), 2 === this.movieConfig.yingyuan_dl_recommend ? (s.client.attachServerEvent("OnLoginSuc", () => {
                    this.showList = !0
                }), s.client.attachServerEvent("OnLogout", () => {
                    this.showList = !0
                })) : 3 === this.movieConfig.yingyuan_dl_recommend && (l.ConfigNS.isInitConfigFinished() ? this.handleLocalConfig() : l.ConfigNS.attachListener("event_config_init_finished", this.handleLocalConfig))
            })
        }

        handleLocalConfig() {
            this.isOpen = l.ConfigNS.getValue("yingyuan_search_dl", "yingyuan_dl_recommend_open", !0), this.isOpen || (this.showList = !1)
        }
    };
    n([a.Prop({default: 0})], c.prototype, "curTaskId", void 0), n([a.Prop()], c.prototype, "vipInfo", void 0), n([a.Prop()], c.prototype, "isLogined", void 0), n([a.Prop()], c.prototype, "curUserId", void 0), n([a.Watch("curTaskId")], c.prototype, "onCurTaskIdChange", null), c = n([a.Component], c), t.default = c
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(306), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(879), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            currentCategoryId: e => e.DownloadListState.currentCategoryId,
            currentCategoryViewId: e => e.DownloadListState.currentCategoryViewId,
            currentTabId: e => e.Tabs.current
        },
        mapCommitToProps: {
            UPDATE_CATEGORY: "UPDATE_CATEGORY",
            UPDATE_CATEGORYVIEW: "UPDATE_CATEGORYVIEW",
            INIT_CATEGORY_TASKLIST: "INIT_CATEGORY_TASKLIST",
            UPDATE_DOWNLOADING_SELECTED_TASKS: "UPDATE_DOWNLOADING_SELECTED_TASKS",
            UPDATE_COMPLETED_SELECTED_TASKS: "UPDATE_COMPLETED_SELECTED_TASKS",
            UPDATE_RECYCLE_SELECTED_TASKS: "UPDATE_RECYCLE_SELECTED_TASKS",
            MOVE_TO_TOP: "MOVE_TO_TOP",
            MOVE_TO_BOTTOM: "MOVE_TO_BOTTOM",
            SELECT_PRE: "SELECT_PRE",
            SELECT_NEXT: "SELECT_NEXT",
            INSERT_TO_CATEGORY_VIEW: "INSERT_TO_CATEGORY_VIEW",
            UPDATE_TASK_STATUS: "UPDATE_TASK_STATUS",
            SORT_CATEGORY_HISTORY: "SORT_CATEGORY_HISTORY",
            SORT_CATEGORY_BY_FUNCTION: "SORT_CATEGORY_BY_FUNCTION",
            UPDATE_DOWNLOADING_TASKLIST: "UPDATE_DOWNLOADING_TASKLIST",
            UPDATE_COMPLETED_TASKLIST: "UPDATE_COMPLETED_TASKLIST",
            UPDATE_RECYCLE_TASKLIST: "UPDATE_RECYCLE_TASKLIST",
            LOAD_MORE: "LOAD_MORE",
            FILTER_TASK: "FILTER_TASK",
            FILTER_TASK_LOAD_MORE: "FILTER_TASK_LOAD_MORE"
        },
        mapDispatchToProps: {attachTaskEvent: "attachTaskEvent", selectTab: "selectTab"},
        mapGettersToProps: {
            downloadingTaskList: e => e.downloadingTaskList,
            completedTaskList: e => e.completedTaskList,
            recycleTaskList: e => e.recycleTaskList,
            downloadingLoadedList: e => e.downloadingLoadedList,
            completedLoadedList: e => e.completedLoadedList,
            completedFilterTaskList: e => e.completedFilterTaskList,
            completedFilterLoadedList: e => e.completedFilterLoadedList,
            recycleLoadedList: e => e.recycleLoadedList,
            currentSelectdTaskIds: e => e.currentSelectdTaskIds,
            downloadingSelectedIndexs: e => e.downloadingSelectedIndexs,
            completedSelectedTaskIndexs: e => e.completedSelectedTaskIndexs,
            recycleSelectedTaskIndexs: e => e.recycleSelectedTaskIndexs
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(308), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(62), r = i(6), s = i(0), l = i(4), d = i(59), u = i(574), c = i(34), h = i(114), f = i(13), p = i(30),
        g = i(9), m = i(33), v = i(16), y = i(11), T = i(401), w = i(51), k = i(75), C = i(10), b = i(3), I = i(15),
        S = i(45), _ = i(26), D = i(46), A = v.DownloadKernelEventManager.getEventManager(),
        N = y.DownloadKernelTaskManager.getTaskManager(), x = _.DownloadKernelCategoryManager.getCategoryManager(),
        E = s.default.getLogger("DownloadList");
    let O = class extends r.Vue {
        constructor() {
            super(...arguments), this.bLoadDbFinish = !1, this.insertToCategoryViewEventId = void 0, this.statusChangedEventId = void 0, this.dataBaseLoadCookie = void 0, this.isHoverClass = !1, this.emptyHotwordList = [], this.delayStatTimer = null, this.panTaskProgress = 100, this.panTaskType = P.UnSaved, this.panTaskData = {}, this.sideNetdiskVasType = [3, 5], this.qrCodeConfig = {
                show: !1,
                text: "扫码加速"
            }, this.tabs = [{title: "下载中", key: l.DownloadKernel.CategroyViewID.Downloading}, {
                title: "已完成",
                key: l.DownloadKernel.CategroyViewID.Completed
            }, {title: "回收站", key: l.DownloadKernel.CategroyViewID.Recycle}], this.completedFilter = "全部"
        }

        get showSideNetdisk() {
            let e = 0;
            return this.vipInfo && "1" === this.vipInfo.isVip && (e = Number(this.vipInfo.vasType)), this.sideNetdiskVasType.some(t => t === e)
        }

        handleTitleClick(e) {
            this.handleCollapseChange(e)
        }

        onCategoryChange(e) {
            p.default.fireEvent(f.NodeEventMesssageNS.eventDownloadItemActive, this.currentCategoryViewId, !1, 0, null, !0), this.$nextTick(() => {
                E.information("onCategoryChange nextTick"), this.completedListRestore()
            })
        }

        onCategoryViewChange(e, t) {
            t === l.DownloadKernel.CategroyViewID.Completed && this.completedListRestore()
        }

        onCompletedFilterChange() {
            this.UPDATE_COMPLETED_SELECTED_TASKS([])
        }

        get isInPrivateSpace() {
            return -1 !== this.currentCategoryId
        }

        get completedCategoryLoadedList() {
            let e = [];
            do {
                if ("全部" === this.completedFilter) {
                    e = this.completedLoadedList;
                    break
                }
                e = this.completedFilterLoadedList
            } while (0);
            return e
        }

        canStartAll() {
            let e = !0;
            for (let t of this.downloadingTaskList) {
                let i = N.getTaskFromTaskId(t);
                if (i && i.getTaskBaseInfo().isMoving) {
                    e = !1;
                    break
                }
            }
            return e
        }

        completedListRestore() {
            T.CompletedFilterNS.reset(), this.completedFilter = "全部", this.FILTER_TASK([])
        }

        completeLoadMore(e) {
            "全部" === this.completedFilter ? this.LOAD_MORE(e) : this.FILTER_TASK_LOAD_MORE(e)
        }

        onFilterMenuClick(e, t) {
            this.completedFilter = e.label, t ? this.FILTER_TASK(t) : this.FILTER_TASK([])
        }

        showFilterMenu(e) {
            T.CompletedFilterNS.showMenu(this.$refs.filterMenu, this.currentCategoryId, (e, t) => {
                this.onFilterMenuClick(e, t)
            }).catch()
        }

        handleCollapseChange(e) {
            let t = e, i = "", n = "";
            t === l.DownloadKernel.CategroyViewID.Downloading ? (i = "downloading_click", n = "type=" + (this.hasDownloading ? "yes" : "no")) : t === l.DownloadKernel.CategroyViewID.Completed ? i = "finished_click" : t === l.DownloadKernel.CategroyViewID.Recycle && (i = "dustbin_click"), g.XLStatNS.trackEvent("download_leftpanel", i, "", 0, 0, 0, 0, n), this.UPDATE_CATEGORYVIEW(t)
        }

        getTaskBaseInfos(e) {
            let t = [];
            for (let i of e) {
                let e = N.getTaskFromTaskId(i);
                if (!e) continue;
                let n = e.getTaskBaseInfo();
                t.push(n)
            }
            return t
        }

        getCompletedTaskBaseList() {
            return this.getTaskBaseInfos(this.completedTaskList)
        }

        getSelectdTaskInfos() {
            return this.getTaskBaseInfos(this.currentSelectdTaskIds)
        }

        handleDelete(e, t) {
            do {
                if (40 === e.keyCode) {
                    1 === this.currentSelectdTaskIds.length && this.SELECT_NEXT();
                    break
                }
                if (38 === e.keyCode) {
                    1 === this.currentSelectdTaskIds.length && this.SELECT_PRE();
                    break
                }
                if ("Delete" !== e.key) break;
                let i = this.getSelectdTaskInfos();
                if (!d.TaskStatusHelper.canMoveSelectedTask(void 0, i)) break;
                if (void 0 === t) if (-1 !== this.currentCategoryId) t = !0; else if (e.shiftKey) t = !0; else for (let e of i) if (-1 !== e.categoryId) {
                    t = !0;
                    break
                }
                t ? c.TaskOperatorNs.destroyTasks(i) : c.TaskOperatorNs.deleteTasks(i)
            } while (0)
        }

        handlePauseAll() {
            -1 === this.currentCategoryId ? c.TaskOperatorNs.pauseAll(l.DownloadKernel.TaskStopReason.PauseAll).catch() : c.TaskOperatorNs.pauseCategoryAllTask(this.currentCategoryId, l.DownloadKernel.TaskStopReason.PauseAll), g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_button_click", "", 0, 0, 0, 0, "button=pause")
        }

        handleStartAll() {
            -1 === this.currentCategoryId ? c.TaskOperatorNs.startAll() : c.TaskOperatorNs.startCategoryAllTask(this.currentCategoryId), g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_button_click", "", 0, 0, 0, 0, "button=start")
        }

        get hasDownloading() {
            return this.downloadingTaskList.length > 0
        }

        downloadingItemDbClick() {
            let e = this.getSelectdTaskInfos();
            d.TaskStatusHelper.canStopSelectedTask(this.currentCategoryViewId, e) ? c.TaskOperatorNs.pauseTasks(e, l.DownloadKernel.TaskStopReason.Manual) : d.TaskStatusHelper.canStartSelectedTask(this.currentCategoryViewId, e) ? c.TaskOperatorNs.startTasks(e) : E.information("downloaditem dbclick do nothing")
        }

        handleHotwordsClick(e) {
            return o(this, void 0, void 0, function* () {
                if ("" === e.url) {
                    yield S.default.isInitedAW();
                    let t = S.default.getConfigValue("search", "search_engine_url", "https://www.baidu.com/s?tn=58025142_4_oem_dg&wd=$word$");
                    t = t.replace("$word$", encodeURIComponent(e.word)), e.url = t
                }
                yield b.client.callServerFunction("OpenNewTab", e.url), g.XLStatNS.trackEvent("download_leftpanel", "downloading_hotword_click", "", 0, 0, 0, 0, {
                    word: e.word,
                    is_ad: e.isAd ? 1 : 0
                })
            })
        }

        handleDownloadingItemMenu(e) {
            h.downloadContextMenu.setContextInfo(this, this.currentCategoryId, this.downloadingTaskList.length), h.downloadContextMenu.popMenu(h.DownloadMenuType.DownloadingItem, e)
        }

        handleCompletedItemMenu(e) {
            h.downloadContextMenu.setContextInfo(this, this.currentCategoryId), h.downloadContextMenu.popMenu(h.DownloadMenuType.CompletedItem, e)
        }

        handleRecycleItemMenu(e) {
            h.downloadContextMenu.setContextInfo(this, this.currentCategoryId), h.downloadContextMenu.popMenu(h.DownloadMenuType.RecycleItem, e)
        }

        handleDownloadingBlankMenu(e) {
            -1 === this.currentCategoryId && (0 === this.currentSelectdTaskIds.length ? (h.downloadContextMenu.setContextInfo(this, this.currentCategoryId), h.downloadContextMenu.popMenu(h.DownloadMenuType.DownloadingBlank, e)) : this.handleDownloadingItemMenu(e))
        }

        handleRecycleBlankMenu(e) {
            0 === this.currentSelectdTaskIds.length ? (h.downloadContextMenu.setContextInfo(this, this.currentCategoryId), h.downloadContextMenu.popMenu(h.DownloadMenuType.RecycleBlank, e)) : this.handleRecycleItemMenu(e)
        }

        handleDownloadingCategoryMore(e) {
            h.downloadContextMenu.setContextInfo(this, this.currentCategoryId), h.downloadContextMenu.popMenu(h.DownloadMenuType.DownloadingCategory, e)
        }

        handleDownloadingCategoryMenu(e) {
            this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Downloading ? -1 === this.currentCategoryId && this.handleDownloadingCategoryMore(e) : this.handleCollapseChange(l.DownloadKernel.CategroyViewID.Downloading)
        }

        handleCompletedCategoryMore(e) {
            h.downloadContextMenu.setContextInfo(this, this.currentCategoryId), h.downloadContextMenu.popMenu(h.DownloadMenuType.CompletedCategory, e)
        }

        handleCompletedCategoryMenu(e) {
            this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Completed ? this.handleCompletedCategoryMore(e) : this.handleCollapseChange(l.DownloadKernel.CategroyViewID.Completed)
        }

        handleRecycleCategoryMore(e) {
            h.downloadContextMenu.setContextInfo(this, this.currentCategoryId), h.downloadContextMenu.popMenu(h.DownloadMenuType.RecycleCategory, e)
        }

        handleRecycleCategoryMenu(e) {
            this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Recycle ? this.handleRecycleCategoryMore(e) : this.handleCollapseChange(l.DownloadKernel.CategroyViewID.Recycle)
        }

        selectAll() {
            let e = [], t = null;
            switch (this.currentCategoryViewId) {
                case l.DownloadKernel.CategroyViewID.Downloading:
                    t = this.UPDATE_DOWNLOADING_SELECTED_TASKS, e = [...this.downloadingTaskList];
                    break;
                case l.DownloadKernel.CategroyViewID.Completed:
                    t = this.UPDATE_COMPLETED_SELECTED_TASKS, e = "全部" === this.completedFilter ? [...this.completedTaskList] : [...this.completedFilterTaskList];
                    break;
                case l.DownloadKernel.CategroyViewID.Recycle:
                    t = this.UPDATE_RECYCLE_SELECTED_TASKS, e = [...this.recycleTaskList]
            }
            e.length > 0 && null !== t && t(e)
        }

        moveUp() {
            this.MOVE_TO_TOP(this.downloadingSelectedIndexs)
        }

        moveDown() {
            this.MOVE_TO_BOTTOM(this.downloadingSelectedIndexs)
        }

        handleMenuClick(e, ...t) {
            switch (e) {
                case"select_all":
                    this.selectAll();
                    break;
                case"move_up":
                    this.moveUp();
                    break;
                case"move_down":
                    this.moveDown()
            }
        }

        handleMenuPopup() {
        }

        handleMenuEnd() {
        }

        scrollToSpecified(e, t, i, n, o) {
            let a = i.indexOf(e);
            if (-1 !== a) if (1 === n.length && n[0] === e) this.$refs[t].scrollTo(a); else if (a <= this.$refs[t].getLoadedCount() - 1) o([e]); else {
                let t = {
                    categoryId: this.currentCategoryId,
                    categoryViewId: this.currentCategoryViewId,
                    toIndex: a + 1
                };
                this.LOAD_MORE(t), this.$nextTick(() => {
                    o([e])
                })
            }
        }

        selectTask(e, t) {
            void 0 !== t && (e === l.DownloadKernel.CategroyViewID.Downloading ? this.scrollToSpecified(t, "downloading", this.downloadingTaskList, this.downloadingSelectedIndexs, this.UPDATE_DOWNLOADING_SELECTED_TASKS) : e === l.DownloadKernel.CategroyViewID.Completed ? "全部" !== this.completedFilter ? (this.completedListRestore(), this.$nextTick(() => {
                this.scrollToSpecified(t, "completed", this.completedTaskList, this.completedSelectedTaskIndexs, this.UPDATE_COMPLETED_SELECTED_TASKS)
            })) : this.scrollToSpecified(t, "completed", this.completedTaskList, this.completedSelectedTaskIndexs, this.UPDATE_COMPLETED_SELECTED_TASKS) : e === l.DownloadKernel.CategroyViewID.Recycle && this.scrollToSpecified(t, "dustbin", this.recycleTaskList, this.recycleSelectedTaskIndexs, this.UPDATE_RECYCLE_SELECTED_TASKS))
        }

        created() {
            this.attachTaskEvent(), h.downloadContextMenu.attachListener(f.NodeEventMesssageNS.eventDownloadContextMenuClick, this.handleMenuClick), h.downloadContextMenu.attachListener(f.NodeEventMesssageNS.eventDownloadContextMenuPopup, this.handleMenuPopup), h.downloadContextMenu.attachListener(f.NodeEventMesssageNS.eventDownloadContextMenuEnd, this.handleMenuEnd), p.default.attachListener(f.NodeEventMesssageNS.evetDownloadMove2Tail, (e, t) => {
                this.MOVE_TO_BOTTOM([e]), t && this.$nextTick(() => {
                    t()
                })
            }), b.client.attachServerEvent("OnPanTaskTypeChange", (e, ...t) => {
                t && (this.panTaskType = t[0])
            }), b.client.attachServerEvent("OnPanTaskUploadProgressChange", (e, ...t) => {
                !t || t.length < 1 || (this.panTaskProgress = t[0])
            }), b.client.attachServerEvent("OnPanTaskDataChange", (e, ...t) => {
                !t || t.length < 1 || (this.panTaskData = t[0])
            })
        }

        shouldChange2Complete() {
            let e = !1;
            do {
                if (this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Recycle && this.recycleSelectedTaskIndexs.length > 0) {
                    e = !1;
                    break
                }
                if (this.currentCategoryViewId !== l.DownloadKernel.CategroyViewID.Downloading) {
                    e = !0;
                    break
                }
                if (this.downloadingSelectedIndexs.length > 0) {
                    e = !1;
                    break
                }
                e = !0;
                for (let t of this.downloadingTaskList) {
                    let i = N.getTaskFromTaskId(t);
                    if (!i) continue;
                    let n = i.getTaskBaseInfo();
                    if (n.taskStatus === l.DownloadKernel.TaskStatus.StartPending || n.taskStatus === l.DownloadKernel.TaskStatus.Started) {
                        e = !1;
                        break
                    }
                }
            } while (0);
            return e
        }

        shouldChangeCompleteSelect() {
            let e = !1;
            do {
                if (this.currentCategoryViewId !== l.DownloadKernel.CategroyViewID.Completed) {
                    e = !0;
                    break
                }
                if (0 === this.completedSelectedTaskIndexs.length) {
                    e = !0;
                    break
                }
            } while (0);
            return e
        }

        onTaskDataBaseLoadEnd() {
            this.bLoadDbFinish = !0, this.$nextTick(() => {
                C.ConfigNS.attachListener(f.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    this.SORT_CATEGORY_HISTORY(), 0 === this.downloadingTaskList.length && this.completedTaskList.length > 0 && this.UPDATE_CATEGORYVIEW(l.DownloadKernel.CategroyViewID.Completed)
                })
            })
        }

        handleKeyDown(e) {
            if (e.ctrlKey && 68 === e.keyCode) {
                if (this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Downloading && this.currentSelectdTaskIds.length > 0) {
                    let e = this.getSelectdTaskInfos();
                    c.TaskOperatorNs.startTasks(e)
                }
            } else if (e.ctrlKey && 83 === e.keyCode) {
                if (this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Downloading && this.currentSelectdTaskIds.length > 0) {
                    let e = this.getSelectdTaskInfos();
                    c.TaskOperatorNs.pauseTasks(e, l.DownloadKernel.TaskStopReason.Manual)
                }
            } else if (e.ctrlKey && 69 === e.keyCode) {
                if (1 === this.currentSelectdTaskIds.length) {
                    let e = this.getSelectdTaskInfos();
                    c.TaskOperatorNs.openTaskFolder(e[0]).catch(e => {
                        E.warning(e)
                    }), this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Completed && c.TaskOperatorNs.markReadStatus(e, 1)
                }
            } else if (e.ctrlKey && 82 === e.keyCode) {
                if (this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Recycle && this.currentSelectdTaskIds.length > 0) {
                    let e = this.getSelectdTaskInfos();
                    c.TaskOperatorNs.recoverTask(e)
                }
            } else if (e.ctrlKey && 13 === e.keyCode && (this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Recycle || this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Completed) && 1 === this.currentSelectdTaskIds.length) {
                let e = this.getSelectdTaskInfos(), t = e[0].taskStatus;
                if (t === l.DownloadKernel.TaskStatus.Succeeded || t === l.DownloadKernel.TaskStatus.Seeding) {
                    let t = "";
                    if (this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Completed ? t = "finished" : this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Recycle && (t = "dustbin"), e[0].taskType === l.DownloadKernel.TaskType.Bt) {
                        let t = N.getTaskFromTaskId(e[0].taskId);
                        w.SingleBtTaskNS.isSingleBtTask(t).then(t => {
                            t ? c.TaskOperatorNs.openTaskItem(e[0]).catch() : c.TaskOperatorNs.openTaskFolder(e[0], !0).catch()
                        }).catch()
                    } else if (e[0].taskType === l.DownloadKernel.TaskType.Group) {
                        let t = N.getTaskFromTaskId(e[0].taskId);
                        c.TaskOperatorNs.executeInstallFile(t).then(t => {
                            t || c.TaskOperatorNs.openTaskFolder(e[0], !0).catch()
                        }).catch()
                    } else c.TaskOperatorNs.openTaskItem(e[0], void 0, void 0, t, this.currentCategoryId).catch(e => {
                        E.warning(e)
                    });
                    this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Completed && c.TaskOperatorNs.markReadStatus(e, 1)
                }
            }
        }

        getHotwords() {
            return o(this, void 0, void 0, function* () {
                const e = yield i(18);
                e.defaults.adapter = i(21);
                let t = [], n = !1;
                try {
                    let i = new a.Agent({rejectUnauthorized: !1}), o = yield e.request({
                        method: "get",
                        url: "https://static-xl.a.88cdn.com/json/hotwords.json",
                        timeout: 1e4,
                        httpsAgent: i
                    });
                    200 === o.status && o.data && (t = o.data, n = !0)
                } catch (e) {
                    E.information("request hotwords.json exception! e", e)
                }
                if (E.information("request hotwords.json data:", t), n || g.XLStatNS.trackEvent("download_leftpanel", "downloading_hotword_update_fail"), t.length > 0) {
                    let e = yield k.AdHelperNS.getHotWordsAw(), i = D(e, "data", 0, "query");
                    E.information("getHotWordsAw adQueryWord:", i), i && i.length > 0 ? t[t.length - 1] = {
                        word: i,
                        url: "",
                        isAd: !0
                    } : g.XLStatNS.trackEvent("download_leftpanel", "downloading_hotword_ad_update_fail");
                    for (let e = 0; e < t.length / 2; ++e) {
                        this.emptyHotwordList[e] = [];
                        for (let i = 0; i < 2 && 2 * e + i < t.length; ++i) this.emptyHotwordList[e][i] = t[2 * e + i]
                    }
                    E.information("this.emptyHotwordList:", this.emptyHotwordList), g.XLStatNS.trackEvent("download_leftpanel", "downloading_hotword_show")
                }
            })
        }

        handleCategoryMore(e) {
            this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Downloading ? this.handleDownloadingCategoryMore(e) : this.currentCategoryViewId === l.DownloadKernel.CategroyViewID.Completed ? this.handleCompletedCategoryMore(e) : this.handleRecycleCategoryMore(e)
        }

        mounted() {
            T.CompletedFilterNS.refresh((e, t) => {
                do {
                    if ("全部" === e) {
                        this.completedListRestore();
                        break
                    }
                    e && (this.completedFilter = e), t && this.FILTER_TASK(t)
                } while (0)
            }), this.statusChangedEventId = A.attachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!e[1]) break;
                    let t = e[1];
                    if (t.length > 0) {
                        let e = t[0].getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryId);
                        if ((-1 === e || x.isPrivateCategory(e)) && e !== this.currentCategoryId) break;
                        if (this.UPDATE_TASK_STATUS(t.map(e => e.getTaskBaseInfo())), t[0].getTaskAttribute(l.DownloadKernel.TaskAttribute.Background)) break;
                        if (t[0].getTaskAttribute(l.DownloadKernel.TaskAttribute.GroupTaskId) > 0) break;
                        t[0].getTaskStatus() !== l.DownloadKernel.TaskStatus.Succeeded && t[0].getTaskStatus() !== l.DownloadKernel.TaskStatus.Seeding || this.$nextTick(() => {
                            let e = this.shouldChange2Complete(), t = this.shouldChangeCompleteSelect();
                            e && setTimeout(() => {
                                this.UPDATE_CATEGORYVIEW(l.DownloadKernel.CategroyViewID.Completed), t && this.UPDATE_COMPLETED_SELECTED_TASKS([this.completedTaskList[0]])
                            }, 0)
                        })
                    }
                    for (let e of t) {
                        let t = e.getTaskStatus();
                        t === l.DownloadKernel.TaskStatus.StartWaiting || t === l.DownloadKernel.TaskStatus.StartPending || t === l.DownloadKernel.TaskStatus.Started ? b.client.callServerFunction("SetPerformanceItemEnd", "StartTask_" + e.getId()) : t !== l.DownloadKernel.TaskStatus.StopPending && t !== l.DownloadKernel.TaskStatus.Stopped || b.client.callServerFunction("SetPerformanceItemEnd", "PauseTask_" + e.getId())
                    }
                } while (0)
            }), N.isLoadStorageTaskFinish() ? this.bLoadDbFinish = !0 : (this.dataBaseLoadCookie = 0, m.DownloadKernelManager.attachListener(f.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, this.onTaskDataBaseLoadEnd)), this.insertToCategoryViewEventId = A.attachTaskEvent(l.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.InsertToCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    let t = e[1];
                    if (void 0 !== e[4] && e[4] === l.DownloadKernel.TaskInsertReason.LoadTaskBasic && -1 !== t) break;
                    let i = e[2], n = e[3], o = e[4], a = n.map(e => e.getTaskBaseInfo());
                    this.INSERT_TO_CATEGORY_VIEW({
                        id: i,
                        categoryId: t,
                        tasks: a
                    }), this.bLoadDbFinish && -1 === t && i === l.DownloadKernel.CategroyViewID.Downloading && (o === l.DownloadKernel.TaskInsertReason.Create && this.UPDATE_CATEGORY(t), this.$nextTick(() => {
                        if (this.currentCategoryViewId !== l.DownloadKernel.CategroyViewID.Downloading) this.UPDATE_CATEGORYVIEW(l.DownloadKernel.CategroyViewID.Downloading), this.$nextTick(() => {
                            setTimeout(() => {
                                let e = this.downloadingTaskList[0];
                                this.UPDATE_DOWNLOADING_SELECTED_TASKS([e])
                            }, 0)
                        }); else {
                            let e = this.downloadingTaskList[0];
                            this.UPDATE_DOWNLOADING_SELECTED_TASKS([e])
                        }
                    }))
                } while (0)
            }), setTimeout(() => {
                this.getHotwords().catch()
            }, 2e3), S.default.isInited() ? (this.sideNetdiskVasType = S.default.getConfigValue("main", "sideNetdisk", [3, 5]), this.qrCodeConfig = S.default.getConfigValue("main", "QRCode", {
                show: !0,
                text: "扫码加速"
            }), I.server.fireClientEvent("OnQrCodeConfigUpdate", this.qrCodeConfig)) : S.default.attachListener("OnRemoteGlobalConfigLoaded", () => {
                this.sideNetdiskVasType = S.default.getConfigValue("main", "sideNetdisk", [3, 5]), this.qrCodeConfig = S.default.getConfigValue("main", "QRCode", {
                    show: !0,
                    text: "扫码加速"
                }), I.server.fireClientEvent("OnQrCodeConfigUpdate", this.qrCodeConfig)
            }), this.$once("hook:updated", () => {
                this.$nextTick(() => {
                    let e = (new Date).getTime() - window.__thunderStartTime;
                    setTimeout(() => {
                        g.XLStatNS.trackEvent("core_event", "pc_response_stat", "", 0, 0, 0, 0, "operation=StartupTime,cost=" + e)
                    }, 5e3)
                })
            })
        }

        destroyed() {
            h.downloadContextMenu.detachListener(f.NodeEventMesssageNS.eventDownloadContextMenuClick, this.handleMenuClick), h.downloadContextMenu.detachListener(f.NodeEventMesssageNS.eventDownloadContextMenuPopup, this.handleMenuPopup), h.downloadContextMenu.detachListener(f.NodeEventMesssageNS.eventDownloadContextMenuEnd, this.handleMenuEnd), void 0 !== this.insertToCategoryViewEventId && A.detachTaskEvent(l.DownloadKernel.TaskEventType.InsertToCategoryView, this.insertToCategoryViewEventId), void 0 !== this.statusChangedEventId && A.detachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, this.statusChangedEventId), void 0 !== this.dataBaseLoadCookie && (this.dataBaseLoadCookie = void 0, m.DownloadKernelManager.detachListener(f.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, this.onTaskDataBaseLoadEnd))
        }
    };
    var P;
    n([r.Prop()], O.prototype, "vipInfo", void 0), n([r.Prop({})], O.prototype, "currentTabId", void 0), n([r.Prop({})], O.prototype, "currentCategoryId", void 0), n([r.Prop({})], O.prototype, "currentCategoryViewId", void 0), n([r.Prop({})], O.prototype, "downloadingTaskList", void 0), n([r.Prop({})], O.prototype, "completedTaskList", void 0), n([r.Prop({})], O.prototype, "recycleTaskList", void 0), n([r.Prop({})], O.prototype, "downloadingLoadedList", void 0), n([r.Prop({})], O.prototype, "completedLoadedList", void 0), n([r.Prop({})], O.prototype, "completedFilterTaskList", void 0), n([r.Prop({})], O.prototype, "completedFilterLoadedList", void 0), n([r.Prop({})], O.prototype, "recycleLoadedList", void 0), n([r.Prop({})], O.prototype, "downloadingSelectedIndexs", void 0), n([r.Prop({})], O.prototype, "completedSelectedTaskIndexs", void 0), n([r.Prop({})], O.prototype, "recycleSelectedTaskIndexs", void 0), n([r.Prop({})], O.prototype, "currentSelectdTaskIds", void 0), n([r.Prop({})], O.prototype, "UPDATE_CATEGORY", void 0), n([r.Prop({})], O.prototype, "UPDATE_CATEGORYVIEW", void 0), n([r.Prop({})], O.prototype, "SORT_CATEGORY_HISTORY", void 0), n([r.Prop({})], O.prototype, "SORT_CATEGORY_BY_FUNCTION", void 0), n([r.Prop({})], O.prototype, "UPDATE_DOWNLOADING_SELECTED_TASKS", void 0), n([r.Prop({})], O.prototype, "UPDATE_COMPLETED_SELECTED_TASKS", void 0), n([r.Prop({})], O.prototype, "UPDATE_RECYCLE_SELECTED_TASKS", void 0), n([r.Prop({})], O.prototype, "MOVE_TO_TOP", void 0), n([r.Prop({})], O.prototype, "UPDATE_DOWNLOADING_TASKLIST", void 0), n([r.Prop({})], O.prototype, "UPDATE_COMPLETED_TASKLIST", void 0), n([r.Prop({})], O.prototype, "UPDATE_RECYCLE_TASKLIST", void 0), n([r.Prop({})], O.prototype, "MOVE_TO_BOTTOM", void 0), n([r.Prop({})], O.prototype, "SELECT_PRE", void 0), n([r.Prop({})], O.prototype, "SELECT_NEXT", void 0), n([r.Prop({})], O.prototype, "INIT_CATEGORY_TASKLIST", void 0), n([r.Prop({})], O.prototype, "INSERT_TO_CATEGORY_VIEW", void 0), n([r.Prop({})], O.prototype, "UPDATE_TASK_STATUS", void 0), n([r.Prop({})], O.prototype, "LOAD_MORE", void 0), n([r.Prop({})], O.prototype, "FILTER_TASK", void 0), n([r.Prop({})], O.prototype, "FILTER_TASK_LOAD_MORE", void 0), n([r.Prop({})], O.prototype, "attachTaskEvent", void 0), n([r.Prop({})], O.prototype, "selectTab", void 0), n([r.Watch("currentCategoryId")], O.prototype, "onCategoryChange", null), n([r.Watch("currentCategoryViewId")], O.prototype, "onCategoryViewChange", null), n([r.Watch("completedFilter")], O.prototype, "onCompletedFilterChange", null), O = n([r.Component({components: {DownloadCategory: u.default}})], O), t.default = O, function (e) {
        e[e.UnLogin = 1] = "UnLogin", e[e.ErrorTask = 2] = "ErrorTask", e[e.UnSaved = 3] = "UnSaved", e[e.needMoreSpace = 4] = "needMoreSpace", e[e.Saved = 5] = "Saved"
    }(P || (P = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(310), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(0), s = i(4), l = i(880), d = i(887), u = i(889), c = i(30), h = i(13), f = i(11), p = i(394),
        g = i(113), m = i(10), v = i(25), y = i(40), T = i(3), w = r.default.getLogger("DownloadCategory"),
        k = g.PluginWebviewMgrNS.getWebViewMgr(), C = f.DownloadKernelTaskManager.getTaskManager();
    let b = class extends a.Vue {
        constructor() {
            super(...arguments), this.enbaleVipPlugin = !1, this.observer = null, this.vipPluginAttachFunc = null, this.isFirstShowScanCode = !1, this.accelerationTimes = 0, this.days = 0, this.saveStatus = "PHASE_TYPE_PENDING", this.deleted = {}, this.opened = {}, this.dataChecking = {}, this.fileTransferTooltipVisible = {}, this.showFileTransferTipTaskId = void 0
        }

        get taskCount() {
            return this.tasklist.length
        }

        get loadedListWithKey() {
            return this.tasklist.map(e => Object.assign({
                key: e,
                template: {
                    class: {
                        "is-deleted": this.deleted[e],
                        "is-finish": !this.opened[e],
                        "is-check": this.dataChecking[e]
                    }
                }
            }))
        }

        onLoadedListChanged(e) {
            e.forEach(e => {
                this.$set(this.deleted, String(e), e in this.deleted && this.deleted[e]), this.$set(this.opened, String(e), e in this.opened && this.opened[e])
            }), this.updateShouleiFileTransferTip().catch()
        }

        onTasklistChange(e, t) {
            this.$nextTick(() => {
                this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading && k.updateTaskAdWebview()
            })
        }

        handleCategoryShow(e) {
            return o(this, void 0, void 0, function* () {
                if (e === s.DownloadKernel.CategroyViewID.Completed && this.showFileTransferTipTaskId) {
                    let e = m.ConfigNS.getValue("ShouleiDownload", "AutoShowFileTransferToolTip", 1);
                    w.information("handleCategoryShow autoShowToolTip", e), 1 === e && m.ConfigNS.setValue("ShouleiDownload", "AutoShowFileTransferToolTip", 0)
                }
            })
        }

        updateShouleiFileTransferTip() {
            return o(this, void 0, void 0, function* () {
                this.taskCount > 0 && "CompletedItemContainer" === this.componentName && m.ConfigNS.attachListener(h.NodeEventMesssageNS.eventConfigInitFinished, () => o(this, void 0, void 0, function* () {
                    let e = m.ConfigNS.getValue("ShouleiDownload", "AutoShowFileTransferToolTip", 1);
                    if (w.information("updateShouleiFileTransferTip autoShowToolTip", e), 1 === e) {
                        yield v.default.isInitedAw();
                        let e = v.default.getConfigInfo("shouleiDownload", "enableTransfer");
                        if (w.information("updateShouleiFileTransferTip enableTransfer", e), 0 !== e) {
                            let e = void 0;
                            for (let t = 0; t < this.tasklist.length; ++t) {
                                let i = this.tasklist[t];
                                if (yield y.TaskCtrlOperatorNS.isExistTaskFile(C.getTaskFromTaskId(i).getTaskBaseInfo())) {
                                    e = i;
                                    break
                                }
                            }
                            w.information("updateShouleiFileTransferTip", e), e !== this.showFileTransferTipTaskId && (this.showFileTransferTipTaskId && this.$set(this.fileTransferTooltipVisible, String(this.showFileTransferTipTaskId), !1), e && (this.$set(this.fileTransferTooltipVisible, String(e), !0), this.showFileTransferTipTaskId = e)), this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Completed && this.showFileTransferTipTaskId && m.ConfigNS.setValue("ShouleiDownload", "AutoShowFileTransferToolTip", 0)
                        }
                    }
                }))
            })
        }

        getLoadedCount() {
            return this.tasklist.length
        }

        loadMore(e) {
            this.LOAD_MORE({categoryId: this.currentCategoryId, categoryViewId: this.currentCategoryViewId}), e()
        }

        handleSelectChange(e) {
            this.COMMIT_SELECT(e)
        }

        handleListChange(e) {
            const t = e.map(e => {
                let t = Object.assign({}, e);
                return delete t.template, t.key
            });
            this.COMMIT_UPDATE_TASKLIST(t)
        }

        handleScroll(e) {
            this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading && k.updateTaskAdWebview()
        }

        handleSorting() {
            this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading && (k.hideTaskAdWebview(), k.setSorting(!0))
        }

        handleSortEnd() {
            this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading && (k.setSorting(!1), k.updateTaskAdWebview())
        }

        handleItemDbClick(e) {
            this.$emit("dblclick", e)
        }

        handleContextMenu(e) {
            this.$emit("contextmenu", e)
        }

        handleCancleActive(e) {
            w.information("receive eventShowHomePage", e);
            let t = C.getTaskFromTaskId(e);
            if (t) {
                let e = t.getTaskAttribute(s.DownloadKernel.TaskAttribute.CategoryViewId);
                e !== s.DownloadKernel.CategroyViewID.Unkown && e === this.currentCategoryViewId && this.COMMIT_SELECT([])
            }
        }

        handleActiveChange(e, t) {
            e && this.$nextTick(() => {
                this.scrollTo(t)
            })
        }

        handleActiveNearby(e) {
            do {
                if (0 === this.taskCount) break;
                if (e > this.taskCount) break;
                e <= this.taskCount - 1 ? this.COMMIT_SELECT([this.tasklist[e]]) : this.COMMIT_SELECT([this.tasklist[e - 1]])
            } while (0)
        }

        scrollTo(e) {
            let t = this.$el, i = t.querySelectorAll(".td-draglist-item"), n = void 0,
                o = document.querySelector(".td-collapse,.xlx-side");
            void 0 !== o && null !== o && (n = -1 === this.currentCategoryId ? o.clientHeight - 95 : o.clientHeight - 70);
            do {
                if (null === i || void 0 === i || 0 === i.length) break;
                if (e < 0) break;
                if (e > i.length - 1) break;
                let o = 0, a = 0;
                for (let t of i) {
                    if (a === e) break;
                    o += 1, t.classList.contains("v-leave") || (a += 1)
                }
                o === i.length && (o -= 1);
                let r = i[o];
                w.information("scroll index & realIndex", e, o), p.ThunderWindowNS.autoAdaptScrollIntoView(r, t, n)
            } while (0)
        }

        onVipPluginLoaded(e) {
            this.enbaleVipPlugin = e
        }

        resizeHandler(e) {
            this.enbaleVipPlugin && this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading && k.updateTaskAdWebview()
        }

        initScanCode() {
            return o(this, void 0, void 0, function* () {
                m.ConfigNS.isInitConfigFinished() ? this.isFirstShowScanCode = m.ConfigNS.getValue("ShouleiDownload", "isFirstShowScanCode", !0) : m.ConfigNS.attachListener(h.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    this.isFirstShowScanCode = m.ConfigNS.getValue("ShouleiDownload", "isFirstShowScanCode", !0)
                })
            })
        }

        updateFirstShowScanCode() {
            this.isFirstShowScanCode = !1
        }

        mounted() {
            c.default.attachListener(h.NodeEventMesssageNS.eventShowHomePage, this.handleCancleActive), this.enbaleVipPlugin = k.isVipPluginEnable(), this.vipPluginAttachFunc = this.onVipPluginLoaded.bind(this), k.on("vip_plugin_enable", this.vipPluginAttachFunc), window.addEventListener("resize", this.resizeHandler.bind(this)), this.observer = new MutationObserver(e => {
                this.enbaleVipPlugin && this.currentCategoryViewId === s.DownloadKernel.CategroyViewID.Downloading && k.updateTaskAdWebview()
            });
            this.observer.observe(this.$el, {
                attributes: !0,
                childList: !0,
                characterData: !0
            }), this.updateShouleiFileTransferTip().catch(), "DownloadingItemContainer" === this.componentName && (setTimeout(() => {
                this.initScanCode()
            }, 2e3), T.client.attachServerEvent("UpdateAccelerationTimes", (e, t, i) => {
                this.accelerationTimes = t, this.days = i
            }), T.client.attachServerEvent("UpdateSaveStatus", (e, t) => {
                this.saveStatus = t
            }), T.client.attachServerEvent("UpdateFirstShowScanCode", this.updateFirstShowScanCode.bind(this)))
        }

        destroyed() {
            this.observer && this.observer.disconnect(), c.default.detachListener(h.NodeEventMesssageNS.eventShowHomePage, this.handleCancleActive), k.removeListener("vip_plugin_enable", this.vipPluginAttachFunc), window.removeEventListener("resize", this.resizeHandler.bind(this))
        }
    };
    n([a.Prop({})], b.prototype, "pulseForRename", void 0), n([a.Prop({default: ""})], b.prototype, "sharedKeyWords", void 0), n([a.Prop({})], b.prototype, "itemType", void 0), n([a.Prop({})], b.prototype, "currentCategoryId", void 0), n([a.Prop({})], b.prototype, "currentCategoryViewId", void 0), n([a.Prop({})], b.prototype, "componentName", void 0), n([a.Prop({})], b.prototype, "tasklist", void 0), n([a.Prop({})], b.prototype, "selectedTaskIds", void 0), n([a.Prop({default: !0})], b.prototype, "sortable", void 0), n([a.Prop({})], b.prototype, "COMMIT_SELECT", void 0), n([a.Prop({})], b.prototype, "COMMIT_UPDATE_TASKLIST", void 0), n([a.Prop({})], b.prototype, "LOAD_MORE", void 0), n([a.Prop({default: 100})], b.prototype, "panTaskProgress", void 0), n([a.Prop({default: 0})], b.prototype, "panTaskType", void 0), n([a.Prop({default: null})], b.prototype, "panTaskData", void 0), n([a.Prop()], b.prototype, "showSideNetdisk", void 0), n([a.Prop()], b.prototype, "qrCodeConfig", void 0), n([a.Prop()], b.prototype, "vipInfo", void 0), n([a.Watch("tasklist", {immediate: !0})], b.prototype, "onLoadedListChanged", null), n([a.Watch("tasklist")], b.prototype, "onTasklistChange", null), n([a.Watch("currentCategoryViewId")], b.prototype, "handleCategoryShow", null), b = n([a.Component({
        components: {
            DownloadingItemContainer: l.default,
            CompletedItemContainer: d.default,
            RecycleItemContainer: u.default
        }
    })], b), t.default = b
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(312), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(881), o = i(24), a = i(4), r = i(26).DownloadKernelCategoryManager.getCategoryManager();
    t.default = o.connector.connect({
        mapStateToProps: {
            taskBase: (e, t) => {
                let i = null, n = t.taskId, o = t.currentCategoryId;
                if (-1 === o) {
                    for (let t = 0; t < e.DownloadListState.taskList.length; t++) if (e.DownloadListState.taskList[t].id === a.DownloadKernel.CategroyViewID.Downloading) {
                        i = e.DownloadListState.taskList[t].tasksMap[n];
                        break
                    }
                } else if (r.isPrivateCategory(o)) for (let t = 0; t < e.DownloadListState.taskListPrivate.length; t++) e.DownloadListState.taskListPrivate[t].id === a.DownloadKernel.CategroyViewID.Downloading && (i = e.DownloadListState.taskListPrivate[t].tasksMap[n]);
                return i
            }, vipSpeedInfo: (e, t) => {
                let i = null, n = t.taskId;
                return i = e.VipSpeedState.vipSpeedMap[n] ? e.VipSpeedState.vipSpeedMap[n] : e.VipSpeedState.defaultStatus
            }
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(314), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(4), s = i(11), l = i(14), d = i(64), u = i(37), c = i(59), h = i(13), f = i(34), p = i(30),
        g = i(9), m = i(16), v = i(48), y = i(0), T = i(575), w = i(103), k = i(113), C = i(548), b = i(3), I = i(49),
        S = i(15), _ = i(10), D = i(73), A = i(151), N = {margin: 0, width: 72},
        x = k.PluginWebviewMgrNS.getWebViewMgr(), E = m.DownloadKernelEventManager.getEventManager(),
        O = s.DownloadKernelTaskManager.getTaskManager(), P = y.default.getLogger("DownloadPanel.DownloadingItem");
    var M;
    !function (e) {
        e[e.Unknown = 0] = "Unknown", e[e.Error = 1] = "Error", e[e.SaveAsNormal = 2] = "SaveAsNormal", e[e.SaveAsPlay = 3] = "SaveAsPlay", e[e.Saving = 4] = "Saving", e[e.Saved = 5] = "Saved", e[e.NoSpace = 6] = "NoSpace"
    }(M || (M = {}));
    let F = class extends a.Vue {
        constructor() {
            super(...arguments), this.btSubDetailCookie = -1, this.groupTaskStatusCookie = -1, this.groupTaskSubFileDetailChangedCookie = -1, this.p2spTaskDetailChangedCookie = -1, this.hover = !1, this.titleOverFlow = "", this.subTaskCount = 0, this.highLight = "", this.fileNameDefaultCursor = "cursor:default", this.percentVisible = !1, this.isQuerying = !1, this.startStatusPrompt = void 0, this.playProgress = 0, this.taskExtraLoaded = !1, this.canAccelerate = !0, this.shortlink = "", this.isClickedAdd = !1, this.isDisabled = !1, this.refleshShortLinkTimer = null, this.dataValidating = !1, this.toolTip = {
                validating: "",
                remainTime: ""
            }, this.trackd = !1, this.delayGetShortlinkTimer = void 0, this.netExpandType = M
        }

        get isShowCode() {
        }

        get ispackagetrying() {
            return this.vipSpeedInfo && this.vipSpeedInfo.packagetrying
        }

        get isVip() {
            return !(!this.vipInfo || "1" !== this.vipInfo.isVip)
        }

        get isSuperVipUser() {
            return !(!this.vipInfo || "1" !== this.vipInfo.isVip || "5" !== this.vipInfo.vasType)
        }

        onChosenChanged(e) {
            e && (this.percentVisible = !1), p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemChosen, r.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, e, this.active)
        }

        onTaskBaseChanged() {
            let e = w.DownloadJammedNS.isValidatingFileData(this.taskId),
                t = w.DownloadJammedNS.isCorrectingData(this.taskId);
            if (e) {
                this.toolTip.validating = "正在校验文件...";
                let e = w.DownloadJammedNS.getValidationDuration(this.taskId);
                e && e.remainSeconds !== 1 / 0 ? this.toolTip.remainTime = "剩余" + d.TimeHelperNS.formatSeconds(e.remainSeconds) : this.toolTip.remainTime = "剩余--:--:--"
            } else t && (this.toolTip.validating = "检查到部分文件错误", this.toolTip.remainTime = "正在重新下载");
            this.dataValidating = e, this.$emit("update:dataChecking", e || t)
        }

        onEnableVipPlugin(e) {
            e && this.isShowExpand && this.$nextTick(() => {
                p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemActive, r.DownloadKernel.CategroyViewID.Downloading, this.currentCategoryViewId === r.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, this.$el)
            })
        }

        onShowCloudExpand() {
            return o(this, void 0, void 0, function* () {
                yield this.$nextTick(), this.isShowExpand && x.updateTaskAdWebview()
            })
        }

        onTaskFailedChange(e) {
            "search" !== this.itemType && this.enbaleVipPlugin && this.active && (e ? x.hideTaskAdWebview(this.taskId) : this.$nextTick(() => {
                x.showTaskAdWebview(this.taskId, this)
            }))
        }

        onOptionsChanged(e) {
            this.active && p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemActive, r.DownloadKernel.CategroyViewID.Downloading, e === r.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, this.$el), this.chosen && p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemChosen, r.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, e === r.DownloadKernel.CategroyViewID.Downloading, this.active)
        }

        onPanTaskTypeChange(e, t) {
            if ((e !== t || void 0 === e) && (this.trackd = !0, this.active && this.showSideNetdisk && !this.isNetdiskTask && 4 !== this.panTaskType && this.taskStatus !== r.DownloadKernel.TaskStatus.Failed)) {
                let e = "button=";
                !this.canPlay || 3 !== this.panTaskType && 1 !== this.panTaskType ? this.canPlay || 3 !== this.panTaskType && 1 !== this.panTaskType ? 5 === this.panTaskType && 100 !== this.panTaskProgress ? e += "adding" : 5 !== this.panTaskType || this.canPlay ? (5 === this.panTaskType && this.canPlay, e += "yunpan_play") : e += "see_detail" : e += "add_now" : e += "yunpan_play", g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_yunpan_paly_show", "", 0, 0, 0, 0, e)
            }
        }

        onTaskIdChanged(e, t) {
            void 0 !== t && (this.unInitialize(), this.initialize())
        }

        onKeyWordsChange(e, t) {
            this.highLight = l.ThunderUtil.keywordsHighLight(this.taskBase.taskName, e, null)
        }

        onRenamePulse(e, t) {
            this.highLight = l.ThunderUtil.keywordsHighLight(this.taskBase.taskName, this.sharedKeyWords, null)
        }

        get isNetdiskTask() {
            return !(!this.taskBase || -1 === this.taskBase.categoryId || -1 !== this.currentCategoryId)
        }

        get remindType() {
            let e = "none";
            do {
                if (!this.vipSpeedInfo) break;
                if (!this.vipSpeedInfo.remindType) break;
                e = this.vipSpeedInfo.remindType
            } while (0);
            return e
        }

        get remindShow() {
            return "online" === this.remindType || "fail" === this.remindType || "remind" === this.remindType || "reminded" === this.remindType || "online_read" === this.remindType
        }

        get remindClass() {
            let e = "";
            switch (this.remindType) {
                case"reminded":
                    e = "is-remind";
                    break;
                case"online":
                    e = "is-suc";
                    break;
                case"online_read":
                    e = "is-suc is-read";
                    break;
                case"fail":
                    e = "is-fail"
            }
            return e
        }

        get remindLabel() {
            let e = "";
            switch (this.remindType) {
                case"reminded":
                    e = "已提醒";
                    break;
                case"online":
                case"online_read":
                    e = "已上线";
                    break;
                case"fail":
                    e = "未成功"
            }
            return e
        }

        get canShowHuddle() {
            let e = !1;
            do {
                if (!this.active) break;
                if (this.taskStatus === r.DownloadKernel.TaskStatus.Failed) break;
                if (this.isGroup) break;
                e = !0
            } while (0);
            return e
        }

        get canPlay() {
            let e = !1;
            do {
                if (this.taskError) break;
                if (this.taskBase.isMoving) break;
                if (!this.taskExtraLoaded) break;
                let t = O.getTaskFromTaskId(this.taskBase.taskId);
                t && (e = t.isSupportPlay())
            } while (0);
            return e
        }

        get canPlayFile() {
            let e = !1;
            do {
                if (this.taskError) break;
                if (!this.taskExtraLoaded) break;
                let t = O.getTaskFromTaskId(this.taskBase.taskId);
                t && (e = t.isSupportPlay())
            } while (0);
            return e
        }

        get playProgressStyle() {
            return this.playCompleted ? "width: 0%;" : "width: " + 100 * this.playProgress + "%;"
        }

        get playCompleted() {
            return 1 === this.playProgress
        }

        get subTaskCountDesc() {
            return this.subTaskCount > 999 ? "999+文件" : this.subTaskCount + "个文件"
        }

        onActiveChanged(e, t) {
            return o(this, void 0, void 0, function* () {
                "search" !== this.itemType && this.currentCategoryViewId === r.DownloadKernel.CategroyViewID.Downloading && p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemActive, r.DownloadKernel.CategroyViewID.Downloading, this.active, this.taskBase.taskId, this.$el), e && (this.percentVisible = !1), this.$emit("active-change", e), this.$emit("active-task", this.taskBase.taskId), this.clearGetShortLinkTimer(), this.active ? (this.trackd = !1, setTimeout(() => {
                    this.trackd || this.onPanTaskTypeChange()
                }, 100), this.delayGetShortlinkTimer = setTimeout(() => {
                    this.delayGetShortlinkTimer = void 0, this.getShortLinkfunc(2).catch()
                }, 3e3), this.getShortLinkfunc(1).catch()) : (this.isFirstShowScanCode && "" !== this.shortlink && this.$emit("update:isFirstShowScanCode", !1), this.shortlink = "")
            })
        }

        clearGetShortLinkTimer() {
            void 0 !== this.delayGetShortlinkTimer && (clearTimeout(this.delayGetShortlinkTimer), this.delayGetShortlinkTimer = void 0), this.refleshShortLinkTimer && (clearTimeout(this.refleshShortLinkTimer), this.refleshShortLinkTimer = null)
        }

        getBirdKey(e, t) {
            return o(this, void 0, void 0, function* () {
                let i = "";
                try {
                    let n = yield D.queryBirdKeyInfo(e, void 0, void 0, t);
                    P.information("getThunderDlj res = ", n), 200 === n.status && n.data && "ok" === n.data.result && (i = n.data.bird_key)
                } catch (e) {
                    i = ""
                }
                return i
            })
        }

        getTaskType() {
            let e = "other";
            do {
                if (!this.taskBase) break;
                this.canPlayFile && (e = this.taskType === r.DownloadKernel.TaskType.Bt ? "btvideo" : "video")
            } while (0);
            return e
        }

        refleshShortLink() {
            this.shortlink = "", this.getShortLinkfunc(2).catch()
        }

        getShortLinkfunc(e) {
            return o(this, void 0, void 0, function* () {
                if ("" !== this.shortlink) return;
                let t = "";
                if (g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_judge_start", "", 0, 0, 0, 0, "judgment_num=" + e), !this.active || this.isVip || !this.vipSpeedInfo || this.vipSpeedInfo.isSensitive || this.taskError) this.shortlink = ""; else {
                    let e = O.getTaskFromTaskId(this.taskBase.taskId);
                    if (!e) return;
                    let i = {task_id: String(this.taskBase.taskId), task_infos: []};
                    if (this.taskBase.taskType === r.DownloadKernel.TaskType.Bt) {
                        let t = e.getExtraObject(), n = t.getInfoId(), o = t.getDisplayName();
                        i.infohash = n, i.bt_title = o;
                        let a = t.getBtFileList();
                        for (let [, e]of a) {
                            let t = {};
                            e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.Download) && e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileStatus) < 3 && (t.url = "", t.gcid = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.Gcid), t.cid = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.Cid) || t.gcid, t.filename = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileName), t.filesize = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.FileSize), t.file_index = e.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.RealIndex), i.task_infos.push(t))
                        }
                    } else if (this.taskBase.taskType === r.DownloadKernel.TaskType.Group) ; else {
                        let e = {};
                        e.url = this.taskBase.url, e.gcid = this.taskBase.gcid, e.cid = this.taskBase.cid || this.taskBase.gcid, e.filename = this.taskBase.taskName, e.filesize = this.taskBase.fileSize, i.task_infos.push(e)
                    }
                    if (!this.qrCodeConfig.show && !this.qrCodeConfig.show_right_scancode) return;
                    if (!this.isGroup && !this.isNetdiskTask) {
                        let e = "?bird_key=" + (yield this.getBirdKey(this.taskBase.url, {
                            filename: this.taskBase.taskName,
                            filesize: String(this.taskBase.fileSize)
                        })) + "&type=" + this.getTaskType(), n = yield C.getShortlink(i, e);
                        this.shortlink = n[0], this.shortlink || (t = n[1])
                    }
                    if (this.shortlink && this.qrCodeConfig.show) {
                        let e = this.shortlink + "?qrcode_from=1";
                        this.$nextTick(() => {
                            let t = this.$refs.canvas;
                            A.toCanvas(t, e, N, e => {
                                P.information("QRCode.toCanvas error = ", e)
                            })
                        }), this.isFirstShowScanCode && (_.ConfigNS.setValue("ShouleiDownload", "isFirstShowScanCode", !1), g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_2d_code_show", "", 0, 0, 0, 0, `position=left,if_child_task_list=${this.isGroup || this.isBt ? 1 : 0},task_id=${this.taskId}`)), g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_icon_show", "", 0, 0, 0, 0, `if_child_tsak_list=${this.isBt || this.isGroup ? 1 : 0},task_id=${this.taskId}`)
                    }
                }
                this.active && S.server.fireClientEvent("UpdateShortLink", this.shortlink);
                let i = 1, n = "";
                this.qrCodeConfig.show || (i = 0, n += "qrcodeConfig:0;"), this.isVip && (i = 0, n += "isVip:1;"), this.isNetdiskTask && (i = 0, n += "isNetdiskTask:1;"), this.isGroup && (i = 0, n += "isGroup:1;"), n = "(" + n + ")", i && this.shortlink ? g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_judge_result", "", 0, 0, 0, 0, "if_icon_show=1,judgment_num=" + e) : g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_judge_result", "", 0, 0, 0, 0, "if_icon_show=0,judgment_num=" + e + ",client_reason=" + n + ",server_reason=" + encodeURIComponent(t)), this.refleshShortLinkTimer && clearTimeout(this.refleshShortLinkTimer), this.refleshShortLinkTimer = setTimeout(() => {
                    this.refleshShortLink()
                }, 72e5)
            })
        }

        handleQRCodeHover() {
            g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_icon_hover", "", 0, 0, 0, 0, `task_id=${this.taskId}`), g.XLStatNS.trackEvent("download_leftpanel", "downloading_scan_accelerate_2d_code_show", "", 0, 0, 0, 0, `position=left,if_child_task_list=${this.isGroup || this.isBt ? 1 : 0},task_id=${this.taskId}`)
        }

        get taskError() {
            return this.taskBase.taskStatus === r.DownloadKernel.TaskStatus.Failed
        }

        get isForbidden() {
            let e = !1;
            do {
                if (this.taskError) {
                    let t = 0, i = O.getTaskFromTaskId(this.taskBase.taskId);
                    if (null !== i && (t = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.ErrorCode)), 7 === t) {
                        e = !0;
                        break
                    }
                    if (t >= 700 && t <= 799) {
                        e = !0;
                        break
                    }
                }
            } while (0);
            return e
        }

        get errInfo() {
            let e = "";
            if (this.taskError) {
                let t = 0, i = O.getTaskFromTaskId(this.taskBase.taskId);
                null !== i && (t = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.ErrorCode)), e = c.TaskStatusHelper.getTaskErrorInfoByCode(t)
            }
            return e
        }

        handleItemMouseOut() {
            this.percentVisible = !1, this.hover = !1
        }

        handleItemMouseHover() {
            this.hover = !0;
            do {
                if (this.chosen) {
                    this.percentVisible = !1;
                    break
                }
                if (this.active) {
                    this.percentVisible = !1;
                    break
                }
                if (this.taskStatus === r.DownloadKernel.TaskStatus.Stopped) {
                    this.percentVisible = !1;
                    break
                }
                this.percentVisible = !0;
                break
            } while (0)
        }

        handleTaskNameMouseOver(e) {
            let t = e.target, i = t.scrollHeight, n = t.offsetHeight;
            this.titleOverFlow = i > n ? this.taskBase.taskName : ""
        }

        handleIconMouseHover(e) {
            let t = w.DownloadJammedNS.isValidatingFileData(this.taskId);
            w.DownloadJammedNS.isCorrectingData(this.taskId) && !t && (P.information("mouse over media icon when data correcting"), g.XLStatNS.trackEvent("download_leftpanel", "data_error_correction_icon_hover", "", 0, 0, 0, 0, ""))
        }

        get fileTypeClass() {
            return u.TaskUtilHelper.getTaskIcon(this.taskBase.taskName, this.taskBase.taskType, "xly-type-")
        }

        get taskName() {
            return "search" !== this.itemType ? this.taskBase.taskName : this.highLight
        }

        get fileSize() {
            return this.taskBase.fileSize
        }

        get fileSizeFormat() {
            return l.ThunderUtil.formatSizeCustom(this.taskBase.fileSize)
        }

        get downloadSize() {
            return this.taskBase.downloadSize
        }

        get downloadSizeFormat() {
            return l.ThunderUtil.formatSizeCustom(this.taskBase.downloadSize)
        }

        get progress() {
            let e = 0;
            return 0 !== this.taskBase.fileSize && (e = this.taskBase.downloadSize / this.taskBase.fileSize), P.information("data in validating:", this.taskBase.downloadSize - this.taskBase.validDownloadSize, ", downloaded:", this.taskBase.downloadSize, ",progress:", e), 100 * e
        }

        get progressPercent() {
            let e = 0;
            0 !== this.taskBase.fileSize && (e = this.taskBase.downloadSize / this.taskBase.fileSize), e >= 1 && (e = .9999);
            let t = (100 * e).toFixed(2) + "%";
            return "100.00%" === t && (t = "99.99%"), t
        }

        get taskStatus() {
            return this.taskBase.taskStatus
        }

        get taskStatusSpeedInfo() {
            let e = "", t = c.TaskStatusHelper.getTaskStatusPrompt(this.taskBase);
            if (this.startStatusPrompt = c.TaskStatusHelper.getTaskStartStatusPrompt(this.taskBase), void 0 !== t || void 0 !== this.startStatusPrompt) "完成" === (e = void 0 !== this.startStatusPrompt ? this.startStatusPrompt : t) && (e = ""), "暂停" === e && (e = "已暂停"); else {
                let t = this.taskBase.downloadSpeed;
                e = l.ThunderUtil.formatSizeCustom(t, 1, 4) + "/s"
            }
            return e
        }

        get taskType() {
            return this.taskBase.taskType
        }

        get showStartTemplate() {
            let e = !1;
            return this.taskBase.taskStatus !== r.DownloadKernel.TaskStatus.StartPending && this.taskBase.taskStatus !== r.DownloadKernel.TaskStatus.StopPending && this.taskBase.taskStatus !== r.DownloadKernel.TaskStatus.Started || (e = !0), e
        }

        get canStart() {
            let e = !1;
            do {
                if (this.taskBase.isMoving) break;
                e = !this.canPause
            } while (0);
            return e
        }

        get canPause() {
            let e = !1;
            return this.taskBase.taskStatus !== r.DownloadKernel.TaskStatus.StartWaiting && this.taskBase.taskStatus !== r.DownloadKernel.TaskStatus.StartPending && this.taskBase.taskStatus !== r.DownloadKernel.TaskStatus.Started || (e = !0), e
        }

        get isGroup() {
            let e = !1;
            return this.taskBase.taskType === r.DownloadKernel.TaskType.Group && (e = !0), e
        }

        get isBt() {
            let e = !1;
            return this.taskBase.taskType === r.DownloadKernel.TaskType.Bt && (e = !0), e
        }

        get bTaskCountShow() {
            let e = !1;
            return (this.isBt || this.isGroup) && (this.active || this.chosen) && (e = !0), e
        }

        get remain() {
            let e = "--:--:--";
            if (!this.hover || this.chosen || this.active) {
                if (this.taskBase.downloadSpeed > 0 && this.taskBase.fileSize > 0) {
                    let t = this.taskBase.fileSize - this.taskBase.downloadSize;
                    if (t > 0) {
                        let i = t / this.taskBase.downloadSpeed;
                        e = d.TimeHelperNS.formatSecondsCustom(i)
                    }
                }
            } else e = this.progressPercent;
            return e
        }

        get isFailed() {
            return this.taskStatus === r.DownloadKernel.TaskStatus.Failed
        }

        get isShowExpand() {
            return this.taskStatus !== r.DownloadKernel.TaskStatus.Failed && ("search" !== this.itemType && this.active)
        }

        get isShowCloudExpand() {
            return this.active && this.showSideNetdisk && !this.isNetdiskTask && !this.taskError && this.cloudExpandType !== M.Unknown
        }

        get cloudExpandType() {
            let e = M.Unknown;
            do {
                if ("PHASE_TYPE_ERROR" === this.saveStatus) {
                    e = M.Error;
                    break
                }
                if (3 === this.panTaskType || 1 === this.panTaskType || 4 === this.panTaskType && !this.isClickedAdd) {
                    e = this.canPlayFile ? M.SaveAsPlay : M.SaveAsNormal;
                    break
                }
                if (5 === this.panTaskType && 100 !== this.panTaskProgress) {
                    e = M.Saving;
                    break
                }
                if (5 === this.panTaskType) {
                    e = M.Saved;
                    break
                }
                if (4 === this.panTaskType && this.isClickedAdd) {
                    e = M.NoSpace;
                    break
                }
            } while (0);
            return e
        }

        get isSuperVip() {
            let e = !1;
            return this.enbaleVipPlugin && this.vipSpeedInfo && (e = this.vipSpeedInfo.isShowSuperSpeed && this.vipSpeedInfo.isAcclerated), e
        }

        handleClickSensitive() {
            do {
                if (!this.vipSpeedInfo) break;
                if (!this.vipSpeedInfo.isSensitive) break;
                if (!this.vipSpeedInfo.sensitive) break;
                if (!this.vipSpeedInfo.sensitive.onAction) break;
                this.vipSpeedInfo.sensitive.onAction()
            } while (0)
        }

        onShowQueryTip(e) {
            if (e) {
                let e = T.QueryTaskInfoNS.getQueryTaskId();
                this.isQuerying = e === this.taskBase.taskId
            } else this.isQuerying = !1
        }

        statExtData() {
            let e = "panel_type=mypc";
            return -1 !== this.currentCategoryId && (e = "panel_type=private"), e
        }

        handlePlayTask() {
            g.XLStatNS.trackEvent("download_leftpanel", "bianxiabianbo_click", "", 0, 0, 0, 0, this.statExtData()), O.getTaskFromTaskId(this.taskBase.taskId) && f.TaskOperatorNs.downloadAndPlay(this.taskBase.taskId, -1, "bianxiabianbo", "downloading", this.currentCategoryId, !1, 0, !this.playCompleted).catch()
        }

        handleStartTask() {
            b.client.callServerFunction("SetPerformanceItemStart", "StartTask_" + this.taskId), g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_continue_click", "", 0, 0, 0, 0, this.statExtData()), v.DownloadDispatchNS.startTask(this.taskBase.taskId)
        }

        handlePauseTask() {
            g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_pause_click", "", 0, 0, 0, 0, this.statExtData()), O.stopTask(this.taskBase.taskId, r.DownloadKernel.TaskStopReason.Manual)
        }

        handleDestroyTask() {
            f.TaskOperatorNs.destroyTasks([this.taskBase])
        }

        handleDbClick(e) {
            this.$emit("dblclick", e)
        }

        handleGroupAccelerateClick() {
            this.vipSpeedInfo && this.vipSpeedInfo.huddle && this.vipSpeedInfo.huddle.onClick && this.vipSpeedInfo.huddle.onClick()
        }

        updateBtTaskPlayProgress(e) {
            let t = e.getExtraObject(), i = [];
            t.getDownloadFile().forEach(e => {
                let n = t.getBtFileByRealIndex(e);
                if (n.isSupportPlay()) {
                    let e = 0, t = n.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.Duration),
                        o = n.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.PlayPosition);
                    t && (e = o / t), i.push(e)
                }
            }), i.length && (this.playProgress = i.reduce(function (e, t, i, n) {
                return e + t
            }) / i.length)
        }

        updateGroupTaskPlayProgress(e) {
            let t = e.getExtraObject(), i = [];
            for (let e = 0; e < this.subTaskCount; ++e) {
                let n = t.getSubTaskByIndex(e);
                if (n && n.isSupportPlay()) {
                    let e = 0, t = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.Duration),
                        o = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.PlayPosition);
                    t && (e = o / t), i.push(e)
                }
            }
            i.length && (this.playProgress = i.reduce(function (e, t, i, n) {
                return e + t
            }) / i.length)
        }

        updateP2spTaskPlayProgress(e) {
            if (e.isSupportPlay()) {
                let t = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.Duration),
                    i = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.PlayPosition);
                t && (this.playProgress = i / t)
            }
        }

        onBtSubFileDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== r.DownloadKernel.TaskEventType.BtSubFileDetailChanged) break;
                if (!e[1] || !e[2]) break;
                if (e[1] === this.taskBase.taskId) {
                    let e = O.getTaskFromTaskId(this.taskBase.taskId), t = e.getExtraObject().getDownloadFile();
                    t.length !== this.subTaskCount && (this.subTaskCount = t.length), this.updateBtTaskPlayProgress(e)
                }
            } while (0)
        }

        onGroupTaskStatusChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== r.DownloadKernel.TaskEventType.StatusChanged) break;
                if (!e[1]) break;
                let t = e[1];
                if (t[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.CategoryId) !== this.currentCategoryId) break;
                for (let e = 0; e < t.length; e++) {
                    let i = t[e];
                    if (i.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId) === this.taskId) {
                        let e = i.getExtraObject();
                        this.subTaskCount = e.getDownloadTaskCount(), this.updateGroupTaskPlayProgress(i);
                        break
                    }
                }
            } while (0)
        }

        onGroupTaskSubFileDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged) break;
                if (!e[1]) break;
                e[1].forEach((e, t) => {
                    if (t === this.taskId) {
                        let e = O.getTaskFromTaskId(t);
                        e && this.updateGroupTaskPlayProgress(e)
                    }
                })
            } while (0)
        }

        onP2spTaskDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== r.DownloadKernel.TaskEventType.DetailChanged) break;
                if (!e[1]) break;
                let t = e[2];
                if (t & r.DownloadKernel.TaskDetailChangedFlags.PlayPosition || t & r.DownloadKernel.TaskDetailChangedFlags.Duration) {
                    let t = e[1];
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (i && i.getId() === this.taskId) {
                            this.updateP2spTaskPlayProgress(i);
                            break
                        }
                    }
                }
            } while (0)
        }

        showDetail() {
            return o(this, void 0, void 0, function* () {
                this.isDisabled || (yield b.client.callServerFunction("SelectNav", I.NavViewID.Cloud).catch(), g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_yunpan_paly_click", "", 0, 0, 0, 0, "button=see_detail"), this.isDisabled = !0, setTimeout(() => this.isDisabled = !1, 1e3))
            })
        }

        consumePanTask() {
            return o(this, void 0, void 0, function* () {
                if (!this.isDisabled) {
                    let e = !1;
                    this.vipSpeedInfo && this.vipSpeedInfo.isSensitive && (e = !0), yield b.client.callServerFunction("DetailShowFileDetail", e), 100 !== this.panTaskProgress ? g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_yunpan_paly_click", "", 0, 0, 0, 0, "button=adding") : g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_yunpan_paly_click", "", 0, 0, 0, 0, `button=${this.canPlay ? "yunpan_play" : "see_detail"}`), this.isDisabled = !0, setTimeout(() => this.isDisabled = !1, 1e3)
                }
            })
        }

        clickPath() {
            return o(this, void 0, void 0, function* () {
                this.isDisabled || (yield b.client.callServerFunction("DetailClickPath"), g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_yunpan_paly_click", "", 0, 0, 0, 0, "button=adding"), this.isDisabled = !0, setTimeout(() => this.isDisabled = !1, 1e3))
            })
        }

        saveTask() {
            return o(this, void 0, void 0, function* () {
                if (!this.isDisabled) {
                    if (this.isClickedAdd = !0, 4 === this.panTaskType) return;
                    let e = !0;
                    this.vipSpeedInfo && this.vipSpeedInfo.isSensitive && (e = !1), yield b.client.callServerFunction("DetailSaveTask", e), this.canPlay ? g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_yunpan_paly_click", "", 0, 0, 0, 0, "button=yunpan_play") : g.XLStatNS.trackEvent("download_leftpanel", "downloading_right_yunpan_paly_click", "", 0, 0, 0, 0, "button=add_now"), this.isDisabled = !0, setTimeout(() => this.isDisabled = !1, 1e3)
                }
            })
        }

        initialize() {
            return o(this, void 0, void 0, function* () {
                let e = O.getTaskFromTaskId(this.taskBase.taskId);
                if (this.taskBase.taskType === r.DownloadKernel.TaskType.Bt) {
                    this.btSubDetailCookie = E.attachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.onBtSubFileDetailChanged);
                    let t = e.getExtraObject().getDownloadFile();
                    this.subTaskCount = t.length, this.updateBtTaskPlayProgress(e)
                } else if (this.taskBase.taskType === r.DownloadKernel.TaskType.Group) {
                    this.groupTaskStatusCookie = E.attachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, this.onGroupTaskStatusChanged);
                    let t = e.getExtraObject();
                    this.subTaskCount = t.getDownloadTaskCount(), this.groupTaskSubFileDetailChangedCookie = E.attachTaskEvent(r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, this.onGroupTaskSubFileDetailChanged), this.updateGroupTaskPlayProgress(e)
                } else this.p2spTaskDetailChangedCookie = E.attachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, this.onP2spTaskDetailChanged), this.updateP2spTaskPlayProgress(e)
            })
        }

        unInitialize() {
            return o(this, void 0, void 0, function* () {
                -1 !== this.btSubDetailCookie && (E.detachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.btSubDetailCookie), this.btSubDetailCookie = -1), -1 !== this.groupTaskStatusCookie && (E.detachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, this.groupTaskStatusCookie), this.groupTaskStatusCookie = -1), -1 !== this.groupTaskSubFileDetailChangedCookie && (E.detachTaskEvent(r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, this.groupTaskSubFileDetailChangedCookie), this.groupTaskSubFileDetailChangedCookie = -1), -1 !== this.p2spTaskDetailChangedCookie && (E.detachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, this.p2spTaskDetailChangedCookie), this.p2spTaskDetailChangedCookie = -1), this.clearGetShortLinkTimer()
            })
        }

        created() {
            if (this.isBt) {
                if (O.getTaskFromTaskId(this.taskBase.taskId).getExtraObject().isBtFileLoadEnd()) this.taskExtraLoaded = !0; else {
                    let e = void 0, t = () => {
                        this.taskExtraLoaded = !0, E.detachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileLoaded, e), e = void 0
                    };
                    e = E.attachTaskEvent(r.DownloadKernel.TaskEventType.BtSubFileLoaded, t)
                }
            } else this.taskExtraLoaded = !0;
            this.initialize()
        }

        mounted() {
            this.onOptionsChanged(this.currentCategoryViewId), b.client.callServerFunction("SetPerformanceItemEnd", "ClickDownload")
        }

        destroyed() {
            this.unInitialize(), "search" !== this.itemType && (this.active && (p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemActive, r.DownloadKernel.CategroyViewID.Downloading, !1, this.taskBase.taskId, this.$el), p.default.getNeedSelectNext() && (p.default.setNeedSelectNext(!1), this.$emit("active-nearby", this.index))), this.chosen && p.default.fireEvent(h.NodeEventMesssageNS.eventDownloadItemChosen, r.DownloadKernel.CategroyViewID.Downloading, this.taskBase.taskId, !1, !1))
        }
    };
    n([a.Prop()], F.prototype, "isFirstShowScanCode", void 0), n([a.Prop()], F.prototype, "vipInfo", void 0), n([a.Prop()], F.prototype, "showSideNetdisk", void 0), n([a.Prop({})], F.prototype, "enbaleVipPlugin", void 0), n([a.Prop({})], F.prototype, "vipSpeedInfo", void 0), n([a.Prop({})], F.prototype, "pulseForRename", void 0), n([a.Prop({default: ""})], F.prototype, "sharedKeyWords", void 0), n([a.Prop({})], F.prototype, "itemType", void 0), n([a.Prop({})], F.prototype, "index", void 0), n([a.Prop({})], F.prototype, "taskId", void 0), n([a.Prop({})], F.prototype, "taskBase", void 0), n([a.Prop({})], F.prototype, "currentCategoryId", void 0), n([a.Prop({})], F.prototype, "currentCategoryViewId", void 0), n([a.Prop()], F.prototype, "chosen", void 0), n([a.Prop()], F.prototype, "active", void 0), n([a.Prop()], F.prototype, "dataChecking", void 0), n([a.Prop({default: 0})], F.prototype, "accelerationTimes", void 0), n([a.Prop()], F.prototype, "panTaskProgress", void 0), n([a.Prop({default: 0})], F.prototype, "panTaskType", void 0), n([a.Prop({})], F.prototype, "panTaskData", void 0), n([a.Prop()], F.prototype, "qrCodeConfig", void 0), n([a.Prop()], F.prototype, "saveStatus", void 0), n([a.Watch("chosen")], F.prototype, "onChosenChanged", null), n([a.Watch("taskBase")], F.prototype, "onTaskBaseChanged", null), n([a.Watch("enbaleVipPlugin")], F.prototype, "onEnableVipPlugin", null), n([a.Watch("isShowCloudExpand")], F.prototype, "onShowCloudExpand", null), n([a.Watch("isFailed")], F.prototype, "onTaskFailedChange", null), n([a.Watch("currentCategoryViewId")], F.prototype, "onOptionsChanged", null), n([a.Watch("panTaskType")], F.prototype, "onPanTaskTypeChange", null), n([a.Watch("taskId", {immediate: !0})], F.prototype, "onTaskIdChanged", null), n([a.Watch("sharedKeyWords", {immediate: !0})], F.prototype, "onKeyWordsChange", null), n([a.Watch("pulseForRename", {immediate: !0})], F.prototype, "onRenamePulse", null), n([a.Watch("active")], F.prototype, "onActiveChanged", null), F = n([a.Component({
        components: {ItemVipSpeedPlugin: () => Promise.resolve().then(() => i(886))},
        watch: {}
    })], F), t.default = F
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(316), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(15), s = i(4), l = i(14);
    let d = class extends a.Vue {
        onHoverChanged(e, t) {
            return o(this, void 0, void 0, function* () {
                r.server.fireClientEvent("on_task_item_hover", e, this.taskId, this.vipSpeedInfo, "hover")
            })
        }

        clickVipLink() {
            return o(this, void 0, void 0, function* () {
                r.server.fireClientEvent("on_vip_link_click", this.taskId, this.vipSpeedInfo, "hover")
            })
        }

        get taskId() {
            let e = void 0;
            return this.taskBase && (e = this.taskBase.taskId), e
        }

        get taskStatus() {
            return this.taskBase.taskStatus
        }

        get isShowVipSpeed() {
            let e = !1;
            do {
                if (this.taskStatus !== s.DownloadKernel.TaskStatus.Started) break;
                if (this.startStatusPrompt) break;
                if (!this.vipSpeedInfo) break;
                if (!this.vipSpeedInfo.isShowVipSpeed) break;
                e = this.vipSpeedInfo.isShowVipSpeed
            } while (0);
            return e
        }

        get isShowSuperSpeed() {
            let e = !0;
            do {
                if (!this.vipSpeedInfo) break;
                if (void 0 === this.vipSpeedInfo.isShowSuperSpeed) break;
                e = this.vipSpeedInfo.isShowSuperSpeed
            } while (0);
            return e
        }

        get vipSpeed() {
            return "+" + l.ThunderUtil.formatSizeCustom(this.taskBase.vipSpeed, 1, 4) + "/s"
        }

        get isShowVipHover() {
            let e = !1;
            do {
                if (!this.isHover) break;
                this.vipSpeedInfo && this.vipSpeedInfo.isShowVipHover && (e = this.vipSpeedInfo.isShowVipHover)
            } while (0);
            return e
        }

        get isShowSuperHover() {
            let e = !1;
            do {
                if (!this.isHover) break;
                this.vipSpeedInfo && this.vipSpeedInfo.isShowSuperHover && (e = this.vipSpeedInfo.isShowSuperHover)
            } while (0);
            return e
        }

        get hoverText() {
            let e = "";
            do {
                if (!this.isHover) break;
                if (this.vipSpeedInfo && this.vipSpeedInfo.hoverText) {
                    e = this.vipSpeedInfo.hoverText;
                    break
                }
            } while (0);
            return e
        }

        get isHover() {
            let e = !1;
            do {
                if (this.active) break;
                if (!this.hover) break;
                e = !0
            } while (0);
            return e
        }
    };
    n([a.Prop({})], d.prototype, "vipSpeedInfo", void 0), n([a.Prop({})], d.prototype, "taskBase", void 0), n([a.Prop({})], d.prototype, "startStatusPrompt", void 0), n([a.Prop({})], d.prototype, "active", void 0), n([a.Prop({})], d.prototype, "hover", void 0), n([a.Watch("isHover")], d.prototype, "onHoverChanged", null), d = n([a.Component({components: {}})], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(318), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(888), o = i(24), a = i(4), r = i(26).DownloadKernelCategoryManager.getCategoryManager();
    t.default = o.connector.connect({
        mapStateToProps: {
            taskBase: (e, t) => {
                let i = null, n = t.taskId;
                if (t.filtering) i = e.DownloadListState.filterTasks.tasksMap[n]; else {
                    let o = t.currentCategoryId;
                    if (-1 === o) {
                        for (let t = 0; t < e.DownloadListState.taskList.length; t++) if (e.DownloadListState.taskList[t].id === a.DownloadKernel.CategroyViewID.Completed) {
                            i = e.DownloadListState.taskList[t].tasksMap[n];
                            break
                        }
                    } else if (r.isPrivateCategory(o)) for (let t = 0; t < e.DownloadListState.taskListPrivate.length; t++) e.DownloadListState.taskListPrivate[t].id === a.DownloadKernel.CategroyViewID.Completed && (i = e.DownloadListState.taskListPrivate[t].tasksMap[n])
                }
                return i
            }
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(320), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(2), r = i(41), s = i(6), l = i(0), d = i(4), u = i(11), c = i(64), h = i(14), f = i(37), p = i(40),
        g = i(34), m = i(13), v = i(9), y = i(30), T = i(22), w = i(38), k = i(43), C = i(8), b = i(51), I = i(16),
        S = i(25), _ = i(39), D = i(117), A = i(15), N = l.default.getLogger("Thunder.Download.Completed"),
        x = u.DownloadKernelTaskManager.getTaskManager(), E = I.DownloadKernelEventManager.getEventManager();
    let O = class extends s.Vue {
        constructor() {
            super(...arguments), this.btSubDetailCookie = -1, this.groupTaskSubFileDetailChangedCookie = -1, this.p2spTaskDetailChangedCookie = -1, this.titleOverFlow = "", this.lastFullFileName = void 0, this.fileTypeClass = "", this.isInstallFileIcon = !1, this.installFileIcon = "", this.highLight = "", this.fileNameDefaultCursor = "cursor:default", this.playProgress = 0, this.taskExtraLoaded = !1, this.isShowShouleiFileTransfer = !1, this.enableShouleiFileTransfer = !1, this.isVip = !1
        }

        onChosenChanged(e) {
            y.default.fireEvent(m.NodeEventMesssageNS.eventDownloadItemChosen, d.DownloadKernel.CategroyViewID.Completed, this.taskBase.taskId, e, this.active)
        }

        onActiveChanged(e, t) {
            "search" !== this.itemType && y.default.fireEvent(m.NodeEventMesssageNS.eventDownloadItemActive, d.DownloadKernel.CategroyViewID.Completed, e, this.taskBase.taskId, this.$el), this.$emit("active-change", e)
        }

        onOptionsChanged(e, t) {
            this.active && y.default.fireEvent(m.NodeEventMesssageNS.eventDownloadItemActive, d.DownloadKernel.CategroyViewID.Completed, e === d.DownloadKernel.CategroyViewID.Completed, this.taskBase.taskId, this.$el), this.chosen && y.default.fireEvent(m.NodeEventMesssageNS.eventDownloadItemChosen, d.DownloadKernel.CategroyViewID.Completed, this.taskBase.taskId, e === d.DownloadKernel.CategroyViewID.Completed, this.active)
        }

        onFullFileNameChange(e, t) {
            return o(this, void 0, void 0, function* () {
                void 0 !== t && r.unwatchFile(t, this.handleWatchFile), this.handleWatchFile().catch(), e && r.watchFile(e, this.handleWatchFile), this.fileTypeClass = yield this.getFileTypeClass().catch()
            })
        }

        onOpenedChange(e) {
            this.$emit("update:opened", e)
        }

        onKeyWordsChange(e, t) {
            this.highLight = h.ThunderUtil.keywordsHighLight(this.taskBase.taskName, e, null)
        }

        onRenamePulse(e, t) {
            this.highLight = h.ThunderUtil.keywordsHighLight(this.taskBase.taskName, this.sharedKeyWords, null)
        }

        get isNetdiskTask() {
            return !(!this.taskBase || -1 === this.taskBase.categoryId || -1 !== this.currentCategoryId)
        }

        get showShouleiFileTransferIcon() {
            return !(this.currentCategoryViewId !== d.DownloadKernel.CategroyViewID.Completed || this.deleted || !this.enableShouleiFileTransfer || !this.fileTransferTooltip && !this.isShowShouleiFileTransfer || this.taskBase.taskType === d.DownloadKernel.TaskType.Group)
        }

        onShouleiFileTransferIconShow(e) {
            e && v.XLStatNS.trackEvent("download_leftpanel", "send_file_to_shoulei_entry_icon_show")
        }

        get canPlay() {
            let e = !1;
            do {
                if (this.deleted) break;
                if (this.taskBase.isMoving) break;
                if (!this.taskExtraLoaded) break;
                let t = x.getTaskFromTaskId(this.taskBase.taskId);
                t && (e = t.isSupportPlay())
            } while (0);
            return e
        }

        get opened() {
            return 1 === this.taskBase.userRead
        }

        get markTitle() {
            let e = "标记为未打开";
            return e = this.opened ? "标记为未打开" : "标记为已打开"
        }

        get fullFileName() {
            let e = this.taskBase.savePath, t = this.taskBase.taskName;
            void 0 !== t && t.indexOf(".") === t.length - 1 && (t = t.substring(0, t.length - 1));
            let i = "";
            return i = this.taskBase.taskType === d.DownloadKernel.TaskType.Group ? e : a.join(e, t)
        }

        handleWatchFile(e, t) {
            return o(this, void 0, void 0, function* () {
                void 0 !== e && void 0 !== t && N.information("fs watchFile", e.mtime, t.mtime, this.fullFileName);
                let i = yield p.TaskCtrlOperatorNS.isExistTaskFile(this.taskBase);
                i ? this.$emit("update:deleted", !1) : this.$emit("update:deleted", !0), A.server.fireClientEvent("TaskFileExitsChange", this.taskBase.taskId, i)
            })
        }

        updateBtTaskPlayProgress(e) {
            let t = e.getExtraObject(), i = [];
            t.getDownloadFile().forEach(e => {
                let n = t.getBtFileByRealIndex(e);
                if (n.isSupportPlay()) {
                    let e = 0, t = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.Duration),
                        o = n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.PlayPosition);
                    t && (e = o / t), N.information("play progress bt", n.getBtFileAttribute(d.DownloadKernel.BtFileAttribute.FileName), o, t), i.push(e)
                }
            }), i.length && (this.playProgress = i.reduce(function (e, t, i, n) {
                return e + t
            }) / i.length, N.information("play progress bt2", this.playProgress, i))
        }

        updateGroupTaskPlayProgress(e) {
            let t = e.getExtraObject(), i = t.getDownloadTaskCount(), n = [];
            for (let e = 0; e < i; ++e) {
                let i = t.getSubTaskByIndex(e);
                if (i && i.isSupportPlay()) {
                    let e = 0, t = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.Duration),
                        o = i.getTaskAttribute(d.DownloadKernel.TaskAttribute.PlayPosition);
                    t && (e = o / t), n.push(e)
                }
            }
            n.length && (this.playProgress = n.reduce(function (e, t, i, n) {
                return e + t
            }) / n.length)
        }

        updateP2spTaskPlayProgress(e) {
            if (e.isSupportPlay()) {
                let t = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.Duration),
                    i = e.getTaskAttribute(d.DownloadKernel.TaskAttribute.PlayPosition);
                t && (this.playProgress = i / t)
            }
        }

        onBtSubFileDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== d.DownloadKernel.TaskEventType.BtSubFileDetailChanged) break;
                if (!e[1] || !e[2]) break;
                if (e[1] === this.taskBase.taskId) {
                    let e = x.getTaskFromTaskId(this.taskBase.taskId);
                    this.updateBtTaskPlayProgress(e)
                }
            } while (0)
        }

        onGroupTaskStatusChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== d.DownloadKernel.TaskEventType.StatusChanged) break;
                if (!e[1]) break;
                let t = e[1];
                if (t[0].getTaskAttribute(d.DownloadKernel.TaskAttribute.CategoryId) !== this.currentCategoryId) break;
                for (let e = 0; e < t.length; e++) {
                    let i = t[e];
                    if (i.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskId) === this.taskId) {
                        this.updateGroupTaskPlayProgress(i);
                        break
                    }
                }
            } while (0)
        }

        onGroupTaskSubFileDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== d.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged) break;
                if (!e[1]) break;
                e[1].forEach((e, t) => {
                    if (t === this.taskId) {
                        let e = x.getTaskFromTaskId(t);
                        e && this.updateGroupTaskPlayProgress(e)
                    }
                })
            } while (0)
        }

        onP2spTaskDetailChanged(...e) {
            do {
                if (!e) break;
                if (e[0] !== d.DownloadKernel.TaskEventType.DetailChanged) break;
                if (!e[1]) break;
                let t = e[2];
                if (t & d.DownloadKernel.TaskDetailChangedFlags.PlayPosition || t & d.DownloadKernel.TaskDetailChangedFlags.Duration) {
                    let t = e[1];
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (i && i.getId() === this.taskId) {
                            this.updateP2spTaskPlayProgress(i);
                            break
                        }
                    }
                }
            } while (0)
        }

        initialize() {
            return o(this, void 0, void 0, function* () {
                let e = x.getTaskFromTaskId(this.taskBase.taskId);
                this.taskBase.taskType === d.DownloadKernel.TaskType.Bt ? (this.btSubDetailCookie = E.attachTaskEvent(d.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.onBtSubFileDetailChanged), this.updateBtTaskPlayProgress(e)) : this.taskBase.taskType === d.DownloadKernel.TaskType.Group ? (this.groupTaskSubFileDetailChangedCookie = E.attachTaskEvent(d.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, this.onGroupTaskSubFileDetailChanged), this.updateGroupTaskPlayProgress(e)) : (this.p2spTaskDetailChangedCookie = E.attachTaskEvent(d.DownloadKernel.TaskEventType.DetailChanged, this.onP2spTaskDetailChanged), this.updateP2spTaskPlayProgress(e))
            })
        }

        unInitialize() {
            return o(this, void 0, void 0, function* () {
                -1 !== this.btSubDetailCookie && (E.detachTaskEvent(d.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.btSubDetailCookie), this.btSubDetailCookie = -1), -1 !== this.groupTaskSubFileDetailChangedCookie && (E.detachTaskEvent(d.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, this.groupTaskSubFileDetailChangedCookie), this.groupTaskSubFileDetailChangedCookie = -1), -1 !== this.p2spTaskDetailChangedCookie && (E.detachTaskEvent(d.DownloadKernel.TaskEventType.DetailChanged, this.p2spTaskDetailChangedCookie), this.p2spTaskDetailChangedCookie = -1)
            })
        }

        created() {
            if (this.isBt) {
                if (x.getTaskFromTaskId(this.taskBase.taskId).getExtraObject().isBtFileLoadEnd()) this.taskExtraLoaded = !0; else {
                    let e = void 0, t = () => {
                        this.taskExtraLoaded = !0, this.$nextTick(() => {
                            this.handleWatchFile()
                        }), E.detachTaskEvent(d.DownloadKernel.TaskEventType.BtSubFileLoaded, e), e = void 0
                    };
                    e = E.attachTaskEvent(d.DownloadKernel.TaskEventType.BtSubFileLoaded, t)
                }
            } else this.taskExtraLoaded = !0;
            this.initialize(), S.default.isInitedAw().then(() => {
                this.enableShouleiFileTransfer = 0 !== S.default.getConfigInfo("shouleiDownload", "enableTransfer")
            }).catch(), D.default.addListener(D.UserEventNS.authorityChanged, () => {
                this.isVip = D.default.isVip
            }), this.isVip = D.default.isVip
        }

        destroyed() {
            this.unInitialize(), N.information("item destroyed"), r.unwatchFile(this.fullFileName, this.handleWatchFile), "search" !== this.itemType && (this.active && (y.default.fireEvent(m.NodeEventMesssageNS.eventDownloadItemActive, d.DownloadKernel.CategroyViewID.Completed, !1, this.taskBase.taskId, this.$el), y.default.getNeedSelectNext() && (y.default.setNeedSelectNext(!1), this.$emit("active-nearby", this.index))), this.chosen && y.default.fireEvent(m.NodeEventMesssageNS.eventDownloadItemChosen, d.DownloadKernel.CategroyViewID.Completed, this.taskBase.taskId, !1, !1))
        }

        get isExe() {
            let e = !1;
            do {
                if (this.taskBase.taskType !== d.DownloadKernel.TaskType.Emule && this.taskBase.taskType !== d.DownloadKernel.TaskType.P2sp) break;
                let t = a.extname(this.taskBase.taskName);
                if (null === t || void 0 === t) break;
                if (".exe" === t.toLowerCase()) {
                    e = !0;
                    break
                }
            } while (0);
            return e
        }

        getFileTypeClass() {
            return o(this, void 0, void 0, function* () {
                let e = "xly-icon-type";
                if (e = e + " " + f.TaskUtilHelper.getTaskIcon(this.taskBase.taskName, this.taskBase.taskType), this.isGroup) {
                    let t = x.getTaskFromTaskId(this.taskBase.taskId), i = this.getInstallFileName(t);
                    if (null !== i && void 0 !== i && "" !== i) {
                        let t = p.TaskCtrlOperatorNS.getSavePathByFileName(this.taskBase.taskId, i);
                        if (null !== t && void 0 !== t && "" !== t) {
                            if (yield C.FileSystemAWNS.existsAW(t)) {
                                let i = yield g.TaskOperatorNs.getFileIcon(t).catch();
                                null !== i && void 0 !== i && "" !== i && (this.isInstallFileIcon = !0, this.installFileIcon = i, e = "xly-icon-type")
                            }
                        }
                    }
                } else if (this.isExe && (yield C.FileSystemAWNS.existsAW(this.fullFileName))) {
                    let t = yield g.TaskOperatorNs.getFileIcon(this.fullFileName).catch();
                    null !== t && void 0 !== t && "" !== t && (this.isInstallFileIcon = !0, this.installFileIcon = t, e = "xly-icon-type")
                }
                return e
            })
        }

        get taskName() {
            return "search" !== this.itemType ? this.taskBase.taskName : this.highLight
        }

        get fileSizeFormat() {
            return h.ThunderUtil.formatSize(this.taskBase.fileSize)
        }

        get completeTime() {
            let e = "", t = this.taskBase.completionTime;
            if (t > 0) {
                let i = new Date(t);
                e = c.TimeHelperNS.formatDate(i, "yyyy-MM-dd hh:mm")
            }
            return e
        }

        get isGroup() {
            let e = !1;
            return this.taskBase.taskType === d.DownloadKernel.TaskType.Group && (e = !0), e
        }

        get isBt() {
            let e = !1;
            return this.taskBase.taskType === d.DownloadKernel.TaskType.Bt && (e = !0), e
        }

        get bTaskCountShow() {
            let e = !1;
            return (this.isBt || this.isGroup) && (this.active || this.chosen) && (e = !0), e
        }

        get playProgressStyle() {
            return this.playCompleted ? "width: 0%;" : "width: " + 100 * this.playProgress + "%;"
        }

        get playCompleted() {
            return 1 === this.playProgress
        }

        get subTaskCount() {
            let e = "0个文件", t = 0;
            if (this.isBt) {
                t = x.getTaskFromTaskId(this.taskBase.taskId).getExtraObject().getDownloadFile().length
            } else if (this.isGroup) {
                t = x.getTaskFromTaskId(this.taskBase.taskId).getExtraObject().getDownloadTaskCount()
            }
            return e = t < 1e3 ? t + "个文件" : "999+文件"
        }

        getInstallFileName(e) {
            let t = "";
            do {
                if (e.getTaskAttribute(d.DownloadKernel.TaskAttribute.TaskType) !== d.DownloadKernel.TaskType.Group) break;
                let i = e.getExtraObject().getUserData(k.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile");
                if (void 0 === i || null === i || "" === i || "0" === i) break;
                t = i
            } while (0);
            return t
        }

        handleMark() {
            this.opened ? (v.XLStatNS.trackEvent("download_leftpanel", "finished_left_markcancel_click", "", 0, 0, 0, 0, this.statExtData()), g.TaskOperatorNs.markReadStatus([this.taskBase], 0)) : (v.XLStatNS.trackEvent("download_leftpanel", "finished_left_mark_click", "", 0, 0, 0, 0, this.statExtData()), g.TaskOperatorNs.markReadStatus([this.taskBase], 1))
        }

        handleTaskNameMouseOver(e) {
            let t = e.target, i = t.scrollHeight, n = t.offsetHeight;
            this.titleOverFlow = i > n ? this.taskName : ""
        }

        statExtData() {
            let e = "panel_type=mypc";
            return -1 !== this.currentCategoryId && (e = "panel_type=private"), e
        }

        handleFileTransferIconClick() {
            v.XLStatNS.trackEvent("download_leftpanel", "send_file_to_shoulei_entry_icon_click"), p.TaskCtrlOperatorNS.shouleiFileTransfer(this.taskBase).catch()
        }

        handleFileTransferTooltipClose() {
            this.fileTransferTooltip && this.$emit("update:fileTransferTooltip", !1)
        }

        handlePlayTask() {
            let e = this.statExtData();
            if (x.getTaskFromTaskId(this.taskBase.taskId)) {
                _.ThunderNewTask.selectTask(this.taskBase.taskId).catch();
                let t = "download_left_complate_btn_click";
                if (-1 !== this.currentCategoryId) t = "download_private_space_local_play", e = `${e},panel=finished,click_source=play`, v.XLStatNS.trackEvent("download_leftpanel", "play_click", "", 0, 0, 0, 0, e); else if (-1 !== this.taskBase.categoryId) {
                    let e = this.taskBase.taskName.split("."), t = e[e.length - 1], i = "video";
                    f.TaskUtilHelper.getTaskFileType(this.taskBase.taskName) === f.TaskUtilHelper.FileExtType.Music && (i = "music"), v.XLStatNS.trackEvent("pc_yunpan", "yunpan_consumption_click", "", 0, 0, 0, 0, "from=download_left_gotback_play_click,file_type=" + i + ",suffix=" + t)
                }
                if (-1 === this.currentCategoryId && -1 !== this.taskBase.categoryId) {
                    let e = !1,
                        i = x.getTaskFromTaskId(this.taskId).getExtraObject().getUserData(k.TaskUserDataGUID.guidThunderYunDownloadUserData, "extras");
                    if (i) {
                        let t = null;
                        try {
                            t = JSON.parse(i)
                        } catch (e) {
                        }
                        t && 1 === t.isInSafe && (e = !0)
                    }
                    t = e ? "safebox_download_getback_complete_play" : "download_getback_complete_play"
                }
                g.TaskOperatorNs.downloadAndPlay(this.taskBase.taskId, -1, "play", "finished", this.taskBase.categoryId, !1, 0, !this.playCompleted, !1, t).catch(), g.TaskOperatorNs.markReadStatus([this.taskBase], 1)
            }
        }

        getOpenFolderExtData() {
            let e = "";
            if (this.taskBase.taskType === d.DownloadKernel.TaskType.Bt) e = "folder_type=bt"; else if (this.taskBase.taskType === d.DownloadKernel.TaskType.Group) e = "folder_type=task_group"; else {
                let t = a.extname(this.taskBase.taskName);
                t && t.length > 1 && (t = t.length > 10 ? "" : t.slice(1)), e = `folder_type=${t || ""}`
            }
            return e
        }

        handleOpenFile() {
            let e = this.getOpenFolderExtData();
            v.XLStatNS.trackEvent("download_leftpanel", "finished_right_openfiles_click", "", 0, 0, 0, 0, `folder_type=${e},${this.statExtData()}`), g.TaskOperatorNs.markReadStatus([this.taskBase], 1), g.TaskOperatorNs.openTaskFolder(this.taskBase)
        }

        handleDestroyTask() {
            v.XLStatNS.trackEvent("download_leftpanel", "finished_right_delete_click", "", 0, 0, 0, 0, this.statExtData()), g.TaskOperatorNs.destroyTasks([this.taskBase], !1)
        }

        handleDbClick() {
            g.TaskOperatorNs.markReadStatus([this.taskBase], 1);
            do {
                if (this.deleted) {
                    T.MessageBox.confirm({
                        title: "提示",
                        content: "此文件已经被删除，是否需要重新下载？",
                        type: T.MessageBox.ConfirmType.Info,
                        okText: "重新下载",
                        cancelText: "删除任务"
                    }).then(e => {
                        e.action === w.MessageBoxNS.Action.OK ? p.TaskCtrlOperatorNS.redownloadTask([this.taskBase], !1) : e.action === w.MessageBoxNS.Action.Cancel && g.TaskOperatorNs.destroyTasks([this.taskBase], !1)
                    });
                    break
                }
                let e = !1,
                    t = x.getTaskFromTaskId(this.taskId).getExtraObject().getUserData(k.TaskUserDataGUID.guidThunderYunDownloadUserData, "extras");
                if (t) {
                    let i = null;
                    try {
                        i = JSON.parse(t)
                    } catch (e) {
                    }
                    i && 1 === i.isInSafe && (e = !0)
                }
                if (this.taskBase.taskType === d.DownloadKernel.TaskType.Bt) {
                    let t = x.getTaskFromTaskId(this.taskBase.taskId);
                    b.SingleBtTaskNS.isSingleBtTask(t).then(t => {
                        if (t) {
                            let t = "download_left_complate_double_click";
                            -1 !== this.currentCategoryId ? t = "download_private_space_local_play" : -1 === this.currentCategoryId && -1 !== this.taskBase.categoryId && (t = e ? "safebox_download_getback_complete_play" : "download_getback_complete_play"), g.TaskOperatorNs.openTaskItem(this.taskBase, void 0, void 0, void 0, void 0, void 0, t)
                        } else g.TaskOperatorNs.openTaskFolder(this.taskBase, !0)
                    }).catch()
                } else if (this.taskBase.taskType === d.DownloadKernel.TaskType.Group) {
                    let e = x.getTaskFromTaskId(this.taskBase.taskId);
                    g.TaskOperatorNs.executeInstallFile(e).then(e => {
                        e || g.TaskOperatorNs.openTaskFolder(this.taskBase, !0)
                    }).catch()
                } else {
                    let t = "download_left_complate_double_click";
                    if (-1 !== this.currentCategoryId ? t = "download_private_space_local_play" : -1 !== this.taskBase.categoryId && (t = e ? "safebox_download_getback_complete_play" : "download_getback_complete_play"), this.canPlay) {
                        let e = "double_click", i = this.statExtData();
                        i = `${i},panel=finished,click_source=${e}`, v.XLStatNS.trackEvent("download_leftpanel", "play_click", "", 0, 0, 0, 0, i), x.getTaskFromTaskId(this.taskBase.taskId) && g.TaskOperatorNs.downloadAndPlay(this.taskBase.taskId, -1, e, "finished", this.currentCategoryId, !1, 0, !this.playCompleted, !1, t).catch()
                    } else g.TaskOperatorNs.openTaskItem(this.taskBase, void 0, void 0, void 0, void 0, void 0, t)
                }
            } while (0)
        }
    };
    n([s.Prop({})], O.prototype, "filtering", void 0), n([s.Prop({})], O.prototype, "fileTransferTooltip", void 0), n([s.Prop({})], O.prototype, "pulseForRename", void 0), n([s.Prop({})], O.prototype, "sharedKeyWords", void 0), n([s.Prop({})], O.prototype, "itemType", void 0), n([s.Prop({})], O.prototype, "index", void 0), n([s.Prop({})], O.prototype, "taskId", void 0), n([s.Prop({})], O.prototype, "taskBase", void 0), n([s.Prop({})], O.prototype, "currentCategoryId", void 0), n([s.Prop({})], O.prototype, "currentCategoryViewId", void 0), n([s.Prop()], O.prototype, "deleted", void 0), n([s.Prop()], O.prototype, "chosen", void 0), n([s.Prop()], O.prototype, "active", void 0), n([s.Watch("chosen")], O.prototype, "onChosenChanged", null), n([s.Watch("active")], O.prototype, "onActiveChanged", null), n([s.Watch("currentCategoryViewId")], O.prototype, "onOptionsChanged", null), n([s.Watch("fullFileName", {immediate: !0})], O.prototype, "onFullFileNameChange", null), n([s.Watch("opened", {immediate: !0})], O.prototype, "onOpenedChange", null), n([s.Watch("sharedKeyWords", {immediate: !0})], O.prototype, "onKeyWordsChange", null), n([s.Watch("pulseForRename", {immediate: !0})], O.prototype, "onRenamePulse", null), n([s.Watch("showShouleiFileTransferIcon", {immediate: !0})], O.prototype, "onShouleiFileTransferIconShow", null), O = n([s.Component], O), t.default = O
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(322), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(890), o = i(24), a = i(4);
    t.default = o.connector.connect({
        mapStateToProps: {
            taskBase: (e, t) => {
                let i = null, n = t.taskId;
                if (-1 === t.currentCategoryId) for (let t = 0; t < e.DownloadListState.taskList.length; t++) if (e.DownloadListState.taskList[t].id === a.DownloadKernel.CategroyViewID.Recycle) {
                    i = e.DownloadListState.taskList[t].tasksMap[n];
                    break
                }
                return i
            }
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(324), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(2), r = i(41), s = i(6), l = i(4), d = i(11), u = i(64), c = i(14), h = i(37), f = i(40), p = i(34),
        g = i(13), m = i(30), v = i(9), y = i(22), T = i(38), w = i(8), k = i(51),
        C = d.DownloadKernelTaskManager.getTaskManager();
    let b = class extends s.Vue {
        constructor() {
            super(...arguments), this.titleOverFlow = "", this.bAttachFile = !1, this.highLight = "", this.fileNameDefaultCursor = "cursor:default", this.fileIcon = "", this.isFileIcon = !1, this.fileTypeClass = ""
        }

        onOptionsChanged(e, t) {
            this.active && m.default.fireEvent(g.NodeEventMesssageNS.eventDownloadItemActive, l.DownloadKernel.CategroyViewID.Recycle, e === l.DownloadKernel.CategroyViewID.Recycle, this.taskBase.taskId, this.$el), this.chosen && m.default.fireEvent(g.NodeEventMesssageNS.eventDownloadItemChosen, l.DownloadKernel.CategroyViewID.Recycle, this.taskBase.taskId, e === l.DownloadKernel.CategroyViewID.Recycle, this.active)
        }

        onChosenChanged(e) {
            m.default.fireEvent(g.NodeEventMesssageNS.eventDownloadItemChosen, l.DownloadKernel.CategroyViewID.Recycle, this.taskBase.taskId, e, this.active)
        }

        onActiveChanged(e, t) {
            "search" !== this.itemType && m.default.fireEvent(g.NodeEventMesssageNS.eventDownloadItemActive, l.DownloadKernel.CategroyViewID.Recycle, e, this.taskBase.taskId, this.$el), this.$emit("active-change", e)
        }

        onTaskIdChanged(e, t) {
            this.taskBase.taskStatus !== l.DownloadKernel.TaskStatus.Succeeded && this.taskBase.taskStatus !== l.DownloadKernel.TaskStatus.Seeding || (this.bAttachFile = !0, this.handleWatchFile(), r.watchFile(this.fullFileName, this.handleWatchFile))
        }

        onKeyWordsChange(e, t) {
            this.highLight = c.ThunderUtil.keywordsHighLight(this.taskBase.taskName, e, null)
        }

        onRenamePulse(e, t) {
            this.highLight = c.ThunderUtil.keywordsHighLight(this.taskBase.taskName, this.sharedKeyWords, null)
        }

        onFullFileNameChange(e, t) {
            return o(this, void 0, void 0, function* () {
                this.fileTypeClass = yield this.getFileTypeClass().catch()
            })
        }

        get fullFileName() {
            let e = this.taskBase.savePath, t = this.taskBase.taskName;
            void 0 !== t && t.indexOf(".") === t.length - 1 && (t = t.substring(0, t.length - 1));
            let i = "";
            return i = this.taskBase.taskType === l.DownloadKernel.TaskType.Group ? e : a.join(e, t)
        }

        get isExe() {
            let e = !1;
            do {
                if (this.taskBase.taskStatus !== l.DownloadKernel.TaskStatus.Succeeded && this.taskBase.taskStatus !== l.DownloadKernel.TaskStatus.Seeding) break;
                if (this.taskBase.taskType !== l.DownloadKernel.TaskType.Emule && this.taskBase.taskType !== l.DownloadKernel.TaskType.P2sp) break;
                let t = a.extname(this.taskBase.taskName);
                if (null === t || void 0 === t) break;
                if (".exe" === t.toLowerCase()) {
                    e = !0;
                    break
                }
            } while (0);
            return e
        }

        getFileTypeClass() {
            return o(this, void 0, void 0, function* () {
                let e = "";
                if (this.isExe) {
                    if (yield w.FileSystemAWNS.existsAW(this.fullFileName)) {
                        let e = yield p.TaskOperatorNs.getFileIcon(this.fullFileName).catch();
                        e && "" !== e && (this.isFileIcon = !0, this.fileIcon = e)
                    }
                } else e = h.TaskUtilHelper.getTaskIcon(this.taskBase.taskName, this.taskBase.taskType);
                return e
            })
        }

        get taskName() {
            return "search" !== this.itemType ? this.taskBase.taskName : this.highLight
        }

        get fileSizeFormat() {
            return c.ThunderUtil.formatSize(this.taskBase.fileSize)
        }

        get creationTime() {
            let e = "", t = this.taskBase.createTime;
            if (t > 0) {
                let i = new Date(t);
                e = u.TimeHelperNS.formatDate(i, "yyyy-MM-dd hh:mm")
            }
            return e
        }

        get canPlay() {
            let e = !1, t = C.getTaskFromTaskId(this.taskBase.taskId);
            return t && (e = t.isSupportPlay()), e
        }

        get isSingleTask() {
            let e = !0;
            if (this.taskBase.taskType === l.DownloadKernel.TaskType.Bt) {
                C.getTaskFromTaskId(this.taskBase.taskId).getExtraObject().getDownloadFile().length > 1 && (e = !1)
            }
            return e
        }

        handleWatchFile() {
            return o(this, void 0, void 0, function* () {
                (yield f.TaskCtrlOperatorNS.isExistTaskFile(this.taskBase)) ? this.$emit("update:deleted", !1) : this.$emit("update:deleted", !0)
            })
        }

        handleTaskNameMouseOver(e) {
            let t = e.target, i = t.scrollHeight, n = t.offsetHeight;
            this.titleOverFlow = i > n ? this.taskName : ""
        }

        statExtData() {
            let e = "panel_type=mypc";
            return -1 !== this.currentCategoryId && (e = "panel_type=private"), e
        }

        handleRestore() {
            v.XLStatNS.trackEvent("download_leftpanel", "dustbin_right_uno_click", "", 0, 0, 0, 0, this.statExtData()), C.recoverFromRecycle(this.taskBase.taskId)
        }

        handleClear() {
            v.XLStatNS.trackEvent("download_leftpanel", "dustbin_right_completedelete_click", "", 0, 0, 0, 0, this.statExtData()), p.TaskOperatorNs.destroyTasks([this.taskBase])
        }

        handleDbClick() {
            return o(this, void 0, void 0, function* () {
                do {
                    if (this.taskBase.taskStatus === l.DownloadKernel.TaskStatus.Succeeded || this.taskBase.taskStatus === l.DownloadKernel.TaskStatus.Seeding) {
                        if (!(yield f.TaskCtrlOperatorNS.canOpenSelectedTaskFile(this.taskBase))) {
                            y.MessageBox.confirm({
                                title: "提示",
                                content: "此文件已经被删除，是否需要重新下载？",
                                type: y.MessageBox.ConfirmType.Info,
                                okText: "重新下载",
                                cancelText: "删除任务"
                            }).then(e => {
                                e.action === T.MessageBoxNS.Action.OK ? f.TaskCtrlOperatorNS.redownloadTask([this.taskBase], !1) : e.action === T.MessageBoxNS.Action.Cancel && p.TaskOperatorNs.destroyTasks([this.taskBase], !1)
                            });
                            break
                        }
                        if (this.taskBase.taskType === l.DownloadKernel.TaskType.Bt) {
                            let e = C.getTaskFromTaskId(this.taskBase.taskId);
                            k.SingleBtTaskNS.isSingleBtTask(e).then(e => {
                                e ? p.TaskOperatorNs.openTaskItem(this.taskBase, void 0, void 0, void 0, void 0, void 0, "download_left_recycle_double_click") : p.TaskOperatorNs.openTaskFolder(this.taskBase, !0)
                            }).catch()
                        } else if (this.taskBase.taskType === l.DownloadKernel.TaskType.Group) p.TaskOperatorNs.openTaskFolder(this.taskBase, !0); else if (this.canPlay && this.isSingleTask) {
                            let e = "double_click", t = "panel=dustbin,click_source=" + e;
                            v.XLStatNS.trackEvent("download_leftpanel", "play_click", "", 0, 0, 0, 0, t), C.getTaskFromTaskId(this.taskBase.taskId) && p.TaskOperatorNs.downloadAndPlay(this.taskBase.taskId, -1, e, "dustbin", this.currentCategoryId, !1, 0, !1, !1, "download_left_recycle_double_click").catch()
                        } else p.TaskOperatorNs.openTaskItem(this.taskBase, void 0, void 0, void 0, void 0, void 0, "download_left_recycle_double_click")
                    }
                } while (0)
            })
        }

        destroyed() {
            this.bAttachFile && (this.bAttachFile = !1, r.unwatchFile(this.fullFileName, this.handleWatchFile)), "search" !== this.itemType && (this.active && (m.default.fireEvent(g.NodeEventMesssageNS.eventDownloadItemActive, l.DownloadKernel.CategroyViewID.Recycle, !1, this.taskBase.taskId, this.$el), m.default.getNeedSelectNext() && (m.default.setNeedSelectNext(!1), this.$emit("active-nearby", this.index))), this.chosen && m.default.fireEvent(g.NodeEventMesssageNS.eventDownloadItemChosen, l.DownloadKernel.CategroyViewID.Recycle, this.taskBase.taskId, !1, !1))
        }
    };
    n([s.Prop({})], b.prototype, "pulseForRename", void 0), n([s.Prop({})], b.prototype, "sharedKeyWords", void 0), n([s.Prop({})], b.prototype, "itemType", void 0), n([s.Prop({})], b.prototype, "index", void 0), n([s.Prop({})], b.prototype, "taskId", void 0), n([s.Prop({})], b.prototype, "taskBase", void 0), n([s.Prop({})], b.prototype, "currentCategoryId", void 0), n([s.Prop({})], b.prototype, "currentCategoryViewId", void 0), n([s.Prop()], b.prototype, "active", void 0), n([s.Prop()], b.prototype, "chosen", void 0), n([s.Prop()], b.prototype, "deleted", void 0), n([s.Watch("currentCategoryViewId")], b.prototype, "onOptionsChanged", null), n([s.Watch("chosen")], b.prototype, "onChosenChanged", null), n([s.Watch("active")], b.prototype, "onActiveChanged", null), n([s.Watch("taskId", {immediate: !0})], b.prototype, "onTaskIdChanged", null), n([s.Watch("sharedKeyWords", {immediate: !0})], b.prototype, "onKeyWordsChange", null), n([s.Watch("pulseForRename", {immediate: !0})], b.prototype, "onRenamePulse", null), n([s.Watch("fullFileName", {immediate: !0})], b.prototype, "onFullFileNameChange", null), b = n([s.Component], b), t.default = b
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(326), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(14), r = i(4);
    let s = class extends o.Vue {
        constructor() {
            super(...arguments), this.downloadingTaskList = [], this.completedTaskList = [], this.downloadingCount = 0, this.completedCount = 0, this.completedActive = window.__xadsSkeletonCompletedActive
        }

        get downloadingCategoryTitle() {
            let e = "正在下载";
            return 0 !== this.downloadingCount && (e = e + "(" + this.downloadingCount + ")"), e
        }

        get completedCategoryTitle() {
            let e = "已完成";
            return 0 !== this.completedCount && (e = e + "(" + this.completedCount + ")"), e
        }

        taskError(e) {
            return e.taskStatus === r.DownloadKernel.TaskStatus.Failed
        }

        formatSizeCustom(e) {
            return a.ThunderUtil.formatSizeCustom(e)
        }

        progress(e) {
            return `width: ${e.fileSize ? e.downloadSize / e.fileSize * 100 : 0}%`
        }

        mounted() {
            do {
                let e = localStorage.getItem("skeleton_downloading");
                if (!e) break;
                let t = null;
                try {
                    t = JSON.parse(e)
                } catch (e) {
                    t = null
                }
                if (t && t.length > 0) {
                    let e = t[0];
                    e.count && !isNaN(Number(e.count)) && (this.downloadingCount = e.count), this.downloadingTaskList = t.slice(1)
                }
            } while (0);
            do {
                let e = localStorage.getItem("skeleton_completed");
                if (!e) break;
                let t = null;
                try {
                    t = JSON.parse(e)
                } catch (e) {
                    t = null
                }
                if (t && t.length > 0) {
                    let e = t[0];
                    e.count && !isNaN(Number(e.count)) && (this.completedCount = Number(e.count)), this.completedTaskList = t.slice(1)
                }
            } while (0);
            this.completedActive = 0 === this.downloadingTaskList.length && this.completedTaskList.length > 0
        }
    };
    s = n([o.Component], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(328), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(894), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {showPrivateSpaceOpenPage: e => e.PrivateSpaceState.showPrivateSpaceOpenPage},
        mapCommitToProps: {
            SHOW_PRIVATE_SPACE_OPEN_PAGE: "SHOW_PRIVATE_SPACE_OPEN_PAGE",
            UPDATE_CATEGORYVIEW: "UPDATE_CATEGORYVIEW"
        },
        mapDispatchToProps: {},
        mapGettersToProps: {}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(330), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(89), s = i(3), l = i(9);
    let d = class extends a.Vue {
        constructor() {
            super(...arguments), this.privateSpaceSetPasswordListener = null
        }

        stat(e) {
            let t = `button=${e}`;
            l.XLStatNS.trackEvent("download_leftpanel", "top_private_page_click", "", 0, 0, 0, 0, t)
        }

        openPrivateSpace() {
            return o(this, void 0, void 0, function* () {
                let e = yield s.client.callServerFunction("GetUserID");
                if (e && "" !== e) {
                    this.stat("open"), 0 === (yield r.PrivateSpaceHelperNS.phoneVerifyPrivateCategory(e)) && r.PrivateSpaceHelperNS.openPrivateCategory(e)
                }
            })
        }

        created() {
            let e = r.PrivateSpaceHelperNS.getEventEmitter();
            this.privateSpaceSetPasswordListener || (this.privateSpaceSetPasswordListener = (e => {
                e && this.SHOW_PRIVATE_SPACE_OPEN_PAGE(!1)
            }), e.on(r.PrivateSpaceHelperNS.EventType.SetPassword, this.privateSpaceSetPasswordListener))
        }

        destroyed() {
            if (this.privateSpaceSetPasswordListener) {
                r.PrivateSpaceHelperNS.getEventEmitter().removeListener(r.PrivateSpaceHelperNS.EventType.SetPassword, this.privateSpaceSetPasswordListener), this.privateSpaceSetPasswordListener = null
            }
        }
    };
    n([a.Prop({})], d.prototype, "SHOW_PRIVATE_SPACE_OPEN_PAGE", void 0), n([a.Prop({})], d.prototype, "UPDATE_CATEGORYVIEW", void 0), d = n([a.Component], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(332), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(896), o = i(24);
    t.default = o.connector.connect({
        mapStateToProps: {
            currentCategoryId: e => e.DownloadListState.currentCategoryId,
            currentCategoryViewId: e => e.DownloadListState.currentCategoryViewId,
            currentTabId: e => e.Tabs.current
        },
        mapCommitToProps: {
            UPDATE_CATEGORY: "UPDATE_CATEGORY",
            UPDATE_CATEGORYVIEW: "UPDATE_CATEGORYVIEW",
            UPDATE_DOWNLOADING_SELECTED_TASKS: "UPDATE_DOWNLOADING_SELECTED_TASKS",
            UPDATE_COMPLETED_SELECTED_TASKS: "UPDATE_COMPLETED_SELECTED_TASKS",
            UPDATE_RECYCLE_SELECTED_TASKS: "UPDATE_RECYCLE_SELECTED_TASKS",
            UPDATE_TASK_STATUS: "UPDATE_TASK_STATUS",
            UPDATE_DOWNLOADING_TASKLIST: "UPDATE_DOWNLOADING_TASKLIST",
            UPDATE_COMPLETED_TASKLIST: "UPDATE_COMPLETED_TASKLIST",
            UPDATE_RECYCLE_TASKLIST: "UPDATE_RECYCLE_TASKLIST"
        },
        mapDispatchToProps: {attachTaskEvent: "attachTaskEvent", selectTab: "selectTab"},
        mapGettersToProps: {
            downloadingTaskList: e => e.downloadingTaskList,
            completedTaskList: e => e.completedTaskList,
            recycleTaskList: e => e.recycleTaskList,
            downloadingSelectedIndexs: e => e.downloadingSelectedIndexs,
            completedSelectedTaskIndexs: e => e.completedSelectedTaskIndexs,
            recycleSelectedTaskIndexs: e => e.recycleSelectedTaskIndexs
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(334), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(0), r = i(4), s = i(59), l = i(574), d = i(34), u = i(114), c = i(13), h = i(30), f = i(9),
        p = i(33), g = i(16), m = i(11), v = i(5), y = i(91), T = i(32),
        w = g.DownloadKernelEventManager.getEventManager(), k = m.DownloadKernelTaskManager.getTaskManager(),
        C = a.default.getLogger("DownloadList");
    let b = class extends o.Vue {
        constructor() {
            super(...arguments), this.categoryLastSelectList = [{
                category: r.DownloadKernel.CategroyViewID.Downloading,
                lastIndex: 0
            }, {
                category: r.DownloadKernel.CategroyViewID.Completed,
                lastIndex: 0
            }, {
                category: r.DownloadKernel.CategroyViewID.Recycle,
                lastIndex: 0
            }], this.showNoResultTip = !1, this.showResultCountTip = !1, this.bLoadDbFinish = !1, this.insertToCategoryViewEventId = void 0, this.removeFromCategoryViewEventId = void 0, this.statusChangedEventId = void 0, this.dataBaseLoadCookie = void 0, this.inputFlag = !0, this.resultCount = 0, this.escapeCode = "", this.pulseEventFlag = !1, this.downloadingSearchArray = [], this.completeSearchArray = [], this.recycleSearchArray = [], this.downloadingSearchSelIndexs = [], this.completeSearchSelIndexs = [], this.recycleSearchSelIndexs = [], this.currentSelSearchTaskIds = [], this.searchListPanel = "Downloading", this.holderTextTip = "", this.searchType = "search", this.curSearchKey = "", this.inputFocus = !1
        }

        get recycleSearchList() {
            return void 0 === this.recycleSearchArray ? [] : this.recycleSearchArray
        }

        get completeSearchList() {
            return void 0 === this.completeSearchArray ? [] : this.completeSearchArray
        }

        get downloadingSearchList() {
            return void 0 !== this.downloadingSearchArray ? this.downloadingSearchArray : []
        }

        onInputFocus(e) {
            this.holderTextTip = "", this.inputFocus = !0
        }

        onInputBlur(e) {
            this.inputFocus = !1, this.curSearchKey.length < 1 && (this.holderTextTip = "搜索下载记录", this.showResultCountTip = !1)
        }

        preHandleSearchKey() {
            let e = this.curSearchKey.split(" "), t = [];
            if (e) for (let i = 0; i < e.length; i++) e[i].trim().length > 0 && t.push(e[i].trim());
            return t
        }

        getArrayIntersection(e, t) {
            let i = [], n = new Set(t);
            return i = Array.from(new Set(e.filter(e => n.has(e))))
        }

        replaceSpecialKeyForDB(e) {
            return e !== (e = e.replace(/\/|'|\[|]|%|&|_|\(|\)/g, function (e) {
                return "/" + e
            })) && (this.escapeCode = "/"), e
        }

        internalSearch(e) {
            C.information("多关键字数组:", e);
            let t = [], i = [];
            for (let n = 0; n < e.length; n++) {
                let o = r.DownloadKernel.SearchKeyType.NameInclude;
                this.escapeCode = "";
                let a = this.replaceSpecialKeyForDB(e[n]);
                T.ThunderKernel.searchTask(o, a, -1, this.escapeCode, n => {
                    let o, a;
                    if (this.clearSearch(), i = n, t[t.length] = i, t.length === e.length) {
                        let e;
                        t.length > 0 && (e = t[0]);
                        for (let i = 1; i < t.length; i++) e = this.getArrayIntersection(e, t[i]);
                        this.resultCount = e.length;
                        for (let t = 0; t < e.length; t++) (o = k.getTaskFromTaskId(e[t])) && (a = o.getTaskAttribute(r.DownloadKernel.TaskAttribute.CategoryViewId)), a && (a === r.DownloadKernel.CategroyViewID.Downloading ? this.downloadingSearchArray.push(e[t]) : a === r.DownloadKernel.CategroyViewID.Completed ? this.completeSearchArray.push(e[t]) : a === r.DownloadKernel.CategroyViewID.Recycle && this.recycleSearchArray.push(e[t]))
                    }
                })
            }
        }

        startSearch() {
            this.inputFlag && (v.isNullOrUndefined(this.curSearchKey) || (this.curSearchKey.trim().length < 1 ? this.clearSearch() : (this.showNoResultTip = !0, this.showResultCountTip = !0, this.internalSearch(this.preHandleSearchKey()))))
        }

        onDownloadTaskSelect(e) {
            if (!e) return;
            if (!e.length) return;
            let t, i;
            this.currentSelSearchTaskIds = e, this.currentSelSearchTaskInfos = [];
            for (let n = 0; n < e.length; n++) t = (i = k.getTaskFromTaskId(e[n])).getTaskBaseInfo(), this.currentSelSearchTaskInfos.push(t);
            this.$el.focus()
        }

        handlePopInputMenu() {
            y.MenuSkinNS.popEditableDefaultContextMenu(void 0, -4)
        }

        onCategoryChange(e) {
            h.default.fireEvent(c.NodeEventMesssageNS.eventDownloadItemActive, this.currentCategoryViewId, !1, 0, null, !0), this.UPDATE_CATEGORYVIEW(r.DownloadKernel.CategroyViewID.Downloading), -1 !== this.currentCategoryId && this.closeSearch()
        }

        clearSearch() {
            this.downloadingSearchArray = [], this.completeSearchArray = [], this.recycleSearchArray = [], this.resultCount = 0, this.showResultCountTip = !1, this.showNoResultTip = !1
        }

        clickCloseSearch() {
            f.XLStatNS.trackEvent("download_leftpanel", "search_close_click", "", 0, 0, 0, 0, "entry=close"), this.closeSearch()
        }

        keyCloseSearch() {
            f.XLStatNS.trackEvent("download_leftpanel", "search_close_click", "", 0, 0, 0, 0, "entry=ctrlf"), this.closeSearch()
        }

        closeSearch() {
            this.$emit("close:keysearch"), this.clearSearch(), this.curSearchKey = ""
        }

        handleDelete(e = !1) {
            e ? d.TaskOperatorNs.destroyTasks(this.currentSelSearchTaskInfos) : d.TaskOperatorNs.deleteTasks(this.currentSelSearchTaskInfos)
        }

        get downloadingCategoryTitle() {
            let e = "正在下载";
            return 0 !== this.downloadingSearchArray.length && (e = e + "(" + this.downloadingSearchArray.length + ")"), e
        }

        get completedCategoryTitle() {
            let e = "已完成";
            return 0 !== this.completeSearchArray.length && (e = e + "(" + this.completeSearchArray.length + ")"), e
        }

        get recycleCategoryTitle() {
            let e = "回收站";
            return 0 !== this.recycleSearchArray.length && (e = e + "(" + this.recycleSearchArray.length + ")"), e
        }

        downloadingItemDbClick() {
            s.TaskStatusHelper.canStopSelectedTask(this.currentCategoryViewId, this.currentSelSearchTaskInfos) ? d.TaskOperatorNs.pauseTasks(this.currentSelSearchTaskInfos, r.DownloadKernel.TaskStopReason.Manual) : s.TaskStatusHelper.canStartSelectedTask(this.currentCategoryViewId, this.currentSelSearchTaskInfos) ? d.TaskOperatorNs.startTasks(this.currentSelSearchTaskInfos) : C.information("downloaditem dbclick do nothing")
        }

        recycleItemDbClick() {
            C.information("垃圾箱双击")
        }

        handleDownloadingItemMenu(e) {
            u.downloadContextMenu.setContextInfo(this, this.currentCategoryId, this.downloadingTaskList.length, !0);
            let t = u.DownloadMenuType.DownloadingItem;
            this.currentSelSearchTaskInfos.length > 1 && (t = u.DownloadMenuType.SearchMultiSel), u.downloadContextMenu.popMenu(t, e)
        }

        handleCompletedItemMenu(e) {
            u.downloadContextMenu.setContextInfo(this, this.currentCategoryId, null, !0);
            let t = u.DownloadMenuType.CompletedItem;
            this.currentSelSearchTaskInfos.length > 1 && (t = u.DownloadMenuType.SearchMultiSel), u.downloadContextMenu.popMenu(t, e)
        }

        handleRecycleItemMenu(e) {
            u.downloadContextMenu.setContextInfo(this, this.currentCategoryId, null, !0);
            let t = u.DownloadMenuType.RecycleItem;
            this.currentSelSearchTaskInfos.length > 1 && (t = u.DownloadMenuType.SearchMultiSel), u.downloadContextMenu.popMenu(t, e)
        }

        handleMenuClick(e, ...t) {
            e
        }

        focusEdit() {
            let e = this.$refs.input.$el.querySelector("input");
            e && e.focus()
        }

        keydownSearch(e) {
            this.curSearchKey = e, this.$nextTick(() => {
                this.startSearch()
            })
        }

        compositionStart(e) {
            this.inputFocus && (this.inputFlag = !1)
        }

        compositionEnd(e) {
            this.inputFocus && (this.inputFlag = !0, this.$nextTick(() => {
                this.startSearch()
            }))
        }

        created() {
            this.attachTaskEvent(), this.holderTextTip = "搜索下载记录", u.downloadContextMenu.attachListener(c.NodeEventMesssageNS.eventDownloadContextMenuClick, this.handleMenuClick), this.currentSelSearchTaskInfos = [], document.addEventListener("compositionstart", this.compositionStart), document.addEventListener("compositionend", this.compositionEnd)
        }

        shouldChangeCompleteSelect() {
            let e = !1;
            do {
                if (this.currentCategoryViewId !== r.DownloadKernel.CategroyViewID.Completed) {
                    e = !0;
                    break
                }
                if (0 === this.completedSelectedTaskIndexs.length) {
                    e = !0;
                    break
                }
            } while (0);
            return e
        }

        onTaskDataBaseLoadEnd() {
            this.bLoadDbFinish = !0, this.$nextTick(() => {
                0 === this.downloadingTaskList.length && this.completedTaskList.length > 0 && this.UPDATE_CATEGORYVIEW(r.DownloadKernel.CategroyViewID.Completed)
            })
        }

        mounted() {
            this.statusChangedEventId = w.attachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== r.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!e[1]) break;
                    let t = e[1];
                    if (t.length > 0) {
                        if (t[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.CategoryId) !== this.currentCategoryId) break;
                        if (this.UPDATE_TASK_STATUS(t.map(e => e.getTaskBaseInfo())), t[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.Background)) break;
                        if (t[0].getTaskAttribute(r.DownloadKernel.TaskAttribute.GroupTaskId) > 0) break;
                        t[0].getTaskStatus() !== r.DownloadKernel.TaskStatus.Succeeded && t[0].getTaskStatus() !== r.DownloadKernel.TaskStatus.Seeding || this.$nextTick(() => {
                            this.startSearch()
                        })
                    }
                } while (0)
            }), k.isLoadStorageTaskFinish() ? this.bLoadDbFinish = !0 : (this.dataBaseLoadCookie = 0, p.DownloadKernelManager.attachListener(c.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, this.onTaskDataBaseLoadEnd)), this.removeFromCategoryViewEventId = w.attachTaskEvent(r.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== r.DownloadKernel.TaskEventType.RemoveFromCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    if (e[1] !== this.currentCategoryId) break;
                    let t = e[2], i = e[3];
                    if (t === r.DownloadKernel.CategroyViewID.Downloading) {
                        if (!this.downloadingSearchArray) break;
                        for (let e of i) {
                            let t = e.getId(), i = this.downloadingSearchArray.indexOf(t);
                            -1 !== i && this.downloadingSearchArray.splice(i, 1)
                        }
                        break
                    }
                    if (t === r.DownloadKernel.CategroyViewID.Completed) {
                        if (!this.completeSearchArray) break;
                        for (let e of i) {
                            let t = e.getId(), i = this.completeSearchArray.indexOf(t);
                            -1 !== i && this.completeSearchArray.splice(i, 1)
                        }
                        break
                    }
                    if (t === r.DownloadKernel.CategroyViewID.Recycle) {
                        if (!this.recycleSearchArray) break;
                        for (let e of i) {
                            let t = e.getId(), i = this.recycleSearchArray.indexOf(t);
                            -1 !== i && this.recycleSearchArray.splice(i, 1)
                        }
                        break
                    }
                } while (0)
            }), this.insertToCategoryViewEventId = w.attachTaskEvent(r.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== r.DownloadKernel.TaskEventType.InsertToCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    let t = e[1], i = e[2], n = e[3], o = e[4];
                    n.map(e => e.getTaskBaseInfo()), this.$nextTick(() => {
                        this.startSearch()
                    }), this.bLoadDbFinish && i === r.DownloadKernel.CategroyViewID.Downloading && (o === r.DownloadKernel.TaskInsertReason.Create && this.UPDATE_CATEGORY(t), this.$nextTick(() => {
                        if (this.currentCategoryViewId !== r.DownloadKernel.CategroyViewID.Downloading) this.UPDATE_CATEGORYVIEW(r.DownloadKernel.CategroyViewID.Downloading), this.$nextTick(() => {
                            setTimeout(() => {
                                let e = this.downloadingTaskList[0];
                                this.UPDATE_DOWNLOADING_SELECTED_TASKS([e])
                            }, 0)
                        }); else {
                            let e = this.downloadingTaskList[0];
                            this.UPDATE_DOWNLOADING_SELECTED_TASKS([e])
                        }
                    }))
                } while (0)
            }), this.cookieOfTaskRenamed = w.attachTaskEvent(r.DownloadKernel.TaskEventType.TaskRenamed, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== r.DownloadKernel.TaskEventType.TaskRenamed) break;
                    this.pulseEventFlag = !this.pulseEventFlag, this.$nextTick(() => {
                        this.startSearch()
                    })
                } while (0)
            }), this.cookieOfTaskDestroyed = w.attachTaskEvent(r.DownloadKernel.TaskEventType.TaskDestroyed, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== r.DownloadKernel.TaskEventType.TaskDestroyed) break;
                    this.pulseEventFlag = !this.pulseEventFlag, this.$nextTick(() => {
                        this.startSearch()
                    })
                } while (0)
            })
        }

        destroyed() {
            u.downloadContextMenu.detachListener(c.NodeEventMesssageNS.eventDownloadContextMenuClick, this.handleMenuClick), document.removeEventListener("compositionstart", this.compositionStart), document.removeEventListener("compositionend", this.compositionEnd), this.clearSearch(), void 0 !== this.insertToCategoryViewEventId && w.detachTaskEvent(r.DownloadKernel.TaskEventType.InsertToCategoryView, this.insertToCategoryViewEventId), void 0 !== this.removeFromCategoryViewEventId && w.detachTaskEvent(r.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.removeFromCategoryViewEventId), void 0 !== this.statusChangedEventId && w.detachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, this.statusChangedEventId), void 0 !== this.dataBaseLoadCookie && (this.dataBaseLoadCookie = void 0, p.DownloadKernelManager.detachListener(c.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, this.onTaskDataBaseLoadEnd)), this.cookieOfTaskRenamed && (this.cookieOfTaskRenamed = void 0, w.detachTaskEvent(r.DownloadKernel.TaskEventType.TaskRenamed, this.cookieOfTaskRenamed)), this.cookieOfTaskDestroyed && (this.cookieOfTaskDestroyed = void 0, w.detachTaskEvent(r.DownloadKernel.TaskEventType.TaskDestroyed, this.cookieOfTaskDestroyed))
        }
    };
    n([o.Prop({})], b.prototype, "hasLeftBottomAd", void 0), n([o.Prop({})], b.prototype, "currentTabId", void 0), n([o.Prop({})], b.prototype, "currentCategoryId", void 0), n([o.Prop({})], b.prototype, "currentCategoryViewId", void 0), n([o.Prop({})], b.prototype, "downloadingTaskList", void 0), n([o.Prop({})], b.prototype, "completedTaskList", void 0), n([o.Prop({})], b.prototype, "recycleTaskList", void 0), n([o.Prop({})], b.prototype, "downloadingSelectedIndexs", void 0), n([o.Prop({})], b.prototype, "completedSelectedTaskIndexs", void 0), n([o.Prop({})], b.prototype, "recycleSelectedTaskIndexs", void 0), n([o.Prop({})], b.prototype, "downloadingResultCount", void 0), n([o.Prop({})], b.prototype, "completedResultCount", void 0), n([o.Prop({})], b.prototype, "recycleResultCount", void 0), n([o.Prop({})], b.prototype, "UPDATE_CATEGORY", void 0), n([o.Prop({})], b.prototype, "UPDATE_CATEGORYVIEW", void 0), n([o.Prop({})], b.prototype, "UPDATE_DOWNLOADING_SELECTED_TASKS", void 0), n([o.Prop({})], b.prototype, "UPDATE_COMPLETED_SELECTED_TASKS", void 0), n([o.Prop({})], b.prototype, "UPDATE_RECYCLE_SELECTED_TASKS", void 0), n([o.Prop({})], b.prototype, "UPDATE_DOWNLOADING_TASKLIST", void 0), n([o.Prop({})], b.prototype, "UPDATE_COMPLETED_TASKLIST", void 0), n([o.Prop({})], b.prototype, "UPDATE_RECYCLE_TASKLIST", void 0), n([o.Prop({})], b.prototype, "UPDATE_TASK_STATUS", void 0), n([o.Prop({})], b.prototype, "attachTaskEvent", void 0), n([o.Prop({})], b.prototype, "selectTab", void 0), n([o.Watch("currentCategoryId")], b.prototype, "onCategoryChange", null), b = n([o.Component({components: {DownloadCategory: l.default}})], b), t.default = b
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(336), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(898), o = i(24);
    t.default = o.connector.connect({
        mapDispatchToProps: {initSettingData: "initSettingData"},
        mapStateToProps: {formData: e => e.SettingConf.formData, confSchema: e => e.SettingConf.confSchema},
        mapCommitToProps: {
            removeConfigData: "REMOVE_CONFIG_DATA",
            setConfigValue: "SET_CONFIG_VALUE",
            setFormData: "SET_FOMR_DATA",
            addFormdataItem: "ADD_FORMDATA_ITEM",
            addSchemaItem: "ADD_SCHEMA_ITEM",
            addSelectItem: "ADD_SELECT_ITEM",
            addConfTabItem: "ADD_CONF_TAB_ITEM"
        },
        mapGettersToProps: {baseSetting: "baseSetting"}
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(338), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(899), r = i(6), s = i(17), l = i(10), d = i(13), u = i(144), c = i(90), h = i(110), f = i(23),
        p = i(107), g = i(3), m = i(0), v = i(77), y = i(45), T = m.default.getLogger("setting-center-view"),
        w = u.CommunityNaviteFunctionNS.CommunityNaviteFunction.getNativeModule();
    let k = class extends r.Vue {
        constructor() {
            super(...arguments), this.userId = "", this.currenIndex = 0, this.scrollSumHeight = 0, this.autoScroll = !1, this.browserSettingPosition = [2, 1], this.browsersConfSection = "Motitor", this.browserSettingItemType = "confCheckbox", this.browserSelectAll = "Motitor-MotitorAll", this.offsetStartHeights = [], this.offsetEndHeights = []
        }

        initOffsets() {
            if (0 === this.offsetStartHeights.length) {
                let e = document.querySelectorAll(".contain-tab");
                for (let t of e) this.offsetStartHeights.push(this.scrollSumHeight), this.scrollSumHeight += t.offsetHeight, this.offsetEndHeights.push(this.scrollSumHeight)
            }
        }

        handleScroll(e) {
            if (this.autoScroll) return void (this.autoScroll = !1);
            0 === this.getScrollTop() && (this.scrollSumHeight = 0, this.currenIndex = 0), this.initOffsets();
            let t = e && e.target && e.target.scrollTop;
            for (let e = 0; e < this.offsetStartHeights.length; e++) if (this.offsetStartHeights[e] <= t && this.offsetEndHeights[e] >= t) {
                this.currenIndex = e;
                break
            }
        }

        getScrollTop() {
            return this.$refs.settinContain.scrollTop
        }

        setScrollTop(e) {
            this.$refs.settinContain.scrollTop = e
        }

        clickTab(e) {
            this.initOffsets(), this.scrollSumHeight = 0, this.currenIndex = e;
            let t = document.querySelectorAll(".contain-tab");
            if (null !== t && void 0 !== t) for (let i = 0; i < e; i++) this.scrollSumHeight += t[i].offsetHeight;
            this.autoScroll = !0, this.setScrollTop(this.scrollSumHeight)
        }

        handleConfChange(e, t = "") {
            if ("" === t || void 0 === this.formData[t]) return;
            let i = void 0 !== this.formData[t].isReleventUser ? this.userId : "",
                n = {section: this.formData[t].section, key: this.formData[t].key, value: e, name: t, userId: i};
            this.setConfigValue(n)
        }

        getUserID() {
            return o(this, void 0, void 0, function* () {
                return new Promise(e => {
                    f.LoginHelperNS.loginHelper.getUserInfo("userid", function (t) {
                        T.information("getUserID:userid = ", t), e(t)
                    })
                })
            })
        }

        syncFromBHOConfig() {
            let e = v.BHOConfigNS.getValue("Monitor", "WatchTraditionLink", 1);
            this.handleConfChange(1 === Number(e), "Monitor-WatchTraditionLink");
            let t = v.BHOConfigNS.getValue("Monitor", "ConfigWatch_Bt", 1);
            this.handleConfChange(1 === Number(t), "Monitor-ConfigWatch_Bt");
            let i = v.BHOConfigNS.getValue("EMuleGenericSettings", "EMuleWatchLink", 1);
            this.handleConfChange(1 === Number(i), "EMuleGenericSettings-EMuleWatchLink");
            let n = v.BHOConfigNS.getValue("MagnetGenericSettings", "MagnetWatchLink", 1);
            this.handleConfChange(1 === Number(n), "MagnetGenericSettings-MagnetWatchLink");
            let o = v.BHOConfigNS.getValue("Monitor", "ExtendNames", v.BHOConfigNS.getDefaultExtendNames());
            l.ConfigNS.getValue("Monitor", "ExtendNames", "") !== o && l.ConfigNS.setValue("Monitor", "ExtendNames", o)
        }

        created() {
            l.ConfigNS.attachListener(d.NodeEventMesssageNS.eventConfigInitFinished, () => {
                this.initSettingData()
            })
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                (yield f.LoginHelperNS.loginHelper.isLoginedAw()) && (this.userId = yield this.getUserID()), this.confChangeEventId = s.NativeCallModule.nativeCall.AttachNativeEvent("OnConfigValueChanaged", (e, t, i, n) => o(this, void 0, void 0, function* () {
                    if (void 0 !== this.formData[`${e}-${t}`] && this.setFormData({
                        section: e,
                        key: t,
                        value: n
                    }), "CompletedTaskPlay" === e && "LanuchMediaPlayer" === t && "1" === n) {
                        (yield p.default.installXmp()) || (this.setFormData({
                            section: e,
                            key: t,
                            value: "0"
                        }), g.client.callServerFunction("SetConfigValue", e, t, "0"))
                    }
                })), this.loginEventId = s.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => {
                    this.userId = e
                }), this.logoutEventId = s.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                    this.userId = ""
                }), w.on("selectMsgNotice", () => {
                    this.clickTab(3)
                }), c.SettingConfigHelperNS.configBrowserHelper.attachListener(d.NodeEventMesssageNS.eventConfigBrowserInitFinished, () => {
                    let e = c.SettingConfigHelperNS.configBrowserHelper.getConfigShowBrowsers();
                    T.information("browsers", e);
                    for (let t = 0; t < e.length; t++) void 0 === this.formData[`${this.browsersConfSection}-${e[t].key}`] && (this.addFormdataItem({
                        section: this.browsersConfSection,
                        key: e[t].key,
                        type: "number",
                        value: e[t].isSelect ? 1 : 0,
                        selectAllName: this.browserSelectAll
                    }), this.addSchemaItem({
                        position: this.browserSettingPosition,
                        schemaItem: {
                            name: `${this.browsersConfSection}-${e[t].key}`,
                            type: this.browserSettingItemType,
                            label: e[t].content,
                            liClasses: "inline"
                        },
                        direction: 0
                    }), this.addSelectItem({
                        target: this.browserSelectAll,
                        from: `${this.browsersConfSection}-${e[t].key}`
                    }));
                    if (e.length > 0) {
                        let t = e[e.length - 1];
                        this.handleConfChange(t.isSelect ? 1 : 0, `${this.browsersConfSection}-${t.key}`)
                    }
                    if (!this.formData[`${this.browsersConfSection}-browserConfigGuideButton`]) {
                        let e = {
                            type: "confBtn",
                            text: "手动更改浏览器默认下载方式",
                            classes: "td-button--small noMargin td-button--other",
                            boxType: "browserGuideConfBox",
                            style: h.default().whetherShowEntry() ? "margin-left: 0" : "display: none",
                            extEles: [{
                                type: "confTip",
                                text: "由于技术原理的限制，迅雷默认提供的“接管浏览器”功能，未能有效接管HTTPS\n协议的下载请求。建议您手动更改浏览器默认下载方式，可以完美接管浏览器的\n所有下载请求！目前支持“360安全浏览器、搜狗浏览器、QQ浏览器”",
                                classes: "xly-icon-help",
                                style: h.default().whetherShowEntry() ? "margin-left: 0" : "display: none"
                            }]
                        };
                        this.addFormdataItem({
                            section: this.browsersConfSection,
                            key: "browserConfigGuideButton",
                            type: "number",
                            value: ""
                        }), this.addSchemaItem({position: this.browserSettingPosition, schemaItem: e, direction: -1})
                    }
                    this.syncFromBHOConfig()
                });
            })
        }

        beforeDestroy() {
            this.confChangeEventId && s.NativeCallModule.nativeCall.DetachNativeEvent("OnConfigValueChanaged", this.confChangeEventId), this.loginEventId && s.NativeCallModule.nativeCall.DetachNativeEvent("onLoginSuc", this.loginEventId), this.logoutEventId && s.NativeCallModule.nativeCall.DetachNativeEvent("onLogout", this.logoutEventId), w.removeAllListeners("selectMsgNotice"), this.removeConfigData()
        }
    };
    n([r.Prop({})], k.prototype, "initSettingData", void 0), n([r.Prop({})], k.prototype, "formData", void 0), n([r.Prop({})], k.prototype, "confSchema", void 0), n([r.Prop({})], k.prototype, "removeConfigData", void 0), n([r.Prop({})], k.prototype, "setConfigValue", void 0), n([r.Prop({})], k.prototype, "setFormData", void 0), n([r.Prop({})], k.prototype, "addFormdataItem", void 0), n([r.Prop({})], k.prototype, "addSchemaItem", void 0), n([r.Prop()], k.prototype, "addConfTabItem", void 0), n([r.Prop({})], k.prototype, "addSelectItem", void 0), k = n([r.Component({components: {generatorView: a.default}})], k), t.default = k
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(340), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(900), a = i(904), r = i(94), s = i(157), l = i(906), d = i(907), u = i(156), c = i(908), h = i(576),
        f = i(155), p = i(909), g = i(6);
    let m = class extends g.Vue {
        handleInput(e, t = "") {
            "" === t ? this.$emit("input", e, this.item.name) : this.$emit("input", e, t)
        }
    };
    n([g.Prop({})], m.prototype, "item", void 0), n([g.Prop({})], m.prototype, "formData", void 0), n([g.Prop()], m.prototype, "value", void 0), m = n([g.Component({
        components: {
            confCheckbox: o.default,
            confRadio: a.default,
            confSelect: r.default,
            confText: s.default,
            confCheckboxInput: l.default,
            confCheckboxSelect: d.default,
            confInput: u.default,
            confSpeedText: h.default,
            confTextarea: c.default,
            confBtn: f.default,
            confProxyList: p.default
        }
    })], m), t.default = m
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(342), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(154), s = i(119), l = i(155), d = i(94), u = i(156), c = i(902), h = i(903), f = i(157);
    let p = class extends a.Vue {
        handleInput(e, t = "") {
            return o(this, void 0, void 0, function* () {
                if ("" === t ? this.$emit("input", e, this.item.name) : this.$emit("input", e, t), void 0 !== this.item.linkItem && e) {
                    let t = yield r.ConfigHelperNS.getValue(this.formData[this.item.linkItem.name].section, this.formData[this.item.linkItem.name].key, "");
                    "" !== e && this.$emit("input", t, this.item.linkItem.name)
                }
            })
        }
    };
    n([a.Prop({})], p.prototype, "item", void 0), n([a.Prop({})], p.prototype, "formData", void 0), n([a.Prop()], p.prototype, "value", void 0), n([a.Prop()], p.prototype, "label", void 0), p = n([a.Component({
        components: {
            confTip: s.default,
            confBtn: l.default,
            confSelect: d.default,
            confInput: u.default,
            confSpeed: c.default,
            confSpeedTime: h.default,
            confText: f.default
        }
    })], p), t.default = p
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(344), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let a = class extends o.Vue {
    };
    n([o.Prop()], a.prototype, "classes", void 0), n([o.Prop()], a.prototype, "text", void 0), a = n([o.Component({})], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(346), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(154), s = i(22), l = i(38), d = i(14), u = i(17), c = i(119), h = i(576);
    let f = class extends a.Vue {
        popDialog(e) {
            switch (e.boxType) {
                case"speedConfBox":
                    u.NativeCallModule.nativeCall.CallNativeFunction("ShowCustomDownloadModeDlg", () => {
                    });
                    break;
                case"browserGuideConfBox":
                    u.NativeCallModule.nativeCall.CallNativeFunction("ShowBrowserGuideDlg", () => {
                    });
                    break;
                case"function":
                    e.handle();
                    break;
                case"pop":
                    this.messagePop(e)
            }
        }

        messagePop(e) {
            return o(this, void 0, void 0, function* () {
                let t = d.ThunderUtil.deepCopy(e.pop.formData);
                for (let i in t) t[i].value = yield r.ConfigHelperNS.getValue(e.pop.formData[i].section, e.pop.formData[i].key, e.pop.formData[i].value);
                s.MessageBox.pop({
                    title: e.pop.title,
                    size: e.pop.size,
                    schemas: e.pop.schema,
                    formData: t
                }, e.pop.dialogOption).then(e => {
                    if (e.action === l.MessageBoxNS.Action.OK) for (let t in e.formData) r.ConfigHelperNS.setValue(e.formData[t].section, e.formData[t].key, e.formData[t].value)
                }).catch()
            })
        }
    };
    n([a.Prop({})], f.prototype, "item", void 0), n([a.Prop()], f.prototype, "classes", void 0), n([a.Prop()], f.prototype, "text", void 0), n([a.Prop()], f.prototype, "disabled", void 0), n([a.Prop({})], f.prototype, "formData", void 0), f = n([a.Component({
        components: {
            confTip: c.default,
            confSpeedText: h.default
        }
    })], f), t.default = f
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(348), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(154);
    let s = class extends a.Vue {
        constructor() {
            super(...arguments), this.maxDownloadSpeed = "", this.maxUploadSpeed = ""
        }

        onFormDataChange(e) {
            this.updateMaxDownloadSpeed(), this.updateMaxUploadSpeed()
        }

        standardNumber(e) {
            let t = parseInt(e + "", 10);
            return t > 9 ? t + "" : "0" + t
        }

        updateMaxDownloadSpeed() {
            return o(this, void 0, void 0, function* () {
                let e = "不限速";
                this.formData["ConfigNet-ConfigNet_Custom_DownloadSpeedChk"].value && (e = (yield r.ConfigHelperNS.getValue("ConfigNet", "ConfigNet_Custom_MaxDownloadSpeedTmp", 1024)) + "KB/S"), this.maxDownloadSpeed = e
            })
        }

        updateMaxUploadSpeed() {
            return o(this, void 0, void 0, function* () {
                let e = "不限速";
                this.formData["ConfigNet-ConfigNet_Custom_UploadSpeedChk"].value && (e = (yield r.ConfigHelperNS.getValue("ConfigNet", "ConfigNet_Custom_MaxUploadSpeedTmp", 1024)) + "KB/S"), this.maxUploadSpeed = e
            })
        }
    };
    n([a.Prop({})], s.prototype, "item", void 0), n([a.Prop({})], s.prototype, "formData", void 0), n([a.Watch("formData", {
        immediate: !0,
        deep: !0
    })], s.prototype, "onFormDataChange", null), s = n([a.Component], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(350), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(12), s = i(418), l = i(577), d = i(15), u = i(0).default.getLogger("conf-select");
    let c = class extends a.Vue {
        constructor() {
            super(...arguments), this.schema = null, this.tooltipVisible = !1, this.tipContent = "", this.dyNamicOptions = [], this.valueData = ""
        }

        onFormDataChange(e) {
            this.item.updateByDataChange && e && e[this.name] && (this.valueData = e[this.name].value)
        }

        handleInput(e) {
            if (void 0 !== this.item.hasDeleteOption && e === this.item.deleteOptionText) return this.$emit("input", [], this.item.optionByName), void ("openThunderPan" === this.item.slotOption && d.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcClearRecentFolder"));
            this.tooltipVisible || this.item.blurUpdate || this.$emit("input", e, this.item.name), this.valueData = e
        }

        handleOutFocus() {
            this.item.blurUpdate && !this.tooltipVisible && this.$emit("input", this.valueData, this.item.name)
        }

        selectPath() {
            return o(this, void 0, void 0, function* () {
                let e = yield(yield r.asyncRemoteCall.getDialog()).showOpenDialog({
                    defaultPath: this.valueData,
                    properties: [this.fileType]
                });
                if (e.canceled) ; else {
                    let t = e.filePaths;
                    void 0 !== t && (void 0 !== this.name ? this.$emit("input", t[0], this.name) : this.$emit("input", t[0], this.item.name), this.valueData = t[0])
                }
            })
        }

        get optionList() {
            if (this.item.optionByName && this.formData[this.item.optionByName] && this.formData[this.item.optionByName].value) {
                let e = this.formData[this.item.optionByName].value,
                    t = [...e].reverse().slice(0, this.item.maxOptionLen || e.length);
                return this.item.deleteOptionText && t.push(this.item.deleteOptionText), t
            }
            return this.options
        }

        get fileType() {
            return this.item.slotOption
        }

        get rules() {
            let e;
            do {
                if (!this.item.rules) break;
                e = this.item.rules.map(e => Array.isArray(e) ? new Function(e[0], e[1]) : e)
            } while (0);
            return e
        }

        handleChangePath(e) {
            return o(this, void 0, void 0, function* () {
                let t = "openDirectory";
                if ("openFile" === e ? t = "openFile" : "openThunderPan" === e && (t = "openThunderPan"), "openFile" === t || "openDirectory" === t) {
                    const e = yield r.asyncRemoteCall.getDialog();
                    let i = yield r.asyncRemoteCall.getCurrentWindow();
                    if (i && !(yield i.isDestroyed())) {
                        let n = yield e.showOpenDialog(i, {defaultPath: this.valueData, properties: [t]});
                        if (n.canceled) ; else {
                            let e = n.filePaths;
                            void 0 !== e && (void 0 !== this.name ? this.$emit("input", e[0], this.name) : this.$emit("input", e[0], this.item.name), this.valueData = e[0]), this.$refs.root.focusEdit()
                        }
                    }
                } else if ("openThunderPan" === t) {
                    let e = yield d.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcTreePath", {});
                    if (!e || !e[0] || e[0].error) return;
                    let t = "", i = "";
                    for (let n of e[0].path) t += "\\" + n.title, i += "\\" + n.id;
                    i = i.slice(1), t = t.slice(1), void 0 !== this.name ? this.$emit("input", t, this.name) : this.$emit("input", t, this.item.name), this.valueData = t, d.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcSetDefaultSavePath", {
                        id: i,
                        name: t
                    })
                }
            })
        }

        validate(e) {
            u.information("value....", e), this.handleInput(e), void 0 !== this.item.hasDeleteOption && e === this.item.deleteOptionText || this.item.rules && this.schema.validate({[this.item.name]: e}, (e, t) => {
                u.information("errors", e), null === e ? this.tooltipVisible = !1 : (u.information("路径有误", e), this.tipContent = e[0].message, this.tooltipVisible = !0)
            })
        }

        created() {
            this.item.rules && (this.schema = new s.default({[this.item.name]: this.rules})), void 0 !== this.value ? this.valueData = this.value.value.toString() : this.valueData = this.formData[this.item.name].value.toString()
        }
    };
    n([a.Prop({})], c.prototype, "item", void 0), n([a.Prop()], c.prototype, "label", void 0), n([a.Prop({})], c.prototype, "formData", void 0), n([a.Prop()], c.prototype, "options", void 0), n([a.Prop()], c.prototype, "value", void 0), n([a.Prop()], c.prototype, "disabled", void 0), n([a.Prop()], c.prototype, "classes", void 0), n([a.Prop()], c.prototype, "name", void 0), n([a.Prop()], c.prototype, "placeHolder", void 0), n([a.Watch("formData", {deep: !0})], c.prototype, "onFormDataChange", null), c = n([a.Component({components: {SelectNative: l.default}})], c), t.default = c
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(352), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6);
    let r = class extends a.Vue {
        onOptionsChanged() {
            return o(this, void 0, void 0, function* () {
            })
        }

        get filterOptions() {
            return this.options.filter(e => "separator" !== e)
        }

        onSelect(e) {
            this.$emit("input", e.srcElement.value, !0)
        }

        mounted() {
            let e = this.$refs.selectNative;
            if (e) for (let t in this.filterOptions) if (String(this.filterOptions[t]) === this.value) {
                e.selectedIndex = t;
                break
            }
        }

        focusEdit() {
            if (this.$refs.select) {
                let e = this.$refs.select.$el.querySelector("input");
                null !== e && void 0 !== e && e.focus()
            }
        }
    };
    n([a.Prop()], r.prototype, "value", void 0), n([a.Prop({default: () => []})], r.prototype, "options", void 0), n([a.Prop({default: !1})], r.prototype, "useNative", void 0), n([a.Prop({default: "bottom"})], r.prototype, "position", void 0), n([a.Watch("options")], r.prototype, "onOptionsChanged", null), r = n([a.Component], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(354), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(418), a = i(6), r = i(155);
    let s = class extends a.Vue {
        constructor() {
            super(...arguments), this.shortcutKey = "", this.funKey = !0, this.valueData = " ", this.canRegister = !1, this.schema = null, this.tooltip = "", this.tooltipVisible = !1
        }

        get rules() {
            let e;
            do {
                if (!this.item.rules) break;
                e = this.item.rules.map(e => Array.isArray(e) ? new Function(e[0], e[1]) : e)
            } while (0);
            return e
        }

        handleInput(e) {
            this.valueData = e, this.$emit("input", e, this.name)
        }

        handleChange(e) {
            let t = e.target;
            this.valueData = t.value, void 0 !== this.item.ShortcutKey && this.canRegister ? this.$emit("input", t.value, this.name) : void 0 === this.item.ShortcutKey && this.$emit("input", t.value, this.name)
        }

        handleKeyDown(e) {
            if (void 0 !== this.item.ShortcutKey) {
                let t = /Digit\d/.test(e.code) || e.keyCode >= 65 && e.keyCode <= 90;
                if (this.shortcutKey = "", this.funKey = !1, this.canRegister = !1, this.valueData = "", "Backspace" === e.key) return this.valueData = "无", void this.$emit("input", "", this.name);
                e.altKey && (this.shortcutKey = "Alt+"), e.ctrlKey && (this.shortcutKey = "" === this.shortcutKey ? "Ctrl+" : `${this.shortcutKey}Crtl+`), e.shiftKey && (this.shortcutKey = "" === this.shortcutKey ? "Shift+" : `${this.shortcutKey}Shift+`);
                let i = "Alt" === e.key || "Shift" === e.key || "Control" === e.key ? "" : t ? e.code[e.code.length - 1] : e.key;
                this.valueData = this.shortcutKey + i, "" !== i && (this.funKey = !0), this.shortcutKey + i !== i && "" !== i && (this.canRegister = !0, this.valueData = this.shortcutKey + i, this.$emit("input", this.valueData, this.name))
            }
        }

        handleKeyup() {
            this.funKey || void 0 === this.item.ShortcutKey || (this.valueData = "无", this.$emit("input", "", this.name))
        }

        mounted() {
            this.valueData = this.value.value
        }

        validate(e) {
            this.item.rules && this.schema.validate({[this.item.name]: e}, (e, t) => {
                this.tooltipVisible = null !== e
            })
        }

        outFocus() {
            this.tooltipVisible = !1
        }

        created() {
            this.item.rules && (this.schema = new o.default({[this.item.name]: this.rules}))
        }
    };
    n([a.Prop()], s.prototype, "item", void 0), n([a.Prop({})], s.prototype, "formData", void 0), n([a.Prop()], s.prototype, "disabled", void 0), n([a.Prop()], s.prototype, "value", void 0), n([a.Prop()], s.prototype, "name", void 0), n([a.Prop()], s.prototype, "label", void 0), s = n([a.Component({components: {confBtn: r.default}})], s), t.default = s
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(356), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(418), a = i(6);
    let r = class extends a.Vue {
        constructor() {
            super(...arguments), this.schema = null, this.tooltip = "", this.tooltipVisible = !1, this.timeout = null
        }

        get rules() {
            return (this.item.rules || []).map(e => Array.isArray(e) ? new Function(e[0], e[1]) : e)
        }

        get doEmit() {
            return this.item.doEmit ? new Function(this.item.doEmit[0], this.item.doEmit[1]) : null
        }

        get doBlur() {
            return this.item.doBlur ? new Function(this.item.doBlur[0], this.item.doBlur[1]) : null
        }

        get sliderValue() {
            let e;
            return e = "number" == typeof this.value ? this.value : "object" == typeof this.value ? Number(this.value.value) : Number(this.value), this.item.scales && this.item.scales.length ? Math.min(Math.max(this.item.scales[0], e), this.item.scales[this.item.scales.length - 1]) : e
        }

        handleSliderUpdate(e) {
            this.handleInput(e.toString())
        }

        handleInput(e) {
            this.doEmit ? this.doEmit(this.item.name, e, this.value.value) : this.$emit("input", e, this.item.name), this.doValidate(e)
        }

        doValidate(e) {
            this.schema && this.schema.validate({[this.item.name]: e}, (e, t) => {
                null === e ? this.hideTooltip() : this.showTooltip(e[0].message)
            })
        }

        handleBlur() {
            let e;
            e = "object" == typeof this.value ? this.value.value : this.value, this.doBlur && this.doBlur(this.item.name, e), this.$nextTick(() => {
                let e;
                e = "object" == typeof this.value ? this.value.value : this.value, this.doValidate(e)
            })
        }

        showTooltip(e) {
            this.tooltip = e, this.$refs.tooltip.show(this.$refs.input.$el)
        }

        hideTooltip() {
            this.$refs.tooltip.hide()
        }

        created() {
            this.item.rules && (this.schema = new o.default({[this.item.name]: this.rules}))
        }
    };
    n([a.Prop({})], r.prototype, "item", void 0), n([a.Prop()], r.prototype, "value", void 0), n([a.Prop()], r.prototype, "disabled", void 0), r = n([a.Component], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(358), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(577);
    let r = class extends o.Vue {
        constructor() {
            super(...arguments), this.data = [{
                label: "开始限速时间",
                options: [{index: 0, type: "hour"}, {index: 1, type: "minute"}]
            }, {
                label: "结束限速时间",
                options: [{index: 2, type: "hour"}, {index: 3, type: "minute"}]
            }], this.hours = Array.from({length: 24}, (e, t) => t), this.minutes = Array.from({length: 60}, (e, t) => t)
        }

        handleInput(e, t) {
            let i = this.value.slice(0), n = Object.assign({}, i[t]);
            n.value = e, i[t] = n, this.$emit("input", i, this.item.name)
        }
    };
    n([o.Prop({})], r.prototype, "item", void 0), n([o.Prop()], r.prototype, "value", void 0), n([o.Prop()], r.prototype, "disabled", void 0), r = n([o.Component({components: {SelectNative: a.default}})], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(360), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(17);
    let r = class extends o.Vue {
        constructor() {
            super(...arguments), this.userId = ""
        }

        get clas() {
            return void 0 !== this.classes ? this.classes : this.item.classes
        }

        get textContent() {
            return void 0 !== this.item.text ? this.item.text : this.text
        }

        mounted() {
            void 0 !== this.item.isReleventUser && this.item.isReleventUser && (a.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => {
                this.userId = e
            }), a.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                this.userId = ""
            }))
        }
    };
    n([o.Prop({})], r.prototype, "item", void 0), n([o.Prop()], r.prototype, "classes", void 0), n([o.Prop()], r.prototype, "extIndex", void 0), n([o.Prop()], r.prototype, "text", void 0), r = n([o.Component({})], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(362), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(119), s = i(155), l = i(156), d = i(94), u = i(905), c = i(17), h = i(3);
    let f = class extends a.Vue {
        constructor() {
            super(...arguments), this.userId = ""
        }

        handleInput(e, t = "") {
            "" === t ? this.$emit("input", e, this.item.name) : this.$emit("input", e, t)
        }

        setUserId() {
            return o(this, void 0, void 0, function* () {
                let e = yield h.client.callServerFunction("GetUserID");
                this.userId = e
            })
        }

        mounted() {
            return o(this, void 0, void 0, function* () {
                void 0 !== this.item.isReleventUser && this.item.isReleventUser && (this.setUserId(), c.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => {
                    this.userId = e
                }), c.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                    this.userId = ""
                }))
            })
        }
    };
    n([a.Prop({})], f.prototype, "item", void 0), n([a.Prop({})], f.prototype, "formData", void 0), n([a.Prop()], f.prototype, "value", void 0), f = n([a.Component({
        components: {
            confTip: r.default,
            confBtn: s.default,
            confInput: l.default,
            confSelect: d.default,
            confContainer: u.default
        }
    })], f), t.default = f
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(364), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(94);
    let r = class extends o.Vue {
        handleInput(e, t = "") {
            "" === t ? this.$emit("input", e, this.item.name) : this.$emit("input", e, t)
        }
    };
    n([o.Prop({})], r.prototype, "item", void 0), n([o.Prop({})], r.prototype, "formData", void 0), n([o.Prop()], r.prototype, "value", void 0), n([o.Prop()], r.prototype, "disabled", void 0), r = n([o.Component({components: {confSelect: a.default}})], r), t.default = r
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(366), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(119), r = i(156), s = i(157), l = i(94);
    let d = class extends o.Vue {
        handleInput(e, t = "") {
            "" === t ? this.$emit("input", e, this.item.name) : this.$emit("input", e, t)
        }
    };
    n([o.Prop({})], d.prototype, "item", void 0), n([o.Prop({})], d.prototype, "formData", void 0), d = n([o.Component({
        components: {
            confTip: a.default,
            confInput: r.default,
            confText: s.default,
            confSelect: l.default
        }
    })], d), t.default = d
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(368), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(119), r = i(157), s = i(94);
    let l = class extends o.Vue {
        handleInput(e, t = "") {
            "" === t ? this.$emit("input", e, this.item.name) : this.$emit("input", e, t)
        }
    };
    n([o.Prop({})], l.prototype, "item", void 0), n([o.Prop({})], l.prototype, "formData", void 0), l = n([o.Component({
        components: {
            confTip: a.default,
            confText: r.default,
            confSelect: s.default
        }
    })], l), t.default = l
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(370), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6);
    let a = class extends o.Vue {
        handleChange(e) {
            let t = e.target;
            this.$emit("input", t.value, this.item.name)
        }
    };
    n([o.Prop({})], a.prototype, "item", void 0), n([o.Prop({})], a.prototype, "formData", void 0), n([o.Prop()], a.prototype, "value", void 0), n([o.Prop()], a.prototype, "label", void 0), a = n([o.Component({components: {}})], a), t.default = a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(372), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    }, o = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const a = i(6), r = i(154), s = i(22), l = i(38), d = i(407);
    let u = class extends a.Vue {
        constructor() {
            super(...arguments), this.selectedItem = null, this.proxyList = []
        }

        handleInput(e, t) {
            let i = this.value.slice(0), n = Object.assign({}, i[t]);
            n.value = e, i[t] = n, this.$emit("input", i, this.item.name)
        }

        handleAddProxyResult(e, t, i, n, o, a) {
            let r = !1, s = {name: e, host: t, port: i, type: n, userName: o, passWord: a};
            if (this.proxyList.length > 0) for (let t = 0; t < this.proxyList.length; ++t) if (this.proxyList[t].name === e) {
                r = !0;
                break
            }
            r || (this.proxyList.push(s), this.saveProxys())
        }

        handleAddProxy() {
            s.MessageBox.custom("AddProxy").then(e => {
                if (e.action === l.MessageBoxNS.Action.OK) {
                    let t = e.args.name, i = e.args.host, n = e.args.port, o = e.args.type, a = e.args.userName,
                        r = e.args.passWord;
                    this.handleAddProxyResult(t, i, n, o, a, r)
                }
            }).catch()
        }

        handleModifyProxy() {
            this.selectedItem && s.MessageBox.custom("AddProxy", this.selectedItem).then(e => o(this, void 0, void 0, function* () {
                if (e.action === l.MessageBoxNS.Action.OK) for (let t = 0; t < this.proxyList.length; ++t) if (this.proxyList[t].name === this.selectedItem.name) {
                    let i = this.selectedItem.name;
                    if (this.proxyList[t].name = e.args.name, this.proxyList[t].host = e.args.host, this.proxyList[t].port = e.args.port, this.proxyList[t].type = e.args.type, this.proxyList[t].userName = e.args.userName, this.proxyList[t].passWord = e.args.passWord, this.selectedItem = this.proxyList[t], this.saveProxys(), "2" === (yield r.ConfigHelperNS.getValue("ProxySetting", "ConfigProxy_Type", "0")) && (this.handleApplyProxy(), i === this.selectedItem.name)) {
                        let e = d.ProxyNS.ProxyType.Http;
                        "SOCKS5" === this.selectedItem.type && (e = d.ProxyNS.ProxyType.Sock5), d.ProxyNS.setProxy(e, this.selectedItem.host, this.selectedItem.port, this.selectedItem.userName, this.selectedItem.passWord)
                    }
                    break
                }
            })).catch()
        }

        handleDeleteProxy() {
            this.selectedItem && s.MessageBox.confirm({
                title: "提示",
                content: "您确定删除此代理吗？",
                type: s.MessageBox.ConfirmType.Info
            }, {width: 400, height: 174, center: !0}).then(e => o(this, void 0, void 0, function* () {
                if (e.action === l.MessageBoxNS.Action.OK) for (let e = 0; e < this.proxyList.length; ++e) if (this.proxyList[e].name === this.selectedItem.name) {
                    let t = this.selectedItem.name;
                    this.proxyList.splice(e, 1), this.selectedItem = null, this.saveProxys();
                    let i = yield r.ConfigHelperNS.getValue("ProxySetting", "ConnectType_Http", "直接连接");
                    t === i && this.$emit("input", "直接连接", "ProxySetting-ConnectType_Http"), t === (i = yield r.ConfigHelperNS.getValue("ProxySetting", "ConnectType_Hub", "直接连接")) && this.$emit("input", "直接连接", "ProxySetting-ConnectType_Hub"), t === (i = yield r.ConfigHelperNS.getValue("ProxySetting", "ConnectType_Ftp", "直接连接")) && this.$emit("input", "直接连接", "ProxySetting-ConnectType_Ftp");
                    break
                }
            })).catch()
        }

        handleApplyProxy() {
            this.selectedItem && (this.$emit("input", "2", "ProxySetting-ConfigProxy_Type"), this.$emit("input", this.selectedItem.name, "ProxySetting-ConnectType_Hub"), this.$emit("input", this.selectedItem.name, "ProxySetting-ConnectType_Http"), this.$emit("input", this.selectedItem.name, "ProxySetting-ConnectType_Ftp"))
        }

        formatProxys() {
            let e = [];
            if (this.proxyList.length > 0) for (let t = 0; t < this.proxyList.length; ++t) {
                let i = this.proxyList[t].name;
                i = (i = (i = (i = (i = i + ";" + this.proxyList[t].host) + ";" + this.proxyList[t].port) + ";" + this.proxyList[t].type) + ";" + this.proxyList[t].userName) + ";" + this.proxyList[t].passWord, e.push(i)
            }
            return e
        }

        getProxyNames() {
            let e = ["直接连接"];
            if (this.proxyList.length > 0) for (let t = 0; t < this.proxyList.length; ++t) this.proxyList[t].name && this.proxyList[t].name.length > 0 && e.push(this.proxyList[t].name);
            return e
        }

        saveProxys() {
            r.ConfigHelperNS.setValue("ProxyList", "proxys", this.formatProxys()).catch(), r.ConfigHelperNS.setValue("ConnectType", "ProxyName", this.getProxyNames()).catch()
        }

        initProxys() {
            return o(this, void 0, void 0, function* () {
                let e = yield r.ConfigHelperNS.getValue("ProxyList", "proxys", []);
                if (e.length > 0) for (let t = 0; t < e.length; ++t) {
                    let i = e[t].split(";"), n = {};
                    n.name = i[0], n.host = i[1], n.type = i[3], n.userName = void 0 !== i[4] ? i[4] : "", n.passWord = void 0 !== i[5] ? i[5] : "", i[2] ? n.port = Number(i[2]) ? Number(i[2]) : 80 : n.port = 80, this.proxyList.push(n)
                }
            })
        }

        mounted() {
            this.initProxys().catch()
        }
    };
    n([a.Prop({})], u.prototype, "item", void 0), n([a.Prop()], u.prototype, "value", void 0), n([a.Prop()], u.prototype, "disabled", void 0), u = n([a.Component({components: {}})], u), t.default = u
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(374), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(913), o = i(24);
    t.default = o.connector.connect({
        mapGettersToProps: {
            currentTab: e => e.currentTab,
            currentNavView: e => e.currentNavView,
            curNav: e => e.currentNav,
            hideTabs: e => e.hideTabs
        }
    })(n.default)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(376), o = i.n(n);
    for (var a in n) "default" !== a && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(a);
    t.default = o.a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__decorate || function (e, t, i, n) {
        var o, a = arguments.length, r = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, i, n); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (r = (a < 3 ? o(r) : a > 3 ? o(t, i, r) : o(t, i)) || r);
        return a > 3 && r && Object.defineProperty(t, i, r), r
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(5), r = i(46);
    let s = class extends o.Vue {
        get currentEmbeddedTab() {
            return this.hideTabs.find(e => e.tab.name === this.currentNavView.key) || null
        }

        refresh() {
            do {
                if (a.isNullOrUndefined(this.currentEmbeddedTab) || a.isNullOrUndefined(this.currentEmbeddedTab.tab)) break;
                this.currentEmbeddedTab.tab.refresh(!1)
            } while (0)
        }

        get isError() {
            return !0 === r(this.currentEmbeddedTab, "tab", "isErrorPage")
        }

        get isLoading() {
            return !0 === r(this.currentEmbeddedTab, "tab", "isLoadingPage")
        }
    };
    n([o.Prop()], s.prototype, "currentNavView", void 0), n([o.Prop()], s.prototype, "currentNav", void 0), n([o.Prop()], s.prototype, "hideTabs", void 0), s = n([o.Component({components: {Loading: () => Promise.resolve().then(() => i(419))}})], s), t.default = s
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(19), o = i(5), a = i(121), r = i(122), s = i(71);
    !function (e) {
        class t extends s.CommonIPCBase.Communicator {
            constructor() {
                super()
            }

            initialize(e) {
                this.currInfo = {id: void 0, context: e, isMainCommunicator: !1}
            }

            connect() {
                this.isConnected ? a.warning("has been connected") : (this.sendConnectMsgToMain(), this.isConnected = !0, this.startListenIPCMessage(!1))
            }

            disconnect() {
                this.isConnected ? (this.isConnected = !1, this.sendDisconnectMsgToMain()) : a.warning("hasnot been connected yet")
            }

            sendMessageToMain(e) {
                this.sendIPCMsgToMain(e)
            }

            sendMessageToMainSync(e) {
                return this.sendIPCMsgToMain(e, !0)
            }

            sendMessageToRenderer(e, t) {
                this.sendIPCMsgToRenderer(e, t)
            }

            handleRendererConnectMsg(e, t) {
                do {
                    if (o.isNullOrUndefined(t)) {
                        a.error("msgInfo is null");
                        break
                    }
                    let e = t.msg.args[0];
                    if (o.isNullOrUndefined(e)) {
                        a.error("connectRendererInfo is null");
                        break
                    }
                    a.information(`Renderer: new renderer will connect, id = ${e.id}, context = ${e.context}`), this.rendererInfos.push(e)
                } while (0)
            }

            handleRendererDisconnectMsg(e, t) {
                do {
                    if (o.isNullOrUndefined(t)) {
                        a.error("msgInfo is null");
                        break
                    }
                    let e = t.msg.args[0];
                    if (o.isNullOrUndefined(e)) {
                        a.error("disconnectRendererInfo is null");
                        break
                    }
                    a.information(`renderer will disconnect, id = ${e.id}, context = ${e.context}`);
                    for (let t = 0; t < this.rendererInfos.length; ++t) if (this.rendererInfos[t] === e) {
                        this.rendererInfos.splice(t, 1);
                        break
                    }
                } while (0)
            }

            sendConnectMsgToMain() {
                let e = this.sendMessageToMainSync({name: r.CommonIPCMessage.msgIPCRendererConnect, args: []});
                this.currInfo.id = e[0], this.rendererInfos = e[1]
            }

            sendDisconnectMsgToMain() {
                this.sendMessageToMain({name: r.CommonIPCMessage.msgIPCRendererDisconnect, args: []})
            }

            sendIPCMsgToMain(e, t = !1) {
                let i = void 0;
                do {
                    if (o.isNullOrUndefined(e)) {
                        a.error("msg is null");
                        break
                    }
                    i = (t ? n.ipcRenderer.sendSync : n.ipcRenderer.send)(r.CommonIPCMessage.msgIPCSendToMain, {
                        msg: e,
                        senderInfo: this.currInfo
                    })
                } while (0);
                return i
            }

            sendIPCMsgToRenderer(e, t) {
                do {
                    if (o.isNullOrUndefined(e)) {
                        a.error("rendererId is null");
                        break
                    }
                    if (o.isNullOrUndefined(t)) {
                        a.error("msg is null");
                        break
                    }
                    let i = [e].concat(t.args);
                    t.args = i, n.ipcRenderer.send(r.CommonIPCMessage.msgIPCSendToRenderer, {
                        msg: t,
                        senderInfo: this.currInfo
                    })
                } while (0)
            }
        }

        e.RendererCommunicator = t, e.rendererCommunicator = new t
    }(t.CommonIPCRenderer || (t.CommonIPCRenderer = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(4), a = i(16), r = n.default.getLogger("DownloadKernel.CategoryView"),
        s = a.DownloadKernelEventManager.getEventManager();
    t.CategoryView = class {
        constructor(e, t) {
            this.categoryId = e, this.categoryViewId = t, this.tasks = new Map
        }

        getCategoryViewId() {
            return this.categoryViewId
        }

        getTasks() {
            return this.tasks
        }

        getTaskCount() {
            return this.tasks.size
        }

        insertTask(e, t = o.DownloadKernel.TaskInsertReason.Unknown) {
            if (null !== e) {
                let i = [];
                for (let t = 0; t < e.length; ++t) {
                    let n = e[t];
                    if (!n) continue;
                    n.setCategoryViewId(this.categoryViewId);
                    let a = n.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskId);
                    0 !== a && (this.tasks.set(a, n), i.push(n)), r.information("insertTask categoryId:", this.categoryId, ", catygoryViewId:", this.categoryViewId, "taskId:", a)
                }
                s.fireTaskEvent(o.DownloadKernel.TaskEventType.InsertToCategoryView, this.categoryId, this.categoryViewId, i, t)
            }
        }

        removeTask(e) {
            if (null !== e) {
                let t = [];
                for (let i = 0; i < e.length; ++i) {
                    let n = e[i];
                    if (!n) continue;
                    let a = n.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskId);
                    this.tasks.has(a) && (this.tasks.delete(a), t.push(n)), r.information("removeTask catygoryView:", this.categoryViewId, "taskId:", a)
                }
                s.fireTaskEvent(o.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.categoryId, this.categoryViewId, t)
            }
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = i(52), o = i(618), a = {"Content-Type": "application/x-www-form-urlencoded"};

    function r(e, t) {
        !n.isUndefined(e) && n.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t)
    }

    var s, l = {
        adapter: ("undefined" != typeof XMLHttpRequest ? s = i(619) : "undefined" != typeof process && (s = i(21)), s),
        transformRequest: [function (e, t) {
            return o(t, "Content-Type"), n.isFormData(e) || n.isArrayBuffer(e) || n.isBuffer(e) || n.isStream(e) || n.isFile(e) || n.isBlob(e) ? e : n.isArrayBufferView(e) ? e.buffer : n.isURLSearchParams(e) ? (r(t, "application/x-www-form-urlencoded;charset=utf-8"), e.toString()) : n.isObject(e) ? (r(t, "application/json;charset=utf-8"), JSON.stringify(e)) : e
        }],
        transformResponse: [function (e) {
            if ("string" == typeof e) try {
                e = JSON.parse(e)
            } catch (e) {
            }
            return e
        }],
        timeout: 0,
        xsrfCookieName: "XSRF-TOKEN",
        xsrfHeaderName: "X-XSRF-TOKEN",
        maxContentLength: -1,
        validateStatus: function (e) {
            return e >= 200 && e < 300
        }
    };
    l.headers = {common: {Accept: "application/json, text/plain, */*"}}, n.forEach(["delete", "get", "head"], function (e) {
        l.headers[e] = {}
    }), n.forEach(["post", "put", "patch"], function (e) {
        l.headers[e] = n.merge(a)
    }), e.exports = l
}, function (e, t, i) {
    "use strict";
    var n = i(505);
    e.exports = function (e, t, i, o, a) {
        var r = new Error(e);
        return n(r, t, i, o, a)
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(4), o = i(44).DownloadKernelCategoryViewManager.getCategoryViewManager(),
        a = i(0).default.getLogger("TaskCtrlHelper.DownloadProgress");
    !function (e) {
        function t() {
            let e = -1, t = 0, i = 0, r = [], s = o.getCategoryViewFromId(n.DownloadKernel.CategroyViewID.Downloading);
            if (s) {
                let o = s.getTasks(), a = void 0, l = void 0;
                for (let [, e]of o) null !== e && ((a = e.getTaskStatus()) !== n.DownloadKernel.TaskStatus.PreDownloading && a !== n.DownloadKernel.TaskStatus.StartWaiting && a !== n.DownloadKernel.TaskStatus.StartPending && a !== n.DownloadKernel.TaskStatus.Started || (t += (l = e.getTaskBaseInfo()).fileSize, i += l.downloadSize, r.push(e.getId())));
                t > 0 && (e = i / t)
            }
            return r.length > 0 && -1 === e && (e = 0), e >= 1 && (e = 1), a.information("progress:", e), {
                progress: e,
                downloadingTaskIds: r,
                downSize: i,
                totalSize: t
            }
        }

        e.getDownloadDetails = t, e.getDownloadProgressPercent = function () {
            let e = t().progress, i = "0.01%";
            return i = (100 * (e = e < 0 ? 0 : e)).toFixed(2) + "%"
        }, e.getDownloadProgress = function () {
            let e = t().progress;
            return e = e < 0 ? 0 : e
        }
    }(t.DownloadProgressNS || (t.DownloadProgressNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(2), r = i(7), s = i(29), l = i(14),
        d = r.default(a.join(__rootDir, "../bin/ThunderHelper.node")), u = i(0).default.getLogger("errorcode-config");
    let {isDef: c} = l.ThunderUtil;
    var h;
    !function (e) {
        e.Download = "download", e.Speed = "speed", e.Dcdn = "dcdn"
    }(h = t.ErrorType || (t.ErrorType = {}));

    class f {
        constructor() {
            this.codeMap = new Map, this.codes = null, this.getConfigs().then(e => {
                e && 0 === e.result && e.task_info && e.task_info.pc_client && (this.codes = e.task_info.pc_client, this.codes.speed_code && this.setCodeMap(h.Speed, this.codes.speed_code), this.codes.download_code && this.setCodeMap(h.Download, this.codes.download_code), this.codes.dcdn_code && this.setCodeMap(h.Dcdn, this.codes.dcdn_code))
            }).catch()
        }

        getMessage(e, t) {
            let i = void 0, n = this.codeMap.get(e);
            return n && (i = n.get(t)), i
        }

        getData(e) {
            let t = void 0;
            return this.codes && this.codes[e] && (t = JSON.stringify(this.codes[e])), t
        }

        getConfigs() {
            return n(this, void 0, void 0, function* () {
                let e = (yield this.getThunderVersionNumber()) || 0, t = Math.floor((new Date).getTime() / 1e3),
                    n = Math.random(), a = "!@#$%^&*()QAZxl_pc" + e + t + n,
                    r = "client_name=xl_pc&client_version=" + e + "&ts=" + t + "&r=" + n + "&key=" + (a = (a = s.ToolsUtilitiesAWNS.genarateMd5(a)).toUpperCase());
                u.information("key", a);
                const l = `http://download.code.lixian.vip.xunlei.com/errcode?${r}`;
                u.information("url", l);
                let d = null;
                try {
                    o.default.defaults.adapter = i(21);
                    let e = yield o.default.get(l, {timeout: 15e3});
                    u.information("getConfigs res", e), 200 === e.status && c(e.data) && e.data instanceof Object && (d = e.data)
                } catch (e) {
                    u.warning(e)
                }
                return d
            })
        }

        setCodeMap(e, t) {
            let i = new Map;
            for (let e of t) if (e.code) {
                let t = e.code.length, n = e.code.search(/\-/);
                if (n > 0 && n < t - 1) {
                    let o = Number(e.code.substring(0, n)), a = Number(e.code.substring(n + 1, t));
                    for (let t = o; t <= a; t++) i.set(t, e.message)
                } else {
                    let t = Number(e.code);
                    i.set(t, e.message)
                }
            }
            this.codeMap.set(e, i)
        }

        getThunderVersionNumber() {
            return n(this, void 0, void 0, function* () {
                let e = a.join(__rootDir, "../../Thunder.exe"), t = 0, i = d.getFileVersion(e).split(".");
                if (i && 4 === i.length) {
                    let e = Number(i[0]).valueOf(), n = Number(i[1]).valueOf(), o = Number(i[2]).valueOf();
                    t = 128 * Math.pow(2, 24) + e * Math.pow(2, 16) + n * Math.pow(2, 8) + o
                }
                return t
            })
        }
    }

    t.ErrorCodeConfig = f, t.default = new f
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(2), r = i(7), s = i(5), l = i(57),
        d = r.default(a.join(__rootDir, "../bin/ThunderHelper.node")), u = o.default.getLogger("BaiduDWZ");
    let c = {};

    function h(e, t, i) {
        return n(this, void 0, void 0, function* () {
            return s.isNullOrUndefined(t) && (t = 120), s.isNullOrUndefined(i) && (i = "xdas_send2phone_qr"), l.fetchSlRes({
                url: "/xlppc.dljgo.api/v2/create",
                data: {url: e, timeout: t, source: i},
                method: "post"
            })
        })
    }

    t.getBaiduDWZ = function (e) {
        return n(this, void 0, void 0, function* () {
            let t = "";
            u.information("getBaiduDWZ enter cacheDWZs = ", c);
            do {
                if (null === e || "" === e) break;
                if (-1 !== e.indexOf("&taskDownload=")) {
                    let t = e.match(/.*&taskDownload=(.*)&scheme=xunleiapp:.?/);
                    if (t && t.length > 0) {
                        let i = t[1];
                        d.isThunderPrivateUrl(i) || (i = d.makeThunderPrivateUrl(i), e = e.replace(t[1], i))
                    }
                }
                u.information("getBaiduDWZ url = ", e);
                let i = e;
                if (null !== c[i] && void 0 !== c[i]) {
                    t = c[i];
                    break
                }
                let n = "";
                try {
                    let t = yield h(e);
                    u.information("getBaiduDWZ res = ", t), 200 === t.status && t.data && "ok" === t.data.result && (n = t.data.dlj)
                } catch (e) {
                    n = ""
                }
                "" !== n && (c[i] = n), t = n
            } while (0);
            return u.information("getBaiduDWZ leave ret = ", t), t
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(5);
    let a = !1, r = !1, s = 0;
    const l = 2, d = 2;
    !function (e) {
        function t(e) {
            do {
                if (a) break;
                if (!e) break;
                a = !0, r = e.getDPIAwareSupport(), s = e.getSysDPIFactor()
            } while (0)
        }

        function i(e, i) {
            t(e);
            let n = 1;
            return n = r && i ? e.getMonitorDPIFactor(i) : s
        }

        function u() {
            return window.document.querySelector(".xly-findpage .xly-browser-tab").getBoundingClientRect()
        }

        function c() {
            return window.document.querySelector(".xly-client__header").getBoundingClientRect()
        }

        e.getDpiFactor = i, e.getBrowserWindowPosition = function (e, o, a = !1) {
            return n(this, void 0, void 0, function* () {
                let n = {x: 0, y: 0, width: 0, height: 0};
                do {
                    if (!e || !o) break;
                    let r = (yield o.getNativeWindowHandle()).readUIntLE(0, 4);
                    t(e);
                    let s = i(e, r);
                    s = window.devicePixelRatio;
                    let h = a ? c() : u(), f = yield o.getContentSize(), p = h.left * s, g = h.bottom * s,
                        m = (f[0] - h.left - l) * s, v = (f[1] - h.bottom - d) * s;
                    n = {x: Math.round(p), y: Math.round(g), width: Math.round(m), height: Math.round(v)}
                } while (0);
                return n
            })
        }, e.getHeaderRect = u, e.getEmbedBrowserHeaderRect = c, e.isWindowShow = function () {
            let e = window.document.querySelector(".xly-findpage.is-show");
            return !!o.isNullOrUndefined(e)
        }
    }(t.BrowserWindowNS || (t.BrowserWindowNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(105), r = i(18), s = i(15), l = i(8), d = i(29), u = i(13), c = i(0), h = i(515), f = i(9),
        p = i(63), g = i(4), m = i(11), v = i(16), y = i(48), T = i(19), w = i(35),
        k = m.DownloadKernelTaskManager.getTaskManager(), C = v.DownloadKernelEventManager.getEventManager(),
        b = c.default.getLogger("Thunder.plugin-loader");
    !function (e) {
        e.pluginLoader = new class {
            constructor() {
                this.plugins = null, this.currentDir = `${__rootDir}/plugins/`, this.configName = `${this.currentDir}plugin-loader-config.json`, this.unzipConfig = `${this.currentDir}plugin-unzip-config.json`, this.isUnzipConfigLoad = !1, this.unzipPlugins = {}, this.loadedPlugins = [], this.pluginStatusMap = {}, this.pluginGroupCache = {}, this.emitter = null, this.updatePlugins = null, this.updatePluginsConfig = `${this.currentDir}plugin-update-config.xml`, this.downloadPluginsStat = [], this.unzipPluginsStat = [], this.loadPluginsStat = [], this.taskStatusChangedEventTable = [], this.handlePluginIndex = 0, p.quitPromises.add(() => new Promise(e => n(this, void 0, void 0, function* () {
                    b.information("stat before quit"), this.sendPluginStat(this.downloadPluginsStat, "plugin_download"), this.downloadPluginsStat = [], this.sendPluginStat(this.unzipPluginsStat, "plugin_decompression"), this.unzipPluginsStat = [], this.sendPluginStat(this.loadPluginsStat, "plugin_load"), this.sendPluginStatEx(this.loadPluginsStat), this.loadPluginsStat = [], yield this.saveUpdatePluginsConfig(), yield this.saveUnzipConfig(), e(!0)
                })))
            }

            isPluginLoaded(e) {
                let t = !1;
                do {
                    if (-1 !== this.loadedPlugins.indexOf(e)) {
                        t = !0;
                        break
                    }
                    let i = this.getPluginStatus(e);
                    if (!i) break;
                    if ("loaded" === i.state) {
                        t = !0;
                        break
                    }
                } while (0);
                return t
            }

            setPluginLoaded(e) {
                -1 === this.loadedPlugins.indexOf(e) && (this.loadedPlugins.push(e), this.setPluginStatus(e, "loaded").catch())
            }

            clear(e, t, i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (!e || !t || !i) break;
                        if (0 !== i.indexOf(t)) break;
                        let n = `${this.currentDir}${e}`, a = yield l.FileSystemAWNS.readdirAW(n);
                        for (let e = 0; e < a.length; e++) {
                            let i = a[e], r = o.join(n, i), s = yield l.FileSystemAWNS.lstatAW(r);
                            s && (s.isDirectory() && i !== t ? l.FileSystemAWNS.rmdirsAW(r).catch() : s.isFile() && "config.json" !== i && l.FileSystemAWNS.unlinkAW(r).catch())
                        }
                    } while (0)
                })
            }

            getPluginsCount() {
                return this.plugins ? this.plugins.data.length : 0
            }

            getPluginFromName(e) {
                if (!this.plugins) return null;
                for (let t = 0; t < this.getPluginsCount(); ++t) if (e === this.plugins.data[t].name) return this.plugins.data[t];
                return null
            }

            updateStat(e, t) {
                let i = 0;
                for (i = 0; i < e.length; ++i) if (e[i].name === t.name) {
                    e[i].version = t.version, e[i].state = t.state, e[i].errorCode = t.errorCode;
                    break
                }
                i >= e.length && e.push(t)
            }

            sendPluginStatEx(e) {
                let t = "", i = 0;
                const n = "plugin_stat";
                for (let o = 0; o < e.length; o++) e[o].outProcess && (t += `key=${e[o].name},version=${e[o].version},value=${e[o].state},errorCode=${e[o].errorCode};`, ++i >= 16 && (b.information("sendPluginStat", n, "plugin_load", t), t = encodeURIComponent(t), f.XLStatNS.trackEvent(n, "plugin_load", "", 0, 0, 0, 0, t), i = 0, t = ""));
                "" !== t && (b.information("sendPluginStat", n, "plugin_load", t), t = encodeURIComponent(t), f.XLStatNS.trackEvent(n, "plugin_load", "", 0, 0, 0, 0, t))
            }

            sendPluginStat(e, t) {
                b.information("sendPluginStat enter");
                let i = "", n = 0;
                for (let o = 0; o < e.length; ++o) i += `key=${e[o].name},version=${e[o].version},value=${e[o].state},errorCode=${e[o].errorCode};`, ++n >= 16 && (b.information("sendPluginStat", t, i), i = encodeURIComponent(i), f.XLStatNS.trackEvent("core_event", t, "", 0, 0, 0, 0, i), n = 0, i = "");
                "" !== i && (b.information("sendPluginStat", t, i), i = encodeURIComponent(i), f.XLStatNS.trackEvent("core_event", t, "", 0, 0, 0, 0, i))
            }

            saveUpdatePluginsConfig() {
                return n(this, void 0, void 0, function* () {
                    b.information("saveUpdatePluginsConfig enter", this.updatePlugins);
                    do {
                        if (null === this.updatePlugins || 0 === this.updatePlugins.data.length) break;
                        let e = (new h.Builder).buildObject(this.updatePlugins);
                        yield l.FileSystemAWNS.writeFileAW(`${this.updatePluginsConfig}`, e.toString())
                    } while (0)
                })
            }

            updateUpPlugins(e) {
                return n(this, void 0, void 0, function* () {
                    if (yield l.FileSystemAWNS.existsAW(this.currentDir + e.name + "/plugin-config-file.xml")) {
                        let t = {plugin: {name: e.name, version: e.version, md5: e.md5, success: 0}};
                        null === this.updatePlugins && (this.updatePlugins = {data: []}), this.updatePlugins.data.push(t)
                    }
                })
            }

            loadUnzipConfig() {
                return n(this, void 0, void 0, function* () {
                    b.information("loadUnzipConfig enter");
                    do {
                        if (this.isUnzipConfigLoad) break;
                        let e = yield l.FileSystemAWNS.readFileAW(`${this.unzipConfig}`);
                        if (null !== e) try {
                            this.unzipPlugins = JSON.parse(e.toString()), this.isUnzipConfigLoad = !0
                        } catch (e) {
                            b.warning(e)
                        }
                    } while (0);
                    return this.isUnzipConfigLoad
                })
            }

            saveUnzipConfig() {
                return n(this, void 0, void 0, function* () {
                    let e = void 0;
                    try {
                        e = JSON.stringify(this.unzipPlugins)
                    } catch (e) {
                        b.warning(e)
                    }
                    void 0 !== e && (b.information(e), yield l.FileSystemAWNS.writeFileAW(`${this.unzipConfig}`, e))
                })
            }

            isPluginUnzip(e) {
                return n(this, void 0, void 0, function* () {
                    let t = !1, i = e.name;
                    return null !== this.unzipPlugins && null !== this.unzipPlugins[`${i}`] && void 0 !== this.unzipPlugins[`${i}`] && this.unzipPlugins[`${i}`].md5.toUpperCase() === e.md5.toUpperCase() && (t = this.unzipPlugins[`${i}`].unzipstate), t
                })
            }

            updatePluginUnzip(e, t) {
            }

            startDownloadPlugins(e, t, o, a, s, d) {
            }

            popPluginGroups(e) {
                let t = null;
                do {
                    if (!e) break;
                    e = e.toLowerCase(), t = this.pluginGroupCache[e], delete this.pluginGroupCache[e]
                } while (0);
                return t
            }

            getPluginStatus(e) {
                let t = null;
                do {
                    if (!e) break;
                    if (e = e.toLowerCase(), this.pluginStatusMap.hasOwnProperty(e)) {
                        t = this.pluginStatusMap[e];
                        break
                    }
                    for (let i in this.pluginStatusMap) {
                        let n = this.pluginStatusMap[i];
                        if (n.name === e) {
                            t = n;
                            break
                        }
                    }
                } while (0);
                return t
            }

            setPluginStatus(e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = null;
                    do {
                        let n = this.pluginStatusMap[e.toLowerCase()];
                        if (n) {
                            n.state === t || "loaded" === n.state ? i = n : (i = Object.assign({}, n, {state: t}), this.pluginStatusMap[e.toLowerCase()] = i);
                            break
                        }
                        const o = `${this.currentDir}${e}/config.json`;
                        if (yield l.FileSystemAWNS.existsAW(`${o}`)) {
                            let n = null;
                            try {
                                n = require(o)
                            } catch (e) {
                                b.warning(e)
                            }
                            if (n && n.main) {
                                let a = `${this.currentDir}${e}/${n.main}`;
                                (yield l.FileSystemAWNS.existsAW(a)) && (i = {
                                    state: t,
                                    main: a,
                                    cfgPath: o,
                                    name: n.name.toLowerCase()
                                }, this.pluginStatusMap[e.toLowerCase()] = i, "ready" === t && (n.version && n.clear && this.clear(e, n.version, n.main).catch(), n.owner ? s.server.isRemoteClientExist(n.owner) ? (b.information("owner is running", n.owner, n.name), s.server.fireClientEvent("OnPluginReady", e, n.owner, i)) : (b.information("owner cache ", n.owner, n.name), this.pluginGroupCache.hasOwnProperty(n.owner.toLowerCase()) || (this.pluginGroupCache[n.owner.toLowerCase()] = {}), this.pluginGroupCache[n.owner.toLowerCase()][e.toLowerCase()] = i) : s.server.fireClientEvent("OnPluginReady", e, n.owner, i)))
                            }
                        } else {
                            const n = `${this.currentDir}${e}/index`;
                            (yield l.FileSystemAWNS.existsAW(`${n}.js`)) && (i = {
                                state: t,
                                main: `${n}.js`,
                                name: e.toLowerCase()
                            }, this.pluginStatusMap[e.toLowerCase()] = i, "ready" === t && s.server.fireClientEvent("OnPluginReady", e, void 0, i))
                        }
                    } while (0);
                    return i
                })
            }

            loadPlugin(e, t) {
                return n(this, void 0, void 0, function* () {
                    b.information("loadPlugin enter");
                    let i = null;
                    const n = `${this.currentDir}${e}/index`, o = `${this.currentDir}${e}/config.json`;
                    let r = yield l.FileSystemAWNS.existsAW(`${n}.js`), s = yield l.FileSystemAWNS.existsAW(`${o}`);
                    b.information("loadPlugin outProcess", o, s);
                    let d = yield l.FileSystemAWNS.existsAW(this.currentDir + e + "/plugin-config-file.xml");
                    if (this.isPluginLoaded(e)) i = {}; else {
                        if (s) {
                            if (t) return void (yield this.setPluginStatus(e, "ready"));
                            let n = null;
                            try {
                                n = require(o)
                            } catch (e) {
                                b.warning(e)
                            }
                            if (b.information("loadPlugin config", n), n && n.main) {
                                let t = `${this.currentDir}${e}/${n.main}`;
                                if (yield l.FileSystemAWNS.existsAW(t)) {
                                    let r = `${__rootDir}/out/plugin-boot.js`;
                                    if (yield l.FileSystemAWNS.existsAW(r)) {
                                        const i = a.fork(r, ["--type=xdas-plugin-process", `--xdas-plugin-config=${o}`, `--xdas-plugin-name=${e}`]);
                                        b.information("loadPlugin fork", i, e), T.ipcRenderer.send(w.ThunderChannelList.channelRMSetEnvironmentVariable, i.pid.toString(), t), i.once("exit", () => {
                                            T.ipcRenderer.send(w.ThunderChannelList.channelRMSetEnvironmentVariable, i.pid.toString())
                                        })
                                    } else {
                                        const i = a.fork(t, ["--type=xdas-plugin-process", `--xdas-plugin-name=${e}`]);
                                        b.information("loadPlugin fork", i), T.ipcRenderer.send(w.ThunderChannelList.channelRMSetEnvironmentVariable, i.pid.toString(), t), i.once("exit", () => {
                                            T.ipcRenderer.send(w.ThunderChannelList.channelRMSetEnvironmentVariable, i.pid.toString())
                                        })
                                    }
                                    i = {}, n.version && n.clear && this.clear(e, n.version, n.main).catch()
                                }
                            }
                        } else if (r) try {
                            i = require(n)
                        } catch (e) {
                            b.warning(e)
                        }
                        i && this.setPluginLoaded(e)
                    }
                    let u = this.getPluginFromName(e);
                    return u ? (i || d ? this.updateStat(this.loadPluginsStat, {
                        name: u.name,
                        version: u.version,
                        state: "success",
                        errorCode: 0,
                        outProcess: s
                    }) : this.updateStat(this.loadPluginsStat, {
                        name: u.name,
                        version: u.version,
                        state: "fail",
                        errorCode: -1,
                        outProcess: s
                    }), this.loadPluginsStat.length >= this.getPluginsCount() && (this.sendPluginStat(this.loadPluginsStat, "plugin_load"), this.sendPluginStatEx(this.loadPluginsStat), this.loadPluginsStat = []), b.information("loadPlugin leave", i), i) : i
                })
            }

            loadConfig(e, t) {
                return n(this, void 0, void 0, function* () {
                    if (b.information("loadConfig enter"), this.plugins = e, t) {
                        let t = void 0;
                        try {
                            t = JSON.stringify(e)
                        } catch (e) {
                            b.warning(e)
                        }
                        void 0 !== t && (b.information(t), yield l.FileSystemAWNS.writeFileAW(`${this.configName}`, t))
                    }
                    this.loadUnzipConfig().then(() => {
                        this.downloadPlugins()
                    }).catch()
                })
            }

            checkFile(e) {
                return n(this, void 0, void 0, function* () {
                    b.information("checkFile enter");
                    const t = `${this.currentDir}${e.name}.zip`;
                    let i = yield l.FileSystemAWNS.existsAW(t);
                    return i && (i = yield d.ToolsUtilitiesAWNS.matchFileMd5(t, e.md5)), i
                })
            }

            checkLoadPlugin(e) {
                return n(this, void 0, void 0, function* () {
                    b.information("checkLoadPlugin enter"), void 0 !== e.loadtype && (1 === e.loadtype && void 0 !== e.time && e.time >= 0 ? setTimeout(() => {
                        this.loadPlugin(e.name).catch()
                    }, 1e3 * e.time) : 2 === e.loadtype && (this.emitter && this.emitter.emit(u.NodeEventMesssageNS.eventPluginLoderPluginReady, e.name), yield this.setPluginStatus(e.name, "ready")))
                })
            }

            onDownloadPluginFinish(e, t) {
                return n(this, void 0, void 0, function* () {
                    b.information("onDownloadPluginFinish bSuccess:", e, "name:", t.name, "index:", this.handlePluginIndex);
                    const n = `${this.currentDir}${t.name}.zip`, o = `${this.currentDir}${t.name}/`;
                    let a = !1, r = !1, s = !1;
                    if (e) {
                        let e = yield l.FileSystemAWNS.existsAW(o);
                        if (e && (s = yield this.isPluginUnzip(t)), r = e, a = !s) {
                            const {UnzipUtilitiesAWNS: e} = yield Promise.resolve().then(() => i(106));
                            (r = yield e.uncompressZipFile(o, n)) ? (yield this.updateUpPlugins(t), this.updateStat(this.unzipPluginsStat, {
                                name: t.name,
                                version: t.version,
                                state: "success",
                                errorCode: 0
                            })) : this.updateStat(this.unzipPluginsStat, {
                                name: t.name,
                                version: t.version,
                                state: "fail",
                                errorCode: -1
                            })
                        }
                        if (r) {
                            let e = {version: t.version, md5: t.md5, unzipstate: !0};
                            this.updatePluginUnzip(t, e), yield this.checkLoadPlugin(t), ++this.handlePluginIndex
                        } else ++this.handlePluginIndex
                    } else ++this.handlePluginIndex;
                    this.handlePluginIndex === this.getPluginsCount() && (b.information("send stat and save config after load finish"), this.sendPluginStat(this.downloadPluginsStat, "plugin_download"), this.downloadPluginsStat = [], this.sendPluginStat(this.unzipPluginsStat, "plugin_decompression"), this.unzipPluginsStat = [], this.sendPluginStat(this.loadPluginsStat, "plugin_load"), this.loadPluginsStat = [], yield this.saveUpdatePluginsConfig(), yield this.saveUnzipConfig())
                })
            }

            checkDownloadPlugin(e) {
                return n(this, void 0, void 0, function* () {
                    if (b.information("checkDownloadPlugin enter"), yield this.checkFile(e)) yield this.onDownloadPluginFinish(!0, e); else {
                        let t = {version: e.version, md5: e.md5, unzipstate: !1};
                        this.updatePluginUnzip(e, t), yield this.downloadPlugin(e, this.onDownloadPluginFinish.bind(this))
                    }
                })
            }

            detachTakStatusChangeEvent(e) {
                null !== this.taskStatusChangedEventTable[e] && void 0 !== this.taskStatusChangedEventTable[e] && (b.information("取消监听 ", this.taskStatusChangedEventTable[e]), C.detachTaskEvent(g.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventTable[e]), this.taskStatusChangedEventTable[e] = null)
            }

            attachTaskStatusChangedEvent(e, t) {
                b.information("attachTaskStatusChangedEvent taskId: ", e), void 0 !== this.taskStatusChangedEventTable[e] && null !== this.taskStatusChangedEventTable[e] || (this.taskStatusChangedEventTable[e] = C.attachTaskEvent(g.DownloadKernel.TaskEventType.StatusChanged, (...i) => n(this, void 0, void 0, function* () {
                    let n = !1;
                    do {
                        if (!i) {
                            b.information("args is null");
                            break
                        }
                        if (i[0] !== g.DownloadKernel.TaskEventType.StatusChanged) {
                            b.information("args[0] is not StatusChanged");
                            break
                        }
                        let o = i[1];
                        if (!o) {
                            b.information("taskList is null");
                            break
                        }
                        for (let i = 0; i < o.length; ++i) {
                            let a = o[i];
                            if (!a) continue;
                            if (a.getId() !== e) continue;
                            let r = a.getTaskStatus();
                            b.information("get status ", r), r === g.DownloadKernel.TaskStatus.Succeeded ? (yield this.onDownloadPluginFinish(!0, t), this.updateStat(this.downloadPluginsStat, {
                                name: t.name,
                                version: t.version,
                                state: "success",
                                errorCode: 0
                            }), this.detachTakStatusChangeEvent(e)) : r === g.DownloadKernel.TaskStatus.Failed && (yield this.onDownloadPluginFinish(!1, t), this.updateStat(this.downloadPluginsStat, {
                                name: t.name,
                                version: t.version,
                                state: "fail",
                                errorCode: -1
                            }), this.detachTakStatusChangeEvent(e)), n = !0
                        }
                    } while (0);
                    return n
                })))
            }

            downloadPlugin(e, t) {
                return n(this, void 0, void 0, function* () {
                    b.information("downloadPlugin enter");
                    let o = !1;
                    const a = `${this.currentDir}`, s = `${this.currentDir}${e.name}.zip`, d = `${e.name}.zip`;
                    do {
                        if (void 0 !== e.url) {
                            let t = null;
                            try {
                                r.default.defaults.adapter = i(21), t = yield r.default.get(e.url, {responseType: "arraybuffer"})
                            } catch (e) {
                                break
                            }
                            if (null !== t && void 0 !== t.status && 200 === t.status && null !== t.data) {
                                if (yield l.FileSystemAWNS.writeFileAW(s, t.data)) {
                                    o = yield this.checkFile(e);
                                    break
                                }
                                break
                            }
                            break
                        }
                    } while (0);
                    o ? (t(!0, e), this.updateStat(this.downloadPluginsStat, {
                        name: e.name,
                        version: e.version,
                        state: "success",
                        errorCode: 0
                    }), yield l.FileSystemAWNS.unlinkAW(s + ".xltd"), yield l.FileSystemAWNS.unlinkAW(s + ".xltd.cfg")) : l.FileSystemAWNS.unlinkAW(s).then(() => n(this, void 0, void 0, function* () {
                        let t = {
                            taskBaseInfo: {savePath: a, taskName: d},
                            p2spTaskInfo: {url: e.url, nameFixed: 1},
                            isBackground: !0
                        }, i = yield k.createTask(g.DownloadKernel.TaskType.P2sp, t);
                        if (null !== i) {
                            let t = i.getTaskAttribute(g.DownloadKernel.TaskAttribute.TaskId);
                            this.attachTaskStatusChangedEvent(t, e), yield y.DownloadDispatchNS.startTask(t)
                        }
                    })).catch()
                })
            }

            downloadPlugins() {
                if (b.information("downloadPlugins enter"), null !== this.plugins && null !== this.plugins.data && void 0 !== this.plugins.data) for (let e = 0; e < this.plugins.data.length; ++e) {
                    let t = this.plugins.data[e];
                    null !== t && void 0 !== t.name && void 0 !== t.status && t.status && this.checkDownloadPlugin(t).then().catch()
                }
            }
        }
    }(t.PluginLoaderNS || (t.PluginLoaderNS = {}))
}, function (e, t) {
    (function () {
        t.defaults = {
            .1: {
                explicitCharkey: !1,
                trim: !0,
                normalize: !0,
                normalizeTags: !1,
                attrkey: "@",
                charkey: "#",
                explicitArray: !1,
                ignoreAttrs: !1,
                mergeAttrs: !1,
                explicitRoot: !1,
                validator: null,
                xmlns: !1,
                explicitChildren: !1,
                childkey: "@@",
                charsAsChildren: !1,
                includeWhiteChars: !1,
                async: !1,
                strict: !0,
                attrNameProcessors: null,
                attrValueProcessors: null,
                tagNameProcessors: null,
                valueProcessors: null,
                emptyTag: ""
            },
            .2: {
                explicitCharkey: !1,
                trim: !1,
                normalize: !1,
                normalizeTags: !1,
                attrkey: "$",
                charkey: "_",
                explicitArray: !0,
                ignoreAttrs: !1,
                mergeAttrs: !1,
                explicitRoot: !0,
                validator: null,
                xmlns: !1,
                explicitChildren: !1,
                preserveChildrenOrder: !1,
                childkey: "$$",
                charsAsChildren: !1,
                includeWhiteChars: !1,
                async: !1,
                strict: !0,
                attrNameProcessors: null,
                attrValueProcessors: null,
                tagNameProcessors: null,
                valueProcessors: null,
                rootName: "root",
                xmldec: {version: "1.0", encoding: "UTF-8", standalone: !0},
                doctype: null,
                renderOpts: {pretty: !0, indent: "  ", newline: "\n"},
                headless: !1,
                chunkSize: 1e4,
                emptyTag: "",
                cdata: !1
            }
        }
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n, o, a, r, s, l, d, u, c, h, f, p, g = {}.hasOwnProperty;
        l = i(132), d = i(133), t = i(130), n = i(131), u = i(129), h = i(138), f = i(139), c = i(140), o = i(134), a = i(136), r = i(135), s = i(137), p = i(518), e.exports = function (e) {
            function i(e) {
                i.__super__.constructor.call(this, e)
            }

            return function (e, t) {
                for (var i in t) g.call(t, i) && (e[i] = t[i]);

                function n() {
                    this.constructor = e
                }

                n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
            }(i, p), i.prototype.document = function (e) {
                var t, i, o, a, r;
                for (this.textispresent = !1, a = "", i = 0, o = (r = e.children).length; i < o; i++) t = r[i], a += function () {
                    switch (!1) {
                        case!(t instanceof l):
                            return this.declaration(t);
                        case!(t instanceof d):
                            return this.docType(t);
                        case!(t instanceof n):
                            return this.comment(t);
                        case!(t instanceof c):
                            return this.processingInstruction(t);
                        default:
                            return this.element(t, 0)
                    }
                }.call(this);
                return this.pretty && a.slice(-this.newline.length) === this.newline && (a = a.slice(0, -this.newline.length)), a
            }, i.prototype.attribute = function (e) {
                return " " + e.name + '="' + e.value + '"'
            }, i.prototype.cdata = function (e, t) {
                return this.space(t) + "<![CDATA[" + e.text + "]]>" + this.newline
            }, i.prototype.comment = function (e, t) {
                return this.space(t) + "\x3c!-- " + e.text + " --\x3e" + this.newline
            }, i.prototype.declaration = function (e, t) {
                var i;
                return i = this.space(t), i += '<?xml version="' + e.version + '"', null != e.encoding && (i += ' encoding="' + e.encoding + '"'), null != e.standalone && (i += ' standalone="' + e.standalone + '"'), i += this.spacebeforeslash + "?>", i += this.newline
            }, i.prototype.docType = function (e, i) {
                var l, d, u, h, f;
                if (i || (i = 0), h = this.space(i), h += "<!DOCTYPE " + e.root().name, e.pubID && e.sysID ? h += ' PUBLIC "' + e.pubID + '" "' + e.sysID + '"' : e.sysID && (h += ' SYSTEM "' + e.sysID + '"'), e.children.length > 0) {
                    for (h += " [", h += this.newline, d = 0, u = (f = e.children).length; d < u; d++) l = f[d], h += function () {
                        switch (!1) {
                            case!(l instanceof o):
                                return this.dtdAttList(l, i + 1);
                            case!(l instanceof a):
                                return this.dtdElement(l, i + 1);
                            case!(l instanceof r):
                                return this.dtdEntity(l, i + 1);
                            case!(l instanceof s):
                                return this.dtdNotation(l, i + 1);
                            case!(l instanceof t):
                                return this.cdata(l, i + 1);
                            case!(l instanceof n):
                                return this.comment(l, i + 1);
                            case!(l instanceof c):
                                return this.processingInstruction(l, i + 1);
                            default:
                                throw new Error("Unknown DTD node type: " + l.constructor.name)
                        }
                    }.call(this);
                    h += "]"
                }
                return h += this.spacebeforeslash + ">", h += this.newline
            }, i.prototype.element = function (e, i) {
                var o, a, r, s, l, d, p, m, v, y, T, w, k;
                for (p in i || (i = 0), k = !1, this.textispresent ? (this.newline = "", this.pretty = !1) : (this.newline = this.newlinedefault, this.pretty = this.prettydefault), m = "", m += (w = this.space(i)) + "<" + e.name, v = e.attributes) g.call(v, p) && (o = v[p], m += this.attribute(o));
                if (0 === e.children.length || e.children.every(function (e) {
                    return "" === e.value
                })) this.allowEmpty ? m += "></" + e.name + ">" + this.newline : m += this.spacebeforeslash + "/>" + this.newline; else if (this.pretty && 1 === e.children.length && null != e.children[0].value) m += ">", m += e.children[0].value, m += "</" + e.name + ">" + this.newline; else {
                    if (this.dontprettytextnodes) for (r = 0, l = (y = e.children).length; r < l; r++) if (null != (a = y[r]).value) {
                        this.textispresent++, k = !0;
                        break
                    }
                    for (this.textispresent && (this.newline = "", this.pretty = !1, w = this.space(i)), m += ">" + this.newline, s = 0, d = (T = e.children).length; s < d; s++) a = T[s], m += function () {
                        switch (!1) {
                            case!(a instanceof t):
                                return this.cdata(a, i + 1);
                            case!(a instanceof n):
                                return this.comment(a, i + 1);
                            case!(a instanceof u):
                                return this.element(a, i + 1);
                            case!(a instanceof h):
                                return this.raw(a, i + 1);
                            case!(a instanceof f):
                                return this.text(a, i + 1);
                            case!(a instanceof c):
                                return this.processingInstruction(a, i + 1);
                            default:
                                throw new Error("Unknown XML node type: " + a.constructor.name)
                        }
                    }.call(this);
                    k && this.textispresent--, this.textispresent || (this.newline = this.newlinedefault, this.pretty = this.prettydefault), m += w + "</" + e.name + ">" + this.newline
                }
                return m
            }, i.prototype.processingInstruction = function (e, t) {
                var i;
                return i = this.space(t) + "<?" + e.target, e.value && (i += " " + e.value), i += this.spacebeforeslash + "?>" + this.newline
            }, i.prototype.raw = function (e, t) {
                return this.space(t) + e.value + this.newline
            }, i.prototype.text = function (e, t) {
                return this.space(t) + e.value + this.newline
            }, i.prototype.dtdAttList = function (e, t) {
                var i;
                return i = this.space(t) + "<!ATTLIST " + e.elementName + " " + e.attributeName + " " + e.attributeType, "#DEFAULT" !== e.defaultValueType && (i += " " + e.defaultValueType), e.defaultValue && (i += ' "' + e.defaultValue + '"'), i += this.spacebeforeslash + ">" + this.newline
            }, i.prototype.dtdElement = function (e, t) {
                return this.space(t) + "<!ELEMENT " + e.name + " " + e.value + this.spacebeforeslash + ">" + this.newline
            }, i.prototype.dtdEntity = function (e, t) {
                var i;
                return i = this.space(t) + "<!ENTITY", e.pe && (i += " %"), i += " " + e.name, e.value ? i += ' "' + e.value + '"' : (e.pubID && e.sysID ? i += ' PUBLIC "' + e.pubID + '" "' + e.sysID + '"' : e.sysID && (i += ' SYSTEM "' + e.sysID + '"'), e.nData && (i += " NDATA " + e.nData)), i += this.spacebeforeslash + ">" + this.newline
            }, i.prototype.dtdNotation = function (e, t) {
                var i;
                return i = this.space(t) + "<!NOTATION " + e.name, e.pubID && e.sysID ? i += ' PUBLIC "' + e.pubID + '" "' + e.sysID + '"' : e.pubID ? i += ' PUBLIC "' + e.pubID + '"' : e.sysID && (i += ' SYSTEM "' + e.sysID + '"'), i += this.spacebeforeslash + ">" + this.newline
            }, i.prototype.openNode = function (e, t) {
                var i, n, o, a;
                if (t || (t = 0), e instanceof u) {
                    for (n in o = this.space(t) + "<" + e.name, a = e.attributes) g.call(a, n) && (i = a[n], o += this.attribute(i));
                    return o += (e.children ? ">" : "/>") + this.newline
                }
                return o = this.space(t) + "<!DOCTYPE " + e.rootNodeName, e.pubID && e.sysID ? o += ' PUBLIC "' + e.pubID + '" "' + e.sysID + '"' : e.sysID && (o += ' SYSTEM "' + e.sysID + '"'), o += (e.children ? " [" : ">") + this.newline
            }, i.prototype.closeNode = function (e, t) {
                switch (t || (t = 0), !1) {
                    case!(e instanceof u):
                        return this.space(t) + "</" + e.name + ">" + this.newline;
                    case!(e instanceof d):
                        return this.space(t) + "]>" + this.newline
                }
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(0), r = i(8), s = i(4), l = i(59), d = i(11), u = i(389), c = i(40), h = i(51), f = i(73),
        p = i(5), g = i(29), m = i(25), v = i(43), y = i(141), T = i(37), w = i(521), k = i(31),
        C = a.default.getLogger("NativeFunction.TaskInfo"), b = d.DownloadKernelTaskManager.getTaskManager();

    class I {
        constructor() {
            u.HistoryTaskSpeedInfoNS.init().catch()
        }

        getHistoryTaskInfoString(e) {
            return n(this, void 0, void 0, function* () {
                let t = "", i = yield this.getTaskInfo(e);
                if (i) {
                    "1111111111111111111111111111111111111111" === i.gcid && (i.gcid = "");
                    let n = b.getTaskFromTaskId(e);
                    if (n) {
                        let o = yield this.getFileList(n);
                        i.fileList = o;
                        let a = i.progress, r = yield this.getHistorySpeedInfo(e, a);
                        r && (r.maxSpeed && (i.maxSpeed = r.maxSpeed), r.historySpeedMap && (i.historySpeed = r.historySpeedMap), r.historyIncreaseSpeedMap && (i.historyIncreaseSpeed = r.historyIncreaseSpeedMap), r.historyVipSpeedColorMap && (i.historyVipSpeedColor = r.historyVipSpeedColorMap), t = JSON.stringify(i), C.information("taskInfo: ", t))
                    } else C.warning("task is null")
                } else C.warning("taskInfo is null");
                return t
            })
        }

        getTaskInfoString(e) {
            return n(this, void 0, void 0, function* () {
                let t = "", i = yield this.getTaskInfo(e);
                return i ? (t = JSON.stringify(i), C.information("taskInfo: ", t)) : C.warning("taskInfo is null"), t
            })
        }

        getBtSubFileListString(e, t) {
            let i = [];
            do {
                let n = b.getTaskFromTaskId(e);
                if (!n) break;
                if (n.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskType) !== s.DownloadKernel.TaskType.Bt) break;
                let o = n.getExtraObject();
                if (!o) break;
                for (let e = 0; e < t.length; ++e) {
                    let n = t[e], a = o.getBtFileByRealIndex(n.realIndex);
                    if (!a) continue;
                    let r = {};
                    r.index = n.realIndex, r.filePath = n.relativePath, r.fileName = a.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileName), r.isNeedDownload = a.getIsDownload(), r.isSupportPlay = a.isSupportPlay(), r.fileSize = n.fileSize, r.cid = n.cid, r.gcid = n.gcid, r.status = n.fileStatus, r.downloadSize = n.downloadSize, r.errCode = n.errorCode, r.userRead = n.userRead, 0 !== r.errCode ? r.errMessage = l.TaskStatusHelper.getTaskErrorInfoByCode(r.errCode) : r.errMessage = "", i.push(r)
                }
            } while (0);
            return JSON.stringify(i)
        }

        getGroupTaskSubFileListString(e) {
            let t = [];
            for (let i = 0; i < e.length; ++i) {
                let n = e[i];
                if (n) {
                    let e = {};
                    e.filePath = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.RelativePath), e.index = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileIndex), e.taskId = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId), e.fileName = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName), e.url = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskUrl), e.refUrl = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.RefUrl), e.isNeedDownload = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSubTask), e.fileSize = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize), e.downloadSize = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize), e.cid = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.Cid), e.gcid = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.Gcid), e.status = n.getTaskStatus(), e.errCode = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.ErrorCode), e.userRead = n.getUserRead(), e.isSupportPlay = n.isSupportPlay(), e.status === s.DownloadKernel.TaskStatus.Failed ? e.errMessage = l.TaskStatusHelper.getTaskErrorInfoByCode(e.errCode) : e.errMessage = "";
                    let i = n.getTaskChannelInfo();
                    e.dcdnStatus = i.dcdnStatus, t.push(e)
                }
            }
            return JSON.stringify(t)
        }

        calcGroupTaskUniqueId(e) {
            let t = "", i = e.getExtraObject(), n = i.getSubTaskCount();
            if (n > 0) {
                let e = [];
                for (let t = 0; t < n; ++t) {
                    let n = i.getSubTaskByIndex(t).getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskUrl);
                    p.isString(n) && n.length > 0 && e.push(n)
                }
                if (e.length > 0) {
                    e.sort();
                    let i = e.length, n = "#" + i + "#";
                    C.information("CalcGroupTaskUniqueID urlNum: ", i);
                    for (let t = 0; t < i; ++t) n += e[t] + "#";
                    let o = Buffer.alloc(n.length);
                    o.write(n), (t = g.ToolsUtilitiesAWNS.encryptSha1Buffer(o)) && (t = t.toUpperCase())
                }
            }
            return t
        }

        getTaskInfo(e) {
            return n(this, void 0, void 0, function* () {
                let t = {}, i = b.getTaskFromTaskId(e);
                if (i) {
                    let n = i.getTaskStatus(), a = 0;
                    n !== s.DownloadKernel.TaskStatus.Succeeded && n !== s.DownloadKernel.TaskStatus.Seeding || (a = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.CompletionTime)), i.getTaskAttribute(s.DownloadKernel.TaskAttribute.RecycleTime) > 0 && (n = 20);
                    let r = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.RefUrl),
                        d = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskUrl), u = "",
                        c = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskType),
                        h = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName);
                    c !== s.DownloadKernel.TaskType.P2sp && c !== s.DownloadKernel.TaskType.Emule || (u = o.extname(h)) && (u = u.substring(1));
                    let p = "";
                    if (c === s.DownloadKernel.TaskType.Bt) {
                        p = i.getExtraObject().getInfoId()
                    }
                    let g = "", m = i.getTaskChannelInfo(),
                        v = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                        T = m.offlineSize + m.originSize + m.p2pSize + m.p2sSize;
                    T < v && (m.p2pSize > 0 ? m.p2pSize = m.p2pSize + v - T : m.offlineSize > 0 ? m.offlineSize = m.offlineSize + v - T : m.originSize > 0 ? m.originSize = m.originSize + v - T : m.p2sSize > 0 && (m.p2sSize = m.p2sSize + v - T));
                    let w = "";
                    c === s.DownloadKernel.TaskType.P2sp || c === s.DownloadKernel.TaskType.Emule ? w = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.Gcid) : c === s.DownloadKernel.TaskType.Group && (C.information("calcGroupTaskUniqueId before"), w = this.calcGroupTaskUniqueId(i), C.information("calcGroupTaskUniqueId end, taskId: ", i.getId(), ", uniqueId: ", w));
                    let k = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize),
                        b = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.SrcTotal),
                        I = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.SrcUsing),
                        S = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadingPeriod),
                        _ = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.CreateTime),
                        D = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath),
                        A = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.Description),
                        N = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.ErrorCode),
                        x = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.Moving), E = yield this.getActions(i),
                        O = this.getProgress(i), P = this.getSpeedInfo(i),
                        M = yield y.VipPluginFunctionNS.getVipSpeedColor(e);
                    if (t.status = n, t.taskID = e, t.type = c, t.name = h, t.gcid = w, t.suffix = u, t.url = d, t.refUrl = r, t.isFromVest = !1, t.isMoving = x, "" !== d || "" !== p) {
                        let e = "" === d ? p : d, i = yield f.isVestUrl(e, "vestURL");
                        t.isFromVest = i
                    }
                    t.size = k, t.downloadSize = v, t.progress = O, t.allResourceCount = b, t.resourceCount = I, t.errCode = N, t.status === s.DownloadKernel.TaskStatus.Failed ? t.errMessage = l.TaskStatusHelper.getTaskErrorInfoByCode(t.errCode) : t.errMessage = "", i.getStopReason() === s.DownloadKernel.TaskStopReason.SelectDownloadLists ? t.stopReason = "downloadSelected" : t.stopReason = "", t.actions = E, t.averageSpeed = P.averageSpeed, t.speed = P.speed, t.increaseSpeed = P.increaseSpeed, t.vipSpeedColor = M, t.channelInfo = m, t.savePath = D, t.infoId = p, t.duration = S, t.createTime = _, t.completeTime = a, t.md5 = g, t.note = A
                }
                return t
            })
        }

        isForbidden(e) {
            let t = !1;
            do {
                if (e.getTaskStatus() === s.DownloadKernel.TaskStatus.Failed) {
                    let i = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.ErrorCode);
                    if (7 === i) {
                        t = !0;
                        break
                    }
                    if (i >= 700 && i <= 799) {
                        t = !0;
                        break
                    }
                }
            } while (0);
            return t
        }

        getActions(e) {
            return n(this, void 0, void 0, function* () {
                let t = [], i = !0;
                0 === m.default.getConfigInfo("shouleiDownload", "enable") && (i = !1);
                let n = e.getTaskStatus();
                do {
                    if (n !== s.DownloadKernel.TaskStatus.Failed && n !== s.DownloadKernel.TaskStatus.Unkown) {
                        if (e.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskType) !== s.DownloadKernel.TaskType.Group) t.push("repost"); else {
                            let i = e.getExtraObject().getUserData(v.TaskUserDataGUID.guidDownloadGroupTask, "canRepost");
                            i && "true" === i && t.push("repost")
                        }
                    }
                    if (e.getTaskAttribute(s.DownloadKernel.TaskAttribute.RecycleTime) > 0) {
                        t.push("restore"), t.push("delete");
                        break
                    }
                    if (this.isForbidden(e)) {
                        t.push("delete");
                        break
                    }
                    if (n === s.DownloadKernel.TaskStatus.Succeeded || n === s.DownloadKernel.TaskStatus.Seeding) {
                        let i = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskType);
                        if (i === s.DownloadKernel.TaskType.Group) {
                            if (!(yield c.TaskCtrlOperatorNS.isExistTaskFile(e.getTaskBaseInfo()))) {
                                t.push("delete");
                                break
                            }
                            t.push("openFolder")
                        } else {
                            let n = void 0;
                            if (yield h.SingleBtTaskNS.isSingleBtTask(e)) n = h.SingleBtTaskNS.getSinleBtTaskFilePath(e); else {
                                let a = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName),
                                    r = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath);
                                n = o.join(r, a), i !== s.DownloadKernel.TaskType.Emule && i !== s.DownloadKernel.TaskType.P2sp || T.TaskUtilHelper.isIsoExt(a) && k.ThunderHelper.isWindow8OrLater() && ("" !== (yield w.DiskImageHelperNS.getVirtualDiskPhysicalPath(n)) ? t.push("ejectiso") : t.push("mountiso"))
                            }
                            if (!(yield r.FileSystemAWNS.existsAW(n))) {
                                t.push("delete");
                                break
                            }
                            t.push("openFolder"), i !== s.DownloadKernel.TaskType.Bt && t.push("open")
                        }
                        e.isSupportPlay() && (t.push("play"), t.push("subtitleDownload"), 1 === e.getVideoFileCount() && t.push("videoPreview"));
                        break
                    }
                    if (1 === e.getTaskAttribute(s.DownloadKernel.TaskAttribute.Forbidden)) {
                        t.push("delete");
                        break
                    }
                    e.isSupportPlay() && n !== s.DownloadKernel.TaskStatus.Failed && t.push("downAndPlay"), n === s.DownloadKernel.TaskStatus.Stopped || n === s.DownloadKernel.TaskStatus.Failed || n === s.DownloadKernel.TaskStatus.Unkown ? t.push("continue") : t.push("pause"), e.isSupportPlay() && (t.push("subtitleDownload"), 1 === e.getVideoFileCount() && t.push("videoPreview"))
                } while (0);
                if (e.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskType) !== s.DownloadKernel.TaskType.Group) if (0 !== m.default.getConfigInfo("shouleiDownload", "enableTransfer")) {
                    let o = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.CategoryViewId);
                    n !== s.DownloadKernel.TaskStatus.Succeeded && n !== s.DownloadKernel.TaskStatus.Seeding || !(yield c.TaskCtrlOperatorNS.isExistTaskFile(e.getTaskBaseInfo())) ? o === s.DownloadKernel.CategroyViewID.Downloading ? t.push("shouleiTransfer") : i && t.push("shouleiDownload") : t.push("shouleiTransfer")
                } else i && t.push("shouleiDownload");
                return t
            })
        }

        getProgress(e) {
            let t = 0, i = e.getTaskStatus(), n = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize),
                o = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize);
            return 0 !== n && 0 !== o && (i === s.DownloadKernel.TaskStatus.Succeeded || i === s.DownloadKernel.TaskStatus.Seeding || o >= n ? t = 100 : (t = o / n * 100, t = parseInt(t.toString(), 10))), t
        }

        getFileList(e) {
            return n(this, void 0, void 0, function* () {
                let t = "", i = !0, n = [], a = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskType);
                if (a === s.DownloadKernel.TaskType.Bt) {
                    let a = e.getExtraObject().getBtFileList(),
                        d = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath),
                        u = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName);
                    void 0 !== u && "" !== u && u.indexOf(".") === u.length - 1 && (u = u.substring(0, u.length - 1));
                    let c = yield h.SingleBtTaskNS.isSingleBtTask(e);
                    for (let [, f]of a) {
                        let a = {};
                        a.index = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.RealIndex), a.filePath = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FilePath), a.fileName = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileName), a.isNeedDownload = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.Download), a.fileSize = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileSize), a.cid = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.Cid), a.gcid = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.Gcid), a.status = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.FileStatus), a.downloadSize = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.DownloadSize), a.errCode = f.getBtFileAttribute(s.DownloadKernel.BtFileAttribute.ErrorCode), a.isSupportPlay = f.isSupportPlay(), a.userRead = f.getUserRead(), 0 !== a.errCode ? a.errMessage = l.TaskStatusHelper.getTaskErrorInfoByCode(a.errCode) : a.errMessage = "", a.status === s.DownloadKernel.BtFileStatus.Complete ? (t = c ? h.SingleBtTaskNS.getSinleBtTaskFilePath(e) : o.join(d, u, a.filePath, a.fileName), i = yield r.FileSystemAWNS.existsAW(t), a.isDelete = !i) : a.isDelete = !1, n.push(a)
                    }
                } else if (a === s.DownloadKernel.TaskType.Group) {
                    let a = e.getExtraObject(), d = a.getSubTaskCount(), u = "";
                    for (let e = 0; e < d; ++e) {
                        let d = a.getSubTaskByIndex(e);
                        if (d) {
                            let a = {};
                            a.index = e, a.filePath = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.RelativePath), a.taskId = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId), a.fileName = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName), a.url = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskUrl), a.refUrl = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.RefUrl), a.isNeedDownload = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSubTask), a.fileSize = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize), a.downloadSize = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize), a.cid = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.Cid), a.gcid = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.Gcid), a.status = d.getTaskStatus(), a.errCode = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.ErrorCode), a.isSupportPlay = d.isSupportPlay(), a.userRead = d.getUserRead(), a.status === s.DownloadKernel.TaskStatus.Failed ? a.errMessage = l.TaskStatusHelper.getTaskErrorInfoByCode(a.errCode) : a.errMessage = "";
                            let c = d.getTaskChannelInfo();
                            a.dcdnStatus = c.dcdnStatus, u = d.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath), a.status === s.DownloadKernel.TaskStatus.Succeeded || a.status === s.DownloadKernel.TaskStatus.Seeding ? (t = o.join(u, a.fileName), i = yield r.FileSystemAWNS.existsAW(t), a.isDelete = !i) : a.isDelete = !1, n.push(a)
                        }
                    }
                }
                return n
            })
        }

        getSpeedInfo(e) {
            let t = e.getDownloadSpeed(), i = 0, n = e.getVipSpeed(),
                o = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                a = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadingPeriod);
            a < 1 && (a = 1), i = o / a, i = parseInt(i.toString(), 10);
            let r = {};
            return r.averageSpeed = i, r.speed = t, r.increaseSpeed = n, r
        }

        getHistorySpeedInfo(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = {maxSpeed: 0, historySpeedMap: {}, historyIncreaseSpeedMap: {}},
                    n = yield u.HistoryTaskSpeedInfoNS.getTaskSpeedInfo(e);
                do {
                    if (!n) break;
                    if (!n.maxSpeed || n.maxSpeed < 0) break;
                    i.maxSpeed = n.maxSpeed;
                    let e = n.speedInfoMap;
                    if (!e) break;
                    void 0 === t && (t = 0), (!(t = parseInt(t.toString(), 10)) || t < 0) && (t = 0), t > 100 && (t = 100);
                    let o = {}, a = {}, r = {};
                    for (let i in e) if (void 0 !== e[i]) {
                        let n = parseInt(i, 10);
                        if (n <= t) {
                            let t = e[i];
                            o[n] = t.downloadSpeed, a[n] = t.addSpeed, r[n] = t.vipSpeedColor
                        }
                    }
                    i.historySpeedMap = o, i.historyIncreaseSpeedMap = a, i.historyVipSpeedColorMap = r
                } while (0);
                return i
            })
        }
    }

    t.TaskInfoManager = I, function (e) {
        const t = new I;
        e.getTaskInfoManager = function () {
            return t
        }
    }(t.TaskInfoManagerNS || (t.TaskInfoManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(0), r = i(8), s = i(4), l = i(16), d = i(11), u = i(5), c = i(141),
        h = a.default.getLogger("NativeFunction.TaskInfoHistory"), f = l.DownloadKernelEventManager.getEventManager(),
        p = d.DownloadKernelTaskManager.getTaskManager();
    !function (e) {
        const t = new class {
            constructor() {
                this.isInit = !1
            }

            init() {
                return n(this, void 0, void 0, function* () {
                    this.isInit || (this.isInit = !0, this.taskSpeedMap = new Map, this.dataPath = o.join(__profilesDir, "TaskSpeedInfo"), (yield r.FileSystemAWNS.existsAW(this.dataPath)) || (yield r.FileSystemAWNS.mkdirsAW(this.dataPath)), f.attachTaskEvent(s.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                        this.onTaskDetailChanged(...e)
                    }), f.attachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                        this.onTaskStatusChanged(...e)
                    }))
                })
            }

            getTaskSpeedInfo(e) {
                return n(this, void 0, void 0, function* () {
                    let t = this.taskSpeedMap.get(e);
                    return t || (yield this.loadTaskSpeedInfo(e), t = this.taskSpeedMap.get(e)), t && this.checkTaskSpeedInfo(e, t), t
                })
            }

            onTaskDetailChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== s.DownloadKernel.TaskEventType.DetailChanged) break;
                    let t = e[1], i = e[2];
                    if (!t || !i) break;
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        let n = 0, o = 0, a = i.getDownloadSpeed(), r = i.getVipSpeed(),
                            l = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId),
                            d = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                            u = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadingPeriod);
                        u < 1 && (u = 1), n = Math.round(d / u);
                        let c = i.getTaskStatus();
                        if (c === s.DownloadKernel.TaskStatus.Succeeded || c === s.DownloadKernel.TaskStatus.Seeding) o = 100; else {
                            let e = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.FileSize);
                            0 !== e && (o = d / e * 100, (o = parseInt(o.toString(), 10)) > 100 ? o = 100 : o < 0 && (o = 0))
                        }
                        this.updateProgress(l, n, o, a, r).catch(e => {
                            h.warning(e)
                        })
                    }
                } while (0)
            }

            onTaskStatusChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== s.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!e[1]) break;
                    let t = e[1];
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        let n = i.getTaskStatus(), a = i.getTaskPreStatus();
                        if (n !== s.DownloadKernel.TaskStatus.StartWaiting && n !== s.DownloadKernel.TaskStatus.StartPending || a !== s.DownloadKernel.TaskStatus.StandBy) {
                            if (n === s.DownloadKernel.TaskStatus.Succeeded || n === s.DownloadKernel.TaskStatus.Seeding) {
                                let e = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId),
                                    t = this.taskSpeedMap.get(e);
                                if (t) {
                                    let n = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                                        o = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadingPeriod);
                                    o < 1 && (o = 1), t.aveSpeed = Math.round(n / o), this.checkTaskSpeedInfo(e, t)
                                }
                            } else if (n === s.DownloadKernel.TaskStatus.DestroyPending) {
                                let e = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId),
                                    t = o.join(this.dataPath, "TaskInfoEx_" + e + ".txt");
                                h.information("destroy task taskId:", e, ", taskinfo file:", t), r.FileSystemAWNS.unlinkAW(t).catch(), this.taskSpeedMap.delete(e)
                            }
                        } else {
                            let e = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId),
                                t = this.taskSpeedMap.get(e);
                            t && (t.speedInfoMap = {}, this.taskSpeedMap.set(e, t), this.saveTaskSpeedInfo(e).catch(e => {
                                h.warning(e)
                            }))
                        }
                    }
                } while (0)
            }

            updateProgress(e, t, i, o, a) {
                return n(this, void 0, void 0, function* () {
                    let n = this.taskSpeedMap.get(e);
                    n || (n = this.newTaskSpeedInfo(e)), n.aveSpeed = t, o > n.maxSpeed && (n.maxSpeed = o), n.progress = i;
                    let r = yield c.VipPluginFunctionNS.getVipSpeedColor(e),
                        s = {progress: i, downloadSpeed: o, addSpeed: a, vipSpeedColor: r}, l = Math.floor(i);
                    100 === l && n.speedInfoMap[l] || (n.speedInfoMap[l] = s, this.taskSpeedMap.set(e, n), yield this.saveTaskSpeedInfo(e))
                })
            }

            newTaskSpeedInfo(e) {
                let t = {};
                return t.taskId = e, t.aveSpeed = 0, t.maxSpeed = 0, t.progress = 0, t.speedInfoMap = {}, t
            }

            loadTaskSpeedInfo(e) {
                return n(this, void 0, void 0, function* () {
                    let t = !1, i = "TaskInfoEx_" + e.toString() + ".txt", n = o.join(this.dataPath, i);
                    if (yield r.FileSystemAWNS.existsAW(n)) {
                        let i = yield r.FileSystemAWNS.readFileAW(n);
                        if (i) {
                            let n = null;
                            try {
                                n = JSON.parse(i.toString())
                            } catch (e) {
                                h.warning(e)
                            }
                            null !== n && (this.taskSpeedMap.set(e, n), t = !0)
                        }
                    }
                    return t
                })
            }

            checkTaskSpeedInfo(e, t) {
                let i = p.getTaskFromTaskId(e);
                if (!i) return;
                let n = i.getTaskStatus(), o = !1;
                if (u.isNumber(t.aveSpeed) || (h.warning("checkTaskSpeedInfo bad aveSpeed", ", taskId: ", e), t.aveSpeed = 0, o = !0), u.isNumber(t.maxSpeed) || (h.warning("checkTaskSpeedInfo bad maxSpeed", ", taskId: ", e), t.maxSpeed = 0, o = !0), t.aveSpeed > t.maxSpeed && (h.warning("checkTaskSpeedInfo aveSpeed > maxSpeed", ", taskId: ", e), t.aveSpeed = t.maxSpeed, o = !0), n === s.DownloadKernel.TaskStatus.Succeeded || n === s.DownloadKernel.TaskStatus.Seeding) {
                    h.information("checkTaskSpeedInfo check complete data");
                    let n = t.speedInfoMap[100], a = t.speedInfoMap[0];
                    if (!(u.isObject(n) && u.isObject(a) || 0 !== t.aveSpeed)) {
                        let n = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadSize),
                            a = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.DownloadingPeriod);
                        a < 1 && (a = 1), t.aveSpeed = Math.round(n / a), h.information("checkTaskSpeedInfo recalc aveSpeed:", t.aveSpeed, ", taskId: ", e), o = !0
                    }
                }
                o && this.saveTaskSpeedInfo(e).catch()
            }

            saveTaskSpeedInfo(e) {
                return n(this, void 0, void 0, function* () {
                    let t = !1, i = this.taskSpeedMap.get(e);
                    if (i) {
                        let n = JSON.stringify(i), a = "TaskInfoEx_" + e.toString() + ".txt",
                            s = o.join(this.dataPath, a);
                        t = yield r.FileSystemAWNS.writeFileAW(s, n)
                    }
                    return t
                })
            }
        };
        e.init = function () {
            return n(this, void 0, void 0, function* () {
                yield t.init()
            })
        }, e.getTaskSpeedInfo = function (e) {
            return n(this, void 0, void 0, function* () {
                return yield t.getTaskSpeedInfo(e)
            })
        }
    }(t.HistoryTaskSpeedInfoNS || (t.HistoryTaskSpeedInfoNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(12), r = i(0), s = i(13), l = i(4), d = i(11), u = i(34), c = i(22), h = i(30), f = i(48),
        p = i(143), g = i(5), m = i(8), v = i(521), y = i(16), T = r.default.getLogger("Thunder.TaskOperator"),
        w = d.DownloadKernelTaskManager.getTaskManager(), k = p.SubtitleManagerNS.getSubtitleManger(),
        C = y.DownloadKernelEventManager.getEventManager();
    t.TaskOperate = class {
        static operateTaskActions(e, t, i) {
            return n(this, void 0, void 0, function* () {
                switch (t) {
                    case"play":
                        this.playTask(e, i);
                        break;
                    case"playfromPreview":
                        this.playFromPreview(e, i).catch();
                        break;
                    case"downAndPlay":
                        this.downloadAndPlayTask(e, i);
                        break;
                    case"dlnaPlay":
                        this.downloadAndPlayTask(e, i, !0);
                        break;
                    case"openFolder":
                        this.openFolder(e);
                        break;
                    case"open":
                        this.open(e, i);
                        break;
                    case"continue":
                        yield this.startTask(e);
                        break;
                    case"pause":
                        this.stopTask(e);
                        break;
                    case"restore":
                        this.restoreTask(e);
                        break;
                    case"delete":
                        this.deleteTask(e);
                        break;
                    case"note":
                        this.noteTask(e, i);
                        break;
                    case"downloadSelectFiles":
                        yield this.downloadSelectFiles(e, i);
                        break;
                    case"showHomePage":
                        this.showHomePage(e);
                        break;
                    case"install":
                        this.installFile(e, i);
                        break;
                    case"subtitleDownload":
                        this.openSubtitleDlg(e);
                        break;
                    case"repost":
                        this.createBirdKey(e);
                        break;
                    case"mountiso":
                        this.attachVirtualDisk(e).catch();
                        break;
                    case"ejectiso":
                        this.detachVirtualDisk(e).catch()
                }
            })
        }

        static getTaskBirdKeyData(e) {
            return u.TaskOperatorNs.getTaskBirdKeyData(e)
        }

        static playTask(e, t) {
            let i = w.getTaskFromTaskId(e);
            if (i) {
                if (g.isString(t)) try {
                    t = JSON.parse(t)
                } catch (e) {
                    T.warning(e)
                }
                if (null !== t && void 0 !== t && "object" == typeof t) {
                    let n = !0;
                    "finished" === t.panel && (n = !1);
                    let o = !0 === t.isZipPlay, a = "";
                    if (o && (n = !1, a = t.fileName), T.information("playTask extra", t, "isEmbed", n, "categoryId", t.categoryId), u.TaskOperatorNs.downloadAndPlay(e, t.fileIndex, void 0, t.panel, t.categoryId, !1, t.percent, !0, n, t.playFrom || "", t.showBackIcon, o, a).catch(), !g.isNullOrUndefined(t.fileIndex)) {
                        let e = i.getType();
                        if (e === l.DownloadKernel.TaskType.Bt) {
                            let e = i.getExtraObject().getBtFileByRealIndex(t.fileIndex);
                            e && e.setUserRead(1)
                        } else if (e === l.DownloadKernel.TaskType.Group) {
                            let e = i.getExtraObject().getSubTaskByIndex(t.fileIndex);
                            e && e.setUserRead(1)
                        }
                    }
                } else u.TaskOperatorNs.downloadAndPlay(e, void 0, void 0, void 0, void 0, void 0, void 0, !0, !0, t && t.playFrom ? t.playFrom : "").catch();
                i.setUserRead(1)
            }
        }

        static playFromPreview(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = w.getTaskFromTaskId(e);
                if (!i) return void T.information("错误的任务ID,taskid=", e);
                let n, o = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryViewId),
                    a = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryId);
                g.isString(t) ? n = JSON.parse(t) : g.isObject(t) && (n = t);
                let r = -1, s = i.getType();
                if (s === l.DownloadKernel.TaskType.Bt) {
                    let e = i.getExtraObject().getBtFileList();
                    for (let [t, i]of e) if (i.isSupportPlay()) {
                        r = t;
                        break
                    }
                } else s === l.DownloadKernel.TaskType.Emule || s === l.DownloadKernel.TaskType.P2sp ? r = 0 : T.warning("不支持播放");
                let d = 0;
                n && void 0 !== n.posPercent && (d = n.posPercent), n && (n.fileIndex = r, n.panel = o, n.categoryId = a, n.percent = d), T.information("播放预览视频: fileIndex=", r, " panel=", o, " categoryId=", a, " percent=", d), this.playTask(e, n)
            })
        }

        static downloadAndPlayTask(e, t, i) {
            if (w.getTaskFromTaskId(e)) {
                if (g.isString(t)) try {
                    t = JSON.parse(t)
                } catch (e) {
                    T.warning(e)
                }
                null !== t && void 0 !== t && "object" == typeof t ? u.TaskOperatorNs.downloadAndPlay(e, t.fileIndex, void 0, t.panel, t.categoryId, i, void 0, !0, !0, t.playFrom || "").catch() : u.TaskOperatorNs.downloadAndPlay(e, void 0, void 0, "downloading", void 0, i, void 0, !0, !0, t.playFrom || "").catch()
            }
        }

        static openFolder(e) {
            let t = w.getTaskFromTaskId(e);
            if (t) {
                let e = t.getTaskBaseInfo();
                u.TaskOperatorNs.markReadStatus([e], 1), u.TaskOperatorNs.openTaskFolder(e, !0).catch()
            }
        }

        static open(e, t) {
            let i = w.getTaskFromTaskId(e);
            if (i) {
                let e = i.getTaskBaseInfo(), n = -1;
                if (n = null === t || void 0 === t || "" === t ? -1 : Number(t), u.TaskOperatorNs.openTaskItem(e, n, void 0, void 0, void 0, !0).catch(), n >= 0) {
                    let e = i.getType();
                    if (e === l.DownloadKernel.TaskType.Bt) {
                        let e = i.getExtraObject().getBtFileByRealIndex(n);
                        e && e.setUserRead(1)
                    } else if (e === l.DownloadKernel.TaskType.Group) {
                        let e = i.getExtraObject().getSubTaskByIndex(n);
                        e && e.setUserRead(1)
                    }
                }
                i.setUserRead(1)
            }
        }

        static startTask(e) {
            return n(this, void 0, void 0, function* () {
                yield f.DownloadDispatchNS.startTask(e)
            })
        }

        static stopTask(e) {
            w.stopTask(e, l.DownloadKernel.TaskStopReason.Manual)
        }

        static restoreTask(e) {
            w.recoverFromRecycle(e)
        }

        static deleteTask(e) {
            let t = w.getTaskFromTaskId(e);
            if (t) {
                let e = t.getTaskBaseInfo();
                u.TaskOperatorNs.destroyTasks([e])
            }
        }

        static noteTask(e, t) {
            if (t) {
                let i = w.getTaskFromTaskId(e);
                i && i.setDescription(t)
            }
        }

        static downloadSelectFiles(e, t) {
            return n(this, void 0, void 0, function* () {
                (yield w.downloadTaskSelectFiles(e, t)) && (yield f.DownloadDispatchNS.startTask(e))
            })
        }

        static showHomePage(e) {
            h.default.fireEvent(s.NodeEventMesssageNS.eventShowHomePage, e)
        }

        static installFile(e, t) {
            if (null !== t && void 0 !== t && "" !== t) try {
                let i = JSON.parse(t), n = i.path, o = "";
                null !== i.runParams && void 0 !== i.runParams && "" !== i.runParams && (o = i.runParams);
                let a = w.getTaskFromTaskId(e);
                u.TaskOperatorNs.executeInstallFile(a, n, o).catch()
            } catch (e) {
            }
        }

        static openSubtitleDlg(e) {
            let t = w.getTaskFromTaskId(e);
            if (t) {
                let i = t.getTaskName(), n = t.getType(), a = "";
                t && (a = t.getSavePath()), n === l.DownloadKernel.TaskType.Bt && t.getExtraObject().getDownloadFile().length > 1 && (a = o.join(a, i));
                let r = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryViewId), s = k.getDisaplayName(e),
                    d = 0;
                (d = s.length) > 1 ? c.MessageBox.custom("SubtitleTaskFilelist", {
                    size: "large",
                    taskId: e,
                    taskName: i,
                    taskType: n,
                    fileList: s,
                    saveDir: a,
                    categoryViewId: r
                }, {center: !0, width: 500, height: 329}).catch() : c.MessageBox.custom("SubtitleSearch", {
                    taskId: e,
                    taskName: i,
                    cid: s[0].cid,
                    saveDir: a,
                    from: "taskList",
                    categoryViewId: r
                }, {center: !0, width: 500, height: 323}).catch()
            }
        }

        static createBirdKey(e) {
            u.TaskOperatorNs.createBirdKey(e)
        }

        static attachVirtualDisk(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    let t = w.getTaskFromTaskId(e);
                    if (!t) break;
                    let i = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName),
                        n = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath), r = o.join(n, i);
                    if (!(yield m.FileSystemAWNS.existsAW(r))) break;
                    let s = yield v.DiskImageHelperNS.attachVirtualDisk(r);
                    "" !== s && (yield(yield a.asyncRemoteCall.getShell()).showItemInFolder(s), C.fireTaskEvent(l.DownloadKernel.TaskEventType.DetailChanged, [t], l.DownloadKernel.TaskDetailChangedFlags.UnKnown))
                } while (0)
            })
        }

        static detachVirtualDisk(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    let t = w.getTaskFromTaskId(e);
                    if (!t) break;
                    let i = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName),
                        n = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath), a = o.join(n, i);
                    if (!(yield m.FileSystemAWNS.existsAW(a))) break;
                    (yield v.DiskImageHelperNS.detachVirtualDisk(a)) && C.fireTaskEvent(l.DownloadKernel.TaskEventType.DetailChanged, [t], l.DownloadKernel.TaskDetailChangedFlags.UnKnown)
                } while (0)
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(4), r = i(11), s = i(16), l = i(33), d = i(13), u = i(68), c = i(8), h = i(31), f = i(37),
        p = i(3), g = i(67), m = i(34), v = i(42), y = i(0), T = r.DownloadKernelTaskManager.getTaskManager(),
        w = s.DownloadKernelEventManager.getEventManager(), k = y.default.getLogger("XmpUnionNS");
    !function (e) {
        function t(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                let r = !1, l = 0;
                return !function (e) {
                    let t = !1;
                    do {
                        if (!e) break;
                        0 !== (e = e.toLowerCase()).indexOf("ed2k://") && 0 !== e.indexOf("http://") && 0 !== e.indexOf("https://") && 0 !== e.indexOf("ftp://") && 0 !== e.indexOf("thunder:") || (t = !0)
                    } while (0);
                    return t
                }(e) ? function (e) {
                    let t = !1;
                    do {
                        if (!e) break;
                        if (0 === (e = e.toLowerCase()).indexOf("magnet:?")) {
                            t = !0;
                            break
                        }
                    } while (0);
                    return t
                }(e) && (l = yield s(e)) : l = yield function (e, t, i) {
                    return n(this, void 0, void 0, function* () {
                        let n = 0;
                        do {
                            let o = yield p.client.callServerFunction("GetDownloadDir"), r = i;
                            r && "" !== r || (r = u.ParseUrlFileNameNS.getNameFromUrl(e));
                            let s = null, l = {savePath: o, taskName: r}, d = h.ThunderHelper.getTaskTypeFromUrl(e);
                            if (d === a.DownloadKernel.TaskType.P2sp) {
                                let i = {taskType: a.DownloadKernel.TaskType.P2sp, value: e},
                                    o = yield g.TaskUtilitiesAWNS.batchFindTaskAW([i]);
                                if (o && o[0]) {
                                    n = o[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                                    let e = o[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.RecycleTime);
                                    e > 0 && T.recoverFromRecycle(n);
                                    break
                                }
                                let r = {url: e, refUrl: t || "", downloadSubTask: 1};
                                yield y(), s = yield T.createTask(a.DownloadKernel.TaskType.P2sp, {
                                    taskBaseInfo: l,
                                    p2spTaskInfo: r
                                })
                            } else if (d === a.DownloadKernel.TaskType.Emule) {
                                let t = v.Common.parseEd2kUrl(e);
                                if (null !== t) {
                                    let e = {taskType: a.DownloadKernel.TaskType.Emule, value: t.fileHash},
                                        i = yield g.TaskUtilitiesAWNS.batchFindTaskAW([e]);
                                    if (i && i[0]) {
                                        n = i[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                                        let e = i[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.RecycleTime);
                                        e > 0 && T.recoverFromRecycle(n);
                                        break
                                    }
                                }
                                let i = {url: e, downloadSubTask: 1};
                                yield y(), s = yield T.createTask(a.DownloadKernel.TaskType.Emule, {
                                    taskBaseInfo: l,
                                    emuleTaskInfo: i
                                })
                            }
                            null !== s && (n = s.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId))
                        } while (0);
                        return n
                    })
                }(e, i, t), l && o && (r = yield m.TaskOperatorNs.downloadAndPlay(l)), r
            })
        }

        function i(e, i) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!e || !(yield c.FileSystemAWNS.existsAW(e))) break;
                    let n = yield c.FileSystemAWNS.readFileAW(e);
                    if (yield c.FileSystemAWNS.unlinkAW(e), null === n || void 0 === n || "" === n.toString()) {
                        k.information("parseUnionFileAndCreateTasks:读取内容 buf为null");
                        break
                    }
                    let o = n.toString(), a = (o += "\r\n").split("\r\n");
                    if (a.length <= 1) {
                        k.information("parseUnionFileAndCreateTasks:lines.length <= 1");
                        break
                    }
                    let r = new Map, s = new Map, l = new Map, d = [], u = [], h = [];
                    for (let e = 0; e < a.length; ++e) {
                        let t = a[e].split("=");
                        if (null !== t && 2 === t.length) {
                            let e = t[0].toLowerCase(), i = t[1];
                            if (null !== e && "" !== e) {
                                i = i.replace(/\+/g, "%20"), i = decodeURIComponent(i), k.information("parseUnionFileAndCreateTasks key, value:", e, i);
                                let t = e.match(/^tasks\[\d+\]/), n = "";
                                null !== t && void 0 !== t && (n = t[0]);
                                let o = /url/;
                                o.test(e) ? "" !== n ? r.set(n, i) : d.push(i) : (o = /referer/).test(e) ? "" !== n ? l.set(n, i) : h.push(i) : (o = /^tasks\[\d+\]\[name\]/).test(e) && ("" !== n ? s.set(n, i) : u.push(i))
                            }
                        }
                    }
                    k.information("parseUnionFileAndCreateTasks urlsInfo:", r);
                    let f = !1;
                    if (r.size > 0) for (let e of r) {
                        let n = e[0], o = e[1], a = void 0, r = l.get(n) || "";
                        null !== s && s.size > 0 && (a = s.get(n)), k.information("parseUnionFileAndCreateTasks name, url:", a, o), (f = yield t(o, a, r, !f && i)) && (i = !1)
                    }
                    if (k.information("parseUnionFileAndCreateTasks urllist:", d), d.length >= 1) for (let e = 0; e < d.length; ++e) k.information("parseUnionFileAndCreateTasks name, url:", u[e], d[e]), (f = yield t(d[e], u[e], h[e], !f && i)) && (i = !1)
                } while (0)
            })
        }

        function r(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = 0;
                do {
                    if (!e) break;
                    let n = yield g.TaskUtilitiesAWNS.parserBtFileInfoAW(e);
                    if (!n) break;
                    let o = {taskType: a.DownloadKernel.TaskType.Bt, value: n.infoId},
                        r = yield g.TaskUtilitiesAWNS.batchFindTaskAW([o]);
                    if (r && r[0]) {
                        i = r[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId), r[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.RecycleTime) > 0 && T.recoverFromRecycle(i);
                        break
                    }
                    let s = [];
                    for (let e = 0; e < n.fileLists.length; ++e) f.TaskUtilHelper.isVideoFileExt(n.fileLists[e].fileName) && s.push(n.fileLists[e].realIndex);
                    if (0 === s.length) break;
                    let l = n.trackerUrls.join("\n"), d = {
                        taskBaseInfo: {
                            savePath: yield p.client.callServerFunction("GetDownloadDir"),
                            taskName: t && "" !== t ? t : n.title
                        },
                        btTaskInfo: {
                            seedFile: e,
                            displayName: n.title,
                            fileRealIndexLists: s,
                            fileLists: n.fileLists,
                            infoId: n.infoId,
                            tracker: l
                        },
                        isBackground: !1
                    };
                    yield y();
                    let u = yield T.createTask(a.DownloadKernel.TaskType.Bt, d);
                    u && (i = u.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId))
                } while (0);
                return i
            })
        }

        function s(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = 0;
                {
                    let n = yield p.client.callServerFunction("GetDownloadDir"),
                        s = u.ParseUrlFileNameNS.parseMagnetUrl(e) + ".torrent", l = o.join(n, s), d = {
                            taskBaseInfo: {taskName: s, savePath: n},
                            magnetTaskInfo: {url: e, torrentFilePath: l},
                            isBackground: !0
                        };
                    yield y();
                    let h = yield T.createTask(a.DownloadKernel.TaskType.Magnet, d);
                    if (null !== h) {
                        let e = h.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                        yield T.startTask(e), yield C(e, t)
                    }
                    (yield c.FileSystemAWNS.existsAW(l)) && (i = yield r(e, name))
                }
                return i
            })
        }

        function y() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    T.isLoadStorageTaskFinish() ? e() : l.DownloadKernelManager.attachListener(d.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, () => {
                        e()
                    })
                })
            })
        }

        function C(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = 0, n = !1;
                return new Promise(o => {
                    y().then(() => {
                        i = w.attachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, (...t) => {
                            do {
                                if (!t) break;
                                if (t[0] !== a.DownloadKernel.TaskEventType.StatusChanged) break;
                                if (!t[1]) break;
                                let r = t[1];
                                for (let t = 0; t < r.length; ++t) {
                                    let s = r[t];
                                    if (!s) continue;
                                    let l = s.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                                    if (e === l) {
                                        s.getTaskStatus() === a.DownloadKernel.TaskStatus.Succeeded && (w.detachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, i), n || (n = !0, o(!0)));
                                        break
                                    }
                                }
                            } while (0)
                        })
                    }).catch(), t && setTimeout(() => {
                        n || (n = !0, o(!1))
                    }, t)
                })
            })
        }

        e.createUnionPlayTasks = function (e, t) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!e) break;
                    let n = e.indexOf("unionfile:");
                    n > -1 && (e = e.substring(n + 10)), yield i(decodeURIComponent(e), t)
                } while (0)
            })
        }, e.createDowndAndPlayTask = t
    }(t.DownloadAndPlayUnionNS || (t.DownloadAndPlayUnionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(7), a = i(2), r = i(0), s = i(3), l = i(8),
        d = o.default(a.resolve(__rootDir, "../bin/ThunderHelper.node")),
        u = r.default.getLogger("Browser.Config.Helper");
    var c;
    !function (e) {
        e[e.Unknown = 0] = "Unknown", e[e.Working = 1] = "Working", e[e.Uninstall = 2] = "Uninstall"
    }(c = t.AddonState || (t.AddonState = {}));
    !function (e) {
        const t = new class {
            constructor() {
                this.browserNames = ["360se", "chrome", "msedge", "QQBrowser", "360chrome"], this.showMoreSupport = !1, this.browserList = [], this.crxPath = "", this.xunleiKey = "ncennffkjdiamlpmcbajkmaiiiddgioo", this.msedeXunleiKey = "popomkonnjgcdagdhgcpcekbdeoibglc", this.title = "360安全浏览器"
            }

            getInstallBrowserInfo(e) {
                return n(this, void 0, void 0, function* () {
                    return yield s.client.callServerFunction("GetInstallBrowserInfo", e)
                })
            }

            is360AddonsInstalled(e) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    return e = a.join(e, this.xunleiKey), t = yield l.FileSystemAWNS.existsAW(e), u.information("is360AddonsInstalled ret", t, "addnPath", e), t
                })
            }

            resetSecurePreferencesSetting(e, t) {
                return n(this, void 0, void 0, function* () {
                    do {
                        let i = yield l.FileSystemAWNS.readFileAW(e), n = "", o = null;
                        i && i.length > 0 && (n = i.toString());
                        try {
                            o = JSON.parse(n)
                        } catch (e) {
                        }
                        if (!o) break;
                        if (!o.extensions) break;
                        if (!o.extensions.settings) break;
                        let a = !1, r = o.extensions.settings[this.xunleiKey];
                        if (r || "msedge" !== t || (r = o.extensions.settings[this.msedeXunleiKey], a = !0), !r) break;
                        if (r.state === c.Working) break;
                        a ? (o.extensions.settings[this.msedeXunleiKey].state = 1, delete o.extensions.settings[this.msedeXunleiKey].disable_reasons) : (o.extensions.settings[this.xunleiKey].state = 1, delete o.extensions.settings[this.xunleiKey].disable_reasons), yield l.FileSystemAWNS.writeFileAW(e, JSON.stringify(o))
                    } while (0)
                })
            }

            getAddonsState(e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = c.Unknown;
                    do {
                        let n = yield l.FileSystemAWNS.readFileAW(e), o = "", a = null;
                        n && n.length > 0 && (o = n.toString());
                        try {
                            a = JSON.parse(o)
                        } catch (e) {
                        }
                        if (!a) break;
                        if (!a.extensions) break;
                        if (!a.extensions.settings) break;
                        let r = a.extensions.settings[this.xunleiKey];
                        r || "msedge" !== t || (r = a.extensions.settings[this.msedeXunleiKey]), r && (i = r.state)
                    } while (0);
                    return i
                })
            }

            isAddonsOpened(e, t) {
                return n(this, void 0, void 0, function* () {
                    return (yield this.getAddonsState(e, t)) === c.Working
                })
            }

            isEdgeAndChromeAddonsInstalled(e, t) {
                return n(this, void 0, void 0, function* () {
                    let i = !1, n = "", o = yield l.FileSystemAWNS.readFileAW(e);
                    if (o && o.length > 0) try {
                        n = o.toString()
                    } catch (e) {
                        return u.warning(e), i
                    }
                    return -1 !== n.indexOf(this.xunleiKey) ? i = !0 : "msedge" === t && -1 !== n.indexOf(this.msedeXunleiKey) && (i = !0), u.information("isEdgeAndChromeAddonsInstalled ret", i, "path", e), i
                })
            }

            getBrowserPath(e, t) {
                let i = "";
                if (t) {
                    (i = d.queryRegValue(t.reg.regRoot, t.reg.regKey, t.reg.regName)) || ("chrome" === e && (i = d.queryRegValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome", "DisplayIcon")), "msedge" === e && (i = d.queryRegValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\msedge.exe", "")));
                    let n = i.indexOf(",");
                    -1 !== n && (i = i.slice(0, n)), i = d.getLongPathName(i), d.queryFileExists(i) || (i = "")
                }
                return i
            }

            findProcessAw(e) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(t => {
                        d.asyncFindProcess(e, e => {
                            let i = e && e.length > 0;
                            t(i)
                        })
                    })
                })
            }

            getDefaultBrowserPath() {
                return d.getDefaultBrowserPath()
            }

            getCanShowIcon() {
                return n(this, void 0, void 0, function* () {
                    let e = !0;
                    do {
                        if (yield this.getInstallBrowserInfo("360安全浏览器")) break;
                        if (yield this.getInstallBrowserInfo("360极速浏览器")) break;
                        if (yield this.getInstallBrowserInfo("QQ浏览器")) break;
                        if (yield this.getInstallBrowserInfo("Edge浏览器")) break;
                        if (yield this.getInstallBrowserInfo("Chrome")) break;
                        e = !1
                    } while (0);
                    return e
                })
            }

            getShowTipInfo(e) {
                return n(this, void 0, void 0, function* () {
                    let t = {}, i = this.getDefaultBrowserPath().split("\\"), n = "";
                    i && i.length > 0 && (n = i[i.length - 1]);
                    let o = a.basename(n, ".exe"),
                        r = {icon: "", name: "", default: !1, install: !1, open: !1, exeName: ""};
                    if (-1 === this.browserNames.indexOf(o)) for (let i of this.browserNames) {
                        let n = e.get(i);
                        if (n && n.browserExist) {
                            n.browserAddonInstall && n.browserAddonOpen || (t.browserInfo = n, t.title = n.browserTitle, t.show = !0);
                            break
                        }
                    } else {
                        let i = e.get(o);
                        if (i) {
                            let e = i.browserAddonInstall;
                            r = {
                                icon: i.icon,
                                name: i.browserTitle,
                                default: !0,
                                install: i.browserAddonInstall,
                                open: i.browserAddonOpen,
                                exeName: o
                            }, this.browserList.push(r), !i.browserExist || i.browserAddonInstall && i.browserAddonOpen || (t.browserInfo = i, t.title = i.browserTitle, t.show = !0), u.information("installed", e)
                        } else t = null
                    }
                    return t
                })
            }

            getInfos(e = !1) {
                return n(this, void 0, void 0, function* () {
                    let t = new Map, i = this.getDefaultBrowserPath().split("\\"), n = "";
                    i && i.length > 0 && (n = i[i.length - 1]);
                    let o = d.getInstallDir();
                    this.crxPath = a.join(o, "../BHO/xl_ext_chrome.crx"), u.information("installDir", o);
                    let r = yield this.getInstallBrowserInfo("360安全浏览器"),
                        s = yield this.getInstallBrowserInfo("360极速浏览器"), l = yield this.getInstallBrowserInfo("QQ浏览器"),
                        c = yield this.getInstallBrowserInfo("Edge浏览器"), h = yield this.getInstallBrowserInfo("Chrome"),
                        f = d.getEdgeAddonsPath(), p = yield this.isEdgeAndChromeAddonsInstalled(f, "msedge"),
                        g = yield this.isAddonsOpened(f, "msedge"), m = d.getChromeAddonsPath(),
                        v = yield this.isEdgeAndChromeAddonsInstalled(m, "chrome"),
                        y = yield this.isAddonsOpened(m, "chrome"), T = d.getAppDataLocalPath(),
                        w = "https://ext.se.360.cn/webstore/detail/ncennffkjdiamlpmcbajkmaiiiddgioo",
                        k = "--https://e://extensions/", C = this.getBrowserPath("360se", r),
                        b = a.join(C, "../../User Data/Default/Extensions"), I = yield this.is360AddonsInstalled(b),
                        S = a.join(b, "../Preferences"), _ = yield this.isAddonsOpened(S, "360se"),
                        D = null !== r && "" !== C, A = {
                            browserData: r,
                            browserExist: D,
                            browserPath: C,
                            browserAddonPath: b,
                            browserAddonInstall: I,
                            installCmdLine: w,
                            openCmdLine: k,
                            browserTitle: "360安全浏览器",
                            icon: "xly-img-icon-360",
                            browserAddonOpen: _,
                            browserAddonConfigPath: S
                        };
                    t.set("360se", A), w = "https://chrome.google.com/webstore/detail/%E8%BF%85%E9%9B%B7%E4%B8%8B%E8%BD%BD%E6%94%AF%E6%8C%81/ncennffkjdiamlpmcbajkmaiiiddgioo?hl=zh-CN", k = "https://chrome.google.com/webstore/detail/%E8%BF%85%E9%9B%B7%E4%B8%8B%E8%BD%BD%E6%94%AF%E6%8C%81/ncennffkjdiamlpmcbajkmaiiiddgioo?hl=zh-CN", C = this.getBrowserPath("chrome", h), A = {
                        browserData: h,
                        browserExist: D = null !== h && "" !== C,
                        browserPath: C,
                        browserAddonPath: m,
                        browserAddonInstall: v,
                        installCmdLine: w,
                        openCmdLine: k,
                        browserTitle: "Chrome浏览器",
                        icon: "xly-img-icon-chrome",
                        browserAddonOpen: y,
                        browserAddonConfigPath: m
                    }, e ? t.set("chrome", A) : v && t.set("chrome", A), C = this.getBrowserPath("msedge", c), k = w = "https://microsoftedge.microsoft.com/addons/detail/%E8%BF%85%E9%9B%B7%E4%B8%8B%E8%BD%BD%E6%94%AF%E6%8C%81/popomkonnjgcdagdhgcpcekbdeoibglc?hl=zh-CN", A = {
                        browserData: c,
                        browserExist: D = null !== c && "" !== C,
                        browserPath: C,
                        browserAddonPath: f,
                        browserAddonInstall: p,
                        installCmdLine: w,
                        openCmdLine: k,
                        browserTitle: "Edge浏览器",
                        icon: "xly-img-icon-edge",
                        browserAddonOpen: g,
                        browserAddonConfigPath: f
                    }, t.set("msedge", A), w = "https://chrome.google.com/webstore/detail/%E8%BF%85%E9%9B%B7%E4%B8%8B%E8%BD%BD%E6%94%AF%E6%8C%81/ncennffkjdiamlpmcbajkmaiiiddgioo?hl=zh-CN", k = "qqbrowser://extensions/manage", C = this.getBrowserPath("QQBrowser", l);
                    let N = a.join(T, "Tencent/QQBrowser/User Data/Default/Preferences"),
                        x = yield this.isAddonsOpened(N, "QQBrowser"), E = d.getQQAddonsPath(),
                        O = yield this.is360AddonsInstalled(E);
                    A = {
                        browserData: l,
                        browserExist: D = null !== l && "" !== C,
                        browserPath: C,
                        browserAddonPath: E,
                        browserAddonInstall: O,
                        installCmdLine: w,
                        openCmdLine: k,
                        browserTitle: "QQ浏览器",
                        icon: "xly-img-icon-qq",
                        browserAddonOpen: x,
                        browserAddonConfigPath: E
                    }, e ? t.set("QQBrowser", A) : O && t.set("QQBrowser", A), k = w = '"' + this.crxPath + '"', C = this.getBrowserPath("360chrome", s);
                    let P = a.join(C, "../../User Data/Default/Extensions"), M = yield this.is360AddonsInstalled(P),
                        F = a.join(P, "../Preferences"), L = yield this.isAddonsOpened(F, "360chrome");
                    A = {
                        browserData: s,
                        browserExist: D = null !== s && "" !== C,
                        browserPath: C,
                        browserAddonPath: P,
                        browserAddonInstall: M,
                        installCmdLine: w,
                        openCmdLine: k,
                        browserTitle: "360极速浏览器",
                        icon: "xly-img-icon-360js",
                        browserAddonOpen: L,
                        browserAddonConfigPath: F
                    }, t.set("360chrome", A), u.information("browserInfos", t);
                    let R = a.basename(n, ".exe"),
                        B = {icon: "", name: "", default: !1, install: !1, open: !1, exeName: ""};
                    if (-1 === this.browserNames.indexOf(R)) for (let e of this.browserNames) {
                        let i = t.get(e);
                        if (i && i.browserExist) break
                    } else {
                        let e = t.get(R);
                        if (e) {
                            let t = e.browserAddonInstall;
                            B = {
                                icon: e.icon,
                                name: e.browserTitle,
                                default: !0,
                                install: e.browserAddonOpen,
                                open: e.browserAddonInstall,
                                exeName: R
                            }, this.browserList.push(B), B = {
                                icon: e.icon,
                                name: e.browserTitle,
                                default: !0,
                                install: e.browserAddonInstall,
                                open: e.browserAddonOpen,
                                exeName: R
                            }, this.browserList.push(B), e.browserExist = !0, e.browserPath = this.getDefaultBrowserPath(), u.information("installed", t)
                        }
                    }
                    return t.forEach((e, t) => {
                        (!this.browserList || this.browserList.length < 1 || t !== this.browserList[0].exeName) && (B = {
                            icon: e.icon,
                            name: e.browserTitle,
                            default: !1,
                            install: e.browserAddonInstall,
                            open: e.browserAddonOpen,
                            exeName: t
                        }, this.browserList.push(B))
                    }), t
                })
            }

            reset360seAddon() {
                return n(this, void 0, void 0, function* () {
                    let e = !1;
                    do {
                        let t = "360se.exe";
                        if (yield this.findProcessAw(t)) {
                            u.information("reset 360se is running");
                            break
                        }
                        let i = yield this.getInstallBrowserInfo("360安全浏览器"), n = this.getBrowserPath("360se", i),
                            o = a.join(n, "../../User Data/Default/Extensions");
                        if (!(yield this.is360AddonsInstalled(o))) {
                            u.information("reset 306se addon not install");
                            break
                        }
                        let r = a.join(o, "../Preferences"), s = yield this.getAddonsState(r, "360se");
                        if (s === c.Working) {
                            u.information("reset 360se already working");
                            break
                        }
                        if (s === c.Uninstall) {
                            u.information("reset 360se but addon uninstall");
                            break
                        }
                        yield this.resetSecurePreferencesSetting(r, "360se"), e = !0
                    } while (0);
                    return e
                })
            }

            resetChromeAddon() {
                return n(this, void 0, void 0, function* () {
                    let e = !1;
                    do {
                        let t = "chrome.exe";
                        if (yield this.findProcessAw(t)) {
                            u.information("reset chrome is running");
                            break
                        }
                        let i = d.getChromeAddonsPath();
                        if (!(yield this.isEdgeAndChromeAddonsInstalled(i, "chrome"))) {
                            u.information("reset chrome addon not install");
                            break
                        }
                        let n = yield this.getAddonsState(i, "chrome");
                        if (n === c.Working) {
                            u.information("reset chrome already working");
                            break
                        }
                        if (n === c.Uninstall) {
                            u.information("reset chrome but addon uninstall");
                            break
                        }
                        yield this.resetSecurePreferencesSetting(i, "chrome"), e = !0
                    } while (0);
                    return e
                })
            }

            resetAddons() {
                return n(this, void 0, void 0, function* () {
                    do {
                        let e = "securePreferencesSetting";
                        if ("true" === localStorage.getItem(e)) {
                            u.information("reset done once");
                            break
                        }
                        let t = yield this.resetChromeAddon(), i = yield this.reset360seAddon();
                        u.information("reset chrome", t), u.information("reset 360se", i), (t || i) && localStorage.setItem(e, "true")
                    } while (0)
                })
            }
        };
        e.getInfos = function (e = !1) {
            return n(this, void 0, void 0, function* () {
                return t.getInfos(e)
            })
        }, e.getDefaultBrowserPath = function () {
            return t.getDefaultBrowserPath()
        }, e.getShowTipInfo = function (e = !1) {
            return n(this, void 0, void 0, function* () {
                let i = yield t.getInfos(e);
                return t.getShowTipInfo(i)
            })
        }, e.getCanShowIcon = function () {
            return n(this, void 0, void 0, function* () {
                return t.getCanShowIcon()
            })
        }, e.resetAddons = function () {
            return n(this, void 0, void 0, function* () {
                return t.resetAddons()
            })
        }
    }(t.BrowserHelperNs || (t.BrowserHelperNs = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(524), a = i(659), r = i(145), s = i(660), l = i(526), d = i(662), u = i(112), c = i(27), h = i(0),
        f = i(5), p = h.default.getLogger("EmbeddedBrowserManagerNs");
    let g = [], m = 0, v = [];
    !function (e) {
        function t(e, ...t) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (null === e || void 0 === e || "" === e) {
                        p.information("createWebWnd 参数错误：webType=", e);
                        break
                    }
                    let i = t[0];
                    if (null === i || void 0 === i || "" === i) {
                        p.information("createWebWnd 参数错误：url=", i);
                        break
                    }
                    let n = t[1];
                    null !== n && void 0 !== n || (n = "");
                    let o = t[2];
                    null !== o && void 0 !== o || (o = !0);
                    let a = e, r = t[3];
                    if (null === r || void 0 === r || r <= 0) {
                        p.information("createWebWnd 参数错误：wndWidth=", r);
                        break
                    }
                    let s = t[4];
                    if (null === s || void 0 === s || s <= 0) {
                        p.information("createWebWnd 参数错误：wndHeight=", s);
                        break
                    }
                    let l = t[5];
                    if (null === l || void 0 === l) {
                        p.information("createWebWnd 参数错误：browserLeftMargin=", l);
                        break
                    }
                    let d = t[6];
                    if (null === d || void 0 === d) {
                        p.information("createWebWnd 参数错误：browserRightMargin=", d);
                        break
                    }
                    let c = t[7];
                    if (null === c || void 0 === c) {
                        p.information("createWebWnd 参数错误：browserTopMargin=", c);
                        break
                    }
                    let h = t[8];
                    if (null === h || void 0 === h) {
                        p.information("createWebWnd 参数错误：browserBootomMargin=", h);
                        break
                    }
                    let f = g.filter(t => e === t.moduleName), m = null;
                    if (!(null === f || void 0 === f || f.length <= 0)) {
                        m = f[0].embeddedBrowserObj;
                        break
                    }
                    {
                        m = new u.EmbeddedBrowser;
                        let t = {moduleName: e, embeddedBrowserObj: m};
                        g.push(t)
                    }
                    let v = t[9], y = t[10], T = t[11], w = t[12];
                    w && m.setBrowserEventHandler(w), yield m.createWnd(i, n, o, a, r, s, l, d, c, h, v, y, T, () => {
                        for (let t in g) if (g[Number(t)].moduleName === e) {
                            g.splice(Number(t), 1);
                            break
                        }
                    })
                } while (0)
            })
        }

        function i(...e) {
            return n(this, void 0, void 0, function* () {
                let t = "Thunder-Independent-Web-Window" + String(++m);
                do {
                    let i = e[0];
                    if (null === i || void 0 === i || "" === i) {
                        p.information("create Independent WebWnd 参数错误：url=", i);
                        break
                    }
                    let n = e[1];
                    null !== n && void 0 !== n || (n = "");
                    let o = e[2];
                    null !== o && void 0 !== o || (o = !0);
                    let a = t, r = e[3];
                    if (null === r || void 0 === r || r <= 0) {
                        p.information("create Independent WebWnd  参数错误：wndWidth=", r);
                        break
                    }
                    let s = e[4];
                    if (null === s || void 0 === s || s <= 0) {
                        p.information("create Independent WebWnd  参数错误：wndHeight=", s);
                        break
                    }
                    let l = e[5];
                    if (null === l || void 0 === l) {
                        p.information("create Independent WebWnd  参数错误：browserLeftMargin=", l);
                        break
                    }
                    let d = e[6];
                    if (null === d || void 0 === d) {
                        p.information("create Independent WebWnd  参数错误：browserRightMargin=", d);
                        break
                    }
                    let c = e[7];
                    if (null === c || void 0 === c) {
                        p.information("create Independent WebWnd  参数错误：browserTopMargin=", c);
                        break
                    }
                    let f = e[8];
                    if (null === f || void 0 === f) {
                        p.information("create Independent WebWnd  参数错误：browserBootomMargin=", f);
                        break
                    }
                    let m = g.filter(e => t === e.moduleName), T = null;
                    if (!(null === m || void 0 === m || m.length <= 0)) {
                        T = m[0].embeddedBrowserObj;
                        break
                    }
                    {
                        T = new u.EmbeddedBrowser;
                        let e = {moduleName: t, embeddedBrowserObj: T};
                        g.push(e)
                    }
                    v = e;
                    let w = [{functionName: "CreateIndependentWebWnd", nativeFunc: h}], k = e[10], C = e[11];
                    T.setBrowserEventHandler(y);
                    let b = void 0 !== e[13] && !!e[13], I = void 0 === e[14] || !!e[14],
                        S = void 0 === e[17] || !!e[17], _ = void 0 === e[18] || !!e[18],
                        D = void 0 === e[19] ? "迅雷" : e[19];
                    yield T.createWnd(i, n, o, a, r, s, l, d, c, f, w, k, C, () => {
                        for (let e in g) if (g[Number(e)].moduleName === t) {
                            g.splice(Number(e), 1);
                            break
                        }
                    }, b, I, void 0, void 0, S, _, D)
                } while (0);
                return t
            })
        }

        function h(e, t, o, a) {
            return n(this, void 0, void 0, function* () {
                p.information(t, o, a);
                do {
                    if (f.isNullOrUndefined(e) || f.isNullOrUndefined(t) || f.isNullOrUndefined(o)) break;
                    if (f.isNullOrUndefined(a) || f.isNullOrUndefined(a[0])) {
                        e.callNativeFunctionCallback(t, o, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    yield i(...a), e.callNativeFunctionCallback(t, o, c.NativeFunctionErrorCode.Success)
                } while (0)
            })
        }

        function y(e, ...t) {
            p.information("defaultbrowserEventHandler: ", e, ...t);
            let n = !1;
            do {
                if ("OnNewBrowserPopup" === e) {
                    let e = t[0];
                    if (!e) break;
                    v[0] = e, i(...v).catch(), n = !0
                }
            } while (0);
            return n
        }

        e.enableSignAutoShow = function (e) {
            o.signObject.enableAutoShow(e)
        }, e.showWebWnd = function (e, ...i) {
            return n(this, void 0, void 0, function* () {
                if ("sign" === e) {
                    let e = "";
                    null !== i && void 0 !== i && null !== i[0] && void 0 !== i[0] && (e = i[0]), l.newsPopupObject.close(), yield o.signObject.createSignDlg(e, a.signNative.getNativeFunctionMap())
                } else if ("newsPopup" === e) {
                    let e = "";
                    null !== i && void 0 !== i && null !== i[0] && void 0 !== i[0] && (e = i[0]), f.isNullOrUndefined(o.signObject.getWnd()) && (yield l.newsPopupObject.createNewsPopupDlg(e, d.newsPopupNative.getNativeFunctionMap()))
                } else if ("phoneAuth" === e) {
                    let e = "";
                    null !== i && void 0 !== i && null !== i[0] && void 0 !== i[0] && (e = i[0]), yield r.phoneAuthObject.createPhoneAuthDlg(e, s.phoneAuthNative.getNativeFunctionMap())
                } else yield t(e, ...i)
            })
        }, e.createWebWnd = t, e.createIndependentWebWnd = i, e.createWebWndEx = function (e) {
            return n(this, void 0, void 0, function* () {
                do {
                    let t = e.business;
                    if (null === t || void 0 === t || "" === t) {
                        p.information("createWebWnd 参数错误：webType=", t);
                        break
                    }
                    let i = e.url;
                    if (null === i || void 0 === i || "" === i) {
                        p.information("createWebWnd 参数错误：url=", i);
                        break
                    }
                    let n = e.title;
                    null !== n && void 0 !== n || (n = "");
                    let o = e.isModal;
                    null !== o && void 0 !== o || (o = !0);
                    let a = t, r = e.width;
                    if (null === r || void 0 === r || r <= 0) {
                        p.information("createWebWnd 参数错误：wndWidth=", r);
                        break
                    }
                    let s = e.height;
                    if (null === s || void 0 === s || s <= 0) {
                        p.information("createWebWnd 参数错误：wndHeight=", s);
                        break
                    }
                    let l = e.leftMargin;
                    if (null === l || void 0 === l) {
                        p.information("createWebWnd 参数错误：browserLeftMargin=", l);
                        break
                    }
                    let d = e.rightMargin;
                    if (null === d || void 0 === d) {
                        p.information("createWebWnd 参数错误：browserRightMargin=", d);
                        break
                    }
                    let c = e.topMargin;
                    if (null === c || void 0 === c) {
                        p.information("createWebWnd 参数错误：browserTopMargin=", c);
                        break
                    }
                    let h = e.bottomMargin;
                    if (null === h || void 0 === h) {
                        p.information("createWebWnd 参数错误：browserBootomMargin=", h);
                        break
                    }
                    let f = g.filter(e => t === e.moduleName), m = null;
                    if (!(null === f || void 0 === f || f.length <= 0)) {
                        m = f[0].embeddedBrowserObj;
                        break
                    }
                    {
                        m = new u.EmbeddedBrowser;
                        let e = {moduleName: t, embeddedBrowserObj: m};
                        g.push(e)
                    }
                    let v = e.mapNative, y = e.onShowCallback, T = e.onCloseCallback, w = e.onBrowserEvent;
                    w && m.setBrowserEventHandler(w), void 0 !== e.autoShow && m.setAutoShow(e.autoShow), void 0 !== e.autoCloseAtError && m.setAutoCloseAtError(e.autoCloseAtError), e.isTopLevel && m.setWindowTopLevel(!0), e.isToolWindow && (m.setToolWindow(!0), e.minimizable && (e.minimizable = !1)), yield m.createWnd(i, n, o, a, r, s, l, d, c, h, v, y, T, () => {
                        for (let e in g) if (g[Number(e)].moduleName === t) {
                            g.splice(Number(e), 1);
                            break
                        }
                    }, e.alwaysOnTop, e.minimizable, e.menuOptions, e.nativeOptions)
                } while (0)
            })
        }, e.closeWebWnd = function (e) {
            do {
                if (null === e || void 0 === e || "" === e) {
                    p.information("closeWebWnd 参数错误：webType=", e);
                    break
                }
                let t = g.filter(t => e === t.moduleName), i = null;
                if (null === t || void 0 === t || t.length <= 0) break;
                (i = t[0].embeddedBrowserObj).closeWnd().catch()
            } while (0)
        }, e.existWebWnd = function (e) {
            let t = !1;
            do {
                if (!e) break;
                let i = g.filter(t => e === t.moduleName);
                if (!i || i.length <= 0) break;
                t = !0
            } while (0);
            return t
        }, e.visibleWebWnd = function (e, t, i) {
            let n = !1;
            do {
                if (!e) break;
                let o = g.filter(t => e === t.moduleName);
                if (!o || o.length <= 0) break;
                let a = o[0].embeddedBrowserObj;
                !1 === i ? a.hideWnd().catch() : a.showWnd(t).catch(), n = !0
            } while (0);
            return n
        }, e.bringWebWndToTop = function (e) {
            let t = !1;
            do {
                if (!e) break;
                let i = g.filter(t => e === t.moduleName);
                if (!i || i.length <= 0) break;
                i[0].embeddedBrowserObj.bringToTop(), t = !0
            } while (0);
            return t
        }, e.registerWebFunction = function (e, t, i) {
            let n = g.filter(t => e === t.moduleName);
            null !== n && void 0 !== n && n.length > 0 && n[0].embeddedBrowserObj.registerNativeFunction(t, i)
        }, e.callBackWebFunction = function (e, t, i, n) {
            let o = g.filter(t => e === t.moduleName);
            if (null !== o && void 0 !== o && o.length > 0) {
                let e = o[0].embeddedBrowserObj.getBrowserObj();
                null !== e && void 0 !== e && e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
            }
        }, e.fireEventWebFunction = function (e, ...t) {
            let i = g.filter(t => e === t.moduleName);
            if (null !== i && void 0 !== i && i.length > 0) {
                let e = i[0].embeddedBrowserObj.getBrowserObj();
                if (null !== e && void 0 !== e) {
                    let i = t[0];
                    if (null === i || void 0 === i || "" === i) return;
                    t.splice(0, 1), e.fireEvent(i, ...t)
                }
            }
        }
    }(t.EmbeddedBrowserManagerNs || (t.EmbeddedBrowserManagerNs = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(12), r = i(35), s = i(3), l = i(71);
    !function (e) {
        e.resizeToFitContent = function (e = 0, t = 0, i) {
            return n(this, void 0, void 0, function* () {
                let n = yield a.asyncRemoteCall.getCurrentWindow();
                if (e > 0 && t > 0) window.resizeTo(e, t); else {
                    let e = document.querySelector(".td-dialog");
                    null === e && (e = document.querySelector(".msg-pop-message")), null !== e && window.resizeTo(e.offsetWidth, e.offsetHeight)
                }
                i && "function" == typeof i && (yield i()), window.requestIdleCallback(() => {
                    setTimeout(() => {
                        n.show()
                    }, 50)
                })
            })
        }, e.autoAdaptScrollIntoView = function (e, t, i) {
            let n = t.scrollTop, o = t.getBoundingClientRect(), a = e.getBoundingClientRect(), r = o.bottom;
            void 0 !== i && "number" == typeof i && i > 0 && (r = o.top + i), a.top < o.top ? t.scrollTop = n - (o.top - a.top) : a.bottom > r && (t.scrollTop = n + (a.bottom - r))
        }, e.fitWindowPosInParent = function (e, t) {
            return n(this, void 0, void 0, function* () {
                if (e || (e = yield a.asyncRemoteCall.getCurrentWindow()), t || (t = yield e.getParentWindow()), !t) return;
                let i = (yield e.getNativeWindowHandle()).readUIntLE(0, 4),
                    n = (yield t.getNativeWindowHandle()).readUIntLE(0, 4);
                yield s.client.callRemoteClientFunction(l.CommonIPCBase.mainProcessContext, "SetPosition", i, n)
            })
        }, e.getWindowsInParentCenterPos = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                i || "browser" === process.type || (i = yield a.asyncRemoteCall.getCurrentWindow());
                let n = "browser" !== process.type ? yield i.getPosition() : i.getPosition(),
                    r = "browser" !== process.type ? yield i.getSize() : i.getSize(),
                    s = "browser" !== process.type ? yield a.asyncRemoteCall.getScreen() : o.screen,
                    l = yield s.getCursorScreenPoint(), d = yield s.getDisplayNearestPoint(l), u = d.size.width,
                    c = d.size.height, h = r[0], f = r[1];
                n[0] + h > u && (h = u - n[0]), n[1] + f > c && (f = c - n[1]);
                let p = n[0] + (h - e) / 2, g = n[1] + (f - t) / 2;
                return p < 0 ? p = 0 : p > u - e && (p = u - e), g < 0 ? g = 0 : g > c - t && (g = c - t), [Math.round(p), Math.round(g)]
            })
        }, e.centerWnd = function (e, t, i) {
            do {
                if ("browser" !== process.type) break;
                if (!e || !t) break;
                let n = e.getNativeWindowHandle().readUIntLE(0, 4);
                if (!n) break;
                let a = t.getPosition(), r = t.getSize(), s = e.getSize(), l = o.screen.getCursorScreenPoint(),
                    d = o.screen.getDisplayNearestPoint(l), u = d.scaleFactor, c = d.size.width, h = d.size.height,
                    f = r[0], p = r[1];
                a[0] + f > c && (f = c - a[0]), a[1] + p > h && (p = h - a[1]);
                let g = a[0] + (f - s[0]) / 2, m = a[1] + (p - s[1]) / 2;
                g < 0 ? g = 0 : g > c - s[0] && (g = c - s[0]), m < 0 ? m = 0 : m > h - s[1] && (m = h - s[1]), i.setWindowPos(n, 0, g * u, m * u, 0, 0, 5)
            } while (0)
        }, e.bringWindowToTop = function (e) {
            return n(this, void 0, void 0, function* () {
                if (!e) {
                    let t = yield(yield a.asyncRemoteCall.getCurrentWindow()).getNativeWindowHandle();
                    e = t.readUIntLE(0, 4)
                }
                o.ipcRenderer.send(r.ThunderChannelList.channelMRBringWindowToTop, e)
            })
        }
    }(t.ThunderWindowNS || (t.ThunderWindowNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), a = i(10), r = i(23), s = i(5);
    let l = void 0;
    !function (e) {
        function t() {
            let e = "", t = new Date;
            return e = `${t.getFullYear()}${t.getMonth() + 1}${t.getDate()}`
        }

        e.isAlreadySign = function () {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                if (yield r.LoginHelperNS.loginHelper.isLoginedAw()) try {
                    let t = yield o.fetchSlRes({url: "/xlppc.movie.guess.api/api/query_coin", data: {}, method: "get"});
                    if (null !== t && void 0 !== t && 200 === t.status && !s.isNullOrUndefined(t.data)) {
                        let i = t.data;
                        s.isNullOrUndefined(i.data) || s.isNullOrUndefined(i.data.is_answered) || (e = i.data.is_answered)
                    }
                } catch (e) {
                }
                return e
            })
        }, e.isHaveSignQuestion = function () {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    if (void 0 !== l && a.ConfigNS.getValue("sign", "getQuestionTime", "") === t()) {
                        e = !!l;
                        break
                    }
                    try {
                        let t = yield o.fetchSlRes({url: "/sign/pc/get_question", data: {}});
                        null !== t && void 0 !== t && 200 === t.status && null !== t.data && void 0 !== t.data && (0 === t.data.err_code ? (e = !0, l = !0) : (e = !1, l = !1))
                    } catch (e) {
                    }
                    a.ConfigNS.setValue("sign", "getQuestionTime", t())
                } while (0);
                return e
            })
        }, e.actSwitch = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = {actSwitch: !1};
                try {
                    let i = yield o.fetchRequest({
                        method: "get",
                        url: "https://msg-vip-ssl.xunlei.com/xlact/conf",
                        data: {actid: e, source: 3e3}
                    });
                    if (null !== i && void 0 !== i && 200 === i.status && null !== i.data && void 0 !== i.data) {
                        let e = i.data;
                        if (0 === e.result && e.data) {
                            let i = e.data;
                            "on" === i.switch && (t = {actSwitch: !0, width: i.width, height: i.height})
                        }
                    }
                } catch (e) {
                }
                return t
            })
        }, e.getCurDate = t
    }(t.CommonSignFunctionNs || (t.CommonSignFunctionNs = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(8), a = i(63), r = i(4), s = i(16), l = i(5), d = i(3),
        u = s.DownloadKernelEventManager.getEventManager(), c = `${__profilesDir}/commonsites.json`, h = 3e4;

    class f {
        constructor() {
            this.inited = !1, this.needSave = !1, this.heartTimerId = void 0, this.allSites = {}, this.quitAttached = !1, this.commonly = void 0, this.allRefUrls = {}, this.allNameUrls = {}, this.searchKeywords = []
        }

        init() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (this.inited) break;
                    if (this.inited = !0, !(yield o.FileSystemAWNS.existsAW(c))) break;
                    let e = (yield o.FileSystemAWNS.readFileAW(c)).toString(), t = null;
                    try {
                        t = JSON.parse(e)
                    } catch (e) {
                    }
                    if (!t) break;
                    this.allSites = t.allSites || {}, this.allRefUrls = t.allRefUrls || {}, this.allNameUrls = t.allNameUrls || {}, this.searchKeywords = t.searchKeywords || [], this.filterSites(this.allSites), this.filterSites(this.allRefUrls), this.filterSites(this.allNameUrls), u.attachTaskEvent(r.DownloadKernel.TaskEventType.TaskCreated, (...e) => {
                        do {
                            if (!e) break;
                            if (e[0] !== r.DownloadKernel.TaskEventType.TaskCreated) break;
                            let t = e[1];
                            if (!t) break;
                            for (let e of t) {
                                let t = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.RefUrl), i = e.getTaskName();
                                t && this.updateHost(t, this.allRefUrls), this.updateTaskName(i)
                            }
                            this.needSave = !0, this.save().catch()
                        } while (0)
                    })
                } while (0)
            })
        }

        save() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!this.needSave) break;
                    this.needSave = !1;
                    let e = {
                        allSites: this.allSites,
                        allNameUrls: this.allNameUrls,
                        allRefUrls: this.allRefUrls,
                        searchKeywords: this.searchKeywords
                    };
                    yield o.FileSystemAWNS.writeFileAW(c, JSON.stringify(e))
                } while (0)
            })
        }

        getMostCommonly() {
            return n(this, void 0, void 0, function* () {
                if (void 0 === this.commonly) {
                    yield this.init();
                    let e = Object.assign({}, this.allSites);
                    Object.values(this.allSites).forEach(t => {
                        t.name || delete e[t.url]
                    });
                    for (let t of Object.keys(this.allNameUrls)) e[t] && e[t].visit ? e[t].visit += this.allNameUrls[t].visit || 1 : e[t] = Object.assign({}, this.allNameUrls[t]);
                    for (let t of Object.keys(this.allRefUrls)) e[t] && e[t].visit ? e[t].visit += this.allRefUrls[t].visit || 1 : e[t] = Object.assign({}, this.allRefUrls[t]);
                    let t = Object.values(e);
                    t.sort((e, t) => e.visit !== t.visit ? t.visit - e.visit : t.date && e.date ? t.date - e.date : 0);
                    let i = yield d.client.callServerFunction("GetRemoteGlobalConfigValue", "search", "commonWebSiteFilterNum", 3);
                    "number" != typeof i && (i = 3), this.commonly = t.filter(e => {
                        let t = !0;
                        do {
                            if (!e.url) {
                                t = !1;
                                break
                            }
                            if (e.visit < i) {
                                t = !1;
                                break
                            }
                            if (-1 !== e.url.indexOf("xunlei.com")) {
                                t = -1 !== e.url.indexOf("movie.xunlei.com") || -1 !== e.url.indexOf("live.xunlei.com") || -1 !== e.url.indexOf("www.xunlei.com") || -1 !== e.url.indexOf("yingshiku.xunlei.com");
                                break
                            }
                            if (-1 !== e.url.indexOf("www.baidu.com")) {
                                t = !1;
                                break
                            }
                        } while (0);
                        return t
                    }), this.commonly.length > 6 && (this.commonly = this.commonly.slice(0, 6))
                }
                return this.commonly
            })
        }

        updateItem(e, t) {
            return n(this, void 0, void 0, function* () {
                if (-1 !== e.url.indexOf("xunlei.com")) {
                    if (-1 === e.url.indexOf("movie.xunlei.com") && -1 === e.url.indexOf("live.xunlei.com") && -1 === e.url.indexOf("www.xunlei.com") && -1 === e.url.indexOf("yingshiku.xunlei.com")) return
                } else if (-1 !== e.url.indexOf("www.baidu.com")) return;
                yield this.init();
                let i = this.allSites[e.url];
                ("OnAddressChange" === t || i) && (i ? ("OnAddressChange" === t && (e.visit = i.visit + 1, e.date = (new Date).getTime(), this.updateHost(e.url, this.allSites)), this.allSites[i.url] = Object.assign({}, i, e)) : (e.visit = 1, e.date = (new Date).getTime(), this.updateHost(e.url, this.allSites), this.allSites[e.url] = e), this.needSave = !0, void 0 === this.heartTimerId && (this.heartTimerId = setTimeout(() => n(this, void 0, void 0, function* () {
                    clearTimeout(this.heartTimerId), this.heartTimerId = void 0, yield this.save()
                }), h)), this.quitAttached || (this.quitAttached = !0, a.quitPromises.add(() => new Promise(e => n(this, void 0, void 0, function* () {
                    this.heartTimerId && (clearTimeout(this.heartTimerId), this.heartTimerId = void 0), yield this.save(), e(!0)
                })))))
            })
        }

        clear() {
            return n(this, void 0, void 0, function* () {
                this.allSites = {}, this.allRefUrls = {}, this.allNameUrls = {}, this.commonly = [], this.needSave = !0, this.heartTimerId && (clearTimeout(this.heartTimerId), this.heartTimerId = void 0), yield this.save()
            })
        }

        delete(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!e) break;
                    if (delete this.allSites[e], delete this.allNameUrls[e], delete this.allRefUrls[e], !this.commonly || 0 === this.commonly.length) break;
                    for (let t = 0; t < this.commonly.length; t++) if (this.commonly[t].url === e) {
                        this.commonly.splice(t, 1);
                        break
                    }
                    this.needSave = !0, yield this.save()
                } while (0)
            })
        }

        filterSites(e) {
            let t = (new Date).getTime();
            if (Object.values(e).length < 100) return;
            let i = Object.values(e).sort((e, t) => l.isNullOrUndefined(e.visit) || l.isNullOrUndefined(t.visit) || e.visit === t.visit ? l.isNullOrUndefined(e.date) || l.isNullOrUndefined(t.date) ? void 0 : e.date - t.date : e.visit - t.visit);
            for (let n = 100; n < i.length; n++) {
                let o = i[n];
                o.date ? t - o.date > 2592e6 && delete e[o.url] : o.date = (new Date).getTime()
            }
        }

        getHost(e) {
            let t = "";
            do {
                if (!e) break;
                if (!(e = e.split("://")[1])) break;
                let i = e.split("/")[0];
                if (i === e) break;
                t = i
            } while (0);
            return t
        }

        updateHost(e, t) {
            let i = this.getHost(e);
            if (!i) return;
            let n = t[i];
            if (n) n.visit += 1, n.date = (new Date).getTime(); else {
                let e = {url: i, visit: 1, date: (new Date).getTime()};
                t[i] = e
            }
        }

        updateTaskName(e) {
            let t = new RegExp(/w{3}\.[\w|-]+(\.com.cn|\.net.cn|\.org.cn|\.edu\.cn|\.gov\.cn|\.com|\.net|\.cn|\.cc|\.tv|\.uk|\.jp|\.org|\.biz|\.edu|\.gov|\.mil|\.fr|\.au|\.de)/gi),
                i = e.match(t);
            if (!i) return;
            let n = i[0], o = this.allNameUrls[n];
            if (o) o.visit += 1, o.date = (new Date).getTime(); else {
                let e = {url: n, visit: 1, date: (new Date).getTime()};
                this.allNameUrls[n] = e
            }
        }

        getLatestSearchKeywords() {
            return this.searchKeywords
        }

        addSearchKeyword(e) {
            if ((l.isNullOrUndefined(e.keyword) || "" !== e.keyword) && (l.isNullOrUndefined(e.url) || "" !== e.url)) {
                if (this.searchKeywords) {
                    if (e.url && e.url.includes("://") && (e.url = e.url.split("://")[1]), this.searchKeywords.some(t => void 0 !== e.keyword && t.keyword === e.keyword || void 0 !== e.url && t.url === e.url)) return;
                    this.searchKeywords.splice(0, 0, e), this.searchKeywords.length > 20 && this.searchKeywords.pop(), this.needSave = !0
                }
                this.save().catch()
            }
        }

        deleteSearchKeyword(e) {
            this.searchKeywords && (this.searchKeywords.splice(e, 1), this.needSave = !0), this.save().catch()
        }

        clearSearchKeyword() {
            this.searchKeywords = [], this.needSave = !0, this.save().catch()
        }
    }

    t.CommonSitesMgr = f, function (e) {
        const t = new f;
        e.getInstance = function () {
            return t
        }
    }(t.CommonSitesMgrNS || (t.CommonSitesMgrNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), a = i(3), r = i(0).default.getLogger("community");
    t.getUnreadMsgNum = function (e) {
        return o.fetchSlRes({url: "/xlppc.notification.api/v2/msg/unread", data: {}})
    }, t.getUnreadNoticeNum = function (e) {
        return o.fetchSlRes({url: "/msgcenter/pc/unread_count", data: {_h: {"Chat-Version": 4}, user_id: e}})
    }, t.getUnreadCircleMsgNum = function (e) {
        return n(this, void 0, void 0, function* () {
            return o.fetchSlRes({url: "/xlppc.notification.api/msg/unread", data: {}})
        })
    }, t.getVideoPreviewInfo = function (e, t, i, a) {
        return n(this, void 0, void 0, function* () {
            let n = {type: e, res: t};
            return i && (n.index = i), o.fetchSlRes({
                url: "/xlppc.resinfo.api/v3/queryresinfo",
                data: n,
                method: "post"
            })
        })
    }, t.isResourceLegal = function (e, t, i) {
        return n(this, void 0, void 0, function* () {
            if (!i || !t) return !1;
            if (i.length <= 0 || t.length <= 0) return !1;
            let n = yield o.fetchRequest({
                url: "http://client.filter.hub.sandai.net/filter_task?type=" + t + "&from=" + i,
                data: e,
                method: "post"
            });
            if (r.information("isResourceLegal:,res", n), !n || !n.data) return !1;
            let a = !1;
            do {
                if ("string" == typeof n.data) try {
                    n.data = JSON.parse(n.data)
                } catch (e) {
                    a = !1;
                    break
                }
                "bt" === t ? a = 0 === n.data.ret_code || 1 === n.data.ret_code || 2 === n.data.ret_code : 1 === n.data.ret_code ? a = !0 : 0 === n.data.ret_code ? n.data.result && n.data.result[0] && 0 === n.data.result[0].ret_code && (a = !0) : a = !1
            } while (0);
            return a
        })
    }, t.getUnreadMsgs = function (e, t, i, n) {
        return o.fetchSlRes({
            url: "/xlppc.notification.api/v2/msg/comments",
            data: {reset_read_status: t, cursor: i || 0, size: n || 0}
        })
    }, t.getStarsMsg = function (e, t, i, n) {
        return o.fetchSlRes({
            url: "/xlppc.notification.api/v2/msg/stars",
            data: {reset_read_status: t, cursor: i, size: n}
        })
    }, t.getUserInfo = function (e) {
        return o.fetchSlRes({url: "/user_info/pc_info", data: {uid: e}})
    }, t.getUserSessionList = function (e, t = 60) {
        return o.fetchSlRes({url: "/chitchat/sessions", data: {uid: e, limit: t}})
    }, t.getUserSilenceList = function () {
        return n(this, void 0, void 0, function* () {
            let e = yield a.client.callRemoteClientFunction("User", "UserGetAccessToken").catch(), t = {};
            t._h = {Authorization: e && "Bearer " + e[0]};
            let i = yield o.fetchSlRes({url: "/chitchat/v1/silence/list", data: t, method: "get"}).catch();
            return r.information("### res", i, t), !i || 200 !== i.status || i.data && "ok" !== i.data.result ? [] : i.data && i.data.data || []
        })
    }, t.getGlobalSilenceFlag = function () {
        return n(this, void 0, void 0, function* () {
            let e = yield a.client.callRemoteClientFunction("User", "UserGetAccessToken").catch(), t = {};
            t._h = {Authorization: e && "Bearer " + e[0]};
            let i = yield o.fetchSlRes({url: "/chitchat/v1/global/silence/flag", data: t, method: "get"}).catch();
            return r.information("### res", i, t), !(!i || !i.data || "ok" !== i.data.result) && i.data.silence
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(5), a = i(0), r = i(8), s = i(63), l = a.default.getLogger("History");
    let d = 3e3, u = 18e4, c = 15;
    const h = `${__profilesDir}/historys.json`;
    let f = new class {
        constructor() {
            this.inited = !1, this.heartTimerId = void 0, this.count = 0, this.needSave = !1, this.quitAttached = !1, this.records = {}, this.historys = {}
        }

        get length() {
            return this.count
        }

        getDayString(e) {
            let t = "";
            do {
                if (!e) break;
                let i = new Date(e);
                t = o.format("%d/%d/%d", i.getFullYear(), i.getMonth() + 1, i.getDate())
            } while (0);
            return t
        }

        isOverLongDays(e) {
            let t = !1, i = new Date(e), n = new Date(i.getFullYear(), i.getMonth(), i.getDate(), 0, 0, 0),
                o = new Date;
            return new Date(o.getFullYear(), o.getMonth(), o.getDate(), 0, 0, 0).getTime() - n.getTime() > 24 * (c - 1) * 60 * 60 * 1e3 && (t = !0), t
        }

        init() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (this.inited) break;
                    if (this.inited = !0, !(yield r.FileSystemAWNS.existsAW(h))) break;
                    let e = (yield r.FileSystemAWNS.readFileAW(h)).toString(), t = null;
                    try {
                        t = JSON.parse(e)
                    } catch (e) {
                    }
                    if (!t) break;
                    this.records = t;
                    for (let e in this.records) {
                        let t = this.records[e];
                        if (t.visits) for (let i = 0; i < t.visits.length;) {
                            let n = t.visits[i];
                            if (this.isOverLongDays(n)) {
                                l.information("history is longlong ago", e, n), t.visits.splice(0, 1), 0 === t.visits.length && delete this.records[e];
                                continue
                            }
                            let o = this.getDayString(n), a = `${e}_${o}`;
                            this.historys.hasOwnProperty(a) ? l.warning("daily url exist", this.historys[a].url, this.historys[a].accessTime) : this.count++, this.historys[a] = {
                                url: e,
                                accessTime: n,
                                name: t.name,
                                iconUrl: t.iconUrl,
                                date: o
                            }, i++
                        }
                    }
                } while (0)
            })
        }

        getAllHistory(e = !1) {
            let t = Object.values(this.historys);
            return t.sort((e, t) => t.accessTime - e.accessTime), e && t.length > 0 && (t = t.map(e => (this.records && this.records[e.url] && (e.iconUrl || (e.iconUrl = this.records[e.url].iconUrl), e.name || (e.name = this.records[e.url].name)), e))), t
        }

        stopSaveTimer() {
            this.heartTimerId && (clearTimeout(this.heartTimerId), this.heartTimerId = void 0)
        }

        startSaveTimer() {
            void 0 === this.heartTimerId && (this.heartTimerId = setTimeout(() => n(this, void 0, void 0, function* () {
                clearTimeout(this.heartTimerId), this.heartTimerId = void 0, yield this.save()
            }), u)), this.quitAttached || (this.quitAttached = !0, s.quitPromises.add(() => new Promise(e => n(this, void 0, void 0, function* () {
                this.stopSaveTimer(), yield this.save(), e(!0)
            }))))
        }

        save() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!this.needSave) {
                        l.information("save but flag is false");
                        break
                    }
                    if (this.needSave = !1, yield this.init(), this.count > d) {
                        let e = this.getAllHistory();
                        if (this.count !== e.length && l.warning("exception on save count not match historys length"), e.length > d) for (let t = d; t < e.length; t++) {
                            let i = e[t], n = this.records[i.url];
                            if (n && i) {
                                let e = n.visits.indexOf(i.accessTime);
                                -1 !== e && n.visits.splice(e, 1), 0 === n.visits.length && delete this.records[i.url];
                                let t = `${i.url}_${this.getDayString(i.accessTime)}`;
                                delete this.historys[t]
                            }
                        }
                    }
                    yield r.FileSystemAWNS.writeFileAW(h, JSON.stringify(this.records))
                } while (0)
            })
        }

        getRecentHistory() {
            return n(this, void 0, void 0, function* () {
                let e = [];
                yield this.init();
                let t = this.getAllHistory(!0);
                return e = t.length > d ? t.slice(0, d) : t
            })
        }

        clear() {
            return n(this, void 0, void 0, function* () {
                yield r.FileSystemAWNS.unlinkAW(h), this.records = {}, this.historys = {}, this.needSave = !1, this.heartTimerId && (clearTimeout(this.heartTimerId), this.heartTimerId = void 0)
            })
        }

        delete(e) {
            return n(this, void 0, void 0, function* () {
                let t = this.records[e.url];
                if (t) {
                    let i = t.visits.indexOf(e.accessTime);
                    -1 !== i && (t.visits.splice(i, 1), this.needSave = !0, this.startSaveTimer()), 0 === t.visits.length && delete this.records[e.url]
                }
                let i = `${e.url}_${this.getDayString(e.accessTime)}`;
                delete this.historys[i]
            })
        }

        update(e, t) {
            return n(this, void 0, void 0, function* () {
                yield this.init();
                do {
                    if (!e.url) {
                        l.warning("update history exception url is null");
                        break
                    }
                    let i = (new Date).getTime(), n = this.getDayString(i), o = `${e.url}_${n}`,
                        a = this.records[e.url];
                    if (a) {
                        if ("OnAddressChange" === t) {
                            a.visitCount = a.visitCount + 1, a.lastAccessTime = i;
                            let t = this.historys[o];
                            if (t) {
                                let e = a.visits.indexOf(t.accessTime);
                                -1 !== e && (l.information("delete earlier this day", t.accessTime, i), a.visits.splice(e, 1), a.visits.push(i)), t.accessTime = i
                            } else a.visits.push(i), this.historys[o] = Object.assign({
                                accessTime: i,
                                date: n
                            }, e), this.count++
                        } else {
                            let t = this.historys[o];
                            t ? this.historys[o] = Object.assign({}, t, e) : l.warning("update exception")
                        }
                        e.iconUrl && (a.iconUrl = e.iconUrl), e.name && (a.name = e.name)
                    } else {
                        if ("OnAddressChange" !== t) {
                            l.warning("try to update history but never OnAddressChange");
                            break
                        }
                        this.records[e.url] = {
                            lastAccessTime: i,
                            visits: [i],
                            visitCount: 1,
                            iconUrl: e.iconUrl,
                            name: e.name
                        }, this.historys[o] = Object.assign({accessTime: i, date: n}, e), this.count++
                    }
                    this.needSave = !0, this.startSaveTimer()
                } while (0)
            })
        }

        search(e) {
            return n(this, void 0, void 0, function* () {
                if (yield this.init(), !this.records || 0 === Object.keys(this.records).length) return [];
                let t = [], i = Object.values(this.historys).sort((e, t) => e.accessTime - t.accessTime),
                    n = e.split(" ");
                for (let e = 0; e < i.length; e++) {
                    let o = !0;
                    for (let t = 0; t < n.length; t++) if (!(i[e].url.includes(n[t]) || i[e].name && i[e].name.includes(n[t]))) {
                        o = !1;
                        break
                    }
                    if (o && (t.push(i[e]), t.length >= 2)) return t
                }
                return t
            })
        }
    };
    t.historyManager = f
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(0), r = i(22), s = i(38), l = i(7), d = i(10), u = i(8), c = i(9), h = i(4), f = i(44),
        p = i(12), g = f.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        m = l.default(o.join(__rootDir, "../bin/ThunderHelper.node")), v = a.default.getLogger("quit-create-shortcut");
    !function (e) {
        class t {
            static isAlreadyCancel() {
                return d.ConfigNS.getValue("CreateDesktopIcon", "Cancel", !0)
            }

            static realPop() {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        c.XLStatNS.trackEvent("core_event", "create_desktop_shortcut_tips_show"), r.MessageBox.confirm({
                            title: "提示",
                            content: "您还没创建桌面快捷方式，是否要创建？",
                            type: r.MessageBox.ConfirmType.Info,
                            fileName: "",
                            okText: "立即创建",
                            cancelText: "取消",
                            cancelVisible: !0
                        }).then(t => n(this, void 0, void 0, function* () {
                            if (t.action === s.MessageBoxNS.Action.OK) {
                                let t = yield p.asyncRemoteCall.getApp(),
                                    i = o.join(yield t.getPath("desktop"), "迅雷.lnk");
                                m.createShortcut(i, o.join(__rootDir, "../../ThunderStart.exe"), "-StartType:ExitDesktopIcon", o.join(__rootDir, "../../thunder11.ico"), t => {
                                    v.information("createShortcut result", t), e()
                                }), c.XLStatNS.trackEvent("core_event", "create_desktop_shortcut_tips_click", "", 0, 0, 0, 0, "button=ok")
                            } else t.action === s.MessageBoxNS.Action.Cancel ? (v.information("Cancel"), d.ConfigNS.setValue("CreateDesktopIcon", "Cancel", !0), c.XLStatNS.trackEvent("core_event", "create_desktop_shortcut_tips_click", "", 0, 0, 0, 0, "button=cancel"), e()) : t.action === s.MessageBoxNS.Action.Close && (v.information("Close"), d.ConfigNS.setValue("CreateDesktopIcon", "Cancel", !0), c.XLStatNS.trackEvent("core_event", "create_desktop_shortcut_tips_click", "", 0, 0, 0, 0, "button=close"), e())
                        })).catch(() => {
                            e()
                        })
                    })
                })
            }

            static popup() {
                return n(this, void 0, void 0, function* () {
                    let e = !0;
                    do {
                        if (this.isAlreadyCancel()) break;
                        let t = yield p.asyncRemoteCall.getApp(), i = o.join(yield t.getPath("desktop"), "迅雷.lnk");
                        if (yield u.FileSystemAWNS.existsAW(i)) break;
                        yield this.realPop(), e = !0
                    } while (0);
                    return e
                })
            }
        }

        class i {
            static realPop() {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        c.XLStatNS.trackEvent("core_event", "exit_popup_show"), r.MessageBox.confirm({
                            title: "退出迅雷",
                            content: "当前有正在下载的任务，确定退出吗？",
                            type: r.MessageBox.ConfirmType.Info,
                            fileName: "",
                            okText: "确定",
                            cancelText: "取消",
                            cancelVisible: !0
                        }).then(t => n(this, void 0, void 0, function* () {
                            t.action === s.MessageBoxNS.Action.OK && c.XLStatNS.trackEvent("core_event", "exit_popup_click", "", 0, 0, 0, 0, "button=ok"), e(t.action)
                        })).catch(() => {
                            e(s.MessageBoxNS.Action.Cancel)
                        })
                    })
                })
            }

            static popup() {
                return n(this, void 0, void 0, function* () {
                    let e = !0;
                    {
                        let t = g.getCategoryViewFromId(h.DownloadKernel.CategroyViewID.Downloading);
                        if (t) {
                            let i = t.getTasks();
                            for (let [, t]of i) if (t.getTaskStatus() === h.DownloadKernel.TaskStatus.Started) {
                                e = !0;
                                break
                            }
                        }
                        e || (e = (yield this.realPop()) === s.MessageBoxNS.Action.OK)
                    }
                    return e
                })
            }
        }

        e.popupCreateShortcutMessageBox = function () {
            return n(this, void 0, void 0, function* () {
                do {
                    if (yield t.popup()) break
                } while (0);
                return !0
            })
        }, e.popup = function () {
            return n(this, void 0, void 0, function* () {
                let e = !0;
                do {
                    if (yield t.popup()) break;
                    if (!(yield i.popup())) {
                        e = !1;
                        break
                    }
                } while (0);
                return e
            })
        }
    }(t.QuitMessageBoxMgrNS || (t.QuitMessageBoxMgrNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(10), a = i(77), r = i(2), s = i(671), l = r.join(__rootDir, "../../download-complete.wav");
    !function (e) {
        function t(t, i) {
            let n;
            for (let o = 0; o < e.conf.sechema.length; ++o) if ((n = e.conf.sechema[o]).name === t) {
                if (!n.children) break;
                for (let t = 0; t < n.children.length; t++) if (n.children[t].name === i) {
                    n.children.splice(t, 1), e.conf.sechema[o] = n;
                    break
                }
                break
            }
        }

        function i(t, i, n) {
            let o;
            for (let a = 0; a < e.conf.sechema.length; ++a) if ((o = e.conf.sechema[a]).name === t) {
                if (!o.children) break;
                let t = o.children.length;
                for (let r = 0; r < t; r++) if (o.children[r].name === n) {
                    r === t - 1 ? o.children.push(i) : o.children.splice(r + 1 > t - 1 ? t - 1 : r + 1, 0, i), e.conf.sechema[a] = o;
                    break
                }
                break
            }
        }

        function d(t, i) {
            let n, o = !1;
            for (let a = 0; a < e.conf.sechema.length; ++a) if ((n = e.conf.sechema[a]).name === t) {
                if (!n.children) break;
                let e = n.children.length;
                for (let t = 0; t < e; t++) if (n.children[t].name === i) {
                    o = !0;
                    break
                }
                break
            }
            return o
        }

        e.conf = {
            sechema: [{
                name: "基本设置",
                children: [{
                    name: "ConfigNormalSession-ConfigNormal_AutoRun",
                    type: "confCheckbox",
                    label: "开机启动迅雷",
                    classes: ""
                }, {
                    name: "Others-AntiDisturb",
                    type: "confCheckbox",
                    label: "开启免打扰模式",
                    classes: "",
                    extEles: [{
                        type: "confTip",
                        classes: "xly-icon-help",
                        text: "免打扰模式下，当您运行全屏程序时，迅雷将\n自动帮您取消提示消息弹出，避免打扰您的其\n它体验。",
                        value: ""
                    }]
                }, {
                    name: "BossKey-BossKeySwitch",
                    type: "confCheckboxInput",
                    label: "启用老板键",
                    styles: "display: flex; align-items: center;",
                    extEles: [{
                        type: "confInput",
                        name: "BossKey-BossKeyName",
                        label: " ",
                        toolTipsContent: "注册老板键失败,请选择功能键 + 字母键/数字键",
                        rules: [["rule, value, callback", "let errors = [];\n                    value = String(value);\n                    if (value.indexOf('+') === -1 ) {\n                      errors.push(new Error('注册老板键失败,请选择功能键 + 字母键/数字键'));\n                    }\n                    callback(errors);"]],
                        outClasses: "xly-input-size-1",
                        ShortcutKey: !0,
                        style: "padding-right: 3px"
                    }, {type: "confTip", text: "如果老板来了，按老板键，迅雷将自动隐身", classes: "xly-icon-help"}]
                }, {
                    name: "TaskDefaultSettings-NewTaskDlgWithoutMainWnd",
                    type: "confCheckbox",
                    label: "新建任务时显示主界面"
                }, {
                    name: "TaskDefaultSettings-downloadModel",
                    text: "下载模式",
                    type: "confText",
                    ulClasses: "xly-setting-content__vertical",
                    children: [{
                        name: "ConfigNet-ConfigNet_Type",
                        type: "confRadio",
                        label: "全速下载",
                        extEles: [{
                            type: "confTip",
                            text: "p2sp下载完的文件会通过p2p的方式上传分享，\n帮助其它网友加速下载，绝不会涉及任何用户隐\n私。下载和分享是通过智能带宽控制的技术，不\n会影响您的上网体验，请放心使用。",
                            classes: "xly-icon-help"
                        }, {
                            type: "confBtn",
                            text: "修改配置",
                            classes: "td-button--small td-button--other",
                            outerClass: "inline",
                            boxType: "speedConfBox",
                            extEles: [{type: "confSpeedText", classes: "xly-setting-content__description inline"}]
                        }],
                        extActiveValue: "0",
                        labels: ["全速下载", "限速下载"],
                        option: ["1", "0"]
                    }]
                }]
            }, {
                name: "云盘设置",
                classes: "xly-setting-cloud",
                children: [{
                    label: "默认添加目录",
                    type: "confText",
                    text: "默认添加目录",
                    classes: "xly-setting-content__title",
                    liClasses: "xly-setting-content__align",
                    liStyles: "display: flex;",
                    children: [{
                        name: "ThunderPanPlugin-defaultSavePath",
                        type: "confSelect",
                        label: "",
                        optionByName: "ThunderPanPlugin-savePaths",
                        liClasses: "td-select xly-select-setting",
                        slotOption: "openThunderPan",
                        editable: !1,
                        hasDeleteOption: !0,
                        deleteOptionText: "清除历史云盘添加目录",
                        maxOptionLen: 5,
                        blurUpdate: !0
                    }, {
                        name: "ThunderPanPlugin-lastUsePath",
                        type: "confCheckbox",
                        label: "自动修改为上次使用的目录",
                        linkItem: {
                            section: "ThunderPanPlugin",
                            key: "lastUsePath",
                            name: "ThunderPanPlugin-defaultSavePath"
                        }
                    }]
                }, {
                    label: "下载到本地",
                    type: "confText",
                    text: "下载到本地",
                    classes: "xly-setting-content__title",
                    liClasses: "xly-setting-content__align",
                    liStyles: "display: flex;",
                    children: [{
                        name: "ThunderPanPlugin-defaultDownloadPath",
                        type: "confSelect",
                        label: "",
                        optionByName: "ThunderPanPlugin-downloadPaths",
                        liClasses: "td-select xly-select-setting",
                        slotOption: "openDirectory",
                        editable: !0,
                        hasDeleteOption: !0,
                        deleteOptionText: "清除历史下载目录",
                        maxOptionLen: 5,
                        blurUpdate: !0,
                        rules: [["rule, value, callback", "let errors = [];\n                    do {\n                      let dir = '';\n                      let ip = '';\n                      if (/^[c-zC-Z]:\\\\/.test(value)) {\n                        dir = value.slice(3);\n                      } else {\n                        if (value.indexOf('\\\\\\\\') === 0) {\n                          let index = value.indexOf('\\\\', 2);\n                          if (index === -1 || index === value.length - 1) {\n                            errors.push(new Error('不合法的存储路径'));\n                            break;\n                          }\n                          dir = value.slice(2);\n                          ip = dir.substr(0, index - 2);\n                          if (ip === '') {\n                            errors.push(new Error('不合法的存储路径'));\n                            break;\n                          }\n                        } else {\n                          errors.push(new Error('不合法的存储路径'));\n                          break;\n                        }\n                      }\n                      if (/[\\*\\\"<>\\?:\\|]/i.test(dir)) {\n                        errors.push(new Error('下载目录名称不能包含下列任何字符：:|* ?“<>'));\n                        break;\n                      }\n                      if (value.length > 256) {\n                        errors.push(new Error('您输入的下载目录路径长度超过系统限制，请控制在256个字符以内'));\n                        break;\n                      }\n                      if (ip === '') {\n                        break;\n                      }\n                      let index = ip.indexOf('.ipv6-literal.net');\n                      if (index !== -1) {\n                        ip = ip.substr(0, index);\n                        index = ip.indexOf('%');\n                        if (index !== -1) {\n                          ip = ip.substr(0, index);\n                        }\n                        ip = ip.replace(/\\-/g, ':');\n                        if (!/^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$/.test(ip)) {\n                          errors.push(new Error('不合法的存储路径'));\n                        }\n                      } else {\n                        if (\n                          !/(?=(\\b|\\D))(((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))\\.){3}((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))(?=(\\b|\\D))/.test(\n                            ip\n                          )\n                        ) {\n                          errors.push(new Error('不合法的存储路径'));\n                        }\n                      }\n                    } while (false);\n                    callback(errors);"]]
                    }, {
                        name: "ThunderPanPlugin-useDefault",
                        type: "confCheckbox",
                        label: "下载时不再询问",
                        linkItem: {
                            section: "ThunderPanPlugin",
                            key: "defaultDownloadPath",
                            name: "ThunderPanPlugin-defaultDownloadPath"
                        }
                    }]
                }, {
                    label: "同时上传任务数",
                    type: "confText",
                    text: "同时上传任务数",
                    classes: "xly-setting-content__title",
                    liClasses: "xly-setting-content__align",
                    liStyles: "display: flex; align-items: center;",
                    children: [{
                        name: "ThunderPanPlugin-MaxUploadTaskNum",
                        type: "confSelect",
                        label: "",
                        classes: "xly-select-size-1",
                        option: ["1", "2", "3", "4", "5"]
                    }]
                }, {
                    name: "ThunderPanPlugin-MaxDownloadTaskNum",
                    label: "同时下载任务数",
                    type: "confText",
                    text: "同时下载任务数",
                    classes: "xly-setting-content__title",
                    liClasses: "xly-setting-content__align",
                    liStyles: "display: flex; align-items: center;",
                    children: [{
                        name: "ThunderPanPlugin-MaxDownloadTaskNum",
                        type: "confSelect",
                        label: "",
                        classes: "xly-select-size-1",
                        option: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
                    }]
                }, {
                    name: "ThunderPanPlugin-StartCloudStopDownload",
                    type: "confCheckbox",
                    outerClass: "xly-setting-content__item xly-setting-content__title",
                    label: "开始云播时自动暂停下载"
                }, {
                    name: "ThunderPanPlugin-SetVODCachePath",
                    type: "confCheckbox",
                    outerClass: "xly-setting-content__item xly-setting-content__title",
                    label: "开启智能缓存，改善云盘视频播放体验"
                }, {
                    name: "ThunderPanPlugin-ShellContextmenu",
                    type: "confCheckbox",
                    outerClass: "xly-setting-content__item xly-setting-content__title",
                    label: "本地文件右键菜单显示“上传到迅雷云盘”"
                }]
            }, {
                name: "接管设置",
                children: [{
                    name: "Monitor-MonitorClipBoard",
                    type: "confCheckbox",
                    label: "接管剪切板"
                }, {
                    name: "Motitor-MotitorAll",
                    type: "confCheckbox",
                    label: "接管所有浏览器",
                    ulClasses: "xly-setting-content__horizontal",
                    children: []
                }, {
                    name: "",
                    type: "confText",
                    text: "接管下载类型",
                    value: "xly-setting-content__text",
                    ulClasses: "xly-setting-content__horizontal",
                    children: [{
                        name: "Monitor-WatchTraditionLink",
                        type: "confCheckbox",
                        label: "传统下载",
                        option: []
                    }, {
                        name: "Monitor-ConfigWatch_Bt",
                        type: "confCheckbox",
                        label: "BT下载"
                    }, {
                        name: "EMuleGenericSettings-EMuleWatchLink",
                        type: "confCheckbox",
                        label: "eMule下载",
                        option: []
                    }, {name: "MagnetGenericSettings-MagnetWatchLink", type: "confCheckbox", label: "磁力链接下载"}]
                }, {
                    name: "",
                    text: "下载文件拓展名",
                    type: "confText",
                    liStyles: "display: flex; align-items: center;",
                    classes: "xly-setting-content__title",
                    children: [{
                        type: "confBtn",
                        label: "下载文件拓展名",
                        listEles: [{
                            text: "点击编辑",
                            bindName: "Monitor-WatchTraditionLink",
                            classes: "td-button td-button--small td-button--other",
                            boxType: "pop",
                            pop: {
                                title: "编辑下载文件扩展名",
                                maximizable: !1,
                                schema: [{
                                    type: "confText",
                                    classes: "xly-dialog-setting__tips",
                                    text: " 您可以编辑传统下载中的下载文件扩展名："
                                }, {type: "confTextarea", name: "Monitor-ExtendNames"}],
                                formData: {
                                    "Monitor-ExtendNames": {
                                        section: "Monitor",
                                        key: "ExtendNames",
                                        value: a.BHOConfigNS.getDefaultExtendNames()
                                    }
                                }
                            }
                        }]
                    }]
                }]
            }, {
                name: "下载设置",
                classes: "xly-setting-down",
                children: [{
                    name: "TaskDefaultSettings-OpenSilenceDownload",
                    type: "confCheckbox",
                    label: "一键下载",
                    extEles: [{
                        type: "confTip",
                        text: '"一键下载" 生效时,点击下载链接将直接建立下载任务,不会弹出新建任务面板',
                        classes: "xly-icon-help"
                    }]
                }, {
                    label: "下载目录",
                    type: "confText",
                    text: "下载目录",
                    classes: "xly-setting-content__title",
                    liClasses: "xly-setting-content__align",
                    children: [{
                        name: "TaskDefaultSettings-DefaultPath",
                        type: "confSelect",
                        label: "",
                        optionByName: "PathAndCategory-historyDownloadPaths",
                        liClasses: "td-select xly-select-setting",
                        slotOption: "openDirectory",
                        editable: !0,
                        hasDeleteOption: !0,
                        deleteOptionText: "清除历史下载目录",
                        maxOptionLen: 5,
                        blurUpdate: !0,
                        rules: [["rule, value, callback", "let errors = [];\n                    do {\n                      let dir = '';\n                      let ip = '';\n                      if (/^[c-zC-Z]:\\\\/.test(value)) {\n                        dir = value.slice(3);\n                      } else {\n                        if (value.indexOf('\\\\\\\\') === 0) {\n                          let index = value.indexOf('\\\\', 2);\n                          if (index === -1 || index === value.length - 1) {\n                            errors.push(new Error('不合法的存储路径'));\n                            break;\n                          }\n                          dir = value.slice(2);\n                          ip = dir.substr(0, index - 2);\n                          if (ip === '') {\n                            errors.push(new Error('不合法的存储路径'));\n                            break;\n                          }\n                        } else {\n                          errors.push(new Error('不合法的存储路径'));\n                          break;\n                        }\n                      }\n                      if (/[\\*\\\"<>\\?:\\|]/i.test(dir)) {\n                        errors.push(new Error('下载目录名称不能包含下列任何字符：:|* ?“<>'));\n                        break;\n                      }\n                      if (value.length > 256) {\n                        errors.push(new Error('您输入的下载目录路径长度超过系统限制，请控制在256个字符以内'));\n                        break;\n                      }\n                      if (ip === '') {\n                        break;\n                      }\n                      let index = ip.indexOf('.ipv6-literal.net');\n                      if (index !== -1) {\n                        ip = ip.substr(0, index);\n                        index = ip.indexOf('%');\n                        if (index !== -1) {\n                          ip = ip.substr(0, index);\n                        }\n                        ip = ip.replace(/\\-/g, ':');\n                        if (!/^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$/.test(ip)) {\n                          errors.push(new Error('不合法的存储路径'));\n                        }\n                      } else {\n                        if (\n                          !/(?=(\\b|\\D))(((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))\\.){3}((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))(?=(\\b|\\D))/.test(\n                            ip\n                          )\n                        ) {\n                          errors.push(new Error('不合法的存储路径'));\n                        }\n                      }\n                    } while (false);\n                    callback(errors);"]]
                    }, {
                        name: "TaskDefaultSettings-UseLastCatalog",
                        type: "confCheckbox",
                        label: "自动修改为上次使用的目录",
                        linkItem: {
                            section: "PathAndCategory",
                            key: "LastUsedPath",
                            name: "TaskDefaultSettings-DefaultPath"
                        }
                    }]
                }, {
                    name: "TaskDefaultSettings-OrignHostThreads",
                    type: "confSelect",
                    label: "原始地址线程数",
                    classes: "xly-select-size-1",
                    outerClass: "xly-setting-content__inline",
                    option: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
                }, {
                    name: "TaskDefaultSettings-MaxResourceLimit",
                    type: "confCheckboxInput",
                    label: "限制全局最大同时下载资源数",
                    styles: "display: flex; align-items: center;",
                    extEles: [{
                        type: "confInput",
                        name: "TaskDefaultSettings-MaxResourceCount",
                        label: " ",
                        toolTipsContent: "输入值必须大于0",
                        rules: [["rule, value, callback", "let errors = [];\n                    let speed = 100;\n                    if (value.trim() !== '') {\n                      speed = Number(value);\n                      if (isNaN(speed) || speed <= 0) {\n                        errors.push(new Error('输入值必须大于0'));\n                      }\n                      callback(errors);\n                    }"]],
                        outClasses: "xly-select-size-2"
                    }, {
                        type: "confTip",
                        text: "如果您在使用迅雷下载时，发现网络响应变慢或掉线等情况。\n这可能是由于您的路由器性能难以支撑较大的同时下载资源\n数。您可以尝试降低此项数值，从而降低路由器的负载。建\n议您在保持网络稳定的前提下，让此项数值尽可能的大",
                        classes: "xly-icon-help"
                    }]
                }, {
                    name: "TaskDefaultSettings-AwayModeEnabled",
                    type: "confCheckbox",
                    label: '启用"离开模式"',
                    extEles: [{
                        type: "confTip",
                        text: "启用“离开模式”后，在电脑处于“睡眠”状态时，\n迅雷仍然能帮您继续下载资源",
                        classes: "xly-icon-help"
                    }]
                }]
            }, {
                name: "任务管理",
                classes: "xly-setting-content__vertical",
                children: [{
                    name: "ConfigNormalSession-ConfigNormal_AutoStartUnFinishedTask",
                    type: "confCheckbox",
                    label: "启动迅雷后自动开始未完成任务"
                }, {
                    name: "ConfigNormalSession-ConfigNormal_MaxRunningTaskCount",
                    type: "confSelect",
                    label: "同时下载的最大任务数",
                    classes: "xly-select-size-1",
                    outerClass: "xly-setting-content__inline",
                    option: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50"]
                }, {
                    name: "ConfigNormalSession-ConfigNormal_AutoSlowTask2Tail",
                    type: "confCheckbox",
                    label: "自动将低速任务移动至列尾"
                }, {
                    name: "ConfigNoLimitDownload-TaskCountAutoAdd",
                    type: "confCheckboxInput",
                    label: "全局下载速度低于",
                    styles: "display: flex; align-items: center;",
                    extEles: [{
                        type: "confInput",
                        name: "ConfigNoLimitDownload-TaskCountAutoAddRate",
                        label: " ",
                        toolTipsContent: "输入速度值必须大于0",
                        rules: [["rule, value, callback", "let errors = [];\n                    let speed = 100;\n                    if (value.trim() !== '') {\n                      speed = Number(value);\n                      if (isNaN(speed) || speed <= 0) {\n                        errors.push(new Error('输入速度值必须大于0'));\n                      }\n                      callback(errors);\n                    }"]],
                        outClasses: "xly-input-size-1"
                    }, {
                        type: "confText",
                        classes: "xly-input-size",
                        text: " KB/s自动增加同时下载任务数",
                        style: "padding-right: 3px"
                    }, {
                        type: "confTip",
                        text: "当您使用迅雷进行排队下载时，开启本选项能够尽量\n充分利用您的网络带宽进行下载。本选项合理的设定\n值应为您的网络带宽最大下载速度的80%。假设您最\n大下载速度曾达到1000KB/s，则此项合理的设定值\n应为800KB/s。",
                        classes: "xly-icon-help"
                    }]
                }, {
                    name: "ConfigNoLimitDownload-OpenNoLimitDownload",
                    type: "confCheckboxSelect",
                    label: "优先下载小于",
                    extEles: [{
                        type: "confSelect",
                        classes: "xly-select-size-1",
                        name: "ConfigNoLimitDownload-NoLimitDownloadFileSize",
                        option: ["5", "10", "20", "30", "50", "100"],
                        style: "padding-left: 3px"
                    }, {type: "confText", classes: "textCenter flexLay", text: "MB的任务", style: "padding-left: 5px"}],
                    classes: "flexLay"
                }, {
                    name: "ConfigNormalSession-ConfigNormal_AutoDeleteNotExistFile",
                    type: "confCheckbox",
                    label: "自动删除“文件不存在”的任务"
                }, {name: "TaskDefaultSettings-OpenFile", type: "confCheckbox", label: "下载完成后自动打开"}]
            }, {
                name: "提醒",
                children: [{
                    name: "ConfigMsg-ConfigMsg_Finish",
                    type: "confCheckbox",
                    label: "下载完成时右下角弹窗提示"
                }, {
                    name: "ConfigMsg-ConfigMsg_FailSuggest",
                    type: "confCheckbox",
                    label: "下载失败时右下角弹窗提示"
                }, {
                    name: "ConfigMsg-ConfigMsg_PlayWaveWhileFinish",
                    type: "confCheckbox",
                    label: "下载完成后播放提示音"
                }, {
                    type: "confSelect",
                    name: "ConfigMsg-ConfigMsg_WavePath",
                    classes: "xly-select-setting--normal td-select xly-select-setting",
                    slotOption: "openFile",
                    outerClass: "td-checkbox",
                    editable: !0
                }, {
                    name: "UserCommunitySet-radio_id_",
                    type: "confCheckbox",
                    label: "接收消息通知",
                    isReleventUser: !0
                }, {
                    name: "UserCommunitySet-radio_addNetDiskMessage_id_",
                    type: "confCheckbox",
                    label: "云盘添加完成和失败时右下角弹窗通知",
                    isReleventUser: !0
                }]
            }, {
                name: "悬浮窗",
                classes: "xly-setting-content__vertical",
                children: [{
                    name: "ConfigFloatPanel-FloatPanelValue",
                    type: "confRadio",
                    label: "显示悬浮窗",
                    option: ["0", "1", "2"],
                    labels: ["显示悬浮窗", "下载时显示悬浮窗", "隐藏悬浮窗"],
                    ulClasses: "xly-setting-content__vertical"
                }]
            }, {
                name: "高级设置",
                classes: "xly-setting-content xly-setting-advanced",
                children: [{
                    name: "",
                    type: "confText",
                    ulClasses: "xly-setting-content__indentation",
                    text: "BT下载",
                    children: [{
                        name: "BtGenericSettings-AutoBTNewTask",
                        type: "confCheckbox",
                        label: "下载种子文件后自动打开新建面板"
                    }, {name: "BtGenericSettings-AssocTorrent", type: "confCheckbox", label: "启动时关联BT种子文件(.torrent文件)"}]
                }, {
                    name: "",
                    text: "下载磁盘缓存",
                    type: "confText",
                    tip: "磁盘缓存越大，下载速度越快，占用资源越多",
                    tipClass: "xly-setting-content__description",
                    children: [{
                        name: "DiskCache-DiskCacheSelect",
                        type: "confRadio",
                        label: "256",
                        ulClasses: "xly-setting-content__horizontal",
                        option: ["128", "256", "512"],
                        labels: ["128M", "256M", "512M"]
                    }]
                }, {
                    label: "下载加速",
                    text: "下载加速",
                    type: "confText",
                    ulClasses: "xly-setting-content__indentation xly-setting-content__break",
                    children: [{
                        name: "ConfigNet-ConfigNet_OpenMirrorImageIncreaseSpeed",
                        type: "confCheckbox",
                        label: "开启镜像服务器加速"
                    }, {
                        name: "",
                        text: "全网数据挖掘，自动匹配与原始资源相同的镜像供用户下载",
                        label: "",
                        type: "confText",
                        classes: "xly-setting-content__description"
                    }, {
                        name: "ConfigNet-ConfigNet_OpenXunleiP2PIncreaseSpeed",
                        type: "confCheckbox",
                        label: "开启迅雷P2P加速"
                    }, {
                        name: "",
                        label: "",
                        text: "利用P2P技术进行用户间加速，该通道产生的上传流量会慢慢提升通道的健康度，从而提升通道加速效果",
                        type: "confText",
                        classes: "xly-setting-content__description"
                    }]
                }, {
                    text: "下载代理设置",
                    ulClasses: "xly-setting-content__vertical",
                    type: "confText",
                    tip: "该设置仅对下载生效，对网页浏览无效",
                    tipClass: "xly-setting-content__description",
                    children: [{
                        name: "ProxySetting-ConfigProxy_Type",
                        type: "confRadio",
                        ulClasses: "xly-setting-content__part",
                        extEles: [{type: "", label: " "}, {type: "", label: " "}, {
                            type: "confContainer",
                            label: "",
                            ulClasses: "xly-setting-advanced__config",
                            extEles: [{
                                name: "ProxySetting-ConnectType_Hub",
                                type: "confSelect",
                                label: "迅雷服务器连接",
                                classes: "xly-select-size-2 xly-setting-advanced__box",
                                updateByDataChange: !0,
                                optionByName: "ConnectType-ProxyName"
                            }, {
                                name: "ProxySetting-ConnectType_Http",
                                type: "confSelect",
                                label: "HTTP连接",
                                classes: "xly-select-size-2",
                                updateByDataChange: !0,
                                optionByName: "ConnectType-ProxyName"
                            }, {
                                name: "ProxySetting-ConnectType_Ftp",
                                type: "confSelect",
                                label: "FTP连接",
                                classes: "xly-select-size-2",
                                updateByDataChange: !0,
                                optionByName: "ConnectType-ProxyName"
                            }]
                        }],
                        extActiveValue: "2",
                        labels: ["不使用代理服务器", "使用IE代理服务器", "使用自定义代理服务器"],
                        option: ["0", "1", "2"]
                    }, {name: "", type: "confProxyList"}]
                }, {
                    text: "下载完成视频播放关联",
                    ulClasses: "xly-setting-content__vertical",
                    type: "confText",
                    tip: "该设置仅对下载完成的视频生效",
                    tipClass: "xly-setting-content__description",
                    children: [{
                        name: "CompletedTaskPlay-LanuchMediaPlayer",
                        type: "confRadio",
                        ulClasses: "xly-setting-content__part",
                        labels: ["播放组件", "迅雷影音", "系统默认"],
                        option: ["0", "1", "2"]
                    }]
                }]
            }], formData: {
                "ThunderPanPlugin-MaxUploadTaskNum": {section: "ThunderPanPlugin", key: "MaxUploadTaskNum", value: 2},
                "ThunderPanPlugin-MaxDownloadTaskNum": {
                    section: "ThunderPanPlugin",
                    key: "MaxDownloadTaskNum",
                    value: 5
                },
                "ThunderPanPlugin-defaultDownloadPath": {
                    section: "ThunderPanPlugin",
                    key: "defaultDownloadPath",
                    value: "C:\\迅雷下载"
                },
                "ThunderPanPlugin-downloadPaths": {section: "ThunderPanPlugin", key: "downloadPaths", value: []},
                "ThunderPanPlugin-useDefault": {section: "ThunderPanPlugin", key: "useDefault", value: !1},
                "ThunderPanPlugin-lastUsePath": {section: "ThunderPanPlugin", key: "lastUsePath", value: !0},
                "ThunderPanPlugin-defaultSavePath": {
                    section: "ThunderPanPlugin",
                    key: "defaultSavePath",
                    value: "我的云盘"
                },
                "ThunderPanPlugin-savePaths": {section: "ThunderPanPlugin", key: "savePaths", value: []},
                "ThunderPanPlugin-StartCloudStopDownload": {
                    section: "ThunderPanPlugin",
                    key: "StartCloudStopDownload",
                    value: !0
                },
                "ThunderPanPlugin-SetVODCachePath": {section: "ThunderPanPlugin", key: "SetVODCachePath", value: !0},
                "ThunderPanPlugin-ShellContextmenu": {section: "ThunderPanPlugin", key: "ShellContextmenu", value: !0},
                "ConfigNormalSession-ConfigNormal_AutoRun": {
                    section: "ConfigNormalSession",
                    key: "ConfigNormal_AutoRun",
                    value: !0
                },
                "Others-AntiDisturb": {section: "Others", key: "AntiDisturb", value: !0},
                "ConfigNormalSession-ConfigNormal_AutoStartUnFinishedTask": {
                    section: "ConfigNormalSession",
                    key: "ConfigNormal_AutoStartUnFinishedTask",
                    value: !1
                },
                "TaskDefaultSettings-DefaultPath": {section: "TaskDefaultSettings", key: "DefaultPath", value: ""},
                "TaskDefaultSettings-UseLastCatalog": {
                    section: "TaskDefaultSettings",
                    key: "UseLastCatalog",
                    value: !0
                },
                "DiskCache-DiskCacheSelect": {section: "DiskCache", key: "DiskCacheSelect", value: "256"},
                "TaskDefaultSettings-NewTaskStartMode": {
                    section: "TaskDefaultSettings",
                    key: "NewTaskStartMode",
                    value: "立即下载",
                    optionToValue: {"立即下载": 1, "手动下载": 0}
                },
                "ConfigNormalSession-ConfigNormal_MaxRunningTaskCount": {
                    section: "ConfigNormalSession",
                    key: "ConfigNormal_MaxRunningTaskCount",
                    value: "5"
                },
                "ConfigNormalSession-ConfigNormal_AutoDeleteNotExistFile": {
                    section: "ConfigNormalSession",
                    key: "ConfigNormal_AutoDeleteNotExistFile",
                    value: !1
                },
                "TaskDefaultSettings-OpenFile": {section: "TaskDefaultSettings", key: "OpenFile", value: !1},
                "ConfigNet-ConfigNet_Type": {section: "ConfigNet", key: "ConfigNet_Type", value: "1"},
                "ProxySetting-ConfigProxy_Type": {section: "ProxySetting", key: "ConfigProxy_Type", value: "0"},
                "ProxySetting-ConnectType_Hub": {section: "ProxySetting", key: "ConnectType_Hub", value: "直接连接"},
                "ProxySetting-ConnectType_Http": {section: "ProxySetting", key: "ConnectType_Http", value: "直接连接"},
                "ProxySetting-ConnectType_Ftp": {section: "ProxySetting", key: "ConnectType_Ftp", value: "直接连接"},
                "ConfigMsg-ConfigMsg_Finish": {section: "ConfigMsg", key: "ConfigMsg_Finish", value: !0},
                "ConfigMsg-ConfigMsg_PlayWaveWhileFinish": {
                    section: "ConfigMsg",
                    key: "ConfigMsg_PlayWaveWhileFinish",
                    value: !0
                },
                "ConfigMsg-ConfigMsg_WavePath": {section: "ConfigMsg", key: "ConfigMsg_WavePath", value: l},
                "ConfigMsg-ConfigMsg_FailSuggest": {section: "ConfigMsg", key: "ConfigMsg_FailSuggest", value: !0},
                "ConfigMsg-ConfigMsg_TodayRecommend": {
                    section: "ConfigMsg",
                    key: "ConfigMsg_TodayRecommend",
                    value: !0
                },
                "Monitor-MonitorClipBoard": {section: "Monitor", key: "MonitorClipBoard", value: !0},
                "Monitor-ShortcutMonitor": {section: "Monitor", key: "ShortcutMonitor", value: !0},
                "Monitor-WatchTraditionLink": {section: "Monitor", key: "WatchTraditionLink", value: !0},
                "Monitor-ConfigWatch_Bt": {section: "Monitor", key: "ConfigWatch_Bt", value: !0},
                "EMuleGenericSettings-EMuleWatchLink": {
                    section: "EMuleGenericSettings",
                    key: "EMuleWatchLink",
                    value: !0
                },
                "MagnetGenericSettings-MagnetWatchLink": {
                    section: "MagnetGenericSettings",
                    key: "MagnetWatchLink",
                    value: !0
                },
                "BtGenericSettings-AutoBTNewTask": {section: "BtGenericSettings", key: "AutoBTNewTask", value: !0},
                "BtGenericSettings-AssocTorrent": {section: "BtGenericSettings", key: "AssocTorrent", value: !0},
                "TaskDefaultSettings-OpenSilenceDownload": {
                    section: "TaskDefaultSettings",
                    key: "OpenSilenceDownload",
                    type: "number",
                    value: 0
                },
                "TaskDefaultSettings-AwayModeEnabled": {
                    section: "TaskDefaultSettings",
                    key: "AwayModeEnabled",
                    value: !1
                },
                "BossKey-BossKeySwitch": {section: "BossKey", key: "BossKeySwitch", value: !1},
                "BossKey-BossKeyName": {section: "BossKey", key: "BossKeyName", value: "Alt+D"},
                "TaskDefaultSettings-NewTaskDlgWithoutMainWnd": {
                    section: "TaskDefaultSettings",
                    key: "NewTaskDlgWithoutMainWnd",
                    value: !0
                },
                "ConfigFloatPanel-FloatPanelValue": {
                    section: "ConfigFloatPanel",
                    key: "FloatPanelValue",
                    value: "0",
                    immediatelySave: !0
                },
                "TaskDefaultSettings-OrignHostThreads": {
                    section: "TaskDefaultSettings",
                    key: "OrignHostThreads",
                    value: "5"
                },
                "TaskDefaultSettings-MaxResourceLimit": {
                    section: "TaskDefaultSettings",
                    key: "MaxResourceLimit",
                    value: !1
                },
                "TaskDefaultSettings-MaxResourceCount": {
                    section: "TaskDefaultSettings",
                    key: "MaxResourceCount",
                    value: "500"
                },
                "ConfigNoLimitDownload-TaskCountAutoAdd": {
                    section: "ConfigNoLimitDownload",
                    key: "TaskCountAutoAdd",
                    value: !1
                },
                "ConfigNoLimitDownload-TaskCountAutoAddRate": {
                    section: "ConfigNoLimitDownload",
                    key: "TaskCountAutoAddRate",
                    value: "100"
                },
                "ConfigNormalSession-ConfigNormal_AutoSlowTask2Tail": {
                    section: "ConfigNormalSession",
                    key: "ConfigNormal_AutoSlowTask2Tail",
                    value: !1
                },
                "ConfigNoLimitDownload-OpenNoLimitDownload": {
                    section: "ConfigNoLimitDownload",
                    key: "OpenNoLimitDownload",
                    value: !1
                },
                "ConfigNoLimitDownload-NoLimitDownloadFileSize": {
                    section: "ConfigNoLimitDownload",
                    key: "NoLimitDownloadFileSize",
                    value: "30"
                },
                "ConfigNet-ConfigNet_OpenMirrorImageIncreaseSpeed": {
                    section: "ConfigNet",
                    key: "ConfigNet_OpenMirrorImageIncreaseSpeed",
                    value: !0
                },
                "ConfigNet-ConfigNet_OpenXunleiP2PIncreaseSpeed": {
                    section: "ConfigNet",
                    key: "ConfigNet_OpenXunleiP2PIncreaseSpeed",
                    value: !0
                },
                "ConfigNet-ConfigNet_Custom_DownloadSpeedChk": {
                    section: "ConfigNet",
                    key: "ConfigNet_Custom_DownloadSpeedChk",
                    value: !0,
                    immediatelySave: !0
                },
                "ConfigNet-ConfigNet_Custom_UploadSpeedChk": {
                    section: "ConfigNet",
                    key: "ConfigNet_Custom_UploadSpeedChk",
                    value: !0,
                    immediatelySave: !0
                },
                "ConfigNet-ConfigNet_Custom_MaxDownloadSpeed": {
                    section: "ConfigNet",
                    key: "ConfigNet_Custom_MaxDownloadSpeed",
                    value: "1024",
                    immediatelySave: !0
                },
                "ConfigNet-ConfigNet_Custom_MaxUploadSpeed": {
                    section: "ConfigNet",
                    key: "ConfigNet_Custom_MaxUploadSpeed",
                    value: "1024",
                    immediatelySave: !0
                },
                "ConfigNet-ConfigNet_Custom_Time_Switch": {
                    section: "ConfigNet",
                    key: "ConfigNet_Custom_Time_Switch",
                    value: !1,
                    immediatelySave: !0
                },
                "ConfigNet-ConfigNet_Custom_Time_Begin_Hour": {
                    section: "ConfigNet",
                    key: "ConfigNet_Custom_Time_Begin_Hour",
                    value: "0",
                    immediatelySave: !0
                },
                "ConfigNet-ConfigNet_Custom_Time_Begin_Minute": {
                    section: "ConfigNet",
                    key: "ConfigNet_Custom_Time_Begin_Minute",
                    value: "0",
                    immediatelySave: !0
                },
                "ConfigNet-ConfigNet_Custom_Time_End_Hour": {
                    section: "ConfigNet",
                    key: "ConfigNet_Custom_Time_End_Hour",
                    value: "23",
                    immediatelySave: !0
                },
                "ConfigNet-ConfigNet_Custom_Time_End_Minute": {
                    section: "ConfigNet",
                    key: "ConfigNet_Custom_Time_End_Minute",
                    value: "59",
                    immediatelySave: !0
                },
                "BtGenericSettings-ConfigBt_SetPortType": {
                    section: "BtGenericSettings",
                    key: "ConfigBt_SetPortType",
                    value: "0"
                },
                "BtGenericSettings-ConfigBt_Manul_TcpPort": {
                    section: "BtGenericSettings",
                    key: "ConfigBt_Manul_TcpPort",
                    value: "15000"
                },
                "UserCommunitySet-radio_id_": {
                    section: "UserCommunitySet",
                    key: "radio_id_",
                    value: !0,
                    isReleventUser: !0,
                    immediatelySave: !0
                },
                "UserCommunitySet-radio_addNetDiskMessage_id_": {
                    section: "UserCommunitySet",
                    key: "radio_addNetDiskMessage_id_",
                    value: !0,
                    isReleventUser: !0,
                    immediatelySave: !0
                },
                "GenericSettings-AnimationLevel": {section: "GenericSettings", key: "AnimationLevel", value: "1"},
                "Motitor-MotitorAll": {
                    section: "Motitor",
                    key: "MotitorAll",
                    value: 1,
                    type: "number",
                    selectItems: ["Motitor-MotitorIE浏览器"]
                },
                "Bookmark-ShowBookmarkBar": {section: "Bookmark", key: "ShowBookmarkBar", value: 1},
                "PathAndCategory-historyDownloadPaths": {
                    section: "PathAndCategory",
                    key: "historyDownloadPaths",
                    value: []
                },
                "DownloadAndPlay-LanuchMediaPlayer": {
                    section: "DownloadAndPlay",
                    key: "LanuchMediaPlayer",
                    value: "0",
                    immediatelySave: !0
                },
                "CompletedTaskPlay-LanuchMediaPlayer": {
                    section: "CompletedTaskPlay",
                    key: "LanuchMediaPlayer",
                    value: "1",
                    immediatelySave: !0
                },
                "ConnectType-ProxyName": {section: "ConnectType", key: "ProxyName", value: ["直接连接"]}
            }
        }, e.setBaseConf = function () {
            let t = Object.values(e.conf.formData);
            for (let i = 0; i < t.length; i++) {
                let n = "";
                if (void 0 !== t[i].optionToValue) {
                    let e = o.ConfigNS.getValue(t[i].section, t[i].key, t[i].optionToValue[t[i].value]);
                    for (let o in t[i].optionToValue) if (t[i].optionToValue[o] === e) {
                        n = o;
                        break
                    }
                } else n = o.ConfigNS.getValue(t[i].section, t[i].key, t[i].value);
                e.conf.formData[`${t[i].section}-${t[i].key}`].value = n
            }
        }, e.initConf = function () {
            return o.ConfigNS.init(r.join(__profilesDir, "config.json"))
        }, e.getConfSchema = function () {
            return e.conf.sechema
        }, e.getConfFormData = function () {
            return e.conf.formData
        }, e.addSettingItemData = function (t, i) {
            let n = !1;
            if (t.name && t.name.length > 0 && t.children) {
                let i = !1;
                for (let o = 0; o < e.conf.sechema.length; ++o) if (e.conf.sechema[o].name === t.name) {
                    i = !0;
                    let a = t.children[0], r = !1;
                    for (let t = 0; t < e.conf.sechema[o].children.length; ++t) {
                        let i = e.conf.sechema[o].children[t];
                        if (i.name === a.name) {
                            if (r = !0, n = !0, a.children.length > 0) for (let e = 0; e < a.children.length; ++e) if (i.children.length > 0) {
                                let t = !1;
                                for (let n = 0; n < i.children.length; ++n) if (a.children[e].name === i.children[n].name) {
                                    t = !0, i.children[n] = a.children[e];
                                    break
                                }
                                t || i.children.push(a.children[e])
                            } else i.children.push(a.children[e]);
                            break
                        }
                    }
                    r || (n = !0, e.conf.sechema[o].children.push(t.children[0]));
                    break
                }
                i || (n = !0, e.conf.sechema.push(t))
            }
            for (let t in i) e.conf.formData[t] = i[t];
            return n
        }, e.removeSettingItemData = function (t, i) {
            let n = !1;
            if (t.name && t.name.length > 0 && t.children) for (let i = 0; i < e.conf.sechema.length; ++i) if (e.conf.sechema[i].name === t.name) {
                let o = t.children[0];
                for (let t = 0; t < e.conf.sechema[i].children.length; ++t) {
                    let a = e.conf.sechema[i].children[t];
                    if (a.name === o.name) {
                        if (o.children.length > 0 && a.children.length > 0) for (let e = 0; e < o.children.length; ++e) for (let t = 0; t < a.children.length; ++t) if (o.children[e].name === a.children[t].name) {
                            n = !0, a.children.splice(t, 1);
                            break
                        }
                        0 === a.children.length && (n = !0, e.conf.sechema[i].children.splice(t, 1));
                        break
                    }
                }
                0 === e.conf.sechema[i].children.length && (n = !0, e.conf.sechema.splice(i, 1));
                break
            }
            for (let t in i) e.conf.formData[t] && delete e.conf.formData[t];
            return n
        }, e.removeSettingItem = t, e.addSettingItem = i, e.isSettingItemExist = d, e.getConfSchemaEx = function () {
            return n(this, void 0, void 0, function* () {
                return yield s.confAdd.updateAssociate(t, d, i), e.conf.sechema
            })
        }
    }(t.SettingInit || (t.SettingInit = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(0), r = i(9), s = i(22), l = i(4), d = i(91), u = i(8), c = i(32), h = i(23),
        f = i(26).DownloadKernelCategoryManager.getCategoryManager(), p = a.default.getLogger("task filter");
    let g = "全部", m = void 0;
    const v = `${__profilesDir}/task-filters.json`;
    let y = !1;
    !function (e) {
        let t;
        !function (e) {
            e[e.Name = 1] = "Name", e[e.Filter = 2] = "Filter"
        }(t || (t = {}));
        const i = [{
                type: "checkbox",
                label: "视频文件",
                extFilter: "avi|mp4|mkv|mpeg|mpg|wmv|rmvb|rm|mov|ts|m2ts|tp|3gp|flv"
            }, {
                type: "checkbox",
                label: "音频文件",
                extFilter: "mp3|wma|m4a|aac|wav|flac|ape|alac|wv|opus|ogg|dts"
            }, {type: "checkbox", label: "图片文件", extFilter: "bmp|jpg|jpeg|png|gif|webp|psd|tga"}, {
                type: "checkbox",
                label: "应用程序",
                extFilter: "exe|msi|com|bat|cmd|py|vbs"
            }, {type: "checkbox", label: "压缩文件", extFilter: "rar|zip|7z|cab|lzh|jar"}, {
                type: "checkbox",
                label: "镜像文件",
                extFilter: "iso|img|bin|nrg|ccd|vcd|dts|cdi|gho|mds|mdf"
            }, {type: "checkbox", label: "文档文件", extFilter: "txt|doc|docx|xls|xlsx|csv|wps|rtf|pdf"}],
            a = [{type: "checkbox", label: "全部", id: "all"}, {type: "separator"}, {
                type: "checkbox",
                label: "BT任务",
                taskType: l.DownloadKernel.TaskType.Bt
            }, {type: "checkbox", label: "任务组", taskType: l.DownloadKernel.TaskType.Group}, {
                type: "normal",
                label: "自定义",
                id: "custom"
            }];
        let T = [...a];

        function w() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (y) break;
                    if (y = !0, !(yield u.FileSystemAWNS.existsAW(v))) {
                        T.splice(2, 0, ...i);
                        break
                    }
                    let e = (yield u.FileSystemAWNS.readFileAW(v)).toString(), t = null;
                    try {
                        t = JSON.parse(e)
                    } catch (e) {
                    }
                    t ? t.length > 0 && T.splice(2, 0, ...t) : T.splice(2, 0, ...i)
                } while (0)
            })
        }

        function k() {
            return T.filter(e => "custom" === e.id || "checkbox" === e.type && !e.id && !e.taskType)
        }

        function C() {
            return n(this, void 0, void 0, function* () {
                let e = -1;
                do {
                    let t = yield h.LoginHelperNS.loginHelper.getUserInfoAw("userid");
                    if (!t) break;
                    let i = f.getCategoryFromUserId("ThunderPanPlugin", t, "ThunderPan Download Category");
                    i && (e = i.getId())
                } while (0);
                return e
            })
        }

        e.initFilter = w, e.saveFilter = function (e, i) {
            return n(this, void 0, void 0, function* () {
                e = e.map(e => ({
                    label: e.label,
                    extFilter: e.extFilter,
                    nameFilter: e.nameFilter
                })), (T = [...a]).splice(2, 0, ...e), yield u.FileSystemAWNS.writeFileAW(v, JSON.stringify(e));
                let n = [-1], o = yield C();
                -1 !== o && n.push(o);
                do {
                    if (!m) break;
                    if (!i || !i.reason) break;
                    if ("remove" === i.reason) {
                        i.data.label === g && (g = "全部", m("全部"));
                        break
                    }
                    if (!i.data) break;
                    if ("modify" === i.reason && i.data.type) {
                        if (i.data.lastSelect !== g) break;
                        if ((i.data.type & t.Name) === t.Name && i.data.lastSelect && (g = i.data.label, m(g)), (i.data.type & t.Filter) === t.Filter) {
                            let e = l.DownloadKernel.FilterKeyType.ExtEqual;
                            i.data.nameFilter && (e = l.DownloadKernel.FilterKeyType.NameLikeAndExtEqual), c.ThunderKernel.filterTask(e, i.data.nameFilter ? i.data.nameFilter : "", i.data.extFilter ? i.data.extFilter : "", e => {
                                p.information("task filter", e), m(void 0, e)
                            }, n)
                        }
                        break
                    }
                } while (0)
            })
        }, e.reset = function () {
            g = "全部"
        }, e.refresh = function (e) {
            m = e
        }, e.getCustomOptions = k, e.getMenuOptions = function (e, t) {
            return n(this, void 0, void 0, function* () {
                yield w();
                let i = [], n = [e];
                if (-1 === e) {
                    let e = yield C();
                    -1 !== e && n.push(e)
                }
                for (let e of T) e.type = e.type ? e.type : "checkbox", "separator" === e.type ? i.push({type: e.type}) : i.push({
                    type: e.type,
                    label: e.label,
                    enabled: e.enabled,
                    icon: e.icon,
                    id: e.id,
                    checked: g === e.label,
                    click: i => {
                        let o = `category=${encodeURIComponent(i.label)}`;
                        r.XLStatNS.trackEvent("download_leftpanel", "finished_tab_float_click", "", 0, 0, 0, 0, o);
                        do {
                            if ("function" != typeof t) break;
                            if ("custom" === e.id) {
                                let e = k();
                                s.MessageBox.custom("custom-task-filter", {items: JSON.stringify(e)}, {
                                    width: 506,
                                    height: 390
                                }).catch();
                                break
                            }
                            if (i.label === g) {
                                p.information("select old item");
                                break
                            }
                            if (g = i.label, "all" === e.id) {
                                t(e);
                                break
                            }
                            let o = l.DownloadKernel.FilterKeyType.ExtEqual;
                            e.taskType ? o = l.DownloadKernel.FilterKeyType.TaskTypeEqual : e.nameFilter && "" !== e.nameFilter.trim() && (o = l.DownloadKernel.FilterKeyType.NameLikeAndExtEqual), c.ThunderKernel.filterTask(o, e.nameFilter ? e.nameFilter : "", e.extFilter ? e.extFilter : "", i => {
                                p.information("task filter", i), t(e, i)
                            }, n, void 0, e.taskType)
                        } while (0)
                    }
                });
                return i
            })
        }, e.showMenu = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                r.XLStatNS.trackEvent("download_leftpanel", "finished_tab_float_show"), yield w();
                let n = [], a = [t];
                if (-1 === t) {
                    let e = yield C();
                    -1 !== e && a.push(e)
                }
                for (let e of T) e.type = e.type ? e.type : "checkbox", "separator" === e.type ? n.push({type: e.type}) : n.push({
                    type: e.type,
                    label: e.label,
                    enabled: e.enabled,
                    icon: e.icon,
                    id: e.id,
                    checked: g === e.label,
                    click: t => {
                        let n = `category=${encodeURIComponent(t.label)}`;
                        r.XLStatNS.trackEvent("download_leftpanel", "finished_tab_float_click", "", 0, 0, 0, 0, n);
                        do {
                            if ("function" != typeof i) break;
                            if ("custom" === e.id) {
                                let e = k();
                                s.MessageBox.custom("custom-task-filter", {items: JSON.stringify(e)}, {
                                    width: 506,
                                    height: 390
                                }).catch();
                                break
                            }
                            if (t.label === g) {
                                p.information("select old item");
                                break
                            }
                            if (g = t.label, "all" === e.id) {
                                i(e);
                                break
                            }
                            let n = l.DownloadKernel.FilterKeyType.ExtEqual;
                            e.taskType ? n = l.DownloadKernel.FilterKeyType.TaskTypeEqual : e.nameFilter && "" !== e.nameFilter.trim() && (n = l.DownloadKernel.FilterKeyType.NameLikeAndExtEqual), c.ThunderKernel.filterTask(n, e.nameFilter ? e.nameFilter : "", e.extFilter ? e.extFilter : "", t => {
                                p.information("task filter", t), i(e, t)
                            }, a, void 0, e.taskType)
                        } while (0)
                    }
                });
                const u = yield o.asyncRemoteCall.getCurrentWindow(),
                    h = yield(yield o.asyncRemoteCall.getMenu()).buildFromTemplate(n);
                yield d.MenuSkinNS.setStyle(h, {});
                let f = e.getBoundingClientRect(), m = Math.round(f.left), v = Math.round(f.top);
                h.popup({window: u, x: m, y: v, async: !1})
            })
        }
    }(t.CompletedFilterNS || (t.CompletedFilterNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(10), r = i(13), s = i(25), l = i(23), d = i(0).default.getLogger("CommonLoginHelper");
    o.default.defaults.adapter = i(21);
    t.commonLoginHelper = new class {
        sendSmsAw(e) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                do {
                    let i = yield this.getCommonParmAw();
                    if (null === i || void 0 === i) break;
                    null !== e && void 0 !== e && "" !== e && (i = `${i}&creditkey=${e}`);
                    let n = null, a = "https://xluser-ssl.xunlei.com/msg/v1.1/SendSms?";
                    a = `${a}${i}`;
                    try {
                        null !== (n = yield o.default.get(a, {timeout: 1e4})) && void 0 !== n.status && 200 === n.status && void 0 !== n.data && null !== n.data && "" !== n.data && (t = JSON.stringify(n.data))
                    } catch (e) {
                        d.information("sendSmsAw:error=", e);
                        break
                    }
                } while (0);
                return t
            })
        }

        checkSmsAw(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = null;
                do {
                    if (null === e || void 0 === e) {
                        d.information("checkSmsAw token有问题 token：", e);
                        break
                    }
                    if (null === t || void 0 === t) {
                        d.information("checkSmsAw code有问题 code：", t);
                        break
                    }
                    let n = yield this.getCommonParmAw();
                    if (null === n || void 0 === n) break;
                    let a = null, r = "https://xluser-ssl.xunlei.com/msg/v1.1/CheckSms?";
                    r = `${r}${n = `${n}&token=${e}&code=${t}`}`;
                    try {
                        null !== (a = yield o.default.get(r, {timeout: 1e4})) && void 0 !== a.status && 200 === a.status && void 0 !== a.data && null !== a.data && "" !== a.data && (i = JSON.stringify(a.data))
                    } catch (e) {
                        d.information("sendSmsAw:error=", e);
                        break
                    }
                } while (0);
                return i
            })
        }

        isAutoPopupLogin() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                {
                    yield s.default.isInitedAw();
                    let t = s.default.getConfigInfo("login", "loginWndAutoPopup");
                    if (void 0 === t || null === t || -1 === t) e = !1; else if (0 === t) {
                        let t = yield this.getLoginWndShowConfigAw();
                        e = this.getCurDate() !== t
                    } else 1 === t && (e = !0)
                }
                return e
            })
        }

        setLoginWndShowConfig() {
            let e = this.getCurDate();
            a.ConfigNS.setValue("LoginWndAutoShow", "Date", e)
        }

        getCommonParmAw() {
            return n(this, void 0, void 0, function* () {
                let e = null;
                do {
                    let t = yield l.LoginHelperNS.loginHelper.isLoginedAw();
                    if (!0 !== t) {
                        d.information("getCommonParmAw 没有登陆 isLogin：", t);
                        break
                    }
                    let i = yield l.LoginHelperNS.loginHelper.getUserInfoAw();
                    if (null === i || void 0 === i) {
                        d.information("getCommonParmAw userInfo有问题 userInfo:", i);
                        break
                    }
                    let n = i.sessionid;
                    if (null === n || void 0 === n || "" === n) {
                        d.information("getCommonParmAw sessionid有问题 sessionid:", n);
                        break
                    }
                    let o = i.deviceid, a = i.userid;
                    try {
                        let t = yield l.LoginHelperNS.loginSDKHelper.getInitData(), i = JSON.parse(t), r = i.appid,
                            s = "PC-" + i.package;
                        e = `deviceid=${o}&sessionid=${n}&userid=${a}&platformVersion=${i.platform}&appid=${r}&appName=${s}&scene=040`
                    } catch (e) {
                    }
                } while (0);
                return e
            })
        }

        getCurDate() {
            let e = "", t = new Date;
            return e = `${t.getFullYear()}${t.getMonth() + 1}${t.getDate()}`
        }

        getLoginWndShowConfigAw() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    a.ConfigNS.attachListener(r.NodeEventMesssageNS.eventConfigInitFinished, () => {
                        let t = a.ConfigNS.getValue("LoginWndAutoShow", "Date", "");
                        e(t)
                    })
                })
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(91), r = i(0).default.getLogger("ConTextMenu");
    !function (e) {
        e.popContextMenu = function (e, t) {
            t && (r.information("params", t), t.isEditable ? function (e, t) {
                return n(this, void 0, void 0, function* () {
                    let e = [{
                            label: "撤销",
                            role: "undo",
                            enabled: t.editFlags.canUndo
                        }, {type: "separator"}, {label: "剪切", role: "cut", enabled: t.editFlags.canCut}, {
                            label: "复制",
                            role: "copy",
                            enabled: t.editFlags.canCopy
                        }, {label: "粘贴", role: "paste", enabled: t.editFlags.canPaste}, {
                            label: "删除",
                            role: "delete",
                            enabled: t.editFlags.canDelete
                        }, {type: "separator"}, {label: "全选", role: "selectAll", enabled: t.editFlags.canSelectAll}],
                        i = yield(yield o.asyncRemoteCall.getMenu()).buildFromTemplate(e);
                    yield a.MenuSkinNS.setStyle(i, {});
                    let n = yield o.asyncRemoteCall.getCurrentWindow();
                    yield i.popup({window: n})
                })
            }(0, t).catch() : "" !== t.selectionText && function (e, t) {
                return n(this, void 0, void 0, function* () {
                    let e = [{label: "复制", role: "copy", enabled: t.editFlags.canCopy}],
                        i = yield(yield o.asyncRemoteCall.getMenu()).buildFromTemplate(e);
                    yield a.MenuSkinNS.setStyle(i, {});
                    let n = yield o.asyncRemoteCall.getCurrentWindow();
                    yield i.popup({window: n})
                })
            }(0, t).catch())
        }, e.popupAt = function (e, t, i) {
            {
                let e = i.getBoundingClientRect();
                t.x = void 0 !== t.x ? t.x : Math.round(e.left), t.y = void 0 !== t.y ? t.y : Math.round(e.bottom)
            }
            e.popup(t)
        }
    }(t.ContextMenuNS || (t.ContextMenuNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t;
        !function (e) {
            e[e.Default = 0] = "Default", e[e.Color = 1] = "Color", e[e.Wallpaper = 2] = "Wallpaper", e[e.Custom = 3] = "Custom", e[e.Cool = 4] = "Cool"
        }(t = e.SkinType || (e.SkinType = {})), e.defaultSkinInfo = {type: t.Default, colorID: 0, classes: ""}
    }(t.SkinHelperNS || (t.SkinHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(13), a = i(10);

    class r extends a.Config {
        constructor() {
            super(), this.isInit = !0
        }

        init(e) {
            return n(this, void 0, void 0, function* () {
            })
        }

        save() {
            return n(this, void 0, void 0, function* () {
            })
        }

        saveSync() {
        }

        fireValueChangedEvent(e, t, i, n) {
            this.eventContainer.fireEvent(o.NodeEventMesssageNS.eventMemoryConfigValueChanged, e, t, i, n)
        }
    }

    t.MemoryConfig = r;
    const s = new r;
    !function (e) {
        e.getValue = function (e, t, i) {
            return s.getValue(e, t, i)
        }, e.setValue = function (e, t, i) {
            s.setValue(e, t, i)
        }, e.removeValue = function (e, t) {
            s.removeValue(e, t)
        }, e.attachListener = function (e, t) {
            s.attachListener(e, t)
        }, e.detachListener = function (e, t) {
            s.detachListener(e, t)
        }
    }(t.MemoryConfigNS || (t.MemoryConfigNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), a = i(0), r = i(20), s = a.default.getLogger("SyncMsgHelper");
    !function (e) {
        let t;
        !function (e) {
            e[e.Connecting = 0] = "Connecting", e[e.Connected = 1] = "Connected", e[e.Close = 2] = "Close", e[e.Error = 3] = "Error"
        }(t = e.SyncMsgState || (e.SyncMsgState = {}));
        let i = t.Close, a = null, l = null, d = void 0;

        function u() {
            return n(this, void 0, void 0, function* () {
                let e = yield o.client.isRemoteClientExist("User");
                return s.information("checkSyncMsg", e), e[0]
            })
        }

        function c() {
            return n(this, void 0, void 0, function* () {
                let e = yield o.client.callRemoteClientFunction("User", "SyncIsConnected");
                return s.information("syncIsConnected", e), e[0]
            })
        }

        e.init = function () {
            return n(this, void 0, void 0, function* () {
                if (a || (a = new r.EventEmitter), d = o.client.attachServerEvent("SyncEvent", (e, o) => n(this, void 0, void 0, function* () {
                    let n = null;
                    try {
                        n = JSON.parse(o)
                    } catch (e) {
                        s.warning("attachSyncEvent SyncEvent error", e)
                    }
                    if (s.information("attachSyncEvent SyncEvent", e, n), n) {
                        let e = i;
                        "connect" === n.subject ? e = t.Connected : "reconnect" === n.subject ? e = t.Connecting : "failed" === n.subject && (e = t.Close), e !== i && (i = e, a.emit("SyncMsgStateChange", i, n))
                    }
                })), yield u()) {
                    let e = yield o.client.callServerFunction("GetSyncMsgState");
                    s.information("state", e);
                    let n = i;
                    switch (e) {
                        case t.Connected:
                        case t.Connecting:
                        case t.Close:
                        case t.Error:
                            n = e
                    }
                    n !== i && (i = n, a.emit("SyncMsgStateChange", i, null))
                }
                l = setInterval(() => n(this, void 0, void 0, function* () {
                    let e = yield c(), n = i;
                    e ? n = t.Connected : i !== t.Connecting && (n = t.Close), n !== i && (i = n, a.emit("SyncMsgStateChange", i, null))
                }), 5e3)
            })
        }, e.uninit = function () {
            a && a.removeAllListeners(), d && (o.client.detachServerEvent("SyncEvent", d), d = void 0), l && (clearInterval(l), l = null)
        }, e.checkSyncMsg = u, e.getSyncMsgState = function () {
            return i
        }, e.syncIsConnected = c, e.attachSyncMsgStateChangeEvent = function (e) {
            return a || (a = new r.EventEmitter), a.addListener("SyncMsgStateChange", e), e
        }, e.detachSyncMsgStateChangeEvent = function (e) {
            a && a.removeListener("SyncMsgStateChange", e)
        }
    }(t.SyncMsgHelperNS || (t.SyncMsgHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(27), a = i(17);
    !function (e) {
        let t, i;
        !function (e) {
            e[e.None = 0] = "None", e[e.Sock5 = 1] = "Sock5", e[e.Http = 2] = "Http"
        }(t = e.ProxyType || (e.ProxyType = {})), function (e) {
            e[e.Sucess = 0] = "Sucess", e[e.Fall = 1] = "Fall", e[e.AuthFall = 2] = "AuthFall", e[e.ConnectFall = 3] = "ConnectFall", e[e.Timeout = 4] = "Timeout", e[e.ParamError = 5] = "ParamError"
        }(i = e.ProxyVerifyResult || (e.ProxyVerifyResult = {})), e.verifyProxy = function (e, t, r, s, l) {
            return n(this, void 0, void 0, function* () {
                return new Promise(n => {
                    a.NativeCallModule.nativeCall.CallNativeFunction("VerifyProxy", e, t, r, s, l, (e, t) => {
                        e === o.NativeFunctionErrorCode.Success ? n(t) : n(i.Fall)
                    })
                })
            })
        }, e.setProxy = function (e, t, i, r, s) {
            return n(this, void 0, void 0, function* () {
                return new Promise(n => {
                    a.NativeCallModule.nativeCall.CallNativeFunction("SetProxy", e, t, i, r, s, (e, t) => {
                        e === o.NativeFunctionErrorCode.Success ? n(t) : n(1)
                    })
                })
            })
        }
    }(t.ProxyNS || (t.ProxyNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(7), r = i(16), s = i(4), l = i(44), d = i(63), u = i(22), c = i(34), h = i(35), f = i(12),
        p = i(56), g = i(53), m = i(64), v = i(26), y = i(38), T = i(28), w = i(17), k = i(20), C = i(23),
        b = a.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        I = v.DownloadKernelCategoryManager.getCategoryManager(), S = r.DownloadKernelEventManager.getEventManager(),
        _ = l.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        D = p.ToastNotifyManagerNS.getToastNotifyManger();
    var A, N;
    !function (e) {
        e[e.UnKnown = -1] = "UnKnown", e[e.ShutDown = 0] = "ShutDown", e[e.Sleep = 1] = "Sleep", e[e.Exit = 2] = "Exit", e[e.StartAll = 3] = "StartAll", e[e.StopAll = 4] = "StopAll"
    }(A = t.ScheduleCompleteTaskType || (t.ScheduleCompleteTaskType = {})), function (e) {
        e.Unknow = "Unknow", e.ScheduleTaskCountChange = "ScheduleTaskCountChange"
    }(N = t.ScheduleTaskEventType || (t.ScheduleTaskEventType = {})), function (e) {
        let t = A.UnKnown, i = null, o = -1, a = -1, r = -1, l = [], v = !1, x = !1;
        const E = new k.EventEmitter;

        function O() {
            i = S.attachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, G)
        }

        function P() {
            null !== i && (S.detachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, i), i = null)
        }

        function M() {
            P(), t = A.UnKnown
        }

        function F(e) {
            let t = 0, i = ["关机", "睡眠", "退出迅雷", "开始全部任务", "暂停全部任务"];
            for (let n = i.length - 1; n >= 0; --n) if (i[n] === e) {
                t = n;
                break
            }
            return t
        }

        function L() {
            let e = 300;
            r = setInterval(() => {
                (function () {
                    let e = !1, t = _.getCategoryViewFromId(s.DownloadKernel.CategroyViewID.Downloading).getTasks();
                    for (let [, i]of t) {
                        let t = i.getTaskStatus();
                        do {
                            if (t === s.DownloadKernel.TaskStatus.Started || t === s.DownloadKernel.TaskStatus.StartPending || t === s.DownloadKernel.TaskStatus.StartWaiting) {
                                e = !0;
                                break
                            }
                        } while (0)
                    }
                    return e
                })() || function () {
                    let e = !1, t = I.getCurrentPrivateCategory();
                    t && (e = c.TaskOperatorNs.hasCategoryStartTask(t.getId()));
                    return e
                }() ? e = 0 : e >= 300 ? (T.NativeCallHostModule.nativeCallHost.fireNativeEvent("getCurrentTabUrl", "callbackGetCurrentTabUrl"), w.NativeCallModule.nativeCall.AttachNativeEvent("callbackGetCurrentTabUrl", t => n(this, void 0, void 0, function* () {
                    t ? e = 0 : (v = !0, yield c.TaskOperatorNs.startAllPausedTask(), clearInterval(r), r = -1)
                }))) : e++
            }, 1e3)
        }

        function R(e) {
            return e && (e = !1, c.TaskOperatorNs.pauseAll(s.DownloadKernel.TaskStopReason.FreeDownload).catch(), -1 !== r && (clearInterval(r), r = -1), function () {
                let e = I.getCurrentPrivateCategory();
                e && c.TaskOperatorNs.pauseCategoryAllTask(e.getId(), s.DownloadKernel.TaskStopReason.FreeDownload)
            }()), e
        }

        function B(e) {
            let t = !1;
            for (let i = 0; i < e.length; ++i) {
                let n = e[i];
                if (!n) continue;
                let o = n.getTaskStatus();
                if (o !== s.DownloadKernel.TaskStatus.Succeeded && o !== s.DownloadKernel.TaskStatus.Seeding && o !== s.DownloadKernel.TaskStatus.Failed) continue;
                let a = n.getTaskBaseInfo(), r = n.getTaskPreStatus();
                if (a.taskType !== s.DownloadKernel.TaskType.Bt || o !== s.DownloadKernel.TaskStatus.Succeeded && o !== s.DownloadKernel.TaskStatus.Seeding || r !== s.DownloadKernel.TaskStatus.Succeeded && r !== s.DownloadKernel.TaskStatus.Seeding) {
                    t = !0;
                    break
                }
            }
            return t
        }

        function U(e) {
            let t = !1;
            do {
                if (!e) break;
                let i = e.getTasks(), n = !1;
                for (let [, e]of i) if (null !== e) {
                    let t = e.getTaskStatus();
                    if (t === s.DownloadKernel.TaskStatus.PreDownloading || t === s.DownloadKernel.TaskStatus.StartWaiting || t === s.DownloadKernel.TaskStatus.StartPending || t === s.DownloadKernel.TaskStatus.Started) {
                        n = !0;
                        break
                    }
                }
                if (n) break;
                t = !0
            } while (0);
            return t
        }

        function V() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    if (!(e = U(_.getCategoryViewFromId(s.DownloadKernel.CategroyViewID.Downloading)))) break;
                    let t = yield C.LoginHelperNS.loginHelper.getUserInfoAw("userid");
                    if (!t) break;
                    let i = I.getCategoryFromUserId("ThunderPanPlugin", t, "ThunderPan Download Category");
                    if (!i) break;
                    let n = i.getId(), o = I.getCategoryView(n, s.DownloadKernel.CategroyViewID.Downloading);
                    if (!o) break;
                    e = U(o)
                } while (0);
                return e
            })
        }

        function K(e) {
            return n(this, void 0, void 0, function* () {
                e === A.ShutDown ? b.shutDownMachine() : e === A.Sleep ? b.suspendMachine() : e === A.Exit ? yield d.quitPromises.run() : e === A.StartAll ? c.TaskOperatorNs.startAll() : e === A.StopAll && c.TaskOperatorNs.pauseAll(s.DownloadKernel.TaskStopReason.PauseAll).catch()
            })
        }

        function G(...e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!e) break;
                    if (e[0] !== s.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!e[1]) break;
                    if (!B(e[1])) break;
                    if (!(yield V())) break;
                    setTimeout(() => {
                        K(t).catch(), M()
                    }, 1e4)
                } while (0)
            })
        }

        e.getEventEmitter = function () {
            return E
        }, e.setDownloadCompleteTaskType = function (e) {
            do {
                if (e !== A.ShutDown && e !== A.Sleep && e !== A.Exit) break;
                if (t === e) break;
                M(), t = e, O();
                let i = "";
                switch (e) {
                    case A.ShutDown:
                        i = "已开启下载完成后关机";
                        break;
                    case A.Sleep:
                        i = "已开启下载完成后睡眠";
                        break;
                    case A.Exit:
                        i = "已开启下载完成后退出迅雷"
                }
                let n = D.showNotify(p.ToastNotifyManagerNS.notifyIdScheduleTaskComplete, g.ToastNotifyItemType.RedCancelNotify, i, 5e3);
                n && n.onCancel(() => {
                    M()
                })
            } while (0)
        }, e.getDownloadCompleteTaskType = function () {
            return t
        }, e.startDownloadCompleteMonitor = O, e.stopDownloadCompleteMonitor = P, e.cancelDownloadCompleteTask = M, e.showPlanTaskDlg = function () {
            u.MessageBox.custom("PlanTask", l, {width: 400, height: 132, center: !0}).catch()
        }, e.init = function () {
            return n(this, void 0, void 0, function* () {
                let e = yield f.asyncRemoteCall.getIpcMain();
                e.on(h.ThunderChannelList.channelRMCommitPlanTask, (e, t) => n(this, void 0, void 0, function* () {
                    l = t, -1 !== o && (clearInterval(o), o = -1), E.emit(N.ScheduleTaskCountChange, l.length), o = setInterval(() => {
                        for (let e = l.length - 1; e >= 0; --e) {
                            let t = l[e],
                                i = m.TimeHelperNS.convertTimeToMinutes(Number(t.hours), Number(t.minutes), Number(t.seconds));
                            if ((i -= 1) <= 0) {
                                K(F(t.operation)).catch(), l.splice(e, 1), E.emit(N.ScheduleTaskCountChange, l.length);
                                continue
                            }
                            let n = m.TimeHelperNS.convertMinuteToTime(i);
                            t.hours = n[0] + "", t.minutes = n[1] + "", t.seconds = n[2] + ""
                        }
                        l.length <= 0 && -1 !== o && (clearInterval(o), o = -1)
                    }, 1e3)
                })), e.on(h.ThunderChannelList.channelRMPerformePlanTask, (e, t) => n(this, void 0, void 0, function* () {
                    K(F(t)).catch()
                }))
            })
        }, e.getOperationIndex = F, e.getScheduleTaskCount = function () {
            return l.length
        }, e.popMessageBox = function (e) {
            x ? e() : u.MessageBox.confirm({
                title: "空闲下载",
                type: u.MessageBox.ConfirmType.Info,
                content: "当您长时间没有操作电脑时，迅雷会自动下载之前被暂停的任务",
                okText: "开启"
            }, {width: 400, height: 154, center: !0}).then(t => {
                t.action === y.MessageBoxNS.Action.OK && (x = !0, e())
            }).catch()
        }, e.startFreeDownLoad = function () {
            let e = !1, t = 0;
            a = setInterval(() => {
                t = b.getFreeTime(), e ? t < 300 && (e = !1, v = R(v)) : t >= 300 && (e = !0, L())
            }, 2e3)
        }, e.closeFreeDownLoad = function () {
            -1 !== a && (clearInterval(a), a = -1), v = R(v)
        }, e.excuteTask = K
    }(t.ScheduleTaskNS || (t.ScheduleTaskNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(50), o = i(100), a = i(0).default.getLogger("Thunder.shub-http.http-session"), r = i(62),
        s = i(14), {isDef: l} = s.ThunderUtil;
    var d;
    !function (e) {
        e.HTTP = "HTTP", e.HTTPS = "HTTPS"
    }(d = t.Protocol || (t.Protocol = {}));
    t.HttpSession = class {
        constructor() {
            this.mRetries = 0, this.mHost = void 0, this.mPort = void 0, this.mPath = void 0, this.mAuth = void 0, this.mAccept = void 0, this.mBody = null, this.mUrl = void 0, this.mCookie = void 0, this.mProtocol = d.HTTP, this.mTimeout = void 0, this.mCurRetries = 0
        }

        set host(e) {
            this.mHost = e
        }

        get host() {
            return this.mHost
        }

        set port(e) {
            this.mPort = e
        }

        get port() {
            let e = void 0;
            return e = l(this.mPort) ? this.mPort : this.protocol === d.HTTPS ? 443 : 80
        }

        set path(e) {
            this.mPath = e
        }

        get path() {
            return this.mPath
        }

        set url(e) {
            this.mUrl = e
        }

        get protocol() {
            return this.mProtocol
        }

        set protocol(e) {
            this.mProtocol = e
        }

        get url() {
            return this.mUrl
        }

        get cookie() {
            return this.mCookie
        }

        set cookie(e) {
            this.mCookie = e
        }

        set auth(e) {
            this.mAuth = e
        }

        get auth() {
            return this.mAuth
        }

        set accept(e) {
            this.mAccept = e
        }

        get accept() {
            return this.mAccept
        }

        set body(e) {
            this.mBody = e
        }

        get body() {
            return this.mBody
        }

        set retries(e) {
            this.mRetries = e
        }

        get retries() {
            return this.mRetries
        }

        set timeout(e) {
            this.mTimeout = e
        }

        get timeout() {
            return this.mTimeout
        }

        post(e, t) {
            do {
                let i = this.body;
                if (!i) {
                    a.information("body is empty"), t(null);
                    break
                }
                let n = this.auth, o = this.accept, r = {
                    hostname: this.host,
                    port: this.port,
                    path: this.path || "/",
                    method: "POST",
                    auth: n || void 0,
                    headers: {"Content-Length": i ? i.length : 0, Cookie: this.cookie || "", Accept: o || "*/*"}
                };
                a.verbose("option", r);
                try {
                    this.postImpl(i, r, e, i => {
                        this.mCurRetries < this.retries ? (this.mCurRetries++, a.information("mCurRetries", this.mCurRetries), this.post(e, t)) : t(i)
                    })
                } catch (e) {
                    a.warning("error ", e), t(null)
                }
            } while (0)
        }

        get(e, t) {
            let i = null;
            if (this.url) {
                let e = n.parse(this.url, !0);
                e && "https:" === e.protocol ? this.protocol = d.HTTPS : this.protocol = d.HTTP, i = this.url
            } else {
                let e = this.auth, t = this.accept;
                i = {
                    hostname: this.host,
                    port: this.port,
                    path: this.path || "/",
                    method: "GET",
                    auth: e || void 0,
                    headers: {Cookie: this.cookie || "", Accept: t || "*/*"}
                }
            }
            a.verbose("option", i);
            try {
                this.getImpl(i, e, i => {
                    this.mCurRetries < this.retries ? (this.mCurRetries++, a.information("mCurRetries", this.mCurRetries), this.get(e, t)) : t(i)
                })
            } catch (e) {
                a.warning("error ", e), t(null)
            }
        }

        postImpl(e, t, i, n) {
            let s = (this.protocol === d.HTTPS ? r : o).request(t, e => {
                let t = null;
                e.on("data", e => {
                    t = t ? Buffer.concat([t, e]) : e
                }), e.on("end", () => {
                    a.information("statusCode", e.statusCode), a.information("headers", e.headers), i({
                        statusCode: e.statusCode,
                        headers: e.headers,
                        body: t
                    })
                })
            });
            s.on("error", e => {
                n(e)
            }), s.on("timeout", () => {
                s.abort()
            }), this.timeout && s.setTimeout(this.timeout), s.write(e), s.end()
        }

        getImpl(e, t, i) {
            (this.protocol === d.HTTPS ? r : o).get(e, e => {
                let i = null;
                e.on("data", e => {
                    i = i ? Buffer.concat([i, e]) : e
                }), e.on("end", () => {
                    a.information("statusCode", e.statusCode), a.information("headers", e.headers), t({
                        statusCode: e.statusCode,
                        headers: e.headers,
                        body: i
                    })
                })
            }).on("error", e => {
                i(e)
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(8), r = i(66), s = i(47), l = i(75), d = i(10), u = i(0), c = i(150), h = i(9),
        f = u.default.getLogger("AdLeftBottomHelper");
    t.adLeftBottomHelper = new class extends s.default {
        constructor() {
            super(...arguments), this.positionId = 1749, this.curAllOrders = [], this.adDataPicDir = void 0
        }

        fetchOrderAw() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    this.adDataPicDir = o.resolve(__profilesDir, "AdData/AdLeftBottom"), e = yield a.FileSystemAWNS.mkdirsAW(this.adDataPicDir);
                    let t = yield this.getshownOrderIdAw(), i = yield l.AdHelperNS.getAdDataAw(this.positionId, t, !0);
                    if (!(null !== i && void 0 !== i && null !== i.data && void 0 !== i.data && i.data.length > 0)) {
                        e = !1, f.information("获取数据失败", i);
                        break
                    }
                    if (this.curAllOrders = yield this.parseOrders(i.data), null === this.curAllOrders || void 0 === this.curAllOrders || this.curAllOrders.length <= 0) {
                        f.information("解析数据失败");
                        break
                    }
                    this.fireEvent(c.AdCommonNS.eventAdShow, c.AdCommonNS.AdName.AdLeftBottomVip, this.curAllOrders[0])
                } while (0);
                return e
            })
        }

        handleEvent(e) {
            f.information(e), "ad_show" === e ? (l.AdHelperNS.statServer(this.positionId, this.curAllOrders[0].orderId, 1).catch(), this.stat("ad_show")) : "content" === e ? (l.AdHelperNS.statServer(this.positionId, this.curAllOrders[0].orderId, 2).catch(), this.stat("ad_click", "clickid=body")) : "close" === e ? this.stat("ad_closed") : "nodisturb" === e && this.stat("ad_nodisplay_click")
        }

        setNoDisturb() {
            return n(this, void 0, void 0, function* () {
                yield l.AdHelperNS.onConfigInitAw(), d.ConfigNS.setValue("AdLeftBottom", "NoDisturb", !0)
            })
        }

        isNoDisturb() {
            return n(this, void 0, void 0, function* () {
                return yield l.AdHelperNS.onConfigInitAw(), d.ConfigNS.getValue("AdLeftBottom", "NoDisturb", !1)
            })
        }

        getshownOrderIdAw() {
            return n(this, void 0, void 0, function* () {
                let e = "";
                return yield l.AdHelperNS.onConfigInitAw(), d.ConfigNS.getValue("AdLeftBottom", "TheDate", "") === l.AdHelperNS.getCurDate() && "" !== (e = d.ConfigNS.getValue("AdLeftBottom", "shownOrders", "")) && "," === e.slice(e.length - 1) && (e = e.slice(0, e.length - 1)), e
            })
        }

        parseOrders(e) {
            return n(this, void 0, void 0, function* () {
                let t = [];
                f.information("parseOrders: adData = ", e);
                for (let i = 0; i < e.length; ++i) {
                    let n = {}, a = e[i];
                    n.orderId = a.orderId, f.information("parseOrders: curOrderId = ", a.orderId);
                    let r = a.materials;
                    if (null === r || void 0 === r || r.length <= 0) {
                        f.information("parseOrders:materials 有问题");
                        continue
                    }
                    let s = r[0];
                    if (n.materialId = s.material_id, null === s.open_type || void 0 === s.open_type) {
                        f.information("parseOrders:material.open_type 有问题");
                        continue
                    }
                    n.openType = s.open_type, n.targetUrl = s.open_url;
                    let l = s.data;
                    if (null === l || void 0 === l || l.length <= 0) {
                        f.information("parseOrders:material.data 有问题");
                        continue
                    }
                    let d = 0, u = "";
                    for (let e = 0; e < l.length; ++e) {
                        let t = l[e];
                        if (10204 === t.asset && (n.iconUrl = t.value, n.iconUrl && "" !== n.iconUrl)) {
                            if (u = o.join(this.adDataPicDir, o.basename(n.iconUrl)), !(yield this.downloadResourcesAW(n.iconUrl, u))) break;
                            ++d, n.picFile = u
                        }
                    }
                    d < 1 ? f.information("素材数据不完整：ncount = ", d, ";materialId = ", s.material_id) : t.push(n)
                }
                return t
            })
        }

        downloadResourcesAW(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                return i = yield r.AxiosNS.downloadFileAW(e, t), f.information("下载图片：result = ", i, ";savePath = ", t), i
            })
        }

        stat(e, t) {
            let i = `${this.positionId}`,
                n = `orderid=${this.curAllOrders[0].orderId},materialid=${this.curAllOrders[0].materialId}`;
            null !== t && void 0 !== t && "" !== t && (n = `${n},${t}`), f.information(e, n), n = encodeURIComponent(n), h.XLStatNS.trackEvent("xlx_ad_event", e, i, 0, 0, 0, 0, n)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(69), a = i(0), r = i(81), s = a.default.getLogger("xmp-vip-plugin-helper");

    class l {
        constructor() {
            this.mThunderVersionStr = void 0, this.mThunderVersionNumber = void 0, this.mPluginVersion = void 0
        }

        setPluginInfo(e, t, i) {
            this.mThunderVersionStr = e, this.mThunderVersionNumber = t, this.mPluginVersion = i, localStorage.setItem("VipPluginHelper.ThunderVersionStr", this.mThunderVersionStr), localStorage.setItem("VipPluginHelper.ThunderVersionNumber", this.mThunderVersionNumber.toString()), localStorage.setItem("VipPluginHelper.PluginVersion", this.mPluginVersion), s.information("setPluginInfo", e, t, i)
        }

        get thunderVersionNumber() {
            return this.mThunderVersionNumber || Number(localStorage.getItem("VipPluginHelper.ThunderVersionNumber"))
        }

        get thunderVersionString() {
            return this.mThunderVersionStr || localStorage.getItem("VipPluginHelper.ThunderVersionStr")
        }

        get pluginVersion() {
            return this.mPluginVersion || localStorage.getItem("VipPluginHelper.PluginVersion")
        }

        get currentTime() {
            return Math.floor((new Date).getTime() / 1e3)
        }

        getXmpMode() {
            return n(this, void 0, void 0, function* () {
                let e = yield r.CommonNS.getXmpCurrentMode();
                switch (s.information("XMPShowMode", e), e) {
                    case o.XmpMode.EMBED_MODE:
                        return "pannel"
                }
                return "xmp"
            })
        }

        get clientName() {
            return "xl_xmp"
        }
    }

    t.VipPluginHelper = l, t.default = new l
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t, i, n, o, a, r, s, l, d, u;
        !function (e) {
            e.Unkown = "XgtType.Unkown", e.Try = "XgtType.Try", e.Baotuan = "XgtType.Baotuan", e.PackageTry = "XgtType.PackageTry"
        }(t = e.XgtType || (e.XgtType = {})), function (e) {
            e[e.Before_All = 0] = "Before_All", e[e.Before_Novice = 1] = "Before_Novice", e[e.Before_Join = 2] = "Before_Join", e[e.Before_CutLine = 3] = "Before_CutLine", e[e.Doing_CutLineOut = 4] = "Doing_CutLineOut", e[e.Doing_Succeed = 5] = "Doing_Succeed", e[e.Doing_SucceedCutLineOut = 6] = "Doing_SucceedCutLineOut", e[e.Doing_SucceedOpenAuto = 7] = "Doing_SucceedOpenAuto", e[e.Doing_KickOut = 8] = "Doing_KickOut"
        }(i = e.BaotuanXgt || (e.BaotuanXgt = {})), function (e) {
            e[e.NoVip = -1] = "NoVip", e[e.Vip = 0] = "Vip", e[e.Try = 1] = "Try", e[e.Ad = 2] = "Ad"
        }(n = e.VipTaskType || (e.VipTaskType = {})), function (e) {
            e[e.PlatinumVip = 0] = "PlatinumVip", e[e.SuperVip = 1] = "SuperVip", e[e.MixVip = 2] = "MixVip"
        }(o = e.TryType || (e.TryType = {})), function (e) {
            e[e.Unkown = -1] = "Unkown", e[e.Init = 0] = "Init", e[e.CommitWait = 1] = "CommitWait", e[e.Commiting = 2] = "Commiting", e[e.CommitFailed = 3] = "CommitFailed", e[e.CommitSuccess = 4] = "CommitSuccess", e[e.AcclerateWait = 5] = "AcclerateWait", e[e.SearchResource = 6] = "SearchResource", e[e.AcclerateFailed = 7] = "AcclerateFailed", e[e.AcclerateStoped = 8] = "AcclerateStoped", e[e.Acclerating = 9] = "Acclerating", e[e.Finished = 10] = "Finished"
        }(a = e.VipTaskStatus || (e.VipTaskStatus = {})), function (e) {
            e[e.StatusOnly = 1] = "StatusOnly", e[e.TokenOnly = 2] = "TokenOnly", e[e.Others = 3] = "Others"
        }(r = e.QueryOption || (e.QueryOption = {})), function (e) {
            e[e.Commit = 0] = "Commit", e[e.Status = 1] = "Status", e[e.Token = 2] = "Token", e[e.Acclerate = 3] = "Acclerate"
        }(s = e.ErrorStep || (e.ErrorStep = {})), function (e) {
            e.Unkown = "XgtState.Unkown", e.Ready = "XgtState.Ready", e.Show = "XgtState.Show", e.Background = "XgtState.Background", e.Exit = "XgtState.Exit"
        }(l = e.XgtState || (e.XgtState = {})), function (e) {
            e[e.Unkown = 0] = "Unkown", e[e.Showing = 1] = "Showing", e[e.Hiding = 2] = "Hiding", e[e.Clicked = 3] = "Clicked"
        }(u = e.BaotuanEnterBy || (e.BaotuanEnterBy = {}))
    }(t.VipDownloadDefineNS || (t.VipDownloadDefineNS = {}))
}, function (e, t) {
    t.L = {bit: 1}, t.M = {bit: 0}, t.Q = {bit: 3}, t.H = {bit: 2}, t.isValid = function (e) {
        return e && void 0 !== e.bit && e.bit >= 0 && e.bit < 4
    }, t.from = function (e, i) {
        if (t.isValid(e)) return e;
        try {
            return function (e) {
                if ("string" != typeof e) throw new Error("Param is not a string");
                switch (e.toLowerCase()) {
                    case"l":
                    case"low":
                        return t.L;
                    case"m":
                    case"medium":
                        return t.M;
                    case"q":
                    case"quartile":
                        return t.Q;
                    case"h":
                    case"high":
                        return t.H;
                    default:
                        throw new Error("Unknown EC Level: " + e)
                }
            }(e)
        } catch (e) {
            return i
        }
    }
}, function (e, t, i) {
    var n = i(570), o = i(859);
    for (var a in(t = e.exports = function (e, t) {
        return new o(t).process(e)
    }).FilterCSS = o, n) t[a] = n[a];
    "undefined" != typeof window && (window.filterCSS = e.exports)
}, function (e, t) {
    e.exports = {
        indexOf: function (e, t) {
            var i, n;
            if (Array.prototype.indexOf) return e.indexOf(t);
            for (i = 0, n = e.length; i < n; i++) if (e[i] === t) return i;
            return -1
        }, forEach: function (e, t, i) {
            var n, o;
            if (Array.prototype.forEach) return e.forEach(t, i);
            for (n = 0, o = e.length; n < o; n++) t.call(i, e[n], n, e)
        }, trim: function (e) {
            return String.prototype.trim ? e.trim() : e.replace(/(^\s*)|(\s*$)/g, "")
        }, spaceIndex: function (e) {
            var t = /\s|\n|\t/.exec(e);
            return t ? t.index : -1
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), a = i(29), r = i(3), s = i(867), l = i(868);
    t.default = {
        getComments({tid: e, sourceId: t, pageSize: i = 10, typeId: a = 4, lastId: r = 0, type: s = "loadmore", category: l = "new"}) {
            return n(this, void 0, void 0, function* () {
                return o.fetchCmtRes("get", "/comment/api/comment_v2", {
                    tid: e,
                    source_id: t,
                    type_id: a,
                    last_id: r,
                    type: s,
                    page_size: i,
                    category: l,
                    v: "1.0"
                })
            })
        },
        publishComment({tid: e, sourceId: t, cid: i, username: r, comment: s, device: l, hugFlag: d, images: u, extra: c, typeId: h = 4}) {
            return n(this, void 0, void 0, function* () {
                let n = a.ToolsUtilitiesAWNS.genarateMd5(encodeURIComponent(s) + (new Date).getTime()),
                    f = Object.assign({}, {
                        tid: e,
                        source_id: t,
                        type_id: h,
                        cid: i,
                        username: r,
                        comment: encodeURIComponent(s),
                        device: l,
                        trigger_id: n,
                        hug_flag: d,
                        images: u
                    }, c);
                return o.fetchCmtRes("post", "/comment/api/comment_v2", f)
            })
        },
        deleteComment({tid: e, typeId: t = 4, sourceId: i, cid: a}) {
            return n(this, void 0, void 0, function* () {
                return o.fetchCmtRes("get", "/comment/api/comment_del", {tid: e, source_id: i, type_id: t, cid: a})
            })
        },
        likeComment({tid: e, typeId: t = 4, cid: i, username: a, type: r = 1}) {
            return n(this, void 0, void 0, function* () {
                return o.fetchCmtRes("get", "/comment/api/comment_count", {
                    tid: e,
                    source_id: e,
                    type_id: t,
                    cid: i,
                    username: a,
                    type: r
                })
            })
        },
        reportComment({cid: e, reason: t, desc: i}) {
            return n(this, void 0, void 0, function* () {
                let n = yield r.client.callServerFunction("GetThunderVersion"),
                    a = yield r.client.callServerFunction("GetPeerID");
                return o.fetchCmtRes("post", "/xlppc.report.offense/report_offense", {
                    service_name: "xlppc_download_comment",
                    resource_id: e,
                    reason: t,
                    desc: i,
                    "Version-Name": n,
                    "Device-Id": a
                })
            })
        },
        getSpeedRank({xluid: e, tid: t}) {
            return n(this, void 0, void 0, function* () {
                return o.fetchCmtRes("get", "/api/comment/list/speed", {xluid: e, tid: t})
            })
        },
        getQuickReview() {
            return n(this, void 0, void 0, function* () {
                return o.fetch("https://static-xl.a.88cdn.com/json/resource_quick_review.json")
            })
        },
        getSingleComment: ({tid: e, sourceId: t, typeId: i = 4, cid: n = "", userId: a}) => o.fetchCmtRes("post", "/comment/api/get_single_comment", {
            tid: e,
            source_id: t,
            type_id: i,
            cid: n,
            userid: a
        }),
        getFileGcid(e) {
            return n(this, void 0, void 0, function* () {
                let t = new s;
                return new Promise((i, n) => {
                    t.md5(e, (e, t) => {
                        e ? n(e) : i(t)
                    })
                })
            })
        },
        aliUpload(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = yield this.getFileGcid(e);
                i = i.toLowerCase();
                let n = yield o.fetchDataWithShoulei("/xlppc.pic.api/api/get_upload_credentials?service_name=comment&filename=" + i);
                if ("ok" !== n.result) return;
                let {accessKeyId: a, accessKeySecret: r, stsToken: s, region: d, bucket: u, exist: c} = n.data,
                    h = new l({accessKeyId: a, accessKeySecret: r, stsToken: s, region: d, bucket: u});
                if (c) {
                    return h.signatureUrl(i, {
                        expires: 3600,
                        response: {"content-disposition": 'attachment; filename="' + i + '"'}
                    })
                }
                return h.multipartUpload(i, e, {progress: t}).then(e => {
                    if (200 === e.res.status) {
                        return h.signatureUrl(i, {
                            expires: 3600,
                            response: {"content-disposition": 'attachment; filename="' + i + '"'}
                        })
                    }
                    return new Error("upload failed: " + e.res)
                })
            })
        },
        getResource: e => o.fetchDataWithShoulei(`/dlj/${e}/url`)
    }
}, function (e, t, i) {
    "use strict";
    var n = i(120);

    function o() {
        this._state = 0, this._response = {
            host: "unknown",
            alive: !1,
            output: "unknown",
            time: "unknown",
            min: "unknown",
            max: "unknown",
            avg: "unknown",
            stddev: "unknown"
        }, this._times = [], this._lines = [], this._stripRegex = /[ ]*\r?\n?$/g
    }

    o.prototype.STATES = {INIT: 0, HEADER: 1, BODY: 2, FOOTER: 3, END: 4}, o.prototype._changeState = function (e) {
        if (n.values(this.STATES).indexOf(e) < 0) throw new Error("Unknown state");
        return this._state = e, this
    }, o.prototype._processHeader = function (e) {
        throw new Error("Subclass should implement this method")
    }, o.prototype._processBody = function (e) {
        throw new Error("Subclass should implement this method")
    }, o.prototype._processFooter = function (e) {
        throw new Error("Subclass should implement this method")
    }, o.prototype.eat = function (e) {
        var t = [this.STATES.INIT, this.STATES.HEADER];
        this._lines.push(e);
        var i = e.replace(this._stripRegex, "");
        if (0 === i.length) ; else if (t.indexOf(this._state) >= 0) this._processHeader(i); else if (this._state === this.STATES.BODY) this._processBody(i); else if (this._state === this.STATES.FOOTER) this._processFooter(i); else if (this._state !== this.STATES.END) throw new Error("Unknown state");
        return this
    }, o.prototype.getResult = function () {
        var e = n.extend({}, this._response);
        if (e.output = this._lines.join("\n"), e.alive = this._times.length > 0, e.alive && (e.time = this._response.time = this._times[0]), "unknown" === e.stddev && e.alive) {
            var t = this._times.length, i = n.reduce(this._times, function (t, i) {
                return t + Math.pow(i - e.avg, 2)
            }, 0) / t;
            e.stddev = Math.round(1e3 * Math.sqrt(i)) / 1e3
        }
        return n.each(["min", "avg", "max", "stddev"], function (t) {
            var i = e[t];
            n.isNumber(i) && (e[t] = i.toFixed(3))
        }), e
    }, e.exports = o
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(88), o = i.n(n), a = i(60), r = i.n(a), s = /%[sdj%]/g, l = function () {
    };

    function d() {
        for (var e = arguments.length, t = Array(e), i = 0; i < e; i++) t[i] = arguments[i];
        var n = 1, o = t[0], a = t.length;
        if ("function" == typeof o) return o.apply(null, t.slice(1));
        if ("string" == typeof o) {
            for (var r = String(o).replace(s, function (e) {
                if ("%%" === e) return "%";
                if (n >= a) return e;
                switch (e) {
                    case"%s":
                        return String(t[n++]);
                    case"%d":
                        return Number(t[n++]);
                    case"%j":
                        try {
                            return JSON.stringify(t[n++])
                        } catch (e) {
                            return "[Circular]"
                        }
                        break;
                    default:
                        return e
                }
            }), l = t[n]; n < a; l = t[++n]) r += " " + l;
            return r
        }
        return o
    }

    function u(e, t) {
        return void 0 === e || null === e || (!("array" !== t || !Array.isArray(e) || e.length) || !(!function (e) {
            return "string" === e || "url" === e || "hex" === e || "email" === e || "pattern" === e
        }(t) || "string" != typeof e || e))
    }

    function c(e, t, i) {
        var n = 0, o = e.length;
        !function a(r) {
            if (r && r.length) i(r); else {
                var s = n;
                n += 1, s < o ? t(e[s], a) : i([])
            }
        }([])
    }

    function h(e, t, i, n) {
        if (t.first) return c(function (e) {
            var t = [];
            return Object.keys(e).forEach(function (i) {
                t.push.apply(t, e[i])
            }), t
        }(e), i, n);
        var o = t.firstFields || [];
        !0 === o && (o = Object.keys(e));
        var a = Object.keys(e), r = a.length, s = 0, l = [], d = function (e) {
            l.push.apply(l, e), ++s === r && n(l)
        };
        a.forEach(function (t) {
            var n = e[t];
            -1 !== o.indexOf(t) ? c(n, i, d) : function (e, t, i) {
                var n = [], o = 0, a = e.length;

                function r(e) {
                    n.push.apply(n, e), ++o === a && i(n)
                }

                e.forEach(function (e) {
                    t(e, r)
                })
            }(n, i, d)
        })
    }

    function f(e) {
        return function (t) {
            return t && t.message ? (t.field = t.field || e.fullField, t) : {message: t, field: t.field || e.fullField}
        }
    }

    function p(e, t) {
        if (t) for (var i in t) if (t.hasOwnProperty(i)) {
            var n = t[i];
            "object" === (void 0 === n ? "undefined" : r()(n)) && "object" === r()(e[i]) ? e[i] = o()({}, e[i], n) : e[i] = n
        }
        return e
    }

    var g = function (e, t, i, n, o, a) {
        !e.required || i.hasOwnProperty(e.field) && !u(t, a || e.type) || n.push(d(o.messages.required, e.fullField))
    };
    var m = function (e, t, i, n, o) {
        (/^\s+$/.test(t) || "" === t) && n.push(d(o.messages.whitespace, e.fullField))
    }, v = {
        email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
        url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"),
        hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
    }, y = {
        integer: function (e) {
            return y.number(e) && parseInt(e, 10) === e
        }, float: function (e) {
            return y.number(e) && !y.integer(e)
        }, array: function (e) {
            return Array.isArray(e)
        }, regexp: function (e) {
            if (e instanceof RegExp) return !0;
            try {
                return !!new RegExp(e)
            } catch (e) {
                return !1
            }
        }, date: function (e) {
            return "function" == typeof e.getTime && "function" == typeof e.getMonth && "function" == typeof e.getYear
        }, number: function (e) {
            return !isNaN(e) && "number" == typeof e
        }, object: function (e) {
            return "object" === (void 0 === e ? "undefined" : r()(e)) && !y.array(e)
        }, method: function (e) {
            return "function" == typeof e
        }, email: function (e) {
            return "string" == typeof e && !!e.match(v.email) && e.length < 255
        }, url: function (e) {
            return "string" == typeof e && !!e.match(v.url)
        }, hex: function (e) {
            return "string" == typeof e && !!e.match(v.hex)
        }
    };
    var T = "enum";
    var w = {
        required: g, whitespace: m, type: function (e, t, i, n, o) {
            if (e.required && void 0 === t) g(e, t, i, n, o); else {
                var a = e.type;
                ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"].indexOf(a) > -1 ? y[a](t) || n.push(d(o.messages.types[a], e.fullField, e.type)) : a && (void 0 === t ? "undefined" : r()(t)) !== e.type && n.push(d(o.messages.types[a], e.fullField, e.type))
            }
        }, range: function (e, t, i, n, o) {
            var a = "number" == typeof e.len, r = "number" == typeof e.min, s = "number" == typeof e.max, l = t,
                u = null, c = "number" == typeof t, h = "string" == typeof t, f = Array.isArray(t);
            if (c ? u = "number" : h ? u = "string" : f && (u = "array"), !u) return !1;
            f && (l = t.length), h && (l = t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length), a ? l !== e.len && n.push(d(o.messages[u].len, e.fullField, e.len)) : r && !s && l < e.min ? n.push(d(o.messages[u].min, e.fullField, e.min)) : s && !r && l > e.max ? n.push(d(o.messages[u].max, e.fullField, e.max)) : r && s && (l < e.min || l > e.max) && n.push(d(o.messages[u].range, e.fullField, e.min, e.max))
        }, enum: function (e, t, i, n, o) {
            e[T] = Array.isArray(e[T]) ? e[T] : [], -1 === e[T].indexOf(t) && n.push(d(o.messages[T], e.fullField, e[T].join(", ")))
        }, pattern: function (e, t, i, n, o) {
            e.pattern && (e.pattern instanceof RegExp ? (e.pattern.lastIndex = 0, e.pattern.test(t) || n.push(d(o.messages.pattern.mismatch, e.fullField, t, e.pattern))) : "string" == typeof e.pattern && (new RegExp(e.pattern).test(t) || n.push(d(o.messages.pattern.mismatch, e.fullField, t, e.pattern))))
        }
    };
    var k = "enum";
    var C = function (e, t, i, n, o) {
        var a = e.type, r = [];
        if (e.required || !e.required && n.hasOwnProperty(e.field)) {
            if (u(t, a) && !e.required) return i();
            w.required(e, t, n, r, o, a), u(t, a) || w.type(e, t, n, r, o)
        }
        i(r)
    }, b = {
        string: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t, "string") && !e.required) return i();
                w.required(e, t, n, a, o, "string"), u(t, "string") || (w.type(e, t, n, a, o), w.range(e, t, n, a, o), w.pattern(e, t, n, a, o), !0 === e.whitespace && w.whitespace(e, t, n, a, o))
            }
            i(a)
        }, method: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                w.required(e, t, n, a, o), void 0 !== t && w.type(e, t, n, a, o)
            }
            i(a)
        }, number: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                w.required(e, t, n, a, o), void 0 !== t && (w.type(e, t, n, a, o), w.range(e, t, n, a, o))
            }
            i(a)
        }, boolean: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                w.required(e, t, n, a, o), void 0 !== t && w.type(e, t, n, a, o)
            }
            i(a)
        }, regexp: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                w.required(e, t, n, a, o), u(t) || w.type(e, t, n, a, o)
            }
            i(a)
        }, integer: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                w.required(e, t, n, a, o), void 0 !== t && (w.type(e, t, n, a, o), w.range(e, t, n, a, o))
            }
            i(a)
        }, float: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                w.required(e, t, n, a, o), void 0 !== t && (w.type(e, t, n, a, o), w.range(e, t, n, a, o))
            }
            i(a)
        }, array: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t, "array") && !e.required) return i();
                w.required(e, t, n, a, o, "array"), u(t, "array") || (w.type(e, t, n, a, o), w.range(e, t, n, a, o))
            }
            i(a)
        }, object: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                w.required(e, t, n, a, o), void 0 !== t && w.type(e, t, n, a, o)
            }
            i(a)
        }, enum: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                w.required(e, t, n, a, o), t && w[k](e, t, n, a, o)
            }
            i(a)
        }, pattern: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t, "string") && !e.required) return i();
                w.required(e, t, n, a, o), u(t, "string") || w.pattern(e, t, n, a, o)
            }
            i(a)
        }, date: function (e, t, i, n, o) {
            var a = [];
            if (e.required || !e.required && n.hasOwnProperty(e.field)) {
                if (u(t) && !e.required) return i();
                if (w.required(e, t, n, a, o), !u(t)) {
                    var r = void 0;
                    r = "number" == typeof t ? new Date(t) : t, w.type(e, r, n, a, o), r && w.range(e, r.getTime(), n, a, o)
                }
            }
            i(a)
        }, url: C, hex: C, email: C, required: function (e, t, i, n, o) {
            var a = [], s = Array.isArray(t) ? "array" : void 0 === t ? "undefined" : r()(t);
            w.required(e, t, n, a, o, s), i(a)
        }
    };

    function I() {
        return {
            default: "Validation error on field %s",
            required: "%s is required",
            enum: "%s must be one of %s",
            whitespace: "%s cannot be empty",
            date: {
                format: "%s date %s is invalid for format %s",
                parse: "%s date could not be parsed, %s is invalid ",
                invalid: "%s date %s is invalid"
            },
            types: {
                string: "%s is not a %s",
                method: "%s is not a %s (function)",
                array: "%s is not an %s",
                object: "%s is not an %s",
                number: "%s is not a %s",
                date: "%s is not a %s",
                boolean: "%s is not a %s",
                integer: "%s is not an %s",
                float: "%s is not a %s",
                regexp: "%s is not a valid %s",
                email: "%s is not a valid %s",
                url: "%s is not a valid %s",
                hex: "%s is not a valid %s"
            },
            string: {
                len: "%s must be exactly %s characters",
                min: "%s must be at least %s characters",
                max: "%s cannot be longer than %s characters",
                range: "%s must be between %s and %s characters"
            },
            number: {
                len: "%s must equal %s",
                min: "%s cannot be less than %s",
                max: "%s cannot be greater than %s",
                range: "%s must be between %s and %s"
            },
            array: {
                len: "%s must be exactly %s in length",
                min: "%s cannot be less than %s in length",
                max: "%s cannot be greater than %s in length",
                range: "%s must be between %s and %s in length"
            },
            pattern: {mismatch: "%s value %s does not match pattern %s"},
            clone: function () {
                var e = JSON.parse(JSON.stringify(this));
                return e.clone = this.clone, e
            }
        }
    }

    var S = I();

    function _(e) {
        this.rules = null, this._messages = S, this.define(e)
    }

    _.prototype = {
        messages: function (e) {
            return e && (this._messages = p(I(), e)), this._messages
        }, define: function (e) {
            if (!e) throw new Error("Cannot configure a schema with no rules");
            if ("object" !== (void 0 === e ? "undefined" : r()(e)) || Array.isArray(e)) throw new Error("Rules must be an object");
            this.rules = {};
            var t = void 0, i = void 0;
            for (t in e) e.hasOwnProperty(t) && (i = e[t], this.rules[t] = Array.isArray(i) ? i : [i])
        }, validate: function (e) {
            var t = this, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = arguments[2],
                a = e, s = i, u = n;
            if ("function" == typeof s && (u = s, s = {}), this.rules && 0 !== Object.keys(this.rules).length) {
                if (s.messages) {
                    var c = this.messages();
                    c === S && (c = I()), p(c, s.messages), s.messages = c
                } else s.messages = this.messages();
                var g = void 0, m = void 0, v = {};
                (s.keys || Object.keys(this.rules)).forEach(function (i) {
                    g = t.rules[i], m = a[i], g.forEach(function (n) {
                        var r = n;
                        "function" == typeof r.transform && (a === e && (a = o()({}, a)), m = a[i] = r.transform(m)), (r = "function" == typeof r ? {validator: r} : o()({}, r)).validator = t.getValidationMethod(r), r.field = i, r.fullField = r.fullField || i, r.type = t.getType(r), r.validator && (v[i] = v[i] || [], v[i].push({
                            rule: r,
                            value: m,
                            source: a,
                            field: i
                        }))
                    })
                });
                var y = {};
                h(v, s, function (e, t) {
                    var i = e.rule,
                        n = !("object" !== i.type && "array" !== i.type || "object" !== r()(i.fields) && "object" !== r()(i.defaultField));

                    function a(e, t) {
                        return o()({}, t, {fullField: i.fullField + "." + e})
                    }

                    function u() {
                        var r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
                        if (Array.isArray(r) || (r = [r]), r.length && l("async-validator:", r), r.length && i.message && (r = [].concat(i.message)), r = r.map(f(i)), s.first && r.length) return y[i.field] = 1, t(r);
                        if (n) {
                            if (i.required && !e.value) return r = i.message ? [].concat(i.message).map(f(i)) : s.error ? [s.error(i, d(s.messages.required, i.field))] : [], t(r);
                            var u = {};
                            if (i.defaultField) for (var c in e.value) e.value.hasOwnProperty(c) && (u[c] = i.defaultField);
                            for (var h in u = o()({}, u, e.rule.fields)) if (u.hasOwnProperty(h)) {
                                var p = Array.isArray(u[h]) ? u[h] : [u[h]];
                                u[h] = p.map(a.bind(null, h))
                            }
                            var g = new _(u);
                            g.messages(s.messages), e.rule.options && (e.rule.options.messages = s.messages, e.rule.options.error = s.error), g.validate(e.value, e.rule.options || s, function (e) {
                                t(e && e.length ? r.concat(e) : e)
                            })
                        } else t(r)
                    }

                    n = n && (i.required || !i.required && e.value), i.field = e.field;
                    var c = i.validator(i, e.value, u, e.source, s);
                    c && c.then && c.then(function () {
                        return u()
                    }, function (e) {
                        return u(e)
                    })
                }, function (e) {
                    !function (e) {
                        var t, i = void 0, n = void 0, o = [], a = {};
                        for (i = 0; i < e.length; i++) t = e[i], Array.isArray(t) ? o = o.concat.apply(o, t) : o.push(t);
                        if (o.length) for (i = 0; i < o.length; i++) a[n = o[i].field] = a[n] || [], a[n].push(o[i]); else o = null, a = null;
                        u(o, a)
                    }(e)
                })
            } else u && u()
        }, getType: function (e) {
            if (void 0 === e.type && e.pattern instanceof RegExp && (e.type = "pattern"), "function" != typeof e.validator && e.type && !b.hasOwnProperty(e.type)) throw new Error(d("Unknown rule type %s", e.type));
            return e.type || "string"
        }, getValidationMethod: function (e) {
            if ("function" == typeof e.validator) return e.validator;
            var t = Object.keys(e), i = t.indexOf("message");
            return -1 !== i && t.splice(i, 1), 1 === t.length && "required" === t[0] ? b.required : b[this.getType(e)] || !1
        }
    }, _.register = function (e, t) {
        if ("function" != typeof t) throw new Error("Cannot register a validator by type, validator is not a function");
        b[e] = t
    }, _.messages = S;
    t.default = _
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-loading "}, [t("svg", {
            staticClass: "xly-loading__svg",
            attrs: {viewBox: "0 0 52 52"}
        }, [t("polyline", {attrs: {points: "23.5,27.6 7.5,18.6 23.5,10.6 39.5,18.6 "}}), this._v(" "), t("polyline", {attrs: {points: "23.5,27.5 39.5,18.5 39.5,36.5 23.5,44.5 "}}), this._v(" "), t("polyline", {attrs: {points: "23.5,27.5 23.5,44.5 7.5,36.5 7.5,18.5 "}}), this._v(" "), t("path", {
            staticClass: "xly-path-out",
            attrs: {d: "M23.5,44.5l-16-8v-18l16-8l16,8v18L23.5,44.5z"}
        }), this._v(" "), t("polyline", {
            staticClass: "xly-path-inner-2",
            attrs: {points: "23.5,27.5 39.5,18.5 39.5,36.5 23.5,44.5 "}
        }), this._v(" "), t("polyline", {
            staticClass: "xly-path-inner-1",
            attrs: {points: "23.5,27.6 7.5,18.6 23.5,10.6 39.5,18.6 "}
        }), this._v(" "), t("polyline", {
            staticClass: "xly-path-inner-3",
            attrs: {points: "23.5,27.5 23.5,44.5 7.5,36.5 7.5,18.5 "}
        })])])
    };
    n._withStripped = !0;
    var o = {}, a = (i(755), i(1)), r = Object(a.a)(o, n, [], !1, null, "6d2ca8de", null);
    r.options.__file = "src\\common\\components\\loading.vue";
    t.default = r.exports
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {
            staticClass: "xly-client", attrs: {id: "app"}, on: {
                dragstart: function (e) {
                    e.preventDefault()
                }
            }
        }, [t("main-left"), this._v(" "), t("main-body")], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-aside",
            class: {dragable: e.dragable}
        }, [i("login-area", {
            staticClass: "none-dragable",
            on: {updateCurUserId: e.updateCurUserId}
        }), e._v(" "), i("div", {staticClass: "xly-aside-nav none-dragable"}, [i("ul", e._l(e.navList, function (t) {
            return i("li", {
                key: t.key,
                staticClass: "xly-aside-nav__item",
                class: {"is-active": e.curNav === t.key, "is-visited": e.isVisited(t.unReadNum)},
                on: {
                    mousedown: function (i) {
                        e.select(t.key)
                    }
                }
            }, [i("div", ["find-page" !== t.key ? i("td-badge", {
                attrs: {
                    value: t.unReadNum < 10 ? t.unReadNum : 0,
                    max: 9,
                    "is-dot": t.showRedDot,
                    hideSup: !t.showUnRead || t.unReadNum < 1 || t.unReadNum > 9 && !t.showRedDot
                }
            }, [i("i", {class: t.icon}), e._v(" "), i("span", [e._v(e._s(t.content))]), e._v(" "), t.unReadNum > 9 && t.showUnRead && !t.showRedDot ? i("b", {staticClass: "xly-img-more"}) : e._e()]) : i("td-badge", {
                attrs: {
                    "is-dot": !1,
                    hideSup: !0
                }
            }, [i("i", {class: t.icon}, [i("b", {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: t.unReadNum > 0,
                    expression: "list.unReadNum > 0"
                }], staticClass: "xly-aside-nav__number"
            }, [e._v(e._s(t.unReadNum))])]), e._v(" "), i("span", [e._v(e._s(t.content))])])], 1)])
        })), e._v(" "), "netdisk" === e.currentGuide ? i("div", {staticClass: "xly-aside-tooltip"}, [i("p", [e._v(e._s(e.netdiskGuideTips))]), e._v(" "), i("i", {
            staticClass: "td-icon-close",
            attrs: {title: "关闭"},
            on: {click: e.closeNetdiskTips}
        })]) : e._e()]), e._v(" "), i("system-buttons", {staticClass: "none-dragable"})], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-client__main"}, [i("main-top-container", {
            attrs: {
                isLogined: e.isLogined,
                settingTab: e.settingTab
            }, on: {close: e.closeSettingCenter}
        }), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !e.settingTab,
                expression: "!settingTab"
            }], staticClass: "xly-client__content"
        }, [i("download-panel", {
            staticClass: "xly-client__page xly-down",
            class: {"is-show": !(e.panStyle || e.embeddedPageStyle)}
        }), e._v(" "), i("pan-plugin-view", {
            staticClass: "xly-client__page xly-pan",
            class: {"is-show": e.panStyle}
        }), e._v(" "), e.isMessagePageLoaded ? i("message-page", {
            staticClass: "xly-client__page xly-message",
            class: {"is-show": e.messagePageStyle},
            attrs: {elementId: e.messageElementId, messagePageUrl: e.messagePageUrl}
        }) : e._e(), e._v(" "), e.isEmbeddedBrowserViewCreated ? i("embedded-browser-view-container", {
            staticClass: "xly-client__page xly-embedded",
            class: {"is-show": e.embeddedPageStyle}
        }) : e._e()], 1), e._v(" "), e.settingTab ? i("setting-view-container") : e._e()], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-aside-personal"}, [i("td-avatar", {
            ref: "userAvatar",
            attrs: {src: e.curLoginHeaderUrl, alt: "头像"},
            nativeOn: {
                mouseenter: function (t) {
                    e.enter("head")
                }, click: function (t) {
                    e.clickUserHeader("head")
                }
            }
        }, [e.isLogin ? e._e() : i("i", {staticClass: "xly-icon-logo"})]), e._v(" "), i("div", {staticClass: "xly-aside-personal__icon"}, [e.vipData ? i("vip-icon", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isLogin,
                expression: "isLogin"
            }],
            ref: "userVip",
            staticStyle: {cursor: "pointer"},
            attrs: {vipData: e.vipData, size: "normal", disabled: 0 === e.isVip},
            nativeOn: {
                click: function (t) {
                    e.onClick("vip")
                }, mouseenter: function (t) {
                    e.enter("vip")
                }
            }
        }) : e._e(), e._v(" "), i("a", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isLogin && !e.isCanShowOpenVipBtn && !e.overflow,
                expression: "isLogin && !isCanShowOpenVipBtn && !overflow"
            }],
            class: e.userYearIcon,
            attrs: {href: "javascript:;", visible: e.isShowYearTip, title: this.yearTipsText},
            on: {
                click: function (t) {
                    e.onClick("nian_tip")
                }
            }
        })], 1), e._v(" "), i("p", {
            ref: "userNick",
            staticClass: "xly-aside-personal__user",
            class: e.strNickCss,
            on: {
                click: function (t) {
                    e.clickUserHeader("name")
                }
            }
        }, [e._v(e._s(e.userNick))]), e._v(" "), e.isLogin && e.canShowVipText ? i("td-badge", {
            attrs: {
                value: e.badge,
                hideSup: !e.badge
            }
        }, [i()], 1) : e._e(), e._v(" "), e.isLogin ? e._e() : i()], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement;
        return (this._self._c || e)("div", {attrs: {id: "pan-18BE0BEB-6C82-4D16-83C8-5566BE72D176"}})
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-aside-operate",
            class: {"is-show": e.isPopShow}
        }, [i("div", {
            staticClass: "xly-aside-operate__box",
            on: {
                mouseover: e.mouseEnterConfigurableButton, click: function (t) {
                    e.clickConfigurableButton("sidebar_acti_entrance_click")
                }, mouseleave: e.mouseLeaveConfigurableButton
            }
        }, [i("a", {
            attrs: {
                href: "javascript:;",
                title: e.configurableButton.title
            }
        })]), e._v(" "), i("a", {
            attrs: {href: "javascript:;", title: "主菜单"},
            on: {
                mousedown: function (t) {
                    return t.stopPropagation(), e.showMenu(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-menu"})]), e._v(" "), e.isShowMenu ? i("div", {
            ref: "mainMenu",
            staticClass: "xly-context-menu",
            staticStyle: {left: "100px", bottom: "30px"},
            attrs: {tabindex: "0"},
            on: {blur: e.onMenuBlur}
        }, [i("main-menu", {
            attrs: {"is-show-menu": e.isShowMenu, showBrowserIcon: e.showBrowserIcon},
            on: {
                "update:isShowMenu": function (t) {
                    e.isShowMenu = t
                }
            }
        })], 1) : e._e()])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-client__header",
            class: {dragable: e.dragable}
        }, [i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !e.settingTab && "message-page" !== e.curNav && e.currentNavView && !e.currentNavView.isEmbeddedBrowser,
                expression: "!settingTab && curNav !== 'message-page' && (currentNavView && !currentNavView.isEmbeddedBrowser)"
            }], staticClass: "xly-search none-dragable"
        }, [i("td-button", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: "download-panel" === e.curNav,
                expression: "curNav === 'download-panel'"
            }], attrs: {secondary: ""}, on: {click: e.popupMenu}
        }, [i("i", {staticClass: "xly-icon-add"}), e._v(e._s(e.buttonText) + "\n    ")]), e._v(" "), i("td-button", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isLogined && "pan-plugin-view" === e.curNav,
                expression: "(isLogined && curNav === 'pan-plugin-view')"
            }], on: {click: e.popupMenu}
        }, [i("i", {staticClass: "xly-icon-add"}), e._v(e._s(e.buttonText) + "\n      "), i("i", {staticClass: "xly-icon-arrow-file"})]), e._v(" "), i("td-badge", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isLogined && "pan-plugin-view" === e.curNav,
                expression: "(isLogined && curNav === 'pan-plugin-view')"
            }], attrs: {value: e.transferringTasksCount, max: 99, hideSup: e.transferringTasksCount <= 0}
        }, [i("td-button", {
            attrs: {secondary: ""},
            on: {click: e.handleTransport}
        }, [i("span", {
            staticClass: "xly-button__icon",
            class: {"is-animation": e.transferringTasksCount > 0}
        }, [i("i", {staticClass: "xly-icon-transport-up"}), e._v(" "), i("i", {staticClass: "xly-icon-transport-down"})]), e._v("传输\n      ")])], 1), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isPopupMenu,
                expression: "isPopupMenu"
            }],
            ref: "menuButton",
            staticClass: "xly-netdisk-menu",
            staticStyle: {top: "43px", "z-index": "99"},
            attrs: {tabindex: "0"},
            on: {blur: e.onBlur}
        }, [i("ul", [i("li", {
            staticClass: "xly-netdisk-menu__item",
            on: {click: e.uploadLocalFiles}
        }, [i("span", {staticClass: "xly-netdisk-menu__icon xly-netdisk-menu__icon--upload"}), e._v(" "), i("span", [e._v("本地上传")])]), e._v(" "), e.allowUploadFolder ? i("li", {
            staticClass: "xly-netdisk-menu__item",
            class: {"is-disabled": e.isInSafeSpace},
            on: {click: e.uploadLocalDir}
        }, [i("span", {staticClass: "xly-netdisk-menu__icon xly-netdisk-menu__icon--folder"}), e._v(" "), i("span", [e._v("上传文件夹")])]) : e._e(), e._v(" "), i("li", {
            staticClass: "xly-netdisk-menu__item",
            class: {"is-disabled": e.isInSafeSpace},
            on: {click: e.addLink}
        }, [i("span", {staticClass: "xly-netdisk-menu__icon xly-netdisk-menu__icon--link"}), e._v(" "), i("span", [e._v("添加链接")])]), e._v(" "), i("li", {
            staticClass: "xly-netdisk-menu__item",
            class: {"is-disabled": e.isInSafeSpace},
            on: {click: e.addBt}
        }, [i("span", {staticClass: "xly-netdisk-menu__icon xly-netdisk-menu__icon--bt"}), e._v(" "), i("span", [e._v("添加BT")])]), e._v(" "), i("li", {
            staticClass: "xly-netdisk-menu__item",
            on: {click: e.createFolder}
        }, [i("span", {staticClass: "xly-netdisk-menu__icon xly-netdisk-menu__icon--file"}), e._v(" "), i("span", [e._v("新建文件夹")])])])]), e._v(" "), i("find-page-main-top", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !e.settingTab,
                expression: "!settingTab"
            }], attrs: {isFindPage: e.isFindPage}
        })], 1), e._v(" "), !e.settingTab && e.currentNavView && e.currentNavView.isEmbeddedBrowser ? i("div", {staticClass: "xly-client-title none-dragable"}, [i("a", {
            staticClass: "td-input__button",
            class: {"is-disabled": !e.canGoBack},
            attrs: {href: "javascript:;", title: "后退"},
            on: {click: e.clickGoBack}
        }, [i("i", {staticClass: "td-icon-arrow-left"})]), e._v(" "), i("a", {
            staticClass: "td-input__button",
            class: {"is-disabled": !e.canGoForward},
            attrs: {href: "javascript:;", title: "前进"},
            on: {click: e.clickGoForward}
        }, [i("i", {staticClass: "td-icon-arrow-right"})]), e._v(" "), i("i", {staticClass: "xly-line"}), e._v(" "), i("a", {
            staticClass: "td-input__button",
            attrs: {href: "javascript:;", title: "刷新"},
            on: {click: e.clickRefresh}
        }, [i("i", {staticClass: "td-icon-refresh"})])]) : e._e(), e._v(" "), e.settingTab ? i("div", {
            staticClass: "xly-client__back none-dragable",
            on: {
                click: function (t) {
                    e.closeSettingCenter()
                }
            }
        }, [i("i", {staticClass: "xly-icon-back"}), e._v(" 返回\n  ")]) : e._e(), e._v(" "), i("div", {staticClass: "xly-client-operate none-dragable"}, [i("a", {
            staticClass: "none-dragable",
            attrs: {href: "javascript:;", title: "换肤"},
            on: {
                click: function (t) {
                    return t.stopPropagation(), e.openThemeWindow(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-theme"})]), e._v(" "), i("i", {staticClass: "xly-line"}), e._v(" "), i("a", {
            staticClass: "none-dragable",
            class: {"disable-hover": e.disableHover},
            attrs: {href: "javascript:;", title: "最小化"},
            on: {click: e.minizeMainWindow}
        }, [i("i", {staticClass: "xly-icon-minimize"})]), e._v(" "), i("a", {attrs: {href: "javascript:;"}}, [i("i", {
            staticClass: "none-dragable",
            class: {"disable-hover": e.disableHover, "xly-icon-reduce": e.maximized, "xly-icon-maximize": !e.maximized},
            attrs: {title: e.maximized ? "还原" : "最大化"},
            on: {click: e.toggleMaximizeMainWindow}
        })]), e._v(" "), i("a", {
            staticClass: "none-dragable",
            class: {"disable-hover": e.disableHover},
            attrs: {href: "javascript:;", title: "关闭"},
            on: {click: e.closeMainWindow}
        }, [i("i", {staticClass: "xly-icon-close"})])])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticStyle: {width: "calc(100vw - 100px)"}}, [i("div", {
            staticClass: "xly-browser-tab",
            style: "" + e.browserTabStyle
        }, [i("td-browser-tab", {
            attrs: {
                tabs: e.tabs,
                "tab-style": e.tabStyle,
                "pinned-min-width": 180,
                "tabs-shape": "simple",
                "unpinned-width": 180,
                sortable: "",
                "min-width": 60,
                "show-total-limit": 12,
                current: e.current,
                background: e.background,
                "tab-listeners": e.tabListeners
            },
            on: {
                "update:tabs": e.updateTabs,
                "update:current": e.updateCurrent,
                add: e.handleAdd,
                remove: e.handleRemove,
                change: e.handleChange,
                "middle-click": e.handleMiddleClick,
                "total-click": e.handleTotalClick
            },
            nativeOn: {
                click: function (t) {
                    return e.handleClick(t)
                }
            },
            scopedSlots: e._u([{
                key: "default", fn: function (t) {
                    var n = t.index, o = t.tab;
                    return [0 === n && 0 !== e.current && -1 === e.currentCategoryId ? [i("div", {
                        ref: "progress",
                        staticClass: "xlx-browser-tab__progress"
                    }, [i("span", {staticClass: "xlx-browser-tab__progress-inner"})]), e._v(" "), i("span", {staticClass: "xlx-browser-tab__text"}, [e._v(e._s(e.titleCue))])] : e._e(), e._v(" "), e.isTabLoading(n) ? i("i", {staticClass: "icon-tab-loading"}) : e._e(), e._v(" "), i("span", {
                        directives: [{
                            name: "show",
                            rawName: "v-show",
                            value: 0 !== n || 0 === e.current || -1 !== e.currentCategoryId,
                            expression: "index !== 0 || current === 0 || currentCategoryId !== -1"
                        }], attrs: {id: 0 === n ? "recommendTab" : "", tabindex: "0"}
                    }, [e._v(e._s(o.title))])]
                }
            }])
        })], 1), e._v(" "), i("div", {
            staticClass: "xly-find",
            staticStyle: {height: "calc(100vh - 74px)"}
        }, [e.isLoaded ? i("home-page", {style: e.homepageShow}) : e._e(), e._v(" "), i("browser-view-container", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.currentTabIsChromium,
                expression: "currentTabIsChromium"
            }]
        })], 1)])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticStyle: {height: "100%"}}, [t("webview", {
            ref: "messagePage",
            staticClass: "iframe-message",
            staticStyle: {height: "100%"},
            attrs: {id: this.elementId, nodeintegration: "", src: this.messagePageUrl, preload: this.preloadPath}
        })], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-down"}, [e._m(0), e._v(" "), i("div", {staticClass: "xly-client-side"}, [i("ad-platform-ctrl", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.adShow,
                expression: "adShow"
            }], on: {"ad-show": e.handleAdShow}
        }), e._v(" "), e.taskDbLoadFinished ? e._e() : i("download-list-skeleton"), e._v(" "), i("download-list-container", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.taskDbLoadFinished && !e.showPrivateSpaceOpenPage && !e.isSearch,
                expression: "taskDbLoadFinished && !showPrivateSpaceOpenPage && !isSearch"
            }], ref: "downloadlist", attrs: {"vip-info": e.vipInfo}, nativeOn: {
                keydown: function (t) {
                    return e.keydownShowSearchUI(t)
                }
            }
        }, [i("toast-notify")], 1), e._v(" "), e.showPrivateSpaceOpenPage ? i("private-space-open-page-container") : e._e(), e._v(" "), i("status-bar-container")], 1), e._v(" "), i("task-detail")], 1)
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {
            staticStyle: {
                position: "absolute",
                left: "-10000px",
                top: "142px",
                width: "540px",
                height: "28px",
                overflow: "hidden"
            }
        }, [t("div", {
            staticStyle: {
                position: "absolute",
                left: "-10000px",
                top: "142px",
                width: "540px",
                height: "28px"
            }, attrs: {id: "webview_container"}
        })])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "setting-center"}, [i("div", {
            ref: "settinContain",
            staticClass: "xly-setting",
            on: {scroll: e.handleScroll}
        }, [i("div", {staticClass: "xly-setting-nav"}, [i("ul", {attrs: {id: "navList"}}, e._l(e.confSchema, function (t, n) {
            return i("li", {
                key: n, staticClass: "xly-setting-nav__item", on: {
                    click: function (t) {
                        e.clickTab(n)
                    }
                }
            }, [i("a", {
                class: {"is-active": e.currenIndex === n},
                attrs: {href: "javascript:;"}
            }, [e._v(e._s(t.name))])])
        }))]), e._v(" "), i("div", {staticClass: "xly-setting-wrapper"}, e._l(e.confSchema, function (t, n) {
            return i("div", {
                key: n,
                staticClass: "xly-setting-content contain-tab",
                class: t.classes,
                staticStyle: {display: "block"}
            }, [i("h3", [e._v(e._s(t.name))]), e._v(" "), i("div", {staticClass: "xly-setting-content__box"}, [i("ul", {staticClass: "xly-setting-content__vertical"}, e._l(t.children, function (t, n) {
                return i("li", {
                    key: n,
                    class: [{"xly-setting-content__item": t.children}, t.liClasses],
                    style: t.liStyles || ""
                }, [i("generator-view", {
                    attrs: {item: t, formData: e.formData},
                    on: {input: e.handleConfChange}
                }), e._v(" "), t.children ? i("div", {staticClass: "xly-setting-content__box"}, [i("ul", {class: t.ulClasses || ""}, e._l(t.children, function (t, n) {
                    return i("li", {key: n, class: t.liClasses || ""}, [i("generator-view", {
                        attrs: {
                            item: t,
                            formData: e.formData
                        }, on: {input: e.handleConfChange}
                    })], 1)
                }))]) : e._e()], 1)
            }))])])
        }))])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-client-content",
            staticStyle: {position: "relative", height: "100%"}
        }, [e.isError ? i("div", {staticClass: "xly-error"}, [i("i", {staticClass: "xly-img-404"}), e._v(" "), i("p", [e._v("您的网站已飞到了外太空")]), e._v(" "), i("div", {staticClass: "xly-error__button"}, [i("td-button", {
            attrs: {size: "small"},
            on: {click: e.refresh}
        }, [e._v("刷新")])], 1)]) : e.isLoading ? i("Loading") : e._e()], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", [i("ul", {staticClass: "xly-context-menu__main xly-context-menu__main--primary"}, [e.showBrowserIcon ? i("li", {
        }, [e._m(0)]) : e._e(), e._v(" "), i("li", {
        }, [e._m(1)]), e._v(" "), i("li", {staticClass: "xly-context-menu__item"}, [i("div", {
            staticClass: "xly-context-menu__content",
            on: {click: e.clickSetting}
        }, [i("i", {staticClass: "xly-icon-menu-setting"}), e._v(" "), i("span", {staticClass: "xly-context-menu__text"}, [e._v("设置")])])])]), e._v(" "), i("ul", {staticClass: "xly-context-menu__main"}, [i("li", {
            staticClass: "xly-context-menu__item",
            on: {click: e.clickNewTask}
        }, [e._m(2)]), e._v(" "), i("li", {
            staticClass: "xly-context-menu__item",
            on: {click: e.clickUnfinished}
        }, [e._m(3)]), e._v(" "), i("li", {staticClass: "xly-context-menu__item is-separate"}, [i("div", {staticClass: "xly-context-menu__content"}, [-1 !== e.downloadCompleteTaskType ? i("i", {staticClass: "xly-icon-menu-chosen"}) : e._e(), e._v(" "), i("span", {staticClass: "xly-context-menu__text"}, [e._v("下载完成后"), i("b", [e._v(e._s(e.scheduleText))])]), e._v(" "), i("i", {staticClass: "xly-icon-menu-more"})]), e._v(" "), i("ul", {staticClass: "xly-context-menu__children"}, [i("li", {
            staticClass: "xly-context-menu__item",
            on: {
                click: function (t) {
                    e.clickSchedutleTask(0)
                }
            }
        }, [i("div", {staticClass: "xly-context-menu__content"}, [0 === e.downloadCompleteTaskType ? i("i", {staticClass: "xly-icon-menu-chosen"}) : e._e(), e._v(" "), i("span", {staticClass: "xly-context-menu__text"}, [e._v("关机")])])]), e._v(" "), i("li", {
            staticClass: "xly-context-menu__item",
            on: {
                click: function (t) {
                    e.clickSchedutleTask(1)
                }
            }
        }, [i("div", {staticClass: "xly-context-menu__content"}, [1 === e.downloadCompleteTaskType ? i("i", {staticClass: "xly-icon-menu-chosen"}) : e._e(), e._v(" "), i("span", {staticClass: "xly-context-menu__text"}, [e._v("睡眠")])])]), e._v(" "), i("li", {
            staticClass: "xly-context-menu__item",
            on: {
                click: function (t) {
                    e.clickSchedutleTask(2)
                }
            }
        }, [i("div", {staticClass: "xly-context-menu__content"}, [2 === e.downloadCompleteTaskType ? i("i", {staticClass: "xly-icon-menu-chosen"}) : e._e(), e._v(" "), i("span", {staticClass: "xly-context-menu__text"}, [e._v("退出")])])])])]), e._v(" "), i("li", {
        }, [e._m(4)]), e._v(" "), i("li", {
        }, [e._m(5)]), e._v(" "), i("li", {
        }, [e._m(6)]), e._v(" "), i("li", {staticClass: "xly-context-menu__item is-separate"}, [e._m(7), e._v(" "), i("ul", {staticClass: "xly-context-menu__children is-top"}, [i("li", {
            staticClass: "xly-context-menu__item",
            on: {click: e.clickAboutThunder}
        }, [e._m(8)]), e._v(" "), i("li", {
        }, [e._m(10)]), e._v(" "), i("li", {
        }, [e._m(11)])])]), e._v(" "), i("li", {
            staticClass: "xly-context-menu__item",
            on: {click: e.clickQuit}
        }, [e._m(12)])])])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t()
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t()
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-context-menu__content"}, [t("span", {staticClass: "xly-context-menu__text"}, [this._v("新建下载(N)")])])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-context-menu__content"}, [t("span", {staticClass: "xly-context-menu__text"}, [this._v("导入未完成下载")])])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t()
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t()
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t()
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-context-menu__content"}, [t("span", {staticClass: "xly-context-menu__text"}, [this._v("更多")]), this._v(" "), t("i", {staticClass: "xly-icon-menu-more"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-context-menu__content"}, [t("span", {staticClass: "xly-context-menu__text"}, [this._v("关于迅雷")])])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t()
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t()
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t()
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-context-menu__content"}, [t("span", {staticClass: "xly-context-menu__text"}, [this._v("退出(X)")])])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {
            staticClass: "xly-browser-search is-planB",
            class: {"is-normal": !this.isFindPage}
        }, [t("address-bar-container", {staticClass: "none-dragable", attrs: {isFindPage: this.isFindPage}})], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return "" === e.component ? i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.show,
                expression: "show"
            }], staticClass: "xly-down-bar", on: {mousemove: e.handleMouseMove, mouseout: e.handleMouseOut}
        }, [i("p", {staticClass: "xly-down-bar__text"}, [e._v("\n    " + e._s(e.message) + "\n  ")]), e._v(" "), i("div", {staticClass: "xly-down-bar__option"}, [e.cancel ? i("a", {
            staticClass: "xly-down-bar__button",
            attrs: {href: "javascript:;"},
            on: {click: e.handleCancel}
        }, [e._v(e._s(e.cancelText))]) : e._e(), e._v(" "), i("a", {
            staticClass: "xly-down-bar__close",
            attrs: {href: "javascript:;", title: "关闭"},
            on: {click: e.handleClose}
        }, [i("i", {staticClass: "td-icon-close"})])])]) : i(e.component, {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.show,
                expression: "show"
            }],
            tag: "component",
            attrs: {isUp: e.isUp, data: e.showNotifyItem},
            on: {close: e.handleClose, ok: e.handleClose},
            nativeOn: {
                mousemove: function (t) {
                    return e.handleMouseMove(t)
                }, mouseout: function (t) {
                    return e.handleMouseOut(t)
                }
            }
        })
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-down-bar xly-down-bar--normal",
            class: {"is-large": e.isLarge, "is-animation": e.sweepLight, "is-super": e.isSuper},
            style: e.adBackground
        }, [e._m(0), e._v(" "), i("div", {staticClass: "xly-down-bar__media"}, [e.showProgress ? [i("td-progress", {
            attrs: {
                type: "circle",
                color: "#f1c37b",
                "outer-color": e.outerColor,
                linecap: "round",
                value: e.progress,
                width: 32,
                "stroke-width": 2
            }
        }), e._v(" "), i("img", {attrs: {src: e.iconUrl, alt: ""}})] : i("img", {
            attrs: {
                src: e.iconUrl,
                alt: ""
            }
        })], 2), e._v(" "), i("p", {
            staticClass: "xly-down-bar__text", style: e.adPColor, on: {
                click: function (t) {
                    e.onClick("content")
                }
            }
        }, [e._v(e._s(e.content))]), e._v(" "), e.isLarge && "pack_using" !== e.adType ? i("div", {
            staticClass: "xly-down-bar__detail",
            domProps: {innerHTML: e._s(e.secondary)}
        }) : e.isLarge && "pack_using" === e.adType ? i("div", {staticClass: "xly-down-bar__scroll"}, [i("ul", {class: {"is-moving": e.subtiles.length > 1}}, e._l(e.subtiles, function (t, n) {
            return i("li", {key: n}, [i("div", {staticClass: "xly-down-bar__detail", domProps: {innerHTML: e._s(t)}})])
        }))]) : e._e(), e._v(" "), i("div", {staticClass: "xly-down-bar__option"}, [i("a", {
            staticClass: "xly-down-bar__button",
            style: e.adOptionAStyle,
            attrs: {href: "javascript:;"},
            on: {
                click: function (t) {
                    e.onClick("btn")
                }
            }
        }, [e._v(e._s(e.btnText))]), e._v(" "), i("a", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.closeBtnVisible,
                expression: "closeBtnVisible"
            }],
            staticClass: "xly-down-bar__close",
            style: e.adOptionAStyle,
            attrs: {href: "javascript:;", title: "关闭"},
            on: {
                click: function (t) {
                    e.onClick("close")
                }
            }
        }, [i("i", {staticClass: "td-icon-close"})])])])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-down-bar__arrow"}, [t("i"), t("i"), t("i")])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xlx-side-promotion",
            style: e.isSearch ? "position: absolute; bottom: 0" : ""
        }, [i("div", {staticClass: "xlx-side-promotion__option"}, [i("a", {
            attrs: {href: "javascript:;"},
            on: {
                click: function (t) {
                    e.onClick("nodisturb")
                }
            }
        }, [e._v("不再展示")]), e._v(" "), i("a", {attrs: {href: "javascript:;"}}, [i("i", {
            staticClass: "xlx-icon-close",
            on: {
                click: function (t) {
                    e.onClick("close")
                }
            }
        })])]), e._v(" "), i("a", {
            staticClass: "xlx-side-promotion__inner",
            attrs: {href: "javascript:;"},
            on: {
                click: function (t) {
                    e.onClick("content")
                }
            }
        }, [i("img", {attrs: {src: e.picFile, alt: ""}})])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "td-tabs xly-side"}, [i("div", {staticClass: "td-tabs__title"}, [i("div", {staticClass: "td-tabs__nav"}, [i("div", {
            staticClass: "td-tabs__item",
            class: {"is-active": !1 === e.completedActive}
        }, [i("div", [e._v("\n            下载中\n            "), i("span", {staticClass: "xly-side__number"}, [e._v(e._s(e.downloadingCount || ""))])])]), e._v(" "), i("div", {
            staticClass: "td-tabs__item",
            class: {"is-active": e.completedActive}
        }, [i("div", [e._v("\n            已完成\n            "), i("span", {staticClass: "xly-side__number"}, [e._v(e._s(e.completedCount || ""))])])]), e._v(" "), i("div", {
            staticClass: "td-tabs__item",
            class: {"is-active": !1}
        }, [e._m(0)])]), e._v(" "), e._m(1)]), e._v(" "), i("div", {staticClass: "td-tabs__content"}, [i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !1 === e.completedActive,
                expression: "completedActive === false"
            }], staticClass: "td-tabs__pane"
        }, [i("ul", {
            staticClass: "td-draglist",
            staticStyle: {outline: "none"}
        }, e._l(e.downloadingTaskList, function (t) {
            return i("li", {
                key: t.taskId,
                staticClass: "td-draglist-item is-transition"
            }, [i("div", {staticClass: "xly-side-item"}, [i("div", {staticClass: "xly-side-wrapper"}, [i("div", {staticClass: "td-media"}, [i("div", {staticClass: "td-media__object"}), e._v(" "), i("div", {staticClass: "td-media__content"}, [i("p", {staticClass: "xly-file-name"}, [e._v("\n                    " + e._s(t.taskName) + "\n                  ")]), e._v(" "), e._m(2, !0), e._v(" "), i("div", {staticClass: "xly-file-info"}, [e.taskError(t) ? i("p", {staticClass: "xly-file-error"}, [e._v(" ")]) : i("p", {staticClass: "xly-file-size"}, [i("span", {staticClass: "xly-file-size__finish"}, [e._v(e._s(e.formatSizeCustom(t.downloadSize)))]), i("span", {staticClass: "xly-file-size__separator"}, [e._v("/")]), i("span", {staticClass: "xly-file-size__total"}, [e._v(e._s(e.formatSizeCustom(t.fileSize)))])])]), e._v(" "), i("div", {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: !e.taskError(t),
                    expression: "!taskError(item)"
                }], staticClass: "td-progress td-progress--line"
            }, [i("div", {staticClass: "td-progress-bar"}, [i("div", {staticClass: "td-progress-bar__outer"}, [i("div", {
                staticClass: "td-progress-bar__inner",
                style: e.progress(t)
            })])])])])])])])])
        }))]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.completedActive,
                expression: "completedActive"
            }], staticClass: "td-tabs__pane"
        }, [i("ul", {
            staticClass: "td-draglist",
            staticStyle: {outline: "none"}
        }, e._l(e.completedTaskList, function (t) {
            return i("li", {
                key: t.taskId,
                staticClass: "td-draglist-item is-transition"
            }, [i("div", {staticClass: "xly-side-item"}, [i("div", {staticClass: "xly-side-wrapper"}, [i("div", {staticClass: "td-media"}, [i("div", {staticClass: "td-media__object"}), e._v(" "), i("div", {staticClass: "td-media__content"}, [i("p", {staticClass: "xly-file-name"}, [e._v("\n                  " + e._s(t.taskName) + "\n                ")]), e._v(" "), i("div", {staticClass: "xly-file-info"}, [i("p", {staticClass: "xly-file-size"}, [i("span", {staticClass: "xly-file-size__total"}, [e._v(e._s(e.formatSizeCustom(t.fileSize)))])])])])])])])])
        }))]), e._v(" "), i("div", {
            directives: [{name: "show", rawName: "v-show", value: !1, expression: "false"}],
            staticClass: "td-tabs__pane"
        })])])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", [this._v("\n            回收站\n            "), t("span", {staticClass: "xly-side__number"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "td-tabs__extra"}, [t("a", {attrs: {href: "javascript:;"}}, [t("i", {staticClass: "xly-icon-more"})])])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-side-operate"}, [t("a", {
            staticClass: "xly-side-operate__button",
            attrs: {href: "javascript:;", title: "下载"}
        }, [t("i", {staticClass: "xly-icon-download"})])])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement;
        return (this._self._c || e)(this.item.type, {
            tag: "component",
            style: this.item.styles,
            attrs: {item: this.item, label: this.item.label, formData: this.formData, value: this.value},
            on: {input: this.handleInput}
        })
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticStyle: {height: "100%"}}, [t("webview", {
            ref: "webview",
            staticClass: "iframe-home",
            attrs: {id: this.elementId, nodeintegration: "", src: this.homePageUrl, preload: this.preloadPath}
        })], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-client-content",
            staticStyle: {position: "relative", height: "100%"}
        }, [e.isError ? i("div", {staticClass: "xly-error"}, [i("i", {staticClass: "xly-img-404"}), e._v(" "), i("p", [e._v("您的网站已飞到了外太空")]), e._v(" "), i("div", {staticClass: "xly-error__button"}, [i("td-button", {
            attrs: {
                secondary: "",
                disabled: !e.canGoBack,
                size: "small"
            }, on: {click: e.goBack}
        }, [e._v("返回")]), e._v(" "), i("td-button", {
            attrs: {size: "small"},
            on: {click: e.refresh}
        }, [e._v("刷新")])], 1)]) : e.isLoading ? i("Loading") : e._e()], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xlx-nav"}, [e._l(e.toolbarButtons, function (t) {
            return ["xlx-icon-nav-vip" != t.id ? i("tool-bar-button-container", {
                key: t.id,
                attrs: {
                    id: t.id,
                    imgSrc: t.imgSrc,
                    redDot: t.redDot,
                    title: t.title,
                    newIcon: t.newIcon,
                    loading: t.loading,
                    tooltip: t.tooltip,
                    tooltipTitle: t.tooltipTitle,
                    tooltipSubTitle: t.tooltipSubTitle,
                    buttonClassFilter: t.filterClass,
                    click: t.onClick,
                    tooltipClose: t.onTooltipClose,
                    tooltipClick: t.onTooltipClick,
                    enter: t.onEnter
                }
            }) : 0 === e.vipButtonPluginEnable ? i("tool-bar-vip-button-container", {
                key: t.id,
                attrs: {id: t.id, title: t.title, buttonClassFilter: t.filterClass}
            }) : e._e()]
        })], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-status"}, [i("div", {
            staticClass: "xly-plan",
            attrs: {tabindex: "0"},
            on: {
                click: function (t) {
                    t.stopPropagation(), e.handleClick("entry")
                }, blur: e.onPopUpBlur
            }
        }, [i("p", {
            staticClass: "xly-plan__text",
            class: {"is-limit": e.isLimit}
        }, [e._v(e._s(e.entryText))]), e._v(" "), i("div", {
            staticClass: "xly-plan-menu",
            style: e.popUp ? "display:block;" : "display:none"
        }, [i("ul", {staticClass: "xly-plan-menu__main"}, [i("li", {
            staticClass: "xly-plan-menu__item",
            class: {"is-limit": e.isLimit},
            on: {
                click: function (t) {
                    t.stopPropagation(), e.handleClick("limitSpeed")
                }
            }
        }, [i("div", {staticClass: "xly-plan-menu__content"}, [i("span", {staticClass: "xly-plan-menu__text"}, [e._v(e._s(e.limitSpeetMenuText))])])]), e._v(" "), e.isLimit ? i("li", {
            staticClass: "xly-plan-menu__item",
            on: {
                click: function (t) {
                    t.stopPropagation(), e.handleClick("totalSpeed")
                }
            }
        }, [e._m(0)]) : e._e()]), e._v(" "), i("ul", {staticClass: "xly-plan-menu__main"}, [i("li", {
            staticClass: "xly-plan-menu__item",
            class: {"is-chosen": e.isFreeDownload},
            on: {
                click: function (t) {
                    t.stopPropagation(), e.handleClick("freeDownload")
                }
            }
        }, [e._m(1)]), e._v(" "), i("li", {
            staticClass: "xly-plan-menu__item", on: {
                click: function (t) {
                    t.stopPropagation(), e.handleClick("scheduleTask")
                }
            }
        }, [i("div", {staticClass: "xly-plan-menu__content"}, [i("span", {staticClass: "xly-plan-menu__text"}, [e._v("计划任务")]), e._v(" "), e.scheduleTaskCount > 0 ? i("span", {staticClass: "xly-plan-menu__number"}, [e._v(e._s(e.scheduleTaskCount))]) : e._e()])])]), e._v(" "), i("ul", {staticClass: "xly-plan-menu__main"}, [i("li", {staticClass: "xly-plan-menu__item xly-plan-menu__item--option"}, [i("div", {staticClass: "xly-plan-menu__content"}, [i("i", {staticClass: "td-icon"}), e._v(" "), i("span", {staticClass: "xly-plan-menu__text"}, [e._v("下载完成后:")]), e._v(" "), i("ul", {staticClass: "xly-plan-menu__tag"}, [i("li", {
            class: {"is-chosen": 0 === e.downloadCompleteTaskType},
            on: {
                mousedown: function (t) {
                    t.stopPropagation(), e.handleClick("shutdown")
                }
            }
        }, [e._v("关机")]), e._v(" "), i("li", {
            class: {"is-chosen": 1 === e.downloadCompleteTaskType},
            on: {
                mousedown: function (t) {
                    t.stopPropagation(), e.handleClick("sleep")
                }
            }
        }, [e._v("睡眠")]), e._v(" "), i("li", {
            class: {"is-chosen": 2 === e.downloadCompleteTaskType},
            on: {
                mousedown: function (t) {
                    t.stopPropagation(), e.handleClick("exit")
                }
            }
        }, [e._v("退出")])])])])])])]), e._v(" "), i("span", {staticClass: "xly-line"}), e._v(" "), e.canShowKuainiaoInterface ? i("div", {staticClass: "xly-status-kn"}, [i("i", {
            staticClass: "xly-icon-bird",
            on: {
                click: function (t) {
                    e.onKuainiaoTextClick("fixed_icon")
                }
            }
        }), e._v(" "), i("span", {
            on: {
                click: function (t) {
                    e.onKuainiaoTextClick("text_link")
                }
            }
        }, [e._v(e._s(e.kuaiNiaoText))]), e._v(" "), e.canShowKuainiaoTip ? i("div", {staticClass: "xly-status-kn__tooltips"}, [i("i", {
            staticClass: "xly-icon-thunder",
            on: {click: e.onKuainiaoTipClick}
        }), e._v(" "), i("span", {on: {click: e.onKuainiaoTipClick}}, [e._v(e._s(e.kuaiNiaoTipText))])]) : e._e()]) : e._e(), e._v(" "), e.canShowKuainiaoInterface ? i("span", {staticClass: "xly-line"}) : e._e(), e._v(" "), i("div", {staticClass: "xly-status-speed"}, [i("div", {staticClass: "xly-status-speed__text"}, [i("p", {on: {mouseover: e.showPop}}, [e._v(e._s(e.curSpeed))])]), e._v(" "), i("div", {staticClass: "xly-speed-pop"}, [i("ul", [i("li", {staticClass: "xly-speed-pop__item"}, [i("i", {staticClass: "xly-icon-download"}), e._v(" "), i("p", [e._v("\n            下载速度：\n            "), i("em", [e._v(e._s(e.curHoverSpeed))])])]), e._v(" "), i("li", {staticClass: "xly-speed-pop__item"}, [i("i", {staticClass: "xly-icon-upload"}), e._v(" "), i("p", [e._v("\n            上传速度：\n            "), i("em", [e._v(e._s(e.curUpSpeed))])])])]), e._v(" "), i("td-button", {
            staticClass: "td-button--other",
            on: {click: e.viewMoreData}
        }, [e._v("查看更多数据")])], 1)]), e._v(" "), e.canShowDiskBusy ? i("span", {staticClass: "xly-line"}) : e._e(), e._v(" "), e.canShowDiskBusy ? i("div", {
            staticClass: "xly-status-disk",
            on: {
                mouseenter: function (t) {
                    e.hover()
                }
            }
        }, [i("span", {staticClass: "xly-status-plan__line"}), e._v(" "), e._m(2), e._v(" "), i("div", {staticClass: "xly-status-disk__pop"}, [e._m(3), e._v(" "), i("div", {staticClass: "xly-status-disk__content"}, [i("div", {staticClass: "xly-status-disk__progress"}, [i("ul", e._l(e.diskInfo, function (t) {
            return i("li", {key: t.name}, [i("p", {staticClass: "xly-status-disk__progress-text"}, [e._v("\n                磁盘 " + e._s(t.name) + ")繁忙度：\n                "), i("span", [e._v(e._s(t.percent) + "%")])]), e._v(" "), i("td-progress", {attrs: {value: t.percent}})], 1)
        }))]), e._v(" "), i("div", {staticClass: "xly-status-disk__detail"}, [i("p", [e._v("磁盘繁忙时可能出现以下情况：")]), e._v(" "), i("ul", [i("li", [e._v("1.下载速度变慢")]), e._v(" "), i("li", [e._v("2.电脑响应变慢")]), e._v(" "), i("li", [e._v("3.下载进度卡在99.9%")]), e._v(" "), this.taskIds.length < 3 ? i("li", [e._v("您无需执行任何操作，耐心等待即可！")]) : i("li", [e._v("建议您减少同时下载的任务数量！")])])])]), e._v(" "), i("td-button", {
            staticClass: "td-button--other",
            on: {
                click: function (t) {
                    e.openTab()
                }
            }
        }, [e._v("了解磁盘繁忙原因")])], 1)]) : e._e(), e._v(" "), i("div", {staticClass: "xly-status-operate"}, [i("div", {staticClass: "xly-status-operate__item xly-status-browser"}, [i("i", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.showIcon,
                expression: "showIcon"
            }], staticClass: "xly-icon-browser", on: {click: e.showBrowserGuide}
        }), e._v(" "), i("p", {staticClass: "xly-tips"}, [e._v("浏览器支持")]), e._v(" "), "browserPlugin" === e.currentGuide ? i("div", {staticClass: "xly-status-operate__tooltips"}, [i("p", {staticClass: "title"}, [e._v("浏览器插件可支持下载网页中的链接和视频")]), e._v(" "), i("p", {staticClass: "text"}, [e._v("超过100万人在使用")]), e._v(" "), i("span", {staticClass: "bird"}), e._v(" "), i("td-button", {
            on: {
                click: function (t) {
                    e.startBrowserGuide()
                }
            }
        }, [e._v("一键开启")]), e._v(" "), i("a", {
            attrs: {href: "javascript:;"}, on: {
                click: function (t) {
                    e.closeTip()
                }
            }
        }, [i("i", {staticClass: "td-icon-close"})])], 1) : e._e()]), e._v(" "), i("div", {
            staticClass: "xly-status-operate__item xly-status-secret",
            class: {"is-open": e.isInPrivateSpace},
            on: {click: e.handlePrivateSpace}
        }, [i("i", {staticClass: "xly-icon-secret"}), e._v(" "), i("p", {staticClass: "xly-tips"}, [e._v(e._s(e.isInPrivateSpace ? "退出" : "进入") + "私人空间")])])])])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-plan-menu__content"}, [t("span", {staticClass: "xly-plan-menu__text"}, [this._v("全速下载")])])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-plan-menu__content"}, [t("span", {staticClass: "xly-plan-menu__text"}, [this._v("空闲下载")])])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("p", {staticClass: "xly-status-disk__text"}, [t("i", {staticClass: "xly-icon-disk"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-status-disk__title"}, [t("p", [t("i", {staticClass: "xly-icon-note"}), this._v("检测到磁盘过于繁忙！\n        ")])])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xlx-side-update"}, [t("div", {staticClass: "xlx-side-update__progress"}, [this._v(this._s(this.progress) + "%")]), this._v(" "), this._m(0)])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("p", [this._v("正在升级下载引擎"), t("span", [t("i", [this._v("...")])])])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, n = e._self._c || t;
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            ref: "downMain",
            staticClass: "xly-down__main",
            staticStyle: {"overflow-x": "hidden"},
            attrs: {id: "xly-task-detail-down__main"}
        }, [i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: 1 === e.currentSelectdTaskIds.length && 0 !== e.curTaskId,
                expression: "currentSelectdTaskIds.length === 1 && curTaskId !== 0"
            }], staticClass: "xly-down-info"
        }, [i("XlHeader", {attrs: {curTaskName: e.curTaskName}}), e._v(" "), i("div", {staticClass: "xly-down-body"}, [i("XlTab", {
            attrs: {
                curTaskId: e.curTaskId,
                curUserId: e.curUserId,
                curCategoryid: e.currentCategoryViewId,
                currentCategoryId: e.currentCategoryId,
                "checked-task-num": e.checkedTaskNum,
                "complete-task-num": e.completeTaskNum
            }
        }), e._v(" "), i("scan-code", {
            attrs: {
                curTaskId: e.curTaskId,
                curUserId: e.curUserId,
                currentCategoryId: e.currentCategoryId,
                curCategoryViewid: e.currentCategoryViewId,
                "vip-info": e.vipInfo
            }
        }), e._v(" "), i("FileList", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isBtOrGroup,
                expression: "isBtOrGroup"
            }],
            attrs: {
                curTaskId: e.curTaskId,
                curCategroyViewID: e.currentCategoryViewId,
                currentCategoryId: e.currentCategoryId,
                operate: e.operate,
                playingMediaIndex: e.playingMediaIndex,
                playingCurTask: e.playingCurTask,
                playstate: e.playState,
                "checked-task-num": e.checkedTaskNum,
                "complete-task-num": e.completeTaskNum
            },
            on: {
                "update:checkedTaskNum": function (t) {
                    e.checkedTaskNum = t
                }, "update:completeTaskNum": function (t) {
                    e.completeTaskNum = t
                }
            }
        }), e._v(" "), i("XlDetail", {
            attrs: {
                curTaskId: e.curTaskId,
                curTaskStatus: e.curTaskStatus,
                curUserId: e.curUserId,
                curCategroyViewID: e.currentCategoryViewId,
                currentCategoryId: e.currentCategoryId
            }, on: {switchNav: e.switchNav}
        }), e._v(" "), e.showComment ? i("Comment", {
            attrs: {
                curTaskId: e.curTaskId,
                curTask: e.curTask,
                curUserId: e.curUserId,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId,
                userInfo: e.userInfo,
                vipInfo: e.vipInfo
            }
        }) : e._e(), e._v(" "), i("Recommend", {
            attrs: {
                curTaskId: e.curTaskId,
                curUserId: e.curUserId,
                isLogined: e.isLogined,
                vipInfo: e.vipInfo
            }
        })], 1)], 1), e._v(" "), e.currentSelectdTaskIds.length > 1 ? i("div", {staticClass: "xly-down-detail"}, [i("MultiChosenTasks", {
            attrs: {
                taskIds: e.currentSelectdTaskIds,
                curCategoryViewId: e.currentCategoryViewId,
                currentCategoryId: e.currentCategoryId
            }
        })], 1) : e._e(), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: 0 === e.curTaskId && 0 === e.currentSelectdTaskIds.length,
                expression: "curTaskId === 0 && currentSelectdTaskIds.length === 0"
            }], staticClass: "xly-empty"
        }, [i("i", {staticClass: "xly-icon-logo"})])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-side"}, [i("div", {staticClass: "td-tabs"}, [i("div", {staticClass: "td-tabs__title"}, [i("div", {staticClass: "td-tabs__nav"}, [i("div", {
            staticClass: "td-tabs__item",
            class: {"is-active": "Downloading" === e.currentCategoryViewId},
            on: {
                click: function (t) {
                    e.handleTitleClick("Downloading")
                }
            }
        }, [i("div", [e._v("\n            " + e._s(-1 === e.currentCategoryId ? "下载中" : "私人下载") + "\n            "), i("span", {staticClass: "xly-side__number"}, [e._v(e._s(e.downloadingTaskList.length || ""))])])]), e._v(" "), i("div", {
            staticClass: "td-tabs__item",
            class: {"is-active": "Completed" === e.currentCategoryViewId},
            on: {
                click: function (t) {
                    e.handleTitleClick("Completed")
                }
            }
        }, [i("div", [e._v("\n            " + e._s(-1 === e.currentCategoryId ? "已完成" : "私人文件") + "\n            "), i("span", {staticClass: "xly-side__number"}, [e._v(e._s(e.completedTaskList.length || ""))])])]), e._v(" "), -1 === e.currentCategoryId ? i("div", {
            staticClass: "td-tabs__item",
            class: {"is-active": "Recycle" === e.currentCategoryViewId},
            on: {
                click: function (t) {
                    e.handleTitleClick("Recycle")
                }
            }
        }, [i("div", [e._v("\n            回收站\n            "), i("span", {staticClass: "xly-side__number"}, [e._v(e._s(e.recycleTaskList.length || ""))])])]) : e._e()]), e._v(" "), i("div", {staticClass: "td-tabs__extra"}, [i("a", {
            attrs: {href: "javascript:;"},
            on: {click: e.handleCategoryMore}
        }, [i("i", {staticClass: "xly-icon-more"})])])]), e._v(" "), i("div", {staticClass: "td-tabs__content"}, [i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: "Downloading" === e.currentCategoryViewId,
                expression: "currentCategoryViewId === 'Downloading'"
            }], staticClass: "td-tabs__pane"
        }, [0 === e.downloadingTaskList.length ? i("div", {
            staticClass: "xly-side__empty",
            on: {
                contextmenu: function (t) {
                    return t.stopPropagation(), e.handleDownloadingBlankMenu(t)
                }
            }
        }, [i("div", {staticClass: "xly-img-empty-netdisk"}), e._v(" "), i("p", [e._v(e._s(-1 === e.currentCategoryId ? "没有正在下载任务" : "暂无任务"))])]) : i("download-category", {
            ref: "downloading",
            staticStyle: {outline: "none"},
            attrs: {
                componentName: "DownloadingItemContainer",
                tasklist: e.downloadingLoadedList,
                selectedTaskIds: e.downloadingSelectedIndexs,
                LOAD_MORE: e.LOAD_MORE,
                COMMIT_SELECT: e.UPDATE_DOWNLOADING_SELECTED_TASKS,
                COMMIT_UPDATE_TASKLIST: e.UPDATE_DOWNLOADING_TASKLIST,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId,
                panTaskProgress: e.panTaskProgress,
                panTaskType: e.panTaskType,
                panTaskData: e.panTaskData,
                "vip-info": e.vipInfo,
                showSideNetdisk: e.showSideNetdisk,
                qrCodeConfig: e.qrCodeConfig
            },
            on: {dblclick: e.downloadingItemDbClick, contextmenu: e.handleDownloadingItemMenu},
            nativeOn: {
                contextmenu: function (t) {
                    return t.stopPropagation(), e.handleDownloadingBlankMenu(t)
                }, keydown: function (t) {
                    return e.handleDelete(t)
                }
            }
        })], 1), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: "Completed" === e.currentCategoryViewId,
                expression: "currentCategoryViewId === 'Completed'"
            }], staticClass: "td-tabs__pane"
        }, [0 === e.completedTaskList.length ? i("div", {
            staticClass: "xly-side__empty",
            on: {
                contextmenu: function (e) {
                    e.stopPropagation()
                }
            }
        }, [i("div", {staticClass: "xly-img-empty-netdisk"}), e._v(" "), i("p", [e._v("没有已完成任务")])]) : i("download-category", {
            ref: "completed",
            staticClass: "xly-side-completed",
            staticStyle: {outline: "none"},
            attrs: {
                componentName: "CompletedItemContainer",
                sortable: "全部" === e.completedFilter,
                tasklist: e.completedCategoryLoadedList,
                selectedTaskIds: e.completedSelectedTaskIndexs,
                LOAD_MORE: e.completeLoadMore,
                COMMIT_SELECT: e.UPDATE_COMPLETED_SELECTED_TASKS,
                COMMIT_UPDATE_TASKLIST: e.UPDATE_COMPLETED_TASKLIST,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId
            },
            on: {contextmenu: e.handleCompletedItemMenu},
            nativeOn: {
                contextmenu: function (e) {
                    e.stopPropagation()
                }, keydown: function (t) {
                    return e.handleDelete(t)
                }
            }
        })], 1), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: -1 === e.currentCategoryId && "Recycle" === e.currentCategoryViewId,
                expression: "currentCategoryId === -1 && currentCategoryViewId === 'Recycle'"
            }], staticClass: "td-tabs__pane"
        }, [0 === e.recycleTaskList.length ? i("div", {
            staticClass: "xly-side__empty", on: {
                contextmenu: function (t) {
                    return t.stopPropagation(), e.handleRecycleBlankMenu(t)
                }
            }
        }, [i("div", {staticClass: "xly-img-empty-netdisk"}), e._v(" "), i("p", [e._v("没有回收站任务")])]) : i("download-category", {
            ref: "dustbin",
            staticClass: "xly-side-deleted",
            staticStyle: {outline: "none"},
            attrs: {
                componentName: "RecycleItemContainer",
                tasklist: e.recycleLoadedList,
                selectedTaskIds: e.recycleSelectedTaskIndexs,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId,
                LOAD_MORE: e.LOAD_MORE,
                COMMIT_SELECT: e.UPDATE_RECYCLE_SELECTED_TASKS,
                COMMIT_UPDATE_TASKLIST: e.UPDATE_RECYCLE_TASKLIST
            },
            on: {contextmenu: e.handleRecycleItemMenu},
            nativeOn: {
                contextmenu: function (t) {
                    return t.stopPropagation(), e.handleRecycleBlankMenu(t)
                }, keydown: function (t) {
                    e.handleDelete(t, !0)
                }
            }
        })], 1)])]), e._v(" "), e._t("default")], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-side is-secret"}, [i("div", {staticClass: "td-tabs is-active"}, [e._m(0), e._v(" "), i("div", {staticClass: "td-tabs__content"}, [i("div", {staticClass: "td-tabs__pane"}, [i("div", {staticClass: "xly-side__empty"}, [i("div", {staticClass: "xly-img-empty-netdisk"}), e._v(" "), i("p", {staticClass: "title"}, [e._v("私人空间")]), e._v(" "), i("p", [e._v("只有自己可以查看的下载任务")]), e._v(" "), i("button", {
            staticClass: "td-button",
            on: {click: e.openPrivateSpace}
        }, [e._v("开启私人空间")])])])])])])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "td-tabs__title"}, [t("div", {staticClass: "td-tabs__item is-active"}, [t("div", [this._v("\n        私人下载"), t("span", {staticClass: "xly-side__number"})])]), this._v(" "), t("div", {staticClass: "td-tabs__item"}, [t("div", [this._v("\n            私人文件"), t("span", {staticClass: "xly-side__number"})])])])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xlx-side-search",
            style: {height: e.hasLeftBottomAd ? "calc(100% - 68px)" : "100%"},
            attrs: {tabindex: "0"}
        }, [i("div", {staticClass: "xlx-search-record"}, [i("label", {staticClass: "td-input"}, [i("td-input", {
            ref: "input",
            attrs: {placeholder: "搜索下载记录", autofocus: ""},
            on: {
                focus: e.onInputFocus, blur: e.onInputBlur, input: e.startSearch, keydown: function (t) {
                    return ("button" in t || 65 === t.keyCode) && t.ctrlKey ? void e.$refs.input.select() : null
                }
            },
            nativeOn: {
                contextmenu: function (t) {
                    return e.handlePopInputMenu(t)
                }, keydown: function (t) {
                    return ("button" in t || 70 === t.keyCode) && t.ctrlKey ? e.keyCloseSearch(t) : null
                }
            },
            model: {
                value: e.curSearchKey, callback: function (t) {
                    e.curSearchKey = t
                }, expression: "curSearchKey"
            }
        })], 1), e._v(" "), this.inputFlag && this.curSearchKey.trim().length > 0 ? i("p", {staticClass: "xlx-search-record__result"}, [i("span", [e._v(e._s(e.resultCount))]), e._v("个结果\n    ")]) : e._e(), e._v(" "), i("a", {
            staticClass: "xlx-search-record__clear is-danger",
            attrs: {href: "javascript:;", title: ""},
            on: {click: e.clickCloseSearch}
        }, [i("i", {staticClass: "td-icon-close"})])]), e._v(" "), i("div", {staticClass: "xlx-search-list"}, [this.inputFlag && e.resultCount < 1 && this.curSearchKey.trim().length > 0 ? i("div", {staticClass: "xlx-side__empty"}, [i("p", [e._v("没有搜索到相关内容")])]) : i("div", {
            staticClass: "td-collapse",
            staticStyle: {height: "100%"},
            nativeOn: {
                keydown: function (t) {
                    return ("button" in t || 70 === t.keyCode) && t.ctrlKey ? e.keyCloseSearch(t) : null
                }
            }
        }, [e.downloadingSearchList.length > 0 ? i("div", {
            staticClass: "td-collapse-item xlx-side-downloading",
            nativeOn: {
                keydown: function (t) {
                    return ("button" in t || 70 === t.keyCode) && t.ctrlKey ? e.keyCloseSearch(t) : null
                }
            }
        }, [i("div", {staticClass: "td-collapse-item__title"}, [e._v(e._s(e.downloadingCategoryTitle))]), e._v(" "), i("div", {staticClass: "td-collapse-item__content"}, [i("download-category", {
            ref: "downloading",
            staticStyle: {outline: "none"},
            attrs: {
                componentName: "DownloadingItemContainer",
                sortable: !1,
                tasklist: e.downloadingSearchList,
                selectedTaskIds: e.currentSelSearchTaskIds,
                COMMIT_UPDATE_TASKLIST: e.UPDATE_DOWNLOADING_TASKLIST,
                COMMIT_SELECT: e.onDownloadTaskSelect,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId,
                itemType: e.searchType,
                sharedKeyWords: e.curSearchKey,
                pulseForRename: e.pulseEventFlag
            },
            on: {dblclick: e.downloadingItemDbClick, contextmenu: e.handleDownloadingItemMenu},
            nativeOn: {
                contextmenu: function (e) {
                    e.stopPropagation()
                }, keydown: function (t) {
                    if (!("button" in t) && e._k(t.keyCode, "delete", [8, 46], t.key, ["Backspace", "Delete"])) return null;
                    e.handleDelete(!1)
                }
            }
        })], 1)]) : e._e(), e._v(" "), e.completeSearchList.length > 0 ? i("div", {
            staticClass: "td-collapse-item xlx-side-completed",
            nativeOn: {
                keydown: function (t) {
                    return ("button" in t || 70 === t.keyCode) && t.ctrlKey ? e.keyCloseSearch(t) : null
                }
            }
        }, [i("div", {staticClass: "td-collapse-item__title"}, [e._v(e._s(e.completedCategoryTitle))]), e._v(" "), i("div", {staticClass: "td-collapse-item__content"}, [i("download-category", {
            ref: "completed",
            staticStyle: {outline: "none"},
            attrs: {
                componentName: "CompletedItemContainer",
                sortable: !1,
                tasklist: e.completeSearchList,
                selectedTaskIds: e.currentSelSearchTaskIds,
                COMMIT_UPDATE_TASKLIST: e.UPDATE_COMPLETED_TASKLIST,
                COMMIT_SELECT: e.onDownloadTaskSelect,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId,
                itemType: e.searchType,
                sharedKeyWords: e.curSearchKey,
                pulseForRename: e.pulseEventFlag
            },
            on: {contextmenu: e.handleCompletedItemMenu},
            nativeOn: {
                contextmenu: function (e) {
                    e.stopPropagation()
                }, keydown: function (t) {
                    if (!("button" in t) && e._k(t.keyCode, "delete", [8, 46], t.key, ["Backspace", "Delete"])) return null;
                    e.handleDelete(!1)
                }
            }
        })], 1)]) : e._e(), e._v(" "), e.recycleSearchList.length > 0 ? i("div", {
            staticClass: "td-collapse-item xlx-side-deleted",
            nativeOn: {
                keydown: function (t) {
                    return ("button" in t || 70 === t.keyCode) && t.ctrlKey ? e.keyCloseSearch(t) : null
                }
            }
        }, [i("div", {staticClass: "td-collapse-item__title"}, [e._v(e._s(e.recycleCategoryTitle))]), e._v(" "), i("div", {staticClass: "td-collapse-item__content"}, [i("download-category", {
            ref: "dustbin",
            staticStyle: {outline: "none"},
            attrs: {
                componentName: "RecycleItemContainer",
                sortable: !1,
                tasklist: e.recycleSearchList,
                selectedTaskIds: e.currentSelSearchTaskIds,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId,
                itemType: e.searchType,
                sharedKeyWords: e.curSearchKey,
                pulseForRename: e.pulseEventFlag,
                COMMIT_UPDATE_TASKLIST: e.UPDATE_RECYCLE_TASKLIST,
                COMMIT_SELECT: e.onDownloadTaskSelect
            },
            on: {dblclick: e.recycleItemDbClick, contextmenu: e.handleRecycleItemMenu},
            nativeOn: {
                contextmenu: function (e) {
                    e.stopPropagation()
                }, keydown: function (t) {
                    if (!("button" in t) && e._k(t.keyCode, "delete", [8, 46], t.key, ["Backspace", "Delete"])) return null;
                    e.handleDelete(!0)
                }
            }
        })], 1)]) : e._e()])])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {class: e.item.outerClass}, [i("td-checkbox", {
            attrs: {value: !(0 == e.formData[e.item.name].value)},
            on: {input: e.handleInput}
        }, [e._v("\n    " + e._s(e.item.label) + "\n  ")]), e._v(" "), e._l(e.item.extEles, function (t) {
            return [i(t.type, {
                key: t.name,
                tag: "component",
                attrs: {
                    item: t,
                    classes: t.classes,
                    text: t.text,
                    formData: e.formData,
                    name: t.name,
                    disabled: !e.formData[e.item.name].value,
                    value: e.formData[t.name]
                },
                on: {input: e.handleInput}
            })]
        }), e._v(" "), e.item.tip ? i("p", {class: e.item.tipClass}, [e._v("\n    " + e._s(e.item.tip) + "\n  ")]) : e._e()], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {class: e.item.outerClass}, [e.item.listEles ? [e._l(e.item.listEles, function (t) {
            return [i("td-button", {
                key: t.name,
                class: e.classes || t.classes,
                style: t.style || "",
                attrs: {disabled: e.disabled || t.bindName && !e.formData[t.bindName].value},
                on: {
                    click: function (i) {
                        e.popDialog(t)
                    }
                }
            }, [e._v(e._s(e.text || t.text))])]
        })] : [i("td-button", {
            class: e.classes || e.item.classes,
            style: e.item.style || "",
            attrs: {disabled: e.disabled || e.item.bindName && !e.formData[e.item.bindName].value},
            on: {
                click: function (t) {
                    e.popDialog(e.item)
                }
            }
        }, [e._v(e._s(e.text || e.item.text))])], e._v(" "), e._l(e.item.extEles, function (t) {
            return [i(t.type, {
                key: t.name,
                tag: "component",
                class: t.classes,
                style: t.style || "",
                attrs: {item: t, text: t.text, formData: e.formData}
            })]
        })], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {class: e.item.classes}, [i("p", [e._v("\n    限速时间段：\n    " + e._s(e.standardNumber(e.formData["ConfigNet-ConfigNet_Custom_Time_Begin_Hour"].value)) + ":\n    " + e._s(e.standardNumber(e.formData["ConfigNet-ConfigNet_Custom_Time_Begin_Minute"].value)) + "-" + e._s(e.standardNumber(e.formData["ConfigNet-ConfigNet_Custom_Time_End_Hour"].value)) + ":\n    " + e._s(e.standardNumber(e.formData["ConfigNet-ConfigNet_Custom_Time_End_Minute"].value)) + " \n    最大下载速度: " + e._s(e.maxDownloadSpeed) + "   \n    最大上传速度: " + e._s(e.maxUploadSpeed) + "\n  ")])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            class: e.item.outerClass,
            style: e.item.style
        }, ["" !== e.label ? i("span", [e._v(e._s(e.label))]) : e._e(), e._v(" "), i("td-tooltip", {
            attrs: {
                content: e.tipContent,
                visible: e.tooltipVisible,
                placement: "top"
            }
        }, [i("select-native", {
            ref: "root",
            class: e.classes || e.item.classes,
            attrs: {
                value: e.valueData,
                options: e.optionList || e.item.option,
                placeholder: e.placeHolder || e.formData[e.item.name].value + "",
                editable: e.item.editable,
                disabled: e.disabled
            },
            on: {input: e.validate, blur: e.handleOutFocus, "choose-file": e.selectPath}
        }, ["openFile" === e.item.slotOption || "openDirectory" === e.item.slotOption || "openThunderPan" === e.item.slotOption ? i("a", {
            staticClass: "xly-select__file",
            attrs: {slot: "suffix", href: "javascript:;"},
            on: {
                click: function (t) {
                    e.handleChangePath(e.item.slotOption)
                }
            },
            slot: "suffix"
        }, [i("i", {staticClass: "xly-icon-file"})]) : e._e()])], 1)], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            class: e.item.outClasses,
            style: e.item.style
        }, [i("td-tooltip", {
            attrs: {
                content: e.item.toolTipsContent || "",
                visible: e.tooltipVisible,
                placement: "top"
            }
        }, [i("td-input", {
            ref: "input",
            class: e.item.classes,
            attrs: {
                label: e.label || e.item.label,
                value: e.valueData,
                placeholder: e.item.placeholder,
                disabled: e.disabled
            },
            on: {
                input: e.validate,
                change: e.handleChange,
                keydown: e.handleKeyDown,
                keyup: e.handleKeyup,
                blur: e.outFocus
            }
        })], 1), e._v(" "), e._l(e.item.extEles, function (t) {
            return [i(t.type, {
                key: t.name,
                tag: "component",
                attrs: {
                    item: t,
                    classes: t.classes,
                    text: t.text,
                    formData: e.formData,
                    disabled: e.disabled || !e.formData[e.item.name].value,
                    value: e.formData[t.name]
                },
                on: {input: e.handleInput}
            })]
        })], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("p", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !e.item.isReleventUser || e.item.isReleventUser && "" !== e.userId,
                expression: "!item.isReleventUser || (item.isReleventUser && userId !== '')"
            }], class: e.clas, style: e.item.style || ""
        }, [e._v("\n   " + e._s(e.textContent) + "\n   "), e.item.tip ? i("span", {class: e.item.tipClass}, [e._v(e._s(e.item.tip))]) : e._e()])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {class: e.item.outerClass}, [i("ul", {class: e.item.ulClasses}, e._l(e.item.option, function (t, n) {
            return i("li", {
                directives: [{
                    name: "show",
                    rawName: "v-show",
                    value: !e.item.isReleventUser || e.item.isReleventUser && "" !== e.userId,
                    expression: "!item.isReleventUser || (item.isReleventUser && userId !== '')"
                }], key: n, class: e.item.classes
            }, [i("td-radio", {
                attrs: {
                    name: e.item.key,
                    value: "" + e.formData[e.item.name].value,
                    label: t,
                    disabled: e.item.disableds && e.item.disableds[n]
                }, on: {input: e.handleInput}
            }, [e._v(e._s(e.item.labels[n] || e.lable))]), e._v(" "), e.item.extEles ? i(e.item.extEles[n].type, {
                tag: "component",
                attrs: {
                    text: e.item.extEles[n].text,
                    item: e.item.extEles[n],
                    label: e.item.extEles[n] && e.item.extEles[n].label,
                    classes: e.item.extEles[n].classes,
                    disabled: e.formData[e.item.name].value !== e.item.extActiveValue,
                    name: e.item.extEles[n].name,
                    value: e.formData[e.item.extEles[n].name],
                    formData: e.formData
                },
                on: {input: e.handleInput}
            }) : e._e()], 1)
        })), e._v(" "), e.item.tip ? i("p", {class: e.item.tipClass}, [e._v(e._s(e.item.tip))]) : e._e()])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", [i("td-checkbox", {
            attrs: {value: !(0 == e.formData[e.item.name].value)},
            on: {input: e.handleInput}
        }, [e._v("\n    " + e._s(e.item.label) + "\n  ")]), e._v(" "), e._l(e.item.extEles, function (t, n) {
            return e.item.extEles ? i(t.type, {
                key: n,
                tag: "component",
                attrs: {
                    formData: e.formData,
                    placeHolder: e.formData[t.name] && e.formData[t.name].value,
                    item: t,
                    value: e.formData[t.name],
                    disabled: !(e.formData[e.item.name] && e.formData[e.item.name].value),
                    name: t.name,
                    label: t.label,
                    classes: t.classes,
                    text: t.text
                },
                on: {input: e.handleInput}
            }) : e._e()
        })], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {class: e.item.classes}, [i("td-checkbox", {
            attrs: {value: !(0 == e.formData[e.item.name].value)},
            on: {input: e.handleInput}
        }, [e._v("\n    " + e._s(e.item.label) + "\n  ")]), e._v(" "), e._l(e.item.extEles, function (t, n) {
            return e.item.extEles ? i(t.type, {
                key: n,
                tag: "component",
                attrs: {
                    formData: e.formData,
                    item: t,
                    placeHolder: e.formData[t.name] && e.formData[t.name].value,
                    disabled: !e.formData[e.item.name].value
                },
                on: {input: e.handleInput}
            }) : e._e()
        })], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {class: this.item.outerClass}, [t("label", {staticClass: "td-textarea"}, [t("textarea", {
            staticClass: "td-textarea__inner",
            class: this.item.classes,
            attrs: {placeholder: this.item.placeholder},
            domProps: {value: this.formData[this.item.name].value},
            on: {change: this.handleChange}
        })])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-setting-content__part"}, [i("p", {staticClass: "xly-setting-content__text"}, [e._v("代理管理")]), e._v(" "), i("div", {staticClass: "td-table td-table--border"}, [e._m(0), e._v(" "), i("div", {staticClass: "td-table__body-wrapper"}, [i("div", {staticClass: "td-table__panel"}, [i("table", {staticClass: "td-table__body"}, [e._m(1), e._v(" "), i("tbody", e._l(e.proxyList, function (t, n) {
            return t.name && t.name.length > 0 ? i("tr", {
                key: n,
                class: {"is-chosen": t === e.selectedItem},
                on: {
                    click: function (i) {
                        e.selectedItem = t
                    }
                }
            }, [i("td", [i("p", {staticClass: "td-table__text"}, [e._v(e._s(t.name))])]), e._v(" "), i("td", [i("p", {staticClass: "td-table__text"}, [e._v(e._s(t.host))])]), e._v(" "), i("td", [i("p", {staticClass: "td-table__text"}, [e._v(e._s(t.port))])]), e._v(" "), i("td", [i("p", {staticClass: "td-table__text"}, [e._v(e._s(t.type))])])]) : e._e()
        }))])])])]), e._v(" "), i("div", {staticClass: "xly-setting-content__button"}, [i("div", {staticClass: "botton-wrap"}, [i("a", {
            staticClass: "td-button td-button--small",
            attrs: {href: "javascript:;"},
            on: {click: e.handleAddProxy}
        }, [e._v("添加")]), e._v(" "), i("a", {
            staticClass: "td-button td-button--other td-button--small",
            class: {"is-disabled": null === e.selectedItem},
            attrs: {href: "javascript:;"},
            on: {click: e.handleModifyProxy}
        }, [e._v("修改")]), e._v(" "), i("a", {
            staticClass: "td-button td-button--other td-button--small",
            class: {"is-disabled": null === e.selectedItem},
            attrs: {href: "javascript:;"},
            on: {click: e.handleDeleteProxy}
        }, [e._v("删除")])]), e._v(" "), i("div", {staticClass: "botton-wrap"}, [i("a", {
            staticClass: "td-button td-button--other td-button--small",
            class: {"is-disabled": null === e.selectedItem},
            attrs: {href: "javascript:;"},
            on: {click: e.handleApplyProxy}
        }, [e._v("应用代理")])])])])
    }, o = [function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "td-table__header-wrapper"}, [i("table", {staticClass: "td-table__header"}, [i("colgroup", [i("col", {staticClass: "xly-setting__column-1"}), e._v(" "), i("col", {
            staticClass: "xly-setting__column-2",
            attrs: {width: "126"}
        }), e._v(" "), i("col", {
            staticClass: "xly-setting__column-3",
            attrs: {width: "116"}
        }), e._v(" "), i("col", {attrs: {width: "90"}})]), e._v(" "), i("thead", [i("tr", [i("th", [i("p", {staticClass: "td-table__text"}, [e._v("名称")])]), e._v(" "), i("th", [i("p", {staticClass: "td-table__text"}, [e._v("服务器")])]), e._v(" "), i("th", [i("p", {staticClass: "td-table__text"}, [e._v("端口")])]), e._v(" "), i("th", [i("p", {staticClass: "td-table__text"}, [e._v("类型")])])])])])])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("colgroup", [t("col", {staticClass: "xly-setting__column-1"}), this._v(" "), t("col", {
            staticClass: "xly-setting__column-2",
            attrs: {width: "126"}
        }), this._v(" "), t("col", {
            staticClass: "xly-setting__column-3",
            attrs: {width: "116"}
        }), this._v(" "), t("col", {attrs: {width: "90"}})])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-file-detail"}, [i("td-tabs", {
            staticClass: "xly-file-detail",
            attrs: {tabs: e.tabs, "active-key": e.activeKey},
            on: {
                "update:activeKey": function (t) {
                    e.activeKey = t
                }
            },
            scopedSlots: e._u([{
                key: "default", fn: function (t) {
                    var n = t.tab;
                    return [i(n.key, {
                        tag: "component",
                        attrs: {
                            curTaskId: e.curTaskId,
                            curUserId: e.curUserId,
                            curCategroyViewId: e.curCategoryid,
                            currentCategoryId: e.currentCategoryId,
                            activeKey: e.activeKey,
                            "checked-task-num": e.checkedTaskNum,
                            "complete-task-num": e.completeTaskNum
                        },
                        on: {tabChange: e.onTabChange}
                    })]
                }
            }, {
                key: "title", fn: function (t) {
                    var n = t.tab;
                    return i("div", {domProps: {textContent: e._s(n.title)}})
                }
            }])
        })], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {staticClass: "xly-down-header"}, [t("p", {staticClass: "xly-down-header__title"}, [this._v("\n    " + this._s(this.curTaskName) + "\n  ")])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-file-source",
            class: {"is-show": e.showMore}
        }, [i("ul", {staticClass: "xly-file-source__items"}, [e.isYunGetBackTask || "PHASE_TYPE_ERROR" !== e.saveStatus ? e.isYunGetBackTask || 1 !== e.panTaskType ? e.isYunGetBackTask || 2 !== e.panTaskType ? e.isYunGetBackTask || 3 !== e.panTaskType ? e.isYunGetBackTask || 4 !== e.panTaskType ? e.isYunGetBackTask || 5 !== e.panTaskType ? e._e() : i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("云盘位置")]), e._v(" "), i("p", {staticClass: "detail"}, [i("a", {
            staticClass: "address",
            attrs: {href: "javascript:;"},
            on: {click: e.onClickPath}
        }, [e._v(e._s(e.panTaskData.title))])]), e._v(" "), e.panFileId ? i("td-button", {
            attrs: {size: "small"},
            on: {click: e.consumePanTask}
        }, [e._v(e._s(e.isSupportPlay ? "极速云播" : "查看"))]) : e._e(), e._v(" "), i("a", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: 100 !== e.panTaskProgress,
                expression: "panTaskProgress !== 100"
            }], staticClass: "td-button td-button--secondary td-button--small", attrs: {href: "javascript:;"}
        }, [i("td-progress", {attrs: {value: e.panTaskProgress}}), e._v(" "), i("span", [e._v("保存中" + e._s(e.panTaskProgress) + "%")])], 1)], 1) : i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("云盘位置")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v("我的云盘")]), e._v(" "), i("p", {staticClass: "warn"}, [e._v("\n        空间不足\n        "), i("i", {
            staticClass: "xly-icon-refresh",
            attrs: {title: "刷新"},
            on: {click: e.refleshFreeSpace}
        })])]) : i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("云盘位置")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v("保存到云盘，可随时查看")]), e._v(" "), i("td-button", {
            attrs: {size: "small"},
            on: {click: e.clickSave}
        }, [e._v("立即保存")])], 1) : i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("云盘位置")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v("该资源无法保存到云盘")]), e._v(" "), i("td-button", {
            attrs: {
                size: "small",
                disabled: ""
            }
        }, [e._v("立即保存")])], 1) : i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("云盘位置")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v("登录领取云盘空间，可极速播放")]), e._v(" "), i("td-button", {
            attrs: {size: "small"},
            on: {click: e.showLoginWnd}
        }, [e._v("立即领取")])], 1) : i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("云盘位置")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v("添加到云盘失败")]), e._v(" "), i("td-button", {
            attrs: {
                size: "small",
                disabled: ""
            }
        }, [e._v("立即保存")])], 1), e._v(" "), i("li", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !e.isYunGetBackTask,
                expression: "!isYunGetBackTask"
            }], staticClass: "xly-file-source__item"
        }, [i("p", {staticClass: "title"}, [e._v("下载链接")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v(e._s(e.url || "暂无下载链接"))]), e._v(" "), "" !== e.url ? i("td-button", {
            attrs: {
                other: "",
                size: "small"
            }, on: {
                click: function (t) {
                    e.copyLink(e.url)
                }
            }
        }, [e._v("复制链接")]) : e._e()], 1), e._v(" "), i("li", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !e.isYunGetBackTask,
                expression: "!isYunGetBackTask"
            }], staticClass: "xly-file-source__item"
        }, [i("p", {staticClass: "title"}, [e._v("网址记录")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v(e._s(e.refUrl || "暂无网址记录"))]), e._v(" "), e.refUrl ? i("td-button", {
            attrs: {
                other: "",
                size: "small"
            }, on: {click: e.openUrl}
        }, [e._v("打开网址")]) : e._e()], 1), e._v(" "), i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("保存目录")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v(e._s(e.savePath))]), e._v(" "), i("td-button", {
            attrs: {
                other: "",
                size: "small"
            }, on: {click: e.openDir}
        }, [e._v("打开目录")])], 1), e._v(" "), i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("创建时间")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v(e._s(e.createTime))])]), e._v(" "), i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("下载历时")]), e._v(" "), i("p", {staticClass: "detail"}, [e._v(e._s(e.downloadTimeStr))])]), e._v(" "), i("li", {staticClass: "xly-file-source__item"}, [i("p", {staticClass: "title"}, [e._v("注释")]), e._v(" "), i("p", {staticClass: "detail"}, [i("td-input", {
            attrs: {
                maxlength: "450",
                placeholder: "未填写"
            }, on: {blur: e.setDescription}, model: {
                value: e.description, callback: function (t) {
                    e.description = t
                }, expression: "description"
            }
        })], 1)])]), e._v(" "), i("div", {staticClass: "xly-file-source__more"}, [i("i", {
            staticClass: "xly-icon-arrow-down",
            on: {click: e.handleShow}
        })])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return 0 !== e.movieConfig.yingyuan_dl_recommend && e.filterRecommendList && 0 !== e.filterRecommendList.length ? i("div", {staticClass: "xly-recommend"}, [i("div", {staticClass: "xly-recommend__title"}, [i("h3", [e._v("为你推荐")]), e._v(" "), 1 === e.movieConfig.yingyuan_dl_recommend ? i("a", {
            attrs: {href: "javascript:;"},
            on: {
                click: function (t) {
                    e.showHomePage("v_pc_xlx_ggong_dl_detail_vipsp")
                }
            }
        }, [e._v("查看更多>")]) : i("div", {
            staticClass: "xly-recommend__more",
            attrs: {outline: "0", tabindex: "0"},
            on: {blur: e.hideShowMore}
        }, [i("i", {
            staticClass: "xly-icon-more",
            on: {click: e.handleShowMore}
        }), e._v(" "), e.showMore ? i("div", {staticClass: "xly-more-drop"}, [i("ul", [i("li", {
            on: {
                click: function (t) {
                    e.showHomePage("v_pc_xlx_ggong_dl_detail_vipsp")
                }
            }
        }, [e._v("查看更多")]), e._v(" "), i("li", {on: {click: e.handleShowList}}, [e._v(e._s(e.showList ? "收起" : "展开"))])])]) : e._e()])]), e._v(" "), e.showList ? i("div", {staticClass: "xly-recommend__list"}, [i("ul", e._l(e.filterRecommendList, function (t, n) {
            return i("li", {
                key: t.xl_id || t.ctime, staticClass: "xly-recommend__item", on: {
                    click: function (i) {
                        e.openMoviePage(t.player_site, n)
                    }
                }
            }, [i("div", {staticClass: "xly-recommend__image"}, [i("img", {
                attrs: {
                    src: t.cover || t.hor_cover,
                    alt: t.title,
                    title: t.title
                }
            })]), e._v(" "), i("p", {staticClass: "xly-recommend__text"}, [e._v(e._s(t.work_name || ""))])])
        }))]) : e._e()]) : e._e()
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("td-list", {
            attrs: {
                list: e.loadedListWithKey,
                multiple: "",
                drop: "",
                sortable: e.sortable,
                sortByHandler: "",
                handleClassList: ["is-chosen", "is-active", "xly-side-operate", "xly-icon-type", "xly-file-error", "xly-file-size", "xly-file-percent", "xly-file-status", "xly-file-name"],
                "click-to-focus": e.sortable,
                "drag-selectable": "",
                "chosen-keys": e.selectedTaskIds,
                "load-more": e.loadMore,
                "scroll-speed": 6
            },
            on: {
                "update:chosenKeys": e.handleSelectChange,
                "update:list": e.handleListChange,
                "on-sorting": e.handleSorting,
                "on-sort-end": e.handleSortEnd
            },
            nativeOn: {
                scroll: function (t) {
                    return e.handleScroll(t)
                }
            },
            scopedSlots: e._u([{
                key: "default", fn: function (t) {
                    var n = t.item, o = t.index, a = t.chosen, r = t.active;
                    return [i(e.componentName, {
                        tag: "component",
                        attrs: {
                            filtering: !e.sortable,
                            enbaleVipPlugin: e.enbaleVipPlugin,
                            taskId: n.key,
                            itemType: e.itemType,
                            sharedKeyWords: e.sharedKeyWords,
                            pulseForRename: e.pulseForRename,
                            currentCategoryId: e.currentCategoryId,
                            currentCategoryViewId: e.currentCategoryViewId,
                            deleted: e.deleted[n.key],
                            opened: e.opened[n.key],
                            dataChecking: e.dataChecking[n.key],
                            chosen: a,
                            active: r,
                            index: o,
                            fileTransferTooltip: e.fileTransferTooltipVisible[n.key],
                            panTaskProgress: e.panTaskProgress,
                            panTaskType: e.panTaskType,
                            panTaskData: e.panTaskData,
                            showSideNetdisk: e.showSideNetdisk,
                            accelerationTimes: e.accelerationTimes,
                            isFirstShowScanCode: e.isFirstShowScanCode,
                            qrCodeConfig: e.qrCodeConfig,
                            "vip-info": e.vipInfo,
                            saveStatus: e.saveStatus
                        },
                        on: {
                            "update:deleted": function (t) {
                                e.$set(e.deleted, n.key, t)
                            },
                            "update:opened": function (t) {
                                e.$set(e.opened, n.key, t)
                            },
                            "update:dataChecking": function (t) {
                                e.$set(e.dataChecking, n.key, t)
                            },
                            "update:fileTransferTooltip": function (t) {
                                e.$set(e.fileTransferTooltipVisible, n.key, t)
                            },
                            "update:accelerationTimes": function (t) {
                                e.accelerationTimes = t
                            },
                            "update:isFirstShowScanCode": e.updateFirstShowScanCode,
                            dblclick: e.handleItemDbClick,
                            "active-change": function (t) {
                                return e.handleActiveChange(t, o)
                            },
                            "active-nearby": e.handleActiveNearby
                        },
                        nativeOn: {
                            contextmenu: function (t) {
                                return t.stopPropagation(), e.handleContextMenu(t)
                            }
                        }
                    })]
                }
            }])
        })
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement;
        return (this._self._c || e)("i", {class: this.classes, attrs: {title: this.text}})
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return e.useNative ? i("select", {
            ref: "selectNative",
            staticClass: "xly-select",
            on: {change: e.onSelect}
        }, e._l(e.filterOptions, function (t) {
            return i("option", {key: t, domProps: {value: t}}, [e._v(e._s(t))])
        })) : i("td-select", e._g(e._b({
            ref: "select",
            attrs: {value: e.value, options: e.filterOptions, position: e.position}
        }, "td-select", e.$attrs, !1), e.$listeners), [e._t("suffix", null, {slot: "suffix"}), e._v(" "), e._t("append", null, {slot: "append"})], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {class: e.item.outerClass}, [i("td-slider", {
            attrs: {
                value: e.sliderValue,
                marks: e.item.marks,
                scales: e.item.scales,
                disabled: e.disabled
            }, on: {input: e.handleSliderUpdate}
        }), e._v(" "), i("div", {staticClass: "xlx-dialog-setting__speed-input"}, [i("td-input", {
            ref: "input",
            staticClass: "xlx-setting__input-3",
            attrs: {value: e.value.value, disabled: e.disabled},
            on: {input: e.handleInput, blur: e.handleBlur}
        }), e._v(" "), i("popup", {
            ref: "tooltip",
            staticClass: "td-tooltip",
            attrs: {direction: "top", display: e.tooltipVisible, padding: 10},
            on: {
                "update:display": function (t) {
                    e.tooltipVisible = t
                }
            }
        }, [i("p", {staticClass: "td-tooltip__inner"}, [e._v(e._s(e.tooltip))])]), e._v(" "), i("span", {staticClass: "xlx-setting__text"}, [e._v("KB/s")])], 1)], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xlx-dialog-setting__speed-time"}, [i("ul", e._l(e.data, function (t) {
            return i("li", {
                key: t.label,
                staticClass: "xlx-dialog-setting__item"
            }, [i("span", {staticClass: "xlx-dialog-setting__text"}, [e._v(e._s(t.label))]), e._v(" "), e._l(t.options, function (t) {
                return i("div", {
                    key: t.index,
                    staticClass: "xlx-dialog-setting__option"
                }, [i("select-native", {
                    staticClass: "xlx-select-size-1",
                    attrs: {
                        value: e.value[t.index].value.toString(),
                        options: "hour" === t.type ? e.hours : e.minutes,
                        disabled: e.disabled,
                        useNative: !1
                    },
                    on: {
                        input: function (i) {
                            return e.handleInput(i, t.index)
                        }
                    }
                }), e._v(" "), i("span", {staticClass: "xlx-dialog-setting__text"}, [e._v(e._s("hour" === t.type ? "时" : "分"))])], 1)
            })], 2)
        }))])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {class: e.item.outerClass}, [i("ul", {class: e.item.ulClasses}, e._l(e.item.extEles, function (t, n) {
            return i("li", {key: n, class: e.item.classes}, [t ? i(t.type, {
                tag: "component",
                attrs: {
                    text: t.text,
                    item: t,
                    label: t && t.label,
                    classes: t.classes,
                    disabled: e.disabled,
                    name: t.name,
                    value: e.formData[t.name],
                    formData: e.formData
                },
                on: {input: e.handleInput}
            }) : e._e()], 1)
        })), e._v(" "), e.item.tip ? i("p", {class: e.item.tipClass}, [e._v(e._s(e.item.tip))]) : e._e()])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xlx-nav__item"}, [i("a", {
            staticClass: "xlx-nav-operate",
            class: {"is-disabled": e.disabled, "is-new": e.redDot},
            attrs: {href: "javascript:;", title: e.title},
            on: {click: e.handleClick, mouseenter: e.handleEnter}
        }, ["" === e.customClass ? i("img", {attrs: {src: e.imgSrc}}) : i("i", {class: e.customClass}), e._v(" "), e.newIcon ? i("i", {staticClass: "xlx-icon-new1"}) : e._e()]), e._v(" "), e.loading ? i("div", {
            staticClass: "connecting",
            on: {click: e.handleClick, mouseenter: e.handleEnter}
        }, [i("i", {staticClass: "xlx-icon-loading"})]) : e._e(), e._v(" "), e.tooltip ? i("div", {staticClass: "xlx-nav-tooltip"}, [i("div", {
            staticClass: "xlx-nav-tooltip__inner",
            on: {click: e.handleToolTipClick}
        }, [i("p", [e._v("\n        " + e._s(e.tooltipTitle) + "\n        "), i("br"), e._v(" "), i("span", [e._v(e._s(e.tooltipSubTitle))])])]), e._v(" "), i("a", {
            staticClass: "xlx-nav-tooltip__close",
            attrs: {href: "javascript:;"},
            on: {click: e.handleToolTipClose}
        }, [i("i", {staticClass: "td-icon-close"})])]) : e._e()])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xlx-nav__item"}, [i("a", {
            staticClass: "xlx-nav-operate",
            class: e.filterClass,
            attrs: {href: "javascript:;", title: e.handleTitle},
            on: {click: e.handleClick, mouseenter: e.handleEnter}
        }, ["" == e.vipIcon ? i("i", {class: e.id}) : i("img", {
            attrs: {src: e.vipIcon},
            on: {error: e.handleError}
        })])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            ref: "playerArea",
            staticClass: "xly-preview",
            attrs: {id: "xly-task-detail-preview"}
        }, [i("div", {
            directives: [{name: "show", rawName: "v-show", value: e.showPlay, expression: "showPlay"}],
            staticClass: "xly-preview__play",
            class: {"is-animation": e.isAnimation},
            on: {click: e.play}
        }, [i("i", {staticClass: "xly-icon-play-detail"}), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.showDownAndPlay,
                expression: "showDownAndPlay"
            }], staticStyle: {display: "flex"}
        }, [i("span", {staticClass: "text-1"}, [e._v("边")]), e._v(" "), i("span", {staticClass: "text-2"}, [e._v("下")]), e._v(" "), i("span", {staticClass: "text-3"}, [e._v("边")]), e._v(" "), i("span", {staticClass: "text-4"}, [e._v("播")])]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !e.showDownAndPlay,
                expression: "!showDownAndPlay"
            }], staticStyle: {display: "flex"}
        }, [i("span", {staticClass: "text-1"}, [e._v("立")]), e._v(" "), i("span", {staticClass: "text-2"}, [e._v("即")]), e._v(" "), i("span", {staticClass: "text-3"}, [e._v("播")]), e._v(" "), i("span", {staticClass: "text-4"}, [e._v("放")])])]), e._v(" "), 0 === e.downAndPlayGuide ? i("div", {staticClass: "xly-preview__text"}, [i("span", {staticClass: "xly-preview__img"}), e._v("\n    等不及了，现在开始播放吧\n    "), i("i", {
            staticClass: "td-icon-close",
            attrs: {title: "关闭"},
            on: {
                click: function (t) {
                    e.closeGuide(!0)
                }
            }
        })]) : e._e(), e._v(" "), e.showPlay ? e._e() : i("VideoState", {
            attrs: {
                isEmbed: !0,
                beginForceLoading: e.beginForceLoading
            }, on: {
                "video-state-change": function (t) {
                    e.checkUIChange()
                }
            }
        })], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-attribute"}, [i("div", {staticClass: "xly-attribute__chart"}, [e._m(0), e._v(" "), i("div", {staticClass: "xly-attribute__chart-text"}, [i("p", {staticClass: "title"}, [e._v("文件大小")]), e._v(" "), i("p", {staticClass: "number"}, [e._v(e._s(e.formatSize(e.fileSize)))])])]), e._v(" "), i("div", {staticClass: "xly-attribute__detail"}, [i("ul", [i("li", {staticClass: "xly-attribute__item"}, [i("span", {staticClass: "xly-attribute__tag xly-attribute__tag--natural"}), e._v(" "), i("span", {staticClass: "xly-attribute__text"}, [e._v("原始资源")]), e._v(" "), i("span", {staticClass: "xly-attribute__size"}, [e._v(e._s(e.originPercent) + "% "), i("i", {staticClass: "xly-line"}), e._v(" " + e._s(e.formatSize(e.originSize)))])]), e._v(" "), i("li", {staticClass: "xly-attribute__item"}, [i("span", {staticClass: "xly-attribute__tag xly-attribute__tag--mirror"}), e._v(" "), i("span", {staticClass: "xly-attribute__text"}, [e._v("镜像加速")]), e._v(" "), i("span", {staticClass: "xly-attribute__size"}, [e._v(e._s(e.p2sPercent) + "% "), i("i", {staticClass: "xly-line"}), e._v(" " + e._s(e.formatSize(e.p2sSize)))])]), e._v(" "), i("li", {staticClass: "xly-attribute__item"}, [i("span", {staticClass: "xly-attribute__tag xly-attribute__tag--p2p"}), e._v(" "), i("span", {staticClass: "xly-attribute__text"}, [e._v("P2P加速")]), e._v(" "), i("span", {staticClass: "xly-attribute__size"}, [e._v(e._s(e.p2pPercent) + "% "), i("i", {staticClass: "xly-line"}), e._v(" " + e._s(e.formatSize(e.p2pSize)))])]), e._v(" "), i("li", {staticClass: "xly-attribute__item"}, [i("span", {staticClass: "xly-attribute__tag xly-attribute__tag--vip"}), e._v(" "), i("span", {staticClass: "xly-attribute__text"}, [e._v("会员加速")]), e._v(" "), i("span", {staticClass: "xly-attribute__size"}, [e._v(e._s(e.offlinePercent) + "% "), i("i", {staticClass: "xly-line"}), e._v(" " + e._s(e.formatSize(e.offlineSize)))])])])])])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {
            staticClass: "xly-attribute-pei",
            staticStyle: {
                "-webkit-tap-highlight-color": "transparent",
                "user-select": "none",
                background: "transparent"
            },
            attrs: {id: "chart", _echarts_instance_: "ec_1591328778127"}
        }, [t("div", {
            staticStyle: {
                position: "relative",
                overflow: "hidden",
                width: "200px",
                height: "200px",
                padding: "0px",
                margin: "0px",
                "border-width": "0px"
            }
        }, [t("canvas", {
            staticStyle: {
                position: "absolute",
                left: "0px",
                top: "0px",
                width: "200px",
                height: "200px",
                "user-select": "none",
                "-webkit-tap-highlight-color": "rgba(0, 0, 0, 0)",
                padding: "0px",
                margin: "0px",
                "border-width": "0px"
            }, attrs: {width: "200", height: "200", "data-zr-dom-id": "zr_0"}
        })])])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-file-list", class: {"is-single": e.isSingle}}, [i("td-table", {
            ref: "table",
            attrs: {
                columns: e.columns,
                data: e.tree,
                "default-checked-keys": e.defaultCheckedKeys,
                "disabled-keys": e.disabledKeys,
                height: 260,
                checkable: "",
                "tree-enabled": "",
                "footer-enabled": "",
                "all-selected-disabled": e.isAllSelectedAndFinished
            },
            on: {
                "checked-change": e.onCheckedChange, checkAll: function (e) {
                }
            },
            scopedSlots: e._u([{
                key: "icon", fn: function (t) {
                    var n = t.prop, o = t.value, a = t.row;
                    return [i("i", {
                        staticClass: "xly-icon-type is-small",
                        class: e.rowIcon(a, n, o),
                        on: {
                            click: function (t) {
                                e.onClickName(a)
                            }
                        }
                    })]
                }
            }, {
                key: "default", fn: function (t) {
                    var n = t.prop, o = t.value, a = t.row;
                    return ["name" === n ? [i("span", {
                        class: a.data.classType + (e.isUnread(a) && !a.data.errMessage ? "is-unread" : ""),
                        attrs: {title: a.name},
                        on: {
                            click: function (t) {
                                t.stopPropagation(), e.onClickName(a, o)
                            }
                        }
                    }, [e._v(e._s(a.name))])] : "fileSize" === n ? [e._v("\n        " + e._s(e.formatSize(a.data.fileSize)))] : "progress" === n ? [a.data.errMessage ? [i("span", {staticClass: "xly-file-list__status is-error"}, [e._v("\n            失败\n            "), i("td-tooltip", {
                        attrs: {
                            content: a.data.errMessage,
                            trigger: "hover"
                        }
                    }, [i("i", {staticClass: "xly-icon-note"})])], 1)] : a.data.isDelete ? [i("span", {staticClass: "xly-file-list__status"}, [e._v("已删除")])] : "branch" === a.type ? [e.haveSelectItem(a) ? [1 === e.getProgress(a) && a.data.isAllDownloadItemFinished ? [i("span", {staticClass: "xly-file-list__status"}, [e._v("完成")]), e._v(" "), i("span", {
                        directives: [{
                            name: "show",
                            rawName: "v-show",
                            value: "Recycle" !== e.curCategroyViewID,
                            expression: "curCategroyViewID !== 'Recycle'"
                        }], staticClass: "xly-file-list__operate"
                    }, [e.isSupportPlay(a) ? i("i", {
                        staticClass: "xly-icon-play-small",
                        attrs: {title: "播放"},
                        on: {
                            click: function (t) {
                                e.playFile(a, "open")
                            }
                        }
                    }) : i("i", {
                        staticClass: "xly-icon-open-small", attrs: {title: "打开文件夹"}, on: {
                            click: function (t) {
                                e.openDir(a)
                            }
                        }
                    })])] : [i("span", {staticClass: "xly-file-list__status"}, [e._v(e._s((100 * a.data.progress || 0).toFixed(2)) + "%")]), e._v(" "), i("span", {
                        directives: [{
                            name: "show",
                            rawName: "v-show",
                            value: "Recycle" !== e.curCategroyViewID,
                            expression: "curCategroyViewID !== 'Recycle'"
                        }], staticClass: "xly-file-list__operate"
                    }, [e.isSupportPlay(a) ? i("i", {
                        staticClass: "xly-icon-play-small",
                        attrs: {title: "播放"},
                        on: {
                            click: function (t) {
                                e.playFile(a, "open")
                            }
                        }
                    }) : e._e()])]] : [i("span", {staticClass: "xly-file-list__status is-disabled"}, [e._v("不下载")])]] : e.isComplete(a) ? [i("span", {staticClass: "xly-file-list__status"}, [e._v("完成")]), e._v(" "), i("span", {
                        directives: [{
                            name: "show",
                            rawName: "v-show",
                            value: "Recycle" !== e.curCategroyViewID,
                            expression: "curCategroyViewID !== 'Recycle'"
                        }], staticClass: "xly-file-list__operate"
                    }, [e.playingCurTask && a.data.index === e.playingMediaIndex && e.playstate > 1 && e.playstate < 6 ? i("i", {staticClass: "xly-gif-playing"}) : e.isSupportPlay(a) ? i("i", {
                        staticClass: "xly-icon-play-small",
                        attrs: {title: "播放"},
                        on: {
                            click: function (t) {
                                e.playFile(a, "open")
                            }
                        }
                    }) : i("i", {
                        staticClass: "xly-icon-file-small", attrs: {title: "打开文件"}, on: {
                            click: function (t) {
                                e.openFile(a, "open")
                            }
                        }
                    })])] : e.checkedKeys.includes(a.key) ? [i("span", {staticClass: "xly-file-list__status"}, [e._v(e._s((100 * e.getProgress(a)).toFixed(2)) + "%")]), e._v(" "), i("span", {
                        directives: [{
                            name: "show",
                            rawName: "v-show",
                            value: "Recycle" !== e.curCategroyViewID,
                            expression: "curCategroyViewID !== 'Recycle'"
                        }], staticClass: "xly-file-list__operate"
                    }, [e.isSupportPlay(a) && e.playingCurTask && a.data.index === e.playingMediaIndex && e.playstate > 1 && e.playstate < 6 ? i("i", {staticClass: "xly-gif-playing"}) : e.isSupportPlay(a) ? i("i", {
                        staticClass: "xly-icon-play-small",
                        attrs: {title: "播放"},
                        on: {
                            click: function (t) {
                                e.playFile(a, "open")
                            }
                        }
                    }) : e._e()])] : [i("span", {staticClass: "xly-file-list__status is-disabled"}, [e._v("不下载")])]] : e._e()]
                }
            }])
        }, [i("td-button", {
            attrs: {
                slot: "footer",
                other: "",
                size: "small",
                disabled: !(e.selectedFailedSubFileRetryDownload || e.checkedKeys.length && e.editingSelected)
            }, on: {click: e.downloadSelected}, slot: "footer"
        }, [e._v("下载选中文件")])], 1)], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-down-detail"}, [e.taskIds.length > 1 ? i("div", {staticClass: "xly-download-file is-more"}, [e.taskIds.length > 2 ? i("multi-chosen-item", {
            staticClass: "is-secondary",
            attrs: {taskId: e.taskIds[e.taskIds.length - 3]}
        }) : e._e(), e._v(" "), i("multi-chosen-item", {
            staticClass: "is-first",
            attrs: {taskId: e.taskIds[e.taskIds.length - 2]}
        }), e._v(" "), i("multi-chosen-item", {
            staticClass: "is-show",
            attrs: {taskId: e.taskIds[e.taskIds.length - 1]}
        })], 1) : e._e(), e._v(" "), i("div", {staticClass: "xly-down-detail__text"}, [i("p", [e._v("已选择" + e._s(e.taskIds.length) + "个项目")])]), e._v(" "), "Downloading" === e.curCategoryViewId ? i("div", {staticClass: "xly-down-detail__button"}, [e.hasStartedTask ? e._e() : i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.start}
        }, [i("i", {staticClass: "xly-icon-download"}), e._v(" 全部开始")]), e._v(" "), e.hasStartedTask ? i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.stop}
        }, [i("i", {staticClass: "xly-icon-pause"}), e._v(" 全部暂停")]) : e._e(), e._v(" "), i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.remove}
        }, [i("i", {staticClass: "xly-icon-delete"}), e._v(" " + e._s(this.removeText))]), e._v(" "), i("button", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.showAdd2Cloud,
                expression: "showAdd2Cloud"
            }], staticClass: "td-button td-button--other td-button--small", on: {click: e.add2Cloud}
        }, [i("i", {staticClass: "xly-icon-add-netdisk"}), e._v(" 添加到云盘")]), e._v(" "), i("div", {
            staticClass: "xly-down-detail__more",
            on: {
                mouseenter: function (t) {
                    e.isDropdownShow = !0
                }
            }
        }, [e._m(0), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isDropdownShow,
                expression: "isDropdownShow"
            }], staticClass: "xly-more-drop"
        }, [i("ul", [e.showCopy ? i("li", {on: {click: e.copyLinks}}, [e._v("复制链接")]) : e._e(), e._v(" "), -1 === e.currentCategoryId ? i("li", {on: {click: e.move2Dir}}, [e._v("移动文件到")]) : e._e(), e._v(" "), i("li", {on: {click: e.copy2Dir}}, [e._v("复制文件到")])])])])]) : "Completed" === e.curCategoryViewId ? i("div", {staticClass: "xly-down-detail__button"}, [i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.remove}
        }, [i("i", {staticClass: "xly-icon-delete"}), e._v(" 删除")]), e._v(" "), i("button", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.hasLogicTasks,
                expression: "hasLogicTasks"
            }], staticClass: "td-button td-button--other td-button--small", on: {click: e.redownloadTask}
        }, [i("i", {staticClass: "xly-icon-download"}), e._v(" 重新下载")]), e._v(" "), i("button", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.showAdd2Cloud,
                expression: "showAdd2Cloud"
            }], staticClass: "td-button td-button--other td-button--small", on: {click: e.add2Cloud}
        }, [e._v(" 添加到云盘")]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.hasUnRemoveTask,
                expression: "hasUnRemoveTask"
            }], staticClass: "xly-down-detail__more", on: {
                mouseenter: function (t) {
                    e.isDropdownShow = !0
                }
            }
        }, [e._m(1), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isDropdownShow,
                expression: "isDropdownShow"
            }], staticClass: "xly-more-drop"
        }, [i("ul", [e.showCopy ? i("li", {on: {click: e.copyLinks}}, [e._v("复制链接")]) : e._e(), e._v(" "), -1 === e.currentCategoryId ? i("li", {on: {click: e.move2Dir}}, [e._v("移动文件到")]) : e._e(), e._v(" "), i("li", {on: {click: e.copy2Dir}}, [e._v("复制文件到")])])])])]) : "Recycle" === e.curCategoryViewId ? i("div", {staticClass: "xly-down-detail__button"}, [i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.restore}
        }, [i("i", {staticClass: "xly-icon-restore"}), e._v(" 还原")]), e._v(" "), i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.destroy}
        }, [i("i", {staticClass: "xly-icon-delete"}), e._v(" 彻底删除")]), e._v(" "), i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.redownloadTask}
        }, [i("i", {staticClass: "xly-icon-download"}), e._v(" 重新下载")]), e._v(" "), e.showCopy ? i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.copyLinks}
        }, [i("i", {staticClass: "xly-icon-link-bold"}), e._v(" 复制链接")]) : e._e()]) : e._e()])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("button", {staticClass: "td-button td-button--other td-button--small"}, [t("i", {staticClass: "xly-icon-more"}), this._v(" 更多")])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("button", {staticClass: "td-button td-button--other td-button--small"}, [t("i", {staticClass: "xly-icon-more"}), this._v(" 更多")])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            directives: [{name: "show", rawName: "v-show", value: !e.isYunTask, expression: "!isYunTask"}],
            staticClass: "xly-comment"
        }, [i("div", {staticClass: "xly-comment-main"}, [i("Avatar", {attrs: {curUserId: e.curUserId}}), e._v(" "), i("CommentInput", {
            attrs: {
                curUserId: e.curUserId,
                curTask: e.curTask,
                curTaskId: e.curTaskId,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId,
                tid: e.gcid,
                curUserNick: e.curUserNick,
                deviceId: e.deviceId,
                focus: e.isInputFocused
            }, on: {
                "update:focus": function (t) {
                    e.isInputFocused = t
                }, getSingleComment: e.getSingleComment
            }
        })], 1), e._v(" "), "" === e.gcid ? i("div", {staticClass: "xly-comment-blank"}, [i("span", {staticClass: "xly-img-comment"}), e._v(" "), i("p", [e._v("资源暂时无法评论")])]) : 0 !== e.comments.length ? i("div", [i("div", {staticClass: "xly-comment-list"}, [i("ul", [e._l(e.filteredHotComments, function (t) {
            return i("comment-item", {
                key: "hot" + t.comment_info.cid,
                attrs: {
                    "is-hot": "true",
                    curTaskId: e.curTaskId,
                    "user-info": t.user_info,
                    "comment-info": t.comment_info,
                    tid: e.gcid,
                    curUserId: e.curUserId,
                    curUser: e.userInfo,
                    currentCategoryId: e.currentCategoryId,
                    currentCategoryViewId: e.currentCategoryViewId,
                    deviceId: e.deviceId,
                    vipInfo: e.vipInfo,
                    showReply: e.showReply
                },
                on: {
                    "update:showReply": function (t) {
                        e.showReply = t
                    },
                    getSingleComment: e.getSingleComment,
                    praiseComment: e.praiseComment,
                    deleteComment: e.deleteComment
                }
            })
        }), e._v(" "), e._l(e.filteredComments, function (t) {
            return i("comment-item", {
                key: t.comment_info.cid,
                attrs: {
                    curTaskId: e.curTaskId,
                    "user-info": t.user_info,
                    "comment-info": t.comment_info,
                    tid: e.gcid,
                    curUserId: e.curUserId,
                    curUser: e.userInfo,
                    currentCategoryId: e.currentCategoryId,
                    currentCategoryViewId: e.currentCategoryViewId,
                    deviceId: e.deviceId,
                    vipInfo: e.vipInfo,
                    showReply: e.showReply
                },
                on: {
                    "update:showReply": function (t) {
                        e.showReply = t
                    },
                    getSingleComment: e.getSingleComment,
                    praiseComment: e.praiseComment,
                    deleteComment: e.deleteComment
                }
            })
        })], 2)]), e._v(" "), i("td-pagination", {
            attrs: {total: e.totalPage, "before-change": e.fetchCommentsByPage},
            on: {
                "prev-click": function (t) {
                    e.switchPage("last")
                }, "next-click": function (t) {
                    e.switchPage("next")
                }
            },
            model: {
                value: e.page, callback: function (t) {
                    e.page = t
                }, expression: "page"
            }
        })], 1) : i("div", [i("CommentInput", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !1,
                expression: "false"
            }],
            ref: "quickReviewInput",
            attrs: {
                curUserId: e.curUserId,
                curTask: e.curTask,
                curTaskId: e.curTaskId,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId,
                tid: e.gcid,
                curUserNick: e.curUserNick,
                deviceId: e.deviceId,
                focus: !0
            },
            on: {getSingleComment: e.getSingleComment}
        }), e._v(" "), i("quick-review", {
            attrs: {
                tid: e.gcid,
                curUserId: e.curUserId,
                quickReviewConfigs: e.quickReviews
            }, on: {sendQuickReview: e.sendCommentRequest}
        })], 1)])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {class: {"xmpc-player": e.isEmbed}}, [e.isCanShowPage("codec") ? i("div", {staticClass: "xmpc-loading"}, [i("div", {staticClass: "xmpc-loading-down"}, [i("p", [e._v("\n        正在下载解码器\n        "), i("span", [e._v(e._s(e.fileName))])]), e._v(" "), i("div", {staticClass: "xmpc-loading-progress"}, [i("div", {staticClass: "xmpc-loading-progress__outer"}, [i("div", {
            staticClass: "xmpc-loading-progress__inner",
            style: e.progressStye
        })]), e._v(" "), i("p", {staticClass: "xmpc-loading-progress__text"}, [e._v(e._s(e.downloadProgress))])]), e._v(" "), i("button", {
            staticClass: "xmpc-button xmpc-button--fail",
            on: {click: e.cancelDownload}
        }, [e._v("取消")])])]) : e.isCanShowPage("error") ? i("div", {staticClass: "xmpc-loading__fail"}, [i("p", {staticClass: "xmpc-loading__fail-title"}, [i("i", {staticClass: "xmpc-icon-note-bold"}), e._v("\n      " + e._s(e.errorText) + "\n    ")]), e._v(" "), i("p", {staticClass: "xmpc-loading__fail-detail"}, [e._v("\n      错误码：\n      "), i("span", [e._v(e._s(e.errCode))])]), e._v(" "), i("button", {
            staticClass: "xmpc-button xmpc-button--fail",
            on: {click: e.onHangleRetry}
        }, [e._v("重试")])]) : e.isCanShowPage("yunbo_vip") ? i("div", {staticClass: "xmpc-loading is-super"}, [i("div", {staticClass: "xmpc-loading__icon"}), e._v(" "), i("p", {staticClass: "xmpc-loading__text"}, [e._v("\n      正在尊享会员视频高速加载\n      "), i("span", [e._v("（" + e._s(e.speedText) + "/s ）")])]), e._v(" "), i("div", {staticClass: "xmpc-loading__progress"})]) : e.isCanShowPage("yobon_novip") ? i("div", {staticClass: "xmpc-loading"}, [i("div", {staticClass: "xmpc-loading__icon"}), e._v(" "), i("p", {staticClass: "xmpc-loading__text"}, [e._v("\n      正在努力加载视频\n      "), i("span", [e._v("（" + e._s(e.speedText) + "/s ）")])]), e._v(" "), i("div", {staticClass: "xmpc-loading__vip"}, [e._v("\n      会员尊享视频高速加载特权\n      "), i("button", {
            staticClass: "xmpc-button xmpc-button--small",
            on: {
                click: function (t) {
                    e.openPayVip(!0)
                }
            }
        }, [e._v("立即开通")])])]) : e.isCanShowPage("play_and_download_vip") ? i("div", {staticClass: "xmpc-loading"}) : e.isCanShowPage("play_and_download_novip") ? i("div", {staticClass: "xmpc-loading"}) : e.isCanShowPage("local_play") ? i("div", {staticClass: "xmpc-loading"}, [i("div", {staticClass: "xmpc-loading__icon"}), e._v(" "), i("p", {staticClass: "xmpc-loading__text"}, [e._v("播放启动中...")])]) : e.isCanShowPage("back_to_embed") ? i("div", {staticClass: "xmpc-loading"}, [i("div", {staticClass: "xmpc-loading__back"}, [i("p", [e._v("当前视频独立窗口播放中")]), e._v(" "), i("button", {
            staticClass: "xmpc-button",
            on: {click: e.backToEmbed}
        }, [i("i", {staticClass: "xmpc-icon-arrow"}), e._v(" 切回此处播放\n      ")])])]) : e.isCanShowPage("nothing") ? i("div") : e._e(), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isCanShowPageEx("play_and_download_vip"),
                expression: "isCanShowPageEx('play_and_download_vip')"
            }], staticClass: "xmpc-loading"
        }, [i("div", {staticClass: "xmpc-loading__icon"}), e._v(" "), i("p", {staticClass: "xmpc-loading__text"}, [e._v("\n      边下边播加载中\n      "), i("span", [e._v("（" + e._s(e.speedText) + "/s ）")])])]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isCanShowPageEx("play_and_download_novip"),
                expression: "isCanShowPageEx('play_and_download_novip')"
            }], staticClass: "xmpc-loading"
        }, [i("div", {staticClass: "xmpc-loading__icon"}), e._v(" "), i("p", {staticClass: "xmpc-loading__text"}, [e._v("\n      正在努力加载视频\n      "), i("span", [e._v("（" + e._s(e.speedText) + "/s ）")])]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !e.isTryRuning,
                expression: "!isTryRuning"
            }], staticClass: "xmpc-loading__vip"
        }, [e._v("\n      " + e._s(e.vipTipText) + "\n      "), i("button", {
            staticClass: "xmpc-button xmpc-button--small",
            on: {
                click: function (t) {
                    e.openPayVip(!1)
                }
            }
        }, [e._v(e._s(e.openVipText))])])])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", [e.taskFileExist ? e.zipFileError ? i("div", {staticClass: "xly-file-list__note"}, [i("i", {staticClass: "xly-icon-note"}), e._v("当前压缩包无法显示预览")]) : i("div", {
            staticClass: "xly-file-list is-compression",
            class: {"is-single": e.isSingle}
        }, ["zipFile" === e.currentGuide ? i("div", {staticClass: "xly-file-tooltip"}, [i("p", [e._v("压缩包的视频，无需解压，直接播放")]), e._v(" "), i("i", {
            staticClass: "td-icon-close",
            attrs: {title: "关闭"},
            on: {click: e.closeTips}
        })]) : e._e(), e._v(" "), i("i", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isLoadingList,
                expression: "isLoadingList"
            }], staticClass: "img-icon-loading"
        }), e._v(" "), i("td-table", {
            ref: "table",
            attrs: {
                columns: e.columns,
                data: e.tree,
                height: e.tabHeight,
                "row-height": 36,
                expand: !0,
                "default-expanded-keys": e.defaultExpandedKeys,
                checkable: "",
                "tree-enabled": "",
                "all-selected-disabled": e.isAllSelectedAndFinished
            },
            scopedSlots: e._u([{
                key: "icon", fn: function (t) {
                    var n = t.prop, o = t.value, a = t.row;
                    return [i("i", {
                        staticClass: "xly-icon-type is-small",
                        class: e.rowIcon(a, o, n),
                        on: {
                            click: function (t) {
                                e.onClickName(a)
                            }
                        }
                    })]
                }
            }, {
                key: "default", fn: function (t) {
                    var n = t.prop, o = t.value, a = t.row;
                    return ["name" === n ? [i("span", {
                        class: {"is-unread": e.isUnread(a), "is-active": !0},
                        attrs: {title: a.name},
                        on: {
                            click: function (t) {
                                e.onClickName(a, o)
                            }
                        }
                    }, [e._v(e._s(a.name))])] : "fileSize" === n ? [e._v(e._s(e.formatSize(a.data.fileSize)))] : e._e()]
                }
            }])
        })], 1) : i("div", {staticClass: "xly-chart-curve__tips"}, [i("i", {staticClass: "xly-icon-note"}), e._v(" 文件已删除\n  ")]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isMoreFile,
                expression: "isMoreFile"
            }], staticClass: "xly-file-list__tips"
        }, [i("p", [e._v("提示：压缩包文件数量过多，仅展示部分文件，建议解压后查看")])])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            ref: "canvasBox",
            staticClass: "xly-chart-curve",
            attrs: {id: "xly-chart-curve"},
            on: {
                mouseover: function (t) {
                    e.$emit("setShowHoverLabel", !0), e.showCurveCutLine = !0
                }, mouseleave: function (t) {
                    e.$emit("setShowHoverLabel", !1), e.showCurveCutLine = !1
                }
            }
        }, [i("div", {staticClass: "xly-chart-curve__canvas"}, [i("canvas", {
            ref: "dataChart",
            staticClass: "canvas-data",
            style: "transform: scale(" + 1 / e.scale + "); top: " + e.topMargin + "px",
            attrs: {id: "dataChart"}
        }), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: 5 === e.curTaskStatus,
                expression: "curTaskStatus === 5"
            }],
            staticClass: "xly-chart-curve__line",
            class: e.vipType,
            style: "left: " + e.curveLeft + "px; top: " + e.curveTop + "px"
        }), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: 5 === e.curTaskStatus,
                expression: "curTaskStatus === 5"
            }],
            staticClass: "xly-chart-curve__point",
            class: e.vipType,
            style: "left: " + e.curveLeft + "px; top: " + e.curveTop + "px"
        }), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: 5 === e.curTaskStatus,
                expression: "curTaskStatus === 5"
            }], staticClass: "xly-chart-curve__number", style: "top: " + e.curveTop + "px"
        }, [e._v("速度：" + e._s(e.formatSize(e.downloadSpeed)) + "/s")])]), e._v(" "), [7, 9].includes(e.curTaskStatus) && e.curTaskErrorType ? i("div", {staticClass: "xly-chart-curve__tips"}, [i("i", {staticClass: "xly-icon-note"}), e._v(" " + e._s(e.curTaskErrorType) + "\n  ")]) : "Completed" !== e.currentCategoryViewId || e.taskFileExist ? i("div", {staticClass: "xly-chart-curve__operate"}, [i("div", {class: {"xly-chart-curve__button": "a" === e.shareShowType && e.sharelink}}, ["Recycle" === e.currentCategoryViewId ? i("button", {
            staticClass: "td-button",
            on: {
                click: function (t) {
                    e.operate("restore")
                }
            }
        }, [i("i", {staticClass: "xly-icon-restore"}), e._v(" 还原\n      ")]) : "Downloading" === e.currentCategoryViewId && 7 === e.curTaskStatus ? i("button", {
            staticClass: "td-button",
            on: {
                click: function (t) {
                    e.operate("continue")
                }
            }
        }, [i("i", {staticClass: "xly-icon-download"}), e._v(" 继续下载\n      ")]) : "Completed" === e.currentCategoryViewId && e.isSupportPlay ? i("button", {
            staticClass: "td-button",
            on: {
                click: function (t) {
                    e.operate("play")
                }
            }
        }, [i("i", {staticClass: "xly-icon-play"}), e._v(" 播放\n      ")]) : "Completed" !== e.currentCategoryViewId || e.isBtOrGroup ? "Completed" === e.currentCategoryViewId && e.isBtOrGroup ? i("button", {
            staticClass: "td-button",
            on: {
                click: function (t) {
                    e.operate("openFolder")
                }
            }
        }, [i("i", {staticClass: "xly-icon-open"}), e._v(" 打开文件夹\n      ")]) : e._e() : i("button", {
            staticClass: "td-button",
            on: {
                click: function (t) {
                    e.operate("open")
                }
            }
        }, [i("i", {staticClass: "xly-icon-open"}), e._v(" 打开文件\n      ")]), e._v(" "), "a" === e.shareShowType && e.sharelink ? i("i", {staticClass: "xly-line"}) : e._e(), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: "a" === e.shareShowType && e.sharelink,
                expression: "shareShowType === 'a' && sharelink"
            }], staticClass: "xly-chart-curve__icon", on: {mouseenter: e.onMouseHoverShowCode}
        }, [i("i", {staticClass: "xly-icon-mobile-bold"}), e._v(" "), i("div", {staticClass: "xly-chart-curve__code"}, [i("canvas", {attrs: {id: "easyShareA"}}), e._v(" "), i("p", [e._v("手机扫码" + e._s(e.scanButtonText))])])])]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: "b" === e.shareShowType && e.sharelink,
                expression: "shareShowType === 'b' && sharelink"
            }], staticClass: "xly-chart-curve__wrapper", on: {mouseenter: e.onMouseHoverShowCode}
        }, [i("td-button", {attrs: {other: ""}}, [i("i", {class: e.scanIconClass}), e._v("手机" + e._s(e.scanButtonText))]), e._v(" "), i("div", {staticClass: "xly-chart-curve__code"}, [i("canvas", {attrs: {id: "easyShareB"}}), e._v(" "), i("p", [e._v("手机扫码" + e._s(e.scanButtonText))])])], 1)]) : i("div", {staticClass: "xly-chart-curve__tips"}, [i("i", {staticClass: "xly-icon-note"}), e._v(" 文件已删除\n  ")]), e._v(" "), i("div", {staticClass: "xly-chart-curve__info"}, [i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !(e.isFast || e.showCurveCutLine && e.curTaskIsTryTask),
                expression: "!isFast && (!showCurveCutLine || !curTaskIsTryTask)"
            }], staticClass: "xly-chart-curve__data"
        }, [i("p", [e._v("下载进度"), i("span", [e._v(e._s(e.progress) + "%")])]), e._v(" "), i("i", {staticClass: "xly-line"}), e._v(" "), e.isBtOrGroup ? i("p", [e._v("完成文件"), i("span", [e._v(e._s(e.completeTaskNum) + "/" + e._s(e.checkedTaskNum))])]) : e._e(), e._v(" "), e.isBtOrGroup ? i("i", {staticClass: "xly-line"}) : e._e(), e._v(" "), [8, 10].includes(e.curTaskStatus) ? i("p", [e._v("平均速度"), i("span", [e._v(" " + e._s(e.formatSize(e.avgSpeed)) + "/s ")])]) : i("p", {staticClass: "data-time"}, [e._v(e._s(e.remain))]), e._v(" "), i("i", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: [8, 10].includes(e.curTaskStatus) || !e.isYunGetBackTask,
                expression: "([8,10].includes(curTaskStatus) || !isYunGetBackTask)"
            }], staticClass: "xly-line"
        }), e._v(" "), [8, 10].includes(e.curTaskStatus) ? i("p", [e._v("峰值速度"), i("span", [e._v(" " + e._s(e.formatSize(e.maxSpeed)) + "/s ")])]) : e.isYunGetBackTask ? e._e() : i("p", [e._v("资源数"), i("span", [e._v(e._s(e.srcUsing) + "/" + e._s(e.srcTotal))])])]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isFast && (!e.showCurveCutLine || !e.curTaskIsTryTask),
                expression: "isFast && (!showCurveCutLine || !curTaskIsTryTask)"
            }], staticClass: "xly-chart-curve__fast"
        }, [i("p", [e._v("恭喜你，解锁【秒下】成就")])]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.curTaskIsTryTask && e.showCurveCutLine,
                expression: "curTaskIsTryTask && showCurveCutLine"
            }], staticClass: "xly-chart-curve__detail"
        }, [e._m(0), e._v(" "), i("i", {staticClass: "xly-line"}), e._v(" "), e._m(1), e._v(" "), i("i", {staticClass: "xly-line"}), e._v(" "), e._m(2)])])])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("p", [t("i", {staticClass: "tag-speed tag-speed--all"}), this._v("全部速度")])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("p", [t("i", {staticClass: "tag-speed tag-speed--vip"}), this._v("白金会员")])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("p", [t("i", {staticClass: "tag-speed tag-speed--super"}), this._v("超级会员")])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "td-media"}, [i("div", {staticClass: "td-media__object"}, [i("i", {
            staticClass: "xly-icon-type",
            class: e.iconType
        })]), e._v(" "), i("div", {staticClass: "td-media__content"}, [i("p", {staticClass: "xly-file-name"}, [e._v(e._s(e.taskName))]), e._v(" "), i("div", {staticClass: "xly-file-info"}, [i("p", {staticClass: "xly-file-size"}, [e._v(e._s(e.fileSize))]), e._v(" "), i("p", {staticClass: "xly-file-time"}, [e._v(e._s(e.displayTime))])])])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("li", {
            staticClass: "xly-comment-list__item",
            class: {"is-hot": e.isHot}
        }, [i("user-head-card", {
            attrs: {
                curUserId: e.curUserId,
                comment: e.commentInfo,
                userInfo: e.userInfo,
                curUser: e.curUser
            }, on: {"click-avatar": e.handleAvatarClick}
        }), e._v(" "), i("div", {staticClass: "xly-comment-list__content"}, [i("div", {staticClass: "xly-comment-list__header"}, [i("a", {
            staticClass: "xly-comment-list__user-name",
            class: {"is-vip": e.isVip},
            attrs: {href: "javascript:;"},
            on: {click: e.handleAvatarClick}
        }, [e._v(e._s(e.userName))]), e._v(" "), e.isVip ? i("i", {class: e.vipIcon}) : e._e(), e._v(" "), i("span", {
            staticClass: "xly-comment-list__speed",
            class: {"is-fast": e.isFast}
        }, [e._v(e._s(e.showSpeed))]), e._v(" "), e.isHot ? i("div", {staticClass: "xly-comment-list__hot"}, [i("i", {staticClass: "xly-icon-hot"}), e._v("热评\n      ")]) : e._e()]), e._v(" "), i("div", {staticClass: "xly-comment-list__body"}, [i("p", {
            staticClass: "xly-comment-list__text",
            domProps: {innerHTML: e._s(e.handleBirdPw(e.replaceEmoji(e.commentInfo.comment)))},
            on: {click: e.triggerReply}
        }), e._v(" "), e.commentInfo.images ? i("comment-img", {
            attrs: {
                "img-url": e.commentInfo.images[0].url,
                isSelfComment: e.isSelfComment
            }, on: {
                report: e.openReportPanel, openrawimage: function (t) {
                    e.openrawimage("comment")
                }
            }
        }) : e._e(), e._v(" "), e.reply ? i("div", {staticClass: "xly-comment-list__quote"}, [i("i", {staticClass: "xly-icon-quote"}), e._v(" "), i("span", {staticClass: "xly-comment-list__quote-name"}, [e._v(e._s(e.reply.user || ""))]), e._v(" "), i("span", [e._v("：")]), e._v(" "), i("span", {staticClass: "xly-comment-list__quote-text"}, [e._v(e._s(e.reply.content))]), e._v(" "), e.reply.images ? i("comment-img", {
            attrs: {
                "img-url": e.reply.images[0].url,
                isSelfComment: "true"
            }, on: {
                openrawimage: function (t) {
                    e.openrawimage("reply")
                }
            }
        }) : e._e()], 1) : e._e()], 1), e._v(" "), i("div", {staticClass: "xly-comment-list__footer"}, [i("div", {staticClass: "xly-comment-list__wrapper"}, [i("div", {staticClass: "xly-comment-list__information"}, [i("span", {staticClass: "xly-comment-list__time"}, [e._v(e._s(e.formatTime))])]), e._v(" "), i("div", {staticClass: "xly-comment-list__operate"}, [e.isSelfComment ? i("a", {
            staticClass: "xly-comment-list__delete",
            attrs: {href: "javascript:;", title: "删除"},
            on: {click: e.deleteComment}
        }, [i("i", {staticClass: "xly-icon-delete-comment"})]) : i("a", {
            staticClass: "xly-comment-list__note",
            attrs: {href: "javascript:;", title: "举报"},
            on: {click: e.openReportPanel}
        }, [i("i", {staticClass: "xly-icon-note"})]), e._v(" "), i("a", {
            staticClass: "xly-comment-list__comment",
            class: {"is-active": e.showReply === e.cid},
            attrs: {href: "javascript:;", title: "评论"},
            on: {click: e.replyComment}
        }, [i("i", {staticClass: "xly-icon-comment"})]), e._v(" "), i("a", {
            staticClass: "xly-comment-list__praise",
            class: {"is-active": e.isPraised, "is-animation": e.isPariseAnimation},
            attrs: {href: "javascript:;", title: e.praiseTitle},
            on: {click: e.praise}
        }, [i("i", {staticClass: "xly-icon-praise"}), e._v(e._s(e.gcount) + "\n          ")])])]), e._v(" "), e.isShowReport ? i("comment-report", {
            attrs: {
                commentInfo: e.commentInfo,
                userInfo: e.userInfo
            }, on: {report: e.reportComment, cancelReport: e.cancelReport}
        }) : e._e(), e._v(" "), e.isCommentInputCreate ? i("comment-input", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.showReply === e.cid,
                expression: "showReply === cid"
            }],
            attrs: {
                curTaskId: e.curTaskId,
                curUserId: e.curUserId,
                tid: e.tid,
                curUserNick: e.curUserNick,
                comment: e.commentInfo,
                deviceId: e.deviceId,
                currentCategoryId: e.currentCategoryId,
                currentCategoryViewId: e.currentCategoryViewId,
                focus: e.isInputFocused
            },
            on: {
                "update:focus": function (t) {
                    e.isInputFocused = t
                }, getSingleComment: e.getSingleComment
            }
        }) : e._e()], 1)])], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-comment-fast"}, [i("div", {staticClass: "xly-comment-fast__title"}, [i("p", {staticClass: "xly-comment-fast__title-text"}, [e._v("快捷评论：\n      "), i("a", {
            staticClass: "xly-comment-fast__refresh",
            attrs: {href: "javascript:;"},
            on: {
                click: function (t) {
                    return t.stopPropagation(), e.refresh(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-refresh"})])])]), e._v(" "), i("div", {staticClass: "xly-comment-fast__content"}, e._l(e.quickReviews, function (t) {
            return i("a", {
                key: t,
                staticClass: "xly-comment-fast__item",
                attrs: {href: "javascript:;"},
                on: {
                    click: function (i) {
                        e.clickQuickReview(t)
                    }
                }
            }, [e._v("\n      " + e._s(t) + "\n    ")])
        }))])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-side-item",
            class: {
                "is-vip": e.isSuperVip || (e.isSuperVipUser || e.ispackagetrying) && e.isNetdiskTask,
                "is-code": e.isShowCode,
                "is-downing": e.showStartTemplate
            }
        }, [i("div", {staticClass: "xly-side-wrapper"}, [i("td-media", {
            nativeOn: {
                dblclick: function (t) {
                    return t.stopPropagation(), e.handleDbClick(t)
                }, mouseover: function (t) {
                    return e.handleItemMouseHover(t)
                }, mouseout: function (t) {
                    return e.handleItemMouseOut(t)
                }
            }
        }, [i("template", {slot: "media"}, [i("i", {
            staticClass: "xly-icon-type",
            class: e.fileTypeClass,
            on: {mouseover: e.handleIconMouseHover}
        }, [e.isNetdiskTask ? i("span", {
            staticClass: "xly-img-icon-retrieve",
            class: {"is-vip": e.isVip || e.ispackagetrying},
            attrs: {title: "来自云盘下载"}
        }) : e._e()]), e._v(" "), e.isShowCode ? i("div", {
            staticClass: "xly-side-item__code",
            class: {"is-stop": e.isFirstShowScanCode},
            on: {mouseenter: e.handleQRCodeHover}
        }, [i("span", {staticClass: "xly-side-item__card"}, [i("i")]), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.active && "" !== e.shortlink,
                expression: "active && shortlink !== ''"
            }], staticClass: "xly-side-item__tips", class: {"is-show": e.isFirstShowScanCode}
        }, [i("canvas", {
            ref: "canvas",
            staticStyle: {height: "72px", width: "72px"}
        }), e._v(" "), i("p", [e._v(e._s(e.qrCodeConfig.text))]), e._v(" "), e.isFirstShowScanCode ? i("i", {
            staticClass: "td-icon-close",
            on: {
                click: function (t) {
                    e.$emit("update:isFirstShowScanCode", !1)
                }
            }
        }) : e._e()])]) : e._e()]), e._v(" "), i("p", {
            staticClass: "xly-file-name",
            style: e.fileNameDefaultCursor,
            attrs: {title: e.titleOverFlow},
            domProps: {innerHTML: e._s(e.taskName)},
            on: {
                mouseover: function (t) {
                    return t.target !== t.currentTarget ? null : e.handleTaskNameMouseOver(t)
                }
            }
        }), e._v(" "), i("div", {staticClass: "xly-side-operate"}, [e.isForbidden ? [i("a", {
            staticClass: "xly-side-operate__button",
            attrs: {href: "javascript:;", title: "彻底删除"},
            on: {
                mousedown: function (e) {
                    e.stopPropagation()
                }, click: function (t) {
                    return t.stopPropagation(), e.handleDestroyTask(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-clear"})])] : [i("a", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.canStart,
                expression: "canStart"
            }],
            staticClass: "xly-side-operate__button",
            attrs: {href: "javascript:;", title: "下载"},
            on: {
                mousedown: function (e) {
                    e.stopPropagation()
                }, click: e.handleStartTask
            }
        }, [i("i", {staticClass: "xly-icon-download"})]), e._v(" "), i("a", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.canPause,
                expression: "canPause"
            }],
            staticClass: "xly-side-operate__button",
            attrs: {href: "javascript:;", title: "暂停"},
            on: {
                mousedown: function (e) {
                    e.stopPropagation()
                }, click: e.handlePauseTask
            }
        }, [i("i", {staticClass: "xly-icon-pause"})])]], 2), e._v(" "), i("div", {staticClass: "xly-file-info"}, [e.taskError ? [i("p", {staticClass: "xly-file-error"}, [e._v(e._s(e.errInfo))])] : e.showStartTemplate ? [i("p", {staticClass: "xly-file-size"}, [i("td-tooltip", {
            attrs: {
                content: "正在获取全部文件大小",
                offset: {x: -5},
                visible: e.isQuerying,
                placement: "bottom"
            }
        }, [i("span", {
            staticClass: "xly-file-size__total", on: {
                mouseover: function (t) {
                    e.onShowQueryTip(!0)
                }, mouseout: function (t) {
                    e.onShowQueryTip(!1)
                }
            }
        }, [e._v(e._s(e.fileSizeFormat))])])], 1), e._v(" "), i("p", {staticClass: "xly-file-time"}, [e._v(e._s(e.remain))]), e._v(" "), i("div", {staticClass: "xly-file-speed"}, [i("span", {staticClass: "xly-file-speed__total"}, [e._v(e._s(e.taskStatusSpeedInfo))]), e._v(" "), e.dataValidating ? e._e() : [e.enbaleVipPlugin ? i("ItemVipSpeedPlugin", {
            attrs: {
                taskBase: e.taskBase,
                hover: e.hover,
                startStatusPrompt: e.startStatusPrompt,
                active: e.active,
                vipSpeedInfo: e.vipSpeedInfo
            }
        }) : e._e()], e._v(" "), e.vipSpeedInfo && e.vipSpeedInfo.isHuddle ? i("span", {
            staticClass: "xly-file-together",
            attrs: {title: "抱团下载中"}
        }) : e._e(), e._v(" "), e.vipSpeedInfo && e.vipSpeedInfo.isSensitive ? i("div", {staticClass: "xly-file-speed__note"}, [i("i", {staticClass: "xly-icon-note"}), e._v(" "), i("div", {
            staticClass: "xly-file-speed__tips",
            attrs: {slot: "content"},
            slot: "content"
        }, [e._v("\n                " + e._s(e.vipSpeedInfo.sensitive && e.vipSpeedInfo.sensitive.context || "") + " \n                "), i("a", {
            attrs: {href: "javascript:;"},
            on: {
                click: function (t) {
                    return t.stopPropagation(), e.handleClickSensitive(t)
                }
            }
        }, [e._v("\n                  " + e._s(e.vipSpeedInfo.sensitive && e.vipSpeedInfo.sensitive.link || "") + "\n                ")])])]) : e._e()], 2)] : [i("p", {staticClass: "xly-file-size"}, [i("span", {staticClass: "xly-file-size__finish"}, [e._v(e._s(e.downloadSizeFormat))]), i("span", {staticClass: "xly-file-size__separator"}, [e._v("/")]), i("td-tooltip", {
            attrs: {
                content: "正在获取全部文件大小",
                offset: {x: -5},
                visible: e.isQuerying,
                placement: "bottom"
            }
        }, [i("span", {
            staticClass: "ly-file-size__total", on: {
                mouseover: function (t) {
                    e.onShowQueryTip(!0)
                }, mouseout: function (t) {
                    e.onShowQueryTip(!1)
                }
            }
        }, [e._v(e._s(e.fileSizeFormat))])])], 1), e._v(" "), i("p", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.percentVisible,
                expression: "percentVisible"
            }], staticClass: "xly-file-percent"
        }, [e._v(e._s(e.progressPercent))]), e._v(" "), i("p", {staticClass: "xly-file-status"}, [e._v("\n            " + e._s(e.taskStatusSpeedInfo) + "\n            "), e.enbaleVipPlugin ? i("ItemVipSpeedPlugin", {
            attrs: {
                taskBase: e.taskBase,
                hover: e.hover,
                active: e.active,
                vipSpeedInfo: e.vipSpeedInfo
            }
        }) : e._e()], 1)]], 2), e._v(" "), i("td-progress", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: !e.taskError,
                expression: "!taskError"
            }], attrs: {value: e.progress}
        })], 2), e._v(" "), e.isShowCloudExpand ? [e.cloudExpandType === e.netExpandType.Error ? i("div", {staticClass: "xly-side-netdisk"}, [i("p", {staticClass: "xly-side-netdisk__text is-disabled"}, [e._v("添加到云盘失败")])]) : e.cloudExpandType === e.netExpandType.SaveAsPlay ? i("div", {staticClass: "xly-side-netdisk"}, [i("p", {staticClass: "xly-side-netdisk__text"}, [e._v("添加到云盘，立享云盘播放")]), e._v(" "), i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.saveTask}
        }, [e._v("云盘播放")])]) : e.cloudExpandType === e.netExpandType.SaveAsNormal ? i("div", {staticClass: "xly-side-netdisk"}, [i("p", {staticClass: "xly-side-netdisk__text"}, [e._v("添加到云盘，节省电脑空间")]), e._v(" "), i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.saveTask}
        }, [e._v("立即添加")])]) : e.cloudExpandType === e.netExpandType.Saving ? i("div", {staticClass: "xly-side-netdisk"}, [i("p", {staticClass: "xly-side-netdisk__text"}, [e._v("正在添加到："), i("span", {on: {click: e.clickPath}}, [e._v(e._s(e.panTaskData && e.panTaskData.title || ""))])]), e._v(" "), i("span", {staticClass: "xly-side-netdisk__progress"}, [e._v("保存中" + e._s(e.panTaskProgress) + "%")])]) : e.cloudExpandType === e.netExpandType.Saved ? i("div", {staticClass: "xly-side-netdisk"}, [i("p", {staticClass: "xly-side-netdisk__text is-disabled"}, [e._v("已成功添加到："), i("span", {on: {click: e.clickPath}}, [e._v(e._s(e.panTaskData && e.panTaskData.title || ""))])]), e._v(" "), e.canPlay ? i("button", {
            staticClass: "td-button td-button--other td-button--small",
            on: {click: e.consumePanTask}
        }, [e._v("云盘播放")]) : i("span", {
            staticClass: "xly-side-netdisk__link",
            on: {click: e.consumePanTask}
        }, [e._v("查看详情>")])]) : e.cloudExpandType === e.netExpandType.NoSpace ? i("div", {staticClass: "xly-side-netdisk"}, [i("p", {staticClass: "xly-side-netdisk__text is-disabled"}, [e._v("空间不足，无法添加到云盘")]), e._v(" "), i("span", {
            staticClass: "xly-side-netdisk__link",
            on: {click: e.showDetail}
        }, [e._v("查看详情>")])]) : e._e()] : e._e(), e._v(" "), i("div", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isShowExpand,
                expression: "isShowExpand"
            }], staticClass: "xly-side-ad"
        }, [i("div", {
            staticClass: "xly-side-ad__image",
            attrs: {title: e.vipSpeedInfo && e.vipSpeedInfo.huddle && e.vipSpeedInfo.huddle.title || ""}
        }, [e.vipSpeedInfo && e.vipSpeedInfo.huddle && e.vipSpeedInfo.huddle.imgSrc ? i("img", {
            staticClass: "xly-side-ad__together",
            attrs: {src: e.vipSpeedInfo && e.vipSpeedInfo.huddle && e.vipSpeedInfo.huddle.imgSrc || ""},
            on: {
                click: function (t) {
                    return t.stopPropagation(), e.handleGroupAccelerateClick(t)
                }, mousedown: function (e) {
                    e.stopPropagation()
                }
            }
        }) : e._e()]), e._v(" "), e.enbaleVipPlugin ? i("div", {
            staticClass: "xly-plugin-vip"
        }) : e._e()])], 2)])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-side-item", on: {
                mouseenter: function (t) {
                    e.isShowShouleiFileTransfer = !0
                }, mouseleave: function (t) {
                    e.isShowShouleiFileTransfer = !1
                }
            }
        }, [i("div", {staticClass: "xly-side-wrapper"}, [i("td-media", {
            nativeOn: {
                dblclick: function (t) {
                    return e.handleDbClick(t)
                }
            }
        }, [i("i", {
            class: e.fileTypeClass,
            style: e.isInstallFileIcon ? {
                background: "url(" + e.installFileIcon + ")",
                "background-size": "100% 100%"
            } : {},
            attrs: {slot: "media"},
            slot: "media"
        }, [e.isNetdiskTask ? i("span", {
            staticClass: "xly-img-icon-retrieve",
            class: {"is-vip": e.isVip},
            attrs: {title: "来自云盘下载"}
        }) : e._e()]), e._v(" "), i("p", {
            staticClass: "xly-file-name",
            style: e.fileNameDefaultCursor,
            attrs: {title: e.titleOverFlow},
            domProps: {innerHTML: e._s(e.taskName)},
            on: {
                mouseover: function (t) {
                    return t.target !== t.currentTarget ? null : e.handleTaskNameMouseOver(t)
                }
            }
        }), e._v(" "), i("div", {staticClass: "xly-side-operate"}, [e.canPlay ? i("a", {
            staticClass: "xly-side-operate__button",
            attrs: {href: "javascript:;", title: "播放"},
            on: {
                mousedown: function (e) {
                    e.stopPropagation()
                }, click: function (t) {
                    return t.stopPropagation(), e.handlePlayTask(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-play"})]) : e._e(), e._v(" "), e.deleted ? i("a", {
            staticClass: "xly-side-operate__button",
            attrs: {href: "javascript:;", title: "删除任务记录"},
            on: {
                mousedown: function (e) {
                    e.stopPropagation()
                }, click: function (t) {
                    return t.stopPropagation(), e.handleDestroyTask(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-clear"})]) : e.canPlay ? e._e() : i("a", {
            staticClass: "xly-side-operate__button",
            attrs: {href: "javascript:;", title: "打开文件夹"},
            on: {
                mousedown: function (e) {
                    e.stopPropagation()
                }, click: function (t) {
                    return t.stopPropagation(), e.handleOpenFile(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-open"})])]), e._v(" "), i("div", {staticClass: "xly-file-info"}, [i("p", {staticClass: "xly-file-size"}, [i("span", {staticClass: "xly-file-size__total"}, [e._v(e._s(e.fileSizeFormat))])]), e._v(" "), i("p", {staticClass: "xly-file-time"}, [e._v(e._s(e.completeTime))]), e._v(" "), e.deleted ? i("p", {staticClass: "xly-file-status"}, [e._v("文件已移除")]) : e._e()])])], 1)])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {staticClass: "xly-side-item"}, [i("div", {staticClass: "xly-side-wrapper"}, [i("td-media", {
            nativeOn: {
                dblclick: function (t) {
                    return e.handleDbClick(t)
                }
            }
        }, [i("i", {
            staticClass: "xly-icon-type",
            class: e.fileTypeClass,
            style: e.isFileIcon ? {background: "url(" + e.fileIcon + ")", "background-size": "100% 100%"} : {},
            attrs: {slot: "media"},
            slot: "media"
        }), e._v(" "), i("p", {
            staticClass: "xly-file-name",
            style: e.fileNameDefaultCursor,
            attrs: {title: e.titleOverFlow},
            domProps: {innerHTML: e._s(e.taskName)},
            on: {
                mouseover: function (t) {
                    return t.target !== t.currentTarget ? null : e.handleTaskNameMouseOver(t)
                }
            }
        }), e._v(" "), i("div", {staticClass: "xly-side-operate"}, [i("a", {
            staticClass: "xly-side-operate__button",
            attrs: {href: "javascript:;", title: "还原"},
            on: {
                mousedown: function (e) {
                    e.stopPropagation()
                }, click: function (t) {
                    return t.stopPropagation(), e.handleRestore(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-restore"})])]), e._v(" "), i("div", {staticClass: "xly-file-info"}, [i("p", {staticClass: "xly-file-size"}, [i("span", {staticClass: "xly-file-size__total"}, [e._v(e._s(e.fileSizeFormat))])]), e._v(" "), i("p", {staticClass: "xly-file-time"}, [e._v(e._s(e.creationTime))])])])], 1)])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("div", {
            staticClass: "td-avatar",
            on: {click: this.handleAvatarClick}
        }, [t("img", {
            directives: [{name: "lazy", rawName: "v-lazy", value: this.avatar, expression: "avatar"}],
            key: this.avatar,
            attrs: {alt: "头像"}
        })])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-comment__write",
            class: {"is-focus": e.focus || e.imgUploadStatus, "is-disabled": "" === e.tid},
            on: {
                mousedown: function (e) {
                    e.stopPropagation()
                }
            }
        }, [i("label", {staticClass: "td-textarea"}, [i("textarea", {
            directives: [{
                name: "model",
                rawName: "v-model",
                value: e.text,
                expression: "text"
            }],
            ref: "replyInput",
            staticClass: "td-textarea__inner",
            attrs: {placeholder: e.placeholder},
            domProps: {value: e.text},
            on: {
                focus: e.handleInputFocus, blur: e.handleInputBlur, keydown: [function (t) {
                    return ("button" in t || !e._k(t.keyCode, "enter", 13, t.key, "Enter")) && t.ctrlKey ? e.sendCommentHandler(t) : null
                }, function (t) {
                    return ("button" in t || !e._k(t.keyCode, "a", void 0, t.key, void 0)) && t.ctrlKey ? void e.$refs.replyInput.select() : null
                }], paste: e.triggerUpload, input: function (t) {
                    t.target.composing || (e.text = t.target.value)
                }
            }
        })]), e._v(" "), i("div", {staticClass: "xly-comment__oprate"}, [i("img-upload-panel", {
            attrs: {
                "img-upload-progress": e.imgUploadProgress,
                "is-img-uploading": e.isImgUploading,
                "is-image-frame-show": e.isImageFrameShow && (e.focus || e.imgUploadStatus),
                "comment-img-url": e.commentImgUrl,
                "show-comment-img-preview": e.showCommentImgPreview
            }, on: {delete: e.deleteCommentImg}
        }, [i("img-upload", {
            ref: "imgUploadItem",
            attrs: {curUserId: e.curUserId, "is-enable": !e.isImageFrameShow},
            on: {change: e.handleImgUpload, abort: e.cancelImgUpload}
        }, [i("div", {
            staticClass: "xly-comment__inster-img",
            attrs: {title: "插入图片"},
            on: {click: e.handleImgClick}
        }, [i("i", {staticClass: "xly-icon-img"})])])], 1), e._v(" "), i("i", {staticClass: "xly-line"}), e._v(" "), i("emoji", {
            on: {pick: e.handlePickEmoji},
            nativeOn: {
                click: function (t) {
                    return e.handleInputFocus(t)
                }
            }
        }), e._v(" "), i("button", {
            staticClass: "td-button",
            class: {"is-disabled": "" === e.text || !e.focus},
            attrs: {title: "发送"},
            on: {
                click: function (t) {
                    return t.stopPropagation(), e.sendCommentHandler(t)
                }
            }
        }, [e._v("评论")])], 1), e._v(" "), e.canShowCommentNote ? i("p", {staticClass: "xly-comment__note"}, [e._v("评论请大于6个字哦~")]) : e._e()])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "td-avatar", on: {
                click: function (t) {
                    e.$emit("click-avatar")
                }
            }
        }, [i("img", {
            directives: [{name: "lazy", rawName: "v-lazy", value: e.avatar, expression: "avatar"}],
            key: e.avatar,
            attrs: {alt: "头像"}
        })])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-comment-picture",
            class: {"is-large": e.isLarge, "is-long": e.isLong}
        }, [i("div", {staticClass: "xly-comment-picture__wrapper"}, [i("div", {staticClass: "xly-comment-picture__operate"}, [i("a", {
            attrs: {
                href: "javascript:;",
                title: "收起"
            }, on: {
                click: function (t) {
                    return t.stopPropagation(), e.toggleView(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-collapse"}), e._v("收起\n      ")]), e._v(" "), i("a", {
            attrs: {
                href: "javascript:;",
                title: "查看原图"
            }, on: {
                click: function (t) {
                    return t.stopPropagation(), e.openRawImage(t)
                }
            }
        }, [i("i", {staticClass: "xly-icon-magnifier"}), e._v("查看原图\n      ")]), e._v(" "), e.isSelfComment ? e._e() : i("a", {
            staticClass: "img-opers__btn report-btn",
            attrs: {href: "javascript:;", title: "举报"},
            on: {
                click: function (t) {
                    t.stopPropagation(), e.$emit("report")
                }
            }
        }, [i("i", {staticClass: "xly-icon-note"}), e._v("举报\n      ")])]), e._v(" "), i("img", {
            directives: [{
                name: "lazy",
                rawName: "v-lazy",
                value: e.lazyImgObj({loadingImg: e.loadingImg, src: e.imgUrl}),
                expression: "lazyImgObj({ loadingImg, src: imgUrl })"
            }], attrs: {alt: "图片评论"}, on: {
                click: function (t) {
                    return t.stopPropagation(), e.toggleView(t)
                }
            }
        }), e._v(" "), i("span", {staticClass: "xly-comment-picture__tag"}, [e._v("长图")])])])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("td-dialog", {
            class: {"is-disabled": 6 === e.reportType && "" === e.reportMessage || !e.reportType},
            attrs: {visible: e.showReport, "custom-class": "xly-dialog-report"},
            on: {
                "update:visible": function (t) {
                    e.showReport = t
                }, close: e.handleReportCancel
            }
        }, [i("h2", {
            attrs: {slot: "header"},
            slot: "header"
        }, [e._v("请选择举报类型")]), e._v(" "), i("ul", {staticClass: "xly-dialog-report__form"}, e._l(e.reportOptions, function (t) {
            return i("li", {key: t.value + "f"}, [i("td-radio", {
                attrs: {label: t.value},
                model: {
                    value: e.reportType, callback: function (t) {
                        e.reportType = t
                    }, expression: "reportType"
                }
            }, [e._v("\n        " + e._s(t.label) + "\n      ")])], 1)
        })), e._v(" "), i("td-input", {
            attrs: {
                type: "textarea",
                maxlength: e.maxlength,
                placeholder: "请简单描述举报理由，字数不超过" + e.maxlength + "字"
            }, model: {
                value: e.reportMessage, callback: function (t) {
                    e.reportMessage = t
                }, expression: "reportMessage"
            }
        }), e._v(" "), i("div", {
            staticClass: "xly-dialog__footer",
            attrs: {slot: "footer"},
            slot: "footer"
        }, [i("div", {staticClass: "xly-dialog__button"}, [i("td-button", {on: {click: e.handleReportSubmit}}, [e._v("确定")]), e._v(" "), i("td-button", {
            staticClass: "td-button--other",
            on: {click: e.handleReportCancel}
        }, [e._v("取消")])], 1)])], 1)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return e.isShowVipSpeed ? i("a", {
            staticClass: "xly-file-speed__vip",
            attrs: {href: "javascript:;"}
        }, [e._v(e._s(e.vipSpeed))]) : i("a", {
            directives: [{
                name: "show",
                rawName: "v-show",
                value: e.isShowVipHover,
                expression: "isShowVipHover"
            }], staticClass: "xly-file-speed__vip-link", attrs: {href: "javascript:;"}, on: {
                mousedown: function (e) {
                    e.stopPropagation()
                }, click: function (t) {
                    return t.stopPropagation(), e.clickVipLink(t)
                }
            }
        }, [e._v(e._s(e.hoverText))])
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-face",
            on: {mouseenter: e.handleShowEmoji}
        }, [e._m(0), e._v(" "), i("div", {
            staticClass: "xly-face-emoji",
            class: {"is-top": e.isTop}
        }, [i("ul", {
            on: {
                click: function (t) {
                    return t.stopPropagation(), e.handleClick(t)
                }
            }
        }, [e._m(1), e._v(" "), e._m(2), e._v(" "), e._m(3), e._v(" "), e._m(4), e._v(" "), e._m(5), e._v(" "), e._m(6), e._v(" "), e._m(7), e._v(" "), e._m(8), e._v(" "), e._m(9), e._v(" "), e._m(10), e._v(" "), e._m(11), e._v(" "), e._m(12), e._v(" "), e._m(13), e._v(" "), e._m(14), e._v(" "), e._m(15), e._v(" "), e._m(16), e._v(" "), e._m(17), e._v(" "), e._m(18), e._v(" "), e._m(19), e._v(" "), e._m(20), e._v(" "), e._m(21), e._v(" "), e._m(22), e._v(" "), e._m(23), e._v(" "), e._m(24), e._v(" "), e._m(25), e._v(" "), e._m(26), e._v(" "), e._m(27), e._v(" "), e._m(28), e._v(" "), e._m(29), e._v(" "), e._m(30), e._v(" "), e._m(31), e._v(" "), e._m(32)])])])
    }, o = [function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("a", {
            staticClass: "xly-face__icon",
            attrs: {href: "javascript:;", title: "表情"}
        }, [t("i", {staticClass: "xly-icon-face"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "开心"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F604"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "可爱"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F60A"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "大笑"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F603"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "憨笑"}}, [t("span", {staticClass: "face-icon-emoji emoji-263A"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "眨眼"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F609"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "色"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F60D"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "爱你"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F618"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "亲亲"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F61A"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "脸红"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F633"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "满意"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F60C"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "傻笑"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F601"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "鬼脸"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F61C"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "吐舌"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F61D"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "无语"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F612"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "得意"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F60F"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "汗"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F613"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "失望"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F614"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "低落"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F61E"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "痛苦"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F616"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "焦虑"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F622"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "担心"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F630"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "震惊"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F628"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "悔恨"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F623"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "鼻涕"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F625"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "哭"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F62D"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "大哭"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F602"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "晕"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F632"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "惊恐"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F631"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "心烦"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F620"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "生气"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F621"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "睡觉"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F62A"})])
    }, function () {
        var e = this.$createElement, t = this._self._c || e;
        return t("li", {attrs: {title: "口罩"}}, [t("span", {staticClass: "face-icon-emoji emoji-1F637"})])
    }];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("form", {
            attrs: {enctype: "multipart/form-data"},
            on: {click: e.handleFormClick}
        }, [i("input", {
            ref: e.refName,
            staticStyle: {display: "none"},
            attrs: {type: "file", id: "file", name: "file", accept: "image/*"},
            on: {
                click: function (e) {
                    e.stopPropagation()
                }, change: function (t) {
                    e.handleChange(t.target.files[0])
                }
            }
        }), e._v(" "), e._t("default")], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    var n = function () {
        var e = this, t = e.$createElement, i = e._self._c || t;
        return i("div", {
            staticClass: "xly-comment__inster-img",
            attrs: {title: "插入图片"}
        }, [e._t("default"), e._v(" "), e.isImageFrameShow ? i("div", {staticClass: "xly-comment-review"}, [i("span", {staticClass: "xly-comment-review__arrow"}), e._v(" "), i("div", {staticClass: "xly-comment-review__img"}, [e.isImgUploading ? i("td-progress", {attrs: {value: e.imgUploadProgress}}) : e._e(), e._v(" "), e.showCommentImgPreview ? [e._l(e.commentImgUrl, function (t, n) {
            return i("img", {key: n, attrs: {src: e.thumbnail(t)}})
        }), e._v(" "), i("a", {
            staticClass: "xly-comment-review__close",
            attrs: {href: "javascript:;", title: "删除图片"},
            on: {click: e.deleteCommentImg}
        }, [i("i", {staticClass: "td-icon-close"})])] : e._e()], 2)]) : e._e()], 2)
    }, o = [];
    n._withStripped = !0, i.d(t, "a", function () {
        return n
    }), i.d(t, "b", function () {
        return o
    })
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(498), o = i(20);
    t.Parser = class extends o.EventEmitter {
        constructor() {
            super(), this.decoder = new n.StringDecoder("utf8"), this.jsonBuffer = ""
        }

        encode(e) {
            return JSON.stringify(e) + "\n"
        }

        feed(e) {
            let t = this.jsonBuffer, i = 0, n = (t += this.decoder.write(e)).indexOf("\n", i);
            for (; n >= 0;) {
                const e = t.slice(i, n), o = JSON.parse(e);
                this.emit("message", o), i = n + 1, n = t.indexOf("\n", i)
            }
            this.jsonBuffer = t.slice(i)
        }
    }
}, function (e, t) {
    e.exports = require("string_decoder")
}, function (e, t, i) {
    "use strict";
    var n;
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t, i;
        !function (e) {
            e.require = "AR_BROWSER_REQUIRE", e.builtIn = "AR_BROWSER_GET_BUILTIN", e.global = "AR_BROWSER_GET_GLOBAL", e.functionCall = "AR_BROWSER_FUNCTION_CALL", e.construct = "AR_BROWSER_CONSTRUCTOR", e.memberConstruct = "AR_BROWSER_MEMBER_CONSTRUCTOR", e.memberCall = "AR_BROWSER_MEMBER_CALL", e.memberSet = "AR_BROWSER_MEMBER_SET", e.memberGet = "AR_BROWSER_MEMBER_GET", e.currentWindow = "AR_BROWSER_CURRENT_WINDOW", e.currentWebContents = "AR_BROWSER_CURRENT_WEB_CONTENTS", e.clientWebContents = "AR_BROWSER_CLIENT_WEB_CONTENTS", e.webContents = "AR_BROWSER_WEB_CONTENTS", e.sync = "AR_BROWSER_SYNC", e.contextRelease = "AR_BROWSER_CONTEXT_RELEASE"
        }(t = e.browser || (e.browser = {})), function (e) {
            e.requireReturn = "AR_RENDERER_REQUIRE_RETURN", e.getBuiltInReturn = "AR_RENDERER_BUILTIN_RETURN", e.getGlobalReturn = "AR_RENDERER_GLOBAL_RETURN", e.functionCallReturn = "AR_RENDERER_FUNCTION_CALL_RETURN", e.memberConstructReturn = "AR_RENDERER_MEMBER_CONSTRUCTOR_RETURN", e.constructReturn = "AR_RENDERER_CONSTRUCTOR_RETURN", e.memberCallReturn = "AR_RENDERER_MEMBER_CALL_RETURN", e.memberSetReturn = "AR_RENDERER_MEMBER_SET_RETURN", e.memberGetReturn = "AR_RENDERER_MEMBER_GET_RETURN", e.currentWindowReturn = "AR_BROWSER_CURRENT_WINDOW_RETURN", e.currentWebContentsReturn = "AR_RENDERER_CURRENT_WEB_CONTENTS_RETURN", e.clientWebContentsReturn = "AR_RENDERER_CLIENT_WEB_CONTENTS_RETURN", e.webContentsReturn = "AR_RENDERER_WEB_CONTENTS_RETURN", e.syncReturn = "AR_RENDERER_SYNC_RETURN", e.callback = "AR_RENDERER_CALLBACK"
        }(i = e.renderer || (e.renderer = {}))
    }(n || (n = {})), t.default = n
}, function (e, t, i) {
    "use strict";
    var n;
    !function (e) {
        e.getRemoteObjectName = function (e) {
            let t = typeof e;
            if ("function" === t) t = e.name; else if ("object" === t) {
                let t = e.name;
                if ("string" != typeof t) {
                    let i = e.constructor;
                    t = i ? i.name : Object.toString.call(e)
                }
            }
            return t
        }, e.isPromise = function (e) {
            return e && e.then && e.then instanceof Function && e.constructor && e.constructor.reject && e.constructor.reject instanceof Function && e.constructor.resolve && e.constructor.resolve instanceof Function
        }
    }(n || (n = {})), e.exports = n
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(4), o = i(32), a = i(378), r = i(72), s = i(0).default.getLogger("DownloadKernel.Category");

    class l {
        constructor(e) {
            this.categoryViews = [], this.id = e, this.parentId = -1, this.nextId = -1, this.status = 0
        }

        getCategoryViews() {
            return this.categoryViews
        }

        getCategoryViewCount() {
            return this.categoryViews.length
        }

        getCategoryViewFromId(e) {
            let t = null;
            for (let i = 0; i < this.categoryViews.length; ++i) {
                let n = this.categoryViews[i];
                if (n) {
                    if (e === n.getCategoryViewId()) {
                        t = n;
                        break
                    }
                }
            }
            return t
        }

        getId() {
            return this.id
        }

        setParentId(e) {
            e && (this.parentId = e)
        }

        getParentId() {
            return this.parentId
        }

        setNextId(e) {
            e && (this.nextId = e)
        }

        getNextId() {
            return this.nextId
        }

        setStatus(e) {
            e && (this.status = e)
        }

        getStatus() {
            return this.status
        }

        setName(e) {
            this.name = e
        }

        getName() {
            return this.name
        }

        setDescription(e) {
            this.description = e
        }

        getDescription() {
            return this.description
        }

        setDefaultPath(e) {
            this.defaultPath = e
        }

        getDefaultPath() {
            return this.defaultPath
        }

        setUserName(e) {
            this.userName = e
        }

        getUserName() {
            return this.userName
        }

        setPassword(e, t = "", i = !1, n = null) {
            if (this.password = e, "" !== this.password && "" === t) {
                let e = r.createHash("md5");
                e.update(this.password), t = e.digest("hex")
            }
            this.passwordV2 = t, i && o.ThunderKernel.setCategoryPassword(this.id, this.password, this.passwordV2, n)
        }

        getPassword() {
            return this.password
        }

        getPasswordV2() {
            return this.passwordV2
        }

        setAccountPassword(e) {
            this.accountPassword !== e && (this.accountPassword = e)
        }

        getAccountPassword() {
            return this.accountPassword
        }

        getCategoryData() {
            return {
                categoryId: this.id,
                parentId: this.parentId,
                nextId: this.nextId,
                status: this.status,
                name: this.name,
                description: this.description,
                defaultPath: this.defaultPath,
                userName: this.userName,
                password: this.password,
                passwordV2: this.passwordV2,
                accountPassword: this.accountPassword
            }
        }
    }

    t.Category = l;

    class d extends l {
        constructor(e) {
            super(e);
            let t = new a.CategoryView(e, n.DownloadKernel.CategroyViewID.Downloading),
                i = new a.CategoryView(e, n.DownloadKernel.CategroyViewID.Completed),
                o = new a.CategoryView(e, n.DownloadKernel.CategroyViewID.Recycle);
            this.categoryViews.push(t), this.categoryViews.push(i), this.categoryViews.push(o)
        }

        static createCategoryFromData(e) {
            let t = e.categoryId;
            if (void 0 === t || t < 0) return null;
            s.information("createCategoryFromData ", e);
            let i = new d(t);
            return i.setName(e.name), i.setParentId(e.parentId), i.setNextId(e.nextId), i.setStatus(e.status), i.setDescription(e.description), i.setDefaultPath(e.defaultPath), i.setUserName(e.userName), i.setPassword(e.password, e.passwordV2), i.setAccountPassword(e.accountPassword), i
        }
    }

    t.CommonCategory = d
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18);
    !function (e) {
        let t = !1, a = [];
        e.initBtTaskTrackers = function () {
            return n(this, void 0, void 0, function* () {
                if (!t) {
                    t = !0;
                    let e = null;
                    try {
                        o.default.defaults.adapter = i(21), e = yield o.default.get("http://plugin.xl7.xunlei.com/7.9/normal/trackers.json")
                    } catch (e) {
                    }
                    if (null !== e && 200 === e.status && e.data && "" !== e.data && e.data.trackers && e.data.trackers.tracker) for (let t = 0; t < e.data.trackers.tracker.length; ++t) {
                        let i = e.data.trackers.tracker[t];
                        i && "" !== i && a.push(i)
                    }
                }
            })
        }, e.getExtraTracks = function () {
            return a
        }
    }(t.BTExtraTrackNS || (t.BTExtraTrackNS = {}))
}, function (e, t, i) {
    "use strict";
    e.exports = function (e, t) {
        return function () {
            for (var i = new Array(arguments.length), n = 0; n < i.length; n++) i[n] = arguments[n];
            return e.apply(t, i)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = i(380);
    e.exports = function (e, t, i) {
        var o = i.config.validateStatus;
        i.status && o && !o(i.status) ? t(n("Request failed with status code " + i.status, i.config, null, i.request, i)) : e(i)
    }
}, function (e, t, i) {
    "use strict";
    e.exports = function (e, t, i, n, o) {
        return e.config = t, i && (e.code = i), e.request = n, e.response = o, e
    }
}, function (e, t, i) {
    "use strict";
    var n = i(52);

    function o(e) {
        return encodeURIComponent(e).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]")
    }

    e.exports = function (e, t, i) {
        if (!t) return e;
        var a;
        if (i) a = i(t); else if (n.isURLSearchParams(t)) a = t.toString(); else {
            var r = [];
            n.forEach(t, function (e, t) {
                null !== e && void 0 !== e && (n.isArray(e) ? t += "[]" : e = [e], n.forEach(e, function (e) {
                    n.isDate(e) ? e = e.toISOString() : n.isObject(e) && (e = JSON.stringify(e)), r.push(o(t) + "=" + o(e))
                }))
            }), a = r.join("&")
        }
        return a && (e += (-1 === e.indexOf("?") ? "?" : "&") + a), e
    }
}, function (e, t, i) {
    var n = i(50), o = i(100), a = i(62), r = i(508), s = i(101).Writable, l = i(624)("follow-redirects"),
        d = {GET: !0, HEAD: !0, OPTIONS: !0, TRACE: !0}, u = Object.create(null);

    function c(e, t) {
        s.call(this), e.headers = e.headers || {}, this._options = e, this._redirectCount = 0, this._requestBodyLength = 0, this._requestBodyBuffers = [], t && this.on("response", t);
        var i = this;
        if (this._onNativeResponse = function (e) {
            i._processResponse(e)
        }, !e.pathname && e.path) {
            var n = e.path.indexOf("?");
            n < 0 ? e.pathname = e.path : (e.pathname = e.path.substring(0, n), e.search = e.path.substring(n))
        }
        this._performRequest()
    }

    function h(e) {
        var t = {maxRedirects: 21, maxBodyLength: 10485760}, i = {};
        return Object.keys(e).forEach(function (o) {
            var a = o + ":", s = i[a] = e[o], d = t[o] = Object.create(s);
            d.request = function (e, o) {
                return "string" == typeof e ? (e = n.parse(e)).maxRedirects = t.maxRedirects : e = Object.assign({
                    protocol: a,
                    maxRedirects: t.maxRedirects,
                    maxBodyLength: t.maxBodyLength
                }, e), e.nativeProtocols = i, r.equal(e.protocol, a, "protocol mismatch"), l("options", e), new c(e, o)
            }, d.get = function (e, t) {
                var i = d.request(e, t);
                return i.end(), i
            }
        }), t
    }

    ["abort", "aborted", "error", "socket", "timeout"].forEach(function (e) {
        u[e] = function (t) {
            this._redirectable.emit(e, t)
        }
    }), c.prototype = Object.create(s.prototype), c.prototype.write = function (e, t, i) {
        this._requestBodyLength + e.length <= this._options.maxBodyLength ? (this._requestBodyLength += e.length, this._requestBodyBuffers.push({
            data: e,
            encoding: t
        }), this._currentRequest.write(e, t, i)) : (this.emit("error", new Error("Request body larger than maxBodyLength limit")), this.abort())
    }, c.prototype.end = function (e, t, i) {
        var n = this._currentRequest;
        e ? this.write(e, t, function () {
            n.end(null, null, i)
        }) : n.end(null, null, i)
    }, c.prototype.setHeader = function (e, t) {
        this._options.headers[e] = t, this._currentRequest.setHeader(e, t)
    }, c.prototype.removeHeader = function (e) {
        delete this._options.headers[e], this._currentRequest.removeHeader(e)
    }, ["abort", "flushHeaders", "getHeader", "setNoDelay", "setSocketKeepAlive", "setTimeout"].forEach(function (e) {
        c.prototype[e] = function (t, i) {
            return this._currentRequest[e](t, i)
        }
    }), ["aborted", "connection", "socket"].forEach(function (e) {
        Object.defineProperty(c.prototype, e, {
            get: function () {
                return this._currentRequest[e]
            }
        })
    }), c.prototype._performRequest = function () {
        var e = this._options.protocol, t = this._options.nativeProtocols[e];
        if (this._options.agents) {
            var i = e.substr(0, e.length - 1);
            this._options.agent = this._options.agents[i]
        }
        var o = this._currentRequest = t.request(this._options, this._onNativeResponse);
        for (var a in this._currentUrl = n.format(this._options), o._redirectable = this, u) a && o.on(a, u[a]);
        if (this._isRedirect) {
            var r = this._requestBodyBuffers;
            !function e() {
                if (0 !== r.length) {
                    var t = r.pop();
                    o.write(t.data, t.encoding, e)
                } else o.end()
            }()
        }
    }, c.prototype._processResponse = function (e) {
        var t = e.headers.location;
        if (t && !1 !== this._options.followRedirects && e.statusCode >= 300 && e.statusCode < 400) {
            if (++this._redirectCount > this._options.maxRedirects) return void this.emit("error", new Error("Max redirects exceeded."));
            var i, o = this._options.headers;
            if (307 !== e.statusCode && !(this._options.method in d)) for (i in this._options.method = "GET", this._requestBodyBuffers = [], o) /^content-/i.test(i) && delete o[i];
            if (!this._isRedirect) for (i in o) /^host$/i.test(i) && delete o[i];
            var a = n.resolve(this._currentUrl, t);
            l("redirecting to", a), Object.assign(this._options, n.parse(a)), this._isRedirect = !0, this._performRequest()
        } else e.responseUrl = this._currentUrl, this.emit("response", e), this._requestBodyBuffers = []
    }, e.exports = h({http: o, https: a}), e.exports.wrap = h
}, function (e, t) {
    e.exports = require("assert")
}, function (e, t, i) {
    "use strict";
    e.exports = function (e) {
        return !(!e || !e.__CANCEL__)
    }
}, function (e, t, i) {
    "use strict";

    function n(e) {
        this.message = e
    }

    n.prototype.toString = function () {
        return "Cancel" + (this.message ? ": " + this.message : "")
    }, n.prototype.__CANCEL__ = !0, e.exports = n
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.hoverWindowReadyToShow = "HoverWindowReadyToShow"
    }(t.ThunderEvent || (t.ThunderEvent = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(9), r = i(14), s = i(0), {isDef: l} = r.ThunderUtil, d = i(73), u = i(31), c = i(4), h = i(3),
        f = i(68), p = i(33), g = s.default.getLogger("statCoreEvent");

    function m(e) {
        let t = "";
        do {
            if (void 0 === e || null === e || "" === e) break;
            let i = /^(xl_thunder_pc)\|([\d\.]+)\|(\d+)\|(.*)$/.exec(e);
            if (null === i) break;
            if (null === i[4] || void 0 === i[4]) break;
            t = i[4]
        } while (0);
        return t
    }

    function v(e) {
        let t = e;
        do {
            if ("leftup" === e || "rightup" === e || "BHO_left" === e || "BHO_right" === e) {
                t = "BHO";
                break
            }
            if ("wfp" === e) {
                t = "XLWFP";
                break
            }
            if ("redown" === e) {
                t = "re_download";
                break
            }
            if ("newwindow" === e) {
                t = "newwindow_url";
                break
            }
            if ("bt_file" === e) {
                t = "Torrent";
                break
            }
        } while (0);
        return t
    }

    function y(e) {
        return n(this, void 0, void 0, function* () {
            let t = "";
            do {
                if (!e) break;
                let i = u.ThunderHelper.getDriveType(e);
                if (!i) break;
                if (i === u.ThunderHelper.DriverType.DRIVE_REMOTE) {
                    t = "share";
                    break
                }
                if (i === u.ThunderHelper.DriverType.DRIVE_REMOVABLE) {
                    t = "flash";
                    break
                }
                if (i === u.ThunderHelper.DriverType.DRIVE_FIXED) {
                    let i = yield u.ThunderHelper.getFixedDriveMediaType(e);
                    if (i === u.ThunderHelper.MediaType.HDD) {
                        t = "HD";
                        break
                    }
                    if (i === u.ThunderHelper.MediaType.SSD) {
                        t = "SSD";
                        break
                    }
                }
            } while (0);
            return t
        })
    }

    t.statCoreEvent = function (e, t, i) {
        return n(this, void 0, void 0, function* () {
            do {
                if (null === e) break;
                if (e.getTaskAttribute(c.DownloadKernel.TaskAttribute.GroupTaskId) > 0) break;
                let n = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.Origin);
                n = v(n);
                let r = m(e.getTaskAttribute(c.DownloadKernel.TaskAttribute.ProductInfo)), s = e.getId();
                const u = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.FileSize);
                let T = `broswer=${r},taskid=${s}`, w = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskType),
                    k = "";
                if (w === c.DownloadKernel.TaskType.P2sp) k = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskUrl), T = `${T},task_type=p2sp,download_info=${encodeURIComponent(k)}`; else if (w === c.DownloadKernel.TaskType.Bt) {
                    let t = e.getExtraObject().getInfoId();
                    T = `${T},task_type=bt,download_info=${t}`, k = t
                } else w === c.DownloadKernel.TaskType.Emule ? (k = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskUrl), T = `${T},task_type=emule,download_info=${encodeURIComponent(k)}`) : w === c.DownloadKernel.TaskType.Group ? T = `${T},task_type=group,download_info=` : w === c.DownloadKernel.TaskType.Magnet && (k = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskUrl), T = `${T},task_type=magnet,download_info=${encodeURIComponent(k)}`);
                let C = yield d.isVestUrl(k, "vestURL"), b = yield d.isVestUrl(k, "commonUrl"), I = "";
                C ? (I = n, n = "xl_password_vest") : b && (I = n, n = "xl_password_common");
                let S = 0;
                const _ = yield h.client.callServerFunction("IsLogined");
                let D = !1, A = 0, N = yield h.client.callServerFunction("GetUserInfo", 2);
                if (N) try {
                    N = JSON.parse(N)
                } catch (e) {
                    g.warning(e.message)
                }
                N && (A = Number(N.vasType).valueOf(), D = Boolean("1" === N.isVip)), _ && D && (S = 5 === A ? 7 : l(A) && A > 2 ? 3 : 2), T = `${T = `${T},source=${n},pwd_source=${I},is_login=${_ ? 1 : 0},is_vip=${D ? 1 : 0},vip_type=${S}`},disk_type=${yield y(e.getTaskAttribute(c.DownloadKernel.TaskAttribute.SavePath))}`;
                let x = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskName), E = encodeURIComponent(x),
                    O = o.extname(x);
                "" !== (O = void 0 === O ? "" : O) && (O = O.substring(1)), f.ParseUrlFileNameNS.isUsualFileExtName(O) || (O = ""), T = `${T},filename=${E},filesize=${u},filesuffix=${O},libversion=${p.DownloadKernelManager.getDownloadSdkVersion()}`, void 0 !== i && (T = `${T},${i}`);
                let P = "core_event";
                g.information("trackEvent", P, t, T), a.XLStatNS.trackEvent(P, t, "", 0, 0, 0, 0, T)
            } while (0)
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(4), r = i(11), s = i(16), l = o.default.getLogger("magnet-listener"),
        d = r.DownloadKernelTaskManager.getTaskManager(), u = s.DownloadKernelEventManager.getEventManager();
    const c = new class {
        constructor() {
            this.listenerMap = {}
        }

        addRef(e, t) {
            this.listenerMap.hasOwnProperty(e) ? l.information("listener addRef") : (l.information("listener addRef not in map to attachTaskStatus"), this.attachTaskStatus(e));
            let i = this.listenerMap[e];
            i.callbacks.push(t), i.counter++
        }

        release(e) {
            do {
                if (!this.listenerMap.hasOwnProperty(e)) break;
                let t = this.listenerMap[e];
                t.counter--, 0 === t.counter ? (l.information("release listener to remove"), this.detachTaskStatus(t.cookie), t.cookie = -1, d.stopTask(e, a.DownloadKernel.TaskStopReason.Manual), d.deleteTask(e, !1).catch(), delete this.listenerMap[e]) : l.information("release listener remain", t.counter)
            } while (0)
        }

        fireAll(e, t, i) {
            do {
                if (!this.listenerMap.hasOwnProperty(e)) {
                    l.information("fire callback but maybe already release");
                    break
                }
                let n = this.listenerMap[e];
                if (0 === n.counter) break;
                for (let o of n.callbacks) o(e, t, i).catch(), this.release(e)
            } while (0)
        }

        attachTaskStatus(e) {
            let t = u.attachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, (...t) => n(this, void 0, void 0, function* () {
                do {
                    if (!t) break;
                    if (t[0] !== a.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!t[1]) break;
                    let i = t[1];
                    for (let t = 0; t < i.length; ++t) {
                        let n = i[t];
                        if (!n) continue;
                        let o = n.getTaskStatus(), r = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskType),
                            s = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                        l.information("magnet channelRMNewTaskDownloadTorrent taskStatus", o, s, e), r === a.DownloadKernel.TaskType.Magnet && s === e && (o === a.DownloadKernel.TaskStatus.Succeeded || o === a.DownloadKernel.TaskStatus.Seeding ? this.fireAll(s, !0) : o === a.DownloadKernel.TaskStatus.Failed && this.fireAll(s, !1, n.getTaskAttribute(a.DownloadKernel.TaskAttribute.ErrorCode)))
                    }
                } while (0)
            }));
            l.information("attachTaskEvent StatusChanged", t);
            let i = {cookie: t, counter: 0, callbacks: []};
            this.listenerMap[e] = i
        }

        detachTaskStatus(e) {
            l.information("detachTaskEvent StatusChanged", e), u.detachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, e)
        }
    };
    !function (e) {
        e.addRef = function (e, t) {
            return c.addRef(e, t)
        }, e.release = function (e) {
            return c.release(e)
        }
    }(t.MagnetListenerNS || (t.MagnetListenerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(7), r = i(0), s = i(19), l = i(35), d = i(4), u = i(31), c = i(68),
        h = r.default.getLogger("ThunderNewTask"), f = a.default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    let p = 5;
    !function (e) {
        let t;

        function a(e, t, i, n) {
            void 0 === i && (i = u.ThunderHelper.getTaskTypeFromUrl(e));
            let a = void 0, r = -1, s = "", l = "";
            do {
                if (i !== d.DownloadKernel.TaskType.Emule && i !== d.DownloadKernel.TaskType.P2sp) break;
                let u = c.ParseUrlFileNameNS.getNameFromUrl(e), h = o.extname(u);
                if ("" !== h && (s = h.substring(1)), i === d.DownloadKernel.TaskType.Emule) {
                    let t = c.ParseUrlFileNameNS.parseEd2kUrl(e);
                    r = t.fileSize, l = t.fileHash
                }
                a = {
                    url: e,
                    cookie: "",
                    referer: "",
                    fileName: u,
                    browser: "",
                    statClick: t = void 0 === t ? "" : t,
                    fileSize: r,
                    fileHash: l,
                    fileType: s,
                    birdkeyChars: n
                };
                break
            } while (0);
            return a
        }

        e.taskOptFileNameFixed = 2, function (e) {
            e.PreNewTask = "PreNewTaskCtrl", e.NewTask = "NewTaskCtrl", e.UrlFilter = "UrlFilterCtrl", e.Magnet = "BtCtrl"
        }(t = e.TaskCtrlType || (e.TaskCtrlType = {})), e.updateThreadCount = function (e) {
            do {
                if (isNaN(e)) break;
                if (e <= 0 || e > 10) break;
                p = e
            } while (0)
        }, e.contructTaskByUrl = function (e, t, i, n) {
            let o = a(e, t, i, n);
            h.verbose(e);
            let r = 5;
            return {
                taskType: i,
                data: o,
                setting: {
                    loginFtp: !1,
                    ftpInfo: {userName: "", password: ""},
                    onlyOrigin: !1,
                    thread: r = null !== o.thread && void 0 !== o.thread ? o.thread : p,
                    note: "",
                    openAfterDownload: !1
                },
                selected: !0
            }
        }, e.contructTaskByUrlData = function (e, t) {
            let i = void 0, n = u.ThunderHelper.getTaskTypeFromUrl(e.url);
            if (n === d.DownloadKernel.TaskType.Emule && (void 0 === e.fileHash || "" === e.fileHash)) {
                let t = c.ParseUrlFileNameNS.parseEd2kUrl(e.url);
                e.fileSize = t.fileSize, e.fileHash = t.fileHash
            }
            if (void 0 !== e.fileSize && null !== e.fileSize && 0 !== e.fileSize || (e.fileSize = -1), e.fileName || (e.fileName = c.ParseUrlFileNameNS.getNameFromUrl(e.url)), e.fileName = e.fileName.replace(/[*?/\\:|<>\"]/g, "_"), !e.fileType) {
                let t = o.extname(e.fileName);
                "" !== t && (e.fileType = t.substring(1))
            }
            if (void 0 === t || null === t) {
                let i = 5;
                t = {
                    loginFtp: !1,
                    ftpInfo: {userName: "", password: ""},
                    onlyOrigin: !1,
                    thread: i = null !== e.thread && void 0 !== e.thread ? e.thread : p,
                    note: "",
                    openAfterDownload: !1
                }
            }
            return i = {taskType: n, data: e, setting: t, selected: !0}
        }, e.getDesktopPath = function () {
            return f.getDesktopPath()
        }, e.getDocumentPath = function () {
            return f.getDocumentPath()
        }, e.queryFileExists = function (e) {
            return f.queryFileExists(e)
        }, e.isFilePathValid = function (e) {
            return f.isFilePathValid(e)
        }, e.getNewTaskDataByUrl = a, e.getDownloadResult = function (e, ...t) {
            return n(this, void 0, void 0, function* () {
                let i = {result: !1};
                return s.ipcRenderer.send(l.ThunderChannelList.channelRMNewTaskCreateNewTask, e, ...t), i = yield new Promise(e => {
                    s.ipcRenderer.once(l.ThunderChannelList.channelMRNewTaskCreateNewTaskResult, (t, i, n) => {
                        e({result: i, message: n})
                    })
                })
            })
        }, e.readThunderUnionConfig = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = null, n = null;
                try {
                    const n = yield i(18);
                    n.defaults.adapter = i(21), t = yield n.get(e)
                } catch (e) {
                    h.information(e)
                }
                return null !== t && void 0 !== t.status && 200 === t.status && void 0 !== t.data && null !== t.data && (n = t.data), n
            })
        }
    }(t.ThunderNewtaskHelperNS || (t.ThunderNewtaskHelperNS = {}))
}, function (e, t, i) {
    (function () {
        "use strict";
        var e, n, o, a, r = {}.hasOwnProperty;
        n = i(386), e = i(641), o = i(646), a = i(519), t.defaults = n.defaults, t.processors = a, t.ValidationError = function (e) {
            function t(e) {
                this.message = e
            }

            return function (e, t) {
                for (var i in t) r.call(t, i) && (e[i] = t[i]);

                function n() {
                    this.constructor = e
                }

                n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
            }(t, Error), t
        }(), t.Builder = e.Builder, t.Parser = o.Parser, t.parseString = o.parseString
    }).call(this)
}, function (e, t) {
    (function () {
        e.exports = function () {
            function e(e, t, i) {
                if (this.options = e.options, this.stringify = e.stringify, null == t) throw new Error("Missing attribute name of element " + e.name);
                if (null == i) throw new Error("Missing attribute value for attribute " + t + " of element " + e.name);
                this.name = this.stringify.attName(t), this.value = this.stringify.attValue(i)
            }

            return e.prototype.clone = function () {
                return Object.create(this)
            }, e.prototype.toString = function (e) {
                return this.options.writer.set(e).attribute(this)
            }, e
        }()
    }).call(this)
}, function (e, t) {
    (function () {
        var t = function (e, t) {
            return function () {
                return e.apply(t, arguments)
            }
        }, i = {}.hasOwnProperty;
        e.exports = function () {
            function e(e) {
                var n, o, a;
                for (n in this.assertLegalChar = t(this.assertLegalChar, this), e || (e = {}), this.noDoubleEncoding = e.noDoubleEncoding, o = e.stringify || {}) i.call(o, n) && (a = o[n], this[n] = a)
            }

            return e.prototype.eleName = function (e) {
                return e = "" + e || "", this.assertLegalChar(e)
            }, e.prototype.eleText = function (e) {
                return e = "" + e || "", this.assertLegalChar(this.elEscape(e))
            }, e.prototype.cdata = function (e) {
                return e = (e = "" + e || "").replace("]]>", "]]]]><![CDATA[>"), this.assertLegalChar(e)
            }, e.prototype.comment = function (e) {
                if ((e = "" + e || "").match(/--/)) throw new Error("Comment text cannot contain double-hypen: " + e);
                return this.assertLegalChar(e)
            }, e.prototype.raw = function (e) {
                return "" + e || ""
            }, e.prototype.attName = function (e) {
                return "" + e || ""
            }, e.prototype.attValue = function (e) {
                return e = "" + e || "", this.attEscape(e)
            }, e.prototype.insTarget = function (e) {
                return "" + e || ""
            }, e.prototype.insValue = function (e) {
                if ((e = "" + e || "").match(/\?>/)) throw new Error("Invalid processing instruction value: " + e);
                return e
            }, e.prototype.xmlVersion = function (e) {
                if (!(e = "" + e || "").match(/1\.[0-9]+/)) throw new Error("Invalid version number: " + e);
                return e
            }, e.prototype.xmlEncoding = function (e) {
                if (!(e = "" + e || "").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) throw new Error("Invalid encoding: " + e);
                return e
            }, e.prototype.xmlStandalone = function (e) {
                return e ? "yes" : "no"
            }, e.prototype.dtdPubID = function (e) {
                return "" + e || ""
            }, e.prototype.dtdSysID = function (e) {
                return "" + e || ""
            }, e.prototype.dtdElementValue = function (e) {
                return "" + e || ""
            }, e.prototype.dtdAttType = function (e) {
                return "" + e || ""
            }, e.prototype.dtdAttDefault = function (e) {
                return null != e ? "" + e || "" : e
            }, e.prototype.dtdEntityValue = function (e) {
                return "" + e || ""
            }, e.prototype.dtdNData = function (e) {
                return "" + e || ""
            }, e.prototype.convertAttKey = "@", e.prototype.convertPIKey = "?", e.prototype.convertTextKey = "#text", e.prototype.convertCDataKey = "#cdata", e.prototype.convertCommentKey = "#comment", e.prototype.convertRawKey = "#raw", e.prototype.assertLegalChar = function (e) {
                var t;
                if (t = e.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/)) throw new Error("Invalid character in string: " + e + " at index " + t.index);
                return e
            }, e.prototype.elEscape = function (e) {
                var t;
                return t = this.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g, e.replace(t, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\r/g, "&#xD;")
            }, e.prototype.attEscape = function (e) {
                var t;
                return t = this.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g, e.replace(t, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;").replace(/\t/g, "&#x9;").replace(/\n/g, "&#xA;").replace(/\r/g, "&#xD;")
            }, e
        }()
    }).call(this)
}, function (e, t) {
    (function () {
        var t = {}.hasOwnProperty;
        e.exports = function () {
            function e(e) {
                var i, n, o, a, r, s, l, d, u;
                for (i in e || (e = {}), this.pretty = e.pretty || !1, this.allowEmpty = null != (n = e.allowEmpty) && n, this.pretty ? (this.indent = null != (o = e.indent) ? o : "  ", this.newline = null != (a = e.newline) ? a : "\n", this.offset = null != (r = e.offset) ? r : 0, this.dontprettytextnodes = null != (s = e.dontprettytextnodes) ? s : 0) : (this.indent = "", this.newline = "", this.offset = 0, this.dontprettytextnodes = 0), this.spacebeforeslash = null != (l = e.spacebeforeslash) ? l : "", !0 === this.spacebeforeslash && (this.spacebeforeslash = " "), this.newlinedefault = this.newline, this.prettydefault = this.pretty, d = e.writer || {}) t.call(d, i) && (u = d[i], this[i] = u)
            }

            return e.prototype.set = function (e) {
                var i, n, o;
                for (i in e || (e = {}), "pretty" in e && (this.pretty = e.pretty), "allowEmpty" in e && (this.allowEmpty = e.allowEmpty), this.pretty ? (this.indent = "indent" in e ? e.indent : "  ", this.newline = "newline" in e ? e.newline : "\n", this.offset = "offset" in e ? e.offset : 0, this.dontprettytextnodes = "dontprettytextnodes" in e ? e.dontprettytextnodes : 0) : (this.indent = "", this.newline = "", this.offset = 0, this.dontprettytextnodes = 0), this.spacebeforeslash = "spacebeforeslash" in e ? e.spacebeforeslash : "", !0 === this.spacebeforeslash && (this.spacebeforeslash = " "), this.newlinedefault = this.newline, this.prettydefault = this.pretty, n = e.writer || {}) t.call(n, i) && (o = n[i], this[i] = o);
                return this
            }, e.prototype.space = function (e) {
                var t;
                return this.pretty && (t = (e || 0) + this.offset + 1) > 0 ? new Array(t).join(this.indent) : ""
            }, e
        }()
    }).call(this)
}, function (e, t) {
    (function () {
        "use strict";
        var e;
        e = new RegExp(/(?!xmlns)^.*:/), t.normalize = function (e) {
            return e.toLowerCase()
        }, t.firstCharLowerCase = function (e) {
            return e.charAt(0).toLowerCase() + e.slice(1)
        }, t.stripPrefix = function (t) {
            return t.replace(e, "")
        }, t.parseNumbers = function (e) {
            return isNaN(e) || (e = e % 1 == 0 ? parseInt(e, 10) : parseFloat(e)), e
        }, t.parseBooleans = function (e) {
            return /^(?:true|false)$/i.test(e) && (e = "true" === e.toLowerCase()), e
        }
    }).call(this)
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(28), a = i(388), r = i(36), s = i(27), l = i(4), d = i(16), u = i(11), c = i(13), h = i(30),
        f = i(3), p = n.default.getLogger("TaskDetail.TaskDetail"), g = a.TaskInfoManagerNS.getTaskInfoManager(),
        m = d.DownloadKernelEventManager.getEventManager(), v = u.DownloadKernelTaskManager.getTaskManager();
    var y;
    !function (e) {
        e.Comments = "comments", e.FileList = "files", e.Attribute = "detail"
    }(y = t.DetailIndex || (t.DetailIndex = {}));
    !function (e) {
        const t = new class {
            constructor() {
                this.isPageReady = !1, this.unFireTaskId = 0, this.unFireTaskData = "", this.unFireIndex = y.Comments, this.curTaskId = 0, this.curPannel = "", this.select = !1
            }

            init() {
                m.attachTaskEvent(l.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    this.updateTaskInfo(...e)
                }), m.attachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    this.updateTaskInfo(...e)
                }), m.attachTaskEvent(l.DownloadKernel.TaskEventType.ChannelInfoChanged, (...e) => {
                    this.updateTaskInfo(...e)
                }), m.attachTaskEvent(l.DownloadKernel.TaskEventType.TaskDescriptionChanged, (...e) => {
                    this.updateTaskInfo(...e)
                }), m.attachTaskEvent(l.DownloadKernel.TaskEventType.TaskRenamed, (...e) => {
                    this.updateTaskInfo(...e)
                }), m.attachTaskEvent(l.DownloadKernel.TaskEventType.TaskMovingStateChange, (...e) => {
                    this.updateTaskInfo(...e)
                }), m.attachTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileDetailChanged, (...e) => {
                    this.onBtSubFileDetailChanged(...e)
                }), m.attachTaskEvent(l.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, (...e) => {
                    this.onGroupTaskSubFileDetailChanged(...e)
                }), h.default.attachListener(c.NodeEventMesssageNS.eventDownloadItemActive, (e, t, i, n, o, a) => {
                    t ? (this.curTaskId = i, this.select = !0, this.onTaskSelectChanged(e, a)) : (o || i === this.curTaskId) && (this.curTaskId = 0, this.curPannel = "", this.select = !1, setTimeout(() => {
                        this.select || this.onTaskSelectChanged(e)
                    }, 100))
                }), h.default.attachListener(c.NodeEventMesssageNS.eventDetailSwitch2Index, (e, t) => {
                    this.switch2DetailIndex(e, t)
                });
                let e = [{functionName: "GetCurTask", nativeFunc: this.getCurTask.bind(this)}];
                r.NativeCallNS.registerNativeFunction(e)
            }

            pageReady() {
                this.isPageReady = !0, p.information("pageReady"), 0 !== this.unFireTaskId && (this.onCurTaskChange(this.unFireTaskId, this.unFireTaskData, this.unFireIndex), this.unFireTaskId = 0, this.unFireTaskData = "")
            }

            switch2DetailIndex(e, t) {
                this.isPageReady ? o.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnSwitchDetail", e, t) : this.unFireTaskId === e && (this.unFireIndex = t)
            }

            updateTaskInfo(...e) {
                do {
                    if (!e) break;
                    if (!e[1]) break;
                    let t = e[1];
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        let n = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                        n === this.curTaskId && (i.getTaskAttribute(l.DownloadKernel.TaskAttribute.GroupTaskId) > 0 || g.getTaskInfoString(n).then(e => {
                            this.onTaskInfoChange(n, e)
                        }).catch())
                    }
                } while (0)
            }

            onBtSubFileDetailChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.BtSubFileDetailChanged) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1];
                    if (t !== this.curTaskId) break;
                    let i = e[2], n = g.getBtSubFileListString(t, i);
                    this.onSubFileInfoChange(t, n)
                } while (0)
            }

            onGroupTaskSubFileDetailChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged) break;
                    if (!e[1]) break;
                    e[1].forEach((e, t) => {
                        if (t === this.curTaskId) {
                            let i = g.getGroupTaskSubFileListString(e);
                            this.onSubFileInfoChange(t, i)
                        }
                    })
                } while (0)
            }

            onTaskSelectChanged(e, t) {
                let i = "";
                switch (e) {
                    case l.DownloadKernel.CategroyViewID.Downloading:
                        i = "downloading";
                        break;
                    case l.DownloadKernel.CategroyViewID.Completed:
                        i = "complete";
                        break;
                    case l.DownloadKernel.CategroyViewID.Recycle:
                        i = "trash"
                }
                this.curPannel = i;
                let n = {};
                n.pannel = i;
                let o = JSON.stringify(n);
                this.onCurTaskChange(this.curTaskId, o, t);
                let a = this.curTaskId;
                do {
                    let e = v.getTaskFromTaskId(this.curTaskId);
                    if (!e) break;
                    if (e.getType() !== l.DownloadKernel.TaskType.Bt) break;
                    let i = e.getExtraObject();
                    if (!i) break;
                    if (i.isBtFileLoadEnd()) break;
                    e.loadStorageBtTaskAW(e.getTaskBaseInfo()).then(() => {
                        a === this.curTaskId && this.onCurTaskChange(this.curTaskId, o, t)
                    }).catch()
                } while (0)
            }

            onCurTaskChange(e, t, i) {
                o.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnCurTaskChange", e, t, i), f.client.callServerFunction("SelectTaskChange", e.toString()).catch(), this.isPageReady ? p.information("OnCurTaskChange", e, t, i) : (this.unFireTaskId = e, this.unFireTaskData = t, this.unFireIndex = i)
            }

            onTaskInfoChange(e, t) {
                o.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskInfoChange", e, t)
            }

            onSubFileInfoChange(e, t) {
                o.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnSubFileInfoChange", e, t)
            }

            getCurTask(e, t, i) {
                do {
                    if (!e || !t || !i) break;
                    let n = {};
                    n.taskID = this.curTaskId, n.pannel = this.curPannel;
                    let o = JSON.stringify(n);
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, o)
                } while (0)
            }
        };
        e.init = function () {
            t.init()
        }, e.pageReady = function () {
            t.pageReady()
        }
    }(t.TaskDetailNS || (t.TaskDetailNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(7), r = i(0), s = a.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        l = r.default.getLogger("diskimage-helper");
    !function (e) {
        e.attachVirtualDisk = function (e) {
            return n(this, void 0, void 0, function* () {
                return l.information("attachVirtualDisk imagePath:", e), new Promise(t => {
                    s.attachVirtualDisk(e, i => {
                        l.information("attachVirtualDisk imagePath:", e, "physicalPath:", i), t(i)
                    })
                })
            })
        }, e.detachVirtualDisk = function (e) {
            return n(this, void 0, void 0, function* () {
                return l.information("detachVirtualDisk imagePath:", e), new Promise(t => {
                    s.detachVirtualDisk(e, i => {
                        l.information("detachVirtualDisk imagePath:", e, "ret:", i), t(0 === i)
                    })
                })
            })
        }, e.getVirtualDiskPhysicalPath = function (e) {
            return n(this, void 0, void 0, function* () {
                return l.information("getVirtualDiskPhysicalPath imagePath:", e), new Promise(t => {
                    s.getVirtualDiskPhysicalPath(e, i => {
                        l.information("getVirtualDiskPhysicalPath imagePath:", e, "physicalPath:", i), t(i)
                    })
                })
            })
        }
    }(t.DiskImageHelperNS || (t.DiskImageHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(2), r = i(62), s = i(0), l = i(31), d = s.default.getLogger("run-prompt"),
        u = "https://static-xl.a.88cdn.com/json/thunder11_executable.json";
    let c = new class {
        constructor() {
            this.verifyItems = [], this.inited = !1, this.configReadyCallback = []
        }

        init() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (this.inited) break;
                    yield this.update(), this.inited = !0;
                    for (let e of this.configReadyCallback) e();
                    this.configReadyCallback = [], setInterval(() => n(this, void 0, void 0, function* () {
                        yield this.update()
                    }), 108e5)
                } while (0)
            })
        }

        readyAw() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (this.inited) break;
                    return new Promise(e => n(this, void 0, void 0, function* () {
                        this.configReadyCallback.push(() => {
                            e()
                        })
                    }))
                } while (0)
            })
        }

        hit(e) {
            let t = void 0;
            for (let i of this.verifyItems) if (t = this.isMatch(i, e)) {
                t.content = i.content;
                break
            }
            return t
        }

        update() {
            return n(this, void 0, void 0, function* () {
                do {
                    o.default.defaults.adapter = i(21);
                    let e = new r.Agent({rejectUnauthorized: !1}), t = null;
                    try {
                        t = yield o.default.get(u, {timeout: 1e4, httpsAgent: e})
                    } catch (e) {
                        d.information("get error", e)
                    }
                    if (d.information("get ok", t), !t) break;
                    if (200 !== t.status || !t.data) break;
                    this.verifyItems = t.data
                } while (0)
            })
        }

        isMatch(e, t) {
            let i = void 0;
            do {
                if (!e) break;
                let n = e.factor;
                if (!n) break;
                let o = !1;
                if (n.gcid && n.gcid.length > 0) for (let e of n.gcid) if (e && t.gcid.toLowerCase() === e.toLowerCase()) {
                    o = !0;
                    break
                }
                let r = t.savePath, s = t.taskName, d = a.join(r, s),
                    u = (l.ThunderHelper.getVersionBlockString(d, "ProductName") || "").toLowerCase(),
                    c = (l.ThunderHelper.getOwnerName(d) || "").toLowerCase();
                if (o) {
                    i = {size: t.downloadSize, name: t.taskName, signature: c, gcid: t.gcid, productName: u};
                    break
                }
                if (n.size && n.size > 0 && t.fileSize > 1024 * n.size) break;
                if (n.name && n.name.length > 0) {
                    let e = !1;
                    for (let i of n.name) if (i && -1 !== t.taskName.indexOf(i)) {
                        e = !0;
                        break
                    }
                    if (!e) break
                }
                if (n.productName && n.productName.length > 0) {
                    if (!u) break;
                    let e = !1;
                    for (let t of n.productName) if (t && -1 !== u.indexOf(t.toLowerCase())) {
                        e = !0;
                        break
                    }
                    if (!e) break
                }
                if (n.signature && n.signature.length > 0) {
                    if (!c) break;
                    let e = !1;
                    for (let t of n.signature) if (t && -1 !== c.indexOf(t.toLowerCase())) {
                        e = !0;
                        break
                    }
                    if (!e) break
                }
                i = {size: t.downloadSize, name: t.taskName, signature: c, gcid: t.gcid, productName: u}
            } while (0);
            return i
        }
    };
    t.exeVerify = c
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(5), a = i(3), r = i(0), s = i(58), l = i(15), d = i(8), u = i(49), c = i(22), h = i(38),
        f = r.default.getLogger("ThunderUnionYunFetchBackNS");
    !function (e) {
        function t(e) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                try {
                    t = JSON.parse(e)
                } catch (t) {
                    f.warning("JSON.parse exception!", t, e)
                }
                o.isObject(t) ? yield function (e) {
                    return n(this, void 0, void 0, function* () {
                        do {
                            yield r();
                            let t = yield s.default(!1, !0, "yunfetchback");
                            if (!t) {
                                f.warning("shouldLogin failed!", e);
                                break
                            }
                            if (!e.fromShare && e.userId !== t) {
                                let i = "你当前帐号和网页云盘帐号不一致，需要切换相同帐号后，才可创建下载。", n = yield c.MessageBox.confirm({
                                    title: "下载提示",
                                    content: i,
                                    type: c.MessageBox.ConfirmType.Info,
                                    checkboxEnabled: !1,
                                    cancelVisible: !0,
                                    cancelText: "取消下载",
                                    okText: "切换帐号"
                                });
                                if (n.action !== h.MessageBoxNS.Action.OK) break;
                                if (f.information("userid not equal, SwitchAccount. ", e, t), a.client.callServerFunction("SwitchAccount").catch(), !(t = yield s.default(!1, !0, "yunfetchback"))) {
                                    f.warning("SwitchAccount shouldLogin failed!", e);
                                    break
                                }
                                if (e.userId !== t) {
                                    f.warning("SwitchAccount userId illegal!", e, t);
                                    break
                                }
                            }
                            if (l.server.isRemoteClientExist("ThunderPanPluginWebview")) yield a.client.callServerFunction("BringMainWndToTop"), yield a.client.callServerFunction("SelectNav", u.NavViewID.Download), yield l.server.callClientFunctionByName("ThunderPanPluginWebview", "ExternalFetchBack", e); else {
                                f.information("ThunderPanPluginWebview not exist! wait for ready.");
                                let t = a.client.attachServerEvent("ThunderPanPluginReady", () => n(this, void 0, void 0, function* () {
                                    f.information("ThunderPanPluginReady"), a.client.detachServerEvent("ThunderPanPluginReady", t), yield a.client.callServerFunction("BringMainWndToTop"), yield a.client.callServerFunction("SelectNav", u.NavViewID.Download), yield l.server.callClientFunctionByName("ThunderPanPluginWebview", "ExternalFetchBack", e)
                                }))
                            }
                        } while (0)
                    })
                }(t) : f.warning("invalid fetch back data!", t)
            })
        }

        function i(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!e || !(yield d.FileSystemAWNS.existsAW(e))) break;
                    let i = yield d.FileSystemAWNS.readFileAW(e);
                    if (yield d.FileSystemAWNS.unlinkAW(e), null === i || void 0 === i || "" === i.toString()) {
                        f.information("parseUnionFileAndCreateTasks:读取内容 buf为null");
                        break
                    }
                    let n = i.toString();
                    if (n.length <= 2) {
                        f.information("strContent.length <= 2", n);
                        break
                    }
                    yield t(n)
                } while (0)
            })
        }

        function r() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => n(this, void 0, void 0, function* () {
                    if (l.server.isRemoteClientExist("User")) e(!0); else {
                        let t = 0, i = setInterval(() => {
                            l.server.isRemoteClientExist("User") && (clearInterval(i), e(!0)), (t += 500) > 3e3 && (clearInterval(i), e(!1))
                        }, 500)
                    }
                }))
            })
        }

        e.createYunFetchBackTask = function (e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (f.information("createYunFetchBackTask", e), !e) break;
                    let t = e.indexOf("unionfile:");
                    t > -1 && (e = e.substring(t + 10)), yield i(decodeURIComponent(e))
                } while (0)
            })
        }, e.createTaskFromJsonString = t
    }(t.ThunderUnionYunFetchBackNS || (t.ThunderUnionYunFetchBackNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(112), r = i(10), s = i(0), l = i(17), d = i(23), u = i(9), c = i(395), h = i(13), f = i(25),
        p = i(18), g = i(658).UserHelperNS.getUserHelper(), m = s.default.getLogger("Sign"),
        v = "http://pc.xunlei.com/pages/#/sign";
    t.signObject = new class {
        constructor() {
            this.embeddedBrowserObj = null, this.title = "", this.url = v, this.width = 400, this.height = 460, this.curPopupType = "", this.lefttMargin = 0, this.rigthMargin = 0, this.topMargin = 30, this.bootomMargin = 0, this.canAutoShow = !0, this.embeddedBrowserObj = new a.EmbeddedBrowser, this.attachListener().catch()
        }

        enableAutoShow(e) {
            this.canAutoShow = e
        }

        createSignDlg(e, t) {
            return n(this, void 0, void 0, function* () {
                do {
                    if ("auto" === e && !this.canAutoShow) {
                        m.information("自动弹出已被阻止");
                        break
                    }
                    if ("auto" === e && !1 === this.isPopup()) {
                        m.information("不满足auto弹出条件");
                        break
                    }
                    let i = yield c.CommonSignFunctionNs.isAlreadySign();
                    if ("auto" === e && i) {
                        m.information("用户已经答过");
                        break
                    }
                    if (yield this.isAlreadyShowTips()) {
                        m.information("createSignDlg 正在显示tips");
                        break
                    }
                    if (!1 === (yield c.CommonSignFunctionNs.isHaveSignQuestion())) {
                        m.information("不存在答题");
                        break
                    }
                    this.curPopupType = e;
                    let n = yield o.asyncRemoteCall.getCurrentWindow();
                    if ((yield n.isMinimized()) || !1 === (yield n.isVisible())) {
                        m.information("窗口最小化或者不可见");
                        break
                    }
                    this.setDefaultValue();
                    let a = f.default.getConfigInfo("activity", "enable_sign");
                    if (null !== a && void 0 !== a && 1 === a) {
                        let e = f.default.getConfigInfo("activity", "actid");
                        if (null !== e && void 0 !== e && "" !== e) {
                            let t = yield c.CommonSignFunctionNs.actSwitch(e);
                            t.actSwitch && null !== t.width && void 0 !== t.width && null !== t.height && void 0 !== t.height && (this.width = t.width, this.height = t.height, this.url = `${this.url}?actid=${e}`)
                        }
                    }
                    "auto" === e ? (this.embeddedBrowserObj.setAutoShow(!1), this.url = `${this.url}?readyshow=1`) : (this.embeddedBrowserObj.setAutoShow(!0), this.url = `${this.url}?readyshow=0`), yield this.checkReadPack(), yield this.embeddedBrowserObj.createWnd(this.url, this.title, !1, "sign", this.width, this.height, this.lefttMargin, this.rigthMargin, this.topMargin, this.bootomMargin, t, this.onWndShowResult.bind(this))
                } while (0)
            })
        }

        onWndShowResult() {
            return n(this, void 0, void 0, function* () {
                let e = !0;
                return (yield this.isAlreadyShowTips()) ? (m.information("onWndShowResult 正在显示tips"), e = !1) : (this.writeConfig(), this.statSign("sign_popup_show").catch()), e
            })
        }

        closeDialog() {
            this.embeddedBrowserObj.closeWnd().catch()
        }

        show() {
            return n(this, void 0, void 0, function* () {
                do {
                    let e = yield o.asyncRemoteCall.getCurrentWindow();
                    if ((yield e.isMinimized()) || !1 === (yield e.isVisible())) {
                        m.information("窗口最小化或者不可见");
                        break
                    }
                    if (yield this.isAlreadyShowTips()) {
                        m.information("onWndShowResult 正在显示tips");
                        break
                    }
                    this.embeddedBrowserObj.showWnd().catch()
                } while (0)
            })
        }

        getWnd() {
            return this.embeddedBrowserObj.getWnd()
        }

        attachListener() {
            return n(this, void 0, void 0, function* () {
                l.NativeCallModule.nativeCall.AttachNativeEvent("showTipsWnd", () => {
                    m.information("showTipsWnd:"), this.embeddedBrowserObj.closeWnd().catch()
                }), (yield o.asyncRemoteCall.getIpcMain()).on(h.NodeEventMesssageNS.eventEmbeddedBrowserWndClick, (e, t, i) => {
                    if ("sign" === t) {
                        let e = "";
                        "btn_close" === i ? e = "sign_close" : "sign_nopop" === i && (e = "sign_nopop"), this.statSign("sign_detail_click", e).catch()
                    }
                })
            })
        }

        isAlreadyShowTips() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    l.NativeCallModule.nativeCall.CallNativeFunction("IsTipsWndShow", t => {
                        m.information("isAlreadyShowTips:", t), e(t)
                    })
                })
            })
        }

        setDefaultValue() {
            this.url = v;
            let e = r.ConfigNS.getValue("sign", "testUrl", "");
            e && "" !== e && (this.url = e), this.width = 400, this.height = 460
        }

        writeConfig() {
            if ("auto" === this.curPopupType) {
                let e = this.getCurDate();
                r.ConfigNS.setValue("ConfigPopUpPanel", "ShowDate", e)
            }
        }

        getCurDate() {
            let e = "", t = new Date;
            return e = `${t.getFullYear()}${t.getMonth() + 1}${t.getDate()}`
        }

        isPopup() {
            let e = !0;
            do {
                let t = this.getCurDate(), i = r.ConfigNS.getValue("ConfigPopUpPanel", "ShowDate", "");
                if (t === i) {
                    m.information("ShowDate:", i, "curDate:", t), e = !1;
                    break
                }
                let n = r.ConfigNS.getValue("ConfigPopUpPanel", "StartCount", 0),
                    o = r.ConfigNS.getValue("ConfigPopUpPanel", "ShowTime", 0),
                    a = Math.round((new Date).getTime() / 1e3);
                m.information("isPopup:", n, o, a), e = !(0 !== n && (1 === n ? a - o <= 604800 : 2 === n ? a - o <= 2592e3 : 3 !== n || a - o <= 7776e3))
            } while (0);
            return e
        }

        statSign(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = "";
                if (yield d.LoginHelperNS.loginHelper.isLoginedAw()) {
                    i = "is_login=1";
                    let e = 0;
                    "0" !== (yield d.LoginHelperNS.loginHelper.getUserInfoByKeyAw("isVip", "vip_xl")) && (e = 1), i = `${i},is_vip=${e}`
                } else i = "is_login=0";
                "sign_detail_click" === e && (i = `${i},button=${t}`), m.information("statSign:", e, i), u.XLStatNS.trackEvent("business", e, "", 0, 0, 0, 0, i)
            })
        }

        checkReadPack() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    let t = "https://msg-vip-ssl.xunlei.com/xlact/conf?actid=vip2020redpack&client=xunlei_xds&source=guess_movie";
                    yield g.parseUserInfo(), t += "&userid=" + g.userId, t += "&sessionid=" + (yield g.getSessionId());
                    let n = null;
                    try {
                        p.default.defaults.adapter = i(21), n = yield p.default.get(t, {timeout: 5e3})
                    } catch (e) {
                        m.information(e);
                        break
                    }
                    if (null !== n && void 0 !== n.status && 200 === n.status && void 0 !== n.data && null !== n.data && "" !== n.data) {
                        let t = n.data;
                        0 === t.result && t.data && t.data.valid && (this.width = Number(t.data.width), this.height = Number(t.data.height) + this.topMargin, this.url += "&redpack=" + encodeURIComponent(JSON.stringify(t.data)), e = !0)
                    }
                } while (0);
                return e || (this.url += "&redpack=" + encodeURI(JSON.stringify({valid: !1}))), e
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(104), a = i(128), r = i(25), s = i(5), l = i(27), d = i(9), u = i(50),
        c = i(0).default.getLogger("Thunder.BrowserControl"), h = [".xunlei.com", "h5-pccloud.onethingpcs.com"];

    class f {
        constructor() {
            this.privateNativeFunctionMap = [], this.limitNative = !1, this.accessibilityNatives = [], this.state = "loading"
        }

        setNativeOptions(e) {
            e && e.limit && (this.limitNative = !0, this.accessibilityNatives = e.methods || [])
        }

        trackBrowserEvent(e, t, i = "") {
            do {
                if (!t || "" === t) break;
                let n = u.parse(t);
                if (n.host && n.host.indexOf(".xunlei.com") < 0) break;
                i = i + (i.length > 0 ? "," : "") + "url=" + encodeURIComponent(t), d.XLStatNS.trackEvent("new_tab", e, "", 0, 0, 0, 0, i)
            } while (0)
        }

        createChromiumBrowser(e, t, i, r, l) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (c.information("[tbc] createChromiumBrowser", t), s.isNullOrUndefined(e) || s.isNullOrUndefined(t) || s.isNullOrUndefined(i) || s.isNullOrUndefined(r)) break;
                    a.BrowserSupportNS.browserIsInitFinish() || (this.trackBrowserEvent("browser_load_init", t), yield a.BrowserSupportNS.initTBC()), this.trackBrowserEvent("browser_load_create", t);
                    let n = new o.Browser;
                    if (n.init({rect: r, parent_window: e, is_popup: i, url: t, visible: !1}), n) {
                        this.browser = n, null !== l && void 0 !== l && l.length > 0 && this.attachListeners(l);
                        let e = {
                            eventName: "call-native-func", listener: (e, i, n, o) => {
                                let a = o && o.length > 0 ? o[0] : void 0;
                                o = o && o.length > 0 ? o.slice(1) : o, this.onJsCallNativeFunction(0, i, n, o, t, a)
                            }
                        };
                        this.attachListener(e), this.browser.on("init-done", () => {
                            c.information("[tbc] init-done", t)
                        }), this.browser.on("before-nav", (e, t, i, n) => {
                            t && (c.information("[tbc] before-nav", i), this.trackBrowserEvent("browser_load_before_navigation", i))
                        }), this.browser.on("load-start", (e, t, i, n) => {
                            t && (c.information("[tbc] load-start", i), this.state = "loading", this.trackBrowserEvent("browser_load_navigation_start", i))
                        }), this.browser.on("load-end", (e, t, i, n, o) => {
                            t && "error" !== this.state && (this.state = "loaded", this.trackBrowserEvent("browser_load_navigation_result", i, "result=success"))
                        }), this.browser.on("load-error", (e, t, i, n, o, a) => {
                            !0 === t && (-105 !== n && -21 !== n && -106 !== n && -118 !== n && -7 !== n && -101 !== n || (this.state = "error", this.trackBrowserEvent("browser_load_navigation_result", i, "result=fail")))
                        })
                    }
                } while (0);
                return c.information("[tbc] createChromiumBrowser end", t), null
            })
        }

        showDevTool(e) {
            do {
                if (s.isNullOrUndefined(this.browser)) break;
                if (s.isNullOrUndefined(e)) break;
                this.browser.showDevTool(e)
            } while (0);
            return !1
        }

        navigate(e) {
            let t = !1;
            do {
                if (s.isNullOrUndefined(this.browser)) break;
                this.browser.navigate(e, "", "", !1), t = !0
            } while (0);
            return t
        }

        refresh(e) {
            do {
                if (s.isNullOrUndefined(this.browser)) break;
                if (s.isNullOrUndefined(e)) break;
                this.state = "loading", this.browser.refresh()
            } while (0);
            return !1
        }

        stop() {
            do {
                if (s.isNullOrUndefined(this.browser)) break;
                this.browser.stop()
            } while (0);
            return !1
        }

        destroyBrowser(e) {
            do {
                if (s.isNullOrUndefined(this.browser)) break;
                if (s.isNullOrUndefined(e)) break;
                c.information("[tbc]destroyBrowser"), this.browser.destroy(e), this.browser.removeAllListeners()
            } while (0);
            return !1
        }

        attachListener(e) {
            do {
                if (s.isNullOrUndefined(this.browser)) break;
                if (s.isNullOrUndefined(e) || s.isNullOrUndefined(e.eventName) || s.isNullOrUndefined(e.listener)) break;
                this.browser.addListener(e.eventName, e.listener)
            } while (0)
        }

        detachListener(e) {
            let t = !1;
            do {
                if (s.isNullOrUndefined(e)) break;
                if (s.isNullOrUndefined(e.eventName) || "" === e.eventName) break;
                if (s.isNullOrUndefined(this.browser)) break;
                this.browser.removeListener(e.eventName, e.listener), t = !0
            } while (0);
            return t
        }

        getBrowser() {
            return this.browser
        }

        getState() {
            return this.state
        }

        attachListeners(e) {
            do {
                if (s.isNullOrUndefined(this.browser)) break;
                for (let t of e) s.isNullOrUndefined(t) || s.isNullOrUndefined(t.eventName) || s.isNullOrUndefined(t.listener) || this.browser.addListener(t.eventName, t.listener)
            } while (0)
        }

        registerNativeFunction(e, t, i) {
            let n = !1;
            do {
                if (s.isNullOrUndefined(e) || "" === e) break;
                if (s.isNullOrUndefined(t)) break;
                if (!0 === i) {
                    if (s.isNullOrUndefined(this.privateNativeFunctionMap)) break;
                    let i = this.privateNativeFunctionMap.filter(t => e === t.functionName);
                    if (s.isNullOrUndefined(i) || i.length <= 0) {
                        let i = {functionName: e, nativeFunc: t};
                        this.privateNativeFunctionMap.push(i), n = !0
                    }
                } else {
                    if (s.isNullOrUndefined(f.nativeFunctionMap)) break;
                    let i = f.nativeFunctionMap.filter(t => e === t.functionName);
                    if (s.isNullOrUndefined(i) || i.length <= 0) {
                        let i = {functionName: e, nativeFunc: t};
                        f.nativeFunctionMap.push(i), n = !0
                    }
                }
            } while (0);
            return n
        }

        unregisterNativeFunction(e, t) {
            let i = !1;
            do {
                if (s.isNullOrUndefined(e) || "" === e) break;
                if (!0 === t) {
                    if (s.isNullOrUndefined(this.privateNativeFunctionMap)) break;
                    for (let t in this.privateNativeFunctionMap) if (this.privateNativeFunctionMap[Number(t)].functionName === e) {
                        this.privateNativeFunctionMap.splice(Number(t), 1), i = !0;
                        break
                    }
                } else {
                    if (s.isNullOrUndefined(f.nativeFunctionMap)) break;
                    for (let t in f.nativeFunctionMap) if (f.nativeFunctionMap[Number(t)].functionName === e) {
                        f.nativeFunctionMap.splice(Number(t), 1), i = !0;
                        break
                    }
                }
            } while (0);
            return i
        }

        callNativeFunctionCallback(e, t, ...i) {
            let n = !1;
            do {
                if (s.isNullOrUndefined(t)) break;
                if (s.isNullOrUndefined(this.browser)) break;
                this.browser.callJsFunctionById(t, ...i), n = !0
            } while (0);
            return n
        }

        callJSFunction(e, t, ...i) {
            let n = !1;
            do {
                if (s.isNullOrUndefined(t) || "" === t) break;
                if (s.isNullOrUndefined(this.browser)) break;
                this.browser.callJsFunctionByName(t, ...i), n = !0
            } while (0);
            return n
        }

        fireEvent(e, ...t) {
            let i = !1;
            do {
                if (s.isNullOrUndefined(e) || "" === e) break;
                if (s.isNullOrUndefined(this.browser)) break;
                this.browser.fireEvent(e, ...t), i = !0
            } while (0);
            return i
        }

        onJsCallNativeFunction(e, t, i, n, o, a) {
            let d = !1;
            do {
                if (s.isNullOrUndefined(e), s.isNullOrUndefined(t) || "" === t) break;
                if (s.isNullOrUndefined(f.nativeFunctionMap)) break;
                let u = r.default.getConfigInfo("nativeFunc", "domains") || h;
                if (!this.isUrlInDomains(o, u, a) && !s.isNullOrUndefined(this.browser)) {
                    this.browser.callJsFunctionById(i, l.NativeFunctionErrorCode.NotAllowed);
                    break
                }
                let c = f.nativeFunctionMap.filter(e => t === e.functionName);
                (s.isNullOrUndefined(c) || 0 === c.length || s.isNullOrUndefined(c[0].nativeFunc)) && (c = this.privateNativeFunctionMap.filter(e => t === e.functionName));
                let p = void 0, g = l.NativeFunctionErrorCode.Success;
                if (s.isNullOrUndefined(c) || 0 === c.length || s.isNullOrUndefined(c[0].nativeFunc)) {
                    if (g = l.NativeFunctionErrorCode.FunctionUnExist, s.isNullOrUndefined(i)) {
                        d = !0;
                        break
                    }
                    if (s.isNullOrUndefined(this.browser)) break;
                    this.browser.callJsFunctionById(i, g, p)
                } else this.limitNative && -1 === this.accessibilityNatives.indexOf(t) ? (g = l.NativeFunctionErrorCode.NotAllowed, this.browser.callJsFunctionById(i, g, p)) : c[0].nativeFunc(this, e, i, n)
            } while (0);
            return d
        }

        onJsCheckNativeFunction(e, t, i) {
            do {
                if (s.isNullOrUndefined(e), s.isNullOrUndefined(i)) break;
                if (s.isNullOrUndefined(t) || "" === t) break;
                if (s.isNullOrUndefined(f.nativeFunctionMap)) break;
                let n = f.nativeFunctionMap.filter(e => t === e.functionName), o = l.NativeFunctionErrorCode.Success;
                if ((s.isNullOrUndefined(n) || s.isNullOrUndefined(n[0]) || s.isNullOrUndefined(n[0].nativeFunc)) && (o = l.NativeFunctionErrorCode.FunctionUnExist), s.isNullOrUndefined(this.browser)) break;
                this.browser.callJsFunctionById(i, o)
            } while (0);
            return !1
        }

        static registerDefaultNativeFunction(e) {
            do {
                if (null === e || void 0 === e || e.length <= 0) break;
                for (let t = 0; t < e.length; ++t) {
                    let i = e[t].functionName, n = e[t].nativeFunc;
                    if (s.isNullOrUndefined(f.nativeFunctionMap)) break;
                    let o = f.nativeFunctionMap.filter(e => i === e.functionName);
                    if (s.isNullOrUndefined(o) || o.length <= 0) {
                        let e = {functionName: i, nativeFunc: n};
                        f.nativeFunctionMap.push(e)
                    }
                }
            } while (0)
        }

        isUrlInDomains(e, t, i) {
            let n = !1;
            for (let o = 0; o < t.length; ++o) if (e.includes(t[o]) || i && i.includes(t[o])) {
                n = !0;
                break
            }
            return n
        }
    }

    f.nativeFunctionMap = [], t.BrowserCtrl = f
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(112), a = i(17), r = i(661), s = i(10), l = i(25), d = i(9), u = i(2), c = i(7), h = i(29), f = i(0),
        p = i(5), g = f.default.getLogger("News-Popup"), m = c.default(u.join(__rootDir, "../bin/ThunderHelper.node")),
        v = "http://pc.xunlei.com/pages/#/news", y = 710, T = 612;
    t.newsPopupObject = new class {
        constructor() {
            this.embeddedBrowserObj = null, this.title = "迅雷，发现好电影", this.url = v, this.width = y, this.height = T, this.lefttMargin = 0, this.rigthMargin = 0, this.topMargin = 30, this.bootomMargin = 0, this.idIndex = 1, this.adMap = new Map, this.startMoveMousePos = {
                x: 0,
                y: 0
            }, this.startMoveWindowPos = {x: 0, y: 0}, this.embeddedBrowserObj = new o.EmbeddedBrowser
        }

        createNewsPopupDlg(e, t) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (0 === l.default.getConfigInfo("newspopup", "enable")) break;
                    if (g.information("createNewsPopupDlg popupType:", e), !this.isPopup() && "auto" === e) {
                        g.information("this.isPopup() false!"), d.XLStatNS.trackEvent("setting_center", "popup_intercept");
                        break
                    }
                    this.setDefaultValue(), this.embeddedBrowserObj.setWindowTopLevel(!0), "hover" === e ? this.embeddedBrowserObj.setAutoShow(!0) : this.embeddedBrowserObj.setAutoShow(!1), yield this.embeddedBrowserObj.createWnd(this.url, this.title, !1, "news-popup", this.width, this.height, this.lefttMargin, this.rigthMargin, this.topMargin, this.bootomMargin, t, this.onWndShowResult.bind(this), null), yield this.embeddedBrowserObj.setMinimizable(!0)
                } while (0)
            })
        }

        onWndShowResult() {
            return n(this, void 0, void 0, function* () {
                let e = !0;
                if (this.writeConfig(), yield this.isAlreadyShowTips()) g.information("onWndShowResult 正在显示tips"), e = !1; else {
                    let e = this.embeddedBrowserObj.getWnd();
                    p.isNullOrUndefined(e) || (yield h.ToolsUtilitiesAWNS.setForegroundWindow(m, e))
                }
                return e
            })
        }

        getWnd() {
            return this.embeddedBrowserObj.getWnd()
        }

        writeConfig() {
            let e = this.getCurDate();
            s.ConfigNS.setValue("ConfigNewsPopUp", "NewsShowDate", e)
        }

        getCurDate() {
            let e = "", t = new Date;
            return e = `${t.getFullYear()}${t.getMonth() + 1}${t.getDate()}`
        }

        close() {
            this.embeddedBrowserObj.closeWnd().catch()
        }

        setStartMoveMousePos(e, t) {
            return n(this, void 0, void 0, function* () {
                this.startMoveMousePos.x = e, this.startMoveMousePos.y = t;
                let i = yield this.embeddedBrowserObj.getWndPosition();
                this.startMoveWindowPos.x = i[0], this.startMoveWindowPos.y = i[1]
            })
        }

        setMoveMousePos(e, t) {
            this.embeddedBrowserObj.setWndPosition(e - this.startMoveMousePos.x + this.startMoveWindowPos.x, t - this.startMoveMousePos.y + this.startMoveWindowPos.y).catch()
        }

        minimize() {
            this.embeddedBrowserObj.minimizeWnd().catch()
        }

        setSize(e, t) {
            e && t && (this.width = e, this.height = t), this.embeddedBrowserObj.setWndSize(this.width, this.height).catch()
        }

        getSize() {
            return [this.width, this.height]
        }

        show() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (yield this.isAlreadyShowTips()) {
                        g.information("onWndShowResult 正在显示tips");
                        break
                    }
                    window.localStorage.setItem("NewsShowDate", this.getCurDate()), this.embeddedBrowserObj.showWnd().catch()
                } while (0)
            })
        }

        center() {
            this.embeddedBrowserObj.centerWnd().catch()
        }

        createAd(e) {
            let t = this.idIndex++, i = new r.NewsAdContainer(t);
            return this.adMap.set(t, i), g.information("createAd adType:", e, ", id:", t), t
        }

        showAd(e, t, i, n, o) {
            g.information("showAd x:", t, ", y:", i, ", width:", n, ", height:", o);
            let a = this.adMap.get(e);
            a && (a.move(t, i, n, o), a.show())
        }

        hideAd(e) {
            g.information("hideAd id:", e);
            let t = this.adMap.get(e);
            t && t.hide()
        }

        closeAd(e) {
            g.information("closeAd id:", e);
            let t = this.adMap.get(e);
            t && t.close()
        }

        isAlreadyShowTips() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    a.NativeCallModule.nativeCall.CallNativeFunction("IsTipsWndShow", t => {
                        g.information("isAlreadyShowTips:", t), e(t)
                    })
                })
            })
        }

        setDefaultValue() {
            this.url = v, this.width = y, this.height = T
        }

        isPopup() {
            let e = !0;
            do {
                if (m.IsInFullScreen()) {
                    e = !1;
                    break
                }
                let t = s.ConfigNS.getValue("ConfigMsg", "ConfigMsg_TodayRecommend", !0);
                if (g.information("todayRecommendEnable:", t), !t) {
                    e = !1;
                    break
                }
                let i = this.getCurDate(), n = s.ConfigNS.getValue("ConfigNewsPopUp", "NewsShowDate", "");
                if (i === n || i === window.localStorage.getItem("NewsShowDate")) {
                    g.information("ShowDate:", n, "curDate:", i), e = !1;
                    break
                }
                let o = s.ConfigNS.getValue("ConfigNewsPopUp", "NewsShowTime", 0);
                if (Math.round((new Date).getTime() / 1e3) - o <= 604800) {
                    e = !1;
                    break
                }
                e = !0
            } while (0);
            return e
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t = "";
        e.getRecommends = function () {
            return t
        }, e.setRecommends = function (e) {
            t = e
        }
    }(t.SearchConfigNS || (t.SearchConfigNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(17), a = i(28), r = i(23), s = i(663), l = i(33), d = i(16), u = i(11), c = i(4), h = i(13), f = i(0),
        p = i(5), g = i(63), m = i(2), v = i(8), y = i(29), T = f.default.getLogger("DownloadDataManager"),
        w = u.DownloadKernelTaskManager.getTaskManager(), k = d.DownloadKernelEventManager.getEventManager();
    const C = new class {
        constructor() {
            this.reportTimerId = null, this.downloadDataRecord = {}, this.initDate = "", this.initTodayDownloadSize = 0, this.initTodayUploadSize = 0, this.initDownloadSize = 0, this.initUploadSize = 0, this.initTotalBenifites = 0, this.initTotalProviders = 0, this.initMaxDownloadSpeed = 0, this.initMaxUploadSpeed = 0, this.initVipDownloadSize = 0, this.initDownloadFiles = 0, this.initVipSave = 0, this.downloadFinishFilesCur = 0, this.vipSaveCur = 0, this.curUid = "", this.downloadDataDir = m.join(__profilesDir, "DownloadData/"), this.downloadDataPath = m.join(__profilesDir, "DownloadData/UserDownloadData.dat"), this.downloadData = {
                totalDownloadSpeed: 0,
                totalUploadSpeed: 0,
                todayDownloadSize: 0,
                todayUploadSize: 0,
                totalDownloadSize: 0,
                totalUploadSize: 0,
                totalProviders: 0,
                totalBenifites: 0,
                maxDownloadSpeed: 0,
                maxUploadSpeed: 0,
                downloadFinishFiles: 0,
                vipAccPercent: 0,
                vipDonwloadSize: 0,
                vipSave: 0
            }, this.downloadDataBeforeLogin = {
                downloadSize: 0,
                uploadSize: 0,
                providers: 0,
                benifites: 0,
                vipDownloadSizePre: 0
            }, this.downloadTaskData = new Map, g.quitPromises.add(() => new Promise(e => n(this, void 0, void 0, function* () {
                this.reportDownloadData().catch(), yield this.saveDownloadData(), e(!0)
            })))
        }

        getSessionID() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    r.LoginHelperNS.loginHelper.getUserInfo("sessionid", function (t) {
                        T.information("getSessionID:sessionid = ", t), e(t)
                    })
                })
            })
        }

        init() {
            return n(this, void 0, void 0, function* () {
                T.information("init Enter");
                let e = !1;
                return (yield v.FileSystemAWNS.existsAW(`${this.downloadDataDir}`)) || (yield v.FileSystemAWNS.mkdirsAW(`${this.downloadDataDir}`)), (yield r.LoginHelperNS.loginHelper.isLoginedAw()) && (this.curUid = (yield this.getUserID()) || "", e = yield this.initDownloadData()), o.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", t => n(this, void 0, void 0, function* () {
                    T.information("onLoginSuc userId:", t), this.curUid = t, this.downloadDataBeforeLogin.downloadSize = l.DownloadKernelManager.getTotalDownloadSize(), this.downloadDataBeforeLogin.uploadSize = l.DownloadKernelManager.getTotalUploadSize(), this.downloadDataBeforeLogin.benifites = yield this.getBenifites();
                    let i = this.getProvidersAndVipDownloadSize();
                    this.downloadDataBeforeLogin.providers = i[0], this.downloadDataBeforeLogin.vipDownloadSizePre = i[1], e = yield this.initDownloadData()
                })), o.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", e => n(this, void 0, void 0, function* () {
                    T.information("onLogout userId = ", this.curUid), yield this.saveDownloadData(), this.curUid = "", this.killTimer()
                })), l.DownloadKernelManager.attachListener(h.NodeEventMesssageNS.eventGlobalDownloadSpeedChanged, e => n(this, void 0, void 0, function* () {
                    "" !== this.curUid && (this.downloadData.totalDownloadSpeed = l.DownloadKernelManager.getTotalTaskDownloadSpeed(!1), this.downloadData.maxDownloadSpeed = this.downloadData.maxDownloadSpeed > this.downloadData.totalDownloadSpeed ? this.downloadData.maxDownloadSpeed : this.downloadData.totalDownloadSpeed, yield this.updateData())
                })), l.DownloadKernelManager.attachListener(h.NodeEventMesssageNS.eventGlobalUploadSpeedChanged, e => n(this, void 0, void 0, function* () {
                    "" !== this.curUid && (this.downloadData.totalUploadSpeed = e, this.downloadData.maxUploadSpeed = this.downloadData.maxUploadSpeed > e ? this.downloadData.maxUploadSpeed : e, yield this.updateData())
                })), k.attachTaskEvent(c.DownloadKernel.TaskEventType.StatusChanged, (...e) => n(this, void 0, void 0, function* () {
                    do {
                        if ("" === this.curUid) break;
                        if (!e) break;
                        if (e[0] !== c.DownloadKernel.TaskEventType.StatusChanged) break;
                        let t = e[1];
                        if (!t) break;
                        for (let e = 0; e < t.length; ++e) {
                            let i = t[e];
                            if (i && i.getTaskStatus() === c.DownloadKernel.TaskStatus.Succeeded) {
                                let e = 0;
                                if (!i.getTaskAttribute(c.DownloadKernel.TaskAttribute.Background)) {
                                    let t = i.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskType);
                                    t === c.DownloadKernel.TaskType.Emule || t === c.DownloadKernel.TaskType.P2sp ? e = 1 : t === c.DownloadKernel.TaskType.Bt ? e = i.getExtraObject().getDownloadFile().length : t === c.DownloadKernel.TaskType.Group && (e = i.getExtraObject().getDownloadTaskCount())
                                }
                                this.downloadFinishFilesCur += e, this.calculateVipSaveTime(i)
                            }
                        }
                        yield this.updateData()
                    } while (0)
                })), e
            })
        }

        calculateVipSaveTime(e) {
            do {
                let t = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.FileSize), i = e.getTaskChannelInfo(),
                    n = i.offlineSize + i.dcdnSize;
                if (0 === n || t <= n) break;
                let o = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.DownloadingPeriod);
                o = 0 !== o ? o : 1;
                let a = Math.round(t * o / (t - n) - o);
                this.vipSaveCur += a
            } while (0)
        }

        initDownloadData() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                this.downloadFinishFilesCur = 0, this.vipSaveCur = 0, this.downloadTaskData.clear(), yield this.loadDownloadData();
                let t = yield s.getDownloadData({});
                return T.information("initDownloadData res = ", t), !t[1] && t[0] && (t[0].total_download && t[0].total_download > this.initDownloadSize && (this.initDownloadSize = t[0].total_download || 0, this.initUploadSize = t[0].total_upload || 0, this.initTotalBenifites = t[0].total_benefit || 0, this.initTotalProviders = t[0].total_provider || 0, this.initMaxDownloadSpeed = t[0].peak_downspeed || 0, this.initMaxUploadSpeed = t[0].peak_upspeed || 0, this.initVipDownloadSize = t[0].vip_download || 0, this.initVipSave = t[0].vip_save || 0, this.initDownloadFiles = t[0].download_file || 0), this.reportTimerId = setInterval(() => n(this, void 0, void 0, function* () {
                    this.reportDownloadData().catch(), yield this.saveDownloadData()
                }), 18e5), e = !0), this.downloadData.maxDownloadSpeed = this.initMaxDownloadSpeed, this.downloadData.maxUploadSpeed = this.initMaxUploadSpeed, yield this.updateData(), e
            })
        }

        reportDownloadData() {
            return n(this, void 0, void 0, function* () {
                let e = yield s.postDownloadData({
                    total_download: this.downloadData.totalDownloadSize,
                    total_upload: this.downloadData.totalUploadSize,
                    total_provider: this.downloadData.totalProviders,
                    total_benefit: this.downloadData.totalBenifites,
                    peak_downspeed: this.downloadData.maxDownloadSpeed,
                    peak_upspeed: this.downloadData.maxUploadSpeed,
                    vip_download: this.downloadData.vipDonwloadSize,
                    vip_save: this.downloadData.vipSave,
                    download_file: this.downloadData.downloadFinishFiles
                });
                T.information("reportDownloadData res = ", e)
            })
        }

        killTimer() {
            this.reportTimerId && (clearInterval(this.reportTimerId), this.reportTimerId = null)
        }

        getBenifites() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    l.DownloadKernelManager.getSumOfRemotePeerBeBenefited(t => {
                        e(t)
                    })
                })
            })
        }

        getProvidersAndVipDownloadSize() {
            let e = [0, 0], t = w.getStartTaskIDs();
            for (let e = 0; e < t.length; ++e) {
                let i = w.getTaskFromTaskId(t[e]);
                if (i && !i.getTaskAttribute(c.DownloadKernel.TaskAttribute.Background)) {
                    let n = i.getTotalAvailablePeer(), o = i.getVipDownloadSizeCur();
                    this.downloadTaskData.set(t[e], {providers: n, vipDownloadSize: o})
                }
            }
            for (let t of this.downloadTaskData.values()) e[0] += t.providers, e[1] += t.vipDownloadSize;
            return e
        }

        updateData() {
            return n(this, void 0, void 0, function* () {
                this.initDate !== this.getCurDate() && (this.initDate = this.getCurDate(), this.initTodayDownloadSize = 0, this.initTodayUploadSize = 0, this.downloadDataBeforeLogin.downloadSize = l.DownloadKernelManager.getTotalDownloadSize(), this.downloadDataBeforeLogin.uploadSize = l.DownloadKernelManager.getTotalUploadSize()), this.downloadData.todayDownloadSize = this.initTodayDownloadSize + l.DownloadKernelManager.getTotalDownloadSize() - this.downloadDataBeforeLogin.downloadSize, this.downloadData.todayUploadSize = this.initTodayUploadSize + l.DownloadKernelManager.getTotalUploadSize() - this.downloadDataBeforeLogin.uploadSize, this.downloadData.totalDownloadSize = this.initDownloadSize + l.DownloadKernelManager.getTotalDownloadSize() - this.downloadDataBeforeLogin.downloadSize, this.downloadData.totalUploadSize = this.initUploadSize + l.DownloadKernelManager.getTotalUploadSize() - this.downloadDataBeforeLogin.uploadSize, this.downloadData.totalDownloadSize = this.downloadData.totalDownloadSize > this.downloadData.todayDownloadSize ? this.downloadData.totalDownloadSize : this.downloadData.todayDownloadSize, this.downloadData.totalUploadSize = this.downloadData.totalUploadSize > this.downloadData.todayUploadSize ? this.downloadData.totalUploadSize : this.downloadData.todayUploadSize;
                let e = yield this.getBenifites();
                this.downloadData.totalBenifites = this.initTotalBenifites + e - this.downloadDataBeforeLogin.benifites;
                let t = this.getProvidersAndVipDownloadSize();
                t[0] < this.downloadDataBeforeLogin.providers && (t[0] = this.downloadDataBeforeLogin.providers), t[1] < this.downloadDataBeforeLogin.vipDownloadSizePre && (t[1] = this.downloadDataBeforeLogin.vipDownloadSizePre), this.downloadData.totalProviders = this.initTotalProviders + t[0] - this.downloadDataBeforeLogin.providers, this.downloadData.vipDonwloadSize = this.initVipDownloadSize + t[1] - this.downloadDataBeforeLogin.vipDownloadSizePre, this.downloadData.vipDonwloadSize = this.downloadData.vipDonwloadSize > this.downloadData.totalDownloadSize ? this.downloadData.totalDownloadSize : this.downloadData.vipDonwloadSize, 0 === this.downloadData.totalDownloadSize ? this.downloadData.vipAccPercent = 0 : this.downloadData.vipAccPercent = this.downloadData.vipDonwloadSize / this.downloadData.totalDownloadSize, this.downloadData.vipSave = this.initVipSave + this.vipSaveCur, this.downloadData.downloadFinishFiles = this.initDownloadFiles + this.downloadFinishFilesCur, a.NativeCallHostModule.nativeCallHost.fireNativeEvent("download-data-update", JSON.stringify(this.downloadData))
            })
        }

        getDownloadData() {
            return this.downloadData
        }

        getCurDate() {
            let e = "", t = new Date;
            return e = `${t.getFullYear()}-${t.getMonth() + 1}-${t.getDate()}`
        }

        saveDownloadData() {
            return n(this, void 0, void 0, function* () {
                try {
                    "" !== this.curUid && (this.downloadDataRecord[this.curUid] = this.downloadDataRecord[this.curUid] || {}, this.downloadDataRecord[this.curUid].DownloadData = this.downloadData, this.downloadDataRecord[this.curUid].SaveDate = this.getCurDate()), T.information("saveDownloadData downloadData = ", this.downloadDataRecord);
                    let e = JSON.stringify(this.downloadDataRecord);
                    T.information("saveDownloadData bufStr:", e);
                    let t = new Buffer(e), i = y.ToolsUtilitiesAWNS.genarateMd5("thunderx").substr(0, 16).toUpperCase(),
                        n = y.ToolsUtilitiesAWNS.encryptBuffer(t, i);
                    yield v.FileSystemAWNS.writeFileAW(this.downloadDataPath, n)
                } catch (e) {
                    T.information(e)
                }
            })
        }

        clearInitData() {
            this.initDownloadSize = 0, this.initUploadSize = 0, this.initTotalBenifites = 0, this.initTotalProviders = 0, this.initMaxDownloadSpeed = 0, this.initMaxUploadSpeed = 0, this.initVipDownloadSize = 0, this.initVipSave = 0, this.initDownloadFiles = 0, this.initTodayDownloadSize = 0, this.initTodayUploadSize = 0
        }

        loadDownloadData() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (this.clearInitData(), "" === this.curUid) break;
                    let e = yield v.FileSystemAWNS.readFileAW(`${this.downloadDataPath}`);
                    if (p.isNullOrUndefined(e) || "" === e.toString()) {
                        T.information("loadDownloadData buf is null");
                        break
                    }
                    let t = "";
                    try {
                        let i = y.ToolsUtilitiesAWNS.genarateMd5("thunderx").substr(0, 16).toUpperCase();
                        if (t = y.ToolsUtilitiesAWNS.decryptBuffer(e, i).toString(), p.isNullOrUndefined(t) || "" === t) {
                            T.information("loadDownloadData bufStr is null");
                            break
                        }
                        if (this.downloadDataRecord = JSON.parse(t), "" !== this.curUid && p.isNullOrUndefined(this.downloadDataRecord[this.curUid])) {
                            this.downloadDataRecord[this.curUid] = {};
                            break
                        }
                        this.initDate = this.downloadDataRecord[this.curUid].SaveDate, this.initDownloadSize = this.downloadDataRecord[this.curUid].DownloadData.totalDownloadSize || 0, this.initUploadSize = this.downloadDataRecord[this.curUid].DownloadData.totalUploadSize || 0, this.initTotalBenifites = this.downloadDataRecord[this.curUid].DownloadData.totalBenifites || 0, this.initTotalProviders = this.downloadDataRecord[this.curUid].DownloadData.totalProviders || 0, this.initMaxDownloadSpeed = this.downloadDataRecord[this.curUid].DownloadData.maxDownloadSpeed || 0, this.initMaxUploadSpeed = this.downloadDataRecord[this.curUid].DownloadData.maxUploadSpeed || 0, this.initVipDownloadSize = this.downloadDataRecord[this.curUid].DownloadData.vipDonwloadSize || 0, this.initVipSave = this.downloadDataRecord[this.curUid].DownloadData.vipSave || 0, this.initDownloadFiles = this.downloadDataRecord[this.curUid].DownloadData.downloadFinishFiles || 0, this.downloadDataRecord[this.curUid].SaveDate !== this.getCurDate() ? (this.initTodayDownloadSize = 0, this.initTodayUploadSize = 0) : (this.initTodayDownloadSize = this.downloadDataRecord[this.curUid].DownloadData.todayDownloadSize || 0, this.initTodayUploadSize = this.downloadDataRecord[this.curUid].DownloadData.todayUploadSize || 0), T.information("loadDownloadData decryption downloadData:", this.downloadDataRecord, this.initMaxDownloadSpeed, this.initDownloadSize)
                    } catch (e) {
                        T.information("loadDownloadData exception", e)
                    }
                } while (0)
            })
        }

        getUserID() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    r.LoginHelperNS.loginHelper.getUserInfo("userid", function (t) {
                        T.information("getUserID:userid = ", t), e(t)
                    })
                })
            })
        }
    };
    t.default = C
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(62), r = i(18), s = i(66), l = i(8), d = i(68),
        u = i(0).default.getLogger("ShouleiInstallImg"), c = "https://static-xl.a.88cdn.com/json/mobile-pc.json";
    let h = "";
    t.getMobileImgSrc = function () {
        return n(this, void 0, void 0, function* () {
            let e = "";
            do {
                let t = null;
                try {
                    r.default.defaults.adapter = i(21);
                    let e = new a.Agent({rejectUnauthorized: !1});
                    t = yield r.default.get(c, {timeout: 1e4, httpsAgent: e})
                } catch (e) {
                    u.warning(e)
                }
                let n = "";
                if (null !== t && void 0 !== t.status && 200 === t.status && void 0 !== t.data && null !== t.data && t.data.downloadQR && (n = t.data.downloadQR), !n) break;
                let f = d.ParseUrlFileNameNS.getNameFromUrl(n);
                if (!f) break;
                let p = o.resolve(__profilesDir, `mobile/${f}`);
                if (p === h && (yield l.FileSystemAWNS.existsAW(p))) {
                    e = p;
                    break
                }
                u.information("downloadFileAW", n, p), (yield s.AxiosNS.downloadFileAW(n, p)) && (h = p, e = p)
            } while (0);
            return e
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(63), a = i(34), r = i(39), s = i(9), l = i(0), d = i(399), u = l.default.getLogger("MenuContextHelper");
    const c = new class {
        constructor() {
            u.information("constructor MenuContextHelper object")
        }

        exitThunder(e) {
            return n(this, void 0, void 0, function* () {
                (yield d.QuitMessageBoxMgrNS.popup()) && (yield o.quitPromises.run())
            })
        }

        showNewTaskPanel(e) {
            u.information("trackEvent", "core_event", "create_task_click", "click_source=other"), s.XLStatNS.trackEvent("core_event", "create_task_click", "", 0, 0, 0, 0, "click_source=other"), r.ThunderNewTask.createPreNewTaskWindow(null)
        }

        importUncompleted(e) {
            a.TaskOperatorNs.importUncompleted().catch()
        }

        initAccelerator() {
            window.addEventListener("keyup", e => {
                "n" !== e.key && "N" !== e.key || !e.ctrlKey || this.showNewTaskPanel("system-menu")
            }, !0)
        }
    };
    t.default = c
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(12), r = i(2), s = i(5), l = i(0), d = i(29), u = i(7), c = i(28),
        h = u.default(r.join(__rootDir, "../bin/ThunderHelper.node")), f = l.default.getLogger("login-helper");
    !function (e) {
        e.tipsUIHelper = new class {
        }
    }(t.TipsHelperNS || (t.TipsHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(0), r = i(31), s = i(4), l = i(48), d = i(40), u = i(11), c = i(16),
        h = a.default.getLogger("sdk-download"), f = c.DownloadKernelEventManager.getEventManager();
    t.sdkDownloader = new class {
        constructor() {
            this.keyMap = {}, this.listenMap = {}, this.eventCookie = void 0
        }

        createTaskBySDK(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    if (!e) break;
                    let i = e.url;
                    if (!i) break;
                    let n = e.savePath;
                    if (!n) break;
                    let a = e.fileName;
                    if (!a) break;
                    let c = `${i}${n}${a}`;
                    if (this.keyMap.hasOwnProperty(c)) {
                        if (t = !0, e.onTaskFinish) {
                            let t = this.keyMap[c];
                            h.information("task is running", c, t), this.addListener(t, e.onTaskFinish)
                        }
                        break
                    }
                    let f = e.source ? e.source : "", p = {
                        taskBaseInfo: {
                            taskName: a,
                            savePath: n,
                            productInfo: d.TaskCtrlOperatorNS.constructProductInfo(e.browser),
                            origin: f
                        }, isBackground: !0
                    }, g = r.ThunderHelper.getTaskTypeFromUrl(i);
                    if (g === s.DownloadKernel.TaskType.Emule) {
                        let e = {url: i};
                        p.emuleTaskInfo = e
                    } else if (g === s.DownloadKernel.TaskType.P2sp) {
                        let e = {url: i, nameFixed: 1};
                        p.p2spTaskInfo = e
                    } else {
                        if (g !== s.DownloadKernel.TaskType.Magnet) break;
                        {
                            let e = {url: i, torrentFilePath: o.normalize(o.join(n, a))};
                            p.magnetTaskInfo = e
                        }
                    }
                    let m = yield u.DownloadKernelTaskManager.getTaskManager().createTask(g, p);
                    if (!m) break;
                    let v = m.getId();
                    t = yield l.DownloadDispatchNS.startTask(v, !0), h.information("sdk create task", v), t && (e.onTaskFinish && this.addListener(v, e.onTaskFinish), this.keyMap[c] = v, this.attachTaskStatus())
                } while (0);
                return t || e.onTaskFinish && e.onTaskFinish(!1), t
            })
        }

        addListener(e, t) {
            this.listenMap.hasOwnProperty(e) ? this.listenMap[e] = [...this.listenMap[e]].concat(t) : this.listenMap[e] = [].concat(t)
        }

        release(e) {
            delete this.listenMap[e];
            for (let t in this.keyMap) if (this.keyMap[t] === e) {
                delete this.keyMap[t];
                break
            }
        }

        attachTaskStatus() {
            do {
                if (this.eventCookie) break;
                this.eventCookie = f.attachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, (...e) => n(this, void 0, void 0, function* () {
                    do {
                        if (!e) break;
                        if (e[0] !== s.DownloadKernel.TaskEventType.StatusChanged) break;
                        if (!e[1]) break;
                        let t = Object.values(this.keyMap);
                        if (!t || 0 === t.length) break;
                        let i = e[1];
                        for (let e = 0; e < i.length; ++e) {
                            let n = i[e];
                            if (!n) continue;
                            let o = n.getTaskStatus(), a = n.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskId);
                            -1 !== t.indexOf(a) && (o === s.DownloadKernel.TaskStatus.Succeeded || o === s.DownloadKernel.TaskStatus.Seeding ? (this.fireAll(a, !0, n), this.release(a)) : o === s.DownloadKernel.TaskStatus.Failed && (this.fireAll(a, !1), this.release(a)))
                        }
                        (t = Object.values(this.keyMap)) && 0 !== t.length || this.detachTaskStatus()
                    } while (0)
                }))
            } while (0)
        }

        fireAll(e, t, i) {
            do {
                if (!this.listenMap.hasOwnProperty(e)) break;
                let n = this.listenMap[e];
                if (!n || 0 === n.length) break;
                if (!t) {
                    for (let e = 0; e < n.length; e++) n[e](t);
                    break
                }
                if (!i) break;
                let a = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.SavePath),
                    r = i.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskName), l = o.normalize(o.join(a, r));
                for (let e = 0; e < n.length; e++) n[e](t, l)
            } while (0)
        }

        detachTaskStatus() {
            h.information("detachTaskStatus", this.eventCookie), void 0 !== this.eventCookie && (f.detachTaskEvent(s.DownloadKernel.TaskEventType.StatusChanged, this.eventCookie), this.eventCookie = void 0)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(5), r = i(17), s = i(58), l = i(534), d = i(535), u = i(83), c = i(36), h = i(27), f = i(10),
        p = i(9), g = i(109), m = d.GroupAccelerateManagerNS.getManager(),
        v = l.GroupAccelerateEventManagerNS.getEventManager(), y = u.TabEventManagerNS.getEventEmitter(),
        T = o.default.getLogger("GroupAccelerate.WebManager");
    !function (e) {
        class t {
            constructor() {
                this.entryPage = "", this.pendingShowTeamInfoArray = new Array, this.taskSpeedListenerMap = new Map, this.taskStatusListenerMap = new Map, this.nextListenerCookie = 0, T.information("constructor")
            }

            init(e) {
                T.information("init", " entryPage: ", e), e && (this.entryPage = e), v.on(l.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, (e, t, i) => {
                    T.information("init OnTaskStatusChange", " taskId: ", e, " taskStatus: ", t, " taskUniqueId: ", i), this.fireTaskStatusChangeEvent(e, t, i)
                }), v.on(l.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskSpeedChange, (e, t, i, n, o) => {
                    T.information("init OnTaskSpeedChange", " taskId: ", e, " taskSpeed: ", t, " increaseSpeed: ", i, " extraStr: ", n, " taskUniqueId: ", o), this.fireTaskSpeedChangeEvent(e, t, i, n, o)
                }), y.on(u.TabEventManagerNS.EventType.RemoveTab, e => {
                    if ("组队加速" === e.tabInfo.title && "groupAccelerate" === e.tabInfo.tab.name) {
                        m.exitAllTeamNoTask();
                        for (let [t, i]of this.taskSpeedListenerMap) if (i.tab === e.tabInfo.tab) {
                            this.taskSpeedListenerMap.delete(t);
                            break
                        }
                        for (let [t, i]of this.taskStatusListenerMap) if (i.tab === e.tabInfo.tab) {
                            this.taskStatusListenerMap.delete(t);
                            break
                        }
                    }
                }), this.registerNativeFunction()
            }

            openGroupAccelerateTabByTaskId(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    T.information("openGroupAccelerateTabByTaskId", " taskId: ", e, " entry: ", t, " panel: ", i, " queryString: ", o);
                    let n = m.getTaskUniqueIdByTaskId(e);
                    T.information("openGroupAccelerateTabByTaskId", " taskUniqueId: ", n), n && "" !== n && this.openGroupAccelerateTabByTaskUniqueId(n, t, i, o).then(e => {
                        T.information("openGroupAccelerateTabByTaskId success")
                    }).catch(() => {
                        T.information("openGroupAccelerateTabByTaskId failed")
                    })
                })
            }

            openGroupAccelerateTabByTaskUniqueId(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    if (T.information("openGroupAccelerateTabByTaskUniqueId", " taskUniqueId: ", e, " entry: ", t, " panel: ", i, " queryString: ", o), !e) return void T.information("openGroupAccelerateTabByTaskUniqueId bad taskUniqueId");
                    a.isNullOrUndefined(t) && (t = ""), a.isNullOrUndefined(i) && (i = ""), a.isNullOrUndefined(o) && (o = "");
                    let n = yield s.default(!1, !0, "groupspeedup");
                    if (T.information("openGroupAccelerateTabByTaskUniqueId", " userId: ", n), n && "0" !== n) {
                        let a = Number(n);
                        if (!isNaN(a) && 0 !== a) {
                            let n = JSON.stringify({
                                title: "组队加速",
                                url: this.entryPage,
                                name: "groupAccelerate",
                                showUrl: !1
                            });
                            r.NativeCallModule.nativeCall.CallNativeFunction("GetTabIndexByTitleAndName", n, (a, s) => {
                                if (T.information("GetTabIndexByTitleAndName", n, a, s), a === h.NativeFunctionErrorCode.Success && s > -1) T.information("groupAccelerate nativeCall exists", s), r.NativeCallModule.nativeCall.CallNativeFunction("SelectTab", s), r.NativeCallModule.nativeCall.CallNativeFunction("FireEventFunction", "OnShowTeam", e, t, i, o); else {
                                    let a = {};
                                    a.taskUniqueId = e, a.entry = t, a.panel = i, a.queryString = o, this.pendingShowTeamInfoArray.push(a), T.information("openGroupAccelerateTabByTaskUniqueId do opentab"), r.NativeCallModule.nativeCall.CallNativeFunction("OpenNewTab", this.entryPage, n)
                                }
                            }), f.ConfigNS.setValue("GroupAccelerate", "unusecount", 0);
                            let a = (new Date).getTime();
                            f.ConfigNS.setValue("GroupAccelerate", "lastusetime", a), this.sendPageShowStat(e, t, i)
                        }
                    }
                })
            }

            fireTaskStatusChangeEvent(e, t, i) {
                this.taskStatusListenerMap.forEach((n, o) => {
                    n && n.tab && "nativeCallId" in n && n.callBackId && n.gcid === i && n.tab.callNativeFunctionCallback(n.nativeCallId, n.callBackId, e, t, i)
                })
            }

            fireTaskSpeedChangeEvent(e, t, i, n, o) {
                this.taskSpeedListenerMap.forEach((a, r) => {
                    a && a.tab && "nativeCallId" in a && a.callBackId && a.gcid === o && a.tab.callNativeFunctionCallback(a.nativeCallId, a.callBackId, e, t, i, n, o)
                })
            }

            registerNativeFunction() {
                let e = [{
                    functionName: "OpenGroupAccelerateTab",
                    nativeFunc: this.externalOpenGroupAccelerateTab.bind(this)
                }, {
                    functionName: "GetGroupTaskInfo",
                    nativeFunc: this.externalGetTaskInfo.bind(this)
                }, {functionName: "JoinTeam", nativeFunc: this.externalJoinTeam.bind(this)}, {
                    functionName: "ExitTeam",
                    nativeFunc: this.externalExitTeam.bind(this)
                }, {
                    functionName: "TeamPageReady",
                    nativeFunc: this.externalTeamPageReady.bind(this)
                }, {
                    functionName: "SubscribeTaskSpeed",
                    nativeFunc: this.externalSubscribeTaskSpeed.bind(this)
                }, {
                    functionName: "UnsubscribeTaskSpeed",
                    nativeFunc: this.externalUnsubscribeTaskSpeed.bind(this)
                }, {
                    functionName: "SubscribeTaskStatus",
                    nativeFunc: this.externalSubscribeTaskStatus.bind(this)
                }, {functionName: "UnsubscribeTaskStatus", nativeFunc: this.externalUnsubscribeTaskStatus.bind(this)}];
                c.NativeCallNS.registerNativeFunction(e)
            }

            externalOpenGroupAccelerateTab(e, t, i, n) {
                do {
                    if (T.information("externalOpenGroupAccelerateTab enter"), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) {
                        T.information("externalOpenGroupAccelerateTab bad external args");
                        break
                    }
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0]) || a.isNullOrUndefined(n[1]) || a.isNullOrUndefined(n[2]) || a.isNullOrUndefined(n[3])) {
                        T.information("externalOpenGroupAccelerateTab bad args"), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], s = n[2], l = n[3];
                    this.openGroupAccelerateTabByTaskId(o, r, s, l).then(e => {
                        T.information("externalOpenGroupAccelerateTab success")
                    }).catch(() => {
                        T.information("externalOpenGroupAccelerateTab failed")
                    }), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success)
                } while (0)
            }

            externalGetTaskInfo(e, t, i, n) {
                do {
                    if (T.information("externalGetTaskInfo enter"), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) {
                        T.information("externalGetTaskInfo bad external args");
                        break
                    }
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[1])) {
                        T.information("externalGetTaskInfo bad args"), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1];
                    T.information("externalGetTaskInfo", " taskId: ", o, " taskUniqueId: ", r);
                    let s = m.getTaskInfoJson(o, r);
                    T.information("externalGetTaskInfo", " taskInfoJson: ", s), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success, s)
                } while (0)
            }

            externalJoinTeam(e, t, i, n) {
                do {
                    if (T.information("externalJoinTeam enter"), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) {
                        T.information("externalGetTaskInfo bad external args");
                        break
                    }
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[3])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], s = n[2], l = n[3], d = null;
                    try {
                        d = JSON.parse(s)
                    } catch (e) {
                        T.warning(e)
                    }
                    if (null === d) break;
                    let u = d.member_count;
                    u || (u = 0);
                    let c = d.group_name;
                    if (a.isNullOrUndefined(c) && (c = ""), T.information("externalJoinTeam", " taskId: ", o, " groupId: ", r, " opts: ", s, " taskUniqueId: ", l, " memberCount: ", u, " groupName: ", c), !r || !l) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    m.joinTeam(o, "" + r, c, u, l).catch();
                    let f = !1;
                    if ("1" !== g.DownloadModeNS.getCurrentDownloadMode()) {
                        g.DownloadModeNS.setFullDownloadMode(), f = !0;
                        let e = 0,
                            t = "taskid=" + (e = l && "" !== l ? m.getTaskIdByTaskUniqueId(l) : o) + ",gcid=" + l;
                        p.XLStatNS.trackEvent("download_pannel", "groupspeedup_fullspeed_change", "", 0, 0, 0, 0, t)
                    }
                    let v = JSON.stringify({hasChangeMode: f});
                    e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success, v)
                } while (0)
            }

            externalExitTeam(e, t, i, n) {
                do {
                    if (T.information("externalExitTeam enter"), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) break;
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0]) || a.isNullOrUndefined(n[1]) || a.isNullOrUndefined(n[2])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], s = n[2];
                    m.exitTeam(o, r, s), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success)
                } while (0)
            }

            externalTeamPageReady(e, t, i, n) {
                do {
                    if (T.information("externalTeamPageReady enter"), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) {
                        T.information("externalGetTaskInfo bad external args");
                        break
                    }
                    for (let e of this.pendingShowTeamInfoArray) e && (T.information("externalTeamPageReady fire event", " taskUniqueId: ", e.taskUniqueId, " entry: ", e.entry, " panel: ", e.panel, " queryString: ", e.queryString), r.NativeCallModule.nativeCall.CallNativeFunction("FireEventFunction", "OnShowTeam", e.taskUniqueId, e.entry, e.panel, e.queryString));
                    this.pendingShowTeamInfoArray = [], e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success)
                } while (0)
            }

            externalSubscribeTaskSpeed(e, t, i, n) {
                do {
                    if (T.information("externalSubscribeTaskSpeed enter"), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) {
                        T.information("externalSubscribeTaskSpeed bad external args");
                        break
                    }
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0]) || a.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], s = {};
                    s.tab = e, s.nativeCallId = t, s.callBackId = r, s.gcid = o;
                    let l = this.nextListenerCookie;
                    this.taskSpeedListenerMap.set("" + l, s), this.nextListenerCookie += 1, e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success, l)
                } while (0)
            }

            externalUnsubscribeTaskSpeed(e, t, i, n) {
                do {
                    if (T.information("externalUnsubscribeTaskSpeed enter"), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) {
                        T.information("externalUnsubscribeTaskSpeed bad external args");
                        break
                    }
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    this.taskSpeedListenerMap.delete("" + o), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success)
                } while (0)
            }

            externalSubscribeTaskStatus(e, t, i, n) {
                do {
                    if (T.information("externalSubscribeTaskStatus enter"), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) {
                        T.information("externalSubscribeTaskStatus bad external args");
                        break
                    }
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0]) || a.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1], s = {};
                    s.tab = e, s.nativeCallId = t, s.callBackId = r, s.gcid = o;
                    let l = this.nextListenerCookie;
                    this.taskStatusListenerMap.set("" + l, s), this.nextListenerCookie += 1, e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success, l)
                } while (0)
            }

            externalUnsubscribeTaskStatus(e, t, i, n) {
                do {
                    if (T.information("externalUnsubscribeTaskStatus enter"), a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) {
                        T.information("externalUnsubscribeTaskStatus bad external args");
                        break
                    }
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    this.taskSpeedListenerMap.delete("" + o), e.callNativeFunctionCallback(t, i, h.NativeFunctionErrorCode.Success)
                } while (0)
            }

            sendPageShowStat(e, t, i) {
                do {
                    if (!e) break;
                    if (!t || !i) break;
                    let n = "entry=" + t + ",pannel=" + i + ",gcid=" + e;
                    p.XLStatNS.trackEvent("download_pannel", "groupspeedupdetail_show", "", 0, 0, 0, 0, n)
                } while (0)
            }
        }

        e.Manager = t;
        const i = new t;
        e.getManager = function () {
            return i
        }
    }(t.GroupAccelerateWebManagerNS || (t.GroupAccelerateWebManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(20);
    !function (e) {
        let t;
        !function (e) {
            e.Unknow = "Unknow", e.OnJoinTeam = "OnJoinTeam", e.OnExitTeam = "OnExitTeam", e.OnReceiveGcid = "OnReceiveGcid", e.OnTaskSpeedChange = "OnTaskSpeedChange", e.OnTaskStatusChange = "OnTaskStatusChange", e.OnTeamInfoUpdated = "OnTeamInfoUpdated", e.InsertToCategoryView = "InsertToCategoryView", e.RemoveFromCategoryView = "RemoveFromCategoryView", e.RequestTaskTeamInfoSuccess = "RequestTaskTeamInfoSuccess", e.RequestTaskTeamInfofailed = "RequestTaskTeamInfofailed"
        }(t = e.GroupAccelerateEventType || (e.GroupAccelerateEventType = {}));
        const i = new n.EventEmitter;
        e.getEventManager = function () {
            return i
        }
    }(t.GroupAccelerateEventManagerNS || (t.GroupAccelerateEventManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(9), r = i(2), s = i(8), l = i(17), d = i(57), u = i(13), c = i(4), h = i(33), f = i(16),
        p = i(11), g = i(44), m = i(26), v = i(534), y = i(23), T = i(5),
        w = v.GroupAccelerateEventManagerNS.getEventManager(), k = p.DownloadKernelTaskManager.getTaskManager(),
        C = f.DownloadKernelEventManager.getEventManager(),
        b = g.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        I = m.DownloadKernelCategoryManager.getCategoryManager(), S = o.default.getLogger("GroupAccelerate.Manager");
    !function (e) {
        class t {
            constructor() {
                this.reportInterval = 120, this.currentUserId = 0, this.currentUserLicensed = !1, this.enterGroupAccelerateTimeStamp = 0, this.enterGroupAccelerateUploadSize = 0, this.groupAcceleratingTaskNum = 0, this.insertToCategoryViewEventId = void 0, this.removeFromCategoryViewEventId = void 0, this.detailChangedEventId = void 0, this.taskStatusChangedEventId = void 0, this.taskGroupInfoMap = new Map, this.taskIdMap = new Map, this.insertToCategoryViewEventId = 0, this.removeFromCategoryViewEventId = 0, this.detailChangedEventId = 0, this.taskStatusChangedEventId = 0
            }

            init() {
                S.information("init"), l.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => {
                    let t = Number(e);
                    isNaN(t) || (this.currentUserId = t), this.updatePrivateSpaceCategoryViewTaskIdMap(), k.isLoadStorageTaskFinish() && this.checkTaskGroupAccelerateStatus(), this.getUserGroupAccelerateInfo().then(e => {
                        S.information("init login getUserGroupAccelerateInfo")
                    }).catch(() => {
                        S.information("init login getUserGroupAccelerateInfo failed")
                    })
                }), l.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", e => {
                    this.exitAllTeam(this.currentUserId, !1), this.currentUserId = 0, this.currentUserLicensed = !1
                }), y.LoginHelperNS.loginHelper.getUserInfo("userid", e => {
                    if (S.information("getUserID:userid = ", e), e && "" !== e) {
                        let t = Number(e);
                        isNaN(t) || (this.currentUserId = t), k.isLoadStorageTaskFinish() && this.checkTaskGroupAccelerateStatus(), this.getUserGroupAccelerateInfo().then(e => {
                            S.information("init getUserGroupAccelerateInfo")
                        }).catch(() => {
                            S.information("init getUserGroupAccelerateInfo failed")
                        })
                    }
                }), this.insertToCategoryViewEventId = C.attachTaskEvent(c.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                    e && e[0] === c.DownloadKernel.TaskEventType.InsertToCategoryView && this.onInsertToCategoryView(e[1], e[2], e[3])
                }), this.removeFromCategoryViewEventId = C.attachTaskEvent(c.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                    e && e[0] === c.DownloadKernel.TaskEventType.RemoveFromCategoryView && this.onRemoveFromCategoryView(e[1], e[2], e[3])
                }), this.detailChangedEventId = C.attachTaskEvent(c.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    e && e[0] === c.DownloadKernel.TaskEventType.DetailChanged && this.onDetailChanged(e[1])
                }), this.taskStatusChangedEventId = C.attachTaskEvent(c.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    e && e[0] === c.DownloadKernel.TaskEventType.StatusChanged && this.onTaskStatusChanged(e[1])
                }), setInterval(() => {
                    this.reportGroupAccelerateTaskInfo()
                }, 1e3 * this.reportInterval), h.DownloadKernelManager.attachOnceListener(u.NodeEventMesssageNS.eventDownloadKernelInitEnd, () => {
                    this.updateTaskIdMap(), this.checkTaskGroupAccelerateStatus()
                })
            }

            uninit() {
                void 0 !== this.insertToCategoryViewEventId && (C.detachTaskEvent(c.DownloadKernel.TaskEventType.InsertToCategoryView, this.insertToCategoryViewEventId), this.insertToCategoryViewEventId = void 0), void 0 !== this.removeFromCategoryViewEventId && (C.detachTaskEvent(c.DownloadKernel.TaskEventType.RemoveFromCategoryView, this.removeFromCategoryViewEventId), this.removeFromCategoryViewEventId = void 0), void 0 !== this.detailChangedEventId && (C.detachTaskEvent(c.DownloadKernel.TaskEventType.DetailChanged, this.detailChangedEventId), this.detailChangedEventId = void 0), void 0 !== this.taskStatusChangedEventId && (C.detachTaskEvent(c.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventId), this.taskStatusChangedEventId = void 0), this.taskGroupInfoMap.clear(), this.taskIdMap.clear()
            }

            canEnterGroupAccelerate(e) {
                S.information("canEnterGroupAccelerate", " taskId: ", e);
                let t = !1;
                do {
                    if (!e) break;
                    let i = k.getTaskFromTaskId(e);
                    if (!i) break;
                    let n = this.getTaskUniqueIdByTask(i);
                    if (!n || "" === n) break;
                    let o = i.getTaskStatus();
                    if (!o || o === c.DownloadKernel.TaskStatus.Failed) break;
                    t = !0
                } while (0);
                return t
            }

            isEnterGroupAccelerate(e) {
                S.information("canEnterGroupAccelerate", " taskId: ", e);
                let t = !1;
                do {
                    if (!e) break;
                    let i = k.getTaskFromTaskId(e);
                    if (!i) break;
                    let n = this.getTaskUniqueIdByTask(i);
                    if (!n || "" === n) break;
                    let o = i.getTaskStatus();
                    if (!o || o === c.DownloadKernel.TaskStatus.Failed) break;
                    let a = this.getTaskGroupInfo(n);
                    a && a.taskId === e && (t = !0)
                } while (0);
                return t
            }

            joinTeam(e, t, i, o, a) {
                return n(this, void 0, void 0, function* () {
                    S.information("joinTeam", " taskId: ", e, " groupId:", t, " groupName:", i, " memberCount: ", o, " taskUniqueId: ", a);
                    let n = 0;
                    n = "" !== a ? this.taskIdMap.get(a) : e || 0, S.information("joinTeam", " realTaskId: ", n);
                    do {
                        let e = this.taskGroupInfoMap.get(a);
                        if (e && e.taskId) {
                            S.information("joinTeam Alert! taskGroupInfo.taskId:", e.taskId);
                            break
                        }
                        if ((e = {}).groupId = Number(t), e.memberCount = o, e.groupName = i, e.taskId = n, e.currentIncreaseSize = 0, k.getTaskFromTaskId(n)) {
                            e.previousSpeed = this.getTaskAverageSpeed(n), (yield this.getIsVip()) ? this.setTaskPriority(n, 999) : this.setTaskPriority(n, 700), w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnJoinTeam, n, a), 0 === this.groupAcceleratingTaskNum && (this.enterGroupAccelerateTimeStamp = (new Date).getTime(), this.enterGroupAccelerateUploadSize = h.DownloadKernelManager.getTotalUploadSize()), this.groupAcceleratingTaskNum += 1, S.information("joinTeam", " this.enterGroupAccelerateTimeStamp: ", this.enterGroupAccelerateTimeStamp), S.information("joinTeam", " this.enterGroupAccelerateUploadSize: ", this.enterGroupAccelerateUploadSize), S.information("joinTeam", " this.groupAcceleratingTaskNum: ", this.groupAcceleratingTaskNum)
                        } else e.previousSpeed = 0;
                        this.taskGroupInfoMap.set(a, e), S.information("joinTeam", " this.taskGroupInfoMap.size: ", this.taskGroupInfoMap.size), this.saveGroupAccelerateInfo().then(e => {
                            S.information("joinTeam saveGroupAccelerateInfo")
                        }).catch(() => {
                            S.information("joinTeam saveGroupAccelerateInfo failed")
                        })
                    } while (0)
                })
            }

            exitTeam(e, t, i) {
                if (S.information("exitTeam", " taskId: ", e, " groupId: ", t, " taskUniqueId: ", i), "" !== i) {
                    let e = this.taskGroupInfoMap.get(i);
                    if (e) {
                        S.information("exitTeam", " taskGroupInfo.taskId: ", e.taskId);
                        let t = e.taskId;
                        this.taskGroupInfoMap.delete(i), this.setTaskPriority(t, 0), this.saveGroupAccelerateInfo().then(e => {
                            S.information("exitTeam saveGroupAccelerateInfo")
                        }).catch(() => {
                            S.information("exitTeam saveGroupAccelerateInfo failed")
                        }), this.groupAcceleratingTaskNum -= 1, 0 === this.groupAcceleratingTaskNum && (this.enterGroupAccelerateTimeStamp = 0, this.enterGroupAccelerateUploadSize = 0), S.information("exitTeam", " this.enterGroupAccelerateTimeStamp: ", this.enterGroupAccelerateTimeStamp), S.information("exitTeam", " this.enterGroupAccelerateUploadSize: ", this.enterGroupAccelerateUploadSize), S.information("exitTeam", " this.groupAcceleratingTaskNum: ", this.groupAcceleratingTaskNum), w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnExitTeam, t, i)
                    } else S.information("exitTeam bad taskGroupInfo")
                } else S.information("exitTeam bad taskUniqueId")
            }

            getTaskGroupInfo(e) {
                S.information("getTaskGroupInfo", " taskUniqueId: ", e);
                let t = null;
                return "" !== e && (t = this.taskGroupInfoMap.get(e)), t
            }

            exitAllTeamNoTask() {
                S.information("exitAllTeamNoTask"), this.taskGroupInfoMap.forEach((e, t) => {
                    e.taskId || (this.sendExitTeamCommand("" + e.groupId), this.taskGroupInfoMap.delete(t))
                }), this.saveGroupAccelerateInfo().then(e => {
                    S.information("exitAllTeamNoTask saveGroupAccelerateInfo")
                }).catch(() => {
                    S.information("exitAllTeamNoTask saveGroupAccelerateInfo failed")
                })
            }

            sendExitTeamCommand(e) {
                do {
                    S.information("sendExitTeamCommand", " taskUniqueId: ", e);
                    let t = this.taskGroupInfoMap.get(e);
                    if (!t) break;
                    d.fetchSlRes({
                        url: "/group_accel/exit",
                        data: {uid: this.currentUserId, group_id: t.groupId},
                        method: "post"
                    }).then(t => {
                        this.taskGroupInfoMap.delete(e), this.saveGroupAccelerateInfo().then(e => {
                            S.information("sendExitTeamCommand saveGroupAccelerateInfo")
                        }).catch(() => {
                            S.information("sendExitTeamCommand saveGroupAccelerateInfo failed")
                        })
                    }).catch(() => {
                    })
                } while (0)
            }

            isUserLicensed() {
                return this.currentUserLicensed
            }

            getTaskInfoJson(e, t) {
                S.information("getTaskInfoJson", " taskId: ", e, " taskUniqueId: ", t);
                let i = void 0;
                "" !== t && (i = this.taskIdMap.get(t)), S.information("getTaskInfoJson", " realTaskId: ", i), void 0 !== i && (e = i), S.information("getTaskInfoJson now", " taskId: ", e);
                let n = "null";
                do {
                    if (!e) {
                        n = "null";
                        break
                    }
                    let o = k.getTaskFromTaskId(i);
                    if (o) {
                        let e = {};
                        e.status = "" + o.getTaskBaseInfo().taskStatus, e.taskID = "" + i, e.type = "" + o.getTaskBaseInfo().taskType, e.name = o.getTaskBaseInfo().taskName, e.gcid = t;
                        let a = "", s = o.getTaskBaseInfo().taskType, l = e.name;
                        s !== c.DownloadKernel.TaskType.P2sp && s !== c.DownloadKernel.TaskType.Emule || (a = r.extname(l)) && (a = a.substring(1)), e.suffix = a, e.url = o.getTaskBaseInfo().url, e.size = o.getTaskBaseInfo().fileSize, e.progress = e.size > 0 ? 100 * o.getTaskBaseInfo().downloadSize / e.size : 0, S.information("taskInfoTable.progress:", e.progress), e.progress > 100 && (e.progress = 100);
                        let d = this.taskGroupInfoMap.get(t);
                        e.uploaded = d ? this.getUploadedSize() : 0, n = JSON.stringify(e)
                    } else n = "null"
                } while (0);
                return S.information("getTaskInfoJson", " taskInfoJson: ", n), n
            }

            updateTaskAccelerateInfo(e) {
                S.information("updateTaskAccelerateInfo", " taskId: ", e);
                do {
                    if (!e) break;
                    let t = this.getTaskUniqueIdByTaskId(e);
                    if (S.information("updateTaskAccelerateInfo", " taskUniqueId: ", t), !t || "" === t) break;
                    d.fetchSlRes({
                        url: "/group_accel/belong_batch",
                        data: {uid: this.currentUserId, tasks: [t]},
                        method: "post"
                    }).then(e => {
                        if (S.information("updateTaskAccelerateInfo fetchSlRes success res.data: ", e.data), "ok" === e.data.result && e.data.data) {
                            let t = e.data.data;
                            for (let e = 0; e < t.length; e++) {
                                let i = t[e].group_id, n = t[e].member_count, o = t[e].group_name, a = t[e].task,
                                    r = t[e].belong_status;
                                S.information("updateTaskAccelerateInfo data[", e, "]:", t[e]);
                                let s = this.taskGroupInfoMap.get(a);
                                s && (S.information("updateTaskAccelerateInfo has group"), 0 !== r ? (s.memberCount = n, s.groupName = o) : setTimeout(() => {
                                    this.exitTeam(s.taskId, i, a)
                                }, 100))
                            }
                            w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTeamInfoUpdated)
                        }
                    }).catch(() => {
                    })
                } while (0)
            }

            requestTaskTeamInfo(e) {
                do {
                    if (!e || "" === e) break;
                    S.information("requestTaskTeamInfo", " taskUniqueId: ", e), d.fetchSlRes({
                        url: "/group_accel/motorcade_list",
                        data: {task: e},
                        method: "get"
                    }).then(t => {
                        t && w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.RequestTaskTeamInfoSuccess, e, t.data)
                    }).catch(() => {
                        w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.RequestTaskTeamInfofailed, e)
                    })
                } while (0)
            }

            getTaskUniqueIdByTaskId(e) {
                S.information("getTaskUniqueIdByTaskId", " taskId: ", e);
                let t = "";
                if (e) {
                    let i = k.getTaskFromTaskId(e);
                    i && (t = this.getTaskUniqueIdByTask(i))
                }
                return S.information("getTaskUniqueIdByTaskId", " uniqueId: ", t), t
            }

            getTaskUniqueIdByTask(e) {
                let t = "";
                if (e) {
                    switch (e.getTaskBaseInfo().taskType) {
                        case c.DownloadKernel.TaskType.Bt:
                            let i = e.getExtraObject().getInfoId();
                            S.information("getTaskUniqueIdByTaskBase bt task infoId:", i), t = i;
                            break;
                        case c.DownloadKernel.TaskType.P2sp:
                        case c.DownloadKernel.TaskType.Emule:
                            let n = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.Gcid);
                            S.information("getTaskUniqueIdByTaskBase p2sp or emule task gcid: ", n), t = n
                    }
                }
                return S.information("getTaskUniqueIdByTaskId", " uniqueId: ", t), t
            }

            getTaskStatus(e) {
                S.information("getTaskStatus", " taskId: ", e);
                let t = c.DownloadKernel.TaskStatus.Unkown;
                if (e) {
                    let i = k.getTaskFromTaskId(e);
                    i && (t = i.getTaskStatus())
                }
                return S.information("getTaskStatus", " taskStatus: ", t), t
            }

            getTaskIdByTaskUniqueId(e) {
                S.information("getTaskIdByTaskUniqueId", " taskUniqueId: ", e);
                let t = 0;
                return e && "" !== e && ((t = this.taskIdMap.get(e)) || (t = 0)), S.information("getTaskIdByTaskUniqueId", " taskId: ", t), t
            }

            addTaskToExistingTeam(e) {
                do {
                    if (!e) break;
                    let t = e.getTaskBaseInfo().taskId;
                    if (!t) break;
                    S.information("addTaskToExistingTeam", " taskId: ", t);
                    let i = this.getTaskUniqueIdByTask(e);
                    if ("" !== i) {
                        S.information("addTaskToExistingTeam", " taskUniqueId: ", i), this.taskIdMap.set(i, t);
                        let e = this.taskGroupInfoMap.get(i);
                        e && (S.information("addTaskToExistingTeam has taskGroupInfo, taskGroupInfo.taskId:", e.taskId), e.taskId || (S.information("addTaskToExistingTeam do joinTeam"), this.joinTeam(t, "" + e.groupId, e.groupName, e.memberCount, i).catch()))
                    }
                    let n = e.getTaskStatus();
                    w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, t, n, i)
                } while (0)
            }

            exitAllTeam(e, t = !0) {
                if (S.information("exitAllTeam", " userId: ", e), !e) return;
                let i = new Map;
                for (let [e, t]of this.taskGroupInfoMap) this.setTaskPriority(t.taskId, 0), i.set(e, t);
                this.groupAcceleratingTaskNum = 0, this.enterGroupAccelerateTimeStamp = 0, t ? this.sendExitAllTeamCommand(e).then(e => {
                    S.information("exitAllTeam success"), this.saveGroupAccelerateInfo().then(e => {
                        S.information("exitAllTeam saveGroupAccelerateInfo")
                    }).catch(() => {
                        S.information("exitAllTeam saveGroupAccelerateInfo failed")
                    }), i.forEach((e, t) => {
                        w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnExitTeam, e.taskId, t)
                    })
                }).catch(() => {
                    S.information("exitAllTeam failed")
                }) : i.forEach((e, t) => {
                    w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnExitTeam, e.taskId, t)
                }), this.taskGroupInfoMap.clear()
            }

            updateCategoryViewTaskIdMap(e) {
                let t = e.getTasks();
                if (t) {
                    S.information("updateCategoryViewTaskIdMap tasks.size:", t.size);
                    for (let [, e]of t) if (e) {
                        let t = e.getTaskBaseInfo().taskId, i = this.getTaskUniqueIdByTask(e);
                        S.information("updateCategoryViewTaskIdMap", " taskId: ", t, " taskUniqueId: ", i), t && "" !== i && this.taskIdMap.set(i, t)
                    } else S.information("updateCategoryViewTaskIdMap bad task")
                }
            }

            updatePrivateSpaceCategoryViewTaskIdMap() {
                let e = [c.DownloadKernel.CategroyViewID.Downloading, c.DownloadKernel.CategroyViewID.Completed];
                for (let t of e) {
                    let e = I.getCurrentPrivateCategory();
                    if (e) {
                        let i = e.getCategoryViewFromId(t);
                        this.updateCategoryViewTaskIdMap(i)
                    }
                }
            }

            updateTaskIdMap() {
                S.information("updateTaskIdMap enter");
                let e = [c.DownloadKernel.CategroyViewID.Downloading, c.DownloadKernel.CategroyViewID.Completed];
                for (let t of e) {
                    S.information("updateTaskIdMap categroyViewID", t);
                    let e = b.getCategoryViewFromId(t);
                    this.updateCategoryViewTaskIdMap(e)
                }
                this.updatePrivateSpaceCategoryViewTaskIdMap()
            }

            onDetailChanged(e) {
                do {
                    if (!e) break;
                    S.information("onDetailChanged number of taskList:", e.length);
                    for (let t = 0; t < e.length; ++t) {
                        let i = e[t];
                        if (!i) continue;
                        let n = i.getTaskBaseInfo(), o = n.taskId;
                        if (!o) continue;
                        let a = this.getTaskUniqueIdByTask(i);
                        if (!a || "" === a) continue;
                        S.information("onDetailChanged", " taskId: ", o);
                        let r = this.taskIdMap.get(a);
                        S.information("onDetailChanged", " taskUniqueId: ", a, ", taskIdRecord:", r), r || (this.addTaskToExistingTeam(i), w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnReceiveGcid, o, a));
                        let s = i.getDownloadSpeed(), l = this.getIncreaseSpeedInfo(o), d = l.increaseSpeed, u = {};
                        u.uploaded = this.getUploadedSize(), u.progress = n.fileSize > 0 ? 100 * n.downloadSize / n.fileSize : 0, u.progress > 100 && (u.progress = 100), u.increased = l.increaseSize;
                        let c = JSON.stringify(u);
                        S.information("onDetailChanged", " taskSpeed: ", s, " increaseSpeed: ", d, " extraInfoStr: ", c), w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskSpeedChange, o, s, d, c, a)
                    }
                } while (0)
            }

            onTaskStatusChanged(e) {
                for (let t = 0; t < e.length; ++t) {
                    let i = e[t];
                    if (!i) continue;
                    let n = i.getId(), o = i.getTaskStatus();
                    i.getTaskPreStatus() === c.DownloadKernel.TaskStatus.StartPending && o === c.DownloadKernel.TaskStatus.Started && this.addTaskToExistingTeam(i);
                    let a = this.getTaskUniqueIdByTask(i);
                    if (!a || "" === a) continue;
                    let r = o;
                    if (S.information("onTaskStatusChanged", " taskId: ", n), S.information("onTaskStatusChanged", " taskUniqueId: ", a), S.information("onTaskStatusChanged", " status: ", r), w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, n, r, a), o === c.DownloadKernel.TaskStatus.DestroyPending) {
                        S.information("onTaskStatusChanged delete taskInfoMap taskUniqueId:", a), this.taskIdMap.delete(a);
                        let e = this.taskGroupInfoMap.get(a);
                        e && e.taskId === n && (e.taskId = 0)
                    }
                    o !== c.DownloadKernel.TaskStatus.Succeeded && o !== c.DownloadKernel.TaskStatus.Seeding || this.sendFileCompleteStat(n)
                }
            }

            onInsertToCategoryView(e, t, i) {
                if (i) if (t === c.DownloadKernel.CategroyViewID.Downloading) {
                    S.information("onInsertToCategoryView Downloading number of taskList:", i.length);
                    for (let e = 0; e < i.length; ++e) {
                        let t = i[e];
                        if (!t) continue;
                        let n = t.getId(), o = this.getTaskUniqueIdByTask(t);
                        o && "" !== o && (S.information("onInsertToCategoryView taskId: ", n, "taskUniqueId: ", o), this.taskIdMap.get(o) || this.addTaskToExistingTeam(t))
                    }
                } else if (t === c.DownloadKernel.CategroyViewID.Recycle) {
                    S.information("onInsertToCategoryView Recycle number of taskList:", i.length);
                    for (let e = 0; e < i.length; ++e) {
                        let t = i[e];
                        if (!t) continue;
                        let n = t.getId(), o = this.getTaskUniqueIdByTask(t);
                        o && "" !== o && (S.information("onInsertToCategoryView", " taskId: ", n), S.information("onInsertToCategoryView", " taskUniqueId: ", o), w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, n, 20, o))
                    }
                }
            }

            onRemoveFromCategoryView(e, t, i) {
                if (t === c.DownloadKernel.CategroyViewID.Recycle) do {
                    if (!i) break;
                    S.information("onRemoveFromCategoryView number of taskList:", i.length);
                    for (let e = 0; e < i.length; ++e) {
                        let t = i[e];
                        if (!t) continue;
                        let n = t.getId(), o = t.getTaskStatus(), a = this.getTaskUniqueIdByTask(t);
                        if (!a || "" === a) continue;
                        let r = o;
                        S.information("onRemoveFromCategoryView", " taskId: ", n), S.information("onRemoveFromCategoryView", " taskUniqueId: ", a), S.information("onRemoveFromCategoryView", " status: ", r), w.emit(v.GroupAccelerateEventManagerNS.GroupAccelerateEventType.OnTaskStatusChange, n, r, a)
                    }
                } while (0)
            }

            reportGroupAccelerateTaskInfo() {
                do {
                    if (!this.currentUserId || 0 === this.currentUserId) break;
                    S.information("reportGroupAccelerateTaskInfo", " currentUserId: ", this.currentUserId);
                    let e = new Array;
                    if (this.taskGroupInfoMap.forEach((t, i) => {
                        let n = {};
                        n.group_id = t.groupId, S.information("reportGroupAccelerateTaskInfo", " groupId: ", t.groupId), n.uid = this.currentUserId;
                        let o = t.taskId;
                        if (o) {
                            let e = k.getTaskFromTaskId(o);
                            if (e) {
                                let t = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.DownloadSize),
                                    i = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.FileSize);
                                n.rate = Math.round(1e3 * t / i) / 10, n.ul_total = this.getUploadedSize(), n.ul_time = (new Date).getTime() - this.enterGroupAccelerateTimeStamp, n.dl_speed = this.getTaskAverageSpeed(o)
                            } else n.rate = 0, n.ul_total = 0, n.ul_time = 0, n.dl_speed = 0
                        } else n.rate = 0, n.ul_total = 0, n.ul_time = 0, n.dl_speed = 0;
                        S.information("reportGroupAccelerateTaskInfo", " group_id: ", n.group_id), S.information("reportGroupAccelerateTaskInfo", " rate: ", n.rate), S.information("reportGroupAccelerateTaskInfo", " ul_total: ", n.ul_total), S.information("reportGroupAccelerateTaskInfo", " ul_time: ", n.ul_time), S.information("reportGroupAccelerateTaskInfo", " dl_speed: ", n.dl_speed), e.push(n)
                    }), e.length <= 0) break;
                    d.fetchSlRes({url: "/group_accel/report_batch", data: {data: e}, method: "post"}).then(e => {
                    }).catch(() => {
                    })
                } while (0)
            }

            checkTaskGroupAccelerateStatus() {
                S.information("checkTaskGroupAccelerateStatus this.currentUserId:", this.currentUserId), this.currentUserId && 0 !== this.currentUserId && this.loadGroupAccelerateInfo().then(e => {
                    do {
                        if (!e || e.size <= 0) {
                            S.information("checkTaskGroupAccelerateStatus bad taskGroupInfoMapTemp");
                            break
                        }
                        let t = [];
                        if (e.forEach((e, i) => {
                            let n = e.taskId;
                            if (S.information("checkTaskGroupAccelerateStatus", " taskUniqueId: ", i, " taskId: ", n), n) {
                                k.getTaskFromTaskId(n) && i && "" !== i && (S.information("checkTaskGroupAccelerateStatus has task"), t.push(i))
                            }
                        }), t.length <= 0) break;
                        d.fetchSlRes({
                            url: "/group_accel/belong_batch",
                            data: {uid: this.currentUserId, tasks: t},
                            method: "post"
                        }).then(t => {
                            if (S.information("checkTaskGroupAccelerateStatus fetchSlRes success res.data: ", t.data), "ok" === t.data.result && t.data.data) {
                                let i = t.data.data;
                                for (let t = 0; t < i.length; t++) if (S.information("checkTaskGroupAccelerateStatus data[", t, "]:", i[t]), 1 === i[t].belong_status) {
                                    let n = i[t].group_id, o = i[t].member_count, a = i[t].group_name, r = i[t].task;
                                    e.forEach((e, t) => {
                                        if (e.groupId === n && t === r) {
                                            this.joinTeam(e.taskId, "" + n, a, o, t).catch();
                                            let i = this.taskGroupInfoMap.get(t);
                                            i && (i.memberCount = o, i.groupName = a)
                                        }
                                    })
                                }
                            }
                        }).catch(() => {
                            S.information("checkTaskGroupAccelerateStatus", " fetchSlRes failed")
                        })
                    } while (0)
                }).catch(() => {
                })
            }

            sendExitAllTeamCommand(e) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (!e) break;
                        let i = new Array;
                        this.taskGroupInfoMap.forEach((e, t) => {
                            i.push(e.groupId), S.information("sendExitAllTeamCommand", " groupId: ", e.groupId)
                        }), 0 === i.length && (S.information("sendExitAllTeamCommand no group"), t = !0), d.fetchSlRes({
                            url: "/group_accel/exit_batch",
                            data: {uid: this.currentUserId, group_ids: i},
                            method: "post"
                        }).then(e => {
                            S.information("sendExitAllTeamCommand success"), t = !0
                        }).catch(() => {
                            S.information("sendExitAllTeamCommand failed"), t = !1
                        })
                    } while (0);
                    return t
                })
            }

            getUserGroupAccelerateInfo() {
                return n(this, void 0, void 0, function* () {
                    S.information("getUserGroupAccelerateInfo this.currentUserId:", this.currentUserId), this.currentUserId && 0 !== this.currentUserId && d.fetchSlRes({
                        url: "/group_accel/user_info",
                        data: {uid: this.currentUserId},
                        method: "get"
                    }).then(e => {
                        do {
                            if (S.information("getUserGroupAccelerateInfo success ", e), !e) {
                                S.information("getUserGroupAccelerateInfo bad res"), this.currentUserLicensed = !1;
                                break
                            }
                            if (!e.data) {
                                S.information("getUserGroupAccelerateInfo bad res.data"), this.currentUserLicensed = !1;
                                break
                            }
                            if (!e.data.data) {
                                S.information("getUserGroupAccelerateInfo bad res.data"), this.currentUserLicensed = !1;
                                break
                            }
                            e.data.data.have_licence && 1 === e.data.data.have_licence ? (S.information("getUserGroupAccelerateInfo licensed"), this.currentUserLicensed = !0) : (S.information("getUserGroupAccelerateInfo not licensed"), this.currentUserLicensed = !1)
                        } while (0)
                    }).catch(() => {
                        S.information("getUserGroupAccelerateInfo fail"), this.currentUserLicensed = !1
                    })
                })
            }

            getNewPercent(e, t) {
                S.information("getNewPercent", " currentPercent: ", e, " taskType: ", t);
                let i = 0, n = 0, o = 5, a = 0;
                do {
                    if (t === c.DownloadKernel.TaskType.P2sp) i = 10, n = 40, o = 5; else if (t === c.DownloadKernel.TaskType.Bt) i = 30, n = 80, o = 10; else {
                        if (t !== c.DownloadKernel.TaskType.Emule) {
                            a = e;
                            break
                        }
                        i = 20, n = 60, o = 10
                    }
                    if (e) if (e < i || e > n) a = i + (n - i) * Math.random(); else {
                        let t = e - o;
                        t < i && (t = i);
                        let r = e + o;
                        r > n && (r = n), a = t + (r - t) * Math.random()
                    } else a = i + (n - i) * Math.random()
                } while (0);
                return S.information("getNewPercent", " newPercent: ", a), a
            }

            setTaskPriority(e, t) {
                do {
                    if (!e) break;
                    if (!t || 0 !== t && 700 !== t && 999 !== t) break;
                    let i = k.getTaskFromTaskId(e);
                    if (!i) break;
                    i.getExtraObject().setTaskPriorityLevel(-1, t), S.information("taskExtra.setTaskPriorityLevel taskId: ", e, ", index: -1, priority: ", t)
                } while (0)
            }

            getTaskAverageSpeed(e) {
                let t = k.getTaskFromTaskId(e);
                if (!t) return 0;
                let i = t.getTaskAttribute(c.DownloadKernel.TaskAttribute.DownloadingPeriod),
                    n = t.getTaskAttribute(c.DownloadKernel.TaskAttribute.DownloadSize);
                0 === i && (i = 1);
                let o = Math.round(n / i);
                return S.information("getTaskAverageSpeed taskId:", e, ", taskAverageSpeed:", o), S.information("getTaskAverageSpeed downloadSize:", n, ", downloadingPeriod:", i), o
            }

            getIncreaseSpeedInfo(e) {
                let t = {increaseSpeed: 0, increaseSize: 0};
                do {
                    if (!e) break;
                    let i = k.getTaskFromTaskId(e);
                    if (!i) break;
                    let n = this.getTaskUniqueIdByTaskId(e);
                    if (!n || "" === n) break;
                    let o = this.taskGroupInfoMap.get(n);
                    if (!o) break;
                    let a = i.getTaskBaseInfo().taskType, r = o.currentPercent, s = this.getNewPercent(r, a);
                    o.currentPercent = s;
                    let l = this.getTaskP2PSpeedInfo(e), d = Math.round(s * l.p2pSpeed / 100),
                        u = Math.round(s * l.p2pSize / 100), c = o.currentIncreaseSize;
                    c += u, o.currentIncreaseSpeed = d, o.currentIncreaseSize = c, t.increaseSpeed = d, t.increaseSize = c
                } while (0);
                return t
            }

            getTaskP2PSpeedInfo(e) {
                let t = {p2pSpeed: 0, p2pSize: 0};
                do {
                    if (!e) break;
                    let i = k.getTaskFromTaskId(e);
                    if (!i) break;
                    let n = this.getTaskUniqueIdByTask(i);
                    if (!n || "" === n) break;
                    let o = this.taskGroupInfoMap.get(n);
                    if (!o) break;
                    let a = i.getTaskBaseInfo().downloadingPeriod;
                    if (!a) break;
                    let r = i.getTaskChannelInfo();
                    if (!r) break;
                    let s = r.p2pSize - r.dcdnSize;
                    if (s < 0 && (s = 0), !o.lastDownloadingPeriod || !o.lastP2PSize) {
                        o.lastDownloadingPeriod = a, o.lastP2PSize = s;
                        break
                    }
                    let l = s - o.lastP2PSize;
                    l < 0 && (l = 0), o.lastP2PSize = s;
                    let d = a - o.lastDownloadingPeriod;
                    d < 0 && (d = 0), o.lastDownloadingPeriod = a;
                    let u = 0;
                    0 !== d && (u = Math.round(l / d));
                    let c = i.getTaskBaseInfo().downloadSpeed;
                    u > c && (u = c), t.p2pSpeed = u, t.p2pSize = l
                } while (0);
                return t
            }

            getUploadedSize() {
                let e = 0, t = h.DownloadKernelManager.getTotalUploadSize();
                return t && (e = t, this.enterGroupAccelerateUploadSize && (e -= this.enterGroupAccelerateUploadSize)), e
            }

            saveGroupAccelerateInfo() {
                return n(this, void 0, void 0, function* () {
                    if (S.information("saveGroupAccelerateInfo", " currentUserId: ", this.currentUserId), !this.currentUserId) return;
                    let e = r.join(__profilesDir, "GroupAccelerate");
                    (yield s.FileSystemAWNS.existsAW(e)) || (yield s.FileSystemAWNS.mkdirsAW(e));
                    let t = r.join(__profilesDir, "GroupAccelerate\\TaskInfoEx_" + this.currentUserId + ".txt");
                    S.information("saveGroupAccelerateInfo", " filePath: ", t), S.information("saveGroupAccelerateInfo", " this.taskGroupInfoMap.size: ", this.taskGroupInfoMap.size);
                    let i = JSON.stringify([...this.taskGroupInfoMap]);
                    S.information("saveGroupAccelerateInfo", " strData: ", i), yield s.FileSystemAWNS.writeFileAW(t, i)
                })
            }

            loadGroupAccelerateInfo() {
                return n(this, void 0, void 0, function* () {
                    if (S.information("loadGroupAccelerateInfo", " currentUserId: ", this.currentUserId), !this.currentUserId) return null;
                    let e = r.join(__profilesDir, "GroupAccelerate\\TaskInfoEx_" + this.currentUserId + ".txt");
                    S.information("loadGroupAccelerateInfo", " filePath: ", e);
                    let t = yield s.FileSystemAWNS.readFileAW(e), i = null;
                    try {
                        let e = t.toString();
                        return S.information("loadGroupAccelerateInfo", " fileStr: ", e), i = new Map(JSON.parse(e))
                    } catch (e) {
                        return null
                    }
                })
            }

            sendFileCompleteStat(e) {
                do {
                    if (!e) break;
                    let t = k.getTaskFromTaskId(e);
                    if (!t) break;
                    let i = this.getTaskUniqueIdByTask(t);
                    if (!i || "" === i) break;
                    let n = t.getTaskAttribute(c.DownloadKernel.TaskAttribute.FileSize);
                    if (!n || n < 104857600) break;
                    let o = this.taskGroupInfoMap.get(i);
                    if (!o) break;
                    let r = o.previousSpeed;
                    if (!r) break;
                    let s = "pannel=complete,taskid=" + e + ",gcid=" + i + ",previos_speed=" + r + ",stop_speed=" + this.getTaskAverageSpeed(e);
                    S.information("SendFileCompleteStat", " strExtData: ", s), a.XLStatNS.trackEvent("download_pannel", "groupspeed", "", 0, 0, 0, 0, s)
                } while (0)
            }

            getIsVip() {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        y.LoginHelperNS.loginHelper.getUserInfo("vipList", function (t) {
                            T.isArray(t) && t[0] ? e("1" === t[0].isVip) : e(!1)
                        })
                    })
                })
            }
        }

        e.Manager = t;
        const i = new t;
        e.getManager = function () {
            return i
        }
    }(t.GroupAccelerateManagerNS || (t.GroupAccelerateManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), a = i(0), r = i(404), s = i(14), l = i(682), d = i(8), u = i(683),
        c = a.default.getLogger("Thunder.Skin");
    t.default = new class extends o.EventEmitter {
        constructor() {
            super(), this.skinInfo = r.SkinHelperNS.defaultSkinInfo, this.isTemp = !1, this.lsatSkinInfo = r.SkinHelperNS.defaultSkinInfo, this.featuredSkinInfo = r.SkinHelperNS.defaultSkinInfo, this.inited = !1, this.cacheURL = `${__profilesDir}/skin-info.json`, this.init().catch(e => {
                c.warning(e)
            })
        }

        init() {
            return n(this, void 0, void 0, function* () {
                {
                    let e;
                    try {
                        e = JSON.parse((yield d.FileSystemAWNS.readFileAW(this.cacheURL)).toString())
                    } catch (e) {
                        c.warning("解析皮肤信息失败")
                    }
                    e && (this.lsatSkinInfo = e, yield this.setSkinInfo(e)), this.inited = !0, this.emit("init-finish")
                }
            })
        }

        initAW() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    do {
                        if (this.inited) {
                            c.information("### inited"), e();
                            break
                        }
                        this.once("init-finish", () => {
                            c.information("### init-finish"), e()
                        })
                    } while (0)
                })
            })
        }

        getSkinInfo() {
            return this.skinInfo
        }

        getIsTemp() {
            return this.isTemp
        }

        setSkinInfo(e, t = !1, i = !1) {
            return n(this, void 0, void 0, function* () {
                if (s.ThunderUtil.isDef(e)) {
                    if (c.information("setSkinInfo in", e), this.skinInfo = e, this.isTemp = i, e.type !== r.SkinHelperNS.SkinType.Cool && (this.featuredSkinInfo = e), this.skinInfo.nativeTheme = l.SkinConfigNS.colorList.find(e => e.id === this.skinInfo.colorID).nativeTheme, this.emit("changeSkin", this.skinInfo, t, i), s.ThunderUtil.isUndef(e)) return;
                    let n = Object.assign({}, e);
                    if (delete n.colors, delete n.nativeTheme, !i && e.type !== r.SkinHelperNS.SkinType.Cool) try {
                        yield d.FileSystemAWNS.writeFileAW(this.cacheURL, JSON.stringify(n))
                    } catch (e) {
                        c.warning("保存皮肤信息失败")
                    }
                }
            })
        }

        getShakeInfo(e) {
            return n(this, void 0, void 0, function* () {
            })
        }

        handleShakeSave(e, t) {
            return n(this, void 0, void 0, function* () {
            })
        }

        getFeaturedSkinInfo() {
            return this.featuredSkinInfo
        }

        recoverSkin() {
            return n(this, void 0, void 0, function* () {
                this.lsatSkinInfo && (u.SpringFestivalSkinNS.disableSkin(), yield this.setSkinInfo(this.lsatSkinInfo))
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(62), a = i(18), r = i(0), s = i(14), l = i(8), d = i(3);
    let {isDef: u} = s.ThunderUtil;
    const c = r.default.getLogger("WallpaperManager");
    t.default = new class {
        constructor() {
            this.wallpapersURL = "https://api-xl9-ssl.xunlei.com/sl/xlppc.personalizedcenter.api/api/xskin/list", this.testPapersURL = "http://test.api-shoulei-ssl.xunlei.com/xlppc.personalizedcenter.api/api/xskin/list"
        }

        getWallpapers() {
            return n(this, void 0, void 0, function* () {
                do {
                    a.default.defaults.adapter = i(21);
                    let e = 1 === (yield d.client.callServerFunction("GetValue", "ConfigFetchInterface", "TestServer", 0)) ? this.testPapersURL : this.wallpapersURL;
                    try {
                        let t = yield a.default.get(e, {params: {page: 0, per_page: 30}});
                        if (200 === t.status && "ok" === t.data.result) {
                            this.wallpapers = t.data.list;
                            try {
                                localStorage.setItem("wallpapers", JSON.stringify(this.wallpapers))
                            } catch (e) {
                                c.warning(e)
                            }
                            break
                        }
                    } catch (e) {
                        c.warning(e)
                    }
                    if (u(this.wallpapers)) break;
                    try {
                        this.wallpapers = JSON.parse(localStorage.getItem("wallpapers"))
                    } catch (e) {
                        c.warning(e)
                    }
                } while (0);
                let e = this.wallpapers || [], t = yield this.getSpringFestivalWallpaper();
                return t && (e = [...e, t]), e
            })
        }

        getCoolWallpapers() {
            return n(this, void 0, void 0, function* () {
                do {
                    a.default.defaults.adapter = i(21);
                    let e = "https://static-xl.a.88cdn.com/json/thunderx_superskins_skins.json";
                    try {
                        let t = new o.Agent({rejectUnauthorized: !1}),
                            i = yield a.default.get(e, {timeout: 1e4, httpsAgent: t});
                        if (200 === i.status && i.data) {
                            this.coolWallpapers = i.data;
                            try {
                                c.information("get cool wallpapers", this.coolWallpapers), localStorage.setItem("coolWallpapers", JSON.stringify(this.coolWallpapers))
                            } catch (e) {
                                c.warning(e)
                            }
                            break
                        }
                    } catch (e) {
                        c.warning(e)
                    }
                    if (u(this.coolWallpapers)) break;
                    try {
                        this.coolWallpapers = JSON.parse(localStorage.getItem("coolWallpapers"))
                    } catch (e) {
                        c.warning(e)
                    }
                } while (0);
                return this.coolWallpapers || []
            })
        }

        getCoolShakes() {
            return n(this, void 0, void 0, function* () {
                do {
                    a.default.defaults.adapter = i(21);
                    let e = "https://static-xl.a.88cdn.com/json/thunderx_superskins_effects.json";
                    try {
                        let t = new o.Agent({rejectUnauthorized: !1}),
                            i = yield a.default.get(e, {timeout: 1e4, httpsAgent: t});
                        if (200 === i.status && i.data) {
                            this.coolShakes = i.data;
                            try {
                                c.information("get cool wallpapers", this.coolShakes), localStorage.setItem("coolShakes", JSON.stringify(this.coolShakes))
                            } catch (e) {
                                c.warning(e)
                            }
                            break
                        }
                    } catch (e) {
                        c.warning(e)
                    }
                    if (u(this.coolShakes)) break;
                    try {
                        this.coolShakes = JSON.parse(localStorage.getItem("coolShakes"))
                    } catch (e) {
                        c.warning(e)
                    }
                } while (0);
                return this.coolShakes || []
            })
        }

        removeImage(e) {
            return n(this, void 0, void 0, function* () {
                let t = `${__profilesDir}/skins/${e.id}`;
                return l.FileSystemAWNS.rmdirsAW(t)
            })
        }

        getImage(e) {
            return n(this, void 0, void 0, function* () {
                let t = `${__profilesDir}/skins/${e.id}/wallpaper.jpg`;
                return (yield l.FileSystemAWNS.existsAW(t)) ? (this.updateImage(e).catch(e => {
                    c.information("update skin preview error", e)
                }), t) : (yield this.updateImage(e), t)
            })
        }

        updateImage(e) {
            return n(this, void 0, void 0, function* () {
                a.default.defaults.adapter = i(21);
                try {
                    let t = yield a.default.get(e.skin_link, {responseType: "arraybuffer"});
                    if (u(t) && 200 === t.status && u(t.data) && (yield l.FileSystemAWNS.mkdirAW(`${__profilesDir}/skins`), yield l.FileSystemAWNS.writeFileAW(`${__profilesDir}/skins/${e.id}.zip`, t.data))) {
                        const {UnzipUtilitiesAWNS: t} = yield Promise.resolve().then(() => i(106));
                        yield t.uncompressZipFile(`${__profilesDir}/skins/${e.id}/`, `${__profilesDir}/skins/${e.id}.zip`)
                    }
                } catch (e) {
                    c.warning(e)
                }
            })
        }

        getShakeRes(e) {
            return n(this, void 0, void 0, function* () {
                let t = `${__profilesDir}/shake-skins/${e.id}/wallpaper.jpg`;
                return (yield l.FileSystemAWNS.existsAW(t)) ? (this.updateShakeRes(e).catch(), t) : (yield this.updateShakeRes(e), t)
            })
        }

        updateShakeRes(e) {
            return n(this, void 0, void 0, function* () {
                a.default.defaults.adapter = i(21);
                try {
                    let t = yield a.default.get(e.skin_link, {responseType: "arraybuffer"});
                    u(t) && 200 === t.status && u(t.data) && (yield l.FileSystemAWNS.mkdirAW(`${__profilesDir}/shake-skins`), yield l.FileSystemAWNS.mkdirAW(`${__profilesDir}/shake-skins/${e.id}`), yield l.FileSystemAWNS.writeFileAW(`${__profilesDir}/shake-skins/${e.id}/wallpaper.jpg`, t.data))
                } catch (e) {
                    c.warning(e)
                }
            })
        }

        getSpringFestivalWallpaper() {
            return n(this, void 0, void 0, function* () {
                let e = null;
                try {
                    let t = null;
                    try {
                        t = JSON.parse(localStorage.getItem("springFestivalSkinData"))
                    } catch (e) {
                        c.warning(e)
                    }
                    t && "on" === t.skinsiwtch && (e = {
                        id: 9999,
                        operator: "",
                        manual_order: 0,
                        name: "春节皮肤",
                        is_vip: !1,
                        is_dynamic: !1,
                        preview: t.skin_thumb,
                        skin_link: t.skin_link,
                        artist: "",
                        color: 11,
                        is_4k: !1,
                        transparency: 80,
                        created_at: 1546599635159,
                        updated_at: 1546654241407,
                        showNew: !1
                    })
                } catch (e) {
                }
                return e
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(20), a = i(0), r = i(539), s = i(14), l = i(8),
        d = a.default.getLogger("Thunder.suspension-skin.skin-manager"), u = r.SuspensionSkinHelperNS.cacheDir;
    t.default = new class extends o.EventEmitter {
        constructor() {
            super(), this.skinInfo = r.SuspensionSkinHelperNS.defaultSkinInfo, this.init().catch(e => {
                d.warning(e)
            })
        }

        init() {
            return n(this, void 0, void 0, function* () {
                (yield l.FileSystemAWNS.existsAW(u)) || (yield l.FileSystemAWNS.mkdirAW(u)), yield this.setSkinInfo(this.skinInfo)
            })
        }

        getSkinInfo() {
            return this.skinInfo
        }

        setSkinInfo(e, t = !1, i = !1) {
            return n(this, void 0, void 0, function* () {
                s.ThunderUtil.isDef(e) && (this.skinInfo = e, this.emit("changeSkin", this.skinInfo, t, i))
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t;
        !function (e) {
            e[e.Default = 0] = "Default", e[e.Vip = 1] = "Vip"
        }(t = e.SkinType || (e.SkinType = {})), e.defaultSkinInfo = {
            type: t.Default,
            id: 1,
            name: "默认皮肤"
        }, e.vipSkinInfo = {type: t.Vip, id: 2, name: "会员皮肤"}, e.cacheDir = `${__profilesDir}/suspension-skin`
    }(t.SuspensionSkinHelperNS || (t.SuspensionSkinHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), a = i(17), r = i(0), s = i(18), l = i(68), d = r.default.getLogger("vip-label-config");
    !function (e) {
        let t = void 0, i = void 0, r = new Map;

        function u() {
            return n(this, void 0, void 0, function* () {
                if (!t) {
                    let e = yield o.client.callServerFunction("GetThunderVersion"), i = e.lastIndexOf(".");
                    t = e.slice(0, i)
                }
                return t
            })
        }

        e.getConfig = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = r.get(e);
                return t || (t = yield function (e) {
                    return n(this, void 0, void 0, function* () {
                        let t = yield u(), a = yield function () {
                                return n(this, void 0, void 0, function* () {
                                    if (!i) {
                                        let e = 0, t = yield u(), n = t.split(".");
                                        if (n && 3 === n.length) {
                                            let t = Number(n[0]).valueOf(), i = Number(n[1]).valueOf(),
                                                o = Number(n[2]).valueOf(), a = 128;
                                            e = a * Math.pow(2, 24) + t * Math.pow(2, 16) + i * Math.pow(2, 8) + o
                                        }
                                        i = e
                                    }
                                    return i
                                })
                            }(), r = e, l = yield o.client.callServerFunction("GetPeerID"),
                            c = yield o.client.callServerFunction("GetTpPeerId"), h = "",
                            f = yield o.client.callServerFunction("GetUserID");
                        if ("0" !== f) {
                            let e = yield o.client.callServerFunction("GetSessionID");
                            h = `http://advertpay.vip.xunlei.com/xl11/advertisement?iver=${a}&over=${t}&userid=${f}&sessionid=${e}&scene=${r}&deviceid=${l}&cpeerid=${c}&timestamp=${Date.now()}`
                        } else h = `http://advertpay.vip.xunlei.com/xl11/advertisement?iver=${a}&over=${t}&scene=${r}&deviceid=${l}&cpeerid=${c}&timestamp=${Date.now()}`;
                        d.information(`geturl=${h}`);
                        let p = yield function (e) {
                            return n(this, void 0, void 0, function* () {
                                let t = new Promise(t => {
                                    s.default.get(e, {timeout: 1e4}).then(e => {
                                        let i = null;
                                        d.information("response vipData:", e), null !== e && 200 === e.status && null !== e.data && 0 === e.data.result && e.data.data && (i = e.data.data), t(i)
                                    }).catch(e => {
                                        d.warning("err:", e), t(null)
                                    })
                                });
                                return t
                            })
                        }(h);
                        return d.information("key", e, "configdata", p), p
                    })
                }(e), r.set(e, t)), t
            })
        }, function () {
            a.NativeCallModule.nativeCall.AttachNativeEvent("onUserInfoChange", (e, t) => n(this, void 0, void 0, function* () {
                if ("vipinfo" === e) {
                    d.information("onUserInfoChange");
                    let e = !1;
                    try {
                        let t = JSON.parse(yield o.client.callServerFunction("GetUserInfo", 2));
                        t && (e = Boolean(t.isVip))
                    } catch (e) {
                        d.warning(e)
                    }
                    e && r.clear()
                }
            })), a.NativeCallModule.nativeCall.AttachNativeEvent("onLoginStatusChange", (e, t) => {
                d.information("onLoginStatusChange", "newStatus", t), "unlogin" === t || "offline" === t ? r.clear() : "online" === t && r.clear()
            })
        }(), e.getConfigUrl = function (e, t, i, n) {
            if (i) {
                let n = l.ParseUrlFileNameNS.parseDynamicUrlPath(i.toLowerCase()),
                    o = l.ParseUrlFileNameNS.parseDynamicUrlArgs(n.args), a = Object.getOwnPropertyNames(o), r = "";
                for (let i = 0; i < a.length; ++i) {
                    let n = a[i];
                    r += "referfrom" === n && e ? `&${n}=${e}` : "aidfrom" === n && t ? `&${n}=${t}` : `&${n}=${o[n]}`
                }
                return a.indexOf("referfrom") < 0 && (r += `&referfrom=${e}`), a.indexOf("aidfrom") < 0 && (r += `&aidfrom=${t}`), `${n.pageFileName}?${r.substr(1)}`
            }
            return n ? `${n}?referfrom=${e}&aidfrom${t}` : ""
        }
    }(t.VipLableConfigNS || (t.VipLableConfigNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(14), r = i(0), s = i(20), l = i(3), d = i(72),
        u = r.default.getLogger("vip-plugin-switch-config");
    let {isDef: c, isUndef: h} = a.ThunderUtil;
    !function (e) {
        const t = "http://media.info.client.xunlei.com/VipPluginSwitchConfig.json";
        let r = new s.EventEmitter;
        r.setMaxListeners(0);
        let f = void 0, p = void 0, g = void 0;

        function m(e) {
            g = e, r.emit("OnVipRenewButtonEnable", g)
        }

        function v() {
            return n(this, void 0, void 0, function* () {
                if (!f) {
                    let e = yield l.client.callServerFunction("GetThunderVersion"), t = e.lastIndexOf(".");
                    f = e.slice(0, t)
                }
                return f
            })
        }

        (function () {
            return n(this, void 0, void 0, function* () {
                u.information("init");
                let e = yield function () {
                    return n(this, void 0, void 0, function* () {
                        let e = null, n = null;
                        try {
                            o.default.defaults.adapter = i(21), o.default.defaults.timeout = 2e3, n = yield o.default.get(t)
                        } catch (e) {
                            u.warning(e)
                        }
                        return null !== n && 200 === n.status && c(n.data) && (e = n.data), e
                    })
                }();
                u.information("OnGetConfigs", e);
                do {
                    if (h(e) || h(e.VipRenewButtonEnable)) break;
                    let t = e.VipRenewButtonEnable;
                    const i = t.version, n = t.peeridSha256;
                    if (!i || !n) break;
                    let o = yield v();
                    u.information("version", o);
                    let r = !1;
                    for (let e of i) if (2 === e.length && a.ThunderUtil.versionCompare(o, e[0]) >= 0 && a.ThunderUtil.versionCompare(o, e[1]) <= 0) {
                        r = !0;
                        break
                    }
                    const s = yield l.client.callServerFunction("GetPeerID");
                    if (u.information("peerid", s), !r || !s) break;
                    let c = d.createHash("sha256");
                    c.update(s);
                    let f = c.digest("hex"), p = f[f.length - 1];
                    u.information("hex", f, "char", p), p && (p = p.toUpperCase(), n.includes(p) && h(g) && m(1))
                } while (0);
                h(g) && m(0), c(e) && c(e.ToolbarVipButtonEnable) && (p = e.ToolbarVipButtonEnable), h(p) && (p = 0), r.emit("OnToolbarVipButtonEnable", p)
            })
        })().catch(), e.getToolbarVipButtonEnable = function () {
            return n(this, void 0, void 0, function* () {
                let e = null;
                return c(p) ? (e = p, u.information("getToolbarVipButtonEnable", e)) : e = new Promise(e => n(this, void 0, void 0, function* () {
                    r.once("OnToolbarVipButtonEnable", t => {
                        u.information("getToolbarVipButtonEnable", t), e(t)
                    })
                })), e
            })
        }, e.getVipRenewButtonEnable = function () {
            return n(this, void 0, void 0, function* () {
                let e = null;
                return c(g) ? (e = g, u.information("getVipRenewButtonEnable", e)) : e = new Promise(e => n(this, void 0, void 0, function* () {
                    r.once("OnVipRenewButtonEnable", t => {
                        u.information("getVipRenewButtonEnable", t), e(t)
                    })
                })), e
            })
        }
    }(t.VipPluginSwitchConfigNS || (t.VipPluginSwitchConfigNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(23), r = "https://api-u-ssl.xunlei.com";
    !function (e) {
        let t = "", i = "", s = "", l = "", d = {};
        e.recommend = function () {
            return n(this, void 0, void 0, function* () {
                let e = yield o.default.request({
                    url: "https://api-u-ssl.xunlei.com/videos/ProgramList",
                    method: "post",
                    data: {
                        category: "movie",
                        platform: "xlx",
                        page: 1,
                        show_type: 1,
                        num: 15,
                        pagefrom: "index_recommend"
                    },
                    headers: {"Content-Type": "text/plain"}
                }).catch();
                return 200 === e.status && e.data.data && e.data.data.list && e.data.data.list || null
            })
        }, e.search = function (e) {
            return n(this, void 0, void 0, function* () {
                let u = `${r}/videos/search`;
                o.default.defaults.headers["Content-Type"] = "application/json", yield function () {
                    return n(this, void 0, void 0, function* () {
                        let e = yield a.LoginHelperNS.loginHelper.getUserInfoAw();
                        null !== e && void 0 !== e && (t = void 0 === e.sessionid ? "" : e.sessionid, i = void 0 === e.deviceid ? "" : e.deviceid, s = void 0 === e.userid ? "" : e.userid, l = void 0 === e.usernick ? "" : e.usernick, d = {
                            Cookie: `userid=${s},sessionid=${t}`,
                            deviceid: i,
                            "Content-Type": "Content-Type: text/plain"
                        })
                    })
                }();
                let c = {
                    platform: "pc",
                    referfrom: "v_pc_xlx_ggong_vipspecial_dhl",
                    show_type: 0,
                    content: e,
                    app_id: "103",
                    userid: s,
                    sessionid: t,
                    deviceId: i,
                    appVersion: null,
                    session_type: 2,
                    nick_name: l,
                    refer: ""
                }, h = yield o.default.post(u, c, {headers: d}).catch();
                return 200 !== h.status ? null : h.data.data.list || null
            })
        }
    }(t.MovieRecommendNS || (t.MovieRecommendNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(7).default(o.join(__rootDir, "../bin/ThunderHelper.node")), r = 1;
    let s = new Map;

    function l(e, t, i, n, o) {
        a.createRegKey(e, t), a.writeRegValue(e, t, i, n, o)
    }

    function d(e) {
        do {
            if (!e || "" === e) break;
            let t = s.get(e);
            if (!t) break;
            let i = "Xunlei." + t[0] + ".6", n = o.join(__rootDir, "../../" + t[2]),
                a = o.join(__rootDir, "../../Thunder.exe"), d = "Software\\Classes\\." + e;
            l("HKEY_CURRENT_USER", d, "", i, r), l("HKEY_CURRENT_USER", d = "Software\\Classes\\" + i, "", t[1], r), l("HKEY_CURRENT_USER", d = "Software\\Classes\\" + i + "\\DefaultIcon", "", n, r), l("HKEY_CURRENT_USER", d = "Software\\Classes\\" + i + "\\Shell\\Open", "", t[3], r), l("HKEY_CURRENT_USER", d = "Software\\Classes\\" + i + "\\Shell\\Open\\command", "", '"' + a + '" "%1" -StartType:' + e, r)
        } while (0)
    }

    function u(e) {
        do {
            if (!e || "" === e) break;
            let t = s.get(e);
            if (!t) break;
            let i = "Software\\Classes\\." + e;
            a.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Classes\\" + t[0], a.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e + "\\OpenWithList", a.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e + "\\OpenWithProgids", a.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e + "\\UserChoice", a.deleteRegKey("HKEY_CURRENT_USER", i), i = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e, a.deleteRegKey("HKEY_CURRENT_USER", i), d(e), a.refreshIcon()
        } while (0)
    }

    function c(e) {
        do {
            let t = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e + "\\OpenWithList",
                i = a.readRegString("HKEY_CURRENT_USER", t, "MRUList");
            if (null === i || void 0 === i || "" === i) break;
            let n = i.substring(0, 1);
            null !== (i = a.readRegString("HKEY_CURRENT_USER", t, n)) && void 0 !== i && "" !== i && "Thunder.exe" !== i && u(e)
        } while (0)
    }

    s.set("td", ["TDFile", "迅雷临时数据文件", "XLTempFile.ico", "使用迅雷下载未完成文件"]), s.set("xltd", ["TDFile", "迅雷临时数据文件", "XLTempFile.ico", "使用迅雷下载未完成文件"]), s.set("downlist", ["LSTFile", "迅雷专有下载文件", "XLDownloadList.ico", "使用迅雷下载该任务列表文件"]), s.set("torrent", ["Bittorrent", "BT种子文件", "TorrentFile.ico", "使用迅雷下载该BT文件"]), s.set("thunderskin", ["ThunderSkin", "迅雷9皮肤文件", "thunderskin.ico", "为迅雷9应用该皮肤"]), s.set("xlb", ["XLB", "迅雷下载合集文件", "DownloadCollection.ico", "使用迅雷查看该下载合集文件"]), function (e) {
        function t(e) {
            do {
                if (!e || "" === e) break;
                let t = s.get(e);
                if (!t) break;
                let i = "Xunlei." + t[0] + ".6";
                if (a.readRegString("HKEY_CURRENT_USER", "Software\\Classes\\." + e, "") === i) break;
                a.deleteRegKey("HKEY_CURRENT_USER", "Software\\Classes\\." + e), a.deleteRegKey("HKEY_CURRENT_USER", "Software\\Classes\\" + t[0]), a.deleteRegKey("HKEY_CURRENT_USER", "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\." + e), d(e), a.refreshIcon()
            } while (0)
        }

        function i(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    let i = '"' + o.join(__rootDir, "../../Thunder.exe") + '" "%1" -StartType:' + e;
                    if (a.queryRegValue("HKEY_CURRENT_USER", "Software\\classes\\" + e + "\\Shell\\Open\\command", "") === i) break;
                    a.deleteRegKey("HKEY_CURRENT_USER", "Software\\classes\\" + e), l("HKEY_CURRENT_USER", "Software\\classes\\" + e, "URL Protocol", "", r), l("HKEY_CURRENT_USER", "Software\\classes\\" + e + "\\Shell\\Open\\command", "", i, r), t = !0
                } while (0);
                return t
            })
        }

        e.checkAndRegisterFileType = t, e.checkAndRegisterTorrentFile = function () {
            {
                let e = o.join(__rootDir, "../../Thunder.exe"), i = "torrent",
                    n = a.readRegString("HKEY_CURRENT_USER", "Software\\Classes\\Xunlei.Bittorrent.6\\Shell\\Open\\command", "");
                n && "" !== n ? (n.includes(e) || t(i), c(i)) : t(i)
            }
        }, e.doAsynCheckAndRegisterProtocal = i, e.asynCheckAndAssociate = function () {
            return n(this, void 0, void 0, function* () {
                t("td"), t("downlist"), yield i("ed2k"), yield i("magnet"), yield i("thunder"), yield i("thunderx"), yield i("xlb")
            })
        }
    }(t.FileAssociationNS || (t.FileAssociationNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(0), r = i(8), s = i(14), l = a.default.getLogger("plugin-updater");

    class d {
        constructor(e) {
            this.dir = "", this.versionsDir = "", l.verbose("constructor", "dir", e), this.dir = e, this.versionsDir = o.join(e, "versions")
        }

        static getPluginUpdater(e) {
            return new d(e)
        }

        install(e, t) {
            return n(this, void 0, void 0, function* () {
                l.information("install", "version", e, "src", t);
                try {
                    const i = yield this.getCurVersion();
                    if (s.ThunderUtil.versionCompare(i, e) >= 0) return;
                    yield this.save(e, t), yield this.setCurVersion(e)
                } catch (e) {
                    l.warning(e)
                }
            })
        }

        active() {
            return n(this, void 0, void 0, function* () {
                l.information("active");
                try {
                    const e = yield this.getCurVersion();
                    yield this.clear(this.versionsDir, e)
                } catch (e) {
                    l.warning(e)
                }
            })
        }

        getCurFilePath() {
            return n(this, void 0, void 0, function* () {
                l.information("getCurFilePath");
                try {
                    const e = yield this.getCurVersion();
                    if (e) return o.join(this.versionsDir, e)
                } catch (e) {
                    l.warning(e)
                }
                return ""
            })
        }

        clear(e, t) {
            return n(this, void 0, void 0, function* () {
                return l.information("clear", "src", e, "exclude", t), (yield r.FileSystemAWNS.readdirAW(e)).filter(e => e !== t).map(e => r.FileSystemAWNS.rmdirsAW(o.join(this.versionsDir, e)))
            })
        }

        save(e, t) {
            return n(this, void 0, void 0, function* () {
                yield r.FileSystemAWNS.mkdirsAW(this.dir), yield r.FileSystemAWNS.mkdirsAW(this.versionsDir);
                const i = o.join(this.versionsDir, e);
                return r.FileSystemAWNS.copyDirsAW(t, i)
            })
        }

        getCurVersion() {
            return n(this, void 0, void 0, function* () {
                return (yield r.FileSystemAWNS.readFileAW(`${this.dir}/VERION.txt`)).toString()
            })
        }

        setCurVersion(e) {
            return n(this, void 0, void 0, function* () {
                return r.FileSystemAWNS.writeFileAW(`${this.dir}/VERION.txt`, e)
            })
        }
    }

    t.default = d
}, function (e, t, i) {
    "use strict";
    var n = i(1004);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(0), r = i(7), s = i(4), l = i(26), d = i(777), u = i(33), c = i(13), h = i(44), f = i(47),
        p = i(42), g = i(8), m = a.default.getLogger("DownloadKernel.Upgrade"),
        v = r.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        y = l.DownloadKernelCategoryManager.getCategoryManager(), T = d.PrivateSpaceUpgradeNS.getUpgrade(),
        w = h.DownloadKernelCategoryViewManager.getCategoryViewManager();

    class k extends f.default {
        constructor() {
            super(...arguments), this.eventUpgradeProgress = "OnUpgradeProgress", this.totalTaskCount = 0, this.upgradeTaskCount = 0
        }

        upgradeP2sp(e) {
            let t = e.getSavePath(), i = e.getTaskName();
            return m.information("upgradeP2sp savePath:", t, ", taskName:", i), new Promise(e => {
                v.asyncUpgradeP2spTask(t, i, t => {
                    e(t)
                })
            })
        }

        upgradeBt(e) {
            let t = e.getExtraObject(), i = t.getFileCount(), a = t.getSeedFilePath(), r = o.parse(a), s = r.dir,
                l = r.name + r.ext, d = e.getSavePath(), u = t.getDisplayName(), c = "";
            if (1 !== i) d = o.join(d, u); else {
                let e = t.getBtFileInfoList();
                c = e[0].fileName
            }
            return m.information("upgradeBt savePath:", d, ", taskName:", u, ", fileCount:", i, ", seedFilePath:", a, ", seedFileName:", l), new Promise(e => {
                v.asyncUpgradeBtTask(d, l, s, t => n(this, void 0, void 0, function* () {
                    if (t && 1 === i) {
                        let e = o.join(d, u);
                        (yield g.FileSystemAWNS.existsAW(e)) || (yield g.FileSystemAWNS.mkdirAW(e));
                        let t = o.join(d, c), i = o.join(e, c);
                        t += ".bt.xltd", i += ".bt.xltd", (yield g.FileSystemAWNS.existsAW(i)) || (yield g.FileSystemAWNS.renameAW(t, i));
                        let n = o.join(d, l), a = o.join(e, l);
                        (yield g.FileSystemAWNS.existsAW(a)) || (yield g.FileSystemAWNS.renameAW(n, a))
                    }
                    e(t)
                }))
            })
        }

        upgradeEmule(e) {
            let t = e.getSavePath(), i = e.getTaskName(),
                n = e.getTaskAttribute(s.DownloadKernel.TaskAttribute.TaskUrl);
            return p.Common.isThunderPrivateUrl(n) && (n = p.Common.parseThunderPrivateUrl(n)), m.information("upgradeEmule url:", n, ", savePath:", t, ", taskName:", i), new Promise(e => {
                v.asyncUpgradeEmuleTask(n, t, i, t => {
                    e(t)
                })
            })
        }

        upgradeGroup(e) {
            return new Promise(t => {
                let i = e.getExtraObject(), n = i.getSubTaskCount();
                if (n > 0) for (let e = 0; e < n; e++) {
                    let n = i.getSubTaskByIndex(e);
                    n.getType() !== s.DownloadKernel.TaskType.Group && this.upgradeCategoryViewTask(n).then(e => {
                        t(e)
                    }).catch()
                } else t(!0)
            })
        }

        upgradeCategoryViewTask(e) {
            return n(this, void 0, void 0, function* () {
                let t = e.getType();
                return t === s.DownloadKernel.TaskType.P2sp ? this.upgradeP2sp(e) : t === s.DownloadKernel.TaskType.Bt ? this.upgradeBt(e) : t === s.DownloadKernel.TaskType.Emule && this.upgradeEmule(e)
            })
        }

        upgradeCategoryView(e) {
            let t = e.getTasks();
            if (t.size <= 0) return !1;
            this.totalTaskCount += t.size, this.fireEvent(this.eventUpgradeProgress, this.totalTaskCount, this.upgradeTaskCount);
            for (let [, e]of t) {
                e.getType() === s.DownloadKernel.TaskType.Group ? this.upgradeGroup(e).then(t => {
                    this.upgradeTaskCount += 1, m.information("upgradeGroup return. this.upgradeTaskCount:", this.upgradeTaskCount, ", result:", t, ", taskName:", e.getTaskName()), this.fireEvent(this.eventUpgradeProgress, this.totalTaskCount, this.upgradeTaskCount)
                }).catch() : this.upgradeCategoryViewTask(e).then(t => {
                    this.upgradeTaskCount += 1, m.information("upgradeCategoryViewTask return. this.upgradeTaskCount:", this.upgradeTaskCount, ", result:", t, ", taskName:", e.getTaskName()), this.fireEvent(this.eventUpgradeProgress, this.totalTaskCount, this.upgradeTaskCount)
                }).catch()
            }
            return !0
        }

        init() {
            let e = o.join(__rootDir, "../bin/SDK/");
            return v.initUpgrade(e)
        }

        upgradePrivateSpace(e) {
            return T.upgradePrivateSpace(e)
        }

        startUpgrade() {
            this.totalTaskCount = 0, this.upgradeTaskCount = 0, u.DownloadKernelManager.attachListener(c.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, () => {
                let e = w.getCategoryViews();
                for (let t = 0; t < e.length; t++) {
                    let i = e[t], n = i.getCategoryViewId();
                    n !== s.DownloadKernel.CategroyViewID.Downloading && n !== s.DownloadKernel.CategroyViewID.Recycle || this.upgradeCategoryView(i)
                }
                let t = y.getCategorys();
                for (let [, e]of t) {
                    let t = e.getCategoryViews();
                    for (let e = 0; e < t.length; e++) {
                        let i = t[e], n = i.getCategoryViewId();
                        n !== s.DownloadKernel.CategroyViewID.Downloading && n !== s.DownloadKernel.CategroyViewID.Recycle || this.upgradeCategoryView(i)
                    }
                }
            })
        }
    }

    t.DownloadKernelUpgrade = k, function (e) {
        const t = new k;
        e.getUpgrade = function () {
            return t
        }
    }(t.DownloadKernelUpgradeNS || (t.DownloadKernelUpgradeNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(47), r = i(29), s = i(8), l = i(75), d = i(150), u = i(10), c = i(66), h = i(0), f = i(9),
        p = i(28), g = i(15), m = h.default.getLogger("AdPlatform");
    var v;
    !function (e) {
        e.waiting = "waiting", e.abort = "abort", e.ready = "ready"
    }(v || (v = {}));
    t.adPlatform = new class extends a.default {
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57), a = i(3), r = i(72), s = i(29), l = i(549), d = i(0).default.getLogger("scancode"), u = i(7),
        c = i(2), h = u.default(c.join(__rootDir, "../bin/ThunderHelper.node"));
    let f = c.join(__rootDir, "../../Thunder.exe"), p = h.getFileVersion(f).split("."), g = p[p.length - 1], m = null,
        v = null;
    const y = "14";

    function T(e, t) {
        let i = "xl_pc" + g + e + String(t);
        return (i = s.ToolsUtilitiesAWNS.genarateMd5(i)).substr(0, 16).toUpperCase()
    }

    function w(e, t) {
        let i = null;
        try {
            let n = r.createCipheriv("aes-128-ecb", t, ""), o = n.update(e), a = n.final();
            i = Buffer.concat([o, a])
        } catch (e) {
            d.error("encryptBuffer", e)
        }
        return i
    }

    function k(e, t) {
        d.information("key", t);
        let i = JSON.stringify(e);
        return d.information("jsonStr", i), w(Buffer.from(i), t)
    }

    function C(e, t) {
        let i = null;
        try {
            let n = r.createDecipheriv("aes-128-ecb", t, ""), o = n.update(e), a = n.final();
            i = Buffer.concat([o, a])
        } catch (e) {
            d.error("decryptBuffer", e)
        }
        return i
    }

    function b(e, t) {
        d.information("key", t);
        let i = null;
        if (e = C(e, t)) {
            let t = e.toString();
            d.information("jsonStr", t);
            try {
                i = JSON.parse(t)
            } catch (e) {
                d.warning(e)
            }
        }
        return i
    }

    t.queryAccelerationTimes = function () {
        return n(this, void 0, void 0, function* () {
            m || (m = yield a.client.callServerFunction("GetDeviceIdOfWebSDKPlugin")), v || (v = yield a.client.callServerFunction("GetPeerID"));
            let e = yield a.client.callRemoteClientFunction("User", "UserGetAccessToken").catch(),
                t = {_h: {"Device-Id": m, "Peer-Id": v, Authorization: e && e[0]}}, i = yield o.fetchSlRes({
                    url: "/xlppc.scancode.acceleration/api/acceleration/times/inquiry",
                    data: t,
                    method: "get"
                }).catch();
            return d.warning("### queryAccelerationTimes", i, JSON.stringify(t)), 200 === i.status && i.data && "ok" === i.data.result ? i.data : {}
        })
    }, t.getShortlink = function (e, t = "") {
        return n(this, void 0, void 0, function* () {
            e.client_version = g, e.client_name = "xl_pc", e.release_version = "1.0.0", m || (m = yield a.client.callServerFunction("GetDeviceIdOfWebSDKPlugin"));
            let i = yield a.client.callRemoteClientFunction("User", "UserGetAccessToken").catch();
            e._h = {Authorization: i && "Bearer " + i[0]}, e.device_id = m, e.peer_id = v, e.app_id = y;
            let n = yield o.fetchSlRes({
                url: "/xlppc.scancode.acceleration/api/shortlink" + t,
                data: e,
                method: "post"
            }, "prod", !1).catch();
            return d.warning("### res", n, e), n && 200 === n.status ? n.data && n.data.accelerated ? [n.data.shortlink, ""] : ["", n.data.reason || n.data.result] : ["", "status_not_200"]
        })
    }, t.accelerateTask = function () {
        return n(this, void 0, void 0, function* () {
            return "ok"
        })
    }, t.accelerateTest = function (e) {
        return n(this, void 0, void 0, function* () {
            e.credential = "0978", e.device_id = m;
            let t = yield o.fetchSlRes({
                url: "/xlppc.scancode.acceleration/api/accelerate",
                data: e,
                method: "post"
            }).catch();
            d.warning("### accelerateTest", t)
        })
    }, t.queryToken = function (e, t) {
        return n(this, void 0, void 0, function* () {
            const n = yield i(18);
            n.defaults.adapter = i(21), n.defaults.headers["Content-Type"] = "application/octet-stream";
            const o = yield Promise.all([a.client.callServerFunction("GetUserID"), a.client.callServerFunction("GetPeerID"), a.client.callServerFunction("GetVipInfo")]), [r, s, u] = o;
            let c = `${r}:${e.trialVerifyInfo}`, h = Math.floor((new Date).getTime() / 1e3),
                f = `client_name=xl_pc&client_version=${g}&release_version=1.0.0&client_sequence=123456&r=${h}&verify_type=1&isgroup=0&isvip=${u.isVip}`,
                p = T(r, h), m = {peer_id: s, task_infos: e.task_infos};
            e.infohash && (m.infohash = e.infohash, m.bt_title = e.bt_title);
            let v = k(m, p), y = "/speed/speedup";
            t && (y = "/speed/res_status");
            let w = `http://ali.pc-x.speed.auth.vip.xunlei.com${y}?${f}`, C = {
                    Authorization: `Basic ${new Buffer(c).toString("base64")}`,
                    Accept: "application/json;version=1.3"
                }, b = yield n.request({method: "post", url: w, data: v, headers: C}),
                I = l.VipTaskHttpPackageNS.praseTokenBuffer(r, h, b.data, !1);
            return d.information("query token", I), I
        })
    }, t.encryptBuffer = w, t.encryptHttpBuffer = k, t.decryptBuffer = C, t.praseTokenBuffer = function (e, t, i, n) {
        const o = n ? "praseStatusBuffer" : "praseTokenBuffer";
        d.information(`--\x3e${o}`);
        let a = b(i, T(e, t)), r = null;
        return a && ((r = a).detailMessage = a.message, r.message = a.simple_msg), d.information(`<--${o}`), r
    }, t.decryptHttpBuffer = b
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(550), a = i(551), r = i(3), s = i(0).default.getLogger("VipDownload:token-query"), l = i(7), d = i(2),
        u = l.default(d.join(__rootDir, "../bin/ThunderHelper.node"));
    let c = d.join(__rootDir, "../../Thunder.exe"), h = u.getFileVersion(c).split("."), f = h[h.length - 1];
    !function (e) {
        function t(e, t) {
            let i = "xl_pc" + f + e + t;
            return (i = a.ToolsUtilitiesAWNS.genarateMd5(i)).substr(0, 16).toUpperCase()
        }

        e.createTokenBuffer = function (e, i, a) {
            return n(this, void 0, void 0, function* () {
                const n = a ? "createStatusBuffer" : "createTokenBuffer";
                s.information(`--\x3e${n}`);
                let l = [];
                for (let t = 0; t < e.files.length; ++t) {
                    let n = e.files[t], o = {
                        url: n.url,
                        filename: n.fileName,
                        gcid: n.gcid,
                        cid: n.cid,
                        filesize: n.fileSize,
                        refer_url: n.refUrl,
                        cookies: "",
                        file_index: 2 === e.taskType ? n.subId : void 0,
                        tokeninfo: e.oldTokens ? e.oldTokens[t] : ""
                    };
                    l.push(o), i.set(n.gcid, n.subId)
                }
                let d = {
                    peer_id: yield r.client.callServerFunction("GetPeerID"),
                    infohash: e.infoId,
                    bt_title: e.btTitle,
                    task_infos: l,
                    extra_infos: {bt_token_mode: 1}
                }, u = t(e.userId, e.random), c = o.HttpJsonCryptoNS.encryptHttpBuffer(d, u);
                return s.information(`<--${n}`), c
            })
        }, e.praseTokenBuffer = function (e, i, n, a) {
            const r = a ? "praseStatusBuffer" : "praseTokenBuffer";
            s.information(`--\x3e${r}`);
            let l = t(e, i), d = o.HttpJsonCryptoNS.decryptHttpBuffer(n, l), u = null;
            return d && ((u = d).detailMessage = d.message, u.message = d.simple_msg), s.information(`<--${r}`), u
        }
    }(t.VipTaskHttpPackageNS || (t.VipTaskHttpPackageNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(97), o = i(551), a = i(117), r = i(411), s = i(0).default.getLogger("xmp-vip-json-crypto");
    !function (e) {
        e.getAuthorization = function (e, t, i, n) {
            let o = e + ":" + t;
            return i && (o = o + ":" + i), n && (o = o + ":" + n), o
        }, e.getAccept = function () {
            return "application/json; version=1.0"
        }, e.getUriParam = function (e, t, i) {
            let n = "client_name=" + r.default.clientName + "&client_version=" + r.default.thunderVersionNumber + "&client_sequence=" + e + "&r=" + t + "&isvip=" + Number(a.default.isVip);
            return void 0 !== i && (n = n + "&verify_type=" + i), n
        }, e.getKey = function (e, t) {
            let i = r.default.clientName + r.default.thunderVersionNumber + e + t;
            return (i = o.ToolsUtilitiesAWNS.genarateMd5(i)).substr(0, 16).toUpperCase()
        }, e.encryptHttpBuffer = function (e, t) {
            s.information("key", t);
            let i = JSON.stringify(e);
            s.information("jsonStr", i);
            let a = n.Buffer.from(i);
            return o.ToolsUtilitiesAWNS.encryptBuffer(a, t)
        }, e.decryptHttpBuffer = function (e, t) {
            s.information("key", t);
            let i = null;
            if (e = o.ToolsUtilitiesAWNS.decryptBuffer(e, t)) {
                let t = e.toString();
                s.information("jsonStr", t);
                try {
                    i = JSON.parse(t)
                } catch (e) {
                    s.warning(e)
                }
            }
            return i
        }
    }(t.HttpJsonCryptoNS || (t.HttpJsonCryptoNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(72), a = i(41), r = i(787), s = i(0).default.getLogger("xmp-vip-tools-utilities");
    !function (e) {
        e.genarateMd5 = function (e) {
            let t = void 0, i = o.createHash("md5");
            return null !== i && (t = i.update(e).digest("hex")), t
        }, e.calculateFileMd5Ex = function (e) {
            return n(this, void 0, void 0, function* () {
                let t;
                if (e && (yield r.FileSystemAWNS.existsAW(e))) {
                    let i = a.createReadStream(e), n = o.createHash("md5");
                    i.on("data", e => {
                        n.update(e)
                    }), t = new Promise(e => {
                        i.on("end", () => {
                            let t = n.digest("hex");
                            t = t.toUpperCase(), e(t)
                        })
                    })
                } else t = new Promise(e => {
                    e(void 0)
                });
                return t
            })
        }, e.encryptBuffer = function (e, t) {
            let i = null;
            try {
                let n = o.createCipheriv("aes-128-ecb", t, ""), a = n.update(e), r = n.final();
                i = Buffer.concat([a, r])
            } catch (e) {
                s.error("encryptBuffer", e)
            }
            return i
        }, e.decryptBuffer = function (e, t) {
            let i = null;
            try {
                let n = o.createDecipheriv("aes-128-ecb", t, ""), a = n.update(e), r = n.final();
                i = Buffer.concat([a, r])
            } catch (e) {
                s.error("decryptBuffer", e)
            }
            return i
        }, e.encryptSha1Buffer = function (e) {
            let t = null;
            try {
                t = o.createHash("sha1").update(e).digest("hex")
            } catch (e) {
                s.error("encryptSha1Buffer", e)
            }
            return t
        }
    }(t.ToolsUtilitiesAWNS || (t.ToolsUtilitiesAWNS = {}))
}, function (e, t, i) {
    var n = i(93), o = i(86), a = i(413), r = i(796), s = i(797), l = i(798), d = i(799), u = i(800), c = i(553),
        h = i(801), f = i(804), p = i(805), g = i(87), m = i(806), v = i(556);

    function y(e, t, i) {
        var n, o, a = e.size, r = p.getEncodedBits(t, i);
        for (n = 0; n < 15; n++) o = 1 == (r >> n & 1), n < 6 ? e.set(n, 8, o, !0) : n < 8 ? e.set(n + 1, 8, o, !0) : e.set(a - 15 + n, 8, o, !0), n < 8 ? e.set(8, a - n - 1, o, !0) : n < 9 ? e.set(8, 15 - n - 1 + 1, o, !0) : e.set(8, 15 - n - 1, o, !0);
        e.set(a - 8, 8, 1, !0)
    }

    function T(e, t, i) {
        var a = new r;
        i.forEach(function (t) {
            a.put(t.mode.bit, 4), a.put(t.getLength(), g.getCharCountIndicator(t.mode, e)), t.write(a)
        });
        var s = 8 * (o.getSymbolTotalCodewords(e) - c.getTotalCodewordsCount(e, t));
        for (a.getLengthInBits() + 4 <= s && a.put(0, 4); a.getLengthInBits() % 8 != 0;) a.putBit(0);
        for (var l = (s - a.getLengthInBits()) / 8, d = 0; d < l; d++) a.put(d % 2 ? 17 : 236, 8);
        return function (e, t, i) {
            for (var a = o.getSymbolTotalCodewords(t), r = c.getTotalCodewordsCount(t, i), s = a - r, l = c.getBlocksCount(t, i), d = l - a % l, u = Math.floor(a / l), f = Math.floor(s / l), p = f + 1, g = u - f, m = new h(g), v = 0, y = new Array(l), T = new Array(l), w = 0, k = new n(e.buffer), C = 0; C < l; C++) {
                var b = C < d ? f : p;
                y[C] = k.slice(v, v + b), T[C] = m.encode(y[C]), v += b, w = Math.max(w, b)
            }
            var I, S, _ = new n(a), D = 0;
            for (I = 0; I < w; I++) for (S = 0; S < l; S++) I < y[S].length && (_[D++] = y[S][I]);
            for (I = 0; I < g; I++) for (S = 0; S < l; S++) _[D++] = T[S][I];
            return _
        }(a, e, t)
    }

    function w(e, t, i, n) {
        var a;
        if (v(e)) a = m.fromArray(e); else {
            if ("string" != typeof e) throw new Error("Invalid data");
            var r = t;
            if (!r) {
                var c = m.rawSplit(e);
                r = f.getBestVersionForData(c, i)
            }
            a = m.fromString(e, r || 40)
        }
        var h = f.getBestVersionForData(a, i);
        if (!h) throw new Error("The amount of data is too big to be stored in a QR Code");
        if (t) {
            if (t < h) throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: " + h + ".\n")
        } else t = h;
        var p = T(t, i, a), g = o.getSymbolSize(t), w = new s(g);
        return function (e, t) {
            for (var i = e.size, n = d.getPositions(t), o = 0; o < n.length; o++) for (var a = n[o][0], r = n[o][1], s = -1; s <= 7; s++) if (!(a + s <= -1 || i <= a + s)) for (var l = -1; l <= 7; l++) r + l <= -1 || i <= r + l || (s >= 0 && s <= 6 && (0 === l || 6 === l) || l >= 0 && l <= 6 && (0 === s || 6 === s) || s >= 2 && s <= 4 && l >= 2 && l <= 4 ? e.set(a + s, r + l, !0, !0) : e.set(a + s, r + l, !1, !0))
        }(w, t), function (e) {
            for (var t = e.size, i = 8; i < t - 8; i++) {
                var n = i % 2 == 0;
                e.set(i, 6, n, !0), e.set(6, i, n, !0)
            }
        }(w), function (e, t) {
            for (var i = l.getPositions(t), n = 0; n < i.length; n++) for (var o = i[n][0], a = i[n][1], r = -2; r <= 2; r++) for (var s = -2; s <= 2; s++) -2 === r || 2 === r || -2 === s || 2 === s || 0 === r && 0 === s ? e.set(o + r, a + s, !0, !0) : e.set(o + r, a + s, !1, !0)
        }(w, t), y(w, i, 0), t >= 7 && function (e, t) {
            for (var i, n, o, a = e.size, r = f.getEncodedBits(t), s = 0; s < 18; s++) i = Math.floor(s / 3), n = s % 3 + a - 8 - 3, o = 1 == (r >> s & 1), e.set(i, n, o, !0), e.set(n, i, o, !0)
        }(w, t), function (e, t) {
            for (var i = e.size, n = -1, o = i - 1, a = 7, r = 0, s = i - 1; s > 0; s -= 2) for (6 === s && s--; ;) {
                for (var l = 0; l < 2; l++) if (!e.isReserved(o, s - l)) {
                    var d = !1;
                    r < t.length && (d = 1 == (t[r] >>> a & 1)), e.set(o, s - l, d), -1 == --a && (r++, a = 7)
                }
                if ((o += n) < 0 || i <= o) {
                    o -= n, n = -n;
                    break
                }
            }
        }(w, p), isNaN(n) && (n = u.getBestMask(w, y.bind(null, w, i))), u.applyMask(n, w), y(w, i, n), {
            modules: w,
            version: t,
            errorCorrectionLevel: i,
            maskPattern: n,
            segments: a
        }
    }

    t.create = function (e, t) {
        if (void 0 === e || "" === e) throw new Error("No input text");
        var i, n, r = a.M;
        return void 0 !== t && (r = a.from(t.errorCorrectionLevel, a.M), i = f.from(t.version), n = u.from(t.maskPattern), t.toSJISFunc && o.setToSJISFunction(t.toSJISFunc)), w(e, i, r, n)
    }
}, function (e, t, i) {
    var n = i(413),
        o = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 4, 1, 2, 4, 4, 2, 4, 4, 4, 2, 4, 6, 5, 2, 4, 6, 6, 2, 5, 8, 8, 4, 5, 8, 8, 4, 5, 8, 11, 4, 8, 10, 11, 4, 9, 12, 16, 4, 9, 16, 16, 6, 10, 12, 18, 6, 10, 17, 16, 6, 11, 16, 19, 6, 13, 18, 21, 7, 14, 21, 25, 8, 16, 20, 25, 8, 17, 23, 25, 9, 17, 23, 34, 9, 18, 25, 30, 10, 20, 27, 32, 12, 21, 29, 35, 12, 23, 34, 37, 12, 25, 34, 40, 13, 26, 35, 42, 14, 28, 38, 45, 15, 29, 40, 48, 16, 31, 43, 51, 17, 33, 45, 54, 18, 35, 48, 57, 19, 37, 51, 60, 19, 38, 53, 63, 20, 40, 56, 66, 21, 43, 59, 70, 22, 45, 62, 74, 24, 47, 65, 77, 25, 49, 68, 81],
        a = [7, 10, 13, 17, 10, 16, 22, 28, 15, 26, 36, 44, 20, 36, 52, 64, 26, 48, 72, 88, 36, 64, 96, 112, 40, 72, 108, 130, 48, 88, 132, 156, 60, 110, 160, 192, 72, 130, 192, 224, 80, 150, 224, 264, 96, 176, 260, 308, 104, 198, 288, 352, 120, 216, 320, 384, 132, 240, 360, 432, 144, 280, 408, 480, 168, 308, 448, 532, 180, 338, 504, 588, 196, 364, 546, 650, 224, 416, 600, 700, 224, 442, 644, 750, 252, 476, 690, 816, 270, 504, 750, 900, 300, 560, 810, 960, 312, 588, 870, 1050, 336, 644, 952, 1110, 360, 700, 1020, 1200, 390, 728, 1050, 1260, 420, 784, 1140, 1350, 450, 812, 1200, 1440, 480, 868, 1290, 1530, 510, 924, 1350, 1620, 540, 980, 1440, 1710, 570, 1036, 1530, 1800, 570, 1064, 1590, 1890, 600, 1120, 1680, 1980, 630, 1204, 1770, 2100, 660, 1260, 1860, 2220, 720, 1316, 1950, 2310, 750, 1372, 2040, 2430];
    t.getBlocksCount = function (e, t) {
        switch (t) {
            case n.L:
                return o[4 * (e - 1) + 0];
            case n.M:
                return o[4 * (e - 1) + 1];
            case n.Q:
                return o[4 * (e - 1) + 2];
            case n.H:
                return o[4 * (e - 1) + 3];
            default:
                return
        }
    }, t.getTotalCodewordsCount = function (e, t) {
        switch (t) {
            case n.L:
                return a[4 * (e - 1) + 0];
            case n.M:
                return a[4 * (e - 1) + 1];
            case n.Q:
                return a[4 * (e - 1) + 2];
            case n.H:
                return a[4 * (e - 1) + 3];
            default:
                return
        }
    }
}, function (e, t) {
    t.isValid = function (e) {
        return !isNaN(e) && e >= 1 && e <= 40
    }
}, function (e, t) {
    var i = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",
        n = "(?:(?![A-Z0-9 $%*+\\-./:]|" + (i = i.replace(/u/g, "\\u")) + ")(?:.|[\r\n]))+";
    t.KANJI = new RegExp(i, "g"), t.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), t.BYTE = new RegExp(n, "g"), t.NUMERIC = new RegExp("[0-9]+", "g"), t.ALPHANUMERIC = new RegExp("[A-Z $%*+\\-./:]+", "g");
    var o = new RegExp("^" + i + "$"), a = new RegExp("^[0-9]+$"), r = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
    t.testKanji = function (e) {
        return o.test(e)
    }, t.testNumeric = function (e) {
        return a.test(e)
    }, t.testAlphanumeric = function (e) {
        return r.test(e)
    }
}, function (e, t) {
    var i = {}.toString;
    e.exports = Array.isArray || function (e) {
        return "[object Array]" == i.call(e)
    }
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(101), a = e.exports = function () {
        o.call(this), this._buffers = [], this._buffered = 0, this._reads = [], this._paused = !1, this._encoding = "utf8", this.writable = !0
    };
    n.inherits(a, o), a.prototype.read = function (e, t) {
        this._reads.push({length: Math.abs(e), allowLess: e < 0, func: t}), process.nextTick(function () {
            this._process(), this._paused && this._reads.length > 0 && (this._paused = !1, this.emit("drain"))
        }.bind(this))
    }, a.prototype.write = function (e, t) {
        return this.writable ? (i = Buffer.isBuffer(e) ? e : new Buffer(e, t || this._encoding), this._buffers.push(i), this._buffered += i.length, this._process(), this._reads && 0 === this._reads.length && (this._paused = !0), this.writable && !this._paused) : (this.emit("error", new Error("Stream not writable")), !1);
        var i
    }, a.prototype.end = function (e, t) {
        e && this.write(e, t), this.writable = !1, this._buffers && (0 === this._buffers.length ? this._end() : (this._buffers.push(null), this._process()))
    }, a.prototype.destroySoon = a.prototype.end, a.prototype._end = function () {
        this._reads.length > 0 && this.emit("error", new Error("There are some read requests waiting on finished stream")), this.destroy()
    }, a.prototype.destroy = function () {
        this._buffers && (this.writable = !1, this._reads = null, this._buffers = null, this.emit("close"))
    }, a.prototype._processReadAllowingLess = function (e) {
        this._reads.shift();
        var t = this._buffers[0];
        t.length > e.length ? (this._buffered -= e.length, this._buffers[0] = t.slice(e.length), e.func.call(this, t.slice(0, e.length))) : (this._buffered -= t.length, this._buffers.shift(), e.func.call(this, t))
    }, a.prototype._processRead = function (e) {
        this._reads.shift();
        for (var t = 0, i = 0, n = new Buffer(e.length); t < e.length;) {
            var o = this._buffers[i++], a = Math.min(o.length, e.length - t);
            o.copy(n, t, 0, a), t += a, a !== o.length && (this._buffers[--i] = o.slice(a))
        }
        i > 0 && this._buffers.splice(0, i), this._buffered -= e.length, e.func.call(this, n)
    }, a.prototype._process = function () {
        try {
            for (; this._buffered > 0 && this._reads && this._reads.length > 0;) {
                var e = this._reads[0];
                if (e.allowLess) this._processReadAllowingLess(e); else {
                    if (!(this._buffered >= e.length)) break;
                    this._processRead(e)
                }
            }
            this._buffers && this._buffers.length > 0 && null === this._buffers[0] && this._end()
        } catch (e) {
            this.emit("error", e)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = i(559), o = i(560);

    function a(e, t, i) {
        var n = e * t;
        return 8 !== i && (n = Math.ceil(n / (8 / i))), n
    }

    var r = e.exports = function (e, t) {
        var i = e.width, o = e.height, r = e.interlace, s = e.bpp, l = e.depth;
        if (this.read = t.read, this.write = t.write, this.complete = t.complete, this._imageIndex = 0, this._images = [], r) for (var d = n.getImagePasses(i, o), u = 0; u < d.length; u++) this._images.push({
            byteWidth: a(d[u].width, s, l),
            height: d[u].height,
            lineIndex: 0
        }); else this._images.push({byteWidth: a(i, s, l), height: o, lineIndex: 0});
        this._xComparison = 8 === l ? s : 16 === l ? 2 * s : 1
    };
    r.prototype.start = function () {
        this.read(this._images[this._imageIndex].byteWidth + 1, this._reverseFilterLine.bind(this))
    }, r.prototype._unFilterType1 = function (e, t, i) {
        for (var n = this._xComparison, o = n - 1, a = 0; a < i; a++) {
            var r = e[1 + a], s = a > o ? t[a - n] : 0;
            t[a] = r + s
        }
    }, r.prototype._unFilterType2 = function (e, t, i) {
        for (var n = this._lastLine, o = 0; o < i; o++) {
            var a = e[1 + o], r = n ? n[o] : 0;
            t[o] = a + r
        }
    }, r.prototype._unFilterType3 = function (e, t, i) {
        for (var n = this._xComparison, o = n - 1, a = this._lastLine, r = 0; r < i; r++) {
            var s = e[1 + r], l = a ? a[r] : 0, d = r > o ? t[r - n] : 0, u = Math.floor((d + l) / 2);
            t[r] = s + u
        }
    }, r.prototype._unFilterType4 = function (e, t, i) {
        for (var n = this._xComparison, a = n - 1, r = this._lastLine, s = 0; s < i; s++) {
            var l = e[1 + s], d = r ? r[s] : 0, u = s > a ? t[s - n] : 0, c = s > a && r ? r[s - n] : 0, h = o(u, d, c);
            t[s] = l + h
        }
    }, r.prototype._reverseFilterLine = function (e) {
        var t, i = e[0], n = this._images[this._imageIndex], o = n.byteWidth;
        if (0 === i) t = e.slice(1, o + 1); else switch (t = new Buffer(o), i) {
            case 1:
                this._unFilterType1(e, t, o);
                break;
            case 2:
                this._unFilterType2(e, t, o);
                break;
            case 3:
                this._unFilterType3(e, t, o);
                break;
            case 4:
                this._unFilterType4(e, t, o);
                break;
            default:
                throw new Error("Unrecognised filter type - " + i)
        }
        this.write(t), n.lineIndex++, n.lineIndex >= n.height ? (this._lastLine = null, this._imageIndex++, n = this._images[this._imageIndex]) : this._lastLine = t, n ? this.read(n.byteWidth + 1, this._reverseFilterLine.bind(this)) : (this._lastLine = null, this.complete())
    }
}, function (e, t, i) {
    "use strict";
    var n = [{x: [0], y: [0]}, {x: [4], y: [0]}, {x: [0, 4], y: [4]}, {x: [2, 6], y: [0, 4]}, {
        x: [0, 2, 4, 6],
        y: [2, 6]
    }, {x: [1, 3, 5, 7], y: [0, 2, 4, 6]}, {x: [0, 1, 2, 3, 4, 5, 6, 7], y: [1, 3, 5, 7]}];
    t.getImagePasses = function (e, t) {
        for (var i = [], o = e % 8, a = t % 8, r = (e - o) / 8, s = (t - a) / 8, l = 0; l < n.length; l++) {
            for (var d = n[l], u = r * d.x.length, c = s * d.y.length, h = 0; h < d.x.length && d.x[h] < o; h++) u++;
            for (h = 0; h < d.y.length && d.y[h] < a; h++) c++;
            u > 0 && c > 0 && i.push({width: u, height: c, index: l})
        }
        return i
    }, t.getInterlaceIterator = function (e) {
        return function (t, i, o) {
            var a = t % n[o].x.length, r = (t - a) / n[o].x.length * 8 + n[o].x[a], s = i % n[o].y.length;
            return 4 * r + ((i - s) / n[o].y.length * 8 + n[o].y[s]) * e * 4
        }
    }
}, function (e, t, i) {
    "use strict";
    e.exports = function (e, t, i) {
        var n = e + t - i, o = Math.abs(n - e), a = Math.abs(n - t), r = Math.abs(n - i);
        return o <= a && o <= r ? e : a <= r ? t : i
    }
}, function (e, t, i) {
    "use strict";
    var n = i(118), o = i(562), a = e.exports = function (e, t) {
        this._options = e, e.checkCRC = !1 !== e.checkCRC, this._hasIHDR = !1, this._hasIEND = !1, this._palette = [], this._colorType = 0, this._chunks = {}, this._chunks[n.TYPE_IHDR] = this._handleIHDR.bind(this), this._chunks[n.TYPE_IEND] = this._handleIEND.bind(this), this._chunks[n.TYPE_IDAT] = this._handleIDAT.bind(this), this._chunks[n.TYPE_PLTE] = this._handlePLTE.bind(this), this._chunks[n.TYPE_tRNS] = this._handleTRNS.bind(this), this._chunks[n.TYPE_gAMA] = this._handleGAMA.bind(this), this.read = t.read, this.error = t.error, this.metadata = t.metadata, this.gamma = t.gamma, this.transColor = t.transColor, this.palette = t.palette, this.parsed = t.parsed, this.inflateData = t.inflateData, this.finished = t.finished
    };
    a.prototype.start = function () {
        this.read(n.PNG_SIGNATURE.length, this._parseSignature.bind(this))
    }, a.prototype._parseSignature = function (e) {
        for (var t = n.PNG_SIGNATURE, i = 0; i < t.length; i++) if (e[i] !== t[i]) return void this.error(new Error("Invalid file signature"));
        this.read(8, this._parseChunkBegin.bind(this))
    }, a.prototype._parseChunkBegin = function (e) {
        for (var t = e.readUInt32BE(0), i = e.readUInt32BE(4), a = "", r = 4; r < 8; r++) a += String.fromCharCode(e[r]);
        var s = Boolean(32 & e[4]);
        if (this._hasIHDR || i === n.TYPE_IHDR) {
            if (this._crc = new o, this._crc.write(new Buffer(a)), this._chunks[i]) return this._chunks[i](t);
            s ? this.read(t + 4, this._skipChunk.bind(this)) : this.error(new Error("Unsupported critical chunk type " + a))
        } else this.error(new Error("Expected IHDR on beggining"))
    }, a.prototype._skipChunk = function () {
        this.read(8, this._parseChunkBegin.bind(this))
    }, a.prototype._handleChunkEnd = function () {
        this.read(4, this._parseChunkEnd.bind(this))
    }, a.prototype._parseChunkEnd = function (e) {
        var t = e.readInt32BE(0), i = this._crc.crc32();
        this._options.checkCRC && i !== t ? this.error(new Error("Crc error - " + t + " - " + i)) : this._hasIEND || this.read(8, this._parseChunkBegin.bind(this))
    }, a.prototype._handleIHDR = function (e) {
        this.read(e, this._parseIHDR.bind(this))
    }, a.prototype._parseIHDR = function (e) {
        this._crc.write(e);
        var t = e.readUInt32BE(0), i = e.readUInt32BE(4), o = e[8], a = e[9], r = e[10], s = e[11], l = e[12];
        if (8 === o || 4 === o || 2 === o || 1 === o || 16 === o) if (a in n.COLORTYPE_TO_BPP_MAP) if (0 === r) if (0 === s) if (0 === l || 1 === l) {
            this._colorType = a;
            var d = n.COLORTYPE_TO_BPP_MAP[this._colorType];
            this._hasIHDR = !0, this.metadata({
                width: t,
                height: i,
                depth: o,
                interlace: Boolean(l),
                palette: Boolean(a & n.COLORTYPE_PALETTE),
                color: Boolean(a & n.COLORTYPE_COLOR),
                alpha: Boolean(a & n.COLORTYPE_ALPHA),
                bpp: d,
                colorType: a
            }), this._handleChunkEnd()
        } else this.error(new Error("Unsupported interlace method")); else this.error(new Error("Unsupported filter method")); else this.error(new Error("Unsupported compression method")); else this.error(new Error("Unsupported color type")); else this.error(new Error("Unsupported bit depth " + o))
    }, a.prototype._handlePLTE = function (e) {
        this.read(e, this._parsePLTE.bind(this))
    }, a.prototype._parsePLTE = function (e) {
        this._crc.write(e);
        for (var t = Math.floor(e.length / 3), i = 0; i < t; i++) this._palette.push([e[3 * i], e[3 * i + 1], e[3 * i + 2], 255]);
        this.palette(this._palette), this._handleChunkEnd()
    }, a.prototype._handleTRNS = function (e) {
        this.read(e, this._parseTRNS.bind(this))
    }, a.prototype._parseTRNS = function (e) {
        if (this._crc.write(e), this._colorType === n.COLORTYPE_PALETTE_COLOR) {
            if (0 === this._palette.length) return void this.error(new Error("Transparency chunk must be after palette"));
            if (e.length > this._palette.length) return void this.error(new Error("More transparent colors than palette size"));
            for (var t = 0; t < e.length; t++) this._palette[t][3] = e[t];
            this.palette(this._palette)
        }
        this._colorType === n.COLORTYPE_GRAYSCALE && this.transColor([e.readUInt16BE(0)]), this._colorType === n.COLORTYPE_COLOR && this.transColor([e.readUInt16BE(0), e.readUInt16BE(2), e.readUInt16BE(4)]), this._handleChunkEnd()
    }, a.prototype._handleGAMA = function (e) {
        this.read(e, this._parseGAMA.bind(this))
    }, a.prototype._parseGAMA = function (e) {
        this._crc.write(e), this.gamma(e.readUInt32BE(0) / n.GAMMA_DIVISION), this._handleChunkEnd()
    }, a.prototype._handleIDAT = function (e) {
        this.read(-e, this._parseIDAT.bind(this, e))
    }, a.prototype._parseIDAT = function (e, t) {
        if (this._crc.write(t), this._colorType === n.COLORTYPE_PALETTE_COLOR && 0 === this._palette.length) throw new Error("Expected palette not found");
        this.inflateData(t);
        var i = e - t.length;
        i > 0 ? this._handleIDAT(i) : this._handleChunkEnd()
    }, a.prototype._handleIEND = function (e) {
        this.read(e, this._parseIEND.bind(this))
    }, a.prototype._parseIEND = function (e) {
        this._crc.write(e), this._hasIEND = !0, this._handleChunkEnd(), this.finished && this.finished()
    }
}, function (e, t, i) {
    "use strict";
    var n = [];
    !function () {
        for (var e = 0; e < 256; e++) {
            for (var t = e, i = 0; i < 8; i++) 1 & t ? t = 3988292384 ^ t >>> 1 : t >>>= 1;
            n[e] = t
        }
    }();
    var o = e.exports = function () {
        this._crc = -1
    };
    o.prototype.write = function (e) {
        for (var t = 0; t < e.length; t++) this._crc = n[255 & (this._crc ^ e[t])] ^ this._crc >>> 8;
        return !0
    }, o.prototype.crc32 = function () {
        return -1 ^ this._crc
    }, o.crc32 = function (e) {
        for (var t = -1, i = 0; i < e.length; i++) t = n[255 & (t ^ e[i])] ^ t >>> 8;
        return -1 ^ t
    }
}, function (e, t, i) {
    "use strict";
    var n = i(559), o = {
        1: {0: 0, 1: 0, 2: 0, 3: 255},
        2: {0: 0, 1: 0, 2: 0, 3: 1},
        3: {0: 0, 1: 1, 2: 2, 3: 255},
        4: {0: 0, 1: 1, 2: 2, 3: 3}
    };

    function a(e, t, i, n, a, r) {
        for (var s = e.width, l = e.height, d = e.index, u = 0; u < l; u++) for (var c = 0; c < s; c++) {
            for (var h = i(c, u, d), f = 0; f < 4; f++) {
                var p = o[n][f];
                if (255 === p) t[h + f] = 255; else {
                    var g = p + r;
                    if (g === a.length) throw new Error("Ran out of data");
                    t[h + f] = a[g]
                }
            }
            r += n
        }
        return r
    }

    function r(e, t, i, n, a, r) {
        for (var s = e.width, l = e.height, d = e.index, u = 0; u < l; u++) {
            for (var c = 0; c < s; c++) for (var h = a.get(n), f = i(c, u, d), p = 0; p < 4; p++) {
                var g = o[n][p];
                t[f + p] = 255 !== g ? h[g] : r
            }
            a.resetAfterLine()
        }
    }

    t.dataToBitMap = function (e, t) {
        var i, o = t.width, s = t.height, l = t.depth, d = t.bpp, u = t.interlace;
        if (8 !== l) var c = function (e, t) {
            var i = [], n = 0;

            function o() {
                if (n === e.length) throw new Error("Ran out of data");
                var o, a, r, s, l, d, u, c, h = e[n];
                switch (n++, t) {
                    default:
                        throw new Error("unrecognised depth");
                    case 16:
                        u = e[n], n++, i.push((h << 8) + u);
                        break;
                    case 4:
                        u = 15 & h, c = h >> 4, i.push(c, u);
                        break;
                    case 2:
                        l = 3 & h, d = h >> 2 & 3, u = h >> 4 & 3, c = h >> 6 & 3, i.push(c, u, d, l);
                        break;
                    case 1:
                        o = 1 & h, a = h >> 1 & 1, r = h >> 2 & 1, s = h >> 3 & 1, l = h >> 4 & 1, d = h >> 5 & 1, u = h >> 6 & 1, c = h >> 7 & 1, i.push(c, u, d, l, s, r, a, o)
                }
            }

            return {
                get: function (e) {
                    for (; i.length < e;) o();
                    var t = i.slice(0, e);
                    return i = i.slice(e), t
                }, resetAfterLine: function () {
                    i.length = 0
                }, end: function () {
                    if (n !== e.length) throw new Error("extra data found")
                }
            }
        }(e, l);
        i = l <= 8 ? new Buffer(o * s * 4) : new Uint16Array(o * s * 4);
        var h, f, p = Math.pow(2, l) - 1, g = 0;
        if (u) h = n.getImagePasses(o, s), f = n.getInterlaceIterator(o, s); else {
            var m = 0;
            f = function () {
                var e = m;
                return m += 4, e
            }, h = [{width: o, height: s}]
        }
        for (var v = 0; v < h.length; v++) 8 === l ? g = a(h[v], i, f, d, e, g) : r(h[v], i, f, d, c, p);
        if (8 === l) {
            if (g !== e.length) throw new Error("extra data found")
        } else c.end();
        return i
    }
}, function (e, t, i) {
    "use strict";
    e.exports = function (e, t) {
        var i = t.depth, n = t.width, o = t.height, a = t.colorType, r = t.transColor, s = t.palette, l = e;
        return 3 === a ? function (e, t, i, n, o) {
            for (var a = 0, r = 0; r < n; r++) for (var s = 0; s < i; s++) {
                var l = o[e[a]];
                if (!l) throw new Error("index " + e[a] + " not in palette");
                for (var d = 0; d < 4; d++) t[a + d] = l[d];
                a += 4
            }
        }(e, l, n, o, s) : (r && function (e, t, i, n, o) {
            for (var a = 0, r = 0; r < n; r++) for (var s = 0; s < i; s++) {
                var l = !1;
                if (1 === o.length ? o[0] === e[a] && (l = !0) : o[0] === e[a] && o[1] === e[a + 1] && o[2] === e[a + 2] && (l = !0), l) for (var d = 0; d < 4; d++) t[a + d] = 0;
                a += 4
            }
        }(e, l, n, o, r), 8 !== i && (16 === i && (l = new Buffer(n * o * 4)), function (e, t, i, n, o) {
            for (var a = Math.pow(2, o) - 1, r = 0, s = 0; s < n; s++) for (var l = 0; l < i; l++) {
                for (var d = 0; d < 4; d++) t[r + d] = Math.floor(255 * e[r + d] / a + .5);
                r += 4
            }
        }(e, l, n, o, i))), l
    }
}, function (e, t, i) {
    "use strict";
    var n = i(118), o = i(562), a = i(817), r = i(818), s = i(80), l = e.exports = function (e) {
        if (this._options = e, e.deflateChunkSize = e.deflateChunkSize || 32768, e.deflateLevel = null != e.deflateLevel ? e.deflateLevel : 9, e.deflateStrategy = null != e.deflateStrategy ? e.deflateStrategy : 3, e.inputHasAlpha = null == e.inputHasAlpha || e.inputHasAlpha, e.deflateFactory = e.deflateFactory || s.createDeflate, e.bitDepth = e.bitDepth || 8, e.colorType = "number" == typeof e.colorType ? e.colorType : n.COLORTYPE_COLOR_ALPHA, e.inputColorType = "number" == typeof e.inputColorType ? e.inputColorType : n.COLORTYPE_COLOR_ALPHA, -1 === [n.COLORTYPE_GRAYSCALE, n.COLORTYPE_COLOR, n.COLORTYPE_COLOR_ALPHA, n.COLORTYPE_ALPHA].indexOf(e.colorType)) throw new Error("option color type:" + e.colorType + " is not supported at present");
        if (-1 === [n.COLORTYPE_GRAYSCALE, n.COLORTYPE_COLOR, n.COLORTYPE_COLOR_ALPHA, n.COLORTYPE_ALPHA].indexOf(e.inputColorType)) throw new Error("option input color type:" + e.inputColorType + " is not supported at present");
        if (8 !== e.bitDepth && 16 !== e.bitDepth) throw new Error("option bit depth:" + e.bitDepth + " is not supported at present")
    };
    l.prototype.getDeflateOptions = function () {
        return {
            chunkSize: this._options.deflateChunkSize,
            level: this._options.deflateLevel,
            strategy: this._options.deflateStrategy
        }
    }, l.prototype.createDeflate = function () {
        return this._options.deflateFactory(this.getDeflateOptions())
    }, l.prototype.filterData = function (e, t, i) {
        var o = a(e, t, i, this._options), s = n.COLORTYPE_TO_BPP_MAP[this._options.colorType];
        return r(o, t, i, this._options, s)
    }, l.prototype._packChunk = function (e, t) {
        var i = t ? t.length : 0, n = new Buffer(i + 12);
        return n.writeUInt32BE(i, 0), n.writeUInt32BE(e, 4), t && t.copy(n, 8), n.writeInt32BE(o.crc32(n.slice(4, n.length - 4)), n.length - 4), n
    }, l.prototype.packGAMA = function (e) {
        var t = new Buffer(4);
        return t.writeUInt32BE(Math.floor(e * n.GAMMA_DIVISION), 0), this._packChunk(n.TYPE_gAMA, t)
    }, l.prototype.packIHDR = function (e, t) {
        var i = new Buffer(13);
        return i.writeUInt32BE(e, 0), i.writeUInt32BE(t, 4), i[8] = this._options.bitDepth, i[9] = this._options.colorType, i[10] = 0, i[11] = 0, i[12] = 0, this._packChunk(n.TYPE_IHDR, i)
    }, l.prototype.packIDAT = function (e) {
        return this._packChunk(n.TYPE_IDAT, e)
    }, l.prototype.packIEND = function () {
        return this._packChunk(n.TYPE_IEND, null)
    }
}, function (e, t, i) {
    "use strict";
    var n = e.exports = function (e) {
        this._buffer = e, this._reads = []
    };
    n.prototype.read = function (e, t) {
        this._reads.push({length: Math.abs(e), allowLess: e < 0, func: t})
    }, n.prototype.process = function () {
        for (; this._reads.length > 0 && this._buffer.length;) {
            var e = this._reads[0];
            if (!this._buffer.length || !(this._buffer.length >= e.length || e.allowLess)) break;
            this._reads.shift();
            var t = this._buffer;
            this._buffer = t.slice(e.length), e.func.call(this, t.slice(0, e.length))
        }
        return this._reads.length > 0 ? new Error("There are some read requests waitng on finished stream") : this._buffer.length > 0 ? new Error("unrecognised content at end of stream") : void 0
    }
}, function (e, t, i) {
    var n = i(152);

    function o(e, t) {
        var i = e.a / 255, n = t + '="' + e.hex + '"';
        return i < 1 ? n + " " + t + '-opacity="' + i.toFixed(2).slice(1) + '"' : n
    }

    function a(e, t, i) {
        var n = e + t;
        return void 0 !== i && (n += " " + i), n
    }

    t.render = function (e, t, i) {
        var r = n.getOptions(t), s = e.modules.size, l = e.modules.data, d = s + 2 * r.margin,
            u = r.color.light.a ? "<path " + o(r.color.light, "fill") + ' d="M0 0h' + d + "v" + d + 'H0z"/>' : "",
            c = "<path " + o(r.color.dark, "stroke") + ' d="' + function (e, t, i) {
                for (var n = "", o = 0, r = !1, s = 0, l = 0; l < e.length; l++) {
                    var d = Math.floor(l % t), u = Math.floor(l / t);
                    d || r || (r = !0), e[l] ? (s++, l > 0 && d > 0 && e[l - 1] || (n += r ? a("M", d + i, .5 + u + i) : a("m", o, 0), o = 0, r = !1), d + 1 < t && e[l + 1] || (n += a("h", s), s = 0)) : o++
                }
                return n
            }(l, s, r.margin) + '"/>', h = 'viewBox="0 0 ' + d + " " + d + '"',
            f = '<svg xmlns="http://www.w3.org/2000/svg" ' + (r.width ? 'width="' + r.width + '" height="' + r.width + '" ' : "") + h + ' shape-rendering="crispEdges">' + u + c + "</svg>\n";
        return "function" == typeof i && i(null, f), f
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(834), a = i(117), r = i(411), s = i(0), l = i(81), d = i(3),
        u = s.default.getLogger("track-stat-xmp-vip");
    !function (e) {
        function t() {
            let e = 0;
            return a.default.isSuperVip ? e = 5 : a.default.isPlatinumVip ? e = 3 : a.default.isVip && (e = 2), e
        }

        e.firstBufferShow = function (e, t) {
            return n(this, void 0, void 0, function* () {
                let i = yield s();
                i.set("gcid", e), i.set("is_delay", t);
                let n = {attribute1: "bxbb_buffer_qp_show", extData: i};
                l.CommonNS.trackShowEvnet("xlx_vip_event", n.attribute1, n.extData)
            })
        }, e.firstBufferClick = function (e, t) {
            return n(this, void 0, void 0, function* () {
                let i = yield s();
                i.set("gcid", e), i.set("is_delay", t);
                let n = {attribute1: "bxbb_buffer_qp_click", extData: i};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", n)
            })
        }, e.bxbbStuckShow = function (e, t) {
            return n(this, void 0, void 0, function* () {
                let i = yield s();
                i.set("is_nature", e), i.set("is_delay", t);
                let n = {attribute1: "bxbb_buffer_open_show", extData: i};
                l.CommonNS.trackShowEvnet("xlx_vip_event", n.attribute1, n.extData)
            })
        }, e.bxbbStuckClick = function (e, t) {
            return n(this, void 0, void 0, function* () {
                let i = yield s();
                i.set("is_nature", e), i.set("is_delay", t);
                let n = {attribute1: "bxbb_buffer_open_click", extData: i};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", n)
            })
        }, e.vipButtonShow = function (e) {
            return n(this, void 0, void 0, function* () {
                u.information("vipButtonShow");
                let t = yield s();
                t.set("gcid", e);
                let i = {attribute1: "bxbb_vipspeedup_btn_show", extData: t};
                l.CommonNS.trackShowEvnet("xlx_vip_event", i.attribute1, i.extData)
            })
        }, e.vipButtonClick = function (e) {
            return n(this, void 0, void 0, function* () {
                u.information("vipButtonClick");
                let t = yield s();
                t.set("gcid", e);
                let i = {attribute1: "bxbb_vipspeedup_btn_click", extData: t};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", i)
            })
        }, e.playSpeedShow = function () {
            return n(this, void 0, void 0, function* () {
                u.information("playSpeedShow");
                let e = {attribute1: "xmp_play_speed_option_show", extData: yield s()};
                l.CommonNS.trackShowEvnet("xlx_vip_event", e.attribute1, e.extData)
            })
        }, e.playSpeedClick = function (e) {
            return n(this, void 0, void 0, function* () {
                u.information("playSpeedClick");
                let t = yield s();
                t.set("clickid", `speed${e}`);
                let i = {attribute1: "xmp_play_speed_option_click", extData: t};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", i)
            })
        }, e.xmpPlayStart = function (e, t) {
            return n(this, void 0, void 0, function* () {
                if (!e) return;
                u.information("xmpPlayStart");
                let i = yield s();
                i.set("player_type", e), i.set("play_type", t);
                let n = {attribute1: "xmp_play_start", extData: i};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", n)
            })
        }, e.xmpVideoLoadOpenYunboBtnShow = function (e, i, o) {
            return n(this, void 0, void 0, function* () {
                u.information("xmpVideoLoadOpenYunboBtnShow");
                let n = new Map;
                n.set("components_type", e), n.set("play_from", i), n.set("vip_type", t()), n.set("btn_position", o);
                let a = {attribute1: "xmp_video_load_open_yunbo_btn_show", extData: n};
                l.CommonNS.trackShowEvnet("xlx_vip_event", a.attribute1, a.extData)
            })
        }, e.xmpVideoLoadOpenYunboBtnClick = function (e, i, a) {
            return n(this, void 0, void 0, function* () {
                u.information("xmpVideoLoadOpenYunboBtnClick");
                let n = new Map;
                n.set("components_type", e), n.set("play_from", i), n.set("vip_type", t()), n.set("btn_position", a);
                let r = {attribute1: "xmp_video_load_open_yunbo_btn_click", extData: n};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", r)
            })
        }, e.vipSpeedShow = function (e, t, i, a, r, d, u = !0) {
            return n(this, void 0, void 0, function* () {
                let n = "xlx_vip_event", c = yield s();
                c.set("task_type", e), c.set("gcid", t), c.set("url", i), c.set("area", a), c.set("current_speed", r), c.set("try_status", d);
                let h = {attribute1: "play_speed_option_show", extData: c};
                u ? l.CommonNS.trackShowEvnet(n, h.attribute1, h.extData) : o.StatUtilitiesNS.trackEvent(n, h)
            })
        }, e.vipSpeedClick = function (e, t, i, a, r, l, d) {
            return n(this, void 0, void 0, function* () {
                let n = yield s();
                n.set("task_type", e), n.set("gcid", t), n.set("url", i), n.set("area", a), n.set("current_speed", r), n.set("click_id", l), n.set("try_status", d);
                let u = {attribute1: "play_speed_option_click", extData: n};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", u)
            })
        }, e.playTryReadyShow = function (e, t, i, o, a) {
            return n(this, void 0, void 0, function* () {
                let n = yield s();
                n.set("gcid", e), n.set("try_num", t), n.set("area", i), n.set("video_duration", Math.floor(a / 60));
                let o = {attribute1: "bxbb_hyjs_before_try_show", extData: n};
                l.CommonNS.trackShowEvnet("xlx_vip_event", o.attribute1, o.extData)
            })
        }, e.playTryReadyClick = function (e, t, i, a, r) {
            return n(this, void 0, void 0, function* () {
                let n = yield s();
                n.set("gcid", e), n.set("try_num", t), n.set("area", i), n.set("video_duration", Math.floor(r / 60));
                let a = {attribute1: "bxbb_hyjs_before_try_click", extData: n};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", a)
            })
        }, e.playTryRuningShow = function (e, t, i, o, a) {
            return n(this, void 0, void 0, function* () {
                let i = yield s();
                i.set("gcid", e), i.set("area", t), i.set("video_duration", Math.floor(o / 60)), i.set("before_speed", a);
                let n = {attribute1: "bxbb_hyjs_trying_show", extData: i};
                l.CommonNS.trackShowEvnet("xlx_vip_event", n.attribute1, n.extData)
            })
        }, e.playTryRuningClick = function (e, t, i, a) {
            return n(this, void 0, void 0, function* () {
                let t = yield s();
                t.set("gcid", e), t.set("area", "bottom"), t.set("video_duration", Math.floor(i / 60)), t.set("before_speed", a), t.set("referfrom", "v_pc_xl11_hytq_bxbb_hyjs_sy"), t.set("aidfrom", "bottom_trying");
                let n = {attribute1: "bxbb_hyjs_trying_click", extData: t};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", n)
            })
        }, e.playTryAfterShow = function (e, t, i, o, a, r) {
            return n(this, void 0, void 0, function* () {
                let i = yield s();
                i.set("gcid", e), i.set("area", t), i.set("video_duration", Math.floor(o / 60)), i.set("before_speed", a), i.set("ing_speed", r);
                let n = {attribute1: "bxbb_hyjs_after_try_show", extData: i};
                l.CommonNS.trackShowEvnet("xlx_vip_event", n.attribute1, n.extData)
            })
        }, e.playTryAfterClick = function (e, t, i, a, r, l) {
            return n(this, void 0, void 0, function* () {
                let i = yield s();
                i.set("gcid", e), i.set("area", t), i.set("video_duration", Math.floor(a / 60)), i.set("before_speed", r), i.set("ing_speed", l), i.set("referfrom", "v_pc_xl11_hytq_bxbb_hyjs_sy"), i.set("aidfrom", "bottom_after");
                let n = {attribute1: "bxbb_hyjs_after_try_click", extData: i};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", n)
            })
        }, e.playTryShowBeginTips = function (e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                let t = yield s();
                t.set("gcid", e), t.set("video_duration", Math.floor(i / 60)), t.set("before_speed", o);
                let n = {attribute1: "bxbb_hyjs_trying_tips_show", extData: t};
                l.CommonNS.trackShowEvnet("xlx_vip_event", n.attribute1, n.extData)
            })
        }, e.playTryShowFinishTips = function (e, t, i, o, a) {
            return n(this, void 0, void 0, function* () {
                let n = yield s();
                n.set("gcid", e), n.set("is_ypdl", t ? 1 : 0), n.set("video_duration", Math.floor(i / 60)), n.set("before_speed", o), n.set("ing_speed", a);
                let r = {attribute1: "bxbb_hyjs_after_trying_tips_show", extData: n};
                l.CommonNS.trackShowEvnet("xlx_vip_event", r.attribute1, r.extData)
            })
        }, e.playTryFinishTipsClick = function (e, t, i, a, r, l) {
            return n(this, void 0, void 0, function* () {
                let n = yield s();
                n.set("gcid", e), n.set("is_ypdl", t ? 1 : 0), n.set("click_id", i), n.set("video_duration", Math.floor(a / 60)), n.set("before_speed", r), n.set("ing_speed", l), n.set("referfrom", "v_pc_xl11_hytq_bxbb_hyjs_sy"), n.set("aidfrom", "tips_after");
                let d = {attribute1: "bxbb_hyjs_after_trying_tips_click", extData: n};
                o.StatUtilitiesNS.trackEvent("xlx_vip_event", d)
            })
        }, e.playTryAfterOneMin = function (e, t, i, o, a, r, d) {
            return n(this, void 0, void 0, function* () {
                let i = yield s();
                i.set("gcid", e), i.set("area", t), i.set("video_duration", Math.floor(o / 60)), i.set("before_speed", a), i.set("ing_speed", r), i.set("after_speed", d);
                let n = {attribute1: "bxbb_hyjs_after_try_1min", extData: i};
                l.CommonNS.trackShowEvnet("xlx_vip_event", n.attribute1, n.extData)
            })
        };
        let i = "";

        function s() {
            return n(this, void 0, void 0, function* () {
                let e = new Map, n = function () {
                    let e = 0;
                    return a.default.isLogin && (e = 1), e
                }(), o = function () {
                    let e = 0;
                    return a.default.isVip && (e = 1), e
                }(), s = t();
                return e.set("is_login", n), e.set("is_vip", o), e.set("vip_type", s), e.set("plugin_version", r.default.pluginVersion), e.set("client_version", r.default.thunderVersionString), e.set("player_type", yield r.default.getXmpMode()), i || (i = yield d.client.callServerFunction("GetTpPeerId")), e.set("cpeerid", i), e
            })
        }
    }(t.VipStatNS || (t.VipStatNS = {}))
}, function (e, t, i) {
    var n = i(414).FilterCSS, o = i(414).getDefaultWhiteList, a = i(415);

    function r() {
        return {
            a: ["target", "href", "title"],
            abbr: ["title"],
            address: [],
            area: ["shape", "coords", "href", "alt"],
            article: [],
            aside: [],
            audio: ["autoplay", "controls", "loop", "preload", "src"],
            b: [],
            bdi: ["dir"],
            bdo: ["dir"],
            big: [],
            blockquote: ["cite"],
            br: [],
            caption: [],
            center: [],
            cite: [],
            code: [],
            col: ["align", "valign", "span", "width"],
            colgroup: ["align", "valign", "span", "width"],
            dd: [],
            del: ["datetime"],
            details: ["open"],
            div: [],
            dl: [],
            dt: [],
            em: [],
            font: ["color", "size", "face"],
            footer: [],
            h1: [],
            h2: [],
            h3: [],
            h4: [],
            h5: [],
            h6: [],
            header: [],
            hr: [],
            i: [],
            img: ["src", "alt", "title", "width", "height"],
            ins: ["datetime"],
            li: [],
            mark: [],
            nav: [],
            ol: [],
            p: [],
            pre: [],
            s: [],
            section: [],
            small: [],
            span: [],
            sub: [],
            sup: [],
            strong: [],
            table: ["width", "border", "align", "valign"],
            tbody: ["align", "valign"],
            td: ["width", "rowspan", "colspan", "align", "valign"],
            tfoot: ["align", "valign"],
            th: ["width", "rowspan", "colspan", "align", "valign"],
            thead: ["align", "valign"],
            tr: ["rowspan", "align", "valign"],
            tt: [],
            u: [],
            ul: [],
            video: ["autoplay", "controls", "loop", "preload", "src", "height", "width"]
        }
    }

    var s = new n;

    function l(e) {
        return e.replace(d, "&lt;").replace(u, "&gt;")
    }

    var d = /</g, u = />/g, c = /"/g, h = /&quot;/g, f = /&#([a-zA-Z0-9]*);?/gim, p = /&colon;?/gim,
        g = /&newline;?/gim,
        m = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,
        v = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi, y = /u\s*r\s*l\s*\(.*/gi;

    function T(e) {
        return e.replace(c, "&quot;")
    }

    function w(e) {
        return e.replace(h, '"')
    }

    function k(e) {
        return e.replace(f, function (e, t) {
            return "x" === t[0] || "X" === t[0] ? String.fromCharCode(parseInt(t.substr(1), 16)) : String.fromCharCode(parseInt(t, 10))
        })
    }

    function C(e) {
        return e.replace(p, ":").replace(g, " ")
    }

    function b(e) {
        for (var t = "", i = 0, n = e.length; i < n; i++) t += e.charCodeAt(i) < 32 ? " " : e.charAt(i);
        return a.trim(t)
    }

    function I(e) {
        return e = b(e = C(e = k(e = w(e))))
    }

    function S(e) {
        return e = l(e = T(e))
    }

    var _ = /<!--[\s\S]*?-->/g;
    t.whiteList = {
        a: ["target", "href", "title"],
        abbr: ["title"],
        address: [],
        area: ["shape", "coords", "href", "alt"],
        article: [],
        aside: [],
        audio: ["autoplay", "controls", "loop", "preload", "src"],
        b: [],
        bdi: ["dir"],
        bdo: ["dir"],
        big: [],
        blockquote: ["cite"],
        br: [],
        caption: [],
        center: [],
        cite: [],
        code: [],
        col: ["align", "valign", "span", "width"],
        colgroup: ["align", "valign", "span", "width"],
        dd: [],
        del: ["datetime"],
        details: ["open"],
        div: [],
        dl: [],
        dt: [],
        em: [],
        font: ["color", "size", "face"],
        footer: [],
        h1: [],
        h2: [],
        h3: [],
        h4: [],
        h5: [],
        h6: [],
        header: [],
        hr: [],
        i: [],
        img: ["src", "alt", "title", "width", "height"],
        ins: ["datetime"],
        li: [],
        mark: [],
        nav: [],
        ol: [],
        p: [],
        pre: [],
        s: [],
        section: [],
        small: [],
        span: [],
        sub: [],
        sup: [],
        strong: [],
        table: ["width", "border", "align", "valign"],
        tbody: ["align", "valign"],
        td: ["width", "rowspan", "colspan", "align", "valign"],
        tfoot: ["align", "valign"],
        th: ["width", "rowspan", "colspan", "align", "valign"],
        thead: ["align", "valign"],
        tr: ["rowspan", "align", "valign"],
        tt: [],
        u: [],
        ul: [],
        video: ["autoplay", "controls", "loop", "preload", "src", "height", "width"]
    }, t.getDefaultWhiteList = r, t.onTag = function (e, t, i) {
    }, t.onIgnoreTag = function (e, t, i) {
    }, t.onTagAttr = function (e, t, i) {
    }, t.onIgnoreTagAttr = function (e, t, i) {
    }, t.safeAttrValue = function (e, t, i, n) {
        if (i = I(i), "href" === t || "src" === t) {
            if ("#" === (i = a.trim(i))) return "#";
            if ("http://" !== i.substr(0, 7) && "https://" !== i.substr(0, 8) && "mailto:" !== i.substr(0, 7) && "tel:" !== i.substr(0, 4) && "data:image/" !== i.substr(0, 11) && "ftp://" !== i.substr(0, 6) && "./" !== i.substr(0, 2) && "../" !== i.substr(0, 3) && "#" !== i[0] && "/" !== i[0]) return ""
        } else if ("background" === t) {
            if (m.lastIndex = 0, m.test(i)) return ""
        } else if ("style" === t) {
            if (v.lastIndex = 0, v.test(i)) return "";
            if (y.lastIndex = 0, y.test(i) && (m.lastIndex = 0, m.test(i))) return "";
            !1 !== n && (i = (n = n || s).process(i))
        }
        return i = S(i)
    }, t.escapeHtml = l, t.escapeQuote = T, t.unescapeQuote = w, t.escapeHtmlEntities = k, t.escapeDangerHtml5Entities = C, t.clearNonPrintableCharacter = b, t.friendlyAttrValue = I, t.escapeAttrValue = S, t.onIgnoreTagStripAll = function () {
        return ""
    }, t.StripTagBody = function (e, t) {
        "function" != typeof t && (t = function () {
        });
        var i = !Array.isArray(e), n = [], o = !1;
        return {
            onIgnoreTag: function (r, s, l) {
                if (function (t) {
                    return !!i || -1 !== a.indexOf(e, t)
                }(r)) {
                    if (l.isClosing) {
                        var d = "[/removed]", u = l.position + d.length;
                        return n.push([!1 !== o ? o : l.position, u]), o = !1, d
                    }
                    return o || (o = l.position), "[removed]"
                }
                return t(r, s, l)
            }, remove: function (e) {
                var t = "", i = 0;
                return a.forEach(n, function (n) {
                    t += e.slice(i, n[0]), i = n[1]
                }), t += e.slice(i)
            }
        }
    }, t.stripCommentTag = function (e) {
        return e.replace(_, "")
    }, t.stripBlankChar = function (e) {
        var t = e.split("");
        return (t = t.filter(function (e) {
            var t = e.charCodeAt(0);
            return !(127 === t || t <= 31 && 10 !== t && 13 !== t)
        })).join("")
    }, t.cssFilter = s, t.getDefaultCSSWhiteList = o
}, function (e, t) {
    function i() {
        var e = {
            "align-content": !1,
            "align-items": !1,
            "align-self": !1,
            "alignment-adjust": !1,
            "alignment-baseline": !1,
            all: !1,
            "anchor-point": !1,
            animation: !1,
            "animation-delay": !1,
            "animation-direction": !1,
            "animation-duration": !1,
            "animation-fill-mode": !1,
            "animation-iteration-count": !1,
            "animation-name": !1,
            "animation-play-state": !1,
            "animation-timing-function": !1,
            azimuth: !1,
            "backface-visibility": !1,
            background: !0,
            "background-attachment": !0,
            "background-clip": !0,
            "background-color": !0,
            "background-image": !0,
            "background-origin": !0,
            "background-position": !0,
            "background-repeat": !0,
            "background-size": !0,
            "baseline-shift": !1,
            binding: !1,
            bleed: !1,
            "bookmark-label": !1,
            "bookmark-level": !1,
            "bookmark-state": !1,
            border: !0,
            "border-bottom": !0,
            "border-bottom-color": !0,
            "border-bottom-left-radius": !0,
            "border-bottom-right-radius": !0,
            "border-bottom-style": !0,
            "border-bottom-width": !0,
            "border-collapse": !0,
            "border-color": !0,
            "border-image": !0,
            "border-image-outset": !0,
            "border-image-repeat": !0,
            "border-image-slice": !0,
            "border-image-source": !0,
            "border-image-width": !0,
            "border-left": !0,
            "border-left-color": !0,
            "border-left-style": !0,
            "border-left-width": !0,
            "border-radius": !0,
            "border-right": !0,
            "border-right-color": !0,
            "border-right-style": !0,
            "border-right-width": !0,
            "border-spacing": !0,
            "border-style": !0,
            "border-top": !0,
            "border-top-color": !0,
            "border-top-left-radius": !0,
            "border-top-right-radius": !0,
            "border-top-style": !0,
            "border-top-width": !0,
            "border-width": !0,
            bottom: !1,
            "box-decoration-break": !0,
            "box-shadow": !0,
            "box-sizing": !0,
            "box-snap": !0,
            "box-suppress": !0,
            "break-after": !0,
            "break-before": !0,
            "break-inside": !0,
            "caption-side": !1,
            chains: !1,
            clear: !0,
            clip: !1,
            "clip-path": !1,
            "clip-rule": !1,
            color: !0,
            "color-interpolation-filters": !0,
            "column-count": !1,
            "column-fill": !1,
            "column-gap": !1,
            "column-rule": !1,
            "column-rule-color": !1,
            "column-rule-style": !1,
            "column-rule-width": !1,
            "column-span": !1,
            "column-width": !1,
            columns: !1,
            contain: !1,
            content: !1,
            "counter-increment": !1,
            "counter-reset": !1,
            "counter-set": !1,
            crop: !1,
            cue: !1,
            "cue-after": !1,
            "cue-before": !1,
            cursor: !1,
            direction: !1,
            display: !0,
            "display-inside": !0,
            "display-list": !0,
            "display-outside": !0,
            "dominant-baseline": !1,
            elevation: !1,
            "empty-cells": !1,
            filter: !1,
            flex: !1,
            "flex-basis": !1,
            "flex-direction": !1,
            "flex-flow": !1,
            "flex-grow": !1,
            "flex-shrink": !1,
            "flex-wrap": !1,
            float: !1,
            "float-offset": !1,
            "flood-color": !1,
            "flood-opacity": !1,
            "flow-from": !1,
            "flow-into": !1,
            font: !0,
            "font-family": !0,
            "font-feature-settings": !0,
            "font-kerning": !0,
            "font-language-override": !0,
            "font-size": !0,
            "font-size-adjust": !0,
            "font-stretch": !0,
            "font-style": !0,
            "font-synthesis": !0,
            "font-variant": !0,
            "font-variant-alternates": !0,
            "font-variant-caps": !0,
            "font-variant-east-asian": !0,
            "font-variant-ligatures": !0,
            "font-variant-numeric": !0,
            "font-variant-position": !0,
            "font-weight": !0,
            grid: !1,
            "grid-area": !1,
            "grid-auto-columns": !1,
            "grid-auto-flow": !1,
            "grid-auto-rows": !1,
            "grid-column": !1,
            "grid-column-end": !1,
            "grid-column-start": !1,
            "grid-row": !1,
            "grid-row-end": !1,
            "grid-row-start": !1,
            "grid-template": !1,
            "grid-template-areas": !1,
            "grid-template-columns": !1,
            "grid-template-rows": !1,
            "hanging-punctuation": !1,
            height: !0,
            hyphens: !1,
            icon: !1,
            "image-orientation": !1,
            "image-resolution": !1,
            "ime-mode": !1,
            "initial-letters": !1,
            "inline-box-align": !1,
            "justify-content": !1,
            "justify-items": !1,
            "justify-self": !1,
            left: !1,
            "letter-spacing": !0,
            "lighting-color": !0,
            "line-box-contain": !1,
            "line-break": !1,
            "line-grid": !1,
            "line-height": !1,
            "line-snap": !1,
            "line-stacking": !1,
            "line-stacking-ruby": !1,
            "line-stacking-shift": !1,
            "line-stacking-strategy": !1,
            "list-style": !0,
            "list-style-image": !0,
            "list-style-position": !0,
            "list-style-type": !0,
            margin: !0,
            "margin-bottom": !0,
            "margin-left": !0,
            "margin-right": !0,
            "margin-top": !0,
            "marker-offset": !1,
            "marker-side": !1,
            marks: !1,
            mask: !1,
            "mask-box": !1,
            "mask-box-outset": !1,
            "mask-box-repeat": !1,
            "mask-box-slice": !1,
            "mask-box-source": !1,
            "mask-box-width": !1,
            "mask-clip": !1,
            "mask-image": !1,
            "mask-origin": !1,
            "mask-position": !1,
            "mask-repeat": !1,
            "mask-size": !1,
            "mask-source-type": !1,
            "mask-type": !1,
            "max-height": !0,
            "max-lines": !1,
            "max-width": !0,
            "min-height": !0,
            "min-width": !0,
            "move-to": !1,
            "nav-down": !1,
            "nav-index": !1,
            "nav-left": !1,
            "nav-right": !1,
            "nav-up": !1,
            "object-fit": !1,
            "object-position": !1,
            opacity: !1,
            order: !1,
            orphans: !1,
            outline: !1,
            "outline-color": !1,
            "outline-offset": !1,
            "outline-style": !1,
            "outline-width": !1,
            overflow: !1,
            "overflow-wrap": !1,
            "overflow-x": !1,
            "overflow-y": !1,
            padding: !0,
            "padding-bottom": !0,
            "padding-left": !0,
            "padding-right": !0,
            "padding-top": !0,
            page: !1,
            "page-break-after": !1,
            "page-break-before": !1,
            "page-break-inside": !1,
            "page-policy": !1,
            pause: !1,
            "pause-after": !1,
            "pause-before": !1,
            perspective: !1,
            "perspective-origin": !1,
            pitch: !1,
            "pitch-range": !1,
            "play-during": !1,
            position: !1,
            "presentation-level": !1,
            quotes: !1,
            "region-fragment": !1,
            resize: !1,
            rest: !1,
            "rest-after": !1,
            "rest-before": !1,
            richness: !1,
            right: !1,
            rotation: !1,
            "rotation-point": !1,
            "ruby-align": !1,
            "ruby-merge": !1,
            "ruby-position": !1,
            "shape-image-threshold": !1,
            "shape-outside": !1,
            "shape-margin": !1,
            size: !1,
            speak: !1,
            "speak-as": !1,
            "speak-header": !1,
            "speak-numeral": !1,
            "speak-punctuation": !1,
            "speech-rate": !1,
            stress: !1,
            "string-set": !1,
            "tab-size": !1,
            "table-layout": !1,
            "text-align": !0,
            "text-align-last": !0,
            "text-combine-upright": !0,
            "text-decoration": !0,
            "text-decoration-color": !0,
            "text-decoration-line": !0,
            "text-decoration-skip": !0,
            "text-decoration-style": !0,
            "text-emphasis": !0,
            "text-emphasis-color": !0,
            "text-emphasis-position": !0,
            "text-emphasis-style": !0,
            "text-height": !0,
            "text-indent": !0,
            "text-justify": !0,
            "text-orientation": !0,
            "text-overflow": !0,
            "text-shadow": !0,
            "text-space-collapse": !0,
            "text-transform": !0,
            "text-underline-position": !0,
            "text-wrap": !0,
            top: !1,
            transform: !1,
            "transform-origin": !1,
            "transform-style": !1,
            transition: !1,
            "transition-delay": !1,
            "transition-duration": !1,
            "transition-property": !1,
            "transition-timing-function": !1,
            "unicode-bidi": !1,
            "vertical-align": !1,
            visibility: !1,
            "voice-balance": !1,
            "voice-duration": !1,
            "voice-family": !1,
            "voice-pitch": !1,
            "voice-range": !1,
            "voice-rate": !1,
            "voice-stress": !1,
            "voice-volume": !1,
            volume: !1,
            "white-space": !1,
            widows: !1,
            width: !0,
            "will-change": !1,
            "word-break": !0,
            "word-spacing": !0,
            "word-wrap": !0,
            "wrap-flow": !1,
            "wrap-through": !1,
            "writing-mode": !1,
            "z-index": !1
        };
        return e
    }

    var n = /javascript\s*\:/gim;
    t.whiteList = i(), t.getDefaultWhiteList = i, t.onAttr = function (e, t, i) {
    }, t.onIgnoreAttr = function (e, t, i) {
    }, t.safeAttrValue = function (e, t) {
        return n.test(t) ? "" : t
    }
}, function (e, t) {
    e.exports = {
        indexOf: function (e, t) {
            var i, n;
            if (Array.prototype.indexOf) return e.indexOf(t);
            for (i = 0, n = e.length; i < n; i++) if (e[i] === t) return i;
            return -1
        }, forEach: function (e, t, i) {
            var n, o;
            if (Array.prototype.forEach) return e.forEach(t, i);
            for (n = 0, o = e.length; n < o; n++) t.call(i, e[n], n, e)
        }, trim: function (e) {
            return String.prototype.trim ? e.trim() : e.replace(/(^\s*)|(\s*$)/g, "")
        }, trimRight: function (e) {
            return String.prototype.trimRight ? e.trimRight() : e.replace(/(\s*$)/g, "")
        }
    }
}, function (e, t, i) {
    var n = i(415);

    function o(e) {
        var t = n.spaceIndex(e);
        if (-1 === t) var i = e.slice(1, -1); else i = e.slice(1, t + 1);
        return "/" === (i = n.trim(i).toLowerCase()).slice(0, 1) && (i = i.slice(1)), "/" === i.slice(-1) && (i = i.slice(0, -1)), i
    }

    function a(e) {
        return "</" === e.slice(0, 2)
    }

    var r = /[^a-zA-Z0-9_:\.\-]/gim;

    function s(e, t) {
        for (; t < e.length; t++) {
            var i = e[t];
            if (" " !== i) return "=" === i ? t : -1
        }
    }

    function l(e, t) {
        for (; t > 0; t--) {
            var i = e[t];
            if (" " !== i) return "=" === i ? t : -1
        }
    }

    function d(e) {
        return function (e) {
            return '"' === e[0] && '"' === e[e.length - 1] || "'" === e[0] && "'" === e[e.length - 1]
        }(e) ? e.substr(1, e.length - 2) : e
    }

    t.parseTag = function (e, t, i) {
        "use strict";
        var n = "", r = 0, s = !1, l = !1, d = 0, u = e.length, c = "", h = "";
        e:for (d = 0; d < u; d++) {
            var f = e.charAt(d);
            if (!1 === s) {
                if ("<" === f) {
                    s = d;
                    continue
                }
            } else if (!1 === l) {
                if ("<" === f) {
                    n += i(e.slice(r, d)), s = d, r = d;
                    continue
                }
                if (">" === f) {
                    n += i(e.slice(r, s)), c = o(h = e.slice(s, d + 1)), n += t(s, n.length, c, h, a(h)), r = d + 1, s = !1;
                    continue
                }
                if ('"' === f || "'" === f) for (var p = 1, g = e.charAt(d - p); " " === g || "=" === g;) {
                    if ("=" === g) {
                        l = f;
                        continue e
                    }
                    g = e.charAt(d - ++p)
                }
            } else if (f === l) {
                l = !1;
                continue
            }
        }
        return r < e.length && (n += i(e.substr(r))), n
    }, t.parseAttr = function (e, t) {
        "use strict";
        var i = 0, o = [], a = !1, u = e.length;

        function c(e, i) {
            if (!((e = (e = n.trim(e)).replace(r, "").toLowerCase()).length < 1)) {
                var a = t(e, i || "");
                a && o.push(a)
            }
        }

        for (var h = 0; h < u; h++) {
            var f, p = e.charAt(h);
            if (!1 !== a || "=" !== p) if (!1 === a || h !== i || '"' !== p && "'" !== p || "=" !== e.charAt(h - 1)) {
                if (/\s|\n|\t/.test(p)) {
                    if (e = e.replace(/\s|\n|\t/g, " "), !1 === a) {
                        if (-1 === (f = s(e, h))) {
                            c(n.trim(e.slice(i, h))), a = !1, i = h + 1;
                            continue
                        }
                        h = f - 1;
                        continue
                    }
                    if (-1 === (f = l(e, h - 1))) {
                        c(a, d(n.trim(e.slice(i, h)))), a = !1, i = h + 1;
                        continue
                    }
                }
            } else {
                if (-1 === (f = e.indexOf(p, h + 1))) break;
                c(a, n.trim(e.slice(i + 1, f))), a = !1, i = (h = f) + 1
            } else a = e.slice(i, h), i = h + 1
        }
        return i < e.length && (!1 === a ? c(e.slice(i)) : c(a, d(n.trim(e.slice(i))))), n.trim(o.join(" "))
    }
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(283);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\commentInput-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(465), o = i(309);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(891);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\download-category.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), a = i(30), r = i(13), s = i(11), l = i(42), d = s.DownloadKernelTaskManager.getTaskManager();
    !function (e) {
        let t = null, s = -1, u = null;
        e.init = function () {
            a.default.attachListener(r.NodeEventMesssageNS.eventDownloadItemActive, (e, a, r, c, h) => {
                a && e === o.DownloadKernel.CategroyViewID.Downloading ? (-1 !== s && null !== t && (clearTimeout(t), t = null), s = r, t = setTimeout(() => n(this, void 0, void 0, function* () {
                    if (-1 !== s) {
                        let e = d.getTaskFromTaskId(s);
                        if (e) {
                            let t = e.getTaskBaseInfo();
                            if (t.gcid && "" !== t.gcid) return;
                            const {QueryTaskInfoHelperNS: n} = yield Promise.resolve().then(() => i(882));
                            if (t.taskType === o.DownloadKernel.TaskType.P2sp) {
                                let i = e.getExtraObject().getDisplayUrl();
                                "" === i && (i = t.url), l.Common.isThunderPrivateUrl(i) && (i = l.Common.parseThunderPrivateUrl(i)), n.queryResInfo("url", i).then(t => {
                                    t && 200 === t.status && null !== t.data && null !== t.data.result && "ok" === t.data.result && "" !== t.data.gcid && "1111111111111111111111111111111111111111" !== t.data.gcid && (e.beginBatchSetTaskAttribute(), e.setFileSize(t.data.file_size), e.setGcid(t.data.gcid), e.commitBatchSetTaskAttribute())
                                }).catch()
                            } else if (t.taskType === o.DownloadKernel.TaskType.Emule) {
                                let i = t.url;
                                l.Common.isThunderPrivateUrl(i) && (i = l.Common.parseThunderPrivateUrl(i)), n.postRequestEd2kTaskInfoByEd2kLink(i).then(t => {
                                    t && t.gcid && "" !== t.gcid && "1111111111111111111111111111111111111111" !== t.gcid && e.setGcid(t.gcid)
                                }).catch()
                            }
                            if (t.taskType === o.DownloadKernel.TaskType.Group) {
                                let e = [], i = "", a = d.getTaskFromTaskId(t.taskId).getExtraObject(),
                                    r = a.getSubTaskCount(), s = new Map;
                                for (let t = 0; t < r; ++t) {
                                    let n = a.getSubTaskByIndex(t);
                                    if (n.getType() === o.DownloadKernel.TaskType.P2sp) {
                                        let o = n.getTaskBaseInfo();
                                        if (o.fileSize && o.fileSize > 0) continue;
                                        o.url && o.url.length > 0 && (i = o.url, l.Common.isThunderPrivateUrl(i) && (i = l.Common.parseThunderPrivateUrl(i)), e.push(i), s.set(i, t))
                                    }
                                }
                                e.length > 0 && !u && (u = t.taskId, n.asyncBatchQueryP2spTaskInfoByUrl(e, (e, t, i) => {
                                    a.setSubTaskFileSize(s.get(e), t.fileSize)
                                }, () => {
                                    u = null
                                }).catch())
                            }
                        }
                    }
                }), 100)) : s === r && (null !== t && (clearTimeout(t), t = null), s = -1)
            })
        }, e.getQueryTaskId = function () {
            return u
        }
    }(t.QueryTaskInfoNS || (t.QueryTaskInfoNS = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(451), o = i(347);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-speed-text.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(467), o = i(351);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\components\\select-native.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(105), a = i(55), r = i(969), s = i(120), l = i(579), d = i(974);
    t.probe = function (e, t) {
        var i = t || {}, u = r.defer(), c = null, h = a.platform(), f = l.createBuilder(h);
        c = o.spawn(l.getExecutablePath(h), f.getResult(e, i));
        var p = d.createParser(h);
        c.once("error", function () {
            var e = new Error(n.format("ping.probe: %s. %s", "there was an error while executing the ping program. ", "Check the path or permissions..."));
            u.reject(e)
        });
        var g = [];
        return c.stdout.on("data", function (e) {
            g.push(String(e))
        }), c.once("close", function () {
            var e = g.join("").split("\n");
            s.each(e, p.eat, p);
            var t = p.getResult();
            u.resolve(t)
        }), u.promise
    }
}, function (e, t, i) {
    "use strict";
    var n = i(120), o = i(5), a = i(971), r = i(972), s = i(973);

    function l() {
    }

    l.isLinux = function (e) {
        return ["aix", "linux"].indexOf(e) >= 0
    }, l.isMacOS = function (e) {
        return ["darwin", "freebsd"].indexOf(e) >= 0
    }, l.isWindow = function (e) {
        return e && null !== e.match(/^win/)
    }, l.isPlatformSupport = function (e) {
        return n.some([this.isWindow(e), this.isLinux(e), this.isMacOS(e)])
    }, l.getExecutablePath = function (e) {
        if (!this.isPlatformSupport(e)) throw new Error(o.format("Platform |%s| is not support", e));
        var t = null;
        return "aix" === e ? t = "/usr/sbin/ping" : l.isLinux(e) ? t = "/bin/ping" : l.isWindow(e) ? t = process.env.SystemRoot + "/system32/ping.exe" : l.isMacOS(e) && (t = "/sbin/ping"), t
    }, l.createBuilder = function (e) {
        if (!this.isPlatformSupport(e)) throw new Error(o.format("Platform |%s| is not support", e));
        var t = null;
        return l.isLinux(e) ? t = a : l.isWindow(e) ? t = s : l.isMacOS(e) && (t = r), t
    }, e.exports = l
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(120), a = i(417);

    function r() {
        a.call(this)
    }

    n.inherits(r, a), r.prototype._processHeader = function (e) {
        var t = e.split(" ");
        this._response.host = t[1], this._response.numeric_host = t[2].slice(1, -2), this._changeState(this.STATES.BODY)
    }, r.prototype._processBody = function (e) {
        if ((e.match(/=/g) || []).length >= 3) {
            var t = /([0-9\.]+)[ ]*ms/.exec(e);
            this._times.push(parseFloat(t[1], 10))
        }
        e.indexOf("---") >= 0 && this._changeState(this.STATES.FOOTER)
    }, r.prototype._processFooter = function (e) {
        if ((e.match(/[\/]/g) || []).length >= 3) {
            var t = /([0-9\.]+)/g, i = t.exec(e), n = t.exec(e), a = t.exec(e), r = t.exec(e);
            o.all([i, n, a, r]) && (this._response.min = parseFloat(i[1], 10), this._response.avg = parseFloat(n[1], 10), this._response.max = parseFloat(a[1], 10), this._response.stddev = parseFloat(r[1], 10), this._changeState(this.STATES.END)), this._changeState(this.STATES.END)
        }
    }, e.exports = r
}, function (e, t, i) {
    i(582), e.exports = i(583)
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(5), a = i(0), r = i(7), s = i(79), l = i(19), d = i(35),
        u = r.default(n.join(__rootDir, "../bin/ThunderHelper.node"));

    function c() {
        "console" === process.env.TL_OUTPUT ? a.default.outputLogger = a.outputLoggerConsole : a.default.outputLogger = function () {
            function e(e) {
                return function (...t) {
                    u.printEtwLog(e, function (...e) {
                        return e.map(e => o.inspect(e)).join(" ").replace(/%/g, "%%")
                    }(...t))
                }
            }

            return {
                [a.LogLevel.Critical]: e(a.LogLevel.Critical),
                [a.LogLevel.Error]: e(a.LogLevel.Error),
                [a.LogLevel.Warning]: e(a.LogLevel.Warning),
                [a.LogLevel.Information]: e(a.LogLevel.Information),
                [a.LogLevel.Verbose]: e(a.LogLevel.Verbose)
            }
        }()
    }

    function h() {
        let e = s.DevEnvHelperNS.isLogEnable();
        "1" === process.env.TL_ENABLE !== e && (process.env.TL_ENABLE = e ? "1" : "0", a.default.enableLogger = e, u.enableETWLogger(e));
        let t = s.DevEnvHelperNS.getLogOutput();
        t && t !== process.env.TL_OUTPUT && (process.env.TL_OUTPUT = t, c())
    }

    process.env.TL_ENABLE = "0", a.default.enableLogger = "1" === process.env.TL_ENABLE, c(), h(), "browser" === process.type ? l.ipcMain.on(d.ThunderChannelList.channelRMUpdateLogEnviroment, () => {
        l.BrowserWindow.getAllWindows().forEach(e => {
            e.isDestroyed() || e.webContents.send(d.ThunderChannelList.channelMRUpdateLogEnviroment)
        }), h()
    }) : "renderer" === process.type && l.ipcRenderer.on(d.ThunderChannelList.channelMRUpdateLogEnviroment, () => {
        h()
    })
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(71), a = i(377);
    a.CommonIPCRenderer.rendererCommunicator.initialize(o.CommonIPCBase.mainRendererContext), a.CommonIPCRenderer.rendererCommunicator.connect();
    let r = !1;
    const s = i(15);
    s.server.start({IsMainRendererReadyToShow: () => r});
    const l = i(3);
    l.client.start({name: o.CommonIPCBase.mainRendererContext});
    const d = i(587), u = i(17), c = i(19), h = i(2), f = i(2), p = i(20), g = i(98), m = i(0);
    i(596);
    const v = i(39), y = i(33), T = i(385), w = i(13), k = i(651), C = i(666), b = i(670), I = i(675), S = i(676),
        _ = i(677), D = i(678), A = i(92), N = i(681), x = i(684), E = i(685), O = i(686), P = i(687), M = i(688),
        F = i(28), L = i(689), R = i(690), B = i(691), U = i(692), V = i(693), K = i(694), G = i(695), W = i(696),
        j = i(697), H = i(520), z = i(35), X = i(34), q = i(698), Y = i(103), J = i(48), Z = i(23), Q = i(402),
        $ = i(30), ee = i(10), te = i(77), ie = i(699), ne = i(90), oe = i(108), ae = i(63), re = i(107), se = i(703),
        le = i(9), de = i(948), ue = i(949), ce = i(530), he = i(950), fe = i(543), pe = i(25), ge = i(45), me = i(22),
        ve = i(56), ye = i(53), Te = i(535), we = i(533), ke = i(544), Ce = i(143), be = i(951), Ie = i(952), Se = i(7),
        _e = Se.default(f.join(__rootDir, "../bin/ThunderHelper.node")),
        De = Se.default(f.join(__rootDir, "../bin/WeakReferences.node")), Ae = i(953), Ne = i(575), xe = i(958),
        Ee = i(959);
    i(382), i(960);
    const Oe = i(961), Pe = i(111), Me = i(146), Fe = i(962), Le = i(963), Re = i(964), Be = i(412), Ue = i(4),
        Ve = i(32), Ke = i(11), Ge = i(977), We = i(978), je = i(399), He = i(406), ze = i(116), Xe = i(979),
        qe = i(36), Ye = i(12), Je = i(8), Ze = i(14), Qe = Ke.DownloadKernelTaskManager.getTaskManager(),
        $e = Te.GroupAccelerateManagerNS.getManager(), et = we.GroupAccelerateWebManagerNS.getManager(),
        tt = ve.ToastNotifyManagerNS.getToastNotifyManger();
    d.PerformanceMonitorStatNS.init("main-renderer"), c.ipcRenderer.send(z.ThunderChannelList.channelRMProcessSend, process.pid);
    const it = m.default.getLogger("Thunder.MainRenderer");
    de.ThunderToolsNS.enableDevTools().catch(e => {
        it.warning(e)
    });
    let nt = !1, ot = !1, at = "", rt = !1, st = !1;

    function lt() {
        return n(this, void 0, void 0, function* () {
            if (nt) return;
            let e = (yield Ye.asyncRemoteCall.getProcess()).argv;
            for (let t = 0; t < e.length; t++) {
                let i = e[t];
                if (0 === i.indexOf("-StartType:")) at = i.substr("-StartType:".length); else if (0 === i.indexOf("thunderx://", 0)) {
                    let e = `newthunder=${encodeURIComponent(i)}`;
                    le.XLStatNS.trackEvent("core_operate", "newthunder_startup", "", 0, 0, 0, 0, e)
                } else "-silent" === i ? ot = !0 : i.indexOf("play:true") > -1 ? rt = !0 : i.indexOf("unionfile") > -1 && (st = !0)
            }
            nt = !0
        })
    }

    lt().then(() => {
        oe.default.setStartArgs(at)
    }).catch(), ae.quitPromises.add(function () {
        return new Promise(e => n(this, void 0, void 0, function* () {
            _e.setQuitEvent(), e(!0)
        }))
    }), ae.quitPromises.add(function () {
        return new Promise(e => n(this, void 0, void 0, function* () {
            yield he.default.saveMainWndData(), _e.stopListenLocalNet(), e(!0)
        }))
    }), ae.quitPromises.add(function () {
        return new Promise(e => {
            v.ThunderNewTask.uninit(), e(!0)
        })
    }), ae.quitPromises.addBefore(function () {
        return new Promise(e => n(this, void 0, void 0, function* () {
            yield X.TaskOperatorNs.pauseAll(Ue.DownloadKernel.TaskStopReason.Exit), e(!0)
        }))
    }), ae.quitPromises.addBefore(function () {
        return n(this, void 0, void 0, function* () {
            return He.SyncMsgHelperNS.uninit(), !0
        })
    }), ae.quitPromises.addBefore(function () {
        return n(this, void 0, void 0, function* () {
            return ze.ShouleiListSyncNS.getMananger().uninit(), !0
        })
    }), ae.quitPromises.addAfter(function () {
        return n(this, void 0, void 0, function* () {
            return yield ee.ConfigNS.save(), yield te.BHOConfigNS.save(), !0
        })
    }), ae.quitPromises.add(function () {
        return new Promise(e => {
            e(!0)
        })
    }), ae.quitPromises.add(function () {
        return n(this, void 0, void 0, function* () {
            return s.server.fireClientEvent("main-will-quit"), !0
        })
    }), ae.quitPromises.add(function () {
        return n(this, void 0, void 0, function* () {
            return re.default.uninit(), !0
        })
    }), ae.quitPromises.add(function () {
        return n(this, void 0, void 0, function* () {
            return yield Re.DownloadDetectHelperNS.uninit(), !0
        })
    }), ae.quitPromises.add(function () {
        return n(this, void 0, void 0, function* () {
            return new Promise(e => {
                if (Ve.ThunderKernel.commitAllTransaction(), Ve.ThunderKernel.stopPushStorageCommand(), 0 === Ve.ThunderKernel.getStorageWaitingCommandSize()) e(!0); else {
                    let t = 0, i = null;
                    i = setInterval(() => {
                        t++;
                        let n = Ve.ThunderKernel.getStorageWaitingCommandSize();
                        0 === n || t > 100 ? (i && (clearInterval(i), i = null), e(!0)) : it.information("WaitingCommandSize", n)
                    }, 100)
                }
            })
        })
    }), ae.quitPromises.add(function () {
        return n(this, void 0, void 0, function* () {
            let e = "";
            if (ee.ConfigNS.getValue("ThunderPanPlugin", "useDefault", !1)) e = ee.ConfigNS.getValue("ThunderPanPlugin", "defaultDownloadPath", "C:\\迅雷下载"); else {
                let t = ee.ConfigNS.getValue("ThunderPanPlugin", "downloadPaths", []);
                t && t.length > 0 && (e = t[0])
            }
            it.information("quitDeleteTmpXmpDownloadFile panDir", e);
            let t = "";
            if (e && "" !== e) t = h.join(e, "云盘缓存"); else {
                let e = yield Ze.ThunderUtil.getThunderTempPath(!0);
                t = h.join(e, "云盘下载", "云盘缓存")
            }
            let i = yield Je.FileSystemAWNS.rmdirAW(t);
            return it.information("quitDeleteTmpXmpDownloadFile rmdirsAW ret", i), !0
        })
    }), global.__homepageWebviewReady = !1, global.AsyncGetNativeCallModuleObj = function (e) {
        e(u.NativeCallModule)
    }, global.xlNativeCallModule = u.NativeCallModule, global.__xdasObjectLiftMonitor = De, pe.default.init().catch(e => {
        it.warning(e)
    }), ge.default.init().catch(e => {
        it.warning(e)
    }), _e.allowSetForegroundWindow(), k.NaviteFunctionNS.registerNativeFunction(), C.PluginFunctionNS.registerPluginFunction(), b.ConfigPluginFunctionNS.registerPluginFunction(), I.ConfigRemoteGlobalPluginFunctionNS.registerPluginFunction(), S.LoginPluginFunctionNS.registerPluginFunction(), _.TipsPluginFunctionNS.registerPluginFunction(), D.DkPluginFunctionNS.registerPluginFunction(), A.PluginFunctionUINS.registerPluginFunction(), N.SkinPluginFunctionNS.registerPluginFunction(), x.VipPluginFunctionNS.registerPluginFunction(), E.NotificationPluginFunctionNS.registerPluginFunction(), We.ScheduleTaskPluginFunctionNS.registerPluginFunction(), O.ShouleiConnectPluginFunctionNS.registerPluginFunction(), P.SearchPluginFunctionNS.registerPluginFunction(), M.XmpPluginFunctionNS.registerPluginFunction(), Promise.resolve().then(() => i(982)).catch(), Xe.clientProduct.init().catch(), oe.default.init().catch(), v.ThunderNewTask.init().catch(), g.default.config.ignoredElements = ["webview"], new g.default({
        components: {App: se.default},
        render: e => e("app")
    }).$mount("#app"), ee.ConfigNS.init(f.join(__profilesDir, "config.json")).catch(e => {
        it.warning(e)
    }), te.BHOConfigNS.init().catch(e => {
        it.warning(e)
    }), be.BindConfigNS.init(), he.default.initMainRendererHelper(), B.ConfigNaviteFunctionNS.registerNativeFunction(), U.ConfigRemoteGlobalNaviteFunctionNS.registerNativeFunction(), K.SkinNaviteFunctionNS.registerNativeFunction(), L.LoginNaviteFunctionNS.registerNativeFunction(), xe.TipsNaviteFunctionNS.registerNativeFunction(), j.ShouleiConnectNaviteFunctionNS.registerNativeFunction(), c.ipcRenderer.on(z.ThunderChannelList.channelMRGetConfigValue, (e, ...t) => {
        do {
            if (!t || !t[0] || !t[1]) {
                c.ipcRenderer.send(z.ThunderChannelList.channelRMGetConfigValueReject);
                break
            }
            let e = t[0], i = t[1], n = t[2], o = ee.ConfigNS.getValue(e, i, n);
            c.ipcRenderer.send(z.ThunderChannelList.channelRMGetConfigValueResolve, o)
        } while (0)
    }), c.ipcRenderer.on(z.ThunderChannelList.channelMRSetConfigValue, (e, ...t) => {
        do {
            if (!t || !t[0] || !t[1]) {
                c.ipcRenderer.send(z.ThunderChannelList.channelRMSetConfigValueReject);
                break
            }
            let e = t[0], i = t[1], n = t[2];
            ee.ConfigNS.setValue(e, i, n), ee.ConfigNS.save().catch()
        } while (0)
    }), c.ipcRenderer.on(z.ThunderChannelList.channelMRTrayMenuClick, (e, t, i) => n(this, void 0, void 0, function* () {
        it.verbose(e), "-task:newtask" === t ? (i = void 0 === i ? "other" : i, le.XLStatNS.trackEvent("core_event", "create_task_click", "", 0, 0, 0, 0, "click_source=" + i), it.information("trackEvent", "core_event", "create_task_click", "click_source=" + i), v.ThunderNewTask.createPreNewTaskWindow(null)) : "-task:startall" === t ? X.TaskOperatorNs.startAll() : "-task:pauseall" === t ? X.TaskOperatorNs.pauseAll(Ue.DownloadKernel.TaskStopReason.PauseAll).catch() : "-task:quitprocess" === t && (yield je.QuitMessageBoxMgrNS.popup()) && (yield ae.quitPromises.run())
    })), c.ipcRenderer.on(z.ThunderChannelList.channelMRFileCopyResult, (e, t, i) => {
        it.information("channelMRFileCopyResult", t, i), t && tt.showNotify(ve.ToastNotifyManagerNS.notifyIdTaskOperatorMoveTask, ye.ToastNotifyItemType.GreenNotify, "复制成功", 3e3)
    }), function () {
        return n(this, void 0, void 0, function* () {
            (yield Ye.asyncRemoteCall.getIpcMain()).on("onShowMessageBox", (e, t) => {
                it.verbose(e), "retryLogin" === t && me.MessageBox.confirm({
                    title: "登录失败，请检查网络是否正常",
                    type: me.MessageBox.ConfirmType.Info,
                    content: "如果通过代理访问网络，请确认代理已正确设置。<br>如果是办公网络，请确认网络是否限制迅雷登录。",
                    okText: "我知道了",
                    cancelVisible: !1
                }).catch()
            })
        })
    }().catch(), window.getPluginUpdater = ke.default.getPluginUpdater, setTimeout(() => n(this, void 0, void 0, function* () {
        let e = ee.ConfigNS.getValue("Install", "PersonalUid", "");
        if (e && "" !== e) try {
            const t = yield i(18);
            t.defaults.adapter = i(21);
            let n = "https://msg-vip-ssl.xunlei.com/individuation/Clinetreport?userid=";
            n += e, n += "&param=active_user", n += "&peer_id=" + _e.getPeerID(), yield t.get(n, {responseType: "arraybuffer"})
        } catch (e) {
            it.warning(e)
        }
    }), 5e3), c.ipcRenderer.on(z.ThunderChannelList.channelMRShowOrHideWindow, (e, t, i) => {
        "show" === t ? ee.ConfigNS.setValue("Consumption", "ShowMainWindowTime", i) : ee.ConfigNS.setValue("Consumption", "HideMainWindowTime", i)
    }), function () {
        return n(this, void 0, void 0, function* () {
            setTimeout(() => {
                "Install" === oe.default.getStartArgs() && ee.ConfigNS.setValue("CompletedTaskPlay", "isXmpInited", 0), re.default.autoInstallXmp().catch(), re.default.init().then().catch()
            }, 3e3), r = !0, qe.NativeCallNS.init(), R.DKNaviteFunctionNS.registerNativeFunction(), G.VipNaviteFunctionNS.registerNativeFunction(), V.DownloadAndPlayNaviteFunctionNS.registerNativeFunction(), W.SubtitleManagerNaviteFunctionNS.registerNativeFunction(), Ee.NotificationNaviteFunctionNS.registerNativeFunction(), Ae.AdManageNS.init(), Oe.defaultNavite.registerDefaultNativeFunction(), s.server.fireClientEvent("main-renderer-ready-to-show"), ce.default.initAccelerator(), y.DownloadKernelManager.init().then(() => {
                l.client.attachServerEvent("OnVipTaskInfoChanged", (e, t, i) => {
                    if (!e || "vip-download-webview" !== e.name) return;
                    if (!i) return;
                    it.information("onVipTaskInfoChanged taskId,taskInfo:", t, i);
                    let n = Qe.getTaskFromTaskId(t);
                    n && n.setAcclerating(i.enterStatus === Be.VipDownloadDefineNS.VipTaskStatus.Acclerating)
                }), l.client.attachServerEvent("OnVipSubTaskInfoChanged", (e, t, i, n) => {
                    if (!e || "vip-download-webview" !== e.name) return;
                    if (!t) return;
                    let o = Qe.getTaskFromTaskId(t);
                    if (o && o.getType() === Ue.DownloadKernel.TaskType.Group && n && i) {
                        let e = null;
                        for (let t of i) (e = Qe.getTaskFromTaskId(t)) && e.setAcclerating(n.enterStatus === Be.VipDownloadDefineNS.VipTaskStatus.Acclerating)
                    }
                })
            }).catch(e => {
                it.warning(e)
            }), $.default.trackWin7NewTrait(), de.ThunderToolsNS.enableDragOpenFile(!0), ie.ConfigHandlerNS.init(), ne.SettingConfigHelperNS.configBrowserHelper.init().catch(), q.TaskHelperNS.init(), J.DownloadDispatchNS.init(), Y.DownloadJammedNS.init(), H.TaskDetailNS.init(), fe.FileAssociationNS.asynCheckAndAssociate().catch(), Le.fullScreenCheckBegin(), ae.quitPromises.add(Le.fullScreenCheckEnd), $e.init(), et.init("http://misc-xl9-ssl.xunlei.com/acc_xdas/dist/#/"), ue.ClipBoardNS.init(rt && st), Ne.QueryTaskInfoNS.init(), Ge.TaskP2spAutoRenameNS.init(), Ce.SubtitleManagerNS.init().catch(e => {
                it.warning(e)
            }), _e.startListenLocalNet(e => {
                if (it.information("startListenLocalNet, result = ", e), "OnInternetConnectSuc" === e || "OnInternetFallLine" === e) {
                    let t = 1, i = 1;
                    "OnInternetConnectSuc" === e ? (i = 1, t = 2) : (i = 2, t = 1), it.information("返回值：0 初始化状态，1 在线状态， 2 断网状态 onInternetConnectChange:", t, i), s.server.fireClientEvent("OnInternetConnectChange", t, i), F.NativeCallHostModule.nativeCallHost.fireNativeEvent("onInternetConnectChange", t, i)
                } else it.information("返回数据错误！")
            }), setTimeout(() => {
                _e.startAutoUpdateWithUI()
            }, 3e4);
            let e = new p.EventEmitter;
            T.PluginLoaderNS.pluginLoader.loadPlugin("VipDownload").catch(), T.PluginLoaderNS.pluginLoader.loadPlugin("VipPluginController").catch(), yield T.PluginLoaderNS.pluginLoader.loadPlugin("User"), yield Z.LoginHelperNS.loginSDKHelper.init(), u.NativeCallModule.nativeCall.AttachNativeEvent("onLoginPluginInited", () => n(this, void 0, void 0, function* () {
                Z.LoginHelperNS.loginHelper.isAutologin(e => n(this, void 0, void 0, function* () {
                    let t = yield Q.commonLoginHelper.isAutoPopupLogin();
                    if (it.information("isAutologin:", e, at, t), !e && ("Install" === at || t && "AutoRun" !== at && !ot)) {
                        let e = "other";
                        "Install" === at ? e = "Install" : t && (e = "auto"), Z.LoginHelperNS.loginHelper.showLoginDlg(e, !0), t && !ot && "AutoRun" !== at && Q.commonLoginHelper.setLoginWndShowConfig()
                    }
                }))
            })), yield T.PluginLoaderNS.pluginLoader.loadPlugin("ThunderXLogin"), T.PluginLoaderNS.pluginLoader.loadPlugin("VipRenewButton", "vip-plugin-controller").catch(), yield T.PluginLoaderNS.pluginLoader.loadPlugin("Centertip"), T.PluginLoaderNS.pluginLoader.loadPlugin("ThunderPanPlugin").catch(), T.PluginLoaderNS.pluginLoader.loadPlugin("ThunderIM").catch(), setTimeout(() => {
                T.PluginLoaderNS.pluginLoader.loadPlugin("XmpPlugin").catch()
            }, 1e3), T.PluginLoaderNS.pluginLoader.loadPlugin("Flash").catch(), setTimeout(() => {
                try {
                    let t = _e.getPeerID(), i = _e.getOSVersion(), n = f.join(__rootDir, "../../Thunder.exe"),
                        o = _e.getFileVersion(n), a = _e.getChannelID();
                    T.PluginLoaderNS.pluginLoader.startDownloadPlugins(t, i, "21", o, a, e)
                } catch (e) {
                }
            }, 1e4), e.on(w.NodeEventMesssageNS.eventPluginLoderPluginReady, e => n(this, void 0, void 0, function* () {
                if ("addTest4" === e) {
                    let t = yield T.PluginLoaderNS.pluginLoader.loadPlugin(e);
                    t && t.add && t.add("plugin loader")
                }
            })), setTimeout(() => {
                if ("Install" === at && !(ee.ConfigNS.getValue("ShowBrowser", "ShowBoxCount", 0) >= 3)) {
                    let e = "auto";
                    Me.popMutual.enqueue(Pe.PopView.BROWSER_GUIDE, () => n(this, void 0, void 0, function* () {
                        yield(yield Promise.resolve().then(() => i(110))).default().popUpBrowserGuide(!1, e)
                    }), e)
                }
            }, 6e3), setTimeout(() => n(this, void 0, void 0, function* () {
                Fe.EmptyWorkingSetNS.init().catch();
                const {exeVerify: e} = yield Promise.resolve().then(() => i(522));
                yield e.init()
            }), 5e3), setTimeout(() => {
                Ie.memoryWarningSupport().catch()
            }, 3e3), setTimeout(() => n(this, void 0, void 0, function* () {
                Re.DownloadDetectHelperNS.init().catch(), (yield Ye.asyncRemoteCall.getCurrentObject("powerMonitor")).on("resume", () => {
                    F.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnPowerMonitorResume")
                }), yield He.SyncMsgHelperNS.init(), ze.ShouleiListSyncNS.getMananger().init().catch()
            }), 2e3), yield lt()
        })
    }().catch(), window.addEventListener("keyup", e => {
        "F2" === e.key && e.ctrlKey && c.ipcRenderer.send(z.ThunderChannelList.channelRMUpdateLogEnviroment)
    })
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(41), o = i(95), a = i(20), r = i(585), s = i(61);
    t.Server = class extends a.EventEmitter {
        constructor() {
            super(), this.server = o.createServer(e => this.handleConnection(e)), this.productId = ""
        }

        getProductId() {
            return this.productId
        }

        listen(e, t) {
            let i = s.getSockPath(t);
            this.productId = t || s.getDefaultPrex(), n.existsSync(i) && n.unlinkSync(i), this.server.listen({
                path: i,
                readableAll: !0,
                writableAll: !0
            }, e)
        }

        handleConnection(e) {
            const t = new r.Client({socket: e});
            t.on("message", e => {
                this.handleRequest(e, t)
            }), t.on("end", () => {
                this.emit("end", t)
            }), t.on("error", e => {
                this.emit("error", t, e)
            }), this.emit("connect", t)
        }

        handleRequest(e, t) {
            this.emit("message", e, t)
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(95), o = i(20), a = i(123), r = i(497), s = i(61);
    t.Client = class extends o.EventEmitter {
        constructor(e) {
            if (e = e || {}, super(), this.inprocess = !1, this.context = void 0, e.context && (this.context = Object.assign({}, e.context), this.context.productId = e.socketPrex), e.socket) this.socket = e.socket, this.bind(); else if (global.__xdasIPCServer && global.__xdasIPCServer.getProductId().toLowerCase() === e.socketPrex.toLowerCase()) this.inprocess = !0; else {
                let t = s.getSockPath(e.socketPrex);
                this.socket = n.connect(t), this.bind()
            }
        }

        isInprocess() {
            return this.inprocess
        }

        getContext() {
            return this.context
        }

        bind() {
            const e = new r.Parser, t = this.socket;
            t.on("data", t => {
                e.feed(t)
            }), t.on("connect", () => {
                this.emit("connect")
            }), t.on("end", () => {
                a.information("socket is ended"), this.socket = null, this.emit("end")
            }), t.on("error", e => {
                this.socket = null, this.emit("error", e)
            }), e.on("message", e => {
                this.emit("message", e)
            }), this.parser = e
        }

        send(e) {
            if (this.socket) try {
                this.socket.write(this.parser.encode(e))
            } catch (e) {
                a.error(e.message)
            } else a.information("This socket has been ended by the other party", this.context && this.context.name)
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(95), o = i(20), a = i(123), r = i(497), s = i(61);
    t.Client = class extends o.EventEmitter {
        constructor(e) {
            if (e = e || {}, super(), this.inprocess = !1, this.context = void 0, e.context && (this.context = Object.assign({}, e.context), this.context.productId = e.socketPrex), e.socket) this.socket = e.socket, this.bind(); else if (global.__xdasIPCServer && global.__xdasIPCServer.getProductId().toLowerCase() === e.socketPrex.toLowerCase()) this.inprocess = !0; else {
                let t = s.getSockPath(e.socketPrex);
                this.socket = n.connect(t), this.bind()
            }
        }

        isInprocess() {
            return this.inprocess
        }

        getContext() {
            return this.context
        }

        bind() {
            const e = new r.Parser, t = this.socket;
            t.on("data", t => {
                e.feed(t)
            }), t.on("connect", () => {
                this.emit("connect")
            }), t.on("end", () => {
                a.information("socket is ended"), this.socket = null, this.emit("end")
            }), t.on("error", e => {
                this.socket = null, this.emit("error", e)
            }), e.on("message", e => {
                this.emit("message", e)
            }), this.parser = e
        }

        send(e) {
            if (this.socket) try {
                this.socket.write(this.parser.encode(e))
            } catch (e) {
                a.error(e.message)
            } else a.information("This socket has been ended by the other party", this.context && this.context.name)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(55), a = (i(41), i(2)), r = i(5);
    let s = null;
    const l = i(9), d = i(19), u = i(0), c = i(7), h = i(35), f = i(12), p = "xdas_profile_stat";
    let g = "", m = void 0, v = null, y = void 0, T = null,
        w = c.default(a.join(__rootDir, "../bin/ThunderHelper.node")), k = new Set;

    function C() {
        return n(this, void 0, void 0, function* () {
            return new Promise(e => n(this, void 0, void 0, function* () {
                void 0 === y && (null === T && (T = new Promise(e => {
                    e(y = function (e) {
                        let t = "";
                        if (0 === e.length && "renderer" === process.type) {
                            let e = a.normalize(decodeURIComponent(window.location.href)),
                                i = e.indexOf(process.resourcesPath);
                            i = i > -1 ? i + process.resourcesPath.length + 1 : i;
                            let n = e.length - 1, o = e.indexOf("?"), r = e.indexOf("#");
                            n = o > -1 ? Math.min(o - 1, n) : n, n = r > -1 ? Math.min(r - 1, n) : n, i > -1 && n >= i && (t = e.substr(i, n - i + 1))
                        }
                        return 0 === t.length && (t = 0 !== e.length ? e : process.type), t = t.replace(/\||,|;/g, "_")
                    }(""))
                })), y = yield T), e(y)
            }))
        })
    }

    function b(e) {
        let t = "";
        do {
            if (null === e || void 0 === e) break;
            switch (typeof e) {
                case"string":
                    t = e;
                    break;
                case"object":
                    t = r.inspect(e) || "";
                    break;
                case"number":
                case"boolean":
                    t = e.toString() || ""
            }
        } while (0);
        return t
    }

    function I(e) {
        return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
    }

    function S(e) {
        return n(this, void 0, void 0, function* () {
            return new Promise(t => n(this, void 0, void 0, function* () {
                let n = void 0;
                null === s && (s = yield Promise.resolve().then(() => i(72)));
                let o = s.createHash("md5");
                null !== o && (n = o.update(e).digest("hex")), t(n)
            }))
        })
    }

    function _() {
        return new Promise(e => n(this, void 0, void 0, function* () {
            let t = "";
            t = void 0 === m ? "browser" === process.type ? function () {
                if (void 0 === m) {
                    let e = process.argv.length, t = process.argv;
                    for (let i = 0; i < e; i++) {
                        let e = t[i];
                        if (e.startsWith("-StartType:")) {
                            m = e.substring("-StartType:".length);
                            break
                        }
                    }
                    void 0 === m && (m = "")
                }
                return m
            }() : yield function () {
                return n(this, void 0, void 0, function* () {
                    return null === v && (v = new Promise(e => {
                        d.ipcRenderer.send(h.ThunderChannelList.channelRMGetBrowserStartType), d.ipcRenderer.once(h.ThunderChannelList.channelMRGetBrowserStartTypeResult, (t, i) => {
                            m = i, e(i), v = null
                        })
                    })), v
                })
            }() : m, e(t)
        }))
    }

    function D(e, t, i, o) {
        return n(this, void 0, void 0, function* () {
            let a = b(t), r = b(i), s = yield S(r), d = function (e) {
                let t = new RegExp(I("file:///"), "g"), i = new RegExp(I(process.resourcesPath + "\\"), "g"),
                    n = new RegExp(I(encodeURI(process.resourcesPath.replace(/\\/g, "/") + "/")), "g");
                return e.replace(t, "").replace(i, "").replace(n, "")
            }(b(o)), u = yield S(d), c = `${e}:${s}:${u}`;
            k.has(c) || (k.add(c), l.XLStatNS.trackEvent(p, "uncaught_exception", "", 0, 0, 0, 0, `type=${e},business_name=${yield C()},code=${a},message_hash=${s},message=${encodeURI(r)},stack_hash=${u},stack=${encodeURI(d)}`)), function (e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                })
            }().catch()
        })
    }

    function A(e) {
        console.error(e);
        let t = e || {};
        D("unhandledRejection", t.code, t instanceof Error ? t.message : t, t.stack).catch()
    }

    !function (e) {
        e.init = function (e) {
            g = e
        }, e.trackColdStartUpEvent = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = w.iSColdStartUp() ? 1 : 0, i = o.release(), n = w.performanceMonitorReporter.getProcessUptime(),
                    a = yield _(), r = `key=${e},start_type=${a},cold_start_up=${t},os_version=${i},cost_time=${n}`;
                l.XLStatNS.trackEvent(p, "cold_start_up", "", 0, 0, 0, 0, r)
            })
        }
    }(t.PerformanceMonitorStatNS || (t.PerformanceMonitorStatNS = {})), function () {
        return n(this, void 0, void 0, function* () {
            if (process.on("uncaughtException", e => {
                console.error(e);
                let t = e || {};
                D("uncaughtException", t.code, t.message, t.stack).catch()
            }), "browser" === process.type) process.on("unhandledRejection", (e, t) => {
                A(e)
            }), d.ipcMain.on(h.ThunderChannelList.channelRMGetBrowserStartType, function (e) {
                return n(this, void 0, void 0, function* () {
                    let t = yield _();
                    e.sender.send(h.ThunderChannelList.channelMRGetBrowserStartTypeResult, t)
                })
            }); else if ("browser" !== process.type) {
                window.addEventListener("unhandledrejection", e => {
                    A(e && e.reason || {})
                });
                let e = yield f.asyncRemoteCall.getCurrentWebContents();
                null !== e && void 0 !== e && e.once("did-finish-load", () => {
                    (function () {
                        return n(this, void 0, void 0, function* () {
                            do {
                                if ("browser" === process.type) break;
                                if (null === window.performance.timing || void 0 === window.performance.timing) break;
                                let e = w.iSColdStartUp() ? 1 : 0, t = o.release(), i = window.performance.timing,
                                    n = i.loadEventEnd - i.navigationStart, a = i.fetchStart - i.navigationStart,
                                    r = i.domainLookupEnd - i.domainLookupStart, s = i.connectEnd - i.connectStart,
                                    d = i.responseStart - i.requestStart, u = i.responseEnd - i.responseStart,
                                    c = i.domComplete - i.domLoading, h = yield _();
                                l.XLStatNS.trackEvent(p, "page_load_time", "", 0, 0, 0, 0, `start_type=${h},cold_start_up=${e},os_version=${t},load_time=${n},before_fetch_time=${a},domin_lookup_time=${r},connect_time=${s},first_response_time=${d},responseTime=${u},domTime=${c},process=${g}`)
                            } while (0)
                        })
                    })().catch()
                })
            }
            u.default.hook("beforeLog", (e, t, ...i) => {
                e === u.LogLevel.Critical && l.XLStatNS.trackEvent(p, "critical_error", "", 0, 0, 0, 0, `module_name=${t},messages=${i}`)
            })
        })
    }().catch()
}, function (e, t, i) {
    "use strict";
    const n = i(96);
    if ("renderer" === process.type) {
        if (n.info("client running"), !global.__xdasAsyncRemoteExports) {
            let e = {};
            global.__xdasAsyncRemoteExports = e;
            let t = i(589);
            e.require = t.remoteRequire, e.getCurrentWebContents = t.getCurrentWebContents, e.getCurrentWindow = t.getCurrentWindow, e.Interest = t.Interest, e.global = new Proxy({}, {get: (e, i, n) => t.getGlobal(i)}), e.electron = new Proxy({}, {get: (e, i, n) => t.getBuiltin(i)}), Object.defineProperty(e, "currentWindow", {get: () => t.getCurrentWindow()}), Object.defineProperty(e, "currentWebContents", {get: () => t.getCurrentWebContents()}), Object.defineProperty(e, "process", {get: () => t.getGlobal("process")}), Object.defineProperty(e, "webContents", {get: () => t.getWebContents()})
        }
    } else if ("browser" === process.type && (n.info("server running"), !global.__xdasAsyncRemoteExports)) {
        let e = {};
        global.__xdasAsyncRemoteExports = e;
        const t = i(593);
        t.startServer(), e.getObjectRegistry = t.getObjectRegistry
    }
    e.exports = global.__xdasAsyncRemoteExports
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), t.getWebContents = t.getCurrentWebContents = t.getCurrentWindow = t.getGlobal = t.getBuiltin = t.remoteRequire = t.Interest = void 0;
    const n = i(19), o = i(97), a = i(590), r = i(591), s = i(499), l = i(592), d = i(96), u = i(500),
        c = n.ipcRenderer, h = process.electronBinding("v8_util"), f = new a.default, p = h.createIDWeakMap(),
        g = h.getHiddenValue(global, "contextId");

    class m {
        constructor(e) {
            if ("object" == typeof e ? (this.on = "object" == typeof e.on ? e.on : {}, this.once = "object" == typeof e.once ? e.once : {}) : (this.on = {}, this.once = {}), !this.check()) throw new Error("unexpected param")
        }

        check() {
            let e = !0;
            do {
                let t = Object.getOwnPropertyNames(this.on);
                if (t.forEach(t => {
                    "function" != typeof this.on[t] && (e = !1)
                }), !e) break;
                (t = Object.getOwnPropertyNames(this.once)).forEach(t => {
                    "function" != typeof this.once[t] && (e = !1)
                })
            } while (0);
            return e
        }
    }

    function v(e, t = new Set) {
        const i = e => {
            if (t.has(e)) return {type: "value", value: null};
            let n = e;
            if (Array.isArray(e)) {
                t.add(e);
                let i = {type: "array", value: v(e, t)};
                return t.delete(e), i
            }
            if (ArrayBuffer.isView(n)) return {type: "buffer", value: o.Buffer.from(e)};
            if (e instanceof Date) return {type: "date", value: e.getTime()};
            if (null != e && "object" == typeof e) {
                if (u.isPromise(e)) return {
                    type: "promise", then: i(function (t, i) {
                        e.then(t, i)
                    })
                };
                if (h.getHiddenValue(e, "__remote_id__")) return {
                    type: "remote-object",
                    id: h.getHiddenValue(e, "__remote_id__")
                };
                let n = {
                    type: e instanceof m ? "interest" : "object",
                    name: e.constructor ? e.constructor.name : "",
                    members: []
                };
                t.add(e);
                for (let t in e) n.members.push({name: t, value: i(e[t])});
                return t.delete(e), n
            }
            if ("function" == typeof e) {
                return {
                    type: "function",
                    id: f.add(e),
                    location: h.getHiddenValue(e, "__remote_call_location__"),
                    length: e.length
                }
            }
            return {type: "value", value: e}
        };
        return e.map(i)
    }

    function y(e, t, i) {
        u.isPromise(e) ? e.then(e => {
            t(e)
        }, e => {
            i(e)
        }) : t(e)
    }

    function T(e, t, i, n = !1) {
        const o = t => {
            if (e.hasOwnProperty(t.name) && !n) return;
            let i, o = {enumerable: t.enumerable, configurable: !0};
            if ("method" === t.type) {
                if (t.value.refId) {
                    if (p.has(t.value.refId) && (i = p.get(t.value.refId)), null == i) throw new Error("member refId pointer to null" + t.value.refId + "name: " + t.name)
                } else i = b(t.value, e, t.name);
                o.get = (() => i), o.set = (e => i = e)
            } else "get" === t.type && (o.get = (() => i), t.writable && (o.set = (e => {
                i = e
            })), i = b(t.value));
            Object.defineProperty(e, t.name, o)
        };
        if (Array.isArray(i)) {
            let e = i.length;
            for (let t = 0; t < e; t++) o(i[t])
        }
    }

    function w(e, t, i) {
        if (i) {
            let t = b(i);
            Object.setPrototypeOf(e, t)
        }
    }

    function k(e, t) {
        h.setHiddenValue(e, "__remote_id__", t)
    }

    function C(e) {
        return h.getHiddenValue(e, "__remote_id__")
    }

    function b(e, t, i) {
        const n = {
            value: () => e.value,
            array: () => e.members.map(e => b(e)),
            buffer: () => o.Buffer.from(e.value),
            promise: () => Promise.resolve({then: b(e.then)}),
            error: () => (function (e) {
                const t = (() => "error" === e.type ? new Error : {})();
                for (let i = 0; i < e.members.length; i++) {
                    let {name: n, value: o} = e.members[i];
                    t[n] = o
                }
                return t
            })(e),
            date: () => new Date(e.value),
            exception: () => {
                throw new Error(`${e.message}\n${e.stack}`)
            }
        };
        let a;
        return e.type in n ? a = n[e.type]() : e.refId ? p.has(e.refId) ? (h.addRemoteObjectRef(g, e.refId), a = p.get(e.refId)) : (d.warn("[metaToValue] refId point to null" + e.refId), a = "function" === e.type ? () => {
        } : {}) : e.id ? p.has(e.id) ? (h.addRemoteObjectRef(g, e.id), T(a = p.get(e.id), e.id, e.members, !0), w(a, e.id, e.proto)) : (a = "function" === e.type ? t ? function (e, t, i) {
            if (p.has(i.id)) return p.get(i.id);
            let n = C(e), o = function (...e) {
                throw Error("never should come to a proxied function")
            };
            Object.defineProperty(o, "name", {value: t, writable: !1, enumerable: !0});
            let a = new Proxy(o, {
                apply: (e, i, o) => new Promise((e, a) => {
                    let d = C(i);
                    if (d || (d = C(i.__remoteObj_)), !d) throw Error("is this function was a bound function?");
                    let u = s.default.browser.memberCall, h = l.default(u), f = v(o);
                    c.send(u, g, h, d, n, t, f), r.default.add(h, t => {
                        try {
                            y(b(t), e, a)
                        } catch (e) {
                            a(e)
                        }
                    })
                }), construct: (e, i, o) => new Promise((e, o) => {
                    let a = s.default.browser.memberConstruct, d = l.default(a);
                    c.send(a, g, d, n, t, v(i)), r.default.add(d, t => {
                        try {
                            let i = b(t);
                            e(i)
                        } catch (e) {
                            o(e)
                        }
                    })
                })
            });
            return h.setHiddenValue(o, "__remote_id__", i.id), a
        }(t, i, e) : function (e) {
            let t = e.id;
            const i = function (...e) {
                throw new Error("Should Never com to a remoteFunction PlaceHolder")
            };
            return k(i, t), new Proxy(i, {
                apply: (e, i, n) => new Promise((e, o) => {
                    let a = s.default.browser.functionCall, d = l.default(a), u = C(i);
                    c.send(a, g, d, u, t, v(n)), r.default.add(d, t => {
                        try {
                            y(b(t), e, o)
                        } catch (e) {
                            o(e)
                        }
                    })
                }), construct: (e, i, n) => new Promise((e, n) => {
                    let o = s.default.browser.construct, a = l.default(o);
                    c.send(o, g, a, t, v(i)), r.default.add(a, t => {
                        try {
                            let i = b(t);
                            e(i)
                        } catch (e) {
                            n(e)
                        }
                    })
                })
            })
        }(e) : {}, h.setRemoteObjectFreer(a, g, e.id), p.set(e.id, a), h.setHiddenValue(a, "__remote_id__", e.id), h.addRemoteObjectRef(g, e.id), function (e) {
            let t = C(e);
            Object.defineProperties(e, {
                __set: {
                    enumerable: !1, writable: !1, value: function (i, n) {
                        if ("function" == typeof n) throw new Error("set a function to a remote member is dangerous");
                        return new Promise((o, a) => {
                            let d = s.default.browser.memberSet, u = l.default(d), h = v([n]);
                            c.send(d, g, u, t, i, h), r.default.add(u, t => {
                                try {
                                    let r = b(t);
                                    e[i] = n, o(r)
                                } catch (e) {
                                    a(e)
                                }
                            })
                        })
                    }
                }, __get: {
                    enumerable: !1, writable: !1, value: function (i) {
                        return new Promise((n, o) => {
                            let a = s.default.browser.memberGet, d = l.default(a);
                            c.send(a, g, d, t, i), r.default.add(d, t => {
                                try {
                                    const a = b(t);
                                    e[i] = a, n(a)
                                } catch (e) {
                                    o(e)
                                }
                            })
                        })
                    }
                }, __sync: {
                    enumerable: !1, writable: !1, value: function () {
                        return new Promise((e, i) => {
                            let n = s.default.browser.sync, o = l.default(n);
                            c.send(n, g, o, t), r.default.add(o, n => {
                                try {
                                    if (n.id !== t) throw Error("SYNC_RETURN: remote id not match");
                                    let o = b(n);
                                    e(o)
                                } catch (e) {
                                    i(e)
                                }
                            })
                        })
                    }
                }
            })
        }(a), T(a, e.id, e.members), w(a, e.id, e.proto), Object.defineProperty(a.constructor, "name", {value: e.name}), e.extendedMemberNames && e.extendedMemberNames.forEach((e, t) => {
            let i = a[e], n = a.__proto__;
            for (; n;) {
                if (Object.prototype.hasOwnProperty.call(n, e)) {
                    delete n[e];
                    break
                }
                n = n.__proto__
            }
            Object.defineProperty(a, e, {value: i, enumerable: !1, writable: !1, configurable: !0})
        })) : d.error("no id of meta:", e), a
    }

    t.Interest = m;

    class I {
        constructor(...e) {
            if (this.__resolved_ = !1, this.__promise_ = null, this.__remoteObj_ = null, this.__what_ = "", this.__name_ = "", "string" === typeof arguments[0]) {
                let e = arguments[0], t = arguments[1];
                this.__what_ = e, this.__name_ = t || e, this.__resolved_ = !1, this.__remoteObj_ = null, this.__promise_ = new Promise((i, n) => {
                    let o = this.getChannel(e), a = l.default(o);
                    c.send(o, g, a, t), r.default.add(a, e => {
                        try {
                            let t = b(e);
                            this.__remoteObj_ = t, this.__resolved_ = !0, i(t)
                        } catch (e) {
                            n(e)
                        }
                    })
                })
            } else this.__remoteObj_ = arguments[0], this.__resolved_ = !0, this.__promise_ = null
        }

        getChannel(e) {
            let t = "";
            switch (e) {
                case"module":
                    t = s.default.browser.require;
                    break;
                case"builtin":
                    t = s.default.browser.builtIn;
                    break;
                case"global":
                    t = s.default.browser.global;
                    break;
                case"current_window":
                    t = s.default.browser.currentWindow;
                    break;
                case"current_web_contents":
                    t = s.default.browser.currentWebContents;
                    break;
                case"client_web_contents":
                    t = s.default.browser.clientWebContents;
                    break;
                case"web_contents":
                    t = s.default.browser.webContents
            }
            return t
        }

        __resolve() {
            let e = this.__promise_;
            if (null !== e) ; else {
                if (!this.__resolved_) throw Error("missing the promise for ayncnomously get remote object");
                e = new Promise((e, t) => {
                    e(this.__remoteObj_)
                }), this.__promise_ = e
            }
            return e
        }

        __isResolved() {
            return this.__resolved_
        }
    }

    function S(e, t, i) {
        try {
            r.default.invoke(t, i).remove(t)
        } finally {
            r.default.remove(t)
        }
    }

    c.on(s.default.renderer.requireReturn, S), c.on(s.default.renderer.getBuiltInReturn, S), c.on(s.default.renderer.getGlobalReturn, S), c.on(s.default.renderer.currentWindowReturn, S), c.on(s.default.renderer.currentWebContentsReturn, S), c.on(s.default.renderer.functionCallReturn, S), c.on(s.default.renderer.constructReturn, S), c.on(s.default.renderer.memberCallReturn, S), c.on(s.default.renderer.memberSetReturn, S), c.on(s.default.renderer.memberGetReturn, S), c.on(s.default.renderer.memberConstructReturn, S), c.on(s.default.renderer.callback, (e, t, i) => {
        f.apply(t, b(i))
    }), c.on(s.default.renderer.syncReturn, S), c.on("ELECTRON_RENDERER_RELEASE_CALLBACK", (e, t) => {
        d.info("[RELEASE_CALLBACK]: callbackId:", t), f.remove(t)
    }), process.on("exit", () => {
        c.send(s.default.browser.contextRelease)
    });
    const _ = ["__resolve", "__isResolved"], D = ["__promise_", "__resolved_", "__remoteObj_", "__name_", "__what_"],
        A = e => {
            if (!e.__isResolved()) throw Error("Can not access the property of a remote module which has not Resolved yet.")
        };

    function N(e) {
        const t = function () {
        };
        Object.defineProperty(t, "name", {value: e.__name_}), Object.defineProperty(t, "what", {
            enumerable: !1,
            value: e.__what_
        });
        let i = new Proxy(t, {
            getPrototypeOf: t => (A(e), Reflect.getPrototypeOf(e.__remoteObj_)),
            setPrototypeOf: (e, t) => {
                throw new Error("changing prototype of remote object is forbidden")
            },
            isExtensible: t => (A(e), Reflect.isExtensible(e.__remoteObj_)),
            preventExtensions: t => (A(e), Reflect.preventExtensions(e)),
            getOwnPropertyDescriptor: (t, i) => (A(e), Reflect.getOwnPropertyDescriptor(e.__remoteObj_, i)),
            has: (t, i) => (A(e), Reflect.has(e.__remoteObj_, i)),
            deleteProperty: (t, i) => (A(t), Reflect.deleteProperty(e.__remoteObj_, i)),
            defineProperty: (t, i, n) => (A(e), Reflect.defineProperty(e.__remoteObj_, i, n)),
            get: (t, i, n) => {
                if ("string" == typeof i) {
                    if (String.prototype.includes.call(D, i)) {
                        return e[i]
                    }
                    if (String.prototype.includes.call(_, i)) {
                        return e[i]
                    }
                }
                return A(e), Reflect.get(e.__remoteObj_, i)
            },
            set: (t, i, n, o) => (A(e), Reflect.set(e.__remoteObj_, i, n, o)),
            ownKeys: t => (A(e), Reflect.ownKeys(e.__remoteObj_)),
            apply: (t, i, n) => {
                A(e), Reflect.apply(e.__remoteObj_, i, n)
            },
            construct: (t, i, n) => {
                if (A(e), "function" != typeof e.__remoteObj_) throw Error("operator new ONLY used for function");
                return new Promise((t, n) => {
                    let o = s.default.browser.construct, a = l.default(o),
                        d = h.getHiddenValue(e.__remoteObj_, "__remote_id__");
                    c.send(o, g, a, d, v(i)), r.default.add(a, e => {
                        try {
                            t(b(e))
                        } catch (e) {
                            n(e)
                        }
                    })
                })
            }
        });
        return e.__promise_.then(e => {
            let t = typeof e;
            if ("function" === t || "object" === t) {
                let t = C(e);
                t && k(i, t)
            }
        }), i
    }

    t.remoteRequire = function (e) {
        return N(new I("module", e))
    }, t.getBuiltin = function (e) {
        return N(new I("builtin", e))
    }, t.getGlobal = function (e) {
        return N(new I("global", e))
    }, t.getCurrentWindow = function () {
        return N(new I("current_window"))
    }, t.getCurrentWebContents = function () {
        return N(new I("current_web_contents"))
    }, t.getWebContents = function () {
        return N(new I("web_contents"))
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = process.electronBinding("v8_util");
    t.default = class {
        constructor() {
            this.nextId = 0, this.callbacks = {}
        }

        add(e) {
            let t = n.getHiddenValue(e, "__remote_callback_id__");
            if (null != t) return t;
            t = this.nextId -= 1;
            const i = /at (.*)/gi, o = (new Error).stack;
            let a, r = i.exec(o);
            for (; null !== r;) {
                const e = r[1];
                if (!e.includes("native") && !e.includes("electron.asar")) {
                    a = /([^/^)]*)\)?$/gi.exec(e)[1];
                    break
                }
                r = i.exec(o)
            }
            return this.callbacks[t] = e, n.setHiddenValue(e, "__remote_callback_id__", t), n.setHiddenValue(e, "__remote_call_location__", a), t
        }

        get(e) {
            return this.callbacks[e] || function () {
            }
        }

        apply(e, ...t) {
            return this.get(e).apply(global, ...t)
        }

        remove(e) {
            const t = this.callbacks[e];
            t && (n.deleteHiddenValue(t, "__remote_callback_id__"), delete this.callbacks[e])
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(96);
    var o;
    !function (e) {
        let t = {};
        e.add = function (e, i, n) {
            t[e] = {func: i, thisArg: n}
        }, e.invoke = function (i, ...o) {
            let a = t[i];
            return a ? a.thisArg ? a.func.apply(a.thisArg, ...o) : a.func(...o) : n.error(`Cannot invoke function by unrecognize id. ${i}`), e
        }, e.remove = function (e) {
            delete t[e]
        }
    }(o || (o = {})), t.default = o
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    let n = 0;
    t.default = function (e) {
        return e ? e.concat(".").concat(String(++n)) : String(++n)
    }
}, function (e, t, i) {
    "use strict";
    const n = i(19), o = i(594), a = i(499), r = i(595), s = i(96), l = i(500), d = n.ipcMain,
        u = process.electronBinding("v8_util");
    let c = u.createDoubleIDWeakMap();
    const h = new o.default;

    function f(e, t, i, n, o, a) {
        let r, l = !1, d = null, u = !1;
        do {
            try {
                r = t[n]
            } catch (e) {
                l = !0
            }
            if (l) try {
                r = i.value[n], l = !1, i.meta.extendedMemberNames.push(n), u = !0
            } catch (e) {
                s.error(`property ${n} untouchable, even try root[name]`)
            }
            if (l) break;
            let o = Object.getOwnPropertyDescriptor(t, n);
            if (void 0 === o) {
                s.warn(`descriptor of property ${n} is undefined`);
                break
            }
            d = {
                name: n,
                enumerable: o.enumerable,
                writable: !1,
                type: "get"
            }, void 0 === o.get && "function" == typeof r ? d.type = "method" : ((o.set || o.writable) && (d.writable = !0), d.type = "get"), u ? (d.configurable = !0, d.value = m(e, r, a, !1, null)) : d.value = m(e, r, a, !1, i)
        } while (0);
        return d
    }

    function p(e, t, i, n = null) {
        let o = Object.getOwnPropertyNames(t);
        "function" == typeof t && (o = o.filter(function (e) {
            return !String.prototype.includes.call(r.propertiesOfFunction, e)
        }));
        let a = [];
        do {
            if (0 === o.length) break;
            let r = o.length;
            for (let s = 0; s < r; s++) {
                let r = f(e, t, i, o[s], 0, n);
                r && a.push(r)
            }
        } while (0);
        return a
    }

    function g(e, t, i, n = null) {
        let o = null, a = Object.getPrototypeOf(t);
        return o = null === a || a === Object.prototype || a === Function.prototype ? null : m(e, a, n, !1, i)
    }

    function m(e, t, i = null, n = !1, o = null) {
        i = null === i ? {} : i;
        const a = {type: typeof t};
        "object" === a.type && (a.type = function (e, t) {
            let i = typeof e;
            if ("object" !== i) throw new Error("incorrect arg at index 0. non-object");
            return null === e ? i = "value" : ArrayBuffer.isView(e) ? i = "buffer" : Array.isArray(e) ? i = "array" : e instanceof Error ? i = "error" : e instanceof Date ? i = "date" : l.isPromise(e) ? i = "promise" : Object.prototype.hasOwnProperty.call(e, "callee") && null != e.length ? i = "array" : t && u.getHiddenValue(e, "simple") && (i = "value"), i
        }(t, n));
        do {
            if ("object" === a.type || "function" === a.type) {
                let n = h.getIdOfObject(t);
                if (n && i[n]) {
                    a.refId = n, h.add(e, t);
                    break
                }
            }
            "array" === a.type ? a.members = t.map(t => m(e, t, i)) : "object" === a.type || "function" === a.type ? (null == o && (a.extendedMemberNames = [], o = {
                value: t,
                meta: a
            }), a.name = t.constructor ? t.constructor.name : "", a.id = h.add(e, t), i[a.id] = !0, a.members = p(e, t, o, i), a.proto = g(e, t, o, i)) : "buffer" === a.type ? a.value = Buffer.from(t) : "promise" === a.type ? (t.then(function () {
            }, function () {
            }), a.then = m(e, function (e, i) {
                t.then(e, i)
            })) : "error" === a.type ? (a.members = v(t), a.members.push({
                name: "name",
                value: t.name
            })) : "date" === a.type ? a.value = t.getTime() : (a.type = "value", a.value = t)
        } while (0);
        return a
    }

    function v(e) {
        return Object.getOwnPropertyNames(e).map(t => ({name: t, value: e[t]}))
    }

    function y(e, t, i, o) {
        const r = function (o) {
            let l, d, f = 0, p = 0;
            switch (o.type) {
                case"value":
                    return o.value;
                case"remote-object":
                    return h.get(o.id);
                case"array":
                    return y(e, t, i, o.value);
                case"buffer":
                    return Buffer.from(o.value);
                case"date":
                    return new Date(o.value);
                case"promise":
                    return Promise.resolve({then: r(o.then)});
                case"object":
                case"interest": {
                    let e = {};
                    for (Object.defineProperty(e.constructor, "name", {value: o.name}), f = 0, p = (d = o.members).length; f < p; f++) e[(l = d[f]).name] = r(l.value);
                    return e
                }
                case"function": {
                    const r = e.id, l = [i, o.id];
                    if (s.info("renderer function id:" + l), c.has(l)) return c.get(l);
                    let d = function (...t) {
                        s.info("[CALLBACK] args", t);
                        let i = [...t];
                        e.isDestroyed() || r !== e.id ? function (e, t, i) {
                            let o = "Attempting to call a function in a renderer window that has been closed or released." + `\nFunction provided here: ${e.location}`;
                            if (t.length > 0 && t[0].sender && t[0].sender instanceof n.webContents.constructor) {
                                const {sender: e} = t[0], n = e.eventNames().filter(t => {
                                    let n = e.listeners(t), o = !1;
                                    return n.forEach(e => {
                                        e === i && (o = !0)
                                    }), o
                                });
                                n.length > 0 && (o += `\nRemote event names: ${n.join(", ")}`, n.forEach(t => {
                                    Object.getPrototypeOf(e).removeListener.call(e, t, i)
                                }))
                            }
                            s.warn(o)
                        }(o, i, d) : e.send(a.default.renderer.callback, o.id, m(e, i))
                    };
                    return Object.defineProperty(d, "length", {value: o.length}), u.setRemoteCallbackFreer(d, t, i, o.id, e), c.set(l, d), d
                }
                default:
                    throw new TypeError(`Unknown type: ${o.type}`)
            }
        };
        return o.map(r)
    }

    function T(e, t, i, n) {
        let o, a;
        try {
            return t.apply(i, n)
        } catch (e) {
            return a = t.name, new Error(`Could not call remote function '${o = null != a ? a : "anonymous"}'. Check that the function signature is correct. Underlying error: ${e.message}`)
        }
    }

    function w(e) {
        return {type: "exception", message: e.message, stack: e.stack || e}
    }

    function k(e) {
        const t = new Error(e);
        throw Object.defineProperty(t, "code", {value: "EBADRPC"}), Object.defineProperty(t, "errno", {value: -72}), t
    }

    var C;
    !function (e) {
        const t = (e, t, ...i) => {
            const n = e.sender;
            n.isDestroyed() ? s.warn("webcontext is destroyed.") : n.send(t, ...i)
        };
        e.startServer = function () {
            d.on(a.default.browser.require, (e, i, n, o) => {
                s.info(`[REQUIRE] module=${o} `);
                let r = process.mainModule.require(o), l = m(e.sender, r);
                t(e, a.default.renderer.requireReturn, n, l)
            }), d.on(a.default.browser.builtIn, (e, i, o, r) => {
                s.info(`[BUILTIN]: property=${r} contextId=${i}`);
                let l = n[r], d = m(e.sender, l);
                s.info(`[BUILTIN]: returns remoteId:${d.id}, type: ${typeof l}`), t(e, a.default.renderer.getBuiltInReturn, o, d)
            }), d.on(a.default.browser.global, (e, i, n, o) => {
                s.info(`[GLOBAL]: proerty:${o} contextId=${i}`);
                let r, l = global[o];
                r = m(e.sender, l), s.info(`[GLOBAL]: returns remoteid=${r.id}, obj=` + typeof l), t(e, a.default.renderer.getGlobalReturn, n, r)
            }), d.on(a.default.browser.currentWindow, (e, i, n, o) => {
                s.info(`[CURRENT_WINDOW]: property=${o} contextId=${i}`);
                let r = e.sender.getOwnerBrowserWindow.call(e.sender), l = m(e.sender, r);
                s.info(`[CURRENT_WINDOW]: returns remoteid=${l.id}, obj=` + r), t(e, a.default.renderer.currentWindowReturn, n, l)
            }), d.on(a.default.browser.currentWebContents, (e, i, n, o) => {
                t(e, a.default.renderer.currentWebContentsReturn, n, m(e.sender, e.sender))
            }), d.on(a.default.browser.webContents, (e, i, o, r) => {
                s.info(`[WebContents]: proerty:${r} contextId=${i}`);
                let l, d = n.webContents;
                l = m(e.sender, d), s.info(`[WebContents]: returns remoteid=${l.id}, obj=` + typeof d), t(e, a.default.renderer.webContentsReturn, o, l)
            });
            const e = (e, t) => {
                const i = (t, i) => {
                    t && Object.getOwnPropertyNames(t).forEach(n => {
                        i ? e.once(n, t[n]) : e.on(n, t[n])
                    })
                };
                t.on && i(t.on, !1), t.once && i(t.once, !0)
            };
            d.on(a.default.browser.construct, (i, n, o, r, l) => {
                let d, u = null;
                try {
                    s.info(`[CONSTRUCTOR]: remoteId=${r} `);
                    let c = l.length > 0 ? l[l.length - 1] : null;
                    l = y(i.sender, i.frameId, n, l);
                    let f = h.get(r);
                    null == f && k(`Cannot call constructor on missing remote object ${r}`), c && "interest" === c.type && (u = l.pop());
                    let p = new (Function.prototype.bind.apply(f, [null, ...l]));
                    p && u && e(p, u), d = m(i.sender, p, null, !1), s.info(`[CONSTRUCTOR]: returns remoteId =${d.id} name=${f.name} `)
                } catch (e) {
                    d = w(e)
                } finally {
                    t(i, a.default.renderer.constructReturn, o, d)
                }
            }), d.on(a.default.browser.functionCall, function (e, i, n, o, r, l) {
                let d;
                try {
                    s.info(`[FUNCTION_CALL]: remoteId=${r}`), l = y(e.sender, e.frameId, i, l);
                    let u = h.get(r);
                    if (null == u) s.error(`Cannot call function on missing remote object ${r}`), d = m(e.sender, void 0); else {
                        let t = o ? h.get(o) : global;
                        if (t) {
                            let i = T(0, u, t, l);
                            d = m(e.sender, i)
                        } else s.error(`Cannot call function(${r}) on missing context(${o})`), d = m(e.sender, void 0)
                    }
                    s.info(`[FUNCTION_CALL]: name=${u.name}`)
                } catch (e) {
                    d = w(e)
                } finally {
                    t(e, a.default.renderer.functionCallReturn, n, d)
                }
            }), d.on(a.default.browser.memberCall, function (e, i, n, o, r, l, d) {
                let u;
                s.info(`[MEMBER_CALL]: thisArg=${o}, remoteId=${r}, method=${l}, args count=${d.length}`);
                try {
                    d = y(e.sender, e.frameId, i, d);
                    let c = h.get(r);
                    null == c && k(`Cannot call function '${l}' on missing remote object ${r}`);
                    let f = o ? h.get(o) : c;
                    if (f) {
                        let t = T(0, c[l], f, d);
                        u = m(e.sender, t), s.info("[MEMBER_CALL]: return=" + t)
                    } else u = m(e.sender, void 0)
                } catch (e) {
                    u = w(e)
                } finally {
                    t(e, a.default.renderer.memberCallReturn, n, u)
                }
            }), d.on(a.default.browser.memberGet, function (e, i, n, o, r) {
                let l;
                try {
                    s.info(`[MEMBER_GET]: remoteId=${o}, property=`, r);
                    let i = h.get(o);
                    null == i && k(`Cannot get property '${Object.toString.call(r)}' on missing remote object ${o}`);
                    let d = i[r];
                    l = m(e.sender, d)
                } catch (e) {
                    l = w(e)
                } finally {
                    t(e, a.default.renderer.memberGetReturn, n, l)
                }
            }), d.on(a.default.browser.memberSet, function (e, i, n, o, r, l) {
                try {
                    s.info(`[MEMBER_SET]: remoteId=${o}, property=` + r), l = y(e.sender, e.frameId, i, l);
                    let d = h.get(o);
                    null == d && k(`Cannot set property '${Object.toString.call(r)}' on missing remote object ${o}`), d[r] = l[0], t(e, a.default.renderer.memberSetReturn, n, {
                        type: "value",
                        value: !0
                    })
                } catch (i) {
                    t(e, a.default.renderer.memberSetReturn, n, w(i))
                }
            }), d.on(a.default.browser.memberConstruct, function (i, n, o, r, l, d) {
                let u, c = null;
                try {
                    s.info(`[MEMBER_CONSTRUCTOR]: regId=${r}, method=${l}`);
                    let f = d.length > 0 ? d[d.length - 1] : null;
                    d = y(i.sender, i.frameId, n, d);
                    let p = h.get(r);
                    null == p && k(`Cannot call constructor '${l}' on missing remote object ${r}`), f && "interest" === f.type && (c = d.pop());
                    let g = p[l], v = new (Function.prototype.bind.apply(g, [null, ...d]));
                    v && c && e(v, c), u = m(i.sender, v)
                } catch (e) {
                    u = w(e)
                } finally {
                    t(i, a.default.renderer.memberConstructReturn, o, u)
                }
            }), d.on(a.default.browser.sync, function (e, i, n, o) {
                let r = h.get(o);
                t(e, a.default.renderer.syncReturn, n, m(e.sender, r))
            }), d.on("ELECTRON_BROWSER_DEREFERENCE", function (e, t) {
                let i = h.get(t);
                if (n.ipcMain.emit("log_to_renderer", "ELECTRON_BROWSER_DEREFERENCE", t, typeof i), i) {
                    let n = i.name;
                    n || (n = i.constructor ? i.constructor.name : ""), h.remove(e.sender.id, t)
                } else t < 0 && s.warn("remote id reference to nothing:", t)
            }), d.on(a.default.browser.contextRelease, e => {
                h.clear(e.sender.id)
            })
        }, e.getObjectRegistry = function () {
            return h
        }
    }(C || (C = {})), e.exports = C
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(96), o = -1 * Math.pow(2, 31), a = process.electronBinding("v8_util");
    t.default = class {
        constructor() {
            this.nextId = 0, this.storage = new Map, this.owners = new Map
        }

        add(e, t) {
            const i = this.saveToStorage(t), n = e.id;
            let o = this.owners.get(n);
            return o || (o = new Set, this.owners.set(n, o), this.registerDeleteListener(e, n)), o.has(i) || (o.add(i), this.storage.get(i).count++), i
        }

        getIdOfObject(e) {
            return a.getHiddenValue(e, "__remote_id__")
        }

        get(e) {
            const t = this.storage.get(e);
            if (void 0 !== t) return t.object
        }

        remove(e, t) {
            this.dereference(t);
            let i = this.owners.get(e);
            i && i.delete(t)
        }

        clear(e) {
            let t = this.owners.get(e);
            if (t) {
                for (let e of t) this.dereference(e);
                this.owners.delete(e)
            }
        }

        getStorageSize() {
            return this.storage.size
        }

        saveToStorage(e) {
            let t = a.getHiddenValue(e, "__remote_id__");
            if (!t) {
                if ((t = --this.nextId) <= o) throw new Error("object registry id overflow");
                this.storage.set(t, {object: e, count: 0}), a.setHiddenValue(e, "__remote_id__", t)
            }
            return t
        }

        dereference(e) {
            let t = this.storage.get(e);
            null != t && (t.count -= 1, 0 === t.count && (a.deleteHiddenValue(t.object, "__remote_id__"), this.storage.delete(e)))
        }

        registerDeleteListener(e, t) {
            const i = e.getProcessId(), o = (a, r) => {
                r === i && (n.info("render-view-deleted: processid=" + i), (() => {
                    n.info("before clear. objectsRegistry capacity=" + this.storage.size, "owners size:" + this.owners.size)
                })(), e.removeListener("render-view-deleted", o), this.clear(t))
            };
            e.on("render-view-deleted", o)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n;
    !function (e) {
        e.propertiesOfFunction = ["length", "name", "arguments", "caller", "prototype", "apply", "bind", "call", "toString"]
    }(n || (n = {})), e.exports = n
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(597), o = i(598), a = i(98);
    i(599);
    const r = i(600);
    i(601), i(983);
    const s = i(602), l = i(603), d = i(604);
    a.default.directive("visibility", n.default), a.default.directive("opacity", o.default), a.default.use(r.default), a.default.use(l), a.default.use(d.default), a.default.use(s.default, {
        preLoad: 1.3,
        error: i(605),
        attempt: 1
    })
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = {
        bind(e, {value: t}, i) {
            e.__vOriginalVisibility = e.style.visiblity, e.style.visibility = t ? "visible" : "hidden"
        }, update(e, {value: t, oldValue: i}, n) {
            t !== i && (e.style.visibility = t ? "visible" : "hidden")
        }, unbind(e, t, i, n, o) {
            o || (e.style.visiblity = e.__vOriginalVisibility)
        }
    };
    t.default = n
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = {
        bind(e, {value: t}, i) {
            e.__vOriginalOpacity = e.style.opacity, e.__vOriginalPointerEvents = e.style.pointerEvents, e.style.opacity = t ? "1" : "0", e.style.pointerEvents = t ? "auto" : "none"
        }, update(e, {value: t, oldValue: i}, n) {
            t !== i && (e.style.opacity = t ? "1" : "0", e.style.pointerEvents = t ? "auto" : "none")
        }, unbind(e, t, i, n, o) {
            o || (e.style.opacity = e.__vOriginalOpacity, e.style.pointerEvents = e.__vOriginalPointerEvents)
        }
    };
    t.default = n
}, function (e, t, i) {
    e.exports = i(65)(216)
}, function (e, t, i) {
    e.exports = i(65)(138)
}, function (e, t) {
    !function (e) {
        var t,
            i = '<svg><symbol id="td-icon-svg-file" viewBox="0 0 1204 1024"><path d="M180.705882 1024c-102.4 0-180.705882-78.305882-180.705882-180.705882V180.705882c0-102.4 78.305882-180.705882 180.705882-180.705882h240.941177c102.4 0 180.705882 78.305882 180.705882 180.705882h421.647059c102.4 0 180.705882 78.305882 180.705882 180.705883v481.882353c0 102.4-78.305882 180.705882-180.705882 180.705882H180.705882z" fill="#FFC25A" ></path><path d="M301.176471 361.411765h602.352941c66.258824 0 120.470588 54.211765 120.470588 120.470588v361.411765c0 66.258824-54.211765 120.470588-120.470588 120.470588H301.176471c-66.258824 0-120.470588-54.211765-120.470589-120.470588V481.882353c0-66.258824 54.211765-120.470588 120.470589-120.470588z" fill="#FFFFFF" ></path><path d="M180.705882 542.117647h843.294118c102.4 0 180.705882 78.305882 180.705882 180.705882v120.470589c0 102.4-78.305882 180.705882-180.705882 180.705882H180.705882c-102.4 0-180.705882-78.305882-180.705882-180.705882v-120.470589c0-102.4 78.305882-180.705882 180.705882-180.705882z" fill="#FFD68F" ></path></symbol></svg>',
            n = function (e, t) {
                t.firstChild ? function (e, t) {
                    t.parentNode.insertBefore(e, t)
                }(e, t.firstChild) : t.appendChild(e)
            };
        if ((t = document.getElementsByTagName("script"))[t.length - 1].getAttribute("data-injectcss") && !e.__iconfont__svg__cssinject__) {
            e.__iconfont__svg__cssinject__ = !0;
            try {
                document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")
            } catch (e) {
                console && console.log(e)
            }
        }
        !function (t) {
            if (document.addEventListener) if (~["complete", "loaded", "interactive"].indexOf(document.readyState)) setTimeout(t, 0); else {
                var i = function () {
                    document.removeEventListener("DOMContentLoaded", i, !1), t()
                };
                document.addEventListener("DOMContentLoaded", i, !1)
            } else document.attachEvent && function (e, t) {
                var i = e.document, n = !1, o = function () {
                    n || (n = !0, t())
                }, a = function () {
                    try {
                        i.documentElement.doScroll("left")
                    } catch (e) {
                        return void setTimeout(a, 50)
                    }
                    o()
                };
                a(), i.onreadystatechange = function () {
                    "complete" == i.readyState && (i.onreadystatechange = null, o())
                }
            }(e, t)
        }(function () {
            var e, t;
            (e = document.createElement("div")).innerHTML = i, i = null, (t = e.getElementsByTagName("svg")[0]) && (t.setAttribute("aria-hidden", "true"), t.style.position = "absolute", t.style.width = 0, t.style.height = 0, t.style.overflow = "hidden", n(t, document.body))
        })
    }(window)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    /*!
 * Vue-Lazyload.js v1.3.3
 * (c) 2019 Awe <hilongjw@gmail.com>
 * Released under the MIT License.
 */
    var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
        return typeof e
    } : function (e) {
        return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
    }, o = function (e, t) {
        if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
    }, a = function () {
        function e(e, t) {
            for (var i = 0; i < t.length; i++) {
                var n = t[i];
                n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
            }
        }

        return function (t, i, n) {
            return i && e(t.prototype, i), n && e(t, n), t
        }
    }(), r = function (e) {
        return null == e || "function" != typeof e && "object" !== (void 0 === e ? "undefined" : n(e))
    }, s = function (e, t) {
        if (null === e || void 0 === e) throw new TypeError("expected first argument to be an object.");
        if (void 0 === t || "undefined" == typeof Symbol) return e;
        if ("function" != typeof Object.getOwnPropertySymbols) return e;
        for (var i = Object.prototype.propertyIsEnumerable, n = Object(e), o = arguments.length, a = 0; ++a < o;) for (var r = Object(arguments[a]), s = Object.getOwnPropertySymbols(r), l = 0; l < s.length; l++) {
            var d = s[l];
            i.call(r, d) && (n[d] = r[d])
        }
        return n
    }, l = Object.prototype.toString, d = function (e) {
        var t = void 0 === e ? "undefined" : n(e);
        return "undefined" === t ? "undefined" : null === e ? "null" : !0 === e || !1 === e || e instanceof Boolean ? "boolean" : "string" === t || e instanceof String ? "string" : "number" === t || e instanceof Number ? "number" : "function" === t || e instanceof Function ? void 0 !== e.constructor.name && "Generator" === e.constructor.name.slice(0, 9) ? "generatorfunction" : "function" : void 0 !== Array.isArray && Array.isArray(e) ? "array" : e instanceof RegExp ? "regexp" : e instanceof Date ? "date" : "[object RegExp]" === (t = l.call(e)) ? "regexp" : "[object Date]" === t ? "date" : "[object Arguments]" === t ? "arguments" : "[object Error]" === t ? "error" : "[object Promise]" === t ? "promise" : function (e) {
            return e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
        }(e) ? "buffer" : "[object Set]" === t ? "set" : "[object WeakSet]" === t ? "weakset" : "[object Map]" === t ? "map" : "[object WeakMap]" === t ? "weakmap" : "[object Symbol]" === t ? "symbol" : "[object Map Iterator]" === t ? "mapiterator" : "[object Set Iterator]" === t ? "setiterator" : "[object String Iterator]" === t ? "stringiterator" : "[object Array Iterator]" === t ? "arrayiterator" : "[object Int8Array]" === t ? "int8array" : "[object Uint8Array]" === t ? "uint8array" : "[object Uint8ClampedArray]" === t ? "uint8clampedarray" : "[object Int16Array]" === t ? "int16array" : "[object Uint16Array]" === t ? "uint16array" : "[object Int32Array]" === t ? "int32array" : "[object Uint32Array]" === t ? "uint32array" : "[object Float32Array]" === t ? "float32array" : "[object Float64Array]" === t ? "float64array" : "object"
    };

    function u(e) {
        e = e || {};
        var t = arguments.length, i = 0;
        if (1 === t) return e;
        for (; ++i < t;) {
            var n = arguments[i];
            r(e) && (e = n), h(n) && c(e, n)
        }
        return e
    }

    function c(e, t) {
        for (var i in s(e, t), t) if ("__proto__" !== i && f(t, i)) {
            var n = t[i];
            h(n) ? ("undefined" === d(e[i]) && "function" === d(n) && (e[i] = n), e[i] = u(e[i] || {}, n)) : e[i] = n
        }
        return e
    }

    function h(e) {
        return "object" === d(e) || "function" === d(e)
    }

    function f(e, t) {
        return Object.prototype.hasOwnProperty.call(e, t)
    }

    var p = u, g = "undefined" != typeof window, m = function () {
        if (g && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype) return "isIntersecting" in window.IntersectionObserverEntry.prototype || Object.defineProperty(window.IntersectionObserverEntry.prototype, "isIntersecting", {
            get: function () {
                return this.intersectionRatio > 0
            }
        }), !0;
        return !1
    }();
    var v = {event: "event", observer: "observer"}, y = function () {
        if (g) return "function" == typeof window.CustomEvent ? window.CustomEvent : (e.prototype = window.Event.prototype, e);

        function e(e, t) {
            t = t || {bubbles: !1, cancelable: !1, detail: void 0};
            var i = document.createEvent("CustomEvent");
            return i.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), i
        }
    }();

    function T(e, t) {
        if (e.length) {
            var i = e.indexOf(t);
            return i > -1 ? e.splice(i, 1) : void 0
        }
    }

    function w(e, t) {
        if ("IMG" === e.tagName && e.getAttribute("data-srcset")) {
            var i = e.getAttribute("data-srcset"), n = [], o = e.parentNode.offsetWidth * t, a = void 0, r = void 0,
                s = void 0;
            (i = i.trim().split(",")).map(function (e) {
                e = e.trim(), -1 === (a = e.lastIndexOf(" ")) ? (r = e, s = 999998) : (r = e.substr(0, a), s = parseInt(e.substr(a + 1, e.length - a - 2), 10)), n.push([s, r])
            }), n.sort(function (e, t) {
                if (e[0] < t[0]) return 1;
                if (e[0] > t[0]) return -1;
                if (e[0] === t[0]) {
                    if (-1 !== t[1].indexOf(".webp", t[1].length - 5)) return 1;
                    if (-1 !== e[1].indexOf(".webp", e[1].length - 5)) return -1
                }
                return 0
            });
            for (var l = "", d = void 0, u = 0; u < n.length; u++) {
                l = (d = n[u])[1];
                var c = n[u + 1];
                if (c && c[0] < o) {
                    l = d[1];
                    break
                }
                if (!c) {
                    l = d[1];
                    break
                }
            }
            return l
        }
    }

    function k(e, t) {
        for (var i = void 0, n = 0, o = e.length; n < o; n++) if (t(e[n])) {
            i = e[n];
            break
        }
        return i
    }

    var C = function () {
        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1;
        return g && window.devicePixelRatio || e
    };
    var b = function () {
        if (g) {
            var e = !1;
            try {
                var t = Object.defineProperty({}, "passive", {
                    get: function () {
                        e = !0
                    }
                });
                window.addEventListener("test", null, t)
            } catch (e) {
            }
            return e
        }
    }(), I = {
        on: function (e, t, i) {
            var n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
            b ? e.addEventListener(t, i, {capture: n, passive: !0}) : e.addEventListener(t, i, n)
        }, off: function (e, t, i) {
            var n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
            e.removeEventListener(t, i, n)
        }
    }, S = function (e, t, i) {
        var n = new Image;
        if (!e || !e.src) {
            var o = new Error("image src is required");
            return i(o)
        }
        n.src = e.src, n.onload = function () {
            t({naturalHeight: n.naturalHeight, naturalWidth: n.naturalWidth, src: n.src})
        }, n.onerror = function (e) {
            i(e)
        }
    }, _ = function (e, t) {
        return "undefined" != typeof getComputedStyle ? getComputedStyle(e, null).getPropertyValue(t) : e.style[t]
    }, D = function (e) {
        return _(e, "overflow") + _(e, "overflow-y") + _(e, "overflow-x")
    };

    function A() {
    }

    var N = function () {
            function e(t) {
                var i = t.max;
                o(this, e), this.options = {max: i || 100}, this._caches = []
            }

            return a(e, [{
                key: "has", value: function (e) {
                    return this._caches.indexOf(e) > -1
                }
            }, {
                key: "add", value: function (e) {
                    this.has(e) || (this._caches.push(e), this._caches.length > this.options.max && this.free())
                }
            }, {
                key: "free", value: function () {
                    this._caches.shift()
                }
            }]), e
        }(), x = function () {
            function e(t) {
                var i = t.el, n = t.src, a = t.error, r = t.loading, s = t.bindType, l = t.$parent, d = t.options,
                    u = t.elRenderer, c = t.imageCache;
                o(this, e), this.el = i, this.src = n, this.error = a, this.loading = r, this.bindType = s, this.attempt = 0, this.naturalHeight = 0, this.naturalWidth = 0, this.options = d, this.rect = null, this.$parent = l, this.elRenderer = u, this._imageCache = c, this.performanceData = {
                    init: Date.now(),
                    loadStart: 0,
                    loadEnd: 0
                }, this.filter(), this.initState(), this.render("loading", !1)
            }

            return a(e, [{
                key: "initState", value: function () {
                    "dataset" in this.el ? this.el.dataset.src = this.src : this.el.setAttribute("data-src", this.src), this.state = {
                        loading: !1,
                        error: !1,
                        loaded: !1,
                        rendered: !1
                    }
                }
            }, {
                key: "record", value: function (e) {
                    this.performanceData[e] = Date.now()
                }
            }, {
                key: "update", value: function (e) {
                    var t = e.src, i = e.loading, n = e.error, o = this.src;
                    this.src = t, this.loading = i, this.error = n, this.filter(), o !== this.src && (this.attempt = 0, this.initState())
                }
            }, {
                key: "getRect", value: function () {
                    this.rect = this.el.getBoundingClientRect()
                }
            }, {
                key: "checkInView", value: function () {
                    return this.getRect(), this.rect.top < window.innerHeight * this.options.preLoad && this.rect.bottom > this.options.preLoadTop && this.rect.left < window.innerWidth * this.options.preLoad && this.rect.right > 0
                }
            }, {
                key: "filter", value: function () {
                    var e = this;
                    (function (e) {
                        if (!(e instanceof Object)) return [];
                        if (Object.keys) return Object.keys(e);
                        var t = [];
                        for (var i in e) e.hasOwnProperty(i) && t.push(i);
                        return t
                    })(this.options.filter).map(function (t) {
                        e.options.filter[t](e, e.options)
                    })
                }
            }, {
                key: "renderLoading", value: function (e) {
                    var t = this;
                    this.state.loading = !0, S({src: this.loading}, function (i) {
                        t.render("loading", !1), t.state.loading = !1, e()
                    }, function () {
                        e(), t.state.loading = !1, t.options.silent || console.warn("VueLazyload log: load failed with loading image(" + t.loading + ")")
                    })
                }
            }, {
                key: "load", value: function () {
                    var e = this, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : A;
                    return this.attempt > this.options.attempt - 1 && this.state.error ? (this.options.silent || console.log("VueLazyload log: " + this.src + " tried too more than " + this.options.attempt + " times"), void t()) : this.state.rendered && this.state.loaded ? void 0 : this._imageCache.has(this.src) ? (this.state.loaded = !0, this.render("loaded", !0), this.state.rendered = !0, t()) : void this.renderLoading(function () {
                        e.attempt++, e.options.adapter.beforeLoad && e.options.adapter.beforeLoad(e, e.options), e.record("loadStart"), S({src: e.src}, function (i) {
                            e.naturalHeight = i.naturalHeight, e.naturalWidth = i.naturalWidth, e.state.loaded = !0, e.state.error = !1, e.record("loadEnd"), e.render("loaded", !1), e.state.rendered = !0, e._imageCache.add(e.src), t()
                        }, function (t) {
                            !e.options.silent && console.error(t), e.state.error = !0, e.state.loaded = !1, e.render("error", !1)
                        })
                    })
                }
            }, {
                key: "render", value: function (e, t) {
                    this.elRenderer(this, e, t)
                }
            }, {
                key: "performance", value: function () {
                    var e = "loading", t = 0;
                    return this.state.loaded && (e = "loaded", t = (this.performanceData.loadEnd - this.performanceData.loadStart) / 1e3), this.state.error && (e = "error"), {
                        src: this.src,
                        state: e,
                        time: t
                    }
                }
            }, {
                key: "$destroy", value: function () {
                    this.el = null, this.src = null, this.error = null, this.loading = null, this.bindType = null, this.attempt = 0
                }
            }]), e
        }(), E = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
        O = ["scroll", "wheel", "mousewheel", "resize", "animationend", "transitionend", "touchmove"],
        P = {rootMargin: "0px", threshold: 0}, M = function (e) {
            return function () {
                function t(e) {
                    var i, n, a, r, s = e.preLoad, l = e.error, d = e.throttleWait, u = e.preLoadTop, c = e.dispatchEvent,
                        h = e.loading, f = e.attempt, p = e.silent, m = void 0 === p || p, y = e.scale, T = e.listenEvents,
                        w = (e.hasbind, e.filter), k = e.adapter, b = e.observer, I = e.observerOptions;
                    o(this, t), this.version = "1.3.3", this.mode = v.event, this.ListenerQueue = [], this.TargetIndex = 0, this.TargetQueue = [], this.options = {
                        silent: m,
                        dispatchEvent: !!c,
                        throttleWait: d || 200,
                        preLoad: s || 1.3,
                        preLoadTop: u || 0,
                        error: l || E,
                        loading: h || E,
                        attempt: f || 3,
                        scale: y || C(y),
                        ListenEvents: T || O,
                        hasbind: !1,
                        supportWebp: function () {
                            if (!g) return !1;
                            var e = !0, t = document;
                            try {
                                var i = t.createElement("object");
                                i.type = "image/webp", i.style.visibility = "hidden", i.innerHTML = "!", t.body.appendChild(i), e = !i.offsetWidth, t.body.removeChild(i)
                            } catch (t) {
                                e = !1
                            }
                            return e
                        }(),
                        filter: w || {},
                        adapter: k || {},
                        observer: !!b,
                        observerOptions: I || P
                    }, this._initEvent(), this._imageCache = new N({max: 200}), this.lazyLoadHandler = (i = this._lazyLoadHandler.bind(this), n = this.options.throttleWait, a = null, r = 0, function () {
                        if (!a) {
                            var e = this, t = arguments, o = function () {
                                r = Date.now(), a = !1, i.apply(e, t)
                            };
                            Date.now() - r >= n ? o() : a = setTimeout(o, n)
                        }
                    }), this.setMode(this.options.observer ? v.observer : v.event)
                }

                return a(t, [{
                    key: "config", value: function () {
                        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
                        p(this.options, e)
                    }
                }, {
                    key: "performance", value: function () {
                        var e = [];
                        return this.ListenerQueue.map(function (t) {
                            e.push(t.performance())
                        }), e
                    }
                }, {
                    key: "addLazyBox", value: function (e) {
                        this.ListenerQueue.push(e), g && (this._addListenerTarget(window), this._observer && this._observer.observe(e.el), e.$el && e.$el.parentNode && this._addListenerTarget(e.$el.parentNode))
                    }
                }, {
                    key: "add", value: function (t, i, n) {
                        var o = this;
                        if (function (e, t) {
                            for (var i = !1, n = 0, o = e.length; n < o; n++) if (t(e[n])) {
                                i = !0;
                                break
                            }
                            return i
                        }(this.ListenerQueue, function (e) {
                            return e.el === t
                        })) return this.update(t, i), e.nextTick(this.lazyLoadHandler);
                        var a = this._valueFormatter(i.value), r = a.src, s = a.loading, l = a.error;
                        e.nextTick(function () {
                            r = w(t, o.options.scale) || r, o._observer && o._observer.observe(t);
                            var a = Object.keys(i.modifiers)[0], d = void 0;
                            a && (d = (d = n.context.$refs[a]) ? d.$el || d : document.getElementById(a)), d || (d = function (e) {
                                if (g) {
                                    if (!(e instanceof HTMLElement)) return window;
                                    for (var t = e; t && t !== document.body && t !== document.documentElement && t.parentNode;) {
                                        if (/(scroll|auto)/.test(D(t))) return t;
                                        t = t.parentNode
                                    }
                                    return window
                                }
                            }(t));
                            var u = new x({
                                bindType: i.arg,
                                $parent: d,
                                el: t,
                                loading: s,
                                error: l,
                                src: r,
                                elRenderer: o._elRenderer.bind(o),
                                options: o.options,
                                imageCache: o._imageCache
                            });
                            o.ListenerQueue.push(u), g && (o._addListenerTarget(window), o._addListenerTarget(d)), o.lazyLoadHandler(), e.nextTick(function () {
                                return o.lazyLoadHandler()
                            })
                        })
                    }
                }, {
                    key: "update", value: function (t, i, n) {
                        var o = this, a = this._valueFormatter(i.value), r = a.src, s = a.loading, l = a.error;
                        r = w(t, this.options.scale) || r;
                        var d = k(this.ListenerQueue, function (e) {
                            return e.el === t
                        });
                        d ? d.update({
                            src: r,
                            loading: s,
                            error: l
                        }) : this.add(t, i, n), this._observer && (this._observer.unobserve(t), this._observer.observe(t)), this.lazyLoadHandler(), e.nextTick(function () {
                            return o.lazyLoadHandler()
                        })
                    }
                }, {
                    key: "remove", value: function (e) {
                        if (e) {
                            this._observer && this._observer.unobserve(e);
                            var t = k(this.ListenerQueue, function (t) {
                                return t.el === e
                            });
                            t && (this._removeListenerTarget(t.$parent), this._removeListenerTarget(window), T(this.ListenerQueue, t), t.$destroy())
                        }
                    }
                }, {
                    key: "removeComponent", value: function (e) {
                        e && (T(this.ListenerQueue, e), this._observer && this._observer.unobserve(e.el), e.$parent && e.$el.parentNode && this._removeListenerTarget(e.$el.parentNode), this._removeListenerTarget(window))
                    }
                }, {
                    key: "setMode", value: function (e) {
                        var t = this;
                        m || e !== v.observer || (e = v.event), this.mode = e, e === v.event ? (this._observer && (this.ListenerQueue.forEach(function (e) {
                            t._observer.unobserve(e.el)
                        }), this._observer = null), this.TargetQueue.forEach(function (e) {
                            t._initListen(e.el, !0)
                        })) : (this.TargetQueue.forEach(function (e) {
                            t._initListen(e.el, !1)
                        }), this._initIntersectionObserver())
                    }
                }, {
                    key: "_addListenerTarget", value: function (e) {
                        if (e) {
                            var t = k(this.TargetQueue, function (t) {
                                return t.el === e
                            });
                            return t ? t.childrenCount++ : (t = {
                                el: e,
                                id: ++this.TargetIndex,
                                childrenCount: 1,
                                listened: !0
                            }, this.mode === v.event && this._initListen(t.el, !0), this.TargetQueue.push(t)), this.TargetIndex
                        }
                    }
                }, {
                    key: "_removeListenerTarget", value: function (e) {
                        var t = this;
                        this.TargetQueue.forEach(function (i, n) {
                            i.el === e && (i.childrenCount--, i.childrenCount || (t._initListen(i.el, !1), t.TargetQueue.splice(n, 1), i = null))
                        })
                    }
                }, {
                    key: "_initListen", value: function (e, t) {
                        var i = this;
                        this.options.ListenEvents.forEach(function (n) {
                            return I[t ? "on" : "off"](e, n, i.lazyLoadHandler)
                        })
                    }
                }, {
                    key: "_initEvent", value: function () {
                        var e = this;
                        this.Event = {listeners: {loading: [], loaded: [], error: []}}, this.$on = function (t, i) {
                            e.Event.listeners[t] || (e.Event.listeners[t] = []), e.Event.listeners[t].push(i)
                        }, this.$once = function (t, i) {
                            var n = e;
                            e.$on(t, function e() {
                                n.$off(t, e), i.apply(n, arguments)
                            })
                        }, this.$off = function (t, i) {
                            if (i) T(e.Event.listeners[t], i); else {
                                if (!e.Event.listeners[t]) return;
                                e.Event.listeners[t].length = 0
                            }
                        }, this.$emit = function (t, i, n) {
                            e.Event.listeners[t] && e.Event.listeners[t].forEach(function (e) {
                                return e(i, n)
                            })
                        }
                    }
                }, {
                    key: "_lazyLoadHandler", value: function () {
                        var e = this, t = [];
                        this.ListenerQueue.forEach(function (e, i) {
                            e.el && e.el.parentNode || t.push(e), e.checkInView() && e.load()
                        }), t.forEach(function (t) {
                            T(e.ListenerQueue, t), t.$destroy()
                        })
                    }
                }, {
                    key: "_initIntersectionObserver", value: function () {
                        var e = this;
                        m && (this._observer = new IntersectionObserver(this._observerHandler.bind(this), this.options.observerOptions), this.ListenerQueue.length && this.ListenerQueue.forEach(function (t) {
                            e._observer.observe(t.el)
                        }))
                    }
                }, {
                    key: "_observerHandler", value: function (e, t) {
                        var i = this;
                        e.forEach(function (e) {
                            e.isIntersecting && i.ListenerQueue.forEach(function (t) {
                                if (t.el === e.target) {
                                    if (t.state.loaded) return i._observer.unobserve(t.el);
                                    t.load()
                                }
                            })
                        })
                    }
                }, {
                    key: "_elRenderer", value: function (e, t, i) {
                        if (e.el) {
                            var n = e.el, o = e.bindType, a = void 0;
                            switch (t) {
                                case"loading":
                                    a = e.loading;
                                    break;
                                case"error":
                                    a = e.error;
                                    break;
                                default:
                                    a = e.src
                            }
                            if (o ? n.style[o] = 'url("' + a + '")' : n.getAttribute("src") !== a && n.setAttribute("src", a), n.setAttribute("lazy", t), this.$emit(t, e, i), this.options.adapter[t] && this.options.adapter[t](e, this.options), this.options.dispatchEvent) {
                                var r = new y(t, {detail: e});
                                n.dispatchEvent(r)
                            }
                        }
                    }
                }, {
                    key: "_valueFormatter", value: function (e) {
                        var t, i = e, o = this.options.loading, a = this.options.error;
                        return null !== (t = e) && "object" === (void 0 === t ? "undefined" : n(t)) && (e.src || this.options.silent || console.error("Vue Lazyload warning: miss src with " + e), i = e.src, o = e.loading || this.options.loading, a = e.error || this.options.error), {
                            src: i,
                            loading: o,
                            error: a
                        }
                    }
                }]), t
            }()
        }, F = function () {
            function e(t) {
                var i = t.lazy;
                o(this, e), this.lazy = i, i.lazyContainerMananger = this, this._queue = []
            }

            return a(e, [{
                key: "bind", value: function (e, t, i) {
                    var n = new R({el: e, binding: t, vnode: i, lazy: this.lazy});
                    this._queue.push(n)
                }
            }, {
                key: "update", value: function (e, t, i) {
                    var n = k(this._queue, function (t) {
                        return t.el === e
                    });
                    n && n.update({el: e, binding: t, vnode: i})
                }
            }, {
                key: "unbind", value: function (e, t, i) {
                    var n = k(this._queue, function (t) {
                        return t.el === e
                    });
                    n && (n.clear(), T(this._queue, n))
                }
            }]), e
        }(), L = {selector: "img"}, R = function () {
            function e(t) {
                var i = t.el, n = t.binding, a = t.vnode, r = t.lazy;
                o(this, e), this.el = null, this.vnode = a, this.binding = n, this.options = {}, this.lazy = r, this._queue = [], this.update({
                    el: i,
                    binding: n
                })
            }

            return a(e, [{
                key: "update", value: function (e) {
                    var t = this, i = e.el, n = e.binding;
                    this.el = i, this.options = p({}, L, n.value), this.getImgs().forEach(function (e) {
                        t.lazy.add(e, p({}, t.binding, {
                            value: {
                                src: "dataset" in e ? e.dataset.src : e.getAttribute("data-src"),
                                error: ("dataset" in e ? e.dataset.error : e.getAttribute("data-error")) || t.options.error,
                                loading: ("dataset" in e ? e.dataset.loading : e.getAttribute("data-loading")) || t.options.loading
                            }
                        }), t.vnode)
                    })
                }
            }, {
                key: "getImgs", value: function () {
                    return function (e) {
                        for (var t = e.length, i = [], n = 0; n < t; n++) i.push(e[n]);
                        return i
                    }(this.el.querySelectorAll(this.options.selector))
                }
            }, {
                key: "clear", value: function () {
                    var e = this;
                    this.getImgs().forEach(function (t) {
                        return e.lazy.remove(t)
                    }), this.vnode = null, this.binding = null, this.lazy = null
                }
            }]), e
        }(), B = {
            install: function (e) {
                var t, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = new (M(e))(i),
                    o = new F({lazy: n}), a = "2" === e.version.split(".")[0];
                e.prototype.$Lazyload = n, i.lazyComponent && e.component("lazy-component", function (e) {
                    return {
                        props: {tag: {type: String, default: "div"}}, render: function (e) {
                            return !1 === this.show ? e(this.tag) : e(this.tag, null, this.$slots.default)
                        }, data: function () {
                            return {el: null, state: {loaded: !1}, rect: {}, show: !1}
                        }, mounted: function () {
                            this.el = this.$el, e.addLazyBox(this), e.lazyLoadHandler()
                        }, beforeDestroy: function () {
                            e.removeComponent(this)
                        }, methods: {
                            getRect: function () {
                                this.rect = this.$el.getBoundingClientRect()
                            }, checkInView: function () {
                                return this.getRect(), g && this.rect.top < window.innerHeight * e.options.preLoad && this.rect.bottom > 0 && this.rect.left < window.innerWidth * e.options.preLoad && this.rect.right > 0
                            }, load: function () {
                                this.show = !0, this.state.loaded = !0, this.$emit("show", this)
                            }, destroy: function () {
                                return this.$destroy
                            }
                        }
                    }
                }(n)), i.lazyImage && e.component("lazy-image", (t = n, {
                    props: {src: [String, Object], tag: {type: String, default: "img"}}, render: function (e) {
                        return e(this.tag, {attrs: {src: this.renderSrc}}, this.$slots.default)
                    }, data: function () {
                        return {
                            el: null,
                            options: {src: "", error: "", loading: "", attempt: t.options.attempt},
                            state: {loaded: !1, error: !1, attempt: 0},
                            rect: {},
                            renderSrc: ""
                        }
                    }, watch: {
                        src: function () {
                            this.init(), t.addLazyBox(this), t.lazyLoadHandler()
                        }
                    }, created: function () {
                        this.init(), this.renderSrc = this.options.loading
                    }, mounted: function () {
                        this.el = this.$el, t.addLazyBox(this), t.lazyLoadHandler()
                    }, beforeDestroy: function () {
                        t.removeComponent(this)
                    }, methods: {
                        init: function () {
                            var e = t._valueFormatter(this.src), i = e.src, n = e.loading, o = e.error;
                            this.state.loaded = !1, this.options.src = i, this.options.error = o, this.options.loading = n, this.renderSrc = this.options.loading
                        }, getRect: function () {
                            this.rect = this.$el.getBoundingClientRect()
                        }, checkInView: function () {
                            return this.getRect(), g && this.rect.top < window.innerHeight * t.options.preLoad && this.rect.bottom > 0 && this.rect.left < window.innerWidth * t.options.preLoad && this.rect.right > 0
                        }, load: function () {
                            var e = this, i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : A;
                            if (this.state.attempt > this.options.attempt - 1 && this.state.error) return t.options.silent || console.log("VueLazyload log: " + this.options.src + " tried too more than " + this.options.attempt + " times"), void i();
                            var n = this.options.src;
                            S({src: n}, function (t) {
                                var i = t.src;
                                e.renderSrc = i, e.state.loaded = !0
                            }, function (t) {
                                e.state.attempt++, e.renderSrc = e.options.error, e.state.error = !0
                            })
                        }
                    }
                })), a ? (e.directive("lazy", {
                    bind: n.add.bind(n),
                    update: n.update.bind(n),
                    componentUpdated: n.lazyLoadHandler.bind(n),
                    unbind: n.remove.bind(n)
                }), e.directive("lazy-container", {
                    bind: o.bind.bind(o),
                    componentUpdated: o.update.bind(o),
                    unbind: o.unbind.bind(o)
                })) : (e.directive("lazy", {
                    bind: n.lazyLoadHandler.bind(n), update: function (e, t) {
                        p(this.vm.$refs, this.vm.$els), n.add(this.el, {
                            modifiers: this.modifiers || {},
                            arg: this.arg,
                            value: e,
                            oldValue: t
                        }, {context: this.vm})
                    }, unbind: function () {
                        n.remove(this.el)
                    }
                }), e.directive("lazy-container", {
                    update: function (e, t) {
                        o.update(this.el, {
                            modifiers: this.modifiers || {},
                            arg: this.arg,
                            value: e,
                            oldValue: t
                        }, {context: this.vm})
                    }, unbind: function () {
                        o.unbind(this.el)
                    }
                }))
            }
        };
    t.default = B
}, function (e, t, i) {
    e.exports = function (e) {
        function t(n) {
            if (i[n]) return i[n].exports;
            var o = i[n] = {i: n, l: !1, exports: {}};
            return e[n].call(o.exports, o, o.exports, t), o.l = !0, o.exports
        }

        var i = {};
        return t.m = e, t.c = i, t.i = function (e) {
            return e
        }, t.d = function (e, i, n) {
            t.o(e, i) || Object.defineProperty(e, i, {configurable: !1, enumerable: !0, get: n})
        }, t.n = function (e) {
            var i = e && e.__esModule ? function () {
                return e.default
            } : function () {
                return e
            };
            return t.d(i, "a", i), i
        }, t.o = function (e, t) {
            return Object.prototype.hasOwnProperty.call(e, t)
        }, t.p = "/dist/", t(t.s = 4)
    }([function (e, t) {
        e.exports = {
            inserted: function (e, t, i) {
                var n = i.context.$refs[t.arg];
                n && n.addItem({el: e, value: t.value})
            }, unbind: function (e, t, i) {
                var n = i.context.$refs[t.arg];
                n && n.removeItem({el: e, value: t.value})
            }
        }
    }, function (e, t, i) {
        var n = i(5)(i(2), i(6), null, null, null);
        e.exports = n.exports
    }, function (e, t, i) {
        "use strict";
        Object.defineProperty(t, "__esModule", {value: !0});
        var n = i(3);
        t.default = {
            name: "Popup",
            props: {
                appendToBody: {type: Boolean, default: !0},
                arrowClass: String,
                direction: {type: String, default: "bottom"},
                display: {type: Boolean, default: !1},
                padding: {type: Number, default: 0},
                trigger: {type: String, default: "hover"},
                scrollShow: {type: Boolean, default: !0}
            },
            data: function () {
                return {
                    arrowStyle: {},
                    delay: 100,
                    directionMap: {top: "height", left: "width"},
                    secondDirection: "",
                    left: 0,
                    top: 0,
                    currentElement: null,
                    willHide: !1
                }
            },
            computed: {
                directionClass: function () {
                    var e = /(top)|(bottom)|(left)|(right)/i, t = e.exec(this.direction) || [],
                        i = this.secondDirection ? e.exec(this.secondDirection)[0] : "", n = t[0] || "";
                    return "" === i ? "popup-" + n : "popup-" + i
                }, triggerEvent: function () {
                    switch (this.trigger) {
                        case"hover":
                            return "mouseenter";
                        case"focus":
                            return "focus";
                        case"click":
                            return "click"
                    }
                }, unTriggerEl: function () {
                    return "click" === this.trigger ? document : this.$el
                }, unTriggerEvent: function () {
                    switch (this.trigger) {
                        case"hover":
                            return "mouseleave";
                        case"focus":
                            return "blur";
                        case"click":
                            return "click"
                    }
                }
            },
            mounted: function () {
                this.appendToBody && document.body.appendChild(this.$el), this.$el.addEventListener(this.triggerEvent, this.handlePopupVisible), this.unTriggerEl.addEventListener(this.unTriggerEvent, this.handlePopupInvisible), this.handleResizeThrottle = i.i(n.a)(this.handleResize, 16), window.addEventListener("resize", this.handleResizeThrottle)
            },
            beforeDestroy: function () {
                this.$el.removeEventListener(this.triggerEvent, this.handlePopupVisible), this.unTriggerEl.removeEventListener(this.unTriggerEvent, this.handlePopupInvisible), window.removeEventListener("resize", this.handleResizeThrottle)
            },
            destroyed: function () {
                this.appendToBody && this.$el && document.body.hasChildNodes(this.$el) && document.body.removeChild(this.$el)
            },
            methods: {
                addItem: function (e) {
                    e.el.handleVisible = this.handleVisible.bind(this, e.value, e.el), e.el.addEventListener(this.triggerEvent, e.el.handleVisible), "click" !== this.trigger && (e.el.handleInvisible = this.handleInvisible.bind(this, e.value), e.el.addEventListener(this.unTriggerEvent, e.el.handleInvisible)), this.bindScroll(e.el)
                }, removeItem: function (e) {
                    e.el.removeEventListener(this.triggerEvent, e.el.handleVisible), "click" !== this.trigger && e.el.removeEventListener(this.unTriggerEvent, e.el.handleInvisible), this.unbindScroll(e.el)
                }, bindScroll: function (e) {
                    for (e = e.parentNode; e;) e.addEventListener("scroll", this.handleScroll), e = e.parentNode
                }, unbindScroll: function (e) {
                    for (e = e.parentNode; e;) e.removeEventListener("scroll", this.handleScroll), e = e.parentNode
                }, computePosition: function (e, t) {
                    e = e.getBoundingClientRect();
                    var i = 0, n = 0, o = (t = t.getBoundingClientRect()).top - e.height - this.padding,
                        a = t.left + t.width + this.padding, r = t.top + t.height + this.padding,
                        s = t.left - e.width - this.padding;
                    /(top)|(bottom)/i.test(this.direction) ? (i = t.left + (t.width - e.width) / 2, "bottomStart" !== this.direction && "topStart" !== this.direction || (i = t.left), "bottomEnd" !== this.direction && "topEnd" !== this.direction || (i = t.left - e.width + t.width), i < 0 ? (i = 0, this.arrowStyle = {left: (t.left + t.right) / 2 + "px"}) : i + e.width > window.innerWidth ? (i = window.innerWidth - e.width, this.arrowStyle = {left: (t.left + t.right) / 2 - i + "px"}) : this.arrowStyle = {left: (t.left + t.right) / 2 - i + "px"}, "top" === this.direction || "topStart" === this.direction || "topEnd" === this.direction ? o < 0 && r + e.height <= window.innerHeight ? (n = r, this.secondDirection = "bottom", "topStart" === this.direction && (this.secondDirection = "bottomStart", this.arrowStyle = {left: (t.left + t.right) / 2 - i + "px"}), "topEnd" === this.direction && (this.secondDirection = "bottomEnd", this.arrowStyle = {left: (t.left + t.right) / 2 - i + "px"})) : (n = o, this.secondDirection = "", this.arrowStyle = {left: (t.left + t.right) / 2 - i + "px"}) : r + e.height > window.innerHeight && o >= 0 ? (n = o, this.secondDirection = "top", "bottomStart" === this.direction && (this.secondDirection = "topStart", this.arrowStyle = {left: (t.left + t.right) / 2 - i + "px"}), "bottomEnd" === this.direction && (this.secondDirection = "topEnd", this.arrowStyle = {left: (t.left + t.right) / 2 - i + "px"})) : (n = r, this.secondDirection = "", this.arrowStyle = {left: (t.left + t.right) / 2 - i + "px"})) : /(left)|(right)/i.test(this.direction) && (n = t.top + (t.height - e.height) / 2, "leftStart" !== this.direction && "rightStart" !== this.direction || (n = t.top), "leftEnd" !== this.direction && "rightEnd" !== this.direction || (n = t.top - e.height + t.height), n < 0 ? (n = 0, this.arrowStyle = {top: (t.top + t.bottom) / 2 + "px"}) : n + e.height > window.innerHeight ? (n = window.innerHeight - e.height, this.arrowStyle = {top: (t.top + t.bottom) / 2 - n + "px"}) : this.arrowStyle = {top: (t.top + t.bottom) / 2 - n + "px"}, "left" === this.direction || "leftStart" === this.direction || "leftEnd" === this.direction ? s < 0 && a + e.width <= window.innerWidth ? (i = a, this.secondDirection = "right", "leftStart" === this.direction && (this.secondDirection = "rightStart", this.arrowStyle = {top: (t.top + t.bottom) / 2 - n + "px"}), "leftEnd" === this.direction && (this.secondDirection = "rightEnd", this.arrowStyle = {top: (t.top + t.bottom) / 2 - n + "px"})) : (i = s, this.secondDirection = "", this.arrowStyle = {top: (t.top + t.bottom) / 2 - n + "px"}) : a + e.width > window.innerWidth && s >= 0 ? (i = s, this.secondDirection = "left", "rightStart" === this.direction && (this.secondDirection = "leftStart", this.arrowStyle = {top: (t.top + t.bottom) / 2 - n + "px"}), "rightEnd" === this.direction && (this.secondDirection = "leftEnd", this.arrowStyle = {top: (t.top + t.bottom) / 2 - n + "px"})) : (i = a, this.secondDirection = "", this.arrowStyle = {top: (t.top + t.bottom) / 2 - n + "px"})), this.top = n, this.left = i
                }, handleVisible: function (e, t, i) {
                    var n = this;
                    if ("click" === this.trigger && this.display && !0 !== i) return this.handleInvisible(e);
                    this.willHide = !1, this.currentElement = t, this.currentValue = e, this.$emit("update:display", !0), this.$emit("show", e), this.$nextTick(function () {
                        setTimeout(function () {
                            n.computePosition(n.$el, n.currentElement)
                        })
                    })
                }, handleInvisible: function (e) {
                    var t = this;
                    "click" === this.trigger ? (this.$emit("update:display", !1), this.$emit("hide", e)) : (this.willHide = !0, setTimeout(function () {
                        t.willHide && (t.$emit("update:display", !1), t.$emit("hide", e))
                    }, this.delay))
                }, handleScroll: function () {
                    this.scrollShow ? this.display && this.computePosition(this.$el, this.currentElement) : (this.$emit("update:display", !1), this.$emit("hide"))
                }, handlePopupVisible: function (e) {
                    e.stopPropagation(), this.willHide = !1, this.$emit("update:display", !0), this.$emit("show", this.value)
                }, handlePopupInvisible: function (e) {
                    var t = this;
                    "click" === this.trigger && this.isClosest(e.target, this.currentElement) || ("click" === this.trigger ? (this.$emit("update:display", !1), this.$emit("hide", this.value)) : (this.willHide = !0, setTimeout(function () {
                        t.willHide && (t.$emit("update:display", !1), t.$emit("hide", t.value))
                    }, this.delay)))
                }, handleResize: function () {
                    this.display && this.handleVisible(this.value, this.currentElement, !0)
                }, show: function (e, t) {
                    this.handleVisible(t, e)
                }, hide: function () {
                    this.handleInvisible()
                }, isDirectionLine: function (e) {
                    return "top" === e || "bottom" === e ? "top" === this.direction || "bottom" === this.direction : "left" === this.direction || "right" === this.direction
                }, isClosest: function (e, t) {
                    return e !== document && (e === t || this.isClosest(e.parentNode, t))
                }
            }
        }
    }, function (e, t, i) {
        "use strict";
        t.a = function (e, t) {
            var i = this, n = 0;
            return function () {
                for (var o = arguments.length, a = Array(o), r = 0; r < o; r++) a[r] = arguments[r];
                var s = +new Date;
                s - n > t && (e.apply(i, a), n = s)
            }
        }
    }, function (e, t, i) {
        var n = i(0), o = i(1);
        o.install = function (e) {
            e.directive("popup", n), e.component(o.name, o)
        }, e.exports = o
    }, function (e, t) {
        e.exports = function (e, t, i, n, o) {
            var a, r = e = e || {}, s = typeof e.default;
            "object" !== s && "function" !== s || (a = e, r = e.default);
            var l, d = "function" == typeof r ? r.options : r;
            if (t && (d.render = t.render, d.staticRenderFns = t.staticRenderFns), n && (d._scopeId = n), o ? (l = function (e) {
                (e = e || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || "undefined" == typeof __VUE_SSR_CONTEXT__ || (e = __VUE_SSR_CONTEXT__), i && i.call(this, e), e && e._registeredComponents && e._registeredComponents.add(o)
            }, d._ssrRegister = l) : i && (l = i), l) {
                var u = d.functional, c = u ? d.render : d.beforeCreate;
                u ? d.render = function (e, t) {
                    return l.call(t), c(e, t)
                } : d.beforeCreate = c ? [].concat(c, l) : [l]
            }
            return {esModule: a, exports: r, options: d}
        }
    }, function (e, t) {
        e.exports = {
            render: function () {
                var e = this, t = e.$createElement, i = e._self._c || t;
                return i("div", {
                    class: e.directionClass,
                    style: {display: e.display ? "block" : "none", left: e.left + "px", top: e.top + "px"},
                    attrs: {tabindex: "999"}
                }, [e._t("default"), e._v(" "), i("span", {
                    staticClass: "popup-arrow",
                    class: e.arrowClass,
                    style: e.arrowStyle
                })], 2)
            }, staticRenderFns: []
        }
    }])
}, function (e, t, i) {
    var n;
    n = function () {
        return function (e) {
            var t = {};

            function i(n) {
                if (t[n]) return t[n].exports;
                var o = t[n] = {i: n, l: !1, exports: {}};
                return e[n].call(o.exports, o, o.exports, i), o.l = !0, o.exports
            }

            return i.m = e, i.c = t, i.i = function (e) {
                return e
            }, i.d = function (e, t, n) {
                i.o(e, t) || Object.defineProperty(e, t, {configurable: !1, enumerable: !0, get: n})
            }, i.n = function (e) {
                var t = e && e.__esModule ? function () {
                    return e.default
                } : function () {
                    return e
                };
                return i.d(t, "a", t), t
            }, i.o = function (e, t) {
                return Object.prototype.hasOwnProperty.call(e, t)
            }, i.p = "", i(i.s = 3)
        }([function (e, t, i) {
            "use strict";
            t.a = function () {
                var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t = "", i = "";
                if (!e || 0 === e.length) return {isVip: !1};
                var n = e.filter(function (e) {
                    return e && 2 === (e.vasId || e.vasID)
                })[0];
                if (i = n.vIPLevel || n.VIPLevel || 0, n) {
                    var o = {2: "", 3: "p", 5: "s"}[n.vasType] || "";
                    return t = "vip-icon-" + o + "vip" + i, {
                        isVip: "1" === n.isVIP,
                        isStop: "2" === n.isVIP,
                        isYear: "1" === n.isYear,
                        type: n.vasType,
                        level: i,
                        vipClass: t
                    }
                }
                return {isVip: !1}
            }
        }, function (e, t, i) {
            "use strict";
            var n = i(4), o = i.n(n);
            o.a.install = function (e) {
                e.component(o.a.name, o.a)
            }, t.a = o.a
        }, function (e, t, i) {
            "use strict";
            Object.defineProperty(t, "__esModule", {value: !0});
            var n = i(0);
            t.default = {
                name: "vip-icon",
                props: {
                    vipData: {type: Array, required: !0},
                    size: {type: String, default: "normal"},
                    disabled: {type: Boolean, default: !1}
                },
                computed: {
                    vipInfo: function () {
                        return i.i(n.a)(this.vipData)
                    }, vipClass: function () {
                        var e = this.vipInfo.vipClass;
                        return "small" === this.size && (e += " is-small"), (this.vipInfo.isStop || "0" === this.vipInfo.level || this.disabled) && (e += " is-disabled"), e
                    }
                }
            }
        }, function (e, t, i) {
            "use strict";
            Object.defineProperty(t, "__esModule", {value: !0});
            var n = i(1), o = i(0);
            i.d(t, "vipInfo", function () {
                return o.a
            });
            /**
             * vip
             * (c) 2018 shijianan
             * @license MIT
             */
            var a = {
                install: function (e, t) {
                    e.use(n.a), e.prototype.$vipInfo = function (e) {
                        return i.i(o.a)(e)
                    }
                }
            };
            t.default = a
        }, function (e, t, i) {
            var n = i(5)(i(2), i(6), null, null, null);
            n.options.__file = "/Users/nancy/Desktop/work/@xunlei/vip/src/vip-icon/VipIcon.vue", n.esModule && Object.keys(n.esModule).some(function (e) {
                return "default" !== e && "__" !== e.substr(0, 2)
            }) && console.error("named exports are not supported in *.vue files."), n.options.functional && console.error("[vue-loader] VipIcon.vue: functional components are not supported with templates, they should use render functions."), e.exports = n.exports
        }, function (e, t) {
            e.exports = function (e, t, i, n, o) {
                var a, r = e = e || {}, s = typeof e.default;
                "object" !== s && "function" !== s || (a = e, r = e.default);
                var l, d = "function" == typeof r ? r.options : r;
                if (t && (d.render = t.render, d.staticRenderFns = t.staticRenderFns), n && (d._scopeId = n), o ? (l = function (e) {
                    (e = e || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || "undefined" == typeof __VUE_SSR_CONTEXT__ || (e = __VUE_SSR_CONTEXT__), i && i.call(this, e), e && e._registeredComponents && e._registeredComponents.add(o)
                }, d._ssrRegister = l) : i && (l = i), l) {
                    var u = d.functional, c = u ? d.render : d.beforeCreate;
                    u ? d.render = function (e, t) {
                        return l.call(t), c(e, t)
                    } : d.beforeCreate = c ? [].concat(c, l) : [l]
                }
                return {esModule: a, exports: r, options: d}
            }
        }, function (e, t, i) {
            e.exports = {
                render: function () {
                    var e = this.$createElement;
                    return (this._self._c || e)("i", {class: this.vipClass})
                }, staticRenderFns: []
            }, e.exports.render._withStripped = !0
        }])
    }, e.exports = n()
}, function (e, t) {
    e.exports = "data:image/png;base64, "
}, function (e, t) {
    e.exports = require("readline")
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(0), r = i(5), s = i(8), l = i(4), d = i(32), u = i(608), c = i(610), h = i(612), f = i(613),
        p = i(99), g = i(16), m = i(42), v = i(26), y = i(502), T = i(51), w = i(7), k = i(37), C = i(43), b = i(31),
        I = a.default.getLogger("DownloadKernel.Task"), S = g.DownloadKernelEventManager.getEventManager(),
        _ = v.DownloadKernelCategoryManager.getCategoryManager(),
        D = w.default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    var A;
    !function (e) {
        e[e.None = 0] = "None", e[e.Create = 1] = "Create", e[e.StartPending = 2] = "StartPending", e[e.Downloading = 3] = "Downloading", e[e.StopPending = 4] = "StopPending", e[e.Pause = 5] = "Pause", e[e.CompletePending = 6] = "CompletePending", e[e.Complete = 7] = "Complete", e[e.Error = 8] = "Error", e[e.ErrorStopPending = 9] = "ErrorStopPending"
    }(A || (A = {}));
    t.Task = class {
        constructor() {
            this.taskId = 0, this.virtualTaskId = 0, this.isBackground = !1, this.taskType = l.DownloadKernel.TaskType.Unkown, this.preStatus = l.DownloadKernel.TaskStatus.Stopped, this.taskStatus = l.DownloadKernel.TaskStatus.Stopped, this.taskExtra = null, this.isCreating = !1, this.speed = 0, this.vipSpeed = 0, this.downloadSizeList = [], this.vipSizeList = [], this.startTime = 0, this.downloadingPeriod = 0, this.dispatchStrategy = void 0, this.freeFromSchedule = void 0, this.originOnlyStrategy = void 0, this.originThreadCount = void 0, this.vipCert = void 0, this.dcdnFileIndex = -1, this.taskStatusChangedReason = l.DownloadKernel.TaskStopReason.Unknown, this.batchSetTaskAttribute = !1, this.batchDetailChangedFlags = l.DownloadKernel.TaskDetailChangedFlags.UnKnown, this.detailChangedFlags = l.DownloadKernel.TaskDetailChangedFlags.UnKnown, this.nTotalAvailablePeer = 0, this.vipDownloadSizeCur = 0, this.bAcclerating = !1, this.shiftChannelSize = 0, this.resourceLegal = -1, this.downloadStrategy = l.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_NORMALDOWNLOAD, this.serverResourceInfos = new Map, this.attribute = new Map;
            for (let e = l.DownloadKernel.TaskAttribute.NumberStrart; e < l.DownloadKernel.TaskAttribute.NumberEnd; ++e) this.attribute.set(e, 0);
            for (let e = l.DownloadKernel.TaskAttribute.BooleanStart; e < l.DownloadKernel.TaskAttribute.BooleanEnd; ++e) this.attribute.set(e, !1);
            for (let e = l.DownloadKernel.TaskAttribute.StringStart; e < l.DownloadKernel.TaskAttribute.StringEnd; ++e) this.attribute.set(e, "");
            for (let e = l.DownloadKernel.TaskAttribute.ObjectStart; e < l.DownloadKernel.TaskAttribute.ObjectEnd; ++e) this.attribute.set(e, null);
            this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryId, -1), this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryViewId, l.DownloadKernel.CategroyViewID.Unkown), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskType, l.DownloadKernel.TaskType.Unkown), this.attribute.set(l.DownloadKernel.TaskAttribute.ErrorCode, l.DownloadKernel.TaskError.Unkown), this.attribute.set(l.DownloadKernel.TaskAttribute.NameType, 1), this.attribute.set(l.DownloadKernel.TaskAttribute.CreateTime, (new Date).getTime()), this.channelInfo = {
                originSize: 0,
                p2pSize: 0,
                p2sSize: 0,
                offlineSize: 0,
                dcdnSize: 0,
                dcdnStatus: l.DownloadKernel.DcdnStatusCode.Unkown
            }, this.historyChannelInfo = {originSize: 0, p2pSize: 0, p2sSize: 0, offlineSize: 0, dcdnSize: 0}
        }

        getId() {
            return this.taskId
        }

        getType() {
            return this.taskType
        }

        reName(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!e || "" === e) break;
                    let t = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName);
                    if (t === e) break;
                    let i = !1;
                    if (this.taskStatus === l.DownloadKernel.TaskStatus.Succeeded || this.taskStatus === l.DownloadKernel.TaskStatus.Seeding) {
                        if (!(yield T.SingleBtTaskNS.isSingleBtTask(this)) && this.taskType !== l.DownloadKernel.TaskType.Group) {
                            let i = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath), n = o.join(i, t),
                                a = o.join(i, e), r = yield s.FileSystemAWNS.existsAW(n);
                            r && (a = m.Common.getMaxFilePath(a), yield s.FileSystemAWNS.renameAW(n, a), (r = yield s.FileSystemAWNS.existsAW(a)) && (e = o.basename(a)))
                        }
                        i = !0
                    } else this.taskStatus === l.DownloadKernel.TaskStatus.StandBy ? i = !0 : this.taskStatus === l.DownloadKernel.TaskStatus.Started && this.taskType === l.DownloadKernel.TaskType.P2sp && d.ThunderKernel.renameP2spTaskFile(this.virtualTaskId, e);
                    i && (this.setTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName, e), this.fireTaskEvent(l.DownloadKernel.TaskEventType.TaskRenamed))
                } while (0)
            })
        }

        setUserRead(e) {
            0 !== e && (e = 1), e !== this.attribute.get(l.DownloadKernel.TaskAttribute.UserRead) && (this.attribute.set(l.DownloadKernel.TaskAttribute.UserRead, e), this.saveTaskInfo(this.taskId, p.StatementType.SetTaskUserRead, p.ValueType.ValueInt, e), this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.UserRead))
        }

        getUserRead() {
            return this.attribute.get(l.DownloadKernel.TaskAttribute.UserRead)
        }

        setDescription(e) {
            let t = this.attribute.get(l.DownloadKernel.TaskAttribute.Description);
            e && t !== e && (this.attribute.set(l.DownloadKernel.TaskAttribute.Description, e), this.saveTaskInfo(this.taskId, p.StatementType.SetTaskDescription, p.ValueType.ValueString, e), this.fireTaskEvent(l.DownloadKernel.TaskEventType.TaskDescriptionChanged))
        }

        setOriginThreadCount(e) {
            this.taskType === l.DownloadKernel.TaskType.P2sp && this.getExtraObject().setOriginThreadCount(e)
        }

        setOriginOnlyStrategy(e) {
            if (this.taskType === l.DownloadKernel.TaskType.P2sp) {
                let t = this.getExtraObject();
                e ? (t.setUseOriginOnly(1), this.originOnlyStrategy = 1) : (t.setUseOriginOnly(0), this.originOnlyStrategy = 0)
            }
        }

        getOriginOnlyStrategy() {
            let e = !1;
            return this.taskType === l.DownloadKernel.TaskType.P2sp && 1 === this.getExtraObject().getUseOriginOnly() && (e = !0), e
        }

        setDispatchStrategy(e) {
            this.dispatchStrategy = e
        }

        setDownloadStrategy(e) {
            this.virtualTaskId && this.virtualTaskId > 0 ? d.ThunderKernel.setDownloadStrategy(this.virtualTaskId, e) : this.downloadStrategy = e
        }

        setFreeFromSchedule(e) {
            this.freeFromSchedule !== e && (this.freeFromSchedule = e)
        }

        setOpenOnComplete(e) {
            this.attribute.set(l.DownloadKernel.TaskAttribute.OpenOnComplete, e), this.saveTaskInfo(this.taskId, p.StatementType.SetTaskOpenOnCompelete, p.ValueType.ValueInt, e)
        }

        setTaskMovingState(e) {
            this.attribute.get(l.DownloadKernel.TaskAttribute.Moving) !== e && (this.attribute.set(l.DownloadKernel.TaskAttribute.Moving, e), this.fireTaskEvent(l.DownloadKernel.TaskEventType.TaskMovingStateChange))
        }

        getExtraObject() {
            return this.taskExtra
        }

        getTaskStatus() {
            return this.taskStatus
        }

        getTaskPreStatus() {
            return this.preStatus
        }

        getDownloadSpeed() {
            return this.speed
        }

        getVipSpeed() {
            let e = this.vipSpeed;
            return this.vipSpeed > this.speed && (e = this.speed), e
        }

        getTotalAvailablePeer() {
            return this.nTotalAvailablePeer
        }

        getVipDownloadSizeCur() {
            return this.vipDownloadSizeCur
        }

        setAcclerating(e) {
            this.bAcclerating = e
        }

        getAcclerating() {
            return this.bAcclerating
        }

        getShiftChannelSize() {
            return this.shiftChannelSize
        }

        getTaskAttribute(e) {
            return this.attribute.get(e)
        }

        getIsBackground() {
            return !0 === this.isBackground
        }

        getTaskChannelInfo() {
            let e = {};
            return e.originSize = this.historyChannelInfo.originSize + this.channelInfo.originSize, e.p2pSize = this.historyChannelInfo.p2pSize + this.channelInfo.p2pSize, e.p2sSize = this.historyChannelInfo.p2sSize + this.channelInfo.p2sSize, e.offlineSize = this.historyChannelInfo.offlineSize + this.channelInfo.offlineSize, e.dcdnSize = this.historyChannelInfo.dcdnSize + this.channelInfo.dcdnSize, e.dcdnStatus = this.channelInfo.dcdnStatus, e.dcdnResult = this.channelInfo.dcdnResult, e.enableDcdn = this.channelInfo.enableDcdn, e
        }

        getTaskBaseInfo() {
            let e = {};
            return e.taskId = this.taskId, e.taskType = this.taskType, e.downloadSpeed = this.speed, this.vipSpeed > this.speed ? e.vipSpeed = this.speed : e.vipSpeed = this.vipSpeed, e.taskStatus = this.getTaskStatus(), e.isMoving = this.attribute.get(l.DownloadKernel.TaskAttribute.Moving), e.savePath = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath), e.createTime = this.attribute.get(l.DownloadKernel.TaskAttribute.CreateTime), e.url = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskUrl), e.refUrl = this.attribute.get(l.DownloadKernel.TaskAttribute.RefUrl), e.cid = this.attribute.get(l.DownloadKernel.TaskAttribute.Cid), e.gcid = this.attribute.get(l.DownloadKernel.TaskAttribute.Gcid), e.taskName = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName), e.description = this.attribute.get(l.DownloadKernel.TaskAttribute.Description), e.nameType = this.attribute.get(l.DownloadKernel.TaskAttribute.NameType), e.categoryId = this.attribute.get(l.DownloadKernel.TaskAttribute.CategoryId), e.userRead = this.attribute.get(l.DownloadKernel.TaskAttribute.UserRead), e.openOnComplete = this.attribute.get(l.DownloadKernel.TaskAttribute.OpenOnComplete), e.ownerProduct = this.attribute.get(l.DownloadKernel.TaskAttribute.OwnerProduct), e.downloadingPeriod = this.attribute.get(l.DownloadKernel.TaskAttribute.DownloadingPeriod), e.errorCode = this.attribute.get(l.DownloadKernel.TaskAttribute.ErrorCode), e.groupTaskId = this.attribute.get(l.DownloadKernel.TaskAttribute.GroupTaskId), e.downloadSubTask = this.attribute.get(l.DownloadKernel.TaskAttribute.DownloadSubTask), e.productInfo = this.attribute.get(l.DownloadKernel.TaskAttribute.ProductInfo), e.origin = this.attribute.get(l.DownloadKernel.TaskAttribute.Origin), e.fileCreated = this.attribute.get(l.DownloadKernel.TaskAttribute.FileCreated), e.recycleTime = this.attribute.get(l.DownloadKernel.TaskAttribute.RecycleTime), e.forbidden = this.attribute.get(l.DownloadKernel.TaskAttribute.Forbidden), e.fileSize = this.attribute.get(l.DownloadKernel.TaskAttribute.FileSize), e.receiveSize = this.attribute.get(l.DownloadKernel.TaskAttribute.ReceivedSize), e.downloadSize = this.attribute.get(l.DownloadKernel.TaskAttribute.DownloadSize), e.srcTotal = this.attribute.get(l.DownloadKernel.TaskAttribute.SrcTotal), e.srcUsing = this.attribute.get(l.DownloadKernel.TaskAttribute.SrcUsing), e.completionTime = this.attribute.get(l.DownloadKernel.TaskAttribute.CompletionTime), e.nTotalAvailablePeer = this.getTotalAvailablePeer(), e.isBackground = this.getIsBackground(), e.playPosition = this.attribute.get(l.DownloadKernel.TaskAttribute.PlayPosition), e.duration = this.attribute.get(l.DownloadKernel.TaskAttribute.Duration), e.channelInfo = this.getTaskChannelInfo(), e.realDownloadSize = this.attribute.get(l.DownloadKernel.TaskAttribute.RealDownloadSize) || 0, e.validDownloadSize = this.attribute.get(l.DownloadKernel.TaskAttribute.ValidDownloadSize) || 0, e
        }

        isSupportPlay() {
            let e = !1;
            if (this.taskStatus === l.DownloadKernel.TaskStatus.Failed) {
                let t = this.attribute.get(l.DownloadKernel.TaskAttribute.ErrorCode);
                e = !(t && t > 700) && this.isVideoFile()
            } else e = this.isVideoFile();
            return e
        }

        setResourceLegalStatus(e) {
            this.resourceLegal = e
        }

        getResourceLegalStatus() {
            return this.resourceLegal
        }

        getVideoFileCount() {
            let e = 0;
            if (this.taskType === l.DownloadKernel.TaskType.P2sp || this.taskType === l.DownloadKernel.TaskType.Emule) e = this.isVideoFile() ? 1 : 0; else if (this.taskType === l.DownloadKernel.TaskType.Bt) {
                let t = this.getExtraObject();
                if (t.getDownloadFile().length <= 0) e = 0; else {
                    let i = !1, n = t.getBtFileList();
                    for (let [, t]of n) {
                        let n = t.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.Download),
                            o = t.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileName);
                        1 === n && (i = k.TaskUtilHelper.isVideoFileExt(o)) && e++
                    }
                }
            } else if (this.taskType === l.DownloadKernel.TaskType.Group) {
                let t = this.getExtraObject();
                if (null !== t && void 0 !== t) {
                    let i = !1, n = t.getSubTaskCount();
                    for (let o = 0; o < n; ++o) {
                        let n = t.getSubTaskByIndex(o), a = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName);
                        1 === n.getTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSubTask) && (i = k.TaskUtilHelper.isVideoFileExt(a)) && e++
                    }
                }
            }
            return e
        }

        isFreeFromSchedule() {
            return this.freeFromSchedule
        }

        getPlayUrl(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    this.virtualTaskId && this.virtualTaskId > 0 ? d.ThunderKernel.queryPlayInfo(this.virtualTaskId, e, (i, n) => {
                        e === i && t(n)
                    }) : t(void 0)
                })
            })
        }

        enableDcdnWithVipCert(e, t = -1) {
            if (I.information("enableDcdnWithVipCert", this.taskId, e, t), this.vipCert = e, this.dcdnFileIndex = t, this.taskType === l.DownloadKernel.TaskType.Group) {
                let i = this.getExtraObject(), n = i.getSubTaskCount();
                for (let o = 0; o < n; ++o) {
                    let n = i.getSubTaskByIndex(o);
                    n && n.enableDcdnWithVipCert(e, t)
                }
            } else this.virtualTaskId && this.virtualTaskId > 0 && d.ThunderKernel.enableDcdnWithVipCert(this.virtualTaskId, t, e)
        }

        updateDcdnWithVipCert(e, t = -1) {
            if (I.information("updateDcdnWithVipCert", this.taskId, e, t), this.vipCert = e, this.dcdnFileIndex = t, this.taskType === l.DownloadKernel.TaskType.Group) {
                let i = this.getExtraObject(), n = i.getSubTaskCount();
                for (let o = 0; o < n; ++o) {
                    let n = i.getSubTaskByIndex(o);
                    n && n.updateDcdnWithVipCert(e, t)
                }
            } else this.virtualTaskId && this.virtualTaskId > 0 && d.ThunderKernel.updateDcdnWithVipCert(this.virtualTaskId, t, e)
        }

        disableDcdnWithVipCert(e = -1) {
            if (I.information("disableDcdnWithVipCert", this.taskId, e), this.vipCert = void 0, this.dcdnFileIndex = -1, this.taskType === l.DownloadKernel.TaskType.Group) {
                let t = this.getExtraObject(), i = t.getSubTaskCount();
                for (let n = 0; n < i; ++n) {
                    let i = t.getSubTaskByIndex(n);
                    i && i.disableDcdnWithVipCert(e)
                }
            } else this.virtualTaskId && this.virtualTaskId > 0 && d.ThunderKernel.disableDcdnWithVipCert(this.virtualTaskId, e)
        }

        start(e) {
            return n(this, void 0, void 0, function* () {
                I.information("start this.taskStatus:", this.taskStatus, ", this.taskType:", this.taskType);
                let t = !1, i = !0;
                if (this.taskStatus === l.DownloadKernel.TaskStatus.Stopped || this.taskStatus === l.DownloadKernel.TaskStatus.StartWaiting || this.taskStatus === l.DownloadKernel.TaskStatus.Failed || this.taskStatus === l.DownloadKernel.TaskStatus.Unkown || e) if (this.taskType === l.DownloadKernel.TaskType.Group) (t = yield this.getExtraObject().start(e)) && (t = this.updateTaskStatus(l.DownloadKernel.TaskStatus.StartPending)); else {
                    let e = yield this.createDownloadSdkTask();
                    i = 0 === e, t = this.updateTaskStatus(l.DownloadKernel.TaskStatus.StartPending), i || (this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ErrorCode, e), this.updateTaskStatus(l.DownloadKernel.TaskStatus.Failed), this.fireTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged), this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.ErrorCode))
                }
                return e && (t = !0), t && i
            })
        }

        startWaiting() {
            I.information("startWaiting this.taskStatus:", this.taskStatus);
            let e = !1;
            return this.taskStatus !== l.DownloadKernel.TaskStatus.Stopped && this.taskStatus !== l.DownloadKernel.TaskStatus.Failed && this.taskStatus !== l.DownloadKernel.TaskStatus.Unkown || (e = this.updateTaskStatus(l.DownloadKernel.TaskStatus.StartWaiting)), e
        }

        stop(e) {
            I.information("stop reason", e);
            let t = b.ThunderHelper.getTickCount();
            window.__performanceMap["PauseTask_" + this.taskId] = t;
            let i = !1;
            if (this.taskStatus === l.DownloadKernel.TaskStatus.StartWaiting) i = this.updateTaskStatus(l.DownloadKernel.TaskStatus.Stopped); else if (this.taskType === l.DownloadKernel.TaskType.Group) {
                let t = this.getExtraObject();
                if (i = t.stop(e)) {
                    let e = t.getTaskStatus();
                    e !== l.DownloadKernel.TaskStatus.Succeeded && e !== l.DownloadKernel.TaskStatus.Seeding && e !== l.DownloadKernel.TaskStatus.Stopped && (i = this.updateTaskStatus(l.DownloadKernel.TaskStatus.StopPending))
                }
            } else this.taskStatus !== l.DownloadKernel.TaskStatus.Succeeded && this.taskStatus !== l.DownloadKernel.TaskStatus.Seeding && this.taskStatus !== l.DownloadKernel.TaskStatus.Stopped && this.taskStatus !== l.DownloadKernel.TaskStatus.Failed && (this.virtualTaskId && this.virtualTaskId > 0 ? (i = this.updateTaskStatus(l.DownloadKernel.TaskStatus.StopPending), d.ThunderKernel.setTaskExtStat(this.virtualTaskId, -1, "stopreason", String(e)), d.ThunderKernel.stopTask(this.virtualTaskId)) : i = this.updateTaskStatus(l.DownloadKernel.TaskStatus.Stopped));
            return i && this.setStopReason(e), i
        }

        deleteFile() {
            return n(this, void 0, void 0, function* () {
                I.information("delete");
                let e = !1;
                return e = this.taskType === l.DownloadKernel.TaskType.Group ? yield this.getExtraObject().deleteFile() : yield this.destroy()
            })
        }

        commit() {
        }

        updateTaskStatus(e) {
            let t = !1;
            return this.taskStatus !== e && (this.taskStatus === l.DownloadKernel.TaskStatus.StartPending ? e === l.DownloadKernel.TaskStatus.Stopped || (this.preStatus = this.taskStatus, this.taskStatus = e, t = !0) : this.taskStatus === l.DownloadKernel.TaskStatus.StopPending ? e === l.DownloadKernel.TaskStatus.Started || (this.preStatus = this.taskStatus, this.taskStatus = e, t = !0) : (this.taskStatus === l.DownloadKernel.TaskStatus.Succeeded || this.taskStatus === l.DownloadKernel.TaskStatus.Seeding) && e !== l.DownloadKernel.TaskStatus.Stopped && e !== l.DownloadKernel.TaskStatus.DestroyPending || (this.preStatus = this.taskStatus, this.taskStatus = e, t = !0)), e !== l.DownloadKernel.TaskStatus.Started && (this.speed = 0, this.vipSpeed = 0, this.downloadSizeList = [], this.vipSizeList = []), t && (this.startTime = 0, this.downloadingPeriod = this.attribute.get(l.DownloadKernel.TaskAttribute.DownloadingPeriod), this.taskStatus !== l.DownloadKernel.TaskStatus.DestroyPending && this.saveTaskInfo(this.taskId, p.StatementType.SetTaskStatus, p.ValueType.ValueInt, this.taskStatus)), t
        }

        createP2spTask(e, t, i, n) {
            return this.taskId = d.ThunderKernel.createTaskId(), this.taskType = l.DownloadKernel.TaskType.P2sp, this.attribute.set(l.DownloadKernel.TaskAttribute.TaskId, this.taskId), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskType, this.taskType), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskUrl, i.url || ""), this.attribute.set(l.DownloadKernel.TaskAttribute.RefUrl, i.refUrl), this.attribute.set(l.DownloadKernel.TaskAttribute.Origin, i.origin), this.attribute.set(l.DownloadKernel.TaskAttribute.Cookie, i.cookie), this.attribute.set(l.DownloadKernel.TaskAttribute.SavePath, t.savePath), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskName, t.taskName), this.attribute.set(l.DownloadKernel.TaskAttribute.Description, t.description), this.attribute.set(l.DownloadKernel.TaskAttribute.OpenOnComplete, t.openOnComplete), t.productInfo && this.attribute.set(l.DownloadKernel.TaskAttribute.ProductInfo, t.productInfo), t.origin && this.attribute.set(l.DownloadKernel.TaskAttribute.Origin, t.origin), t.groupTaskId && this.attribute.set(l.DownloadKernel.TaskAttribute.GroupTaskId, t.groupTaskId), 1 === i.downloadSubTask && this.attribute.set(l.DownloadKernel.TaskAttribute.DownloadSubTask, 1), r.isNumber(n) && this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryId, n), t.fileSize && this.attribute.set(l.DownloadKernel.TaskAttribute.FileSize, t.fileSize), t.gcid && this.attribute.set(l.DownloadKernel.TaskAttribute.Gcid, t.gcid), t.cid && this.attribute.set(l.DownloadKernel.TaskAttribute.Cid, t.cid), e ? (this.isBackground = e, this.attribute.set(l.DownloadKernel.TaskAttribute.Background, e)) : this.insertStorageTaskBase(), this.taskExtra = new u.P2spTask(this, !e, i.useOriginResourceOnly, i.originResourceThreadCount, i.nameFixed || 0), this.taskId
        }

        createBtTask(e, t, i, a) {
            return n(this, void 0, void 0, function* () {
                this.taskId = d.ThunderKernel.createTaskId(), this.taskType = l.DownloadKernel.TaskType.Bt, t.taskName || (t.taskName = i.displayName), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskId, this.taskId), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskType, this.taskType), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskUrl, i.originUrl), this.attribute.set(l.DownloadKernel.TaskAttribute.RefUrl, i.refUrl), this.attribute.set(l.DownloadKernel.TaskAttribute.SavePath, t.savePath), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskName, t.taskName), this.attribute.set(l.DownloadKernel.TaskAttribute.Description, t.description), this.attribute.set(l.DownloadKernel.TaskAttribute.OpenOnComplete, t.openOnComplete), t.productInfo && this.attribute.set(l.DownloadKernel.TaskAttribute.ProductInfo, t.productInfo), t.origin && this.attribute.set(l.DownloadKernel.TaskAttribute.Origin, t.origin), r.isNumber(a) && this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryId, a);
                let n = o.join(__profilesDir, "Torrents"), u = yield s.FileSystemAWNS.existsAW(n);
                u || (yield s.FileSystemAWNS.mkdirsAW(n));
                let h = i.infoId + ".torrent", f = o.join(n, h);
                yield s.FileSystemAWNS.copyFileAW(i.seedFile, f), (u = yield s.FileSystemAWNS.existsAW(f)) && (i.seedFile = f), e ? (this.isBackground = e, this.attribute.set(l.DownloadKernel.TaskAttribute.Background, e)) : this.insertStorageTaskBase(), this.taskExtra = new c.BtTask(this, !e, i);
                let p = this.getExtraObject().getFileSize();
                this.attribute.set(l.DownloadKernel.TaskAttribute.FileSize, p), this.saveAttribute(l.DownloadKernel.TaskAttribute.FileSize, p)
            })
        }

        createEmuleTask(e, t, i, n) {
            if (this.taskId = d.ThunderKernel.createTaskId(), this.taskType = l.DownloadKernel.TaskType.Emule, this.attribute.set(l.DownloadKernel.TaskAttribute.TaskId, this.taskId), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskType, this.taskType), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskUrl, i.url), this.attribute.set(l.DownloadKernel.TaskAttribute.Origin, i.origin), this.attribute.set(l.DownloadKernel.TaskAttribute.SavePath, t.savePath), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskName, t.taskName), this.attribute.set(l.DownloadKernel.TaskAttribute.Description, t.description), this.attribute.set(l.DownloadKernel.TaskAttribute.OpenOnComplete, t.openOnComplete), t.productInfo && this.attribute.set(l.DownloadKernel.TaskAttribute.ProductInfo, t.productInfo), t.origin && this.attribute.set(l.DownloadKernel.TaskAttribute.Origin, t.origin), t.groupTaskId && this.attribute.set(l.DownloadKernel.TaskAttribute.GroupTaskId, t.groupTaskId), 1 === i.downloadSubTask && this.attribute.set(l.DownloadKernel.TaskAttribute.DownloadSubTask, 1), r.isNumber(n) && this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryId, n), t.fileSize) this.attribute.set(l.DownloadKernel.TaskAttribute.FileSize, t.fileSize); else {
                let e = m.Common.parseEd2kUrl(i.url);
                e && e.fileSize && this.attribute.set(l.DownloadKernel.TaskAttribute.FileSize, e.fileSize)
            }
            return t.gcid && this.attribute.set(l.DownloadKernel.TaskAttribute.Gcid, t.gcid), t.cid && this.attribute.set(l.DownloadKernel.TaskAttribute.Cid, t.cid), e ? (this.isBackground = e, this.attribute.set(l.DownloadKernel.TaskAttribute.Background, e)) : this.insertStorageTaskBase(), this.taskExtra = new h.EmuleTask(this, !e), this.taskId
        }

        createGroupTask(e, t, i, n) {
            this.taskId = d.ThunderKernel.createTaskId(), this.taskType = l.DownloadKernel.TaskType.Group, this.attribute.set(l.DownloadKernel.TaskAttribute.TaskId, this.taskId), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskType, this.taskType), this.attribute.set(l.DownloadKernel.TaskAttribute.SavePath, t.savePath), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskName, t.taskName), this.attribute.set(l.DownloadKernel.TaskAttribute.Description, t.description), this.attribute.set(l.DownloadKernel.TaskAttribute.OpenOnComplete, t.openOnComplete), t.productInfo && this.attribute.set(l.DownloadKernel.TaskAttribute.ProductInfo, t.productInfo), t.origin && this.attribute.set(l.DownloadKernel.TaskAttribute.Origin, t.origin), r.isNumber(n) && this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryId, n);
            let o = 0;
            for (let e = 0; e < i.subTaskList.length; ++e) {
                let t = i.subTaskList[e].taskBaseInfo.fileSize;
                t && (o += t)
            }
            return o && this.attribute.set(l.DownloadKernel.TaskAttribute.FileSize, o), e ? (this.isBackground = e, this.attribute.set(l.DownloadKernel.TaskAttribute.Background, e)) : this.insertStorageTaskBase(), this.taskExtra = new f.GroupTask(this, !e), this.taskId
        }

        createMagnetTask(e, t, i, n) {
            return this.taskId = d.ThunderKernel.createTaskId(), this.taskType = l.DownloadKernel.TaskType.Magnet, this.attribute.set(l.DownloadKernel.TaskAttribute.TaskId, this.taskId), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskType, this.taskType), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskUrl, i.url), this.attribute.set(l.DownloadKernel.TaskAttribute.SavePath, i.torrentFilePath), this.attribute.set(l.DownloadKernel.TaskAttribute.Description, t.description), this.attribute.set(l.DownloadKernel.TaskAttribute.OpenOnComplete, t.openOnComplete), t.productInfo && this.attribute.set(l.DownloadKernel.TaskAttribute.ProductInfo, t.productInfo), t.origin && this.attribute.set(l.DownloadKernel.TaskAttribute.Origin, t.origin), r.isNumber(n) && this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryId, n), e ? (this.isBackground = e, this.attribute.set(l.DownloadKernel.TaskAttribute.Background, e)) : this.insertStorageTaskBase(), this.taskId
        }

        loadStorageP2spTask(e) {
            this.setTaskBaseInfo(e), this.taskExtra = new u.P2spTask(this, !1, 0, 5, 0)
        }

        loadStorageBtTask(e) {
            this.setTaskBaseInfo(e), this.taskExtra = new c.BtTask(this, !1, null), this.taskExtra.loadBtTask(e => {
                if (e) {
                    let t = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName);
                    void 0 !== t && "" !== t || void 0 !== e.displayName && this.attribute.set(l.DownloadKernel.TaskAttribute.TaskName, e.displayName)
                }
                S.fireTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileLoaded, this.taskId, []), S.fireTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.taskId, [])
            })
        }

        loadStorageBtTaskAW(e) {
            return new Promise(t => n(this, void 0, void 0, function* () {
                this.setTaskBaseInfo(e), this.taskExtra = new c.BtTask(this, !1, null), this.getExtraObject().loadBtTask(e => {
                    if (e) {
                        let t = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName);
                        void 0 !== t && "" !== t || void 0 !== e.displayName && this.attribute.set(l.DownloadKernel.TaskAttribute.TaskName, e.displayName)
                    }
                    S.fireTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.taskId, []), t()
                })
            }))
        }

        loadStorageEmuleTask(e) {
            this.setTaskBaseInfo(e), this.taskExtra = new h.EmuleTask(this, !1)
        }

        loadStorageGroupTask(e) {
            this.setTaskBaseInfo(e), this.taskExtra = new f.GroupTask(this, !1)
        }

        updateTaskSavePath(e) {
            this.setTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath, e)
        }

        updateTaskRelativePath(e) {
            this.setTaskAttribute(l.DownloadKernel.TaskAttribute.RelativePath, e)
        }

        updateTaskName(e) {
            this.setTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName, e)
        }

        updateDownloadSubTask(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSubTask, e)
        }

        queryTaskInfo(e, t, i) {
            let n = !1;
            switch (this.taskType) {
                case l.DownloadKernel.TaskType.P2sp:
                    n = this.queryP2spTaskInfo(e, t, i);
                    break;
                case l.DownloadKernel.TaskType.Bt:
                    n = this.queryBtTaskInfo(e, t, i);
                    break;
                case l.DownloadKernel.TaskType.Emule:
                    n = this.queryEmuleTaskInfo(e, t, i);
                    break;
                case l.DownloadKernel.TaskType.Group:
                    n = this.queryGroupTaskInfo(e, t, i);
                    break;
                case l.DownloadKernel.TaskType.Magnet:
                    n = this.queryMagnetTaskInfo(e, t, i)
            }
            return n
        }

        updateTaskInfo(e, t, i) {
            let n = 0, o = l.DownloadKernel.TaskDetailChangedFlags.UnKnown, a = 0, r = 0;
            if (this.attribute.get(l.DownloadKernel.TaskAttribute.ErrorCode) === l.DownloadKernel.TaskError.DownloadSDKCrash) return n;
            if (0 === e.virtualId) return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ErrorCode, e.taskError) && (o |= l.DownloadKernel.TaskDetailChangedFlags.ErrorCode), this.updateTaskStatus(l.DownloadKernel.TaskStatus.Failed), n |= 1, t(this), n |= 2, this.detailChangedFlags = o, i(this, o), n;
            if (void 0 !== e.originalName && "" !== e.originalName && this.setTaskAttribute(l.DownloadKernel.TaskAttribute.OriginName, e.originalName) && (o |= l.DownloadKernel.TaskDetailChangedFlags.OriginName), void 0 !== e.httpContentType && "" !== e.httpContentType && this.setTaskAttribute(l.DownloadKernel.TaskAttribute.HTTPContentType, e.httpContentType) && (o |= l.DownloadKernel.TaskDetailChangedFlags.HTTPContentType), void 0 !== e.finalName && "" !== e.finalName && this.setTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName, e.finalName) && (o |= l.DownloadKernel.TaskDetailChangedFlags.TaskName), o |= this.updateDownloadSpeed(e.downloadSize), e.downloadSize) {
                let t = this.getTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSize);
                this.getTaskAttribute(l.DownloadKernel.TaskAttribute.FileSize) === e.fileSize && t > e.downloadSize || (a = e.downloadSize - t, this.setTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSize, e.downloadSize) && (o |= l.DownloadKernel.TaskDetailChangedFlags.DownloadSize))
            }
            if (this.setTaskAttribute(l.DownloadKernel.TaskAttribute.RealDownloadSize, e.downloadSize), "number" == typeof e.validDownloadSize) {
                let t = this.getTaskAttribute(l.DownloadKernel.TaskAttribute.ValidDownloadSize);
                r = e.validDownloadSize - t, t !== e.validDownloadSize && (this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ValidDownloadSize, e.validDownloadSize), o |= l.DownloadKernel.TaskDetailChangedFlags.ValidDownloadSize)
            } else if ("number" == typeof e.downloadSize) {
                let t = this.getTaskAttribute(l.DownloadKernel.TaskAttribute.ValidDownloadSize);
                r = e.downloadSize - t, I.information("use download size to set valid size", this.getId()), this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ValidDownloadSize, e.downloadSize)
            } else {
                let e = this.getTaskAttribute(l.DownloadKernel.TaskAttribute.ValidDownloadSize);
                e ? I.information("use old valid size. ", e, this.getId()) : (this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ValidDownloadSize, 0), I.information("no download size and valid size, set it to 0", this.getId()))
            }
            e.receivedSize && this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ReceivedSize, e.receivedSize) && (o |= l.DownloadKernel.TaskDetailChangedFlags.ReceivedSize), e.fileSize && this.setTaskAttribute(l.DownloadKernel.TaskAttribute.FileSize, e.fileSize) && (o |= l.DownloadKernel.TaskDetailChangedFlags.FileSize), this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ErrorCode, e.taskError) && (o |= l.DownloadKernel.TaskDetailChangedFlags.ErrorCode), e.cid && "" !== e.cid && this.updateCid(e.cid) && (o |= l.DownloadKernel.TaskDetailChangedFlags.Cid), e.gcid && "" !== e.gcid && this.updateGcid(e.gcid) && (o |= l.DownloadKernel.TaskDetailChangedFlags.Gcid), "number" == typeof e.srcTotal && this.setTaskAttribute(l.DownloadKernel.TaskAttribute.SrcTotal, e.srcTotal) && (o |= l.DownloadKernel.TaskDetailChangedFlags.SrcTotal), "number" == typeof e.srcUsing && this.setTaskAttribute(l.DownloadKernel.TaskAttribute.SrcUsing, e.srcUsing) && (o |= l.DownloadKernel.TaskDetailChangedFlags.SrcUsing), e.taskStatus !== A.Error || e.taskError !== l.DownloadKernel.TaskError.FileCreate ? this.setTaskAttribute(l.DownloadKernel.TaskAttribute.FileCreated, 1) : this.setTaskAttribute(l.DownloadKernel.TaskAttribute.FileCreated, 0);
            let s = this.changeToDownloadKernelTaskStatus(e.taskStatus), d = this.updateTaskStatus(s),
                u = e.channelInfo;
            return u && this.updateChannelInfo(u, r, a) && (o |= l.DownloadKernel.TaskDetailChangedFlags.ChannelInfo), d && (n |= 1, t(this)), this.detailChangedFlags = o, o !== l.DownloadKernel.TaskDetailChangedFlags.UnKnown && (n |= 2, i(this, o)), "number" == typeof e.totalAvailablePeer && (this.nTotalAvailablePeer = e.totalAvailablePeer), n
        }

        updateCid(e) {
            let t = !1, i = this.attribute.get(l.DownloadKernel.TaskAttribute.Cid);
            return i && "" !== i || (i !== e && (this.saveAttribute(l.DownloadKernel.TaskAttribute.Cid, e), t = !0), "0000000000000000000000000000000000000000" === e ? this.attribute.set(l.DownloadKernel.TaskAttribute.Cid, "") : this.attribute.set(l.DownloadKernel.TaskAttribute.Cid, e)), t
        }

        updateGcid(e) {
            let t = !1, i = this.attribute.get(l.DownloadKernel.TaskAttribute.Gcid);
            return i && "" !== i || (i !== e && (this.saveAttribute(l.DownloadKernel.TaskAttribute.Gcid, e), t = !0), "0000000000000000000000000000000000000000" === e ? this.attribute.set(l.DownloadKernel.TaskAttribute.Gcid, "") : this.attribute.set(l.DownloadKernel.TaskAttribute.Gcid, e)), t
        }

        onFinish() {
            let e = this.updateTaskStatus(l.DownloadKernel.TaskStatus.Succeeded);
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.CompletionTime, (new Date).getTime()), this.virtualTaskId > 0 && (d.ThunderKernel.deleteTask(this.virtualTaskId), this.virtualTaskId = 0, this.attribute.set(l.DownloadKernel.TaskAttribute.VirtualId, this.virtualTaskId)), e
        }

        onStop() {
            let e = !1;
            return this.virtualTaskId > 0 && (this.isCreating ? I.warning("onStop when creating", this.virtualTaskId, this.taskId, this.getTaskName()) : (e = this.updateTaskStatus(l.DownloadKernel.TaskStatus.Stopped), d.ThunderKernel.deleteTask(this.virtualTaskId), this.virtualTaskId = 0, this.attribute.set(l.DownloadKernel.TaskAttribute.VirtualId, this.virtualTaskId))), e
        }

        onFail() {
            let e = this.updateTaskStatus(l.DownloadKernel.TaskStatus.Failed);
            return this.virtualTaskId > 0 && (d.ThunderKernel.deleteTask(this.virtualTaskId), this.virtualTaskId = 0, this.attribute.set(l.DownloadKernel.TaskAttribute.VirtualId, this.virtualTaskId)), e
        }

        moveToRecycle() {
            let e = (new Date).getTime();
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.RecycleTime, e)
        }

        recover() {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.RecycleTime, 0)
        }

        destroy() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                switch (this.taskType) {
                    case l.DownloadKernel.TaskType.P2sp:
                        e = yield this.deleteP2spTaskFile();
                        break;
                    case l.DownloadKernel.TaskType.Bt:
                        e = yield this.deleteBtTaskFile();
                        break;
                    case l.DownloadKernel.TaskType.Emule:
                        e = yield this.deleteEmuleTaskFile();
                        break;
                    case l.DownloadKernel.TaskType.Group:
                        e = yield this.deleteGroupTaskFile()
                }
                return e
            })
        }

        setSavePath(e) {
            this.taskStatus !== l.DownloadKernel.TaskStatus.StartPending && this.taskStatus !== l.DownloadKernel.TaskStatus.Started && this.setTaskAttribute(l.DownloadKernel.TaskAttribute.SavePath, e)
        }

        setCategoryViewId(e) {
            this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryViewId, e)
        }

        getIsPrivate() {
            let e = this.attribute.get(l.DownloadKernel.TaskAttribute.CategoryId);
            return !!(void 0 !== e && e > -1 && _.isPrivateCategory(e))
        }

        getUserName() {
            let e = this.attribute.get(l.DownloadKernel.TaskAttribute.CategoryId);
            if (void 0 !== e && e > -1) {
                let t = _.getCategoryFromId(e);
                if (t) return t.getUserName()
            }
            return ""
        }

        setCategoryId(e) {
            this.isBackground || (this.setTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryId, e), d.ThunderKernel.setCategoryId(e, this.taskId))
        }

        getTaskName() {
            return this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName)
        }

        getSavePath() {
            return this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath)
        }

        fireTaskDetailChanged(e) {
            this.detailChangedFlags = e;
            let t = this.attribute.get(l.DownloadKernel.TaskAttribute.GroupTaskId);
            if (t > 0) {
                let e = new Map;
                e.set(t, [this]), S.fireTaskEvent(l.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, e)
            } else this.fireTaskEvent(l.DownloadKernel.TaskEventType.DetailChanged, e)
        }

        getVirtualTaskId() {
            return this.virtualTaskId
        }

        setStopReason(e) {
            this.taskStatusChangedReason = e
        }

        getStopReason() {
            return this.taskStatusChangedReason
        }

        internalSetTaskSpeed(e, t) {
            let i = !1;
            return e = Math.round(e), t = Math.round(t), this.speed !== e && (i = !0, this.speed = e), this.vipSpeed !== t && (i = !0, this.vipSpeed = t), i
        }

        internalSetFileSize(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.FileSize, e)
        }

        internalSetGcid(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.Gcid, e)
        }

        internalSetDownloadingPeriod(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadingPeriod, e)
        }

        internalSetDownloadSize(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSize, e)
        }

        internalSetReceivedSize(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ReceivedSize, e)
        }

        internalSetSrcUsing(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.SrcUsing, e)
        }

        internalSetSrcTotal(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.SrcTotal, e)
        }

        internalSetFileIndex(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.FileIndex, e)
        }

        internalSetTaskChannelInfo(e) {
            return (this.channelInfo.originSize !== e.originSize || this.channelInfo.p2sSize !== e.p2sSize || this.channelInfo.p2pSize !== e.p2pSize || this.channelInfo.offlineSize !== e.offlineSize || this.channelInfo.dcdnSize !== e.dcdnSize || this.channelInfo.dcdnStatus !== e.dcdnStatus) && (this.channelInfo = e, this.taskType === l.DownloadKernel.TaskType.Group && (this.historyChannelInfo = {
                originSize: 0,
                p2pSize: 0,
                p2sSize: 0,
                offlineSize: 0,
                dcdnSize: 0
            }), d.ThunderKernel.saveTaskChannelInfo(this.taskId, e.originSize, e.p2pSize, e.p2sSize, e.offlineSize, e.dcdnSize), !0)
        }

        internalSetTotalDownloadSize(e) {
            return this.setTaskAttribute(l.DownloadKernel.TaskAttribute.TotalDownloadSize, e)
        }

        setFileSize(e) {
            let t = this.internalSetFileSize(e);
            return t && (this.batchSetTaskAttribute ? this.batchDetailChangedFlags |= l.DownloadKernel.TaskDetailChangedFlags.FileSize : this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.FileSize)), t
        }

        setGcid(e) {
            I.information("setGcid", e, this.taskId);
            let t = this.internalSetGcid(e);
            return t && (this.batchSetTaskAttribute ? this.batchDetailChangedFlags |= l.DownloadKernel.TaskDetailChangedFlags.Gcid : this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.Gcid)), t
        }

        setDownloadingPeriod(e) {
            let t = this.setTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadingPeriod, e);
            return t && (this.batchSetTaskAttribute ? this.batchDetailChangedFlags |= l.DownloadKernel.TaskDetailChangedFlags.DownloadingPeriod : this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.DownloadingPeriod)), t
        }

        setDownloadSize(e) {
            let t = this.setTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSize, e);
            return t && (this.batchSetTaskAttribute ? this.batchDetailChangedFlags |= l.DownloadKernel.TaskDetailChangedFlags.DownloadSize : this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.DownloadSize)), t
        }

        setPlayPosition(e) {
            let t = this.setTaskAttribute(l.DownloadKernel.TaskAttribute.PlayPosition, e);
            return t && (this.batchSetTaskAttribute ? this.batchDetailChangedFlags |= l.DownloadKernel.TaskDetailChangedFlags.PlayPosition : this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.PlayPosition)), t
        }

        setDuration(e) {
            let t = this.setTaskAttribute(l.DownloadKernel.TaskAttribute.Duration, e);
            return t && (this.batchSetTaskAttribute ? this.batchDetailChangedFlags |= l.DownloadKernel.TaskDetailChangedFlags.Duration : this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.Duration)), t
        }

        addServer(e, t) {
            I.information("addServer fileIndex:", e, "serverResourceInfo:", t);
            let i = this.serverResourceInfos.get(e);
            i ? (I.information("update serverinfo", i, t), Object.assign(i, t)) : this.serverResourceInfos.set(e, t), this.virtualTaskId && this.virtualTaskId > 0 && d.ThunderKernel.addServer(this.virtualTaskId, e, t)
        }

        discardServer(e, t) {
            this.serverResourceInfos.delete(e), this.virtualTaskId && this.virtualTaskId > 0 && d.ThunderKernel.discardServer(this.virtualTaskId, e, t)
        }

        setTaskUrl(e) {
            let t = !1;
            do {
                let i = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskUrl);
                if (i && "" !== i) break;
                this.attribute.set(l.DownloadKernel.TaskAttribute.TaskUrl, e), this.saveAttribute(l.DownloadKernel.TaskAttribute.TaskUrl, e), t = !0
            } while (0);
            return t
        }

        setReceivedSize(e) {
            let t = this.setTaskAttribute(l.DownloadKernel.TaskAttribute.ReceivedSize, e);
            return t && (this.batchSetTaskAttribute ? this.batchDetailChangedFlags |= l.DownloadKernel.TaskDetailChangedFlags.ReceivedSize : this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.ReceivedSize)), t
        }

        setSrcUsing(e) {
            let t = this.setTaskAttribute(l.DownloadKernel.TaskAttribute.SrcUsing, e);
            return t && (this.batchSetTaskAttribute ? this.batchDetailChangedFlags |= l.DownloadKernel.TaskDetailChangedFlags.SrcUsing : this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.SrcUsing)), t
        }

        setSrcTotal(e) {
            let t = this.setTaskAttribute(l.DownloadKernel.TaskAttribute.SrcTotal, e);
            return t && (this.batchSetTaskAttribute ? this.batchDetailChangedFlags |= l.DownloadKernel.TaskDetailChangedFlags.SrcTotal : this.fireTaskDetailChanged(l.DownloadKernel.TaskDetailChangedFlags.SrcTotal)), t
        }

        beginBatchSetTaskAttribute() {
            I.information("beginBatchSetTaskAttribute taskId:", this.taskId), this.batchSetTaskAttribute = !0
        }

        commitBatchSetTaskAttribute() {
            if (this.batchSetTaskAttribute && (this.batchSetTaskAttribute = !1, I.information("commitBatchSetTaskAttribute taskId:", this.taskId), this.batchDetailChangedFlags !== l.DownloadKernel.TaskDetailChangedFlags.UnKnown)) {
                let e = this.batchDetailChangedFlags;
                this.batchDetailChangedFlags = l.DownloadKernel.TaskDetailChangedFlags.UnKnown, this.fireTaskDetailChanged(e)
            }
        }

        createDownloadSdkTask() {
            return n(this, void 0, void 0, function* () {
                this.isCreating = !1;
                let e = 0;
                switch (this.taskType) {
                    case l.DownloadKernel.TaskType.P2sp: {
                        let t = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskUrl),
                            i = this.attribute.get(l.DownloadKernel.TaskAttribute.RefUrl),
                            n = this.attribute.get(l.DownloadKernel.TaskAttribute.Cookie),
                            o = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath),
                            a = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName);
                        this.isCreating = !0, e = yield new Promise(e => {
                            this.virtualTaskId = d.ThunderKernel.createP2spTask(t, i, n, o, a, t => {
                                I.information("createP2spTask result:", t), e(t)
                            }), this.virtualTaskId <= 0 && e(-1)
                        }), this.isCreating = !1, I.information("createP2spTask virtualTaskId:", this.virtualTaskId, ", ret:", e, ", url:", t, ", refUrl: ", i, ", cookie:", n, ", savePath:", o, ", fileName:", a)
                    }
                        break;
                    case l.DownloadKernel.TaskType.Bt: {
                        let t = this.getExtraObject(), i = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath),
                            n = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName);
                        (yield T.SingleBtTaskNS.isSingleBtTask(this)) || 1 === t.getFileCount() && (yield T.SingleBtTaskNS.getCorrectSingleBtFolder(this)) || (i = o.join(i, n)), t.isBtFileLoadEnd() || (yield this.loadStorageBtTaskAW(this.getTaskBaseInfo()));
                        let a = t.getSeedFilePath();
                        if (!(yield s.FileSystemAWNS.existsAW(a))) {
                            this.attribute.set(l.DownloadKernel.TaskAttribute.ErrorCode, l.DownloadKernel.TaskError.torrentFileNotExist);
                            break
                        }
                        let r = t.getDownloadFile();
                        this.isCreating = !0, e = yield new Promise(e => {
                            this.virtualTaskId = d.ThunderKernel.createBtTask(a, i, r, t => {
                                I.information("createP2spTask result:", t), e(t)
                            }), this.virtualTaskId <= 0 && e(-1)
                        }), this.isCreating = !1, I.information("createBtTask virtualTaskId:", this.virtualTaskId, ", ret:", e, ", torrentFilePath:", a, ", savePath: ", i, ", downloadIndexs:", r)
                    }
                        break;
                    case l.DownloadKernel.TaskType.Emule: {
                        let t = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskUrl),
                            i = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath),
                            n = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName);
                        this.isCreating = !0, e = yield new Promise(e => {
                            this.virtualTaskId = d.ThunderKernel.createEmuleTask(t, i, n, t => {
                                I.information("createP2spTask result:", t), e(t)
                            }), this.virtualTaskId <= 0 && e(-1)
                        }), this.isCreating = !1, I.information("createEmuleTask virtualTaskId:", this.virtualTaskId, ", ret:", e, ", url:", t, ", savePath: ", i, ", fileName:", n)
                    }
                        break;
                    case l.DownloadKernel.TaskType.Magnet: {
                        let t = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskUrl),
                            i = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath);
                        this.isCreating = !0, e = yield new Promise(e => {
                            this.virtualTaskId = d.ThunderKernel.createMagnetTask(t, i, t => {
                                I.information("createP2spTask result:", t), e(t)
                            }), this.virtualTaskId <= 0 && e(-1)
                        }), this.isCreating = !1, I.information("createMagnetTask virtualTaskId:", this.virtualTaskId, ", ret:", e, ", url:", t, ", savePath: ", i)
                    }
                }
                return I.information("createDownloadSdkTask virtualTaskId:", this.virtualTaskId), this.attribute.set(l.DownloadKernel.TaskAttribute.VirtualId, this.virtualTaskId), this.setStartInfo(), e
            })
        }

        setStatusAndErrorCode(e, t) {
            this.taskStatus = e, this.attribute.set(l.DownloadKernel.TaskAttribute.ErrorCode, t)
        }

        setStartInfo() {
            if (this.virtualTaskId && this.virtualTaskId > 0) {
                if (this.taskType === l.DownloadKernel.TaskType.P2sp) {
                    let e = this.getExtraObject(), t = e.getThreadCount();
                    void 0 !== this.originOnlyStrategy && e.setUseOriginOnly(this.originOnlyStrategy), 1 === this.originOnlyStrategy ? d.ThunderKernel.setTaskStrategy(this.virtualTaskId, 1) : void 0 !== this.dispatchStrategy && d.ThunderKernel.setTaskStrategy(this.virtualTaskId, this.dispatchStrategy), void 0 !== this.originThreadCount ? d.ThunderKernel.setTaskThreadCount(this.virtualTaskId, this.originThreadCount) : d.ThunderKernel.setTaskThreadCount(this.virtualTaskId, t)
                } else if (void 0 !== this.dispatchStrategy && d.ThunderKernel.setTaskStrategy(this.virtualTaskId, this.dispatchStrategy), this.taskType === l.DownloadKernel.TaskType.Bt) {
                    let e = y.BTExtraTrackNS.getExtraTracks();
                    e.length > 0 && d.ThunderKernel.setBTExtraTrackers(this.virtualTaskId, e)
                }
                this.setTaskExtInfoBeforeStart(), this.addHttpHeaderFieldBeforeStart(), this.setupNetDiskFetchTaskFlagBeforeStart(), this.taskExtra && this.taskExtra.setTaskPriorityLevel(-1), this.serverResourceInfos.forEach((e, t) => {
                    d.ThunderKernel.addServer(this.virtualTaskId, t, e)
                }), this.downloadStrategy !== l.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_NORMALDOWNLOAD && (d.ThunderKernel.setDownloadStrategy(this.virtualTaskId, this.downloadStrategy), this.downloadStrategy = l.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_NORMALDOWNLOAD), d.ThunderKernel.startTask(this.virtualTaskId), void 0 !== this.vipCert && d.ThunderKernel.enableDcdnWithVipCert(this.virtualTaskId, this.dcdnFileIndex, this.vipCert)
            } else I.warning("setStartInfo failed! virtualTaskId:", this.virtualTaskId)
        }

        queryP2spTaskInfo(e, t, i) {
            let n = !1;
            return this.virtualTaskId && this.virtualTaskId > 0 && (n = d.ThunderKernel.queryTaskInfo(this.virtualTaskId, n => {
                null !== n && this.updateTaskInfo(n, e, t), i()
            })), n
        }

        queryBtTaskInfo(e, t, i) {
            let n = !1;
            if (this.virtualTaskId && this.virtualTaskId > 0) n = d.ThunderKernel.queryBtTaskInfo(this.virtualTaskId, n => {
                null !== n && (this.updateTaskInfo(n, e, t), this.getExtraObject().updateSubFileInfo(n.fileLists)), i()
            }); else if (0 === this.virtualTaskId && this.attribute.get(l.DownloadKernel.TaskAttribute.ErrorCode) === l.DownloadKernel.TaskError.torrentFileNotExist) {
                let n = {virtualId: 0, taskError: l.DownloadKernel.TaskError.torrentFileNotExist};
                this.updateTaskInfo(n, e, t), i()
            }
            return n
        }

        queryEmuleTaskInfo(e, t, i) {
            let n = !1;
            return this.virtualTaskId && this.virtualTaskId > 0 && (n = d.ThunderKernel.queryTaskInfo(this.virtualTaskId, n => {
                null !== n && this.updateTaskInfo(n, e, t), i()
            })), n
        }

        queryGroupTaskInfo(e, t, i) {
            let n = !1;
            return this.taskExtra && (n = this.getExtraObject().querySubTaskInfo(e, t, i)), n
        }

        queryMagnetTaskInfo(e, t, i) {
            let n = !1;
            return this.virtualTaskId && this.virtualTaskId > 0 && (n = d.ThunderKernel.queryTaskInfo(this.virtualTaskId, n => {
                null !== n && this.updateTaskInfo(n, e, t), i()
            })), n
        }

        setTaskBaseInfo(e) {
            e && (this.taskId = e.taskId, this.taskType = e.taskType, this.taskStatus = e.taskStatus, this.attribute.set(l.DownloadKernel.TaskAttribute.TaskId, e.taskId), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskType, e.taskType), this.attribute.set(l.DownloadKernel.TaskAttribute.FileCreated, e.fileCreated), this.attribute.set(l.DownloadKernel.TaskAttribute.RecycleTime, e.recycleTime), this.attribute.set(l.DownloadKernel.TaskAttribute.Forbidden, e.forbidden), this.attribute.set(l.DownloadKernel.TaskAttribute.FileSize, e.fileSize), this.attribute.set(l.DownloadKernel.TaskAttribute.ReceivedSize, e.receiveSize), this.attribute.set(l.DownloadKernel.TaskAttribute.DownloadSize, e.downloadSize), this.attribute.set(l.DownloadKernel.TaskAttribute.CreateTime, e.createTime), this.attribute.set(l.DownloadKernel.TaskAttribute.CompletionTime, e.completionTime), this.attribute.set(l.DownloadKernel.TaskAttribute.DownloadingPeriod, e.downloadingPeriod), this.attribute.set(l.DownloadKernel.TaskAttribute.ErrorCode, e.errorCode), this.attribute.set(l.DownloadKernel.TaskAttribute.NameType, e.nameType), this.attribute.set(l.DownloadKernel.TaskAttribute.CategoryId, e.categoryId), this.attribute.set(l.DownloadKernel.TaskAttribute.UserRead, e.userRead), this.attribute.set(l.DownloadKernel.TaskAttribute.OpenOnComplete, e.openOnComplete), this.attribute.set(l.DownloadKernel.TaskAttribute.OwnerProduct, e.ownerProduct), this.attribute.set(l.DownloadKernel.TaskAttribute.DownloadSubTask, e.downloadSubTask), this.attribute.set(l.DownloadKernel.TaskAttribute.GroupTaskId, e.groupTaskId), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskName, e.taskName), this.attribute.set(l.DownloadKernel.TaskAttribute.SavePath, e.savePath), this.attribute.set(l.DownloadKernel.TaskAttribute.TaskUrl, e.url), this.attribute.set(l.DownloadKernel.TaskAttribute.RefUrl, e.refUrl), this.attribute.set(l.DownloadKernel.TaskAttribute.Description, e.description), this.attribute.set(l.DownloadKernel.TaskAttribute.ProductInfo, e.productInfo), this.attribute.set(l.DownloadKernel.TaskAttribute.Origin, e.origin), this.attribute.set(l.DownloadKernel.TaskAttribute.UserData, e.userData), this.attribute.set(l.DownloadKernel.TaskAttribute.PlayPosition, e.playPosition), this.attribute.set(l.DownloadKernel.TaskAttribute.Duration, e.duration), "0000000000000000000000000000000000000000" === e.cid ? this.attribute.set(l.DownloadKernel.TaskAttribute.Cid, "") : this.attribute.set(l.DownloadKernel.TaskAttribute.Cid, e.cid), "0000000000000000000000000000000000000000" === e.gcid ? this.attribute.set(l.DownloadKernel.TaskAttribute.Gcid, "") : this.attribute.set(l.DownloadKernel.TaskAttribute.Gcid, e.gcid), e.channelInfo && (this.historyChannelInfo = e.channelInfo))
        }

        setTaskAttribute(e, t) {
            let i = !1;
            return this.getTaskAttribute(e) !== t && void 0 !== t && (this.attribute.set(e, t), i = !0, this.saveAttribute(e, t)), i
        }

        updateDownloadSpeed(e) {
            let t = l.DownloadKernel.TaskDetailChangedFlags.UnKnown;
            if (e) {
                let i = e - this.getTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSize);
                (0 === e || i < 0) && (i = 0);
                let n = this.calculateDownloadSpeed(i);
                (n = Math.round(n)) !== this.speed && (this.speed = n, t |= l.DownloadKernel.TaskDetailChangedFlags.TaskSpeed)
            }
            if (this.taskStatus === l.DownloadKernel.TaskStatus.Started) if (0 === this.startTime) this.startTime = (new Date).getTime(); else {
                let e = ((new Date).getTime() - this.startTime) / 1e3, i = this.downloadingPeriod + Math.round(e);
                this.saveAttribute(l.DownloadKernel.TaskAttribute.DownloadingPeriod, i), this.attribute.set(l.DownloadKernel.TaskAttribute.DownloadingPeriod, i), this.attribute.get(l.DownloadKernel.TaskAttribute.GroupTaskId) < 1 && (t |= l.DownloadKernel.TaskDetailChangedFlags.DownloadingPeriod)
            }
            return t
        }

        saveAttribute(e, t) {
            switch (e) {
                case l.DownloadKernel.TaskAttribute.TaskUrl:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskUrl, p.ValueType.ValueString, t);
                    break;
                case l.DownloadKernel.TaskAttribute.TaskName:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskName, p.ValueType.ValueString, t);
                    break;
                case l.DownloadKernel.TaskAttribute.SavePath:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskSavePath, p.ValueType.ValueString, t);
                    break;
                case l.DownloadKernel.TaskAttribute.ReceivedSize:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskReceiveSize, p.ValueType.ValueBigint, t);
                    break;
                case l.DownloadKernel.TaskAttribute.DownloadSize:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskDownloadSize, p.ValueType.ValueBigint, t);
                    break;
                case l.DownloadKernel.TaskAttribute.FileSize:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskFileSize, p.ValueType.ValueBigint, t);
                    break;
                case l.DownloadKernel.TaskAttribute.RecycleTime:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskRemovingToRecycleTime, p.ValueType.ValueBigint, t);
                    break;
                case l.DownloadKernel.TaskAttribute.FileCreated:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskFileCreated, p.ValueType.ValueInt, t);
                    break;
                case l.DownloadKernel.TaskAttribute.CompletionTime:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskCompletionTime, p.ValueType.ValueBigint, t);
                    break;
                case l.DownloadKernel.TaskAttribute.DownloadingPeriod:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskDownloadingPeriod, p.ValueType.ValueBigint, t);
                    break;
                case l.DownloadKernel.TaskAttribute.ErrorCode:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskFailureErrorCode, p.ValueType.ValueInt, t);
                    break;
                case l.DownloadKernel.TaskAttribute.Cid:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskCid, p.ValueType.ValueBlob, t);
                    break;
                case l.DownloadKernel.TaskAttribute.Gcid:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskGcid, p.ValueType.ValueBlob, t);
                    break;
                case l.DownloadKernel.TaskAttribute.DownloadSubTask:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskDownload, p.ValueType.ValueInt, t);
                    break;
                case l.DownloadKernel.TaskAttribute.PlayPosition:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskPlayPosition, p.ValueType.ValueInt, t);
                    break;
                case l.DownloadKernel.TaskAttribute.Duration:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetTaskDuration, p.ValueType.ValueInt, t);
                    break;
                case l.DownloadKernel.TaskAttribute.YunTaskId:
                    this.saveTaskInfo(this.taskId, p.StatementType.SetYunTaskId, p.ValueType.ValueString, t)
            }
        }

        insertStorageTaskBase() {
            let e = this.getTaskBaseInfo();
            d.ThunderKernel.insertTaskBase(e)
        }

        deleteStorageTask() {
            d.ThunderKernel.deleteStorageTask(this.taskId, p.StatementType.DestroyTaskBase);
            let e = p.StatementType.StatementBengin;
            switch (this.taskType) {
                case l.DownloadKernel.TaskType.P2sp:
                    e = p.StatementType.DestroyP2spTask;
                    break;
                case l.DownloadKernel.TaskType.Bt:
                    e = p.StatementType.DestroyBtTask, this.getExtraObject().deleteStorageBtFile();
                    break;
                case l.DownloadKernel.TaskType.Emule:
                    e = p.StatementType.DestroyEmuleTask;
                    break;
                case l.DownloadKernel.TaskType.Group:
                    e = p.StatementType.DestroyGroupTask, this.getExtraObject().deleteStorageTask();
                    break;
                case l.DownloadKernel.TaskType.Magnet:
                    e = p.StatementType.DestroyMagnetTask
            }
            e !== p.StatementType.StatementBengin && d.ThunderKernel.deleteStorageTask(this.taskId, e)
        }

        saveTaskInfo(e, t, i, n) {
            this.isBackground || d.ThunderKernel.saveTaskBaseInfo(e, t, i, n)
        }

        shiftChannelInfo(e, t) {
            e.p2pSize += t, e.dcdnSize -= t, e.dcdnSize < 0 && (e.dcdnSize = 0, e.offlineSize -= t - e.dcdnSize, e.offlineSize = e.offlineSize > 0 ? e.offlineSize : 0)
        }

        updateChannelInfo(e, t = 0, i = 0) {
            let n = !1;
            if (this.shiftChannelInfo(e, this.shiftChannelSize), (this.channelInfo.originSize !== e.originSize || this.channelInfo.p2sSize !== e.p2sSize || this.channelInfo.p2pSize !== e.p2pSize || this.channelInfo.offlineSize !== e.offlineSize || this.channelInfo.dcdnSize !== e.dcdnSize || this.channelInfo.dcdnStatus !== e.dcdnStatus) && (n = !0, e.offlineSize > 0 || e.dcdnSize > 0)) {
                let t = e.offlineSize - this.channelInfo.offlineSize + (e.dcdnSize - this.channelInfo.dcdnSize);
                t > 0 && !this.bAcclerating && (this.shiftChannelInfo(e, t), this.shiftChannelSize += t), (t < 0 || !this.bAcclerating) && (t = 0), this.vipDownloadSizeCur += t;
                let i = this.calculateVipSpeed(t);
                i = Math.round(i), this.vipSpeed !== i && (this.vipSpeed = i)
            }
            let o = !1, a = e.dcdnStatus;
            if (this.channelInfo.dcdnStatus !== a && (o = !0), this.taskStatus === l.DownloadKernel.TaskStatus.Stopped || this.taskStatus === l.DownloadKernel.TaskStatus.Succeeded || this.taskStatus === l.DownloadKernel.TaskStatus.Seeding) {
                this.channelInfo = {
                    originSize: 0,
                    p2pSize: 0,
                    p2sSize: 0,
                    offlineSize: 0,
                    dcdnSize: 0
                }, this.shiftChannelSize = 0;
                let t = this.historyChannelInfo.originSize + e.originSize,
                    i = this.historyChannelInfo.p2pSize + e.p2pSize, n = this.historyChannelInfo.p2sSize + e.p2sSize,
                    o = this.historyChannelInfo.offlineSize + e.offlineSize,
                    a = this.historyChannelInfo.dcdnSize + e.dcdnSize;
                this.historyChannelInfo = {originSize: t, p2pSize: i, p2sSize: n, offlineSize: o, dcdnSize: a}
            } else this.channelInfo = e;
            return n && this.saveChannelInfo(), o && this.fireTaskEvent(l.DownloadKernel.TaskEventType.DcdnStatusChanged), n
        }

        saveChannelInfo() {
            let e = this.getTaskChannelInfo();
            d.ThunderKernel.saveTaskChannelInfo(this.taskId, e.originSize, e.p2pSize, e.p2sSize, e.offlineSize, e.dcdnSize)
        }

        shareDeleteFile(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    0 !== D.asynDeleteFile(e, (i, o) => n(this, void 0, void 0, function* () {
                        if (i) t(i); else {
                            let n = [200, 300, 200, 300, 500, 500, 1e3];
                            do {
                                if (yield b.ThunderHelper.sleep(n.pop()), yield s.FileSystemAWNS.unlinkAW(e)) {
                                    i = !0;
                                    break
                                }
                            } while (n.length > 0);
                            t(i)
                        }
                    })) && t(!1)
                })
            })
        }

        deleteP2spTaskFile() {
            return n(this, void 0, void 0, function* () {
                let e = !0, t = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath),
                    i = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName), n = o.join(t, i);
                if (this.taskStatus === l.DownloadKernel.TaskStatus.Succeeded || this.taskStatus === l.DownloadKernel.TaskStatus.Seeding || this.taskStatus === l.DownloadKernel.TaskStatus.DestroyPending && this.preStatus === l.DownloadKernel.TaskStatus.Succeeded || this.preStatus === l.DownloadKernel.TaskStatus.Seeding) (yield s.FileSystemAWNS.existsAW(n)) && (e = yield this.shareDeleteFile(n)); else {
                    let t = n + ".xltd", i = n + ".xltd.cfg";
                    (yield s.FileSystemAWNS.existsAW(t)) && (e = yield this.shareDeleteFile(t)), (yield s.FileSystemAWNS.existsAW(i)) && (e = (yield this.shareDeleteFile(i)) && e)
                }
                return e
            })
        }

        deleteBtTaskFile() {
            return n(this, void 0, void 0, function* () {
                function e(e, t) {
                    return n(this, void 0, void 0, function* () {
                        let i = o.normalize(o.join(t, e));
                        "\\" === (t = o.normalize(t))[t.length - 1] && (t = t.slice(0, t.length - 1));
                        let n = i;
                        for (; n !== t && (!(yield s.FileSystemAWNS.existsAW(n)) || (yield s.FileSystemAWNS.rmdirAW(n)));) n = o.dirname(n)
                    })
                }

                let t = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath),
                    i = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName),
                    a = o.join(__profilesDir, "Torrents"), r = this.getExtraObject().getInfoId(), d = r + ".xlbt.cfg",
                    u = r + ".xlbt.dat", c = r + ".torrent", h = o.join(t, i), f = o.join(a, d), p = o.join(a, u),
                    g = !0;
                if (yield T.SingleBtTaskNS.isSingleBtTask(this)) yield this.deleteSingleBtTaskFile(); else if (yield s.FileSystemAWNS.existsAW(h)) {
                    let e = o.join(h, c);
                    (yield s.FileSystemAWNS.existsAW(e)) && (g = (yield this.shareDeleteFile(e)) && g), g = (yield this.deleteBtSubFile()) && g
                } else do {
                    let i = this.getExtraObject();
                    if (1 !== i.getFileCount()) break;
                    let n = o.join(t, c);
                    (yield s.FileSystemAWNS.existsAW(n)) && (g = (yield this.shareDeleteFile(n)) && g);
                    let a = i.getBtFileList(), r = void 0, d = void 0;
                    for (let [, e]of a) {
                        r = e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FilePath), d = e.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileName);
                        break
                    }
                    if (!r || !d) break;
                    let u = o.join(t, r);
                    if (!(yield s.FileSystemAWNS.dirExistsAW(u))) break;
                    let h = o.join(u, d);
                    (yield s.FileSystemAWNS.existsAW(h)) ? g = (yield this.shareDeleteFile(h)) && g : (h += ".bt.xltd", (yield s.FileSystemAWNS.existsAW(h)) && (g = (yield this.shareDeleteFile(h)) && g)), yield e(r, t)
                } while (0);
                return (yield s.FileSystemAWNS.existsAW(f)) && (g = (yield this.shareDeleteFile(f)) && g), (yield s.FileSystemAWNS.existsAW(p)) && (g = (yield this.shareDeleteFile(p)) && g), g
            })
        }

        deleteBtSubFile() {
            return n(this, void 0, void 0, function* () {
                let e = !0, t = this.getExtraObject().getBtFileInfoList();
                if (t.length > 0) {
                    let i = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath),
                        n = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName), a = o.join(i, n), r = [a];
                    for (let i = 0; i < t.length; ++i) {
                        let n = t[i], l = o.join(a, n.filePath);
                        if (!(yield s.FileSystemAWNS.existsAW(l))) continue;
                        let d = o.join(l, n.fileName);
                        for ((yield s.FileSystemAWNS.existsAW(d)) ? e = (yield this.shareDeleteFile(d)) && e : (d += ".bt.xltd", (yield s.FileSystemAWNS.existsAW(d)) && (e = (yield this.shareDeleteFile(d)) && e)); l.length > a.length && !r.includes(l);) r = r.concat([l]), l = o.parse(l).dir
                    }
                    r.sort((e, t) => e.length > t.length ? -1 : e.length < t.length ? 1 : 0), I.information("task.deleteBtSubFile savePaths:", r);
                    for (let e = 0; e < r.length; ++e) {
                        let t = r[e];
                        (yield s.FileSystemAWNS.existsAW(t)) && (yield s.FileSystemAWNS.rmdirAW(t))
                    }
                }
                return e
            })
        }

        deleteEmuleTaskFile() {
            return n(this, void 0, void 0, function* () {
                let e = !0, t = this.attribute.get(l.DownloadKernel.TaskAttribute.SavePath),
                    i = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName), n = o.join(t, i);
                if (this.taskStatus === l.DownloadKernel.TaskStatus.Succeeded || this.taskStatus === l.DownloadKernel.TaskStatus.Seeding || this.taskStatus === l.DownloadKernel.TaskStatus.DestroyPending && this.preStatus === l.DownloadKernel.TaskStatus.Succeeded || this.preStatus === l.DownloadKernel.TaskStatus.Seeding) (yield s.FileSystemAWNS.existsAW(n)) && (e = yield this.shareDeleteFile(n)); else {
                    let t = n + ".emule.xltd", i = n + ".xlemule.cfg";
                    (yield s.FileSystemAWNS.existsAW(t)) && (e = yield this.shareDeleteFile(t)), (yield s.FileSystemAWNS.existsAW(i)) && (e = (yield this.shareDeleteFile(i)) && e)
                }
                return e
            })
        }

        deleteGroupTaskFile() {
            return n(this, void 0, void 0, function* () {
                return yield this.getExtraObject().destroy()
            })
        }

        deleteSingleBtTaskFile() {
            return n(this, void 0, void 0, function* () {
                let e = T.SingleBtTaskNS.getSinleBtTaskFilePath(this);
                if (this.preStatus !== l.DownloadKernel.TaskStatus.Failed && (yield s.FileSystemAWNS.existsAW(e))) yield this.shareDeleteFile(e); else {
                    let t = e + ".bt.xltd";
                    (yield s.FileSystemAWNS.existsAW(t)) ? yield this.shareDeleteFile(t) : (t = e + ".bt.td", yield this.shareDeleteFile(t))
                }
                let t = this.getExtraObject().getInfoId(), i = this.getSavePath(), n = t + ".torrent", a = o.join(i, n);
                yield this.shareDeleteFile(a)
            })
        }

        fireTaskEvent(e, ...t) {
            S.fireTaskEvent(e, [this], ...t)
        }

        getDetailChangedFlags() {
            return this.detailChangedFlags
        }

        isVideoFile() {
            let e = !1;
            do {
                let t = "";
                if (this.taskType === l.DownloadKernel.TaskType.P2sp || this.taskType === l.DownloadKernel.TaskType.Emule) t = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskName), e = k.TaskUtilHelper.isVideoFileExt(t); else if (this.taskType === l.DownloadKernel.TaskType.Bt) {
                    let t = this.getExtraObject();
                    if (t.getDownloadFile().length <= 0) break;
                    let i = t.getBtFileList();
                    for (let [, t]of i) {
                        let i = t.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.Download),
                            n = t.getBtFileAttribute(l.DownloadKernel.BtFileAttribute.FileName);
                        if (1 === i && (e = k.TaskUtilHelper.isVideoFileExt(n))) break
                    }
                } else if (this.taskType === l.DownloadKernel.TaskType.Group) {
                    let t = this.getExtraObject();
                    if (null !== t && void 0 !== t) {
                        let i = t.getSubTaskCount();
                        for (let n = 0; n < i; ++n) {
                            let i = t.getSubTaskByIndex(n),
                                o = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskName);
                            if (1 === i.getTaskAttribute(l.DownloadKernel.TaskAttribute.DownloadSubTask) && (e = k.TaskUtilHelper.isVideoFileExt(o))) break
                        }
                    }
                }
            } while (0);
            return e
        }

        setTaskExtInfoBeforeStart() {
            if (this.virtualTaskId > 0) {
                let e = this.attribute.get(l.DownloadKernel.TaskAttribute.TaskId),
                    t = this.attribute.get(l.DownloadKernel.TaskAttribute.Origin);
                this.attribute.get(l.DownloadKernel.TaskAttribute.Background) && (t = "background");
                let i = "parentid=" + e.toString();
                i = i + ",taskorigin=" + t, d.ThunderKernel.setTaskExtInfo(this.virtualTaskId, i)
            }
        }

        addHttpHeaderFieldBeforeStart() {
            if (this.taskType === l.DownloadKernel.TaskType.P2sp && this.virtualTaskId > 0) {
                let e = "Authorization",
                    t = this.getExtraObject().getUserData(C.TaskUserDataGUID.guidHttpHeaderField, e);
                void 0 !== t && null !== t && d.ThunderKernel.addHttpHeaderField(this.virtualTaskId, e, t)
            }
        }

        setupNetDiskFetchTaskFlagBeforeStart() {
            let e = this.attribute.get(l.DownloadKernel.TaskAttribute.CategoryId);
            do {
                if (-1 === e || _.isPrivateCategory(e)) break;
                d.ThunderKernel.setupNetDiskFetchTaskFlag(this.virtualTaskId)
            } while (0)
        }

        calculateDownloadSpeed(e) {
            this.downloadSizeList.length > 5 && this.downloadSizeList.splice(0, 1), this.downloadSizeList.push(e);
            let t = 0;
            for (let e = 0; e < this.downloadSizeList.length; ++e) t += this.downloadSizeList[e];
            let i = t / this.downloadSizeList.length;
            return this.taskStatus !== l.DownloadKernel.TaskStatus.Started && (i = 0, this.downloadSizeList = []), i
        }

        calculateVipSpeed(e) {
            this.vipSizeList.length > 5 && this.vipSizeList.splice(0, 1), this.vipSizeList.push(e);
            let t = 0;
            for (let e = 0; e < this.vipSizeList.length; ++e) t += this.vipSizeList[e];
            let i = t / this.vipSizeList.length;
            return this.taskStatus !== l.DownloadKernel.TaskStatus.Started && (i = 0, this.vipSizeList = []), i
        }

        changeToDownloadKernelTaskStatus(e) {
            let t = this.taskStatus;
            switch (e) {
                case A.None:
                case A.Create:
                case A.StartPending:
                    break;
                case A.Downloading:
                case A.StopPending:
                case A.CompletePending:
                case A.ErrorStopPending:
                    t = l.DownloadKernel.TaskStatus.Started;
                    break;
                case A.Pause:
                    t = l.DownloadKernel.TaskStatus.Stopped;
                    break;
                case A.Complete:
                    t = l.DownloadKernel.TaskStatus.Succeeded;
                    break;
                case A.Error:
                    t = l.DownloadKernel.TaskStatus.Failed;
                    break;
                default:
                    t = l.DownloadKernel.TaskStatus.Unkown
            }
            return t
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(4), o = i(32), a = i(99), r = i(124), s = i(5);
    t.P2spTask = class {
        constructor(e, t, i, l, d) {
            this.task = e, this.downloadSpeedLimit = 0, this.threadCount = l || 5, this.useOriginOnly = i || 0, s.isNumber(d) ? this.nameFixed = d : this.nameFixed = 0, this.taskId = this.task.getTaskAttribute(n.DownloadKernel.TaskAttribute.TaskId), this.cookie = this.task.getTaskAttribute(n.DownloadKernel.TaskAttribute.Cookie), this.displayUrl = this.task.getTaskAttribute(n.DownloadKernel.TaskAttribute.TaskUrl), t ? o.ThunderKernel.insertP2spTask(this.taskId, this.downloadSpeedLimit, this.nameFixed, this.useOriginOnly, this.threadCount, void 0 === this.cookie ? "" : this.cookie, this.displayUrl) : o.ThunderKernel.loadStorageTask(this.taskId, a.StatementType.LoadP2spTask, e => {
                0 !== e.taskId && (this.useOriginOnly = e.originOnly, this.threadCount = e.threadCount, this.downloadSpeedLimit = e.speedLimit, this.nameFixed = e.nameFixed, this.displayUrl = e.displayUrl, this.cookie = e.cookie, 1 === this.useOriginOnly && this.task.setDispatchStrategy(n.DownloadKernel.DispatchStrategy.DispatchStrategyOrigin))
            });
            let u = this.task.getTaskAttribute(n.DownloadKernel.TaskAttribute.UserData);
            this.userData = new r.TaskUserData(e, u)
        }

        getTask() {
            return this.task
        }

        setTaskPriorityLevel(e, t) {
            s.isNullOrUndefined(t) ? t = this.priority : this.priority = t;
            let i = this.task.getVirtualTaskId();
            i && i > 0 && !s.isNullOrUndefined(t) && o.ThunderKernel.setTaskPriorityLevel(i, e, t)
        }

        setUserData(e, t, i) {
            return this.userData.setUserData(e, t, i)
        }

        getUserData(e, t) {
            return this.userData.getUserData(e, t)
        }

        setAllUserData(e) {
            return this.userData.setAllUserData(e)
        }

        getAllUserData() {
            return this.userData.getAllUserData()
        }

        setUseOriginOnly(e) {
            e !== this.useOriginOnly && (this.useOriginOnly = e, o.ThunderKernel.setP2spTaskOriginOnly(this.taskId, e))
        }

        setOriginThreadCount(e) {
            e !== this.threadCount && (this.threadCount = e, o.ThunderKernel.setP2spTaskThreadCount(this.taskId, e))
        }

        getUseOriginOnly() {
            return this.useOriginOnly
        }

        getThreadCount() {
            return this.threadCount
        }

        getSpeedLimit() {
            return this.downloadSpeedLimit
        }

        getNameFixed() {
            return this.nameFixed
        }

        getDisplayUrl() {
            return this.displayUrl
        }

        getCookie() {
            return this.cookie
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(5);
    !function (e) {
        let t;
        !function (e) {
            e[e.LowerBound = -1] = "LowerBound", e[e.Integer = 0] = "Integer", e[e.String = 1] = "String", e[e.List = 2] = "List", e[e.Map = 3] = "Map", e[e.UpperBound = 4] = "UpperBound"
        }(t = e.BencodeDataType || (e.BencodeDataType = {}));

        class i {
            constructor(e) {
                this.type = t.LowerBound, this.type = e
            }

            getType() {
                return this.type
            }
        }

        e.BencodeObject = i;

        class o extends i {
            constructor() {
                super(t.Integer), this.value = 0
            }

            getValue() {
                return this.value
            }

            setValue(e) {
                return this.value !== e && (this.value = e, !0)
            }

            decode(e) {
                if (e.length < 2 || "i" !== e[0]) return -1;
                this.value = 0;
                let t = 1;
                for ("-" === e[1] && t++; t < e.length; t++) {
                    if (!(e[t] >= "0" && e[t] <= "9")) return "e" === e[t] ? ("-" === e[1] && (this.value = -this.value), t + 1) : -1;
                    this.value = 10 * this.value + parseInt(e[t], 10)
                }
                return -1
            }

            encode(e) {
                return e += "i", e += this.value, e += "e"
            }

            toJs() {
                return this.value
            }
        }

        e.BencodeInteger = o;

        class a extends i {
            constructor() {
                super(t.String), this.value = ""
            }

            getValue() {
                return this.value
            }

            setValue(e) {
                return this.value !== e && (this.value = e, !0)
            }

            decode(e) {
                let t = 0, i = 0;
                for (; i < e.length; i++) {
                    if (!(e[i] >= "0" && e[i] <= "9")) {
                        if (":" !== e[i]) return -1;
                        break
                    }
                    t = 10 * t + parseInt(e[i], 10)
                }
                return t + i + 1 > e.length ? -1 : (this.value = e.substr(i + 1, t), t + i + 1)
            }

            encode(e) {
                return e += this.value.length, e += ":", e += this.value
            }

            toJs() {
                return this.value
            }
        }

        e.BencodeString = a;

        class r extends i {
            constructor() {
                super(t.List), this.value = []
            }

            getItemList() {
                return this.value
            }

            getValue() {
                return this.value
            }

            decode(e) {
                return 0
            }

            encode(e) {
                return e
            }

            toJs() {
                let e = [];
                for (let t = 0; t < this.value.length; ++t) e.push(this.value[t].toJs());
                return e
            }
        }

        e.BencodeList = r;

        class s extends i {
            constructor() {
                super(t.Map), this.value = new Map
            }

            getValue() {
                return this.value
            }

            getItem(e) {
                return this.value.get(e)
            }

            addMapItem(e) {
                let i = null, n = this.value.get(e);
                return n && n.getType() === t.Map ? i = n : (i = new s, this.value.set(e, i)), i
            }

            addItem(e, i) {
                let r = !1;
                if (n.isNumber(i)) {
                    let n = null, a = this.value.get(e);
                    a && a.getType() === t.Integer ? n = a : (n = new o, this.value.set(e, n)), n.setValue(i), r = !0
                } else if (n.isString(i)) {
                    let n = null, o = this.value.get(e);
                    o && o.getType() === t.String ? n = o : (n = new a, this.value.set(e, n)), n.setValue(i), r = !0
                } else if (n.isObject(i)) {
                    let n = null, o = this.value.get(e);
                    o && o.getType() === t.Map ? n = o : (n = new s, this.value.set(e, n));
                    for (let e in i) n.addItem(e);
                    r = !0
                }
                return r
            }

            removeItem(e) {
                let i = this.value.get(e);
                if (i) {
                    let n = !0;
                    if (i.getType() === t.Map) {
                        0 === i.getValue().size && (n = !0)
                    }
                    return this.value.delete(e), n
                }
                return !1
            }

            decode(e) {
                if (!e) return -1;
                let t = e.length;
                if (t < 2 || "d" !== e[0]) return -1;
                let i = 1, n = new a, r = null, l = -1, d = -1;
                for (; i < t && "e" !== e[i];) {
                    if (!((l = n.decode(e.substr(i))) >= 0)) return -1;
                    if ("i" === e[i += l]) {
                        let t = new o;
                        d = t.decode(e.substr(i)), r = t
                    } else if ("d" === e[i]) {
                        let t = new s;
                        d = t.decode(e.substr(i)), r = t
                    } else {
                        let t = new a;
                        d = t.decode(e.substr(i)), r = t
                    }
                    if (!(d >= 0)) return -1;
                    i += d, this.value.set(n.getValue(), r)
                }
                return i < t && "e" === e[i] ? i + 1 : -1
            }

            encode(e) {
                e += "d";
                let t = new a;
                return this.value.forEach(function (i, n) {
                    t.setValue(n), e = t.encode(e), e = i.encode(e)
                }), e += "e"
            }

            toJs() {
                let e = {};
                return this.value.forEach(function (t, i) {
                    e[i] = t.toJs()
                }), e
            }
        }

        e.BencodeMap = s;
        e.Bencode = class {
            constructor() {
                this.objectList = []
            }

            getItemList() {
                return this.objectList
            }

            encode(e) {
                for (let t = 0; t < this.objectList.length; t++) e = this.objectList[t].encode(e);
                return e
            }

            decode(e) {
                let t = null, i = -1, n = 0, l = e.length;
                for (; n < l; n++) (i = (t = "i" === e[n] ? new o : "l" === e[n] ? new r : "d" === e[n] ? new s : new a).decode(e.substr(n))) >= 0 && (n += i, this.objectList.push(t));
                return e
            }
        }
    }(t.BencodeMap || (t.BencodeMap = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(4), r = i(32), s = i(99), l = i(611), d = i(16), u = i(124), c = i(5), h = i(8), f = i(0),
        p = d.DownloadKernelEventManager.getEventManager(), g = f.default.getLogger("DownloadKernel.TaskBt");
    t.BtTask = class {
        constructor(e, t, i) {
            this.subError = !1, this.fileLists = new Map, this.priorityMap = new Map, this.downloadIndexLists = [], this.task = e;
            let n = this.task.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
            if (i) {
                this.infoId = i.infoId, this.tracker = i.tracker, this.seedFile = i.seedFile, this.displayName = i.displayName, this.downloadIndexLists = i.fileRealIndexLists, this.loadSubFileEnd = t, t && r.ThunderKernel.insertBtTask(n, this.infoId, this.tracker, this.seedFile, this.displayName);
                let e = i.fileLists, o = r.ThunderKernel.beginTransaction();
                for (let i = 0; i < e.length; ++i) {
                    let n = e[i], o = n.realIndex, a = 0;
                    this.downloadIndexLists.indexOf(o) > -1 && (a = 1);
                    let r = new l.BtFile(this);
                    r.saveBtFileInfo(t, a, n), this.fileLists.set(o, r)
                }
                r.ThunderKernel.commitTransaction(o)
            }
            let o = this.task.getTaskAttribute(a.DownloadKernel.TaskAttribute.UserData);
            this.userData = new u.TaskUserData(e, o)
        }

        getTask() {
            return this.task
        }

        setTaskPriorityLevel(e, t) {
            c.isNullOrUndefined(t) ? t = this.priorityMap.get(e) : this.priorityMap.set(e, t);
            let i = this.task.getVirtualTaskId();
            if (i && i > 0 && !c.isNullOrUndefined(t)) if (-1 === e) for (let e = 0; e < this.downloadIndexLists.length; ++e) r.ThunderKernel.setTaskPriorityLevel(i, this.downloadIndexLists[e], t); else r.ThunderKernel.setTaskPriorityLevel(i, e, t)
        }

        setUserData(e, t, i) {
            return this.userData.setUserData(e, t, i)
        }

        getUserData(e, t) {
            return this.userData.getUserData(e, t)
        }

        getFileCount() {
            return this.fileLists.size
        }

        setAllUserData(e) {
            return this.userData.setAllUserData(e)
        }

        getAllUserData() {
            return this.userData.getAllUserData()
        }

        getBtFileByRealIndex(e) {
            return this.fileLists.get(e)
        }

        getInfoId() {
            return this.infoId
        }

        getDisplayName() {
            return this.displayName
        }

        getTrackerUrls() {
            return this.tracker
        }

        getSeedFilePath() {
            return this.seedFile
        }

        getDownloadFile() {
            return this.downloadIndexLists
        }

        getFileSize() {
            let e = 0;
            for (let t of this.fileLists) {
                let i = t[1];
                if (1 === i.getIsDownload()) {
                    let t = i.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.FileSize);
                    t && (e += t)
                }
            }
            return e
        }

        setDownloadFile(e) {
            let t = 0;
            for (let i of this.fileLists) {
                let n = i[1], o = n.getFileIndex();
                if (e.indexOf(o) > -1) {
                    n.setIsDownload(1);
                    let e = n.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.DownloadSize);
                    e && e > 0 && (t += e)
                } else n.setIsDownload(0)
            }
            this.downloadIndexLists = e, g.information("setDownloadFile", t), this.task.setDownloadSize(t)
        }

        getBtFileList() {
            return this.fileLists
        }

        getBtFileInfoList() {
            let e = [];
            for (let t of this.fileLists) {
                let i = t[1].getBtFileInfo();
                e.push(i)
            }
            return e
        }

        updateSubFileInfo(e) {
            if (e && e.length > 0) {
                let t = !1, i = !1, n = [];
                for (let t = 0; t < e.length; ++t) {
                    let i = e[t], o = i.realIndex, r = this.fileLists.get(o), s = this.getFileStatus(i.fileStatus),
                        l = i.errorCode;
                    0 !== l && (s = l > 700 ? a.DownloadKernel.BtFileStatus.Forbidden : a.DownloadKernel.BtFileStatus.Error, r && n.push(o)), i.fileStatus = s, r && r.updateFileInfo(i)
                }
                if (n.length > 0) {
                    let e = this.getDownloadFile();
                    for (let o = 0; o < n.length; ++o) for (let r = 0; r < e.length; ++r) if (e[r] === n[o]) {
                        this.subError || (this.subError = !0, i = !0);
                        let e = n[o], r = this.fileLists.get(e);
                        r && r.getBtFileAttribute(a.DownloadKernel.BtFileAttribute.ErrorCode) > 700 && (t = !0);
                        break
                    }
                }
                let o = this.task.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                if (p.fireTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileDetailChanged, o, e), i) {
                    let e = "Error";
                    t && (e = "Forbidden"), p.fireTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileForbidden, o, e)
                }
            }
        }

        deleteStorageBtFile() {
            let e = this.task.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
            r.ThunderKernel.deleteStorageTask(e, s.StatementType.DestroyBtFile)
        }

        loadBtTask(e) {
            let t = this.task.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
            r.ThunderKernel.loadStorageTask(t, s.StatementType.LoadBtTask, i => {
                i ? (this.infoId = i.infoId, this.tracker = i.tracker, this.seedFile = i.seedFile, this.displayName = i.displayName, r.ThunderKernel.loadStorageTask(t, s.StatementType.LoadBtFile, t => {
                    if (t) for (let e = 0; e < t.length; ++e) {
                        let i = t[e], n = new l.BtFile(this);
                        n.setFileData(i), this.fileLists.set(i.realIndex, n), 1 === i.download && this.downloadIndexLists.push(i.realIndex)
                    }
                    this.loadSubFileEnd = !0, e(i, t)
                }), this.updateSeedFile().catch()) : e(null, null)
            })
        }

        updateSeedFile() {
            return n(this, void 0, void 0, function* () {
                if (this.seedFile && !(yield h.FileSystemAWNS.existsAW(this.seedFile))) {
                    let e = o.basename(this.seedFile), t = o.join(__profilesDir, "Torrents"), i = o.join(t, e);
                    if (yield h.FileSystemAWNS.existsAW(i)) {
                        this.seedFile = i;
                        let e = this.task.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                        r.ThunderKernel.saveBtTaskSeedFile(e, i)
                    }
                }
            })
        }

        isBtFileLoadEnd() {
            return this.loadSubFileEnd
        }

        getFileStatus(e) {
            let t = a.DownloadKernel.BtFileStatus.Stopped;
            switch (e) {
                case 0:
                    break;
                case 1:
                    t = a.DownloadKernel.BtFileStatus.Stopped;
                    break;
                case 2:
                    t = a.DownloadKernel.BtFileStatus.Started;
                    break;
                case 3:
                    t = a.DownloadKernel.BtFileStatus.Complete
            }
            return t
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(4), o = i(32), a = i(16), r = i(37), s = a.DownloadKernelEventManager.getEventManager();
    t.BtFile = class {
        constructor(e) {
            this.attribute = new Map;
            for (let e = n.DownloadKernel.BtFileAttribute.NumberStrart; e < n.DownloadKernel.BtFileAttribute.NumberEnd; ++e) this.attribute.set(e, 0);
            for (let e = n.DownloadKernel.BtFileAttribute.StringStart; e < n.DownloadKernel.BtFileAttribute.StringEnd; ++e) this.attribute.set(e, "");
            this.attribute.set(n.DownloadKernel.BtFileAttribute.DcdnStatus, n.DownloadKernel.DcdnStatusCode.Unkown), this.btTask = e;
            let t = this.btTask.getTask().getTaskAttribute(n.DownloadKernel.TaskAttribute.TaskId);
            this.taskId = t, this.attribute.set(n.DownloadKernel.BtFileAttribute.TaskId, t)
        }

        getBtFileAttribute(e) {
            return this.attribute.get(e)
        }

        updateFileInfo(e) {
            this.realIndex = e.realIndex, this.attribute.set(n.DownloadKernel.BtFileAttribute.FileSize, e.fileSize), this.attribute.set(n.DownloadKernel.BtFileAttribute.RealIndex, e.realIndex), this.attribute.set(n.DownloadKernel.BtFileAttribute.EnableDcdn, e.enableDcdn), this.setAttribute(n.DownloadKernel.BtFileAttribute.ErrorCode, e.errorCode) && o.ThunderKernel.setBtFileFailureErrorCode(this.realIndex, this.taskId, this.attribute.get(n.DownloadKernel.BtFileAttribute.ErrorCode)), e.relativePath && this.attribute.set(n.DownloadKernel.BtFileAttribute.RelativePath, e.relativePath), e.finalName && "" !== e.finalName && (this.attribute.set(n.DownloadKernel.BtFileAttribute.FinalName, e.finalName), this.attribute.set(n.DownloadKernel.BtFileAttribute.FileName, e.finalName));
            let t = this.setAttribute(n.DownloadKernel.BtFileAttribute.FileStatus, e.fileStatus),
                i = this.setAttribute(n.DownloadKernel.BtFileAttribute.DownloadSize, e.downloadSize);
            (t || i) && o.ThunderKernel.saveBtFileInfo(this.taskId, this.realIndex, this.attribute.get(n.DownloadKernel.BtFileAttribute.FileStatus), this.download, this.attribute.get(n.DownloadKernel.BtFileAttribute.DownloadSize)), e.cid && "" !== e.cid && e.gcid && "" !== e.gcid && this.updateCidAndGcid(e.cid, e.gcid);
            let a = this.attribute.get(n.DownloadKernel.BtFileAttribute.DcdnStatus);
            if (a !== e.dcdnStatus) {
                this.attribute.set(n.DownloadKernel.BtFileAttribute.DcdnStatus, e.dcdnStatus);
                let t = this.btTask.getTask().getId();
                s.fireTaskEvent(n.DownloadKernel.TaskEventType.BtSubFileDcdnStatusChanged, t, this.realIndex, e.dcdnStatus, a)
            }
        }

        saveBtFileInfo(e, t, i) {
            if (this.download = t, this.realIndex = i.realIndex, this.attribute.set(n.DownloadKernel.BtFileAttribute.Download, t), this.attribute.set(n.DownloadKernel.BtFileAttribute.FileSize, i.fileSize), this.attribute.set(n.DownloadKernel.BtFileAttribute.RealIndex, i.realIndex), this.attribute.set(n.DownloadKernel.BtFileAttribute.RealIndex, i.realIndex), this.attribute.set(n.DownloadKernel.BtFileAttribute.FileOffset, i.fileOffset), i.fileName && this.attribute.set(n.DownloadKernel.BtFileAttribute.FileName, i.fileName), i.filePath && this.attribute.set(n.DownloadKernel.BtFileAttribute.FilePath, i.filePath), e) {
                let e = {
                    taskId: this.taskId,
                    status: 0,
                    realIndex: i.realIndex,
                    visible: 1,
                    download: t,
                    fileSize: i.fileSize,
                    fileOffset: i.fileOffset,
                    filePath: void 0 === i.filePath ? "" : i.filePath,
                    fileName: void 0 === i.fileName ? "" : i.fileName
                };
                o.ThunderKernel.insertBtFile(this.taskId, e)
            }
        }

        getBtFileInfo() {
            let e = {};
            return e.fileSize = this.attribute.get(n.DownloadKernel.BtFileAttribute.FileSize), e.realIndex = this.attribute.get(n.DownloadKernel.BtFileAttribute.RealIndex), e.fileOffset = this.attribute.get(n.DownloadKernel.BtFileAttribute.FileOffset), e.fileName = this.attribute.get(n.DownloadKernel.BtFileAttribute.FileName), e.filePath = this.attribute.get(n.DownloadKernel.BtFileAttribute.FilePath), e
        }

        getBtDownloadFileInfo() {
            return {
                realIndex: this.attribute.get(n.DownloadKernel.BtFileAttribute.RealIndex),
                fileStatus: this.attribute.get(n.DownloadKernel.BtFileAttribute.FileStatus),
                downloadSize: this.attribute.get(n.DownloadKernel.BtFileAttribute.DownloadSize),
                fileSize: this.attribute.get(n.DownloadKernel.BtFileAttribute.FileSize),
                enableDcdn: this.attribute.get(n.DownloadKernel.BtFileAttribute.EnableDcdn),
                errorCode: this.attribute.get(n.DownloadKernel.BtFileAttribute.ErrorCode),
                dcdnStatus: this.attribute.get(n.DownloadKernel.BtFileAttribute.DcdnStatus),
                relativePath: this.attribute.get(n.DownloadKernel.BtFileAttribute.RelativePath),
                finalName: this.attribute.get(n.DownloadKernel.BtFileAttribute.FinalName),
                cid: this.attribute.get(n.DownloadKernel.BtFileAttribute.Cid),
                gcid: this.attribute.get(n.DownloadKernel.BtFileAttribute.Gcid),
                userRead: this.attribute.get(n.DownloadKernel.BtFileAttribute.UserRead),
                playPosition: this.attribute.get(n.DownloadKernel.BtFileAttribute.PlayPosition),
                duration: this.attribute.get(n.DownloadKernel.BtFileAttribute.Duration)
            }
        }

        getIsDownload() {
            return this.download
        }

        setIsDownload(e) {
            this.download !== e && (this.download = e, this.attribute.set(n.DownloadKernel.BtFileAttribute.Download, e), o.ThunderKernel.saveBtFileInfo(this.taskId, this.realIndex, this.attribute.get(n.DownloadKernel.BtFileAttribute.FileStatus), this.download, this.attribute.get(n.DownloadKernel.BtFileAttribute.DownloadSize)))
        }

        getUserRead() {
            return this.attribute.get(n.DownloadKernel.BtFileAttribute.UserRead)
        }

        setUserRead(e) {
            0 !== e && (e = 1);
            let t = !1;
            return this.attribute.get(n.DownloadKernel.BtFileAttribute.UserRead) !== e && (this.attribute.set(n.DownloadKernel.BtFileAttribute.UserRead, e), o.ThunderKernel.saveBtFileUserRead(this.taskId, this.realIndex, e), s.fireTaskEvent(n.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.taskId, [this.getBtDownloadFileInfo()]), t = !0), t
        }

        setPlayPosition(e) {
            let t = !1;
            return this.attribute.get(n.DownloadKernel.BtFileAttribute.PlayPosition) !== e && (this.attribute.set(n.DownloadKernel.BtFileAttribute.PlayPosition, e), o.ThunderKernel.setBtFilePlayPosition(this.taskId, this.realIndex, e), s.fireTaskEvent(n.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.taskId, [this.getBtDownloadFileInfo()]), t = !0), t
        }

        setDuration(e) {
            let t = !1;
            return this.attribute.get(n.DownloadKernel.BtFileAttribute.Duration) !== e && (this.attribute.set(n.DownloadKernel.BtFileAttribute.Duration, e), o.ThunderKernel.setBtFileDuration(this.taskId, this.realIndex, e), s.fireTaskEvent(n.DownloadKernel.TaskEventType.BtSubFileDetailChanged, this.taskId, [this.getBtDownloadFileInfo()]), t = !0), t
        }

        isSupportPlay() {
            let e = !1;
            if (this.attribute.get(n.DownloadKernel.BtFileAttribute.FileStatus) === n.DownloadKernel.BtFileStatus.Forbidden) e = !1; else {
                let t = this.attribute.get(n.DownloadKernel.BtFileAttribute.Download),
                    i = this.attribute.get(n.DownloadKernel.BtFileAttribute.FileName);
                1 === t && (e = r.TaskUtilHelper.isVideoFileExt(i))
            }
            return e
        }

        getFileIndex() {
            return this.realIndex
        }

        setFileData(e) {
            this.download = e.download, this.taskId = e.taskId, this.realIndex = e.realIndex, this.attribute.set(n.DownloadKernel.BtFileAttribute.TaskId, e.taskId), this.attribute.set(n.DownloadKernel.BtFileAttribute.FileSize, e.fileSize), this.attribute.set(n.DownloadKernel.BtFileAttribute.FileOffset, e.fileOffset), this.attribute.set(n.DownloadKernel.BtFileAttribute.DownloadSize, e.receivedSize), this.attribute.set(n.DownloadKernel.BtFileAttribute.RealIndex, e.realIndex), this.attribute.set(n.DownloadKernel.BtFileAttribute.FileStatus, e.status), this.attribute.set(n.DownloadKernel.BtFileAttribute.Visible, e.visible), this.attribute.set(n.DownloadKernel.BtFileAttribute.Download, e.download), e.filePath && this.attribute.set(n.DownloadKernel.BtFileAttribute.FilePath, e.filePath), e.fileName && this.attribute.set(n.DownloadKernel.BtFileAttribute.FileName, e.fileName), e.cid && this.attribute.set(n.DownloadKernel.BtFileAttribute.Cid, e.cid), e.gcid && this.attribute.set(n.DownloadKernel.BtFileAttribute.Gcid, e.gcid), e.userRead && this.attribute.set(n.DownloadKernel.BtFileAttribute.UserRead, e.userRead), e.playPosition && this.attribute.set(n.DownloadKernel.BtFileAttribute.PlayPosition, e.playPosition), e.duration && this.attribute.set(n.DownloadKernel.BtFileAttribute.Duration, e.duration), this.attribute.set(n.DownloadKernel.BtFileAttribute.ErrorCode, e.failureErrorCode)
        }

        updateCidAndGcid(e, t) {
            let i = !1, a = this.attribute.get(n.DownloadKernel.BtFileAttribute.Cid),
                r = this.attribute.get(n.DownloadKernel.BtFileAttribute.Gcid);
            a && "" !== a || ("0000000000000000000000000000000000000000" === e ? this.setAttribute(n.DownloadKernel.BtFileAttribute.Cid, "") : this.setAttribute(n.DownloadKernel.BtFileAttribute.Cid, e), a = e, i = !0), r && "" !== r || ("0000000000000000000000000000000000000000" === t ? this.setAttribute(n.DownloadKernel.BtFileAttribute.Gcid, "") : this.setAttribute(n.DownloadKernel.BtFileAttribute.Gcid, t), r = t, i = !0), i && o.ThunderKernel.saveBtFileCid(this.taskId, this.realIndex, a, r)
        }

        setAttribute(e, t) {
            let i = !1;
            return this.attribute.get(e) !== t && void 0 !== t && (this.attribute.set(e, t), i = !0), i
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(42), o = i(4), a = i(32), r = i(99), s = i(124), l = i(5), d = i(2);
    t.EmuleTask = class {
        constructor(e, t) {
            if (this.task = e, this.configPath = d.join(__profilesDir, "Emule"), this.taskId = e.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskId), t) {
                let e = this.task.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskId),
                    t = this.task.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskUrl);
                n.Common.isThunderPrivateUrl(t) && (t = n.Common.parseThunderPrivateUrl(t)), this.fileHash = a.ThunderKernel.getFileHashByUrl(t), a.ThunderKernel.insertEmuleTask(e, this.fileHash, this.configPath)
            } else a.ThunderKernel.loadStorageTask(this.taskId, r.StatementType.LoadEmuleTask, e => {
                this.fileHash = e.fileHash, this.configPath = e.configPath
            });
            let i = this.task.getTaskAttribute(o.DownloadKernel.TaskAttribute.UserData);
            this.userData = new s.TaskUserData(e, i)
        }

        getTask() {
            return this.task
        }

        setTaskPriorityLevel(e, t) {
            l.isNullOrUndefined(t) ? t = this.priority : this.priority = t;
            let i = this.task.getVirtualTaskId();
            i && i > 0 && !l.isNullOrUndefined(t) && a.ThunderKernel.setTaskPriorityLevel(i, e, t)
        }

        setUserData(e, t, i) {
            return this.userData.setUserData(e, t, i)
        }

        getUserData(e, t) {
            return this.userData.getUserData(e, t)
        }

        setAllUserData(e) {
            return this.userData.setAllUserData(e)
        }

        getAllUserData() {
            return this.userData.getAllUserData()
        }

        getFileHash() {
            return this.fileHash
        }

        getConfigPath() {
            return this.configPath
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(8), r = i(4), s = i(32), l = i(99), d = i(16), u = i(124), c = i(0),
        h = d.DownloadKernelEventManager.getEventManager(), f = c.default.getLogger("DownloadKernel.TaskGroup");
    t.GroupTask = class {
        constructor(e, t) {
            this.startTime = 0, this.downloadingPeriod = 0, this.startTaskCount = 5, this.task = e, this.subTasks = [], this.moveTimeout = 120, this.downloadingSubCount = 5, this.subTaskOrder = "", this.taskId = this.task.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId), t ? s.ThunderKernel.insertGroupTask(this.taskId, this.moveTimeout, this.downloadingSubCount, this.subTaskOrder) : (this.downloadingPeriod = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadingPeriod), s.ThunderKernel.loadStorageTask(this.taskId, l.StatementType.LoadGroupTask, e => {
                this.moveTimeout = e.moveTimeout, this.downloadingSubCount = e.downloadingSubCount
            }));
            let i = this.task.getTaskAttribute(r.DownloadKernel.TaskAttribute.UserData);
            this.userData = new u.TaskUserData(e, i)
        }

        getTask() {
            return this.task
        }

        setTaskPriorityLevel(e, t) {
            if (-1 === e) for (let e = 0; e < this.subTasks.length; ++e) {
                let i = this.subTasks[e].getExtraObject();
                i && i.setTaskPriorityLevel(-1, t)
            } else {
                let i = this.getSubTaskByIndex(e);
                if (i) {
                    let e = i.getExtraObject();
                    e && e.setTaskPriorityLevel(-1, t)
                }
            }
        }

        setSubTaskFileSize(e, t) {
            let i = !1, n = this.subTasks[e];
            if (n && (i = n.setFileSize(t))) {
                let e = 0;
                for (let t = 0; t < this.subTasks.length; ++t) {
                    let i = this.subTasks[t];
                    if (i) {
                        if (0 === i.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask)) continue;
                        let t = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.FileSize);
                        t && (e += t)
                    }
                }
                this.task.setFileSize(e)
            }
            return i
        }

        setUserData(e, t, i) {
            return this.userData.setUserData(e, t, i)
        }

        getUserData(e, t) {
            return this.userData.getUserData(e, t)
        }

        setAllUserData(e) {
            return this.userData.setAllUserData(e)
        }

        getAllUserData() {
            return this.userData.getAllUserData()
        }

        getSubTaskCount() {
            return this.subTasks.length
        }

        getSubTaskIds() {
            let e = [];
            for (let t of this.subTasks) t && e.push(t.getId());
            return e
        }

        getDownloadTaskCount() {
            let e = 0;
            for (let t = 0; t < this.subTasks.length; ++t) {
                let i = this.subTasks[t];
                i && 1 === i.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask) && e++
            }
            return e
        }

        getSubTaskByIndex(e) {
            return this.subTasks[e]
        }

        addSubTask(e) {
            e && (this.subTasks.push(e), e.internalSetFileIndex(this.subTasks.length - 1))
        }

        start(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1, i = 0, n = 0;
                for (let o = 0; o < this.subTasks.length; ++o) {
                    let a = this.subTasks[o];
                    if (!a) continue;
                    if (0 === a.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask)) {
                        n++;
                        continue
                    }
                    let s = a.getTaskStatus();
                    if (s !== r.DownloadKernel.TaskStatus.Succeeded && s !== r.DownloadKernel.TaskStatus.Seeding) if (s !== r.DownloadKernel.TaskStatus.Failed) {
                        if ((yield a.start(e)) && (t = !0, ++i >= this.startTaskCount)) break
                    } else (yield a.start(e)) && (t = !0); else n++
                }
                return n === this.subTasks.length && (t = !0), e && (t = !0), t
            })
        }

        stop(e) {
            let t = !1;
            for (let i = 0; i < this.subTasks.length; ++i) {
                let n = this.subTasks[i];
                if (!n) continue;
                let o = n.getTaskStatus();
                o !== r.DownloadKernel.TaskStatus.Succeeded && o !== r.DownloadKernel.TaskStatus.Seeding && n.stop(e) && (t = !0)
            }
            return t
        }

        deleteStorageTask() {
            for (let e = 0; e < this.subTasks.length; ++e) {
                let t = this.subTasks[e];
                t && t.deleteStorageTask()
            }
        }

        deleteFile() {
            return n(this, void 0, void 0, function* () {
                let e = !0;
                for (let t = 0; t < this.subTasks.length; ++t) {
                    let i = this.subTasks[t];
                    i && (e = (yield i.deleteFile()) && e)
                }
                let t = this.task.getTaskAttribute(r.DownloadKernel.TaskAttribute.SavePath), n = [t];
                for (let e = 0; e < this.subTasks.length; ++e) {
                    let i = this.subTasks[e];
                    if (i) {
                        let e = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.SavePath);
                        for (; e.length > t.length && !n.includes(e);) n = n.concat([e]), e = o.parse(e).dir
                    }
                }
                n.sort((e, t) => e.length > t.length ? -1 : e.length < t.length ? 1 : 0), f.information("task.delete savePaths:", n);
                for (let t = 0; t < n.length; ++t) {
                    let i = n[t];
                    (yield a.FileSystemAWNS.existsAW(i)) && (e = (yield a.FileSystemAWNS.rmdirAW(i)) && e)
                }
                const {TaskUserDataGUID: s} = yield Promise.resolve().then(() => i(43));
                let l = this.getUserData(s.guidNotSavePath, "notSavePath");
                if (l && (t = o.normalize(t), l = o.normalize(l), 0 === t.indexOf(l))) {
                    let e = l.indexOf(":\\");
                    if (-1 !== e) {
                        let t = l.substr(0, e + ":\\".length);
                        t && a.FileSystemAWNS.deleteEmptySubDirs(l, t).catch()
                    }
                }
                return e
            })
        }

        destroy() {
            return n(this, void 0, void 0, function* () {
                let e = !0;
                for (let t = 0; t < this.subTasks.length; ++t) {
                    let i = this.subTasks[t];
                    if (i) {
                        let t = yield i.destroy();
                        e && !t && (e = !1)
                    }
                }
                return e
            })
        }

        querySubTaskInfo(e, t, i) {
            let o = !1, a = 0, l = 0, d = !1, u = [];
            for (let c = 0; c < this.subTasks.length; ++c) {
                let f = this.subTasks[c];
                if (!f) continue;
                let p = f.getTaskStatus();
                if (p === r.DownloadKernel.TaskStatus.Stopped || p === r.DownloadKernel.TaskStatus.Succeeded || p === r.DownloadKernel.TaskStatus.Seeding || p === r.DownloadKernel.TaskStatus.Failed) continue;
                let g = f.getTaskAttribute(r.DownloadKernel.TaskAttribute.VirtualId);
                g < 1 || (a++, o = s.ThunderKernel.queryTaskInfo(g, o => n(this, void 0, void 0, function* () {
                    if (l++, null !== o) {
                        let i = f.updateTaskInfo(o, e, t);
                        1 & i && (d = !0), i > 0 && u.push(f)
                    }
                    if (a === l && (this.updateTaskDetail(), d && (yield this.checkSubTaskStatus()), this.updateTaskStatus() && e(this.task), i(), u.length > 0)) {
                        let e = new Map;
                        e.set(this.taskId, u), h.fireTaskEvent(r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, e)
                    }
                })))
            }
            return 0 === a && (this.subTasks.length > 0 && e(this.subTasks[0]), this.updateTaskDetail(), this.updateTaskStatus(), i()), o
        }

        getErrorCodes() {
            let e = [];
            do {
                if (this.task.getTaskStatus() !== r.DownloadKernel.TaskStatus.Failed) break;
                for (let t = 0; t < this.subTasks.length; ++t) {
                    let i = this.subTasks[t];
                    if (0 !== i.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask) && i.getTaskStatus() === r.DownloadKernel.TaskStatus.Failed) {
                        let t = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.ErrorCode);
                        -1 === e.indexOf(t) && e.push(t)
                    }
                }
            } while (0);
            return e
        }

        getTaskStatus() {
            let e = 0, t = 0, i = 0, n = 0, o = 0, a = 0, s = 0, l = this.task.getTaskStatus();
            if (l === r.DownloadKernel.TaskStatus.StartWaiting || l === r.DownloadKernel.TaskStatus.DestroyPending) return l;
            let d = 0;
            for (let l = 0; l < this.subTasks.length; ++l) {
                let u = this.subTasks[l], c = !1;
                if (u) {
                    if (0 === u.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask)) {
                        d++;
                        continue
                    }
                    switch (u.getTaskStatus()) {
                        case r.DownloadKernel.TaskStatus.Unkown:
                            e++;
                            break;
                        case r.DownloadKernel.TaskStatus.Started:
                            i++, c = !0;
                            break;
                        case r.DownloadKernel.TaskStatus.StartPending:
                            n++;
                            break;
                        case r.DownloadKernel.TaskStatus.Stopped:
                            t++;
                            break;
                        case r.DownloadKernel.TaskStatus.StopPending:
                            o++;
                            break;
                        case r.DownloadKernel.TaskStatus.Succeeded:
                            a++;
                            break;
                        case r.DownloadKernel.TaskStatus.Failed:
                            s++;
                            break;
                        case r.DownloadKernel.TaskStatus.Seeding:
                            a++
                    }
                }
                if (c) break
            }
            let u = !1;
            l !== r.DownloadKernel.TaskStatus.StopPending && (i > 0 ? (l = r.DownloadKernel.TaskStatus.Started, u = !0) : n > 0 && l !== r.DownloadKernel.TaskStatus.Started && (l = r.DownloadKernel.TaskStatus.StartPending, u = !0));
            let c = this.subTasks.length - d;
            return u || (o > 0 ? l = r.DownloadKernel.TaskStatus.StopPending : e === c ? l = r.DownloadKernel.TaskStatus.Unkown : a === c ? l = r.DownloadKernel.TaskStatus.Succeeded : s === c ? l = r.DownloadKernel.TaskStatus.Failed : s + a === c ? l = r.DownloadKernel.TaskStatus.Succeeded : t > 0 && l !== r.DownloadKernel.TaskStatus.Started && (l = r.DownloadKernel.TaskStatus.Stopped)), l
        }

        setDownloadTask(e) {
            let t = 0, i = [];
            for (let n = 0; n < this.subTasks.length; ++n) {
                let o = this.subTasks[n], a = !1, s = !1;
                for (let i = 0; i < e.length; ++i) if (n === e[i]) {
                    s = o.updateDownloadSubTask(1), a = !0;
                    let e = o.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSize);
                    e && e > 0 && (t += e);
                    break
                }
                a || (s = o.updateDownloadSubTask(0)), s && i.push(o)
            }
            if (t && this.updateTaskDetail(), i.length > 0) {
                let e = new Map;
                e.set(this.taskId, i), h.fireTaskEvent(r.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, e)
            }
        }

        getTaskSizeInfo() {
            let e = {
                downloadSpeed: 0,
                vipSpeed: 0,
                fileSize: 0,
                downloadSize: 0,
                receivedSize: 0,
                usingResCount: 0,
                totalResCount: 0,
                channelInfo: {originSize: 0, p2pSize: 0, p2sSize: 0, offlineSize: 0, dcdnSize: 0}
            };
            for (let t = 0; t < this.subTasks.length; ++t) {
                let i = this.subTasks[t];
                if (i) {
                    if (0 === i.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask)) continue;
                    let t = i.getDownloadSpeed(), n = i.getVipSpeed(),
                        o = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.FileSize),
                        a = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSize),
                        s = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.ReceivedSize),
                        l = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.SrcUsing),
                        d = i.getTaskAttribute(r.DownloadKernel.TaskAttribute.SrcTotal), u = i.getTaskChannelInfo();
                    u && (e.channelInfo.p2pSize += u.p2pSize, e.channelInfo.p2sSize += u.p2sSize, e.channelInfo.offlineSize += u.offlineSize, e.channelInfo.originSize += u.originSize, e.channelInfo.dcdnSize += u.dcdnSize), t && (e.downloadSpeed += t), n && (e.vipSpeed += n), o && (e.fileSize += o), a && (e.downloadSize += a), s && (e.receivedSize += s), l && (e.usingResCount += l), d && (e.totalResCount += d)
                }
            }
            if (e.downloadSize) {
                let t = this.task.getTaskAttribute(r.DownloadKernel.TaskAttribute.TotalDownloadSize);
                void 0 !== t && 0 !== t && (e.downloadSpeed = e.downloadSize - t), this.task.internalSetTotalDownloadSize(e.downloadSize)
            }
            return e.downloadSpeed < 0 && (e.downloadSpeed = 0), e
        }

        updateTaskStatus() {
            let e = this.getTaskStatus();
            return this.task.updateTaskStatus(e)
        }

        checkSubTaskStatus() {
            return n(this, void 0, void 0, function* () {
                let e = this.task.getTaskStatus();
                e !== r.DownloadKernel.TaskStatus.Stopped && e !== r.DownloadKernel.TaskStatus.StopPending && (yield this.startWaittingTasks())
            })
        }

        startWaittingTasks() {
            return n(this, void 0, void 0, function* () {
                let e = 0, t = 0;
                for (let i = 0; i < this.subTasks.length; ++i) {
                    let n = this.subTasks[i];
                    if (!n) continue;
                    if (0 === n.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask)) continue;
                    let o = n.getTaskStatus();
                    o !== r.DownloadKernel.TaskStatus.Started && o !== r.DownloadKernel.TaskStatus.StartPending || (e++, t = i)
                }
                if (e < this.startTaskCount && t < this.subTasks.length) for (let i = t + 1; i < this.subTasks.length; ++i) {
                    let t = this.subTasks[i];
                    if (!t) continue;
                    if (0 === t.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadSubTask)) continue;
                    let n = t.getTaskStatus();
                    if (n !== r.DownloadKernel.TaskStatus.Succeeded && n !== r.DownloadKernel.TaskStatus.Seeding && n !== r.DownloadKernel.TaskStatus.Failed && (yield t.start()) && ++e >= this.startTaskCount) break
                }
            })
        }

        updateTaskDetail() {
            let e = r.DownloadKernel.TaskDetailChangedFlags.UnKnown, t = this.getTaskSizeInfo();
            if (t.downloadSpeed > 0) if (0 === this.startTime) this.startTime = (new Date).getTime(), this.downloadingPeriod = this.task.getTaskAttribute(r.DownloadKernel.TaskAttribute.DownloadingPeriod); else {
                let t = ((new Date).getTime() - this.startTime) / 1e3, i = this.downloadingPeriod + Math.round(t);
                this.task.internalSetDownloadingPeriod(i) && (e |= r.DownloadKernel.TaskDetailChangedFlags.DownloadingPeriod)
            } else this.startTime = 0;
            this.task.internalSetTaskSpeed(t.downloadSpeed, t.vipSpeed) && (e |= r.DownloadKernel.TaskDetailChangedFlags.TaskSpeed), this.task.internalSetFileSize(t.fileSize) && (e |= r.DownloadKernel.TaskDetailChangedFlags.FileSize), this.task.internalSetDownloadSize(t.downloadSize) && (e |= r.DownloadKernel.TaskDetailChangedFlags.DownloadSize), this.task.internalSetReceivedSize(t.receivedSize) && (e |= r.DownloadKernel.TaskDetailChangedFlags.ReceivedSize), this.task.internalSetSrcUsing(t.usingResCount) && (e |= r.DownloadKernel.TaskDetailChangedFlags.SrcUsing), this.task.internalSetSrcTotal(t.totalResCount) && (e |= r.DownloadKernel.TaskDetailChangedFlags.SrcTotal), this.task.internalSetTaskChannelInfo(t.channelInfo) && (e |= r.DownloadKernel.TaskDetailChangedFlags.ChannelInfo), h.fireTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, [this.task], e)
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(4), a = i(378), r = i(501), s = n.default.getLogger("DownloadKernel.PrivateCategory");

    class l extends r.Category {
        constructor(e) {
            super(e);
            let t = new a.CategoryView(e, o.DownloadKernel.CategroyViewID.Downloading),
                i = new a.CategoryView(e, o.DownloadKernel.CategroyViewID.Completed);
            this.categoryViews.push(t), this.categoryViews.push(i)
        }

        static createCategoryFromData(e) {
            let t = e.categoryId;
            if (void 0 === t || t < 0) return null;
            s.information("createCategoryFromData ", e);
            let i = new l(t);
            return i.setName(e.name), i.setParentId(e.parentId), i.setNextId(e.nextId), i.setStatus(e.status), i.setDescription(e.description), i.setDefaultPath(e.defaultPath), i.setUserName(e.userName), i.setPassword(e.password, e.passwordV2), i.setAccountPassword(e.accountPassword), i
        }
    }

    t.PrivateCategory = l
}, function (e, t, i) {
    "use strict";
    var n = i(52), o = i(503), a = i(617), r = i(379);

    function s(e) {
        var t = new a(e), i = o(a.prototype.request, t);
        return n.extend(i, a.prototype, t), n.extend(i, t), i
    }

    var l = s(r);
    l.Axios = a, l.create = function (e) {
        return s(n.merge(r, e))
    }, l.Cancel = i(510), l.CancelToken = i(633), l.isCancel = i(509), l.all = function (e) {
        return Promise.all(e)
    }, l.spread = i(634), e.exports = l, e.exports.default = l
}, function (e, t) {
    function i(e) {
        return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
    }

    /*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
    e.exports = function (e) {
        return null != e && (i(e) || function (e) {
            return "function" == typeof e.readFloatLE && "function" == typeof e.slice && i(e.slice(0, 0))
        }(e) || !!e._isBuffer)
    }
}, function (e, t, i) {
    "use strict";
    var n = i(379), o = i(52), a = i(628), r = i(629);

    function s(e) {
        this.defaults = e, this.interceptors = {request: new a, response: new a}
    }

    s.prototype.request = function (e) {
        "string" == typeof e && (e = o.merge({url: arguments[0]}, arguments[1])), (e = o.merge(n, {method: "get"}, this.defaults, e)).method = e.method.toLowerCase();
        var t = [r, void 0], i = Promise.resolve(e);
        for (this.interceptors.request.forEach(function (e) {
            t.unshift(e.fulfilled, e.rejected)
        }), this.interceptors.response.forEach(function (e) {
            t.push(e.fulfilled, e.rejected)
        }); t.length;) i = i.then(t.shift(), t.shift());
        return i
    }, o.forEach(["delete", "get", "head", "options"], function (e) {
        s.prototype[e] = function (t, i) {
            return this.request(o.merge(i || {}, {method: e, url: t}))
        }
    }), o.forEach(["post", "put", "patch"], function (e) {
        s.prototype[e] = function (t, i, n) {
            return this.request(o.merge(n || {}, {method: e, url: t, data: i}))
        }
    }), e.exports = s
}, function (e, t, i) {
    "use strict";
    var n = i(52);
    e.exports = function (e, t) {
        n.forEach(e, function (i, n) {
            n !== t && n.toUpperCase() === t.toUpperCase() && (e[t] = i, delete e[n])
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = i(52), o = i(504), a = i(506), r = i(620), s = i(621), l = i(380),
        d = "undefined" != typeof window && window.btoa && window.btoa.bind(window) || i(622);
    e.exports = function (e) {
        return new Promise(function (t, u) {
            var c = e.data, h = e.headers;
            n.isFormData(c) && delete h["Content-Type"];
            var f = new XMLHttpRequest, p = "onreadystatechange", g = !1;
            if ("undefined" == typeof window || !window.XDomainRequest || "withCredentials" in f || s(e.url) || (f = new window.XDomainRequest, p = "onload", g = !0, f.onprogress = function () {
            }, f.ontimeout = function () {
            }), e.auth) {
                var m = e.auth.username || "", v = e.auth.password || "";
                h.Authorization = "Basic " + d(m + ":" + v)
            }
            if (f.open(e.method.toUpperCase(), a(e.url, e.params, e.paramsSerializer), !0), f.timeout = e.timeout, f[p] = function () {
                if (f && (4 === f.readyState || g) && (0 !== f.status || f.responseURL && 0 === f.responseURL.indexOf("file:"))) {
                    var i = "getAllResponseHeaders" in f ? r(f.getAllResponseHeaders()) : null, n = {
                        data: e.responseType && "text" !== e.responseType ? f.response : f.responseText,
                        status: 1223 === f.status ? 204 : f.status,
                        statusText: 1223 === f.status ? "No Content" : f.statusText,
                        headers: i,
                        config: e,
                        request: f
                    };
                    o(t, u, n), f = null
                }
            }, f.onerror = function () {
                u(l("Network Error", e, null, f)), f = null
            }, f.ontimeout = function () {
                u(l("timeout of " + e.timeout + "ms exceeded", e, "ECONNABORTED", f)), f = null
            }, n.isStandardBrowserEnv()) {
                var y = i(623),
                    T = (e.withCredentials || s(e.url)) && e.xsrfCookieName ? y.read(e.xsrfCookieName) : void 0;
                T && (h[e.xsrfHeaderName] = T)
            }
            if ("setRequestHeader" in f && n.forEach(h, function (e, t) {
                void 0 === c && "content-type" === t.toLowerCase() ? delete h[t] : f.setRequestHeader(t, e)
            }), e.withCredentials && (f.withCredentials = !0), e.responseType) try {
                f.responseType = e.responseType
            } catch (t) {
                if ("json" !== e.responseType) throw t
            }
            "function" == typeof e.onDownloadProgress && f.addEventListener("progress", e.onDownloadProgress), "function" == typeof e.onUploadProgress && f.upload && f.upload.addEventListener("progress", e.onUploadProgress), e.cancelToken && e.cancelToken.promise.then(function (e) {
                f && (f.abort(), u(e), f = null)
            }), void 0 === c && (c = null), f.send(c)
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = i(52),
        o = ["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"];
    e.exports = function (e) {
        var t, i, a, r = {};
        return e ? (n.forEach(e.split("\n"), function (e) {
            if (a = e.indexOf(":"), t = n.trim(e.substr(0, a)).toLowerCase(), i = n.trim(e.substr(a + 1)), t) {
                if (r[t] && o.indexOf(t) >= 0) return;
                r[t] = "set-cookie" === t ? (r[t] ? r[t] : []).concat([i]) : r[t] ? r[t] + ", " + i : i
            }
        }), r) : r
    }
}, function (e, t, i) {
    "use strict";
    var n = i(52);
    e.exports = n.isStandardBrowserEnv() ? function () {
        var e, t = /(msie|trident)/i.test(navigator.userAgent), i = document.createElement("a");

        function o(e) {
            var n = e;
            return t && (i.setAttribute("href", n), n = i.href), i.setAttribute("href", n), {
                href: i.href,
                protocol: i.protocol ? i.protocol.replace(/:$/, "") : "",
                host: i.host,
                search: i.search ? i.search.replace(/^\?/, "") : "",
                hash: i.hash ? i.hash.replace(/^#/, "") : "",
                hostname: i.hostname,
                port: i.port,
                pathname: "/" === i.pathname.charAt(0) ? i.pathname : "/" + i.pathname
            }
        }

        return e = o(window.location.href), function (t) {
            var i = n.isString(t) ? o(t) : t;
            return i.protocol === e.protocol && i.host === e.host
        }
    }() : function () {
        return !0
    }
}, function (e, t, i) {
    "use strict";
    var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

    function o() {
        this.message = "String contains an invalid character"
    }

    o.prototype = new Error, o.prototype.code = 5, o.prototype.name = "InvalidCharacterError", e.exports = function (e) {
        for (var t, i, a = String(e), r = "", s = 0, l = n; a.charAt(0 | s) || (l = "=", s % 1); r += l.charAt(63 & t >> 8 - s % 1 * 8)) {
            if ((i = a.charCodeAt(s += .75)) > 255) throw new o;
            t = t << 8 | i
        }
        return r
    }
}, function (e, t, i) {
    "use strict";
    var n = i(52);
    e.exports = n.isStandardBrowserEnv() ? {
        write: function (e, t, i, o, a, r) {
            var s = [];
            s.push(e + "=" + encodeURIComponent(t)), n.isNumber(i) && s.push("expires=" + new Date(i).toGMTString()), n.isString(o) && s.push("path=" + o), n.isString(a) && s.push("domain=" + a), !0 === r && s.push("secure"), document.cookie = s.join("; ")
        }, read: function (e) {
            var t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
            return t ? decodeURIComponent(t[3]) : null
        }, remove: function (e) {
            this.write(e, "", Date.now() - 864e5)
        }
    } : {
        write: function () {
        }, read: function () {
            return null
        }, remove: function () {
        }
    }
}, function (e, t, i) {
    function n() {
        var e;
        try {
            e = t.storage.debug
        } catch (e) {
        }
        return !e && "undefined" != typeof process && "env" in process && (e = process.env.DEBUG), e
    }

    (t = e.exports = i(625)).log = function () {
        return "object" == typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments)
    }, t.formatArgs = function (e) {
        var i = this.useColors;
        if (e[0] = (i ? "%c" : "") + this.namespace + (i ? " %c" : " ") + e[0] + (i ? "%c " : " ") + "+" + t.humanize(this.diff), !i) return;
        var n = "color: " + this.color;
        e.splice(1, 0, n, "color: inherit");
        var o = 0, a = 0;
        e[0].replace(/%[a-zA-Z%]/g, function (e) {
            "%%" !== e && "%c" === e && (a = ++o)
        }), e.splice(a, 0, n)
    }, t.save = function (e) {
        try {
            null == e ? t.storage.removeItem("debug") : t.storage.debug = e
        } catch (e) {
        }
    }, t.load = n, t.useColors = function () {
        if ("undefined" != typeof window && window.process && "renderer" === window.process.type) return !0;
        if ("undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !1;
        return "undefined" != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "undefined" != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)
    }, t.storage = "undefined" != typeof chrome && void 0 !== chrome.storage ? chrome.storage.local : function () {
        try {
            return window.localStorage
        } catch (e) {
        }
    }(), t.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"], t.formatters.j = function (e) {
        try {
            return JSON.stringify(e)
        } catch (e) {
            return "[UnexpectedJSONParseError]: " + e.message
        }
    }, t.enable(n())
}, function (e, t, i) {
    function n(e) {
        var i;

        function n() {
            if (n.enabled) {
                var e = n, o = +new Date, a = o - (i || o);
                e.diff = a, e.prev = i, e.curr = o, i = o;
                for (var r = new Array(arguments.length), s = 0; s < r.length; s++) r[s] = arguments[s];
                r[0] = t.coerce(r[0]), "string" != typeof r[0] && r.unshift("%O");
                var l = 0;
                r[0] = r[0].replace(/%([a-zA-Z%])/g, function (i, n) {
                    if ("%%" === i) return i;
                    l++;
                    var o = t.formatters[n];
                    if ("function" == typeof o) {
                        var a = r[l];
                        i = o.call(e, a), r.splice(l, 1), l--
                    }
                    return i
                }), t.formatArgs.call(e, r), (n.log || t.log || console.log.bind(console)).apply(e, r)
            }
        }

        return n.namespace = e, n.enabled = t.enabled(e), n.useColors = t.useColors(), n.color = function (e) {
            var i, n = 0;
            for (i in e) n = (n << 5) - n + e.charCodeAt(i), n |= 0;
            return t.colors[Math.abs(n) % t.colors.length]
        }(e), n.destroy = o, "function" == typeof t.init && t.init(n), t.instances.push(n), n
    }

    function o() {
        var e = t.instances.indexOf(this);
        return -1 !== e && (t.instances.splice(e, 1), !0)
    }

    (t = e.exports = n.debug = n.default = n).coerce = function (e) {
        return e instanceof Error ? e.stack || e.message : e
    }, t.disable = function () {
        t.enable("")
    }, t.enable = function (e) {
        var i;
        t.save(e), t.names = [], t.skips = [];
        var n = ("string" == typeof e ? e : "").split(/[\s,]+/), o = n.length;
        for (i = 0; i < o; i++) n[i] && ("-" === (e = n[i].replace(/\*/g, ".*?"))[0] ? t.skips.push(new RegExp("^" + e.substr(1) + "$")) : t.names.push(new RegExp("^" + e + "$")));
        for (i = 0; i < t.instances.length; i++) {
            var a = t.instances[i];
            a.enabled = t.enabled(a.namespace)
        }
    }, t.enabled = function (e) {
        if ("*" === e[e.length - 1]) return !0;
        var i, n;
        for (i = 0, n = t.skips.length; i < n; i++) if (t.skips[i].test(e)) return !1;
        for (i = 0, n = t.names.length; i < n; i++) if (t.names[i].test(e)) return !0;
        return !1
    }, t.humanize = i(626), t.instances = [], t.names = [], t.skips = [], t.formatters = {}
}, function (e, t) {
    var i = 1e3, n = 60 * i, o = 60 * n, a = 24 * o, r = 365.25 * a;

    function s(e, t, i) {
        if (!(e < t)) return e < 1.5 * t ? Math.floor(e / t) + " " + i : Math.ceil(e / t) + " " + i + "s"
    }

    e.exports = function (e, t) {
        t = t || {};
        var l, d = typeof e;
        if ("string" === d && e.length > 0) return function (e) {
            if ((e = String(e)).length > 100) return;
            var t = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);
            if (!t) return;
            var s = parseFloat(t[1]);
            switch ((t[2] || "ms").toLowerCase()) {
                case"years":
                case"year":
                case"yrs":
                case"yr":
                case"y":
                    return s * r;
                case"days":
                case"day":
                case"d":
                    return s * a;
                case"hours":
                case"hour":
                case"hrs":
                case"hr":
                case"h":
                    return s * o;
                case"minutes":
                case"minute":
                case"mins":
                case"min":
                case"m":
                    return s * n;
                case"seconds":
                case"second":
                case"secs":
                case"sec":
                case"s":
                    return s * i;
                case"milliseconds":
                case"millisecond":
                case"msecs":
                case"msec":
                case"ms":
                    return s;
                default:
                    return
            }
        }(e);
        if ("number" === d && !1 === isNaN(e)) return t.long ? s(l = e, a, "day") || s(l, o, "hour") || s(l, n, "minute") || s(l, i, "second") || l + " ms" : function (e) {
            if (e >= a) return Math.round(e / a) + "d";
            if (e >= o) return Math.round(e / o) + "h";
            if (e >= n) return Math.round(e / n) + "m";
            if (e >= i) return Math.round(e / i) + "s";
            return e + "ms"
        }(e);
        throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e))
    }
}, function (e) {
    e.exports = {
        _args: [["axios@0.18.0", "D:\\jenkins\\workspace\\ThunderPC_AP_Build_Pack\\channel\\trunk\\build\\app"]],
        _from: "axios@0.18.0",
        _id: "axios@0.18.0",
        _inBundle: !1,
        _integrity: "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
        _location: "/axios",
        _phantomChildren: {},
        _requested: {
            type: "version",
            registry: !0,
            raw: "axios@0.18.0",
            name: "axios",
            escapedName: "axios",
            rawSpec: "0.18.0",
            saveSpec: null,
            fetchSpec: "0.18.0"
        },
        _requiredBy: ["/", "/@types/axios", "/@xunlei/thunderx-login-main"],
        _resolved: "http://xnpm.repo.xunlei.cn/axios/-/axios-0.18.0.tgz",
        _spec: "0.18.0",
        _where: "D:\\jenkins\\workspace\\ThunderPC_AP_Build_Pack\\channel\\trunk\\build\\app",
        author: {name: "Matt Zabriskie"},
        browser: {"./lib/adapters/http.js": "./lib/adapters/xhr.js"},
        bugs: {url: "https://github.com/axios/axios/issues"},
        bundlesize: [{path: "./dist/axios.min.js", threshold: "5kB"}],
        dependencies: {"follow-redirects": "^1.3.0", "is-buffer": "^1.1.5"},
        description: "Promise based HTTP client for the browser and node.js",
        devDependencies: {
            bundlesize: "^0.5.7",
            coveralls: "^2.11.9",
            "es6-promise": "^4.0.5",
            grunt: "^1.0.1",
            "grunt-banner": "^0.6.0",
            "grunt-cli": "^1.2.0",
            "grunt-contrib-clean": "^1.0.0",
            "grunt-contrib-nodeunit": "^1.0.0",
            "grunt-contrib-watch": "^1.0.0",
            "grunt-eslint": "^19.0.0",
            "grunt-karma": "^2.0.0",
            "grunt-ts": "^6.0.0-beta.3",
            "grunt-webpack": "^1.0.18",
            "istanbul-instrumenter-loader": "^1.0.0",
            "jasmine-core": "^2.4.1",
            karma: "^1.3.0",
            "karma-chrome-launcher": "^2.0.0",
            "karma-coverage": "^1.0.0",
            "karma-firefox-launcher": "^1.0.0",
            "karma-jasmine": "^1.0.2",
            "karma-jasmine-ajax": "^0.1.13",
            "karma-opera-launcher": "^1.0.0",
            "karma-safari-launcher": "^1.0.0",
            "karma-sauce-launcher": "^1.1.0",
            "karma-sinon": "^1.0.5",
            "karma-sourcemap-loader": "^0.3.7",
            "karma-webpack": "^1.7.0",
            "load-grunt-tasks": "^3.5.2",
            minimist: "^1.2.0",
            sinon: "^1.17.4",
            typescript: "^2.0.3",
            "url-search-params": "^0.6.1",
            webpack: "^1.13.1",
            "webpack-dev-server": "^1.14.1"
        },
        homepage: "https://github.com/axios/axios",
        keywords: ["xhr", "http", "ajax", "promise", "node"],
        license: "MIT",
        main: "index.js",
        name: "axios",
        repository: {type: "git", url: "git+https://github.com/axios/axios.git"},
        scripts: {
            build: "NODE_ENV=production grunt build",
            coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
            examples: "node ./examples/server.js",
            postversion: "git push && git push --tags",
            preversion: "npm test",
            start: "node ./sandbox/server.js",
            test: "grunt test && bundlesize",
            version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"
        },
        typings: "./index.d.ts",
        version: "0.18.0"
    }
}, function (e, t, i) {
    "use strict";
    var n = i(52);

    function o() {
        this.handlers = []
    }

    o.prototype.use = function (e, t) {
        return this.handlers.push({fulfilled: e, rejected: t}), this.handlers.length - 1
    }, o.prototype.eject = function (e) {
        this.handlers[e] && (this.handlers[e] = null)
    }, o.prototype.forEach = function (e) {
        n.forEach(this.handlers, function (t) {
            null !== t && e(t)
        })
    }, e.exports = o
}, function (e, t, i) {
    "use strict";
    var n = i(52), o = i(630), a = i(509), r = i(379), s = i(631), l = i(632);

    function d(e) {
        e.cancelToken && e.cancelToken.throwIfRequested()
    }

    e.exports = function (e) {
        return d(e), e.baseURL && !s(e.url) && (e.url = l(e.baseURL, e.url)), e.headers = e.headers || {}, e.data = o(e.data, e.headers, e.transformRequest), e.headers = n.merge(e.headers.common || {}, e.headers[e.method] || {}, e.headers || {}), n.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function (t) {
            delete e.headers[t]
        }), (e.adapter || r.adapter)(e).then(function (t) {
            return d(e), t.data = o(t.data, t.headers, e.transformResponse), t
        }, function (t) {
            return a(t) || (d(e), t && t.response && (t.response.data = o(t.response.data, t.response.headers, e.transformResponse))), Promise.reject(t)
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = i(52);
    e.exports = function (e, t, i) {
        return n.forEach(i, function (i) {
            e = i(e, t)
        }), e
    }
}, function (e, t, i) {
    "use strict";
    e.exports = function (e) {
        return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)
    }
}, function (e, t, i) {
    "use strict";
    e.exports = function (e, t) {
        return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e
    }
}, function (e, t, i) {
    "use strict";
    var n = i(510);

    function o(e) {
        if ("function" != typeof e) throw new TypeError("executor must be a function.");
        var t;
        this.promise = new Promise(function (e) {
            t = e
        });
        var i = this;
        e(function (e) {
            i.reason || (i.reason = new n(e), t(i.reason))
        })
    }

    o.prototype.throwIfRequested = function () {
        if (this.reason) throw this.reason
    }, o.source = function () {
        var e;
        return {
            token: new o(function (t) {
                e = t
            }), cancel: e
        }
    }, e.exports = o
}, function (e, t, i) {
    "use strict";
    e.exports = function (e) {
        return function (t) {
            return e.apply(null, t)
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = new class {
        getUserInfo(e, t) {
            let i = "string" == typeof e ? e : "", n = "function" == typeof e ? e : t;
            this.getXdasDatas("memory", "userinfo", function (e) {
                if (e) {
                    let t = "" !== i ? e[i] : e;
                    n && n(t)
                } else n && n(null)
            })
        }

        getAllUserInfo(e, t) {
            let i = "string" == typeof e ? e : "", n = "function" == typeof e ? e : t;
            this.getXdasDatas("memory", "allUserInfo", function (e) {
                if (e) {
                    let t = "" !== i ? e[i] : e;
                    n && n(t)
                } else n && n(null)
            })
        }

        logout() {
            this.saveToXdas("memory", "userinfo", JSON.stringify({userid: "", sessionid: "", loginType: "1"}))
        }

        switchAccount() {
            this.saveToXdas("memory", "userinfo", JSON.stringify({userid: "", sessionid: "", loginType: "2"}))
        }

        retryLogin() {
            this.saveToXdas("memory", "userinfo", JSON.stringify({loginType: "3"}))
        }

        saveToXdas(e, t, i) {
            global.xlNativeCallModule.nativeCall.CallNativeFunction("SaveLoginData", e, t, i, function (e, t) {
            })
        }

        isLogined(e) {
            this.getUserInfo(null, function (t) {
                t && t.userid && "" !== t.userid ? e(!0) : e(!1)
            })
        }

        isAutologin(e) {
            this.getXdasDatas("file", "users", function (t) {
                let i = t || [];
                if (0 == i.length) e(!1); else {
                    let t = i[0];
                    e(!!t.xl_autologin)
                }
            })
        }

        getXdasDatas(e, t, i) {
            global.xlNativeCallModule.nativeCall.CallNativeFunction("LoadLoginData", e, t, function (e, t) {
                let n = "" !== t ? JSON.parse(t) : null;
                i && i(n)
            })
        }

        channel(e) {
            this.saveToXdas("memory", "channel", e)
        }
    };
    t.xlQuickLogin = n
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(8), a = i(25), r = i(13), s = i(10), l = i(125), d = i(0).default.getLogger("Activity");
    t.activityObj = new class {
        constructor() {
            this.activityEnable = !1, this.activityCssPath = "", this.activityUrl = ""
        }

        getActiveConfig() {
            return n(this, void 0, void 0, function* () {
                do {
                    this.activityEnable = !1, yield a.default.isInitedAw();
                    let e = a.default.getConfigInfo("activity", "enable");
                    if (d.information("getActiveConfig activityEnable:", e), null === e || void 0 === e) break;
                    if (1 !== e) break;
                    let t = a.default.getConfigInfo("activity", "url");
                    if (null === t || void 0 === t || "" === t) {
                        d.information("活动url为空");
                        break
                    }
                    let i = `${__rootDir}/static/activity/css/xlx-login-act.css`;
                    if (yield o.FileSystemAWNS.existsAW(i)) {
                        this.activityEnable = !0, this.activityCssPath = i, this.activityUrl = t;
                        let e = {
                            priority: l.LoginOptionNS.Priority.High,
                            perpetual: !0,
                            tabUrl: this.activityUrl,
                            stat: {logfrom: "activity_vip_get"}
                        };
                        l.LoginOptionNS.loginOption.setOption(e)
                    } else d.information("活动css不存在：", i), this.activityEnable = !1, this.activityCssPath = ""
                } while (0);
                d.information("getActiveConfig:", this.activityEnable, this.activityCssPath, this.activityUrl)
            })
        }

        isHaverActivityAw(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    if (null === this.activityEnable || void 0 === this.activityEnable || !1 === this.activityEnable) break;
                    if ("auto" === e) {
                        let e = yield this.getActivityTimerAw();
                        t = this.getCurDate() !== e
                    } else !0 === this.activityEnable && (t = !0)
                } while (0);
                return t
            })
        }

        getActivityInfo() {
            return {
                activityEnable: this.activityEnable,
                activityCssPath: this.activityCssPath,
                activityUrl: this.activityUrl
            }
        }

        setActivityConfig() {
            let e = this.getCurDate();
            s.ConfigNS.setValue("Activity", "Date", e)
        }

        getCurDate() {
            let e = "", t = new Date;
            return e = `${t.getFullYear()}${t.getMonth() + 1}${t.getDate()}`
        }

        getActivityTimerAw() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    s.ConfigNS.attachListener(r.NodeEventMesssageNS.eventConfigInitFinished, () => {
                        let t = s.ConfigNS.getValue("Activity", "Date", "");
                        e(t)
                    })
                })
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(638), a = i(20), r = i(3), s = i(0).default.getLogger("xmp-vip-download-kernel-helper");
    var l;
    !function (e) {
        e.taskInserted = "OnTaskInserted", e.taskCompleted = "OnTaskCompleted", e.taskRemoved = "OnTaskRemoved", e.taskStatusChanged = "OnTaskStatusChanged", e.taskDetailChanged = "OnTaskDetailChanged", e.taskDcdnStatusChanged = "OnTaskDcdnStatusChanged", e.btSubFileDcdnStatusChanged = "OnBtSubFileDcdnStatusChanged", e.btSubFileDetailChanged = "OnBtSubFileDetailChanged"
    }(l = t.DkEventNS || (t.DkEventNS = {}));

    class d extends a.EventEmitter {
        constructor() {
            super(), this.mPeerId = void 0, this.init()
        }

        init() {
            this.setMaxListeners(0)
        }

        getTpPeerId() {
            return n(this, void 0, void 0, function* () {
                if (this.mPeerId) return this.mPeerId;
                {
                    let e = yield r.client.callServerFunction("GetTpPeerId");
                    return e && "" !== e && (this.mPeerId = e), this.mPeerId || ""
                }
            })
        }

        getCurrentCategoryId() {
            return n(this, void 0, void 0, function* () {
                return yield r.client.callServerFunction("GetCurrentCategoryId")
            })
        }

        getTaskBaseInfo(e) {
            return n(this, void 0, void 0, function* () {
                let t = null, i = yield r.client.callServerFunction("GetTaskBaseInfo", e);
                if (i) try {
                    t = JSON.parse(i)
                } catch (e) {
                    s.warning(e)
                }
                return t
            })
        }

        getTaskGcid(e) {
            return n(this, void 0, void 0, function* () {
                let t = yield this.getTaskBaseInfo(e), i = "";
                return t && t.gcid && (i = t.gcid), i
            })
        }

        getTaskStatus(e) {
            return n(this, void 0, void 0, function* () {
                return yield r.client.callServerFunction("GetTaskStatus", e)
            })
        }

        IsTaskExist(e) {
            return n(this, void 0, void 0, function* () {
                return yield r.client.callServerFunction("IsTaskExist", e)
            })
        }

        getTaskDetail(e) {
            return n(this, void 0, void 0, function* () {
                let t = null, i = yield r.client.callServerFunction("GetTaskInfo", e, void 0, "taskDetail");
                s.information("getTaskDetail", i);
                do {
                    if (!i) break;
                    let e = null;
                    try {
                        e = JSON.parse(i)
                    } catch (e) {
                        s.warning(e)
                    }
                    if (!e || !e.fileList) break;
                    let n = e.infoId, a = e.type;
                    t = {infoId: n, files: new Map};
                    for (let i of e.fileList) {
                        let e = -1, r = i.url;
                        a === o.DownloadKernel.TaskType.Bt ? (e = i.index, r = this.createBtFileUrl(i.index, n)) : a === o.DownloadKernel.TaskType.Group && (e = i.taskId);
                        let s = {
                            subId: e,
                            taskStatus: i.status,
                            filePath: i.filePath,
                            fileName: i.fileName,
                            gcid: i.gcid,
                            cid: i.cid,
                            url: r,
                            refUrl: i.refUrl || "",
                            fileSize: i.fileSize,
                            downloadSize: i.downloadSize,
                            errCode: i.errCode,
                            isNeedDownload: i.isNeedDownload,
                            dcdnStatus: i.dcdnStatus
                        };
                        t.files.set(e, s)
                    }
                } while (0);
                return t
            })
        }

        createBtTaskUrl(e) {
            return "bt://" + e
        }

        createBtFileUrl(e, t) {
            let i = this.createBtTaskUrl(t);
            return i = i + "/" + e
        }

        startTask(e) {
            this.operateTask(e, "continue")
        }

        stopTask(e) {
            this.operateTask(e, "pause")
        }

        enableDcdnWithVipCert(e, t) {
            return n(this, void 0, void 0, function* () {
                s.information("enableDcdnWithVipCert", "taskId", e, "vipCert", t), yield r.client.callServerFunction("EnableDcdnWithVipCert", e, t)
            })
        }

        updateDcdnWithVipCert(e, t) {
            return n(this, void 0, void 0, function* () {
                s.information("updateDcdnWithVipCert", "taskId", e, "vipCert", t), yield r.client.callServerFunction("UpdateDcdnWithVipCert", e, t)
            })
        }

        disableDcdnWithVipCert(e) {
            return n(this, void 0, void 0, function* () {
                s.information("disableDcdnWithVipCert", "taskId", e), yield r.client.callServerFunction("DisableDcdnWithVipCert", e)
            })
        }

        getDownloadingActiveTaskId() {
            return n(this, void 0, void 0, function* () {
                return yield r.client.callServerFunction("GetDownloadingActiveTaskId")
            })
        }

        attachDkEvents() {
            r.client.attachServerEvent("OnTaskInserted", this.onTaskInserted.bind(this)), r.client.attachServerEvent("OnTaskRemoved", this.onTaskRemoved.bind(this)), r.client.attachServerEvent("OnTaskStatusChanged", (e, t) => {
                {
                    let e = null;
                    try {
                        e = JSON.parse(t)
                    } catch (e) {
                        s.warning(e)
                    }
                    if (null !== e) for (let t in e) {
                        let i = e[t];
                        this.onTaskStatusChanged(Number(t), i)
                    }
                }
            }), r.client.attachServerEvent("OnTaskDetailChanged", (e, t, i) => {
                t.forEach(e => n(this, void 0, void 0, function* () {
                    this.onTaskDetailChanged(Number(e), yield this.getTaskBaseInfo(e))
                }))
            }), r.client.attachServerEvent("OnTaskDcdnStatusChanged", (e, t) => {
                if (null !== t) for (let e in t) {
                    let i = t[e];
                    this.onTaskDcdnStatusChanged(Number(e), i)
                }
            }), r.client.attachServerEvent("OnBtSubFileDcdnStatusChanged", this.onBtSubFileDcdnStatusChanged.bind(this)), r.client.attachServerEvent("OnBtSubFileDetailChanged", (e, t, i) => {
                {
                    let e = null;
                    try {
                        e = JSON.parse(i)
                    } catch (e) {
                        s.warning(e)
                    }
                    null !== e && this.onBtSubFileDetailChanged(t, e)
                }
            })
        }

        operateTask(e, t, i) {
            r.client.callServerFunction("OperateTask", e, t, i).catch()
        }

        onTaskInserted(e, t, i, n) {
            if (s.information("onTaskInserted categoryId:", t, ", categoryViewId:", i), null !== n) switch (i) {
                case o.DownloadKernel.CategroyViewID.Downloading:
                    n.forEach(e => {
                        this.emit(l.taskInserted, e)
                    });
                    break;
                case o.DownloadKernel.CategroyViewID.Completed:
                    n.forEach(e => {
                        this.emit(l.taskCompleted, e)
                    })
            }
        }

        onTaskRemoved(e, t, i, n) {
            if (s.information("onTaskRemoved categoryId:", t, ", categoryViewId:", i), n) switch (i) {
                case o.DownloadKernel.CategroyViewID.Downloading:
                case o.DownloadKernel.CategroyViewID.Completed:
                    n.forEach(e => {
                        this.emit(l.taskRemoved, e)
                    })
            }
        }

        onTaskStatusChanged(e, t) {
            this.emit(l.taskStatusChanged, e, t)
        }

        onTaskDetailChanged(e, t) {
            this.emit(l.taskDetailChanged, e, t)
        }

        onTaskDcdnStatusChanged(e, t) {
            this.emit(l.taskDcdnStatusChanged, e, t)
        }

        onBtSubFileDcdnStatusChanged(e, t, i, n) {
            this.emit(l.btSubFileDcdnStatusChanged, t, i, n)
        }

        onBtSubFileDetailChanged(e, t) {
            this.emit(l.btSubFileDetailChanged, e, t)
        }
    }

    t.DkHelper = d, t.default = new d
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t, i, n, o, a, r, s, l, d, u, c, h, f, p, g, m, v, y, T;
        !function (e) {
            e[e.Unkown = 0] = "Unkown", e[e.Create = 1] = "Create", e[e.InvaldParam = 2] = "InvaldParam", e[e.InvaldLink = 3] = "InvaldLink", e[e.InvaldConfig = 4] = "InvaldConfig", e[e.Timeout = 5] = "Timeout", e[e.VerifyData = 6] = "VerifyData", e[e.Forbidden = 7] = "Forbidden", e[e.RangeDispatch = 8] = "RangeDispatch", e[e.FilePathOverRanging = 9] = "FilePathOverRanging", e[e.FileCreate = 201] = "FileCreate", e[e.FileWrite = 202] = "FileWrite", e[e.FileRead = 203] = "FileRead", e[e.FileRename = 204] = "FileRename", e[e.FileFull = 205] = "FileFull", e[e.BtUploadExist = 601] = "BtUploadExist", e[e.ForbinddenResource = 701] = "ForbinddenResource", e[e.ForbinddenAccount = 702] = "ForbinddenAccount", e[e.ForbinddenArea = 703] = "ForbinddenArea", e[e.ForbinddenCopyright = 704] = "ForbinddenCopyright", e[e.ForbinddenReaction = 705] = "ForbinddenReaction", e[e.ForbinddenPorn = 706] = "ForbinddenPorn", e[e.DownloadSDKCrash = 10001] = "DownloadSDKCrash"
        }(t = e.TaskError || (e.TaskError = {})), function (e) {
            e[e.Unkown = -1] = "Unkown", e[e.Success = 0] = "Success", e[e.QueryFailed = 1] = "QueryFailed", e[e.ServerError = 2] = "ServerError", e[e.ResourceNotFound = 3] = "ResourceNotFound", e[e.AuthorizingFailed = 4] = "AuthorizingFailed", e[e.ForbidByCopyright = 5] = "ForbidByCopyright", e[e.ForbidByPorNoGraphy = 6] = "ForbidByPorNoGraphy", e[e.ForbidByReactionary = 7] = "ForbidByReactionary", e[e.ForbidByOtherFilter = 8] = "ForbidByOtherFilter"
        }(i = e.DcdnStatusCode || (e.DcdnStatusCode = {})), function (e) {
            e[e.Begin = -1] = "Begin", e[e.Unkown = 0] = "Unkown", e[e.StandBy = 1] = "StandBy", e[e.PreDownloading = 2] = "PreDownloading", e[e.StartWaiting = 3] = "StartWaiting", e[e.StartPending = 4] = "StartPending", e[e.Started = 5] = "Started", e[e.StopPending = 6] = "StopPending", e[e.Stopped = 7] = "Stopped", e[e.Succeeded = 8] = "Succeeded", e[e.Failed = 9] = "Failed", e[e.Seeding = 10] = "Seeding", e[e.DestroyPending = 11] = "DestroyPending", e[e.End = 12] = "End"
        }(n = e.TaskStatus || (e.TaskStatus = {})), function (e) {
            e[e.Begin = -1] = "Begin", e[e.StandBy = 0] = "StandBy", e[e.Stopped = 1] = "Stopped", e[e.Started = 2] = "Started", e[e.Complete = 3] = "Complete", e[e.Forbidden = 4] = "Forbidden", e[e.Error = 5] = "Error", e[e.End = 6] = "End"
        }(o = e.BtFileStatus || (e.BtFileStatus = {})), function (e) {
            e[e.DispatchStrategyNone = 0] = "DispatchStrategyNone", e[e.DispatchStrategyOrigin = 1] = "DispatchStrategyOrigin", e[e.DispatchStrategyP2s = 2] = "DispatchStrategyP2s", e[e.DispatchStrategyP2p = 4] = "DispatchStrategyP2p", e[e.DispatchStrategyAll = -1] = "DispatchStrategyAll"
        }(a = e.DispatchStrategy || (e.DispatchStrategy = {})), function (e) {
            e[e.Unkown = 0] = "Unkown", e[e.P2sp = 1] = "P2sp", e[e.Bt = 2] = "Bt", e[e.Emule = 3] = "Emule", e[e.Group = 4] = "Group", e[e.Magnet = 5] = "Magnet"
        }(r = e.TaskType || (e.TaskType = {})), function (e) {
            e.Unkown = "Unkown", e.Downloading = "Downloading", e.Completed = "Completed", e.Recycle = "Recycle"
        }(s = e.CategroyViewID || (e.CategroyViewID = {})), function (e) {
            e[e.Unknow = 0] = "Unknow", e[e.TaskCreated = 1] = "TaskCreated", e[e.InsertToCategoryView = 2] = "InsertToCategoryView", e[e.RemoveFromCategoryView = 3] = "RemoveFromCategoryView", e[e.StatusChanged = 4] = "StatusChanged", e[e.DetailChanged = 5] = "DetailChanged", e[e.ChannelInfoChanged = 6] = "ChannelInfoChanged", e[e.DcdnStatusChanged = 7] = "DcdnStatusChanged", e[e.TaskDescriptionChanged = 8] = "TaskDescriptionChanged", e[e.TaskUserRead = 9] = "TaskUserRead", e[e.TaskRenamed = 10] = "TaskRenamed", e[e.TaskMovedEnd = 11] = "TaskMovedEnd", e[e.TaskMovingStateChange = 12] = "TaskMovingStateChange", e[e.BtSubFileDetailChanged = 13] = "BtSubFileDetailChanged", e[e.BtSubFileLoaded = 14] = "BtSubFileLoaded", e[e.BtSubFileForbidden = 15] = "BtSubFileForbidden", e[e.BtSubFileDcdnStatusChanged = 16] = "BtSubFileDcdnStatusChanged", e[e.TaskCategoryMovedEnd = 17] = "TaskCategoryMovedEnd", e[e.GroupTaskSubFileDetailChanged = 18] = "GroupTaskSubFileDetailChanged", e[e.TaskDestroying = 19] = "TaskDestroying", e[e.TaskDestroyed = 20] = "TaskDestroyed"
        }(l = e.TaskEventType || (e.TaskEventType = {})), function (e) {
            e[e.NumberStrart = 0] = "NumberStrart", e[e.TaskId = 1] = "TaskId", e[e.VirtualId = 2] = "VirtualId", e[e.SrcTotal = 3] = "SrcTotal", e[e.SrcUsing = 4] = "SrcUsing", e[e.FileSize = 5] = "FileSize", e[e.ReceivedSize = 6] = "ReceivedSize", e[e.DownloadSize = 7] = "DownloadSize", e[e.CreateTime = 8] = "CreateTime", e[e.CompletionTime = 9] = "CompletionTime", e[e.DownloadingPeriod = 10] = "DownloadingPeriod", e[e.Progress = 11] = "Progress", e[e.RecycleTime = 12] = "RecycleTime", e[e.FileCreated = 13] = "FileCreated", e[e.Forbidden = 14] = "Forbidden", e[e.CategoryId = 15] = "CategoryId", e[e.UserRead = 16] = "UserRead", e[e.OpenOnComplete = 17] = "OpenOnComplete", e[e.GroupTaskId = 18] = "GroupTaskId", e[e.DownloadSubTask = 19] = "DownloadSubTask", e[e.NameType = 20] = "NameType", e[e.OwnerProduct = 21] = "OwnerProduct", e[e.FileIndex = 22] = "FileIndex", e[e.NumberEnd = 23] = "NumberEnd", e[e.BooleanStart = 24] = "BooleanStart", e[e.Destroyed = 25] = "Destroyed", e[e.Background = 26] = "Background", e[e.Moving = 27] = "Moving", e[e.BooleanEnd = 28] = "BooleanEnd", e[e.StringStart = 29] = "StringStart", e[e.TaskName = 30] = "TaskName", e[e.SavePath = 31] = "SavePath", e[e.RelativePath = 32] = "RelativePath", e[e.TaskUrl = 33] = "TaskUrl", e[e.RefUrl = 34] = "RefUrl", e[e.Cid = 35] = "Cid", e[e.Gcid = 36] = "Gcid", e[e.Cookie = 37] = "Cookie", e[e.ProductInfo = 38] = "ProductInfo", e[e.Origin = 39] = "Origin", e[e.Description = 40] = "Description", e[e.UserData = 41] = "UserData", e[e.StringEnd = 42] = "StringEnd", e[e.ObjectStart = 43] = "ObjectStart", e[e.ObjectEnd = 44] = "ObjectEnd", e[e.CategoryViewId = 45] = "CategoryViewId", e[e.TaskType = 46] = "TaskType", e[e.ErrorCode = 47] = "ErrorCode"
        }(d = e.TaskAttribute || (e.TaskAttribute = {})), function (e) {
            e[e.UnKnown = 0] = "UnKnown", e[e.SrcTotal = 1] = "SrcTotal", e[e.SrcUsing = 2] = "SrcUsing", e[e.FileSize = 4] = "FileSize", e[e.ReceivedSize = 8] = "ReceivedSize", e[e.DownloadSize = 16] = "DownloadSize", e[e.CompletionTime = 32] = "CompletionTime", e[e.DownloadingPeriod = 64] = "DownloadingPeriod", e[e.Progress = 128] = "Progress", e[e.RecycleTime = 256] = "RecycleTime", e[e.FileCreated = 512] = "FileCreated", e[e.Forbidden = 1024] = "Forbidden", e[e.UserRead = 2048] = "UserRead", e[e.OpenOnComplete = 4096] = "OpenOnComplete", e[e.DownloadSubTask = 8192] = "DownloadSubTask", e[e.TaskName = 16384] = "TaskName", e[e.SavePath = 32768] = "SavePath", e[e.Cid = 65536] = "Cid", e[e.Gcid = 131072] = "Gcid", e[e.UserData = 262144] = "UserData", e[e.CategoryViewId = 524288] = "CategoryViewId", e[e.ErrorCode = 1048576] = "ErrorCode", e[e.TaskSpeed = 2097152] = "TaskSpeed", e[e.ChannelInfo = 4194304] = "ChannelInfo"
        }(u = e.TaskDetailChangedFlags || (e.TaskDetailChangedFlags = {})), function (e) {
            e[e.UnKnown = 0] = "UnKnown"
        }(c = e.BtSubFileDetailChangedFlags || (e.BtSubFileDetailChangedFlags = {})), function (e) {
            e[e.UnKnown = 0] = "UnKnown"
        }(h = e.GroupTaskSubFileDetailChangedFlags || (e.GroupTaskSubFileDetailChangedFlags = {})), function (e) {
            e[e.NumberStrart = 0] = "NumberStrart", e[e.TaskId = 1] = "TaskId", e[e.FileStatus = 2] = "FileStatus", e[e.DownloadSize = 3] = "DownloadSize", e[e.FileSize = 4] = "FileSize", e[e.EnableDcdn = 5] = "EnableDcdn", e[e.ErrorCode = 6] = "ErrorCode", e[e.DcdnStatus = 7] = "DcdnStatus", e[e.RealIndex = 8] = "RealIndex", e[e.FileOffset = 9] = "FileOffset", e[e.Visible = 10] = "Visible", e[e.Download = 11] = "Download", e[e.NumberEnd = 12] = "NumberEnd", e[e.StringStart = 13] = "StringStart", e[e.FinalName = 14] = "FinalName", e[e.RelativePath = 15] = "RelativePath", e[e.FileName = 16] = "FileName", e[e.FilePath = 17] = "FilePath", e[e.Cid = 18] = "Cid", e[e.Gcid = 19] = "Gcid", e[e.StringEnd = 20] = "StringEnd"
        }(f = e.BtFileAttribute || (e.BtFileAttribute = {})), function (e) {
            e[e.P2spUrl = 0] = "P2spUrl", e[e.BtInfoId = 1] = "BtInfoId", e[e.EmuleFileHash = 2] = "EmuleFileHash", e[e.MagnetUrl = 3] = "MagnetUrl", e[e.GroupTaskName = 4] = "GroupTaskName"
        }(p = e.KeyType || (e.KeyType = {})), function (e) {
            e[e.NameInclude = 1] = "NameInclude", e[e.BtDisplayNameInclude = 2] = "BtDisplayNameInclude"
        }(g = e.SearchKeyType || (e.SearchKeyType = {})), function (e) {
            e[e.ExtEqual = 1] = "ExtEqual", e[e.NameLikeAndExtEqual = 2] = "NameLikeAndExtEqual", e[e.TaskTypeEqual = 4] = "TaskTypeEqual"
        }(m = e.FilterKeyType || (e.FilterKeyType = {})), function (e) {
            e[e.All = 0] = "All", e[e.CommonForeground = 1] = "CommonForeground", e[e.CommonBackground = 2] = "CommonBackground", e[e.Temporary = 3] = "Temporary", e[e.PreDownload = 4] = "PreDownload", e[e.PrivateForeground = 5] = "PrivateForeground"
        }(v = e.KeyFilter || (e.KeyFilter = {})), function (e) {
            e[e.Unknown = -1] = "Unknown", e[e.LoadTaskBasic = 0] = "LoadTaskBasic", e[e.Create = 1] = "Create", e[e.Recycle = 2] = "Recycle", e[e.Recover = 3] = "Recover", e[e.ReDownload = 4] = "ReDownload", e[e.MoveThoughCategory = 5] = "MoveThoughCategory"
        }(y = e.TaskInsertReason || (e.TaskInsertReason = {})), function (e) {
            e[e.Unknown = -1] = "Unknown", e[e.ContextMenu = 0] = "ContextMenu", e[e.Button = 1] = "Button", e[e.TaskDetail = 2] = "TaskDetail", e[e.DownloadMagnet = 3] = "DownloadMagnet", e[e.ToolbarButton = 4] = "ToolbarButton", e[e.SelectDownloadLists = 5] = "SelectDownloadLists", e[e.DeleteTask = 6] = "DeleteTask"
        }(T = e.TaskStopReason || (e.TaskStopReason = {}))
    }(t.DownloadKernel || (t.DownloadKernel = {}))
}, function (e, t) {
    function i(e) {
        var t = new Error("Cannot find module '" + e + "'");
        throw t.code = "MODULE_NOT_FOUND", t
    }

    i.keys = function () {
        return []
    }, i.resolve = i, e.exports = i, i.id = 639
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e[e.NONE = 0] = "NONE", e[e.FAILED = -2] = "FAILED", e[e.ABORTED = -3] = "ABORTED", e[e.INVALID_ARGUMENT = -4] = "INVALID_ARGUMENT", e[e.INVALID_HANDLE = -5] = "INVALID_HANDLE", e[e.FILE_NOT_FOUND = -6] = "FILE_NOT_FOUND", e[e.TIMED_OUT = -7] = "TIMED_OUT", e[e.FILE_TOO_BIG = -8] = "FILE_TOO_BIG", e[e.UNEXPECTED = -9] = "UNEXPECTED", e[e.ACCESS_DENIED = -10] = "ACCESS_DENIED", e[e.NOT_IMPLEMENTED = -11] = "NOT_IMPLEMENTED", e[e.CONNECTION_CLOSED = -100] = "CONNECTION_CLOSED", e[e.CONNECTION_RESET = -101] = "CONNECTION_RESET", e[e.CONNECTION_REFUSED = -102] = "CONNECTION_REFUSED", e[e.CONNECTION_ABORTED = -103] = "CONNECTION_ABORTED", e[e.CONNECTION_FAILED = -104] = "CONNECTION_FAILED", e[e.NAME_NOT_RESOLVED = -105] = "NAME_NOT_RESOLVED", e[e.INTERNET_DISCONNECTED = -106] = "INTERNET_DISCONNECTED", e[e.SSL_PROTOCOL_ERROR = -107] = "SSL_PROTOCOL_ERROR", e[e.ADDRESS_INVALID = -108] = "ADDRESS_INVALID", e[e.ADDRESS_UNREACHABLE = -109] = "ADDRESS_UNREACHABLE", e[e.SSL_CLIENT_AUTH_CERT_NEEDED = -110] = "SSL_CLIENT_AUTH_CERT_NEEDED", e[e.TUNNEL_CONNECTION_FAILED = -111] = "TUNNEL_CONNECTION_FAILED", e[e.NO_SSL_VERSIONS_ENABLED = -112] = "NO_SSL_VERSIONS_ENABLED", e[e.SSL_VERSION_OR_CIPHER_MISMATCH = -113] = "SSL_VERSION_OR_CIPHER_MISMATCH", e[e.SSL_RENEGOTIATION_REQUESTED = -114] = "SSL_RENEGOTIATION_REQUESTED", e[e.CERT_COMMON_NAME_INVALID = -200] = "CERT_COMMON_NAME_INVALID", e[e.CERT_BEGIN = -200] = "CERT_BEGIN", e[e.CERT_DATE_INVALID = -201] = "CERT_DATE_INVALID", e[e.CERT_AUTHORITY_INVALID = -202] = "CERT_AUTHORITY_INVALID", e[e.CERT_CONTAINS_ERRORS = -203] = "CERT_CONTAINS_ERRORS", e[e.CERT_NO_REVOCATION_MECHANISM = -204] = "CERT_NO_REVOCATION_MECHANISM", e[e.CERT_UNABLE_TO_CHECK_REVOCATION = -205] = "CERT_UNABLE_TO_CHECK_REVOCATION", e[e.CERT_REVOKED = -206] = "CERT_REVOKED", e[e.CERT_INVALID = -207] = "CERT_INVALID", e[e.CERT_WEAK_SIGNATURE_ALGORITHM = -208] = "CERT_WEAK_SIGNATURE_ALGORITHM", e[e.CERT_NON_UNIQUE_NAME = -210] = "CERT_NON_UNIQUE_NAME", e[e.CERT_WEAK_KEY = -211] = "CERT_WEAK_KEY", e[e.CERT_NAME_CONSTRAINT_VIOLATION = -212] = "CERT_NAME_CONSTRAINT_VIOLATION", e[e.CERT_VALIDITY_TOO_LONG = -213] = "CERT_VALIDITY_TOO_LONG", e[e.CERT_END = -213] = "CERT_END", e[e.INVALID_URL = -300] = "INVALID_URL", e[e.DISALLOWED_URL_SCHEME = -301] = "DISALLOWED_URL_SCHEME", e[e.UNKNOWN_URL_SCHEME = -302] = "UNKNOWN_URL_SCHEME", e[e.TOO_MANY_REDIRECTS = -310] = "TOO_MANY_REDIRECTS", e[e.UNSAFE_REDIRECT = -311] = "UNSAFE_REDIRECT", e[e.UNSAFE_PORT = -312] = "UNSAFE_PORT", e[e.INVALID_RESPONSE = -320] = "INVALID_RESPONSE", e[e.INVALID_CHUNKED_ENCODING = -321] = "INVALID_CHUNKED_ENCODING", e[e.METHOD_NOT_SUPPORTED = -322] = "METHOD_NOT_SUPPORTED", e[e.UNEXPECTED_PROXY_AUTH = -323] = "UNEXPECTED_PROXY_AUTH", e[e.EMPTY_RESPONSE = -324] = "EMPTY_RESPONSE", e[e.RESPONSE_HEADERS_TOO_BIG = -325] = "RESPONSE_HEADERS_TOO_BIG", e[e.CACHE_MISS = -400] = "CACHE_MISS", e[e.INSECURE_RESPONSE = -501] = "INSECURE_RESPONSE"
    }(t.ErrorCode || (t.ErrorCode = {})), function (e) {
        e[e.UNKNOWN = 0] = "UNKNOWN", e[e.CURRENT_TAB = 1] = "CURRENT_TAB", e[e.SINGLETON_TAB = 2] = "SINGLETON_TAB", e[e.NEW_FOREGROUND_TAB = 3] = "NEW_FOREGROUND_TAB", e[e.NEW_BACKGROUND_TAB = 4] = "NEW_BACKGROUND_TAB", e[e.NEW_POPUP = 5] = "NEW_POPUP", e[e.NEW_WINDOW = 6] = "NEW_WINDOW", e[e.SAVE_TO_DISK = 7] = "SAVE_TO_DISK", e[e.OFF_THE_RECORD = 8] = "OFF_THE_RECORD", e[e.IGNORE_ACTION = 9] = "IGNORE_ACTION"
    }(t.WindowOpenDisposition || (t.WindowOpenDisposition = {})), function (e) {
        e[e.LINK = 0] = "LINK", e[e.EXPLICIT = 1] = "EXPLICIT", e[e.AUTO_SUBFRAME = 3] = "AUTO_SUBFRAME", e[e.MANUAL_SUBFRAME = 4] = "MANUAL_SUBFRAME", e[e.FORM_SUBMIT = 7] = "FORM_SUBMIT", e[e.RELOAD = 8] = "RELOAD", e[e.SOURCE_MASK = 255] = "SOURCE_MASK", e[e.BLOCKED_FLAG = 8388608] = "BLOCKED_FLAG", e[e.FORWARD_BACK_FLAG = 16777216] = "FORWARD_BACK_FLAG", e[e.CHAIN_START_FLAG = 268435456] = "CHAIN_START_FLAG", e[e.CHAIN_END_FLAG = 536870912] = "CHAIN_END_FLAG", e[e.CLIENT_REDIRECT_FLAG = 1073741824] = "CLIENT_REDIRECT_FLAG", e[e.SERVER_REDIRECT_FLAG = 2147483648] = "SERVER_REDIRECT_FLAG", e[e.IS_REDIRECT_MASK = 3221225472] = "IS_REDIRECT_MASK", e[e.QUALIFIER_MASK = 4294967040] = "QUALIFIER_MASK"
    }(t.TransitionType || (t.TransitionType = {})), function (e) {
        e[e.NONE = 0] = "NONE", e[e.LEFT_DOWN = 16] = "LEFT_DOWN", e[e.MIDDLE_DOWN = 32] = "MIDDLE_DOWN", e[e.RIGHT_DOWN = 64] = "RIGHT_DOWN"
    }(t.MouseModifiers || (t.MouseModifiers = {})), function (e) {
        e[e.F5 = 116] = "F5", e[e.R = 82] = "R", e[e.T = 84] = "T", e[e.W = 87] = "W"
    }(t.Key || (t.Key = {})), function (e) {
        e[e.NONE = 0] = "NONE", e[e.CAPS_LOCK_ON = 1] = "CAPS_LOCK_ON", e[e.SHIFT_DOWN = 2] = "SHIFT_DOWN", e[e.CTRL_DOWN = 4] = "CTRL_DOWN", e[e.ALT_DOWN = 8] = "ALT_DOWN"
    }(t.KeyModifiers || (t.KeyModifiers = {})), function (e) {
        e[e.NONE = 0] = "NONE", e[e.PAGE = 1] = "PAGE", e[e.FRAME = 2] = "FRAME", e[e.LINK = 4] = "LINK", e[e.MEDIA = 8] = "MEDIA", e[e.SELECTION = 16] = "SELECTION", e[e.EDITABLE = 32] = "EDITABLE"
    }(t.PopupElemTypeFlag || (t.PopupElemTypeFlag = {})), function (e) {
        e[e.NONE = 0] = "NONE", e[e.IMAGE = 1] = "IMAGE", e[e.VIDEO = 2] = "VIDEO", e[e.AUDIO = 3] = "AUDIO", e[e.FILE = 4] = "FILE", e[e.PLUGIN = 5] = "PLUGIN"
    }(t.MediaElemType || (t.MediaElemType = {})), function (e) {
        e[e.NONE = 0] = "NONE", e[e.ERROR = 1] = "ERROR", e[e.PAUSED = 2] = "PAUSED", e[e.MUTED = 4] = "MUTED", e[e.LOOP = 8] = "LOOP", e[e.CAN_SAVE = 16] = "CAN_SAVE", e[e.HAS_AUDIO = 32] = "HAS_AUDIO", e[e.HAS_VIDEO = 64] = "HAS_VIDEO", e[e.CONTROL_ROOT_ELEMENT = 128] = "CONTROL_ROOT_ELEMENT", e[e.CAN_PRINT = 256] = "CAN_PRINT", e[e.CAN_ROTATE = 512] = "CAN_ROTATE"
    }(t.MediaElemStateFlag || (t.MediaElemStateFlag = {})), function (e) {
        e[e.NONE = 0] = "NONE", e[e.CAN_UNDO = 1] = "CAN_UNDO", e[e.CAN_REDO = 2] = "CAN_REDO", e[e.ESFG_CAN_CUT = 4] = "ESFG_CAN_CUT", e[e.CAN_COPY = 8] = "CAN_COPY", e[e.CAN_PASTE = 16] = "CAN_PASTE", e[e.CAN_DELETE = 32] = "CAN_DELETE", e[e.CAN_SELECT_ALL = 64] = "CAN_SELECT_ALL", e[e.CAN_TRANSLATE = 128] = "CAN_TRANSLATE"
    }(t.EditStateFlag || (t.EditStateFlag = {}))
}, function (e, t, i) {
    (function () {
        "use strict";
        var e, n, o, a, r, s = {}.hasOwnProperty;
        e = i(642), n = i(386).defaults, a = function (e) {
            return "string" == typeof e && (e.indexOf("&") >= 0 || e.indexOf(">") >= 0 || e.indexOf("<") >= 0)
        }, r = function (e) {
            return "<![CDATA[" + o(e) + "]]>"
        }, o = function (e) {
            return e.replace("]]>", "]]]]><![CDATA[>")
        }, t.Builder = function () {
            function t(e) {
                var t, i, o;
                for (t in this.options = {}, i = n[.2]) s.call(i, t) && (o = i[t], this.options[t] = o);
                for (t in e) s.call(e, t) && (o = e[t], this.options[t] = o)
            }

            return t.prototype.buildObject = function (t) {
                var i, o, l, d, u, c;
                return i = this.options.attrkey, o = this.options.charkey, 1 === Object.keys(t).length && this.options.rootName === n[.2].rootName ? t = t[u = Object.keys(t)[0]] : u = this.options.rootName, c = this, l = function (e, t) {
                    var n, d, u, h, f, p;
                    if ("object" != typeof t) c.options.cdata && a(t) ? e.raw(r(t)) : e.txt(t); else if (Array.isArray(t)) {
                        for (h in t) if (s.call(t, h)) for (f in d = t[h]) u = d[f], e = l(e.ele(f), u).up()
                    } else for (f in t) if (s.call(t, f)) if (d = t[f], f === i) {
                        if ("object" == typeof d) for (n in d) p = d[n], e = e.att(n, p)
                    } else if (f === o) e = c.options.cdata && a(d) ? e.raw(r(d)) : e.txt(d); else if (Array.isArray(d)) for (h in d) s.call(d, h) && (e = "string" == typeof (u = d[h]) ? c.options.cdata && a(u) ? e.ele(f).raw(r(u)).up() : e.ele(f, u).up() : l(e.ele(f), u).up()); else "object" == typeof d ? e = l(e.ele(f), d).up() : "string" == typeof d && c.options.cdata && a(d) ? e = e.ele(f).raw(r(d)).up() : (null == d && (d = ""), e = e.ele(f, d.toString()).up());
                    return e
                }, d = e.create(u, this.options.xmldec, this.options.doctype, {
                    headless: this.options.headless,
                    allowSurrogateChars: this.options.allowSurrogateChars
                }), l(d, t).end(this.options.renderOpts)
            }, t
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n, o, a, r, s, l;
        l = i(76), r = l.assign, s = l.isFunction, t = i(643), n = i(644), a = i(387), o = i(645), e.exports.create = function (e, i, n, o) {
            var a, s;
            if (null == e) throw new Error("Root element needs a name");
            return o = r({}, i, n, o), s = (a = new t(o)).element(e), o.headless || (a.declaration(o), null == o.pubID && null == o.sysID || a.doctype(o)), s
        }, e.exports.begin = function (e, i, o) {
            var a;
            return s(e) && (i = (a = [e, i])[0], o = a[1], e = {}), i ? new n(e, i, o) : new t(e)
        }, e.exports.stringWriter = function (e) {
            return new a(e)
        }, e.exports.streamWriter = function (e, t) {
            return new o(e, t)
        }
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n, o, a, r = {}.hasOwnProperty;
        a = i(76).isPlainObject, t = i(54), o = i(517), n = i(387), e.exports = function (e) {
            function i(e) {
                i.__super__.constructor.call(this, null), e || (e = {}), e.writer || (e.writer = new n), this.options = e, this.stringify = new o(e), this.isDocument = !0
            }

            return function (e, t) {
                for (var i in t) r.call(t, i) && (e[i] = t[i]);

                function n() {
                    this.constructor = e
                }

                n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
            }(i, t), i.prototype.end = function (e) {
                var t;
                return e ? a(e) && (t = e, e = this.options.writer.set(t)) : e = this.options.writer, e.document(this)
            }, i.prototype.toString = function (e) {
                return this.options.writer.set(e).document(this)
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n, o, a, r, s, l, d, u, c, h, f, p, g, m, v, y, T, w, k = {}.hasOwnProperty;
        w = i(76), y = w.isObject, v = w.isFunction, T = w.isPlainObject, c = i(129), n = i(130), o = i(131), f = i(138), m = i(139), h = i(140), d = i(132), u = i(133), a = i(134), s = i(135), r = i(136), l = i(137), t = i(516), g = i(517), p = i(387), e.exports = function () {
            function e(e, t, i) {
                var n;
                e || (e = {}), e.writer ? T(e.writer) && (n = e.writer, e.writer = new p(n)) : e.writer = new p(e), this.options = e, this.writer = e.writer, this.stringify = new g(e), this.onDataCallback = t || function () {
                }, this.onEndCallback = i || function () {
                }, this.currentNode = null, this.currentLevel = -1, this.openTags = {}, this.documentStarted = !1, this.documentCompleted = !1, this.root = null
            }

            return e.prototype.node = function (e, t, i) {
                var n;
                if (null == e) throw new Error("Missing node name");
                if (this.root && -1 === this.currentLevel) throw new Error("Document can only have one root node");
                return this.openCurrent(), e = e.valueOf(), null == t && (t = {}), t = t.valueOf(), y(t) || (i = (n = [t, i])[0], t = n[1]), this.currentNode = new c(this, e, t), this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, null != i && this.text(i), this
            }, e.prototype.element = function (e, t, i) {
                return this.currentNode && this.currentNode instanceof u ? this.dtdElement.apply(this, arguments) : this.node(e, t, i)
            }, e.prototype.attribute = function (e, i) {
                var n, o;
                if (!this.currentNode || this.currentNode.children) throw new Error("att() can only be used immediately after an ele() call in callback mode");
                if (null != e && (e = e.valueOf()), y(e)) for (n in e) k.call(e, n) && (o = e[n], this.attribute(n, o)); else v(i) && (i = i.apply()), this.options.skipNullAttributes && null == i || (this.currentNode.attributes[e] = new t(this, e, i));
                return this
            }, e.prototype.text = function (e) {
                var t;
                return this.openCurrent(), t = new m(this, e), this.onData(this.writer.text(t, this.currentLevel + 1)), this
            }, e.prototype.cdata = function (e) {
                var t;
                return this.openCurrent(), t = new n(this, e), this.onData(this.writer.cdata(t, this.currentLevel + 1)), this
            }, e.prototype.comment = function (e) {
                var t;
                return this.openCurrent(), t = new o(this, e), this.onData(this.writer.comment(t, this.currentLevel + 1)), this
            }, e.prototype.raw = function (e) {
                var t;
                return this.openCurrent(), t = new f(this, e), this.onData(this.writer.raw(t, this.currentLevel + 1)), this
            }, e.prototype.instruction = function (e, t) {
                var i, n, o, a, r;
                if (this.openCurrent(), null != e && (e = e.valueOf()), null != t && (t = t.valueOf()), Array.isArray(e)) for (i = 0, a = e.length; i < a; i++) n = e[i], this.instruction(n); else if (y(e)) for (n in e) k.call(e, n) && (o = e[n], this.instruction(n, o)); else v(t) && (t = t.apply()), r = new h(this, e, t), this.onData(this.writer.processingInstruction(r, this.currentLevel + 1));
                return this
            }, e.prototype.declaration = function (e, t, i) {
                var n;
                if (this.openCurrent(), this.documentStarted) throw new Error("declaration() must be the first node");
                return n = new d(this, e, t, i), this.onData(this.writer.declaration(n, this.currentLevel + 1)), this
            }, e.prototype.doctype = function (e, t, i) {
                if (this.openCurrent(), null == e) throw new Error("Missing root node name");
                if (this.root) throw new Error("dtd() must come before the root node");
                return this.currentNode = new u(this, t, i), this.currentNode.rootNodeName = e, this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, this
            }, e.prototype.dtdElement = function (e, t) {
                var i;
                return this.openCurrent(), i = new r(this, e, t), this.onData(this.writer.dtdElement(i, this.currentLevel + 1)), this
            }, e.prototype.attList = function (e, t, i, n, o) {
                var r;
                return this.openCurrent(), r = new a(this, e, t, i, n, o), this.onData(this.writer.dtdAttList(r, this.currentLevel + 1)), this
            }, e.prototype.entity = function (e, t) {
                var i;
                return this.openCurrent(), i = new s(this, !1, e, t), this.onData(this.writer.dtdEntity(i, this.currentLevel + 1)), this
            }, e.prototype.pEntity = function (e, t) {
                var i;
                return this.openCurrent(), i = new s(this, !0, e, t), this.onData(this.writer.dtdEntity(i, this.currentLevel + 1)), this
            }, e.prototype.notation = function (e, t) {
                var i;
                return this.openCurrent(), i = new l(this, e, t), this.onData(this.writer.dtdNotation(i, this.currentLevel + 1)), this
            }, e.prototype.up = function () {
                if (this.currentLevel < 0) throw new Error("The document node has no parent");
                return this.currentNode ? (this.currentNode.children ? this.closeNode(this.currentNode) : this.openNode(this.currentNode), this.currentNode = null) : this.closeNode(this.openTags[this.currentLevel]), delete this.openTags[this.currentLevel], this.currentLevel--, this
            }, e.prototype.end = function () {
                for (; this.currentLevel >= 0;) this.up();
                return this.onEnd()
            }, e.prototype.openCurrent = function () {
                if (this.currentNode) return this.currentNode.children = !0, this.openNode(this.currentNode)
            }, e.prototype.openNode = function (e) {
                if (!e.isOpen) return !this.root && 0 === this.currentLevel && e instanceof c && (this.root = e), this.onData(this.writer.openNode(e, this.currentLevel)), e.isOpen = !0
            }, e.prototype.closeNode = function (e) {
                if (!e.isClosed) return this.onData(this.writer.closeNode(e, this.currentLevel)), e.isClosed = !0
            }, e.prototype.onData = function (e) {
                return this.documentStarted = !0, this.onDataCallback(e)
            }, e.prototype.onEnd = function () {
                return this.documentCompleted = !0, this.onEndCallback()
            }, e.prototype.ele = function () {
                return this.element.apply(this, arguments)
            }, e.prototype.nod = function (e, t, i) {
                return this.node(e, t, i)
            }, e.prototype.txt = function (e) {
                return this.text(e)
            }, e.prototype.dat = function (e) {
                return this.cdata(e)
            }, e.prototype.com = function (e) {
                return this.comment(e)
            }, e.prototype.ins = function (e, t) {
                return this.instruction(e, t)
            }, e.prototype.dec = function (e, t, i) {
                return this.declaration(e, t, i)
            }, e.prototype.dtd = function (e, t, i) {
                return this.doctype(e, t, i)
            }, e.prototype.e = function (e, t, i) {
                return this.element(e, t, i)
            }, e.prototype.n = function (e, t, i) {
                return this.node(e, t, i)
            }, e.prototype.t = function (e) {
                return this.text(e)
            }, e.prototype.d = function (e) {
                return this.cdata(e)
            }, e.prototype.c = function (e) {
                return this.comment(e)
            }, e.prototype.r = function (e) {
                return this.raw(e)
            }, e.prototype.i = function (e, t) {
                return this.instruction(e, t)
            }, e.prototype.att = function () {
                return this.currentNode && this.currentNode instanceof u ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments)
            }, e.prototype.a = function () {
                return this.currentNode && this.currentNode instanceof u ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments)
            }, e.prototype.ent = function (e, t) {
                return this.entity(e, t)
            }, e.prototype.pent = function (e, t) {
                return this.pEntity(e, t)
            }, e.prototype.not = function (e, t) {
                return this.notation(e, t)
            }, e
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        var t, n, o, a, r, s, l, d, u, c, h, f, p, g = {}.hasOwnProperty;
        l = i(132), d = i(133), t = i(130), n = i(131), u = i(129), h = i(138), f = i(139), c = i(140), o = i(134), a = i(136), r = i(135), s = i(137), p = i(518), e.exports = function (e) {
            function i(e, t) {
                i.__super__.constructor.call(this, t), this.stream = e
            }

            return function (e, t) {
                for (var i in t) g.call(t, i) && (e[i] = t[i]);

                function n() {
                    this.constructor = e
                }

                n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
            }(i, p), i.prototype.document = function (e) {
                var t, i, o, a, r, s, u, h;
                for (i = 0, a = (s = e.children).length; i < a; i++) (t = s[i]).isLastRootNode = !1;
                for (e.children[e.children.length - 1].isLastRootNode = !0, h = [], o = 0, r = (u = e.children).length; o < r; o++) switch (t = u[o], !1) {
                    case!(t instanceof l):
                        h.push(this.declaration(t));
                        break;
                    case!(t instanceof d):
                        h.push(this.docType(t));
                        break;
                    case!(t instanceof n):
                        h.push(this.comment(t));
                        break;
                    case!(t instanceof c):
                        h.push(this.processingInstruction(t));
                        break;
                    default:
                        h.push(this.element(t))
                }
                return h
            }, i.prototype.attribute = function (e) {
                return this.stream.write(" " + e.name + '="' + e.value + '"')
            }, i.prototype.cdata = function (e, t) {
                return this.stream.write(this.space(t) + "<![CDATA[" + e.text + "]]>" + this.endline(e))
            }, i.prototype.comment = function (e, t) {
                return this.stream.write(this.space(t) + "\x3c!-- " + e.text + " --\x3e" + this.endline(e))
            }, i.prototype.declaration = function (e, t) {
                return this.stream.write(this.space(t)), this.stream.write('<?xml version="' + e.version + '"'), null != e.encoding && this.stream.write(' encoding="' + e.encoding + '"'), null != e.standalone && this.stream.write(' standalone="' + e.standalone + '"'), this.stream.write(this.spacebeforeslash + "?>"), this.stream.write(this.endline(e))
            }, i.prototype.docType = function (e, i) {
                var l, d, u, h;
                if (i || (i = 0), this.stream.write(this.space(i)), this.stream.write("<!DOCTYPE " + e.root().name), e.pubID && e.sysID ? this.stream.write(' PUBLIC "' + e.pubID + '" "' + e.sysID + '"') : e.sysID && this.stream.write(' SYSTEM "' + e.sysID + '"'), e.children.length > 0) {
                    for (this.stream.write(" ["), this.stream.write(this.endline(e)), d = 0, u = (h = e.children).length; d < u; d++) switch (l = h[d], !1) {
                        case!(l instanceof o):
                            this.dtdAttList(l, i + 1);
                            break;
                        case!(l instanceof a):
                            this.dtdElement(l, i + 1);
                            break;
                        case!(l instanceof r):
                            this.dtdEntity(l, i + 1);
                            break;
                        case!(l instanceof s):
                            this.dtdNotation(l, i + 1);
                            break;
                        case!(l instanceof t):
                            this.cdata(l, i + 1);
                            break;
                        case!(l instanceof n):
                            this.comment(l, i + 1);
                            break;
                        case!(l instanceof c):
                            this.processingInstruction(l, i + 1);
                            break;
                        default:
                            throw new Error("Unknown DTD node type: " + l.constructor.name)
                    }
                    this.stream.write("]")
                }
                return this.stream.write(this.spacebeforeslash + ">"), this.stream.write(this.endline(e))
            }, i.prototype.element = function (e, i) {
                var o, a, r, s, l, d, p, m;
                for (l in i || (i = 0), m = this.space(i), this.stream.write(m + "<" + e.name), d = e.attributes) g.call(d, l) && (o = d[l], this.attribute(o));
                if (0 === e.children.length || e.children.every(function (e) {
                    return "" === e.value
                })) this.allowEmpty ? this.stream.write("></" + e.name + ">") : this.stream.write(this.spacebeforeslash + "/>"); else if (this.pretty && 1 === e.children.length && null != e.children[0].value) this.stream.write(">"), this.stream.write(e.children[0].value), this.stream.write("</" + e.name + ">"); else {
                    for (this.stream.write(">" + this.newline), r = 0, s = (p = e.children).length; r < s; r++) switch (a = p[r], !1) {
                        case!(a instanceof t):
                            this.cdata(a, i + 1);
                            break;
                        case!(a instanceof n):
                            this.comment(a, i + 1);
                            break;
                        case!(a instanceof u):
                            this.element(a, i + 1);
                            break;
                        case!(a instanceof h):
                            this.raw(a, i + 1);
                            break;
                        case!(a instanceof f):
                            this.text(a, i + 1);
                            break;
                        case!(a instanceof c):
                            this.processingInstruction(a, i + 1);
                            break;
                        default:
                            throw new Error("Unknown XML node type: " + a.constructor.name)
                    }
                    this.stream.write(m + "</" + e.name + ">")
                }
                return this.stream.write(this.endline(e))
            }, i.prototype.processingInstruction = function (e, t) {
                return this.stream.write(this.space(t) + "<?" + e.target), e.value && this.stream.write(" " + e.value), this.stream.write(this.spacebeforeslash + "?>" + this.endline(e))
            }, i.prototype.raw = function (e, t) {
                return this.stream.write(this.space(t) + e.value + this.endline(e))
            }, i.prototype.text = function (e, t) {
                return this.stream.write(this.space(t) + e.value + this.endline(e))
            }, i.prototype.dtdAttList = function (e, t) {
                return this.stream.write(this.space(t) + "<!ATTLIST " + e.elementName + " " + e.attributeName + " " + e.attributeType), "#DEFAULT" !== e.defaultValueType && this.stream.write(" " + e.defaultValueType), e.defaultValue && this.stream.write(' "' + e.defaultValue + '"'), this.stream.write(this.spacebeforeslash + ">" + this.endline(e))
            }, i.prototype.dtdElement = function (e, t) {
                return this.stream.write(this.space(t) + "<!ELEMENT " + e.name + " " + e.value), this.stream.write(this.spacebeforeslash + ">" + this.endline(e))
            }, i.prototype.dtdEntity = function (e, t) {
                return this.stream.write(this.space(t) + "<!ENTITY"), e.pe && this.stream.write(" %"), this.stream.write(" " + e.name), e.value ? this.stream.write(' "' + e.value + '"') : (e.pubID && e.sysID ? this.stream.write(' PUBLIC "' + e.pubID + '" "' + e.sysID + '"') : e.sysID && this.stream.write(' SYSTEM "' + e.sysID + '"'), e.nData && this.stream.write(" NDATA " + e.nData)), this.stream.write(this.spacebeforeslash + ">" + this.endline(e))
            }, i.prototype.dtdNotation = function (e, t) {
                return this.stream.write(this.space(t) + "<!NOTATION " + e.name), e.pubID && e.sysID ? this.stream.write(' PUBLIC "' + e.pubID + '" "' + e.sysID + '"') : e.pubID ? this.stream.write(' PUBLIC "' + e.pubID + '"') : e.sysID && this.stream.write(' SYSTEM "' + e.sysID + '"'), this.stream.write(this.spacebeforeslash + ">" + this.endline(e))
            }, i.prototype.endline = function (e) {
                return e.isLastRootNode ? "" : this.newline
            }, i
        }()
    }).call(this)
}, function (e, t, i) {
    (function () {
        "use strict";
        var e, n, o, a, r, s, l, d, u = function (e, t) {
            return function () {
                return e.apply(t, arguments)
            }
        }, c = {}.hasOwnProperty;
        l = i(647), o = i(20), e = i(648), s = i(519), d = i(649).setImmediate, n = i(386).defaults, a = function (e) {
            return "object" == typeof e && null != e && 0 === Object.keys(e).length
        }, r = function (e, t, i) {
            var n, o;
            for (n = 0, o = e.length; n < o; n++) t = (0, e[n])(t, i);
            return t
        }, t.Parser = function (i) {
            function h(e) {
                var i, o, a;
                if (this.parseString = u(this.parseString, this), this.reset = u(this.reset, this), this.assignOrPush = u(this.assignOrPush, this), this.processAsync = u(this.processAsync, this), !(this instanceof t.Parser)) return new t.Parser(e);
                for (i in this.options = {}, o = n[.2]) c.call(o, i) && (a = o[i], this.options[i] = a);
                for (i in e) c.call(e, i) && (a = e[i], this.options[i] = a);
                this.options.xmlns && (this.options.xmlnskey = this.options.attrkey + "ns"), this.options.normalizeTags && (this.options.tagNameProcessors || (this.options.tagNameProcessors = []), this.options.tagNameProcessors.unshift(s.normalize)), this.reset()
            }

            return function (e, t) {
                for (var i in t) c.call(t, i) && (e[i] = t[i]);

                function n() {
                    this.constructor = e
                }

                n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
            }(h, o.EventEmitter), h.prototype.processAsync = function () {
                var e, t;
                try {
                    return this.remaining.length <= this.options.chunkSize ? (e = this.remaining, this.remaining = "", this.saxParser = this.saxParser.write(e), this.saxParser.close()) : (e = this.remaining.substr(0, this.options.chunkSize), this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length), this.saxParser = this.saxParser.write(e), d(this.processAsync))
                } catch (e) {
                    if (t = e, !this.saxParser.errThrown) return this.saxParser.errThrown = !0, this.emit(t)
                }
            }, h.prototype.assignOrPush = function (e, t, i) {
                return t in e ? (e[t] instanceof Array || (e[t] = [e[t]]), e[t].push(i)) : this.options.explicitArray ? e[t] = [i] : e[t] = i
            }, h.prototype.reset = function () {
                var e, t, i, n, o;
                return this.removeAllListeners(), this.saxParser = l.parser(this.options.strict, {
                    trim: !1,
                    normalize: !1,
                    xmlns: this.options.xmlns
                }), this.saxParser.errThrown = !1, this.saxParser.onerror = (o = this, function (e) {
                    if (o.saxParser.resume(), !o.saxParser.errThrown) return o.saxParser.errThrown = !0, o.emit("error", e)
                }), this.saxParser.onend = function (e) {
                    return function () {
                        if (!e.saxParser.ended) return e.saxParser.ended = !0, e.emit("end", e.resultObject)
                    }
                }(this), this.saxParser.ended = !1, this.EXPLICIT_CHARKEY = this.options.explicitCharkey, this.resultObject = null, n = [], e = this.options.attrkey, t = this.options.charkey, this.saxParser.onopentag = function (i) {
                    return function (o) {
                        var a, s, l, d, u;
                        if ((l = {})[t] = "", !i.options.ignoreAttrs) for (a in u = o.attributes) c.call(u, a) && (e in l || i.options.mergeAttrs || (l[e] = {}), s = i.options.attrValueProcessors ? r(i.options.attrValueProcessors, o.attributes[a], a) : o.attributes[a], d = i.options.attrNameProcessors ? r(i.options.attrNameProcessors, a) : a, i.options.mergeAttrs ? i.assignOrPush(l, d, s) : l[e][d] = s);
                        return l["#name"] = i.options.tagNameProcessors ? r(i.options.tagNameProcessors, o.name) : o.name, i.options.xmlns && (l[i.options.xmlnskey] = {
                            uri: o.uri,
                            local: o.local
                        }), n.push(l)
                    }
                }(this), this.saxParser.onclosetag = function (e) {
                    return function () {
                        var i, o, s, l, d, u, h, f, p, g;
                        if (u = n.pop(), d = u["#name"], e.options.explicitChildren && e.options.preserveChildrenOrder || delete u["#name"], !0 === u.cdata && (i = u.cdata, delete u.cdata), p = n[n.length - 1], u[t].match(/^\s*$/) && !i ? (o = u[t], delete u[t]) : (e.options.trim && (u[t] = u[t].trim()), e.options.normalize && (u[t] = u[t].replace(/\s{2,}/g, " ").trim()), u[t] = e.options.valueProcessors ? r(e.options.valueProcessors, u[t], d) : u[t], 1 === Object.keys(u).length && t in u && !e.EXPLICIT_CHARKEY && (u = u[t])), a(u) && (u = "" !== e.options.emptyTag ? e.options.emptyTag : o), null != e.options.validator && (g = "/" + function () {
                            var e, t, i;
                            for (i = [], e = 0, t = n.length; e < t; e++) l = n[e], i.push(l["#name"]);
                            return i
                        }().concat(d).join("/"), function () {
                            var t;
                            try {
                                u = e.options.validator(g, p && p[d], u)
                            } catch (i) {
                                return t = i, e.emit("error", t)
                            }
                        }()), e.options.explicitChildren && !e.options.mergeAttrs && "object" == typeof u) if (e.options.preserveChildrenOrder) {
                            if (p) {
                                for (s in p[e.options.childkey] = p[e.options.childkey] || [], h = {}, u) c.call(u, s) && (h[s] = u[s]);
                                p[e.options.childkey].push(h), delete u["#name"], 1 === Object.keys(u).length && t in u && !e.EXPLICIT_CHARKEY && (u = u[t])
                            }
                        } else l = {}, e.options.attrkey in u && (l[e.options.attrkey] = u[e.options.attrkey], delete u[e.options.attrkey]), !e.options.charsAsChildren && e.options.charkey in u && (l[e.options.charkey] = u[e.options.charkey], delete u[e.options.charkey]), Object.getOwnPropertyNames(u).length > 0 && (l[e.options.childkey] = u), u = l;
                        return n.length > 0 ? e.assignOrPush(p, d, u) : (e.options.explicitRoot && (f = u, (u = {})[d] = f), e.resultObject = u, e.saxParser.ended = !0, e.emit("end", e.resultObject))
                    }
                }(this), i = function (e) {
                    return function (i) {
                        var o, a;
                        if (a = n[n.length - 1]) return a[t] += i, e.options.explicitChildren && e.options.preserveChildrenOrder && e.options.charsAsChildren && (e.options.includeWhiteChars || "" !== i.replace(/\\n/g, "").trim()) && (a[e.options.childkey] = a[e.options.childkey] || [], (o = {"#name": "__text__"})[t] = i, e.options.normalize && (o[t] = o[t].replace(/\s{2,}/g, " ").trim()), a[e.options.childkey].push(o)), a
                    }
                }(this), this.saxParser.ontext = i, this.saxParser.oncdata = function (e) {
                    var t;
                    if (t = i(e)) return t.cdata = !0
                }
            }, h.prototype.parseString = function (t, i) {
                var n;
                null != i && "function" == typeof i && (this.on("end", function (e) {
                    return this.reset(), i(null, e)
                }), this.on("error", function (e) {
                    return this.reset(), i(e)
                }));
                try {
                    return "" === (t = t.toString()).trim() ? (this.emit("end", null), !0) : (t = e.stripBOM(t), this.options.async ? (this.remaining = t, d(this.processAsync), this.saxParser) : this.saxParser.write(t).close())
                } catch (e) {
                    if (n = e, !this.saxParser.errThrown && !this.saxParser.ended) return this.emit("error", n), this.saxParser.errThrown = !0;
                    if (this.saxParser.ended) throw n
                }
            }, h
        }(), t.parseString = function (e, i, n) {
            var o, a;
            return null != n ? ("function" == typeof n && (o = n), "object" == typeof i && (a = i)) : ("function" == typeof i && (o = i), a = {}), new t.Parser(a).parseString(e, o)
        }
    }).call(this)
}, function (e, t, i) {
    !function (e) {
        e.parser = function (e, t) {
            return new o(e, t)
        }, e.SAXParser = o, e.SAXStream = r, e.createStream = function (e, t) {
            return new r(e, t)
        }, e.MAX_BUFFER_LENGTH = 65536;
        var t,
            n = ["comment", "sgmlDecl", "textNode", "tagName", "doctype", "procInstName", "procInstBody", "entity", "attribName", "attribValue", "cdata", "script"];

        function o(t, i) {
            if (!(this instanceof o)) return new o(t, i);
            !function (e) {
                for (var t = 0, i = n.length; t < i; t++) e[n[t]] = ""
            }(this), this.q = this.c = "", this.bufferCheckPosition = e.MAX_BUFFER_LENGTH, this.opt = i || {}, this.opt.lowercase = this.opt.lowercase || this.opt.lowercasetags, this.looseCase = this.opt.lowercase ? "toLowerCase" : "toUpperCase", this.tags = [], this.closed = this.closedRoot = this.sawRoot = !1, this.tag = this.error = null, this.strict = !!t, this.noscript = !(!t && !this.opt.noscript), this.state = I.BEGIN, this.strictEntities = this.opt.strictEntities, this.ENTITIES = this.strictEntities ? Object.create(e.XML_ENTITIES) : Object.create(e.ENTITIES), this.attribList = [], this.opt.xmlns && (this.ns = Object.create(c)), this.trackPosition = !1 !== this.opt.position, this.trackPosition && (this.position = this.line = this.column = 0), _(this, "onready")
        }

        e.EVENTS = ["text", "processinginstruction", "sgmldeclaration", "doctype", "comment", "opentagstart", "attribute", "opentag", "closetag", "opencdata", "cdata", "closecdata", "error", "end", "ready", "script", "opennamespace", "closenamespace"], Object.create || (Object.create = function (e) {
            function t() {
            }

            return t.prototype = e, new t
        }), Object.keys || (Object.keys = function (e) {
            var t = [];
            for (var i in e) e.hasOwnProperty(i) && t.push(i);
            return t
        }), o.prototype = {
            end: function () {
                E(this)
            }, write: function (t) {
                if (this.error) throw this.error;
                if (this.closed) return x(this, "Cannot write after close. Assign an onready handler.");
                if (null === t) return E(this);
                "object" == typeof t && (t = t.toString());
                var i = 0, o = "";
                for (; o = V(t, i++), this.c = o, o;) switch (this.trackPosition && (this.position++, "\n" === o ? (this.line++, this.column = 0) : this.column++), this.state) {
                    case I.BEGIN:
                        if (this.state = I.BEGIN_WHITESPACE, "\ufeff" === o) continue;
                        U(this, o);
                        continue;
                    case I.BEGIN_WHITESPACE:
                        U(this, o);
                        continue;
                    case I.TEXT:
                        if (this.sawRoot && !this.closedRoot) {
                            for (var a = i - 1; o && "<" !== o && "&" !== o;) (o = V(t, i++)) && this.trackPosition && (this.position++, "\n" === o ? (this.line++, this.column = 0) : this.column++);
                            this.textNode += t.substring(a, i - 1)
                        }
                        "<" !== o || this.sawRoot && this.closedRoot && !this.strict ? (m(o) || this.sawRoot && !this.closedRoot || O(this, "Text data outside of root node."), "&" === o ? this.state = I.TEXT_ENTITY : this.textNode += o) : (this.state = I.OPEN_WAKA, this.startTagPosition = this.position);
                        continue;
                    case I.SCRIPT:
                        "<" === o ? this.state = I.SCRIPT_ENDING : this.script += o;
                        continue;
                    case I.SCRIPT_ENDING:
                        "/" === o ? this.state = I.CLOSE_TAG : (this.script += "<" + o, this.state = I.SCRIPT);
                        continue;
                    case I.OPEN_WAKA:
                        if ("!" === o) this.state = I.SGML_DECL, this.sgmlDecl = ""; else if (m(o)) ; else if (T(h, o)) this.state = I.OPEN_TAG, this.tagName = o; else if ("/" === o) this.state = I.CLOSE_TAG, this.tagName = ""; else if ("?" === o) this.state = I.PROC_INST, this.procInstName = this.procInstBody = ""; else {
                            if (O(this, "Unencoded <"), this.startTagPosition + 1 < this.position) {
                                var r = this.position - this.startTagPosition;
                                o = new Array(r).join(" ") + o
                            }
                            this.textNode += "<" + o, this.state = I.TEXT
                        }
                        continue;
                    case I.SGML_DECL:
                        (this.sgmlDecl + o).toUpperCase() === s ? (D(this, "onopencdata"), this.state = I.CDATA, this.sgmlDecl = "", this.cdata = "") : this.sgmlDecl + o === "--" ? (this.state = I.COMMENT, this.comment = "", this.sgmlDecl = "") : (this.sgmlDecl + o).toUpperCase() === l ? (this.state = I.DOCTYPE, (this.doctype || this.sawRoot) && O(this, "Inappropriately located doctype declaration"), this.doctype = "", this.sgmlDecl = "") : ">" === o ? (D(this, "onsgmldeclaration", this.sgmlDecl), this.sgmlDecl = "", this.state = I.TEXT) : v(o) ? (this.state = I.SGML_DECL_QUOTED, this.sgmlDecl += o) : this.sgmlDecl += o;
                        continue;
                    case I.SGML_DECL_QUOTED:
                        o === this.q && (this.state = I.SGML_DECL, this.q = ""), this.sgmlDecl += o;
                        continue;
                    case I.DOCTYPE:
                        ">" === o ? (this.state = I.TEXT, D(this, "ondoctype", this.doctype), this.doctype = !0) : (this.doctype += o, "[" === o ? this.state = I.DOCTYPE_DTD : v(o) && (this.state = I.DOCTYPE_QUOTED, this.q = o));
                        continue;
                    case I.DOCTYPE_QUOTED:
                        this.doctype += o, o === this.q && (this.q = "", this.state = I.DOCTYPE);
                        continue;
                    case I.DOCTYPE_DTD:
                        this.doctype += o, "]" === o ? this.state = I.DOCTYPE : v(o) && (this.state = I.DOCTYPE_DTD_QUOTED, this.q = o);
                        continue;
                    case I.DOCTYPE_DTD_QUOTED:
                        this.doctype += o, o === this.q && (this.state = I.DOCTYPE_DTD, this.q = "");
                        continue;
                    case I.COMMENT:
                        "-" === o ? this.state = I.COMMENT_ENDING : this.comment += o;
                        continue;
                    case I.COMMENT_ENDING:
                        "-" === o ? (this.state = I.COMMENT_ENDED, this.comment = N(this.opt, this.comment), this.comment && D(this, "oncomment", this.comment), this.comment = "") : (this.comment += "-" + o, this.state = I.COMMENT);
                        continue;
                    case I.COMMENT_ENDED:
                        ">" !== o ? (O(this, "Malformed comment"), this.comment += "--" + o, this.state = I.COMMENT) : this.state = I.TEXT;
                        continue;
                    case I.CDATA:
                        "]" === o ? this.state = I.CDATA_ENDING : this.cdata += o;
                        continue;
                    case I.CDATA_ENDING:
                        "]" === o ? this.state = I.CDATA_ENDING_2 : (this.cdata += "]" + o, this.state = I.CDATA);
                        continue;
                    case I.CDATA_ENDING_2:
                        ">" === o ? (this.cdata && D(this, "oncdata", this.cdata), D(this, "onclosecdata"), this.cdata = "", this.state = I.TEXT) : "]" === o ? this.cdata += "]" : (this.cdata += "]]" + o, this.state = I.CDATA);
                        continue;
                    case I.PROC_INST:
                        "?" === o ? this.state = I.PROC_INST_ENDING : m(o) ? this.state = I.PROC_INST_BODY : this.procInstName += o;
                        continue;
                    case I.PROC_INST_BODY:
                        if (!this.procInstBody && m(o)) continue;
                        "?" === o ? this.state = I.PROC_INST_ENDING : this.procInstBody += o;
                        continue;
                    case I.PROC_INST_ENDING:
                        ">" === o ? (D(this, "onprocessinginstruction", {
                            name: this.procInstName,
                            body: this.procInstBody
                        }), this.procInstName = this.procInstBody = "", this.state = I.TEXT) : (this.procInstBody += "?" + o, this.state = I.PROC_INST_BODY);
                        continue;
                    case I.OPEN_TAG:
                        T(f, o) ? this.tagName += o : (P(this), ">" === o ? L(this) : "/" === o ? this.state = I.OPEN_TAG_SLASH : (m(o) || O(this, "Invalid character in tag name"), this.state = I.ATTRIB));
                        continue;
                    case I.OPEN_TAG_SLASH:
                        ">" === o ? (L(this, !0), R(this)) : (O(this, "Forward-slash in opening tag not followed by >"), this.state = I.ATTRIB);
                        continue;
                    case I.ATTRIB:
                        if (m(o)) continue;
                        ">" === o ? L(this) : "/" === o ? this.state = I.OPEN_TAG_SLASH : T(h, o) ? (this.attribName = o, this.attribValue = "", this.state = I.ATTRIB_NAME) : O(this, "Invalid attribute name");
                        continue;
                    case I.ATTRIB_NAME:
                        "=" === o ? this.state = I.ATTRIB_VALUE : ">" === o ? (O(this, "Attribute without value"), this.attribValue = this.attribName, F(this), L(this)) : m(o) ? this.state = I.ATTRIB_NAME_SAW_WHITE : T(f, o) ? this.attribName += o : O(this, "Invalid attribute name");
                        continue;
                    case I.ATTRIB_NAME_SAW_WHITE:
                        if ("=" === o) this.state = I.ATTRIB_VALUE; else {
                            if (m(o)) continue;
                            O(this, "Attribute without value"), this.tag.attributes[this.attribName] = "", this.attribValue = "", D(this, "onattribute", {
                                name: this.attribName,
                                value: ""
                            }), this.attribName = "", ">" === o ? L(this) : T(h, o) ? (this.attribName = o, this.state = I.ATTRIB_NAME) : (O(this, "Invalid attribute name"), this.state = I.ATTRIB)
                        }
                        continue;
                    case I.ATTRIB_VALUE:
                        if (m(o)) continue;
                        v(o) ? (this.q = o, this.state = I.ATTRIB_VALUE_QUOTED) : (O(this, "Unquoted attribute value"), this.state = I.ATTRIB_VALUE_UNQUOTED, this.attribValue = o);
                        continue;
                    case I.ATTRIB_VALUE_QUOTED:
                        if (o !== this.q) {
                            "&" === o ? this.state = I.ATTRIB_VALUE_ENTITY_Q : this.attribValue += o;
                            continue
                        }
                        F(this), this.q = "", this.state = I.ATTRIB_VALUE_CLOSED;
                        continue;
                    case I.ATTRIB_VALUE_CLOSED:
                        m(o) ? this.state = I.ATTRIB : ">" === o ? L(this) : "/" === o ? this.state = I.OPEN_TAG_SLASH : T(h, o) ? (O(this, "No whitespace between attributes"), this.attribName = o, this.attribValue = "", this.state = I.ATTRIB_NAME) : O(this, "Invalid attribute name");
                        continue;
                    case I.ATTRIB_VALUE_UNQUOTED:
                        if (!y(o)) {
                            "&" === o ? this.state = I.ATTRIB_VALUE_ENTITY_U : this.attribValue += o;
                            continue
                        }
                        F(this), ">" === o ? L(this) : this.state = I.ATTRIB;
                        continue;
                    case I.CLOSE_TAG:
                        if (this.tagName) ">" === o ? R(this) : T(f, o) ? this.tagName += o : this.script ? (this.script += "</" + this.tagName, this.tagName = "", this.state = I.SCRIPT) : (m(o) || O(this, "Invalid tagname in closing tag"), this.state = I.CLOSE_TAG_SAW_WHITE); else {
                            if (m(o)) continue;
                            w(h, o) ? this.script ? (this.script += "</" + o, this.state = I.SCRIPT) : O(this, "Invalid tagname in closing tag.") : this.tagName = o
                        }
                        continue;
                    case I.CLOSE_TAG_SAW_WHITE:
                        if (m(o)) continue;
                        ">" === o ? R(this) : O(this, "Invalid characters in closing tag");
                        continue;
                    case I.TEXT_ENTITY:
                    case I.ATTRIB_VALUE_ENTITY_Q:
                    case I.ATTRIB_VALUE_ENTITY_U:
                        var d, u;
                        switch (this.state) {
                            case I.TEXT_ENTITY:
                                d = I.TEXT, u = "textNode";
                                break;
                            case I.ATTRIB_VALUE_ENTITY_Q:
                                d = I.ATTRIB_VALUE_QUOTED, u = "attribValue";
                                break;
                            case I.ATTRIB_VALUE_ENTITY_U:
                                d = I.ATTRIB_VALUE_UNQUOTED, u = "attribValue"
                        }
                        ";" === o ? (this[u] += B(this), this.entity = "", this.state = d) : T(this.entity.length ? g : p, o) ? this.entity += o : (O(this, "Invalid character in entity name"), this[u] += "&" + this.entity + o, this.entity = "", this.state = d);
                        continue;
                    default:
                        throw new Error(this, "Unknown state: " + this.state)
                }
                this.position >= this.bufferCheckPosition && function (t) {
                    for (var i = Math.max(e.MAX_BUFFER_LENGTH, 10), o = 0, a = 0, r = n.length; a < r; a++) {
                        var s = t[n[a]].length;
                        if (s > i) switch (n[a]) {
                            case"textNode":
                                A(t);
                                break;
                            case"cdata":
                                D(t, "oncdata", t.cdata), t.cdata = "";
                                break;
                            case"script":
                                D(t, "onscript", t.script), t.script = "";
                                break;
                            default:
                                x(t, "Max buffer length exceeded: " + n[a])
                        }
                        o = Math.max(o, s)
                    }
                    var l = e.MAX_BUFFER_LENGTH - o;
                    t.bufferCheckPosition = l + t.position
                }(this);
                return this
            }
            /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */, resume: function () {
                return this.error = null, this
            }, close: function () {
                return this.write(null)
            }, flush: function () {
                var e;
                A(e = this), "" !== e.cdata && (D(e, "oncdata", e.cdata), e.cdata = ""), "" !== e.script && (D(e, "onscript", e.script), e.script = "")
            }
        };
        try {
            t = i(101).Stream
        } catch (e) {
            t = function () {
            }
        }
        var a = e.EVENTS.filter(function (e) {
            return "error" !== e && "end" !== e
        });

        function r(e, i) {
            if (!(this instanceof r)) return new r(e, i);
            t.apply(this), this._parser = new o(e, i), this.writable = !0, this.readable = !0;
            var n = this;
            this._parser.onend = function () {
                n.emit("end")
            }, this._parser.onerror = function (e) {
                n.emit("error", e), n._parser.error = null
            }, this._decoder = null, a.forEach(function (e) {
                Object.defineProperty(n, "on" + e, {
                    get: function () {
                        return n._parser["on" + e]
                    }, set: function (t) {
                        if (!t) return n.removeAllListeners(e), n._parser["on" + e] = t, t;
                        n.on(e, t)
                    }, enumerable: !0, configurable: !1
                })
            })
        }

        r.prototype = Object.create(t.prototype, {constructor: {value: r}}), r.prototype.write = function (e) {
            if ("function" == typeof Buffer && "function" == typeof Buffer.isBuffer && Buffer.isBuffer(e)) {
                if (!this._decoder) {
                    var t = i(498).StringDecoder;
                    this._decoder = new t("utf8")
                }
                e = this._decoder.write(e)
            }
            return this._parser.write(e.toString()), this.emit("data", e), !0
        }, r.prototype.end = function (e) {
            return e && e.length && this.write(e), this._parser.end(), !0
        }, r.prototype.on = function (e, i) {
            var n = this;
            return n._parser["on" + e] || -1 === a.indexOf(e) || (n._parser["on" + e] = function () {
                var t = 1 === arguments.length ? [arguments[0]] : Array.apply(null, arguments);
                t.splice(0, 0, e), n.emit.apply(n, t)
            }), t.prototype.on.call(n, e, i)
        };
        var s = "[CDATA[", l = "DOCTYPE", d = "http://www.w3.org/XML/1998/namespace",
            u = "http://www.w3.org/2000/xmlns/", c = {xml: d, xmlns: u},
            h = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,
            f = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,
            p = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,
            g = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;

        function m(e) {
            return " " === e || "\n" === e || "\r" === e || "\t" === e
        }

        function v(e) {
            return '"' === e || "'" === e
        }

        function y(e) {
            return ">" === e || m(e)
        }

        function T(e, t) {
            return e.test(t)
        }

        function w(e, t) {
            return !T(e, t)
        }

        var k, C, b, I = 0;
        for (var S in e.STATE = {
            BEGIN: I++,
            BEGIN_WHITESPACE: I++,
            TEXT: I++,
            TEXT_ENTITY: I++,
            OPEN_WAKA: I++,
            SGML_DECL: I++,
            SGML_DECL_QUOTED: I++,
            DOCTYPE: I++,
            DOCTYPE_QUOTED: I++,
            DOCTYPE_DTD: I++,
            DOCTYPE_DTD_QUOTED: I++,
            COMMENT_STARTING: I++,
            COMMENT: I++,
            COMMENT_ENDING: I++,
            COMMENT_ENDED: I++,
            CDATA: I++,
            CDATA_ENDING: I++,
            CDATA_ENDING_2: I++,
            PROC_INST: I++,
            PROC_INST_BODY: I++,
            PROC_INST_ENDING: I++,
            OPEN_TAG: I++,
            OPEN_TAG_SLASH: I++,
            ATTRIB: I++,
            ATTRIB_NAME: I++,
            ATTRIB_NAME_SAW_WHITE: I++,
            ATTRIB_VALUE: I++,
            ATTRIB_VALUE_QUOTED: I++,
            ATTRIB_VALUE_CLOSED: I++,
            ATTRIB_VALUE_UNQUOTED: I++,
            ATTRIB_VALUE_ENTITY_Q: I++,
            ATTRIB_VALUE_ENTITY_U: I++,
            CLOSE_TAG: I++,
            CLOSE_TAG_SAW_WHITE: I++,
            SCRIPT: I++,
            SCRIPT_ENDING: I++
        }, e.XML_ENTITIES = {amp: "&", gt: ">", lt: "<", quot: '"', apos: "'"}, e.ENTITIES = {
            amp: "&",
            gt: ">",
            lt: "<",
            quot: '"',
            apos: "'",
            AElig: 198,
            Aacute: 193,
            Acirc: 194,
            Agrave: 192,
            Aring: 197,
            Atilde: 195,
            Auml: 196,
            Ccedil: 199,
            ETH: 208,
            Eacute: 201,
            Ecirc: 202,
            Egrave: 200,
            Euml: 203,
            Iacute: 205,
            Icirc: 206,
            Igrave: 204,
            Iuml: 207,
            Ntilde: 209,
            Oacute: 211,
            Ocirc: 212,
            Ograve: 210,
            Oslash: 216,
            Otilde: 213,
            Ouml: 214,
            THORN: 222,
            Uacute: 218,
            Ucirc: 219,
            Ugrave: 217,
            Uuml: 220,
            Yacute: 221,
            aacute: 225,
            acirc: 226,
            aelig: 230,
            agrave: 224,
            aring: 229,
            atilde: 227,
            auml: 228,
            ccedil: 231,
            eacute: 233,
            ecirc: 234,
            egrave: 232,
            eth: 240,
            euml: 235,
            iacute: 237,
            icirc: 238,
            igrave: 236,
            iuml: 239,
            ntilde: 241,
            oacute: 243,
            ocirc: 244,
            ograve: 242,
            oslash: 248,
            otilde: 245,
            ouml: 246,
            szlig: 223,
            thorn: 254,
            uacute: 250,
            ucirc: 251,
            ugrave: 249,
            uuml: 252,
            yacute: 253,
            yuml: 255,
            copy: 169,
            reg: 174,
            nbsp: 160,
            iexcl: 161,
            cent: 162,
            pound: 163,
            curren: 164,
            yen: 165,
            brvbar: 166,
            sect: 167,
            uml: 168,
            ordf: 170,
            laquo: 171,
            not: 172,
            shy: 173,
            macr: 175,
            deg: 176,
            plusmn: 177,
            sup1: 185,
            sup2: 178,
            sup3: 179,
            acute: 180,
            micro: 181,
            para: 182,
            middot: 183,
            cedil: 184,
            ordm: 186,
            raquo: 187,
            frac14: 188,
            frac12: 189,
            frac34: 190,
            iquest: 191,
            times: 215,
            divide: 247,
            OElig: 338,
            oelig: 339,
            Scaron: 352,
            scaron: 353,
            Yuml: 376,
            fnof: 402,
            circ: 710,
            tilde: 732,
            Alpha: 913,
            Beta: 914,
            Gamma: 915,
            Delta: 916,
            Epsilon: 917,
            Zeta: 918,
            Eta: 919,
            Theta: 920,
            Iota: 921,
            Kappa: 922,
            Lambda: 923,
            Mu: 924,
            Nu: 925,
            Xi: 926,
            Omicron: 927,
            Pi: 928,
            Rho: 929,
            Sigma: 931,
            Tau: 932,
            Upsilon: 933,
            Phi: 934,
            Chi: 935,
            Psi: 936,
            Omega: 937,
            alpha: 945,
            beta: 946,
            gamma: 947,
            delta: 948,
            epsilon: 949,
            zeta: 950,
            eta: 951,
            theta: 952,
            iota: 953,
            kappa: 954,
            lambda: 955,
            mu: 956,
            nu: 957,
            xi: 958,
            omicron: 959,
            pi: 960,
            rho: 961,
            sigmaf: 962,
            sigma: 963,
            tau: 964,
            upsilon: 965,
            phi: 966,
            chi: 967,
            psi: 968,
            omega: 969,
            thetasym: 977,
            upsih: 978,
            piv: 982,
            ensp: 8194,
            emsp: 8195,
            thinsp: 8201,
            zwnj: 8204,
            zwj: 8205,
            lrm: 8206,
            rlm: 8207,
            ndash: 8211,
            mdash: 8212,
            lsquo: 8216,
            rsquo: 8217,
            sbquo: 8218,
            ldquo: 8220,
            rdquo: 8221,
            bdquo: 8222,
            dagger: 8224,
            Dagger: 8225,
            bull: 8226,
            hellip: 8230,
            permil: 8240,
            prime: 8242,
            Prime: 8243,
            lsaquo: 8249,
            rsaquo: 8250,
            oline: 8254,
            frasl: 8260,
            euro: 8364,
            image: 8465,
            weierp: 8472,
            real: 8476,
            trade: 8482,
            alefsym: 8501,
            larr: 8592,
            uarr: 8593,
            rarr: 8594,
            darr: 8595,
            harr: 8596,
            crarr: 8629,
            lArr: 8656,
            uArr: 8657,
            rArr: 8658,
            dArr: 8659,
            hArr: 8660,
            forall: 8704,
            part: 8706,
            exist: 8707,
            empty: 8709,
            nabla: 8711,
            isin: 8712,
            notin: 8713,
            ni: 8715,
            prod: 8719,
            sum: 8721,
            minus: 8722,
            lowast: 8727,
            radic: 8730,
            prop: 8733,
            infin: 8734,
            ang: 8736,
            and: 8743,
            or: 8744,
            cap: 8745,
            cup: 8746,
            int: 8747,
            there4: 8756,
            sim: 8764,
            cong: 8773,
            asymp: 8776,
            ne: 8800,
            equiv: 8801,
            le: 8804,
            ge: 8805,
            sub: 8834,
            sup: 8835,
            nsub: 8836,
            sube: 8838,
            supe: 8839,
            oplus: 8853,
            otimes: 8855,
            perp: 8869,
            sdot: 8901,
            lceil: 8968,
            rceil: 8969,
            lfloor: 8970,
            rfloor: 8971,
            lang: 9001,
            rang: 9002,
            loz: 9674,
            spades: 9824,
            clubs: 9827,
            hearts: 9829,
            diams: 9830
        }, Object.keys(e.ENTITIES).forEach(function (t) {
            var i = e.ENTITIES[t], n = "number" == typeof i ? String.fromCharCode(i) : i;
            e.ENTITIES[t] = n
        }), e.STATE) e.STATE[e.STATE[S]] = S;

        function _(e, t, i) {
            e[t] && e[t](i)
        }

        function D(e, t, i) {
            e.textNode && A(e), _(e, t, i)
        }

        function A(e) {
            e.textNode = N(e.opt, e.textNode), e.textNode && _(e, "ontext", e.textNode), e.textNode = ""
        }

        function N(e, t) {
            return e.trim && (t = t.trim()), e.normalize && (t = t.replace(/\s+/g, " ")), t
        }

        function x(e, t) {
            return A(e), e.trackPosition && (t += "\nLine: " + e.line + "\nColumn: " + e.column + "\nChar: " + e.c), t = new Error(t), e.error = t, _(e, "onerror", t), e
        }

        function E(e) {
            return e.sawRoot && !e.closedRoot && O(e, "Unclosed root tag"), e.state !== I.BEGIN && e.state !== I.BEGIN_WHITESPACE && e.state !== I.TEXT && x(e, "Unexpected end"), A(e), e.c = "", e.closed = !0, _(e, "onend"), o.call(e, e.strict, e.opt), e
        }

        function O(e, t) {
            if ("object" != typeof e || !(e instanceof o)) throw new Error("bad call to strictFail");
            e.strict && x(e, t)
        }

        function P(e) {
            e.strict || (e.tagName = e.tagName[e.looseCase]());
            var t = e.tags[e.tags.length - 1] || e, i = e.tag = {name: e.tagName, attributes: {}};
            e.opt.xmlns && (i.ns = t.ns), e.attribList.length = 0, D(e, "onopentagstart", i)
        }

        function M(e, t) {
            var i = e.indexOf(":") < 0 ? ["", e] : e.split(":"), n = i[0], o = i[1];
            return t && "xmlns" === e && (n = "xmlns", o = ""), {prefix: n, local: o}
        }

        function F(e) {
            if (e.strict || (e.attribName = e.attribName[e.looseCase]()), -1 !== e.attribList.indexOf(e.attribName) || e.tag.attributes.hasOwnProperty(e.attribName)) e.attribName = e.attribValue = ""; else {
                if (e.opt.xmlns) {
                    var t = M(e.attribName, !0), i = t.prefix, n = t.local;
                    if ("xmlns" === i) if ("xml" === n && e.attribValue !== d) O(e, "xml: prefix must be bound to " + d + "\nActual: " + e.attribValue); else if ("xmlns" === n && e.attribValue !== u) O(e, "xmlns: prefix must be bound to " + u + "\nActual: " + e.attribValue); else {
                        var o = e.tag, a = e.tags[e.tags.length - 1] || e;
                        o.ns === a.ns && (o.ns = Object.create(a.ns)), o.ns[n] = e.attribValue
                    }
                    e.attribList.push([e.attribName, e.attribValue])
                } else e.tag.attributes[e.attribName] = e.attribValue, D(e, "onattribute", {
                    name: e.attribName,
                    value: e.attribValue
                });
                e.attribName = e.attribValue = ""
            }
        }

        function L(e, t) {
            if (e.opt.xmlns) {
                var i = e.tag, n = M(e.tagName);
                i.prefix = n.prefix, i.local = n.local, i.uri = i.ns[n.prefix] || "", i.prefix && !i.uri && (O(e, "Unbound namespace prefix: " + JSON.stringify(e.tagName)), i.uri = n.prefix);
                var o = e.tags[e.tags.length - 1] || e;
                i.ns && o.ns !== i.ns && Object.keys(i.ns).forEach(function (t) {
                    D(e, "onopennamespace", {prefix: t, uri: i.ns[t]})
                });
                for (var a = 0, r = e.attribList.length; a < r; a++) {
                    var s = e.attribList[a], l = s[0], d = s[1], u = M(l, !0), c = u.prefix, h = u.local,
                        f = "" === c ? "" : i.ns[c] || "", p = {name: l, value: d, prefix: c, local: h, uri: f};
                    c && "xmlns" !== c && !f && (O(e, "Unbound namespace prefix: " + JSON.stringify(c)), p.uri = c), e.tag.attributes[l] = p, D(e, "onattribute", p)
                }
                e.attribList.length = 0
            }
            e.tag.isSelfClosing = !!t, e.sawRoot = !0, e.tags.push(e.tag), D(e, "onopentag", e.tag), t || (e.noscript || "script" !== e.tagName.toLowerCase() ? e.state = I.TEXT : e.state = I.SCRIPT, e.tag = null, e.tagName = ""), e.attribName = e.attribValue = "", e.attribList.length = 0
        }

        function R(e) {
            if (!e.tagName) return O(e, "Weird empty close tag."), e.textNode += "</>", void (e.state = I.TEXT);
            if (e.script) {
                if ("script" !== e.tagName) return e.script += "</" + e.tagName + ">", e.tagName = "", void (e.state = I.SCRIPT);
                D(e, "onscript", e.script), e.script = ""
            }
            var t = e.tags.length, i = e.tagName;
            e.strict || (i = i[e.looseCase]());
            for (var n = i; t--;) {
                if (e.tags[t].name === n) break;
                O(e, "Unexpected close tag")
            }
            if (t < 0) return O(e, "Unmatched closing tag: " + e.tagName), e.textNode += "</" + e.tagName + ">", void (e.state = I.TEXT);
            e.tagName = i;
            for (var o = e.tags.length; o-- > t;) {
                var a = e.tag = e.tags.pop();
                e.tagName = e.tag.name, D(e, "onclosetag", e.tagName);
                var r = {};
                for (var s in a.ns) r[s] = a.ns[s];
                var l = e.tags[e.tags.length - 1] || e;
                e.opt.xmlns && a.ns !== l.ns && Object.keys(a.ns).forEach(function (t) {
                    var i = a.ns[t];
                    D(e, "onclosenamespace", {prefix: t, uri: i})
                })
            }
            0 === t && (e.closedRoot = !0), e.tagName = e.attribValue = e.attribName = "", e.attribList.length = 0, e.state = I.TEXT
        }

        function B(e) {
            var t, i = e.entity, n = i.toLowerCase(), o = "";
            return e.ENTITIES[i] ? e.ENTITIES[i] : e.ENTITIES[n] ? e.ENTITIES[n] : ("#" === (i = n).charAt(0) && ("x" === i.charAt(1) ? (i = i.slice(2), o = (t = parseInt(i, 16)).toString(16)) : (i = i.slice(1), o = (t = parseInt(i, 10)).toString(10))), i = i.replace(/^0+/, ""), isNaN(t) || o.toLowerCase() !== i ? (O(e, "Invalid character entity"), "&" + e.entity + ";") : String.fromCodePoint(t))
        }

        function U(e, t) {
            "<" === t ? (e.state = I.OPEN_WAKA, e.startTagPosition = e.position) : m(t) || (O(e, "Non-whitespace before first tag."), e.textNode = t, e.state = I.TEXT)
        }

        function V(e, t) {
            var i = "";
            return t < e.length && (i = e.charAt(t)), i
        }

        I = e.STATE, String.fromCodePoint || (k = String.fromCharCode, C = Math.floor, b = function () {
            var e, t, i = [], n = -1, o = arguments.length;
            if (!o) return "";
            for (var a = ""; ++n < o;) {
                var r = Number(arguments[n]);
                if (!isFinite(r) || r < 0 || r > 1114111 || C(r) !== r) throw RangeError("Invalid code point: " + r);
                r <= 65535 ? i.push(r) : (e = 55296 + ((r -= 65536) >> 10), t = r % 1024 + 56320, i.push(e, t)), (n + 1 === o || i.length > 16384) && (a += k.apply(null, i), i.length = 0)
            }
            return a
        }, Object.defineProperty ? Object.defineProperty(String, "fromCodePoint", {
            value: b,
            configurable: !0,
            writable: !0
        }) : String.fromCodePoint = b)
    }(t)
}, function (e, t) {
    (function () {
        "use strict";
        t.stripBOM = function (e) {
            return "\ufeff" === e[0] ? e.substring(1) : e
        }
    }).call(this)
}, function (e, t) {
    e.exports = require("timers")
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(2), a = i(7).default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        r = n.default.getLogger("HistoryDataNS");
    let s = o.resolve(__profilesDir, "mainWndData.ini"), l = 1060, d = 680;
    !function (e) {
        e.getMainWndSizeHistoryData = function () {
            let e = null;
            r.information(s);
            let t = a.readINI(s, "MainBody", "ExitState"), i = a.readINI(s, "MainBody", "MainWndLastWidth"),
                n = a.readINI(s, "MainBody", "MainWndLastHeight");
            if (r.information(t, i, n), "" !== i && "" !== n) {
                let o = Number(i), a = Number(n);
                (o < l || a < d) && (o = l, a = d), (e = {}).width = o, e.height = a, e.exitState = t
            }
            return null === e && ((e = {}).exitState = "normal", e.width = l, e.height = d), e
        }, e.setExitType = function (e) {
            a.writeINI(s, "MainBody", "ExitType", e)
        }, e.getExitType = function () {
            return a.readINI(s, "MainBody", "ExitType")
        }
    }(t.HistoryDataNS || (t.HistoryDataNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(2), r = i(2), s = i(29), l = i(36), d = i(27), u = i(520), c = i(388), h = i(390), f = i(34),
        p = i(9), g = i(82), m = i(4), v = i(73), y = i(30), T = i(13), w = i(5), k = i(108), C = i(39), b = i(144),
        I = i(31), S = i(28), _ = i(109), D = i(59), A = i(7), N = i(110), x = i(10), E = i(8), O = i(14), P = i(393),
        M = i(145), F = i(527), L = i(396), R = i(383), B = i(528), U = i(127), V = i(66), K = i(664), G = i(22),
        W = i(11), j = i(43), H = i(665), z = i(398), X = i(32), q = i(529), Y = i(12), J = i(3), Z = i(70), Q = i(15),
        $ = i(71), ee = W.DownloadKernelTaskManager.getTaskManager(),
        te = A.default(a.join(__rootDir, "../bin/ThunderHelper.node")),
        ie = b.CommunityNaviteFunctionNS.CommunityNaviteFunction.getNativeModule(),
        ne = o.default.getLogger("NativeFunction"), oe = c.TaskInfoManagerNS.getTaskInfoManager();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, this.isPersonalPageTrackEvent = !1
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{functionName: "PageReady", nativeFunc: this.pageReady}, {
                        functionName: "GetTaskInfo",
                        nativeFunc: this.getTaskInfo
                    }, {functionName: "OperateTask", nativeFunc: this.operateTask}, {
                        functionName: "ShellOpen",
                        nativeFunc: this.shellOpen
                    }, {
                        functionName: "OpenFolderWithSelectFile",
                        nativeFunc: this.openFolderWithSelectFile
                    }, {
                        functionName: "ShowOpenDialog",
                        nativeFunc: this.showOpenDialog
                    }, {functionName: "ShowSaveDialog", nativeFunc: this.showSaveDialog}, {
                        functionName: "GetFileMd5",
                        nativeFunc: this.getFileMd5
                    }, {functionName: "GetPeerID", nativeFunc: this.getPeerID}, {
                        functionName: "GetDeviceID",
                        nativeFunc: this.getDeviceID
                    }, {functionName: "GetCpuID", nativeFunc: this.getCpuID}, {
                        functionName: "GetDmideCode",
                        nativeFunc: this.getDmideCode
                    }, {
                        functionName: "GetThunderVersion",
                        nativeFunc: this.getThunderVersion
                    }, {functionName: "TrackEvent", nativeFunc: this.trackEvent}, {
                        functionName: "GetCurrentCategoryId",
                        nativeFunc: this.getCurrentCategoryId
                    }, {
                        functionName: "GetCurrentCategoryView",
                        nativeFunc: this.getCurrentCategoryView
                    }, {
                        functionName: "SelectCategoryView",
                        nativeFunc: this.switchCategoryView
                    }, {
                        functionName: "GetCurInternetState",
                        nativeFunc: this.getCurInternetState
                    }, {functionName: "DropOpenFile", nativeFunc: this.dragOpenFile}, {
                        functionName: "DropOpenUrl",
                        nativeFunc: this.dragOpenUrl
                    }, {
                        functionName: "GetCurPlatform",
                        nativeFunc: this.getCurPlatform
                    }, {
                        functionName: "CreateNewTask",
                        nativeFunc: this.createNewTask
                    }, {
                        functionName: "CreateNewTaskEx",
                        nativeFunc: this.createNewTaskEx
                    }, {
                        functionName: "FireEventFunction",
                        nativeFunc: this.fireEventFunction
                    }, {
                        functionName: "ShowCustomDownloadModeDlg",
                        nativeFunc: this.showCustomDownloadModeDlg
                    }, {
                        functionName: "GetTaskStartStatusPrompt",
                        nativeFunc: this.getTaskStartStatusPrompt
                    }, {
                        functionName: "ShowBrowserGuideDlg",
                        nativeFunc: this.showBrowserGuideDlg
                    }, {
                        functionName: "OpenURLByIEorDefault",
                        nativeFunc: this.openURLByIEorDefault
                    }, {
                        functionName: "OpenURLByDefault",
                        nativeFunc: this.openURLByDefault
                    }, {
                        functionName: "GetDownloadDir",
                        nativeFunc: this.getDownloadDir
                    }, {
                        functionName: "ShowPersonalPage",
                        nativeFunc: this.showPersonalPage
                    }, {functionName: "ShowWebWnd", nativeFunc: this.showWebWnd}, {
                        functionName: "CreateWebWnd",
                        nativeFunc: this.createWebWnd
                    }, {
                        functionName: "RegisterWebFunction",
                        nativeFunc: this.registerWebFunction
                    }, {
                        functionName: "CallBackWebFunction",
                        nativeFunc: this.callBackWebFunction
                    }, {
                        functionName: "FireEventWebFunction",
                        nativeFunc: this.fireEventWebFunction
                    }, {
                        functionName: "IsPhoneAuth",
                        nativeFunc: this.isPhoneAuth
                    }, {
                        functionName: "GetSearchRecommends",
                        nativeFunc: this.getSearchRecommends
                    }, {
                        functionName: "SetSearchRecommends",
                        nativeFunc: this.setSearchRecommends
                    }, {
                        functionName: "GetCommonlySites",
                        nativeFunc: this.getCommonlySites
                    }, {
                        functionName: "ClearCommonlySites",
                        nativeFunc: this.clearCommonlySites
                    }, {
                        functionName: "DeleteCommonlySites",
                        nativeFunc: this.deleteCommonlySites
                    }, {
                        functionName: "TopBookmarksItem",
                        nativeFunc: this.topBookmarksItem
                    }, {
                        functionName: "EditBookmarksItemAW",
                        nativeFunc: this.editBookmarksItemAW
                    }, {
                        functionName: "GetRecentHistorys",
                        nativeFunc: this.getRecentHistorys
                    }, {
                        functionName: "ClearHistorys",
                        nativeFunc: this.clearHistorys
                    }, {
                        functionName: "DeleteHistoryItem",
                        nativeFunc: this.deleteHistoryItem
                    }, {
                        functionName: "GetBaiduDWZ",
                        nativeFunc: this.getBaiduDWZ
                    }, {
                        functionName: "GetInitDownloadData",
                        nativeFunc: this.getInitDownloadData
                    }, {functionName: "BringMainWndToTop", nativeFunc: this.bringMainWndToTop}, {
                        functionName: "Log",
                        nativeFunc: this.log
                    }, {
                        functionName: "IsFilePathExist",
                        nativeFunc: this.isFilePathExist
                    }, {
                        functionName: "GetTaskBirdKeyData",
                        nativeFunc: this.getTaskBirdKeyData
                    }, {
                        functionName: "GetShouleiShareLink",
                        nativeFunc: this.getShouleiShareLink
                    }, {
                        functionName: "GetShouleiShareLinkDlj",
                        nativeFunc: this.getShouleiShareLinkDlj
                    }, {
                        functionName: "GetShouleiShareLink2",
                        nativeFunc: this.getShouleiShareLink2
                    }, {
                        functionName: "GetShouleiShareLinkDlj2",
                        nativeFunc: this.getShouleiShareLinkDlj2
                    }, {
                        functionName: "GetShouleiFileTransferLink",
                        nativeFunc: this.getShouleiFileTransferLink
                    }, {
                        functionName: "GetShouleiFileTransferDlj",
                        nativeFunc: this.getShouleiFileTransferDlj
                    }, {
                        functionName: "GetVideoPreViews",
                        nativeFunc: this.getVideoPreViews
                    }, {
                        functionName: "CreateWebShortcut",
                        nativeFunc: this.createWebShortcut
                    }, {
                        functionName: "MessageBoxPop",
                        nativeFunc: this.messageBoxPop.bind(this)
                    }, {
                        functionName: "MessageBoxConfirm",
                        nativeFunc: this.messageBoxConfirm.bind(this)
                    }, {
                        functionName: "MessageBoxCustom",
                        nativeFunc: this.messageBoxCustom.bind(this)
                    }, {
                        functionName: "GetTaskBirdKeyOfTaskId",
                        nativeFunc: this.getTaskBirdKeyOfTaskId.bind(this)
                    }, {
                        functionName: "PromptShare",
                        nativeFunc: this.promptShare
                    }, {
                        functionName: "PopupDownloadShoulei",
                        nativeFunc: this.popupDownloadShoulei
                    }, {
                        functionName: "SetPlayerPosition",
                        nativeFunc: this.setPlayerPosition
                    }, {functionName: "CreateIndependentWebWnd", nativeFunc: this.createIndependentWebWnd.bind(this)}];
                    l.NativeCallNS.registerNativeFunction(e)
                }
            }

            pageReady(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    "taskDetail" === o ? (u.TaskDetailNS.pageReady(), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)) : "community" === o ? (ie.emit("community.pageReady"), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)) : e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            getTaskInfo(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (!n || !n[0] || !n[2]) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    "taskDetail" === n[2] ? oe.getHistoryTaskInfoString(o).then(n => {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                    }).catch() : e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            operateTask(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0] || !o[1]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = o[1], r = o[2];
                        yield h.TaskOperate.operateTaskActions(n, a, r), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }

            shellOpen(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    f.TaskOperatorNs.asyncOpenItem(o).catch(), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            openFolderWithSelectFile(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0];
                        yield(yield Y.asyncRemoteCall.getShell()).showItemInFolder(n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }

            showOpenDialog(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        const n = yield Y.asyncRemoteCall.getDialog();
                        let a = null;
                        if (o[0]) try {
                            a = JSON.parse(o[0])
                        } catch (e) {
                            ne.warning("showOpenDialog param error", o[0], e)
                        }
                        a || (a = {properties: ["openDirectory"]});
                        let r = yield Y.asyncRemoteCall.getCurrentWindow();
                        n.showOpenDialog(r, a).then(n => {
                            let o = n.canceled ? void 0 : n.filePaths;
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o ? JSON.stringify(o) : o)
                        }).catch()
                    } while (0)
                })
            }

            showSaveDialog(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        const n = yield Y.asyncRemoteCall.getDialog();
                        let a = null;
                        if (o[0]) try {
                            a = JSON.parse(o[0])
                        } catch (e) {
                            ne.warning("showSaveDialog param error", o[0], e)
                        }
                        let r = yield Y.asyncRemoteCall.getCurrentWindow();
                        n.showSaveDialog(r, a).then(n => {
                            let o = n.filePath;
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
                        }).catch()
                    } while (0)
                })
            }

            getFileMd5(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    s.ToolsUtilitiesAWNS.calculateFileMd5(o).then(n => {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                    }).catch()
                } while (0)
            }

            getPeerID(e, t, i, n) {
                ne.information(n);
                let o = te.getPeerID();
                e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
            }

            getDeviceID(e, t, i, n) {
                ne.information(n);
                let o = te.getPeerID();
                e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
            }

            getCpuID(e, t, i, n) {
                let o = te.getCpuID();
                e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
            }

            getDmideCode(e, t, i, n) {
                let o = te.getDmideCode();
                e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
            }

            getThunderVersion(e, t, i, n) {
                ne.information(n);
                let o = a.join(__rootDir, "../../Thunder.exe"), r = te.getFileVersion(o);
                e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, r)
            }

            trackEvent(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information(o);
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = void 0 === o[1] ? "" : o[1], r = void 0 === o[2] ? "" : o[2],
                            s = void 0 === o[3] ? 0 : o[3], l = void 0 === o[4] ? 0 : o[4],
                            u = void 0 === o[5] ? 0 : o[5], c = void 0 === o[6] ? 0 : o[6],
                            h = void 0 === o[7] ? "" : o[7], f = void 0 === o[8] ? 0 : o[8],
                            g = yield p.XLStatNS.asyncTrackEvent(n, a, r, s, l, u, c, h, f);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, g)
                    } while (0)
                })
            }

            getCurrentCategoryId(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    let n = y.default.getCurrentCategoryId();
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                } while (0)
            }

            getCurrentCategoryView(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    let n = y.default.getCurrentCategoryView();
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                } while (0)
            }

            switchCategoryView(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n) || w.isNullOrUndefined(n[0]) || w.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], r = void 0;
                    void 0 !== n[2] && (r = n[2]);
                    let s = n[3];
                    ne.information(o, a, r), y.default.fireEvent(T.NodeEventMesssageNS.eventDownloadSwitchCategory, o, a, r, s)
                } while (0)
            }

            dragOpenFile(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n) || w.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    if (void 0 === o || null === o || "" === o) break;
                    k.default.onCommand("path", o, "file_drag").catch()
                } while (0)
            }

            dragOpenUrl(e, t, i, n) {
                do {
                    if (void 0 === e || null === e) break;
                    if (void 0 === t || null === t) break;
                    if (void 0 === i || null === i) break;
                    let o = n[0];
                    if (void 0 === o || null === o || "" === o) break;
                    let a = I.ThunderHelper.getTaskTypeFromUrl(o);
                    a === m.DownloadKernel.TaskType.P2sp || a === m.DownloadKernel.TaskType.Emule ? C.ThunderNewTask.createPreNewTaskWindow([o], "url_drag") : a !== m.DownloadKernel.TaskType.Bt && a !== m.DownloadKernel.TaskType.Magnet || C.ThunderNewTask.createBtTaskWindow({
                        url: o,
                        type: "url"
                    }, {source: "url_drag"})
                } while (0)
            }

            getCurInternetState(e, t, i, n) {
                do {
                    if (ne.information(n), w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    let o = te.getCurInternetState();
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
                } while (0)
            }

            getCurPlatform(e, t, i, n) {
                do {
                    if (ne.information(n), w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    let o = "pc-xdas";
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
                } while (0)
            }

            createNewTask(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    let o = n[0], a = null;
                    try {
                        a = JSON.parse(o)
                    } catch (e) {
                        ne.warning(e)
                    }
                    if (ne.information("createNewTask", a), w.isNullOrUndefined(a)) break;
                    for (let e in a) {
                        let t = a[e];
                        if ("com" === t.type) {
                            let e = void 0;
                            for (let t in a) {
                                void 0 === e && (e = []), ne.information("createNewTask url", a[t].url);
                                let i = a[t].url.split("%0A");
                                if (1 === i.length && (i = a[t].url.split(/[\n\r\n]/)), ne.information("createNewTask urls", i), 1 === i.length) e.push({
                                    url: a[t].url,
                                    referer: a[t].refer,
                                    fileName: a[t].name,
                                    statClick: a[t].stat ? a[t].stat : "outline",
                                    browser: a[t].browser ? a[t].browser : "xlbrowser.exe"
                                }); else for (let n of i) e.push({
                                    url: n,
                                    referer: a[t].refer,
                                    statClick: a[t].stat ? a[t].stat : "outline",
                                    browser: a[t].browser ? a[t].browser : "xlbrowser.exe"
                                })
                            }
                            C.ThunderNewTask.createPreNewTaskWindow(e);
                            break
                        }
                        if ("bt" === t.type) {
                            let e = t.url;
                            C.ThunderNewTask.createBtTaskWindow({
                                url: e,
                                type: "url"
                            }, {
                                source: t.stat ? t.stat : "outline",
                                browser: t.browser ? t.browser : "xlbrowser.exe",
                                referer: t.refer
                            });
                            break
                        }
                        "bird" === t.type && g.URLHelperNS.isBirdKey(t.url) && v.openBirdKeyDecodeDialog(t.url, {from: t.stat || "outline"})
                    }
                } while (0)
            }

            createNewTaskEx(e, t, i, n) {
                do {
                    if (ne.information("createNewTaskEx 接口 enter 第一个参数:", n[0]), w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n[0])) break;
                    let o = null;
                    try {
                        o = JSON.parse(n[0])
                    } catch (e) {
                        break
                    }
                    let a = [];
                    for (let e in o) {
                        let t = o[e];
                        if (g.URLHelperNS.isBirdKey(t.url)) {
                            v.openBirdKeyDecodeDialog(t.url, {from: t.stat});
                            continue
                        }
                        let i = I.ThunderHelper.getTaskTypeFromUrl(t.url);
                        if (ne.information(" createNewTaskEx", t.url, " type:", i), i === m.DownloadKernel.TaskType.P2sp || i === m.DownloadKernel.TaskType.Emule) a.push({
                            url: o[e].url,
                            referer: o[e].refer,
                            fileName: o[e].name,
                            statClick: o[e].stat,
                            birdkeyChars: o[e].birdkeyChars
                        }); else if (i === m.DownloadKernel.TaskType.Bt || i === m.DownloadKernel.TaskType.Magnet) {
                            let i = t.url;
                            C.ThunderNewTask.createBtTaskWindow({
                                url: i,
                                type: "url",
                                birdkeyChars: o[e].birdkeyChars
                            }, {source: t.stat, referer: t.refer})
                        } else t.url.includes("taskGroupName") && C.ThunderNewTask.createThunderxTask(t.url, t.stat, !1).catch()
                    }
                    a.length > 0 && C.ThunderNewTask.createPreNewTaskWindow(a)
                } while (0)
            }

            fireEventFunction(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n) || w.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    S.NativeCallHostModule.nativeCallHost.fireNativeEvent("onWebEvent", ...n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            showCustomDownloadModeDlg(e, t, i) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    _.DownloadModeNS.showCustomDownloadModeDlg().catch(), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            showBrowserGuideDlg(e, t, i) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    N.default().popUpBrowserGuide(!0).catch()
                } while (0)
            }

            getTaskStartStatusPrompt(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n) || w.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    try {
                        let o = JSON.parse(n[0]), a = D.TaskStatusHelper.getTaskStartStatusPrompt(o);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, a)
                    } catch (n) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError)
                    }
                } while (0)
            }

            openURLByIEorDefault(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n) || w.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = te.openURLByIEorDefault(n[0]);
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
                } while (0)
            }

            openURLByDefault(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n) || w.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = te.openURLByDefault(n[0]);
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, o)
                } while (0)
            }

            getDownloadDir(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        let n = "";
                        do {
                            if (x.ConfigNS.getValue("TaskDefaultSettings", "UseLastCatalog", !0) && (n = x.ConfigNS.getValue("PathAndCategory", "LastUsedPath", "")) || (n = x.ConfigNS.getValue("TaskDefaultSettings", "DefaultPath", "")), void 0 !== n && null !== n && "" !== n && (yield E.FileSystemAWNS.mkdirsAW(n))) break;
                            n = O.ThunderUtil.getDefaultDownloadDir()
                        } while (0);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            showPersonalPage(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (w.isNullOrUndefined(o) || w.isNullOrUndefined(o[0])) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = 0, a = o[0];
                        if (!this.isPersonalPageTrackEvent) {
                            this.isPersonalPageTrackEvent = !0;
                            let e = x.ConfigNS.getValue("Install", "PersonalUid", "");
                            void 0 !== e && null !== e || (e = "");
                            let t = "uid=" + e + ",start_page=" + (a ? "Individualization_home_page" : "official_home_page");
                            n = yield p.XLStatNS.asyncTrackEvent("core_event", "startup_page", "", 0, 0, 0, 0, t)
                        }
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            showWebWnd(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (w.isNullOrUndefined(o) || w.isNullOrUndefined(o[0])) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = o[0];
                        if (o.splice(0, 1), null !== o[10] && void 0 !== o[10]) {
                            let e = o[10];
                            o[10] = (() => n(this, void 0, void 0, function* () {
                                return new Promise(i => {
                                    S.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e), i(!0)
                                })
                            }))
                        }
                        if (null !== o[11] && void 0 !== o[11]) {
                            let e = o[11];
                            o[11] = (() => n(this, void 0, void 0, function* () {
                                S.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e)
                            }))
                        }
                        yield P.EmbeddedBrowserManagerNs.showWebWnd(a, ...o), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }

            createWebWnd(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (w.isNullOrUndefined(o) || w.isNullOrUndefined(o[0])) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = o[0];
                        if (o.splice(0, 1), null !== o[10] && void 0 !== o[10]) {
                            let e = o[10];
                            o[10] = (() => n(this, void 0, void 0, function* () {
                                return new Promise(i => {
                                    S.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e), i(!0)
                                })
                            }))
                        }
                        if (null !== o[11] && void 0 !== o[11]) {
                            let e = o[11];
                            o[11] = (() => n(this, void 0, void 0, function* () {
                                S.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e)
                            }))
                        }
                        if (null !== o[12] && void 0 !== o[12]) {
                            let e = o[12];
                            o[12] = ((i, ...o) => n(this, void 0, void 0, function* () {
                                S.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e, i, ...o)
                            }))
                        }
                        yield P.EmbeddedBrowserManagerNs.createWebWnd(a, ...o), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }

            createIndependentWebWnd(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (w.isNullOrUndefined(o) || w.isNullOrUndefined(o[0])) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        if (null !== o[10] && void 0 !== o[10]) {
                            let e = o[10];
                            o[10] = (() => n(this, void 0, void 0, function* () {
                                return new Promise(i => {
                                    S.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e), i(!0)
                                })
                            }))
                        }
                        if (null !== o[11] && void 0 !== o[11]) {
                            let e = o[11];
                            o[11] = (() => n(this, void 0, void 0, function* () {
                                S.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e)
                            }))
                        }
                        if (null !== o[12] && void 0 !== o[12]) {
                            let e = o[12];
                            o[12] = ((i, ...o) => n(this, void 0, void 0, function* () {
                                S.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e, i, ...o)
                            }))
                        }
                        let a = yield P.EmbeddedBrowserManagerNs.createIndependentWebWnd(...o);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, a)
                    } while (0)
                })
            }

            registerWebFunction(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n) || w.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], r = n[2];
                    if (null === a || void 0 === a || "" === a) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if (null === r || void 0 === r) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    P.EmbeddedBrowserManagerNs.registerWebFunction(o, a, (e, ...i) => {
                        S.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, r, void 0, ...i)
                    }), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            callBackWebFunction(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n) || w.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], r = n[2], s = n[3];
                    if (null === o || void 0 === o || "" === o) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if (null === a || void 0 === a) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if (null === r || void 0 === r) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    P.EmbeddedBrowserManagerNs.callBackWebFunction(o, a, r, s), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            fireEventWebFunction(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (w.isNullOrUndefined(n) || w.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    if (null === o || void 0 === o || "" === o) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    n.splice(0, 1), P.EmbeddedBrowserManagerNs.fireEventWebFunction(o, ...n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            isPhoneAuth(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    M.phoneAuthObject.isPhoneAuthAw().then(n => {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                    }).catch()
                } while (0)
            }

            getSearchRecommends(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    let n = F.SearchConfigNS.getRecommends();
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                } while (0)
            }

            setSearchRecommends(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    F.SearchConfigNS.setRecommends(o), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            getCommonlySites(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        let n = yield L.CommonSitesMgrNS.getInstance().getMostCommonly();
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(n))
                    } while (0)
                })
            }

            clearCommonlySites(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        yield L.CommonSitesMgrNS.getInstance().clear()
                    } while (0)
                })
            }

            deleteCommonlySites(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        yield L.CommonSitesMgrNS.getInstance().delete(o[0])
                    } while (0)
                })
            }

            topBookmarksItem(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    ie.emit("bookmarks.top", n[0]), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                } while (0)
            }

            editBookmarksItemAW(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0];
                        if (!n.url || !n.title || !n.state) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = yield(yield Y.asyncRemoteCall.getCurrentWindow()).getBounds(),
                            r = {y: a.y + 48, x: a.x + (a.width - 400) / 2, modal: !1},
                            s = yield G.MessageBox.custom("BookMarks", {state: n.state, title: n.title}, r);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, s), ie.emit("bookmarks.editfinish", s, n)
                    } while (0)
                })
            }

            getRecentHistorys(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        let n = yield z.historyManager.getRecentHistory();
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(n))
                    } while (0)
                })
            }

            clearHistorys(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        let n = yield z.historyManager.clear();
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(n))
                    } while (0)
                })
            }

            deleteHistoryItem(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        let n = o[0];
                        if (!n) break;
                        let a = null;
                        try {
                            a = JSON.parse(n)
                        } catch (e) {
                        }
                        if (!a) break;
                        yield z.historyManager.delete(a), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }

            getBaiduDWZ(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = yield R.getBaiduDWZ(n);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, a)
                    } while (0)
                })
            }

            getShouleiShareLink(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = "pic";
                        w.isString(o[1]) && (a = o[1]);
                        let r = "";
                        w.isString(o[2]) && (r = o[2]);
                        let s = yield U.getShouleiShareLink(n, a, r);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, s)
                    } while (0)
                })
            }

            getShouleiShareLinkDlj(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = "pic";
                        w.isString(o[1]) && (a = o[1]);
                        let r = "";
                        w.isString(o[2]) && (r = o[2]);
                        let s = yield U.getShouleiShareLinkDlj(n, a, r);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, s)
                    } while (0)
                })
            }

            getShouleiShareLink2(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = o[1], r = o[2], s = o[3], l = o[4], u = o[5], c = "pic";
                        w.isString(o[6]) && (c = o[6]);
                        let h = "";
                        w.isString(o[7]) && (h = o[7]);
                        let f = yield U.getShouleiShareLink2(n, a, r, s, l, u, c, h);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, f)
                    } while (0)
                })
            }

            getShouleiShareLinkDlj2(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = o[1], r = o[2], s = o[3], l = o[4], u = o[5], c = "pic";
                        w.isString(o[6]) && (c = o[6]);
                        let h = "";
                        w.isString(o[7]) && (h = o[7]);
                        let f = yield U.getShouleiShareLinkDlj2(n, a, r, s, l, u, c, h);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, f)
                    } while (0)
                })
            }

            getShouleiFileTransferLink(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0] || !o[1]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = o[0], r = "pic";
                        w.isString(o[1]) && (r = o[1]);
                        let s = "";
                        w.isString(o[2]) && (s = o[2]), X.ThunderKernel.getSubNetUploader((o, l) => n(this, void 0, void 0, function* () {
                            if (ne.information("getSubNetUploader result", o, l), 0 === o && l) {
                                let n = yield U.getShouleiFileTransferLink(a, l, r, s);
                                e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                            } else e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.CallFailed)
                        }))
                    } while (0)
                })
            }

            getShouleiFileTransferDlj(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = o[0], r = "pic";
                        w.isString(o[1]) && (r = o[1]);
                        let s = "";
                        w.isString(o[2]) && (s = o[2]), X.ThunderKernel.getSubNetUploader((o, l) => n(this, void 0, void 0, function* () {
                            if (ne.information("getSubNetUploader result", o, l), 0 === o && l) {
                                let n = yield U.getShouleiFileTransferDlj(a, l, r, s);
                                e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                            } else e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.CallFailed)
                        }))
                    } while (0)
                })
            }

            getVideoPreViews(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        let n = o[0], a = o[1];
                        a || (a = "picPreview");
                        let r = yield K.videoPreviewData.getVideoPreview(n);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, r)
                    } while (0)
                })
            }

            getInitDownloadData(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        let n = JSON.stringify(B.default.getDownloadData());
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            bringMainWndToTop(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        let n = !1, o = yield Y.asyncRemoteCall.getCurrentWindow();
                        o && ((yield o.isMinimized()) && (yield o.restore()), yield o.show(), yield s.ToolsUtilitiesAWNS.setForegroundWindow(te, o), n = !0), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            log(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (!n || n.length < 3) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let a = n[0], r = n[1], s = null;
                    s = w.isString(a) && a.length > 0 ? o.default.getLogger(a) : ne;
                    let l = !0;
                    switch (r) {
                        case"verbose":
                            s.verbose(n.splice(2));
                            break;
                        case"information":
                            s.information(n.splice(2));
                            break;
                        case"warning":
                            s.warning(n.splice(2));
                            break;
                        case"error":
                            s.error(n.splice(2));
                            break;
                        case"critical":
                            s.critical(n.splice(2));
                            break;
                        default:
                            l = !1
                    }
                    e.callNativeFunctionCallback(t, i, l ? d.NativeFunctionErrorCode.Success : d.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            isFilePathExist(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0] || !w.isString(o[0])) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = yield E.FileSystemAWNS.existsAW(n);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, a)
                    } while (0)
                })
            }

            getTaskBirdKeyData(e, t, i, n) {
                do {
                    if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = h.TaskOperate.getTaskBirdKeyData(o);
                    e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, a)
                } while (0)
            }

            createWebShortcut(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information("createWebShortcut");
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = !1, s = o[0], l = null;
                        try {
                            l = JSON.parse(s)
                        } catch (e) {
                            ne.warning("error", e)
                        }
                        if (l && l.name && l.url && l.iconUrl) {
                            let n = l.name.replace(/[*?/\\:|<>\"]/g, "_"), o = yield Y.asyncRemoteCall.getApp(),
                                s = r.join(yield o.getPath("desktop"), `${n}.lnk`), u = l.runParams || "";
                            ne.information("lnkPath", s), ne.information("runParams", u), ne.information("iconUrl", l.iconUrl);
                            let c = "", h = encodeURI(l.iconUrl), f = te.getRoamingAppDataPath(),
                                p = a.join(f, "XLWebPageGame/IconDir"), g = n + ".ico";
                            c = a.join(p, g);
                            let m = yield V.AxiosNS.downloadFileAW(h, c);
                            if (ne.information("downloadFileAW", m), ne.information("url", l.url), ne.information("iconPath", c), m) {
                                te.createShortcut(s, l.url, u, c, n => {
                                    ne.information("createShortcut result", n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                                });
                                break
                            }
                        }
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            messageBoxPop(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information("messageBoxPop args:", o);
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = null;
                        try {
                            n = JSON.parse(o[0])
                        } catch (n) {
                            ne.warning(n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = null;
                        if (o[1]) try {
                            a = JSON.parse(o[1])
                        } catch (e) {
                            ne.warning(e)
                        }
                        let r = yield G.MessageBox.pop(n, a);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(r))
                    } while (0)
                })
            }

            messageBoxConfirm(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information("messageBoxConfirm args:", o);
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = null;
                        try {
                            n = JSON.parse(o[0])
                        } catch (n) {
                            ne.warning(n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = null;
                        if (o[1]) try {
                            a = JSON.parse(o[1])
                        } catch (e) {
                            ne.warning(e)
                        }
                        let r = yield G.MessageBox.confirm(n, a);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(r))
                    } while (0)
                })
            }

            messageBoxCustom(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information("messageBoxCustom args:", o);
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = null;
                        try {
                            a = JSON.parse(o[1])
                        } catch (n) {
                            ne.warning(n), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let r = null;
                        if (o[1]) try {
                            r = JSON.parse(o[2])
                        } catch (e) {
                            ne.warning(e)
                        }
                        let s = yield G.MessageBox.custom(n, a, r);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(s))
                    } while (0)
                })
            }

            getTaskBirdKeyOfTaskId(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information("messageBoxConfirm args:", o);
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = ee.getTaskFromTaskId(Number(n));
                        if (!a) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let r = void 0;
                        r = a.getExtraObject().getUserData(j.TaskUserDataGUID.guidBirdKey, "birdKey"), e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, r)
                    } while (0)
                })
            }

            promptShare(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        H.ShareToastListenerNS.addListener(o[0], o[1])
                    } while (0)
                })
            }

            setPlayerPosition(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    ne.information("native setPlayerPosition openFrom", o[8]);
                    let e = x.ConfigNS.getValue("PopBox", "AutoPop", !0),
                        t = yield J.client.callServerFunction("getPlayTaskDetailShow");
                    do {
                        if (("backup" === o[8] || "scroll" === o[8]) && !t) break;
                        if (!e && "showDetail" === o[8]) {
                            let e = (yield Q.server.callClientFunctionByName($.CommonIPCBase.mainProcessContext, "getXmpShowMode"))[0];
                            if (ne.information("get xmp mode", e), e !== Z.XMPShowMode.MINI_MODE && e !== Z.XMPShowMode.UNKNOWN_MODE) break
                        }
                    } while (0)
                })
            }

            popupDownloadShoulei(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (w.isNullOrUndefined(e) || w.isNullOrUndefined(t) || w.isNullOrUndefined(i)) break;
                        let n = yield q.getMobileImgSrc();
                        if (!n) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.CallFailed);
                            break
                        }
                        let a = yield G.MessageBox.custom("img-dlg", {src: n, width: 400, height: 276}, {
                            width: 400,
                            height: 276
                        });
                        if (e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(a)), !o) break
                    } while (0)
                })
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.NaviteFunctionNS || (t.NaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), a = i(15), r = i(4), s = i(16), l = i(11), d = i(0), u = i(71), c = i(63), h = i(70), f = i(61),
        p = l.DownloadKernelTaskManager.getTaskManager(), g = s.DownloadKernelEventManager.getEventManager(),
        m = d.default.getLogger("Thunder.DownloadAndPlayNodeIPC");
    !function (e) {
        let t, i, s, l, d = void 0;

        function v(e, ...t) {
            return n(this, void 0, void 0, function* () {
                return null
            })
        }

        function y(e, t, i) {
            o.client.callServerFunction("BringMainWndToTop").catch(), o.client.callServerFunction("OpenNewTab", i).catch()
        }

        function T(e, t, i) {
            return n(this, void 0, void 0, function* () {
                yield o.client.callServerFunction("SetPlayingTaskId", i.toString(), h.XmpPlaySoure.PLAY_BY_DOWNLOAD)
            })
        }

        function w(e, t, i) {
            m.information("[NewStat]... 获取任务信息，taskId=", i), "string" == typeof i && (i = parseInt(i, 10));
            let n = p.getTaskFromTaskId(i);
            if (!n) return;
            let o = n.getTaskChannelInfo();
            if (!o) return;
            let a = 0, r = n.getTaskBaseInfo();
            r && (a = r.downloadSize || 0);
            let s = o.dcdnSize || 0, l = o.offlineSize || 0, d = {
                taskId: n.getId(),
                dcdnDownloadSized: s + l,
                taskStatus: n.getTaskStatus(),
                downloadSize: a,
                channelInfo: o
            };
            return m.information("[NewStat]... 得到任务信息对象,obj=", d), d
        }

        function k(e, t, i) {
            m.information("setOrderDownload taskId:", i);
            do {
                let e = p.getTaskFromTaskId(i);
                if (!e) break;
                e.setDownloadStrategy(r.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_DOWNLOADINGPLAYING)
            } while (0)
        }

        function C(e, t, i) {
            m.information("setDisorderDownload taskId:", i);
            do {
                let e = p.getTaskFromTaskId(i);
                if (!e) break;
                e.setDownloadStrategy(r.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_NORMALDOWNLOAD)
            } while (0)
        }

        function b(e, t, i) {
            m.information("onStopPlay taskId:", i)
        }

        function I(e, t, i, n) {
            m.information("onPlayCompleted taskId:", i, "fileIndex", n);
            do {
                let e = p.getTaskFromTaskId(i);
                if (!e) break;
                if (e.getType() === r.DownloadKernel.TaskType.Bt) {
                    let t = e.getExtraObject().getBtFileByRealIndex(n);
                    if (t) {
                        let e = t.getBtFileAttribute(r.DownloadKernel.BtFileAttribute.Duration);
                        t.setPlayPosition(e)
                    }
                } else {
                    let t = e.getTaskAttribute(r.DownloadKernel.TaskAttribute.Duration);
                    e.setPlayPosition(t)
                }
            } while (0)
        }

        function S(e, t, i, n, o, a) {
            m.information("onUpdateDurationAndPosition taskId:", i, "fileIndex", n, "duration:", o, "position:", a);
            do {
                let e = p.getTaskFromTaskId(i);
                if (!e) break;
                if (e.getType() === r.DownloadKernel.TaskType.Bt) {
                    let t = e.getExtraObject().getBtFileByRealIndex(n);
                    t && (t.setDuration(o), t.setPlayPosition(a))
                } else e.setDuration(o), e.setPlayPosition(a)
            } while (0)
        }

        e.init = function () {
            a.server.registerFunctions({
                SetOrderDownload: k,
                SetDisorderDownload: C,
                OnStopPlay: b,
                OnPlayCompleted: I,
                OnUpdateDurationAndPosition: S,
                OpenURL: y,
                UpdatePlayTaskId: T,
                GetTaskInfoById: w
            }), d = g.attachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== r.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!e[1]) break;
                    e[1].forEach(e => n(this, void 0, void 0, function* () {
                        let t = e.getTaskStatus();
                        t === r.DownloadKernel.TaskStatus.StopPending ? v("OnTaskStopPending", e.getId()).catch() : t === r.DownloadKernel.TaskStatus.Stopped ? yield a.server.callClientFunctionByName(f.mainRendererContext, "OnTaskStopped", e.getId()) : t === r.DownloadKernel.TaskStatus.Started ? v("OnTaskStarted", e.getId()).catch() : t === r.DownloadKernel.TaskStatus.Succeeded || t === r.DownloadKernel.TaskStatus.Seeding ? v("OnTaskSuccess", e.getId()).catch() : t === r.DownloadKernel.TaskStatus.DestroyPending ? v("OnTaskDestroyPending", e.getId()).catch() : t === r.DownloadKernel.TaskStatus.Failed && v("OnTaskFailed", e.getId()).catch()
                    }))
                } while (0)
            }), t = g.attachTaskEvent(r.DownloadKernel.TaskEventType.InsertToCategoryView, (e, t, i, n) => {
                if (e !== r.DownloadKernel.TaskEventType.InsertToCategoryView) return;
                let o = [];
                for (let e = 0; e < n.length; e++) {
                    let t = n[e].getId();
                    t && o.push(t)
                }
                v("OnTaskInserted", t, i, o).catch()
            }), i = g.attachTaskEvent(r.DownloadKernel.TaskEventType.RemoveFromCategoryView, (e, t, i, n) => {
                if (e !== r.DownloadKernel.TaskEventType.RemoveFromCategoryView) return;
                let o = [];
                for (let e = 0; e < n.length; e++) {
                    let t = n[e].getId();
                    t && o.push(t)
                }
                v("OnTaskRemoved", t, i, o).catch()
            }), s = g.attachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, (e, t, i) => {
                if (e !== r.DownloadKernel.TaskEventType.DetailChanged) return;
                let n = [];
                for (let e = 0; e < t.length; e++) {
                    let i = t[e].getId();
                    i && n.push(i)
                }
                v("OnTaskDetailChanged", n, i).catch()
            }), l = g.attachTaskEvent(r.DownloadKernel.TaskEventType.DcdnStatusChanged, (e, t) => {
                if (e !== r.DownloadKernel.TaskEventType.DcdnStatusChanged) return;
                let i = {};
                for (let e = 0; e < t.length; ++e) {
                    let n = t[e];
                    if (!n) continue;
                    let o = n.getTaskAttribute(r.DownloadKernel.TaskAttribute.TaskId),
                        a = n.getTaskChannelInfo().dcdnStatus;
                    i[o] = a
                }
                v("OnTaskDcdnStatusChanged", i).catch()
            }), c.quitPromises.addBefore(() => new Promise(e => n(this, void 0, void 0, function* () {
                m.information("callClientFunctionByName getXmpShowMode begin");
                let t = (yield a.server.callClientFunctionByName(u.CommonIPCBase.mainProcessContext, "getXmpShowMode"))[0];
                m.information("callClientFunctionByName getXmpShowMode end"), m.information("quitPromises showMode", t), t === h.XMPShowMode.EMBED_CHILD_MODE && (yield a.server.callClientFunctionByName(u.CommonIPCBase.mainProcessContext, "showPlayerWindow", h.CmdShow.SW_HIDE), m.information("callClientFunctionByName OnUnbindAndExit begin"), yield v("OnUnbindAndExit"), m.information("callClientFunctionByName OnUnbindAndExit end")), e(!0)
            })))
        }, e.uninit = function () {
            void 0 !== d && (g.detachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, d), d = void 0), t && (g.detachTaskEvent(r.DownloadKernel.TaskEventType.InsertToCategoryView, t), t = void 0), i && (g.detachTaskEvent(r.DownloadKernel.TaskEventType.RemoveFromCategoryView, t), i = void 0), s && (g.detachTaskEvent(r.DownloadKernel.TaskEventType.DetailChanged, t), s = void 0), l && (g.detachTaskEvent(r.DownloadKernel.TaskEventType.DcdnStatusChanged, l), l = void 0)
        }, e.nofityXMP = v
    }(t.DownloadAndPlayNodeIPCNS || (t.DownloadAndPlayNodeIPCNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(47);
    const o = new class extends n.default {
    };
    t.default = o
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(4), a = i(33), r = i(11), s = i(16), l = i(26), d = i(44), u = i(67), c = i(10), h = i(23),
        f = i(17), p = i(7), g = i(3);
    !function (e) {
        e.dk = o.DownloadKernel, e.dkManager = a.DownloadKernelManager, e.taskManager = r.DownloadKernelTaskManager.getTaskManager(), e.eventManager = s.DownloadKernelEventManager.getEventManager(), e.categoryManager = l.DownloadKernelCategoryManager.getCategoryManager(), e.categoryViewManager = d.DownloadKernelCategoryViewManager.getCategoryViewManager(), e.taskUtilities = u.TaskUtilitiesAWNS, e.config = c.ConfigNS, e.logHelper = h.LoginHelperNS, e.thunderHelper = p.default(n.join(__rootDir, "../bin/ThunderHelper.node")), e.nativeCallModule = f.NativeCallModule, e.clientModule = g.client
    }(t.DownloadKernelTestNS || (t.DownloadKernelTestNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(4), a = i(16), r = i(11), s = i(26), l = i(17),
        d = r.DownloadKernelTaskManager.getTaskManager(), u = a.DownloadKernelEventManager.getEventManager(),
        c = s.DownloadKernelCategoryManager.getCategoryManager(), h = n.default.getLogger("Community.TaskManager");
    !function (e) {
        class t {
            constructor() {
                this.insertToCategoryViewEventId = void 0, this.detailChangedEventId = void 0, this.taskStatusChangedEventId = void 0, this.taskInfoMap = {}, this.userLoginEventId = void 0, this.userLogoutEventId = void 0
            }

            init() {
                h.information("init"), this.insertToCategoryViewEventId = u.attachTaskEvent(o.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                    e && e[0] === o.DownloadKernel.TaskEventType.InsertToCategoryView && this.onInsertToCategoryView(e[1], e[2], e[3])
                }), this.detailChangedEventId = u.attachTaskEvent(o.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    e && e[0] === o.DownloadKernel.TaskEventType.DetailChanged && this.onDetailChanged(e[1], e[2])
                }), this.taskStatusChangedEventId = u.attachTaskEvent(o.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    e && e[0] === o.DownloadKernel.TaskEventType.StatusChanged && this.onTaskStatusChanged(e[1])
                }), this.userLoginEventId = l.NativeCallModule.nativeCall.AttachNativeEvent("OnUserLogin", this.onUserLogin.bind(this)), this.userLogoutEventId = l.NativeCallModule.nativeCall.AttachNativeEvent("OnUserLogout", this.onUserLogout.bind(this))
            }

            uninit() {
                void 0 !== this.insertToCategoryViewEventId && (this.insertToCategoryViewEventId = void 0, u.detachTaskEvent(o.DownloadKernel.TaskEventType.InsertToCategoryView, this.insertToCategoryViewEventId)), void 0 !== this.detailChangedEventId && (this.detailChangedEventId = void 0, u.detachTaskEvent(o.DownloadKernel.TaskEventType.DetailChanged, this.detailChangedEventId)), void 0 !== this.taskStatusChangedEventId && (this.taskStatusChangedEventId = void 0, u.detachTaskEvent(o.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventId)), void 0 !== this.userLoginEventId && (l.NativeCallModule.nativeCall.DetachNativeEvent("OnUserLogin", this.userLoginEventId), this.userLoginEventId = void 0), void 0 !== this.userLogoutEventId && (l.NativeCallModule.nativeCall.DetachNativeEvent("OnUserLogout", this.userLogoutEventId), this.userLogoutEventId = void 0), this.taskInfoMap = {}
            }

            getTaskNameByTaskUniqueID(e) {
                if (!e || "" === e) return "";
                let t = this.taskInfoMap[e];
                if (t) {
                    if (-1 === t.categoryId) return t.taskName;
                    {
                        let e = c.getCurrentPrivateCategory();
                        if (e && e.getId() === t.categoryId) return t.taskName
                    }
                }
                return ""
            }

            getTaskAverageSpeedByTaskUniqueID(e) {
                if (!e || "" === e) return 0;
                let t = 0, i = this.taskInfoMap[e];
                if (i) if (-1 === i.categoryId) t = this.getTaskAverageSpeed(i.taskId); else {
                    let e = c.getCurrentPrivateCategory();
                    e && e.getId() === i.categoryId && (t = this.getTaskAverageSpeed(i.taskId))
                }
                return t
            }

            getTaskInfoByTaskUniqueID(e) {
                return e && "" !== e ? this.taskInfoMap[e] : null
            }

            onUserLogin(e) {
                h.information("onUserLogin userId:", e);
                let t = c.getPrivateCategoryFromUserId(e);
                if (t) {
                    let e = t.getCategoryViews();
                    for (let t = 0; t < e.length; ++t) {
                        let i = [];
                        e[t].getTasks().forEach(e => {
                            i.push(e)
                        }), this.updateTaskInfo(i)
                    }
                }
            }

            onUserLogout() {
                h.information("onUserLogout");
                for (let e in this.taskInfoMap) {
                    -1 !== this.taskInfoMap[e].categoryId && delete this.taskInfoMap[e]
                }
            }

            onInsertToCategoryView(e, t, i) {
                do {
                    if (!i) break;
                    h.information("onInsertToCategoryView number of taskList:", i.length), this.updateTaskInfo(i)
                } while (0)
            }

            onDetailChanged(e, t) {
                do {
                    if (!e || !t) break;
                    h.information("onDetailChanged number of taskList:", e.length, ", detailChangedFlags:", t);
                    for (let i = 0; i < e.length; ++i) {
                        let n = e[i];
                        n && ((t & o.DownloadKernel.TaskDetailChangedFlags.TaskName || t & o.DownloadKernel.TaskDetailChangedFlags.Gcid) && this.updateTaskInfo([n]))
                    }
                } while (0)
            }

            onTaskStatusChanged(e) {
                for (let t = 0; t < e.length; ++t) {
                    let i = e[t];
                    if (i && i.getTaskStatus() === o.DownloadKernel.TaskStatus.DestroyPending) {
                        let e = this.getTaskUniqueIDByTask(i);
                        e && "" !== e && (h.information("onTaskStatusChanged delete taskInfoMap uniqueId:", e), delete this.taskInfoMap[e])
                    }
                }
            }

            updateTaskInfo(e) {
                let t = c.getCurrentPrivateCategory();
                for (let i = 0; i < e.length; ++i) {
                    let n = e[i];
                    if (!n) continue;
                    let a = n.getTaskAttribute(o.DownloadKernel.TaskAttribute.CategoryId);
                    if (-1 !== a && (!t || t.getId() !== a)) continue;
                    let r = this.getTaskUniqueIDByTask(n);
                    if (r && "" !== r) {
                        let e = this.getTaskNameByTask(n), t = n.getTaskBaseInfo().taskId,
                            i = n.getTaskAttribute(o.DownloadKernel.TaskAttribute.CategoryViewId);
                        h.information("updateTaskInfo uniqueId:", r, ", taskId:", t, ", taskName:", e, ", categoryId:", a, ", categoryViewId:", i);
                        let s = {taskId: t, taskName: e, categoryId: a, categoryViewId: i};
                        this.taskInfoMap[r] = s
                    }
                }
            }

            getTaskAverageSpeed(e) {
                let t = d.getTaskFromTaskId(e);
                if (!t) return 0;
                let i = t.getTaskAttribute(o.DownloadKernel.TaskAttribute.DownloadingPeriod),
                    n = t.getTaskAttribute(o.DownloadKernel.TaskAttribute.DownloadSize);
                0 === i && (i = 0);
                let a = Math.round(n / i);
                return h.information("getTaskAverageSpeed taskId:", e, ", taskAverageSpeed:", a, ", taskAverageSpeedFormat:", this.formatSize(a)), a
            }

            formatSize(e, t = 2) {
                if (!e || e < 0) return "0.0B";
                let i = 0, n = e;
                for (; n > 1024 && !(i >= 5);) n /= 1024, i += 1;
                let o = Math.pow(10, t);
                return Math.round(n * o) / o + ["B", "KB", "MB", "GB", "TB", "PB"][i]
            }

            getTaskNameByTask(e) {
                let t = e.getTaskName();
                if (!t || "" === t) {
                    if (e.getTaskBaseInfo().taskType === o.DownloadKernel.TaskType.Bt) {
                        t = e.getExtraObject().getDisplayName()
                    }
                }
                return t
            }

            getTaskUniqueIDByTask(e) {
                let t = "";
                if (!e) return t;
                switch (e.getType()) {
                    case o.DownloadKernel.TaskType.Bt:
                        let i = e.getExtraObject().getInfoId();
                        h.information("getTaskUniqueIDByTask bt task infoId:", i), t = i;
                        break;
                    case o.DownloadKernel.TaskType.P2sp:
                    case o.DownloadKernel.TaskType.Emule:
                        let n = e.getTaskAttribute(o.DownloadKernel.TaskAttribute.Gcid);
                        h.information("getTaskUniqueIDByTask p2sp or emule task gcid: ", n), t = n
                }
                return t
            }
        }

        e.TaskManager = t;
        const i = new t;
        e.getTaskManager = function () {
            return i
        }
    }(t.CommunityTaskManagerNS || (t.CommunityTaskManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = "\n", o = "\r\n", a = /^\s*\[(.+?)\]\s*$/, r = /^\s*([^#].*?)\s*=\s*(.*?)\s*$/;
    !function (e) {
        e.stringify = function (e) {
            let t = "";
            for (let i in e) {
                let n = e[i];
                if (!n) break;
                t += "[" + i + "]" + o;
                for (let e in n) {
                    let i = n[e];
                    if (void 0 === i || null === i) break;
                    t += e + "=" + i + o
                }
            }
            return t + n
        }, e.parse = function (e) {
            let t, i = {}, n = e.split(/\r\n|\r|\n/), o = {};
            for (let e = 0; e < n.length; ++e) {
                let s = n[e];
                (t = s.match(a)) ? i[t[1]] = o = i[t[1]] || {} : o && (t = s.match(r)) && (o[t[1]] = t[2])
            }
            return i
        }
    }(t.IniNS || (t.IniNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(384), a = i(70), r = i(7).default(n.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        function t(e, t, i, n, a, s, l) {
            let d = {x: 0, y: 0, width: 0, height: 0}, u = o.BrowserWindowNS.getDpiFactor(r, e);
            return d.x = Math.ceil(n * u), d.y = Math.ceil(s * u), d.width = Math.ceil((t - n - a) * u), d.height = Math.ceil((i - s - l) * u), d
        }

        e.resizeBrowserWindow = function (e, i, n, o, s, l, d, u = a.Uflag.SWP_SHOWWINDOW) {
            let c = !1;
            {
                let h = t(e, i, n, o, s, l, d);
                r.setWindowPos(e, a.OptionOfHWNDInAfter.HWND_TOP, Math.round(h.x), Math.round(h.y), Math.round(h.width), Math.round(h.height), u), c = !0
            }
            return c
        }, e.getBrowserWindowRect = t
    }(t.CommonFunctionNs || (t.CommonFunctionNs = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3);

    class a {
        constructor() {
            this.mPeerId = void 0, this.mUserId = "0", this.mSessionId = void 0, this.mIsLogin = !1, this.mIsVip = !1, this.mVipLevel = 0, this.mVasType = 0, this.mExpireDate = "", this.mThunderVersionStr = void 0, this.mThunderVersionNumber = void 0
        }

        get expireDate() {
            return this.mExpireDate
        }

        get thunderVersionNumber() {
            return this.mThunderVersionNumber
        }

        get thunderVersionString() {
            return this.mThunderVersionStr
        }

        get vasType() {
            return this.mVasType
        }

        get vipLevel() {
            return this.mVipLevel
        }

        get userId() {
            return this.mUserId
        }

        get isLogin() {
            return this.mIsLogin
        }

        get isVip() {
            return this.mIsVip
        }

        get isPlatinumVip() {
            return this.isVip && this.mVasType > 2
        }

        get isSuperVip() {
            return this.isVip && 5 === this.mVasType
        }

        getSessionId() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    this.mSessionId ? e(this.mSessionId) : o.client.callServerFunction("GetSessionID").then(t => {
                        this.mSessionId = t, e(this.mSessionId || "0")
                    }).catch()
                })
            })
        }

        getPeerId() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    this.mPeerId ? e(this.mPeerId) : o.client.callServerFunction("GetPeerID").then(t => {
                        this.mPeerId = t, e(this.mPeerId || "")
                    }).catch()
                })
            })
        }

        getUserinfo() {
            return n(this, void 0, void 0, function* () {
                return yield o.client.callServerFunction("GetAllUserInfo")
            })
        }

        parseUserInfo() {
            return n(this, void 0, void 0, function* () {
                let e = yield this.getUserinfo();
                if (e) if (this.mIsLogin = !0, this.mUserId = e.userID || "0", e.vipList && e.vipList[0]) {
                    if (e.vipList[0].isVip) {
                        let t = Number(e.vipList[0].isVip).valueOf();
                        this.mIsVip = t > 0
                    } else this.mIsVip = !1;
                    e.vipList[0].vipLevel && (this.mVipLevel = Number(e.vipList[0].vipLevel).valueOf()), e.vipList[0].vasType && (this.mVasType = Number(e.vipList[0].vasType).valueOf()), e.vipList[0].expireDate && (this.mExpireDate = e.vipList[0].expireDate)
                } else this.mIsVip = !1
            })
        }

        loadThunderVersion() {
            o.client.callServerFunction("GetThunderVersion").then(e => {
                this.mThunderVersionStr = e, this.mThunderVersionNumber = 0;
                let t = this.mThunderVersionStr.split(".");
                if (t && 4 === t.length) {
                    let e = Number(t[0]).valueOf(), i = Number(t[1]).valueOf(), n = Number(t[2]).valueOf(), o = 128;
                    this.mThunderVersionNumber = o * Math.pow(2, 24) + e * Math.pow(2, 16) + i * Math.pow(2, 8) + n
                }
            }).catch()
        }

        onLogin() {
            return n(this, void 0, void 0, function* () {
                this.clear(), yield this.parseUserInfo()
            })
        }

        onLogout() {
            this.clear()
        }

        clear() {
            this.mUserId = "0", this.mSessionId = void 0, this.mIsVip = !1, this.mIsLogin = !1, this.mVasType = 0, this.mVipLevel = 0
        }
    }

    t.UserHelper = a, function (e) {
        const t = new a;
        e.getUserHelper = function () {
            return t
        }
    }(t.UserHelperNS || (t.UserHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(524), o = i(3), a = i(5), r = i(27);
    t.signNative = new class {
        constructor() {
        }

        getNativeFunctionMap() {
            return [{functionName: "CloseDialog", nativeFunc: this.closeDialog}, {
                functionName: "ShowLoginPanel",
                nativeFunc: this.showLoginPanel
            }, {functionName: "PageReady", nativeFunc: this.pageReady}]
        }

        closeDialog(e, t, i, o) {
            n.signObject.closeDialog(), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
        }

        showLoginPanel(e, t, i, n) {
            o.client.callServerFunction("ShowLoginDlg", "sign").catch(), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
        }

        pageReady(e, t, i, o) {
            do {
                if (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) break;
                n.signObject.show().catch(), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
            } while (0)
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(27), o = i(145);
    t.phoneAuthNative = new class {
        constructor() {
        }

        getNativeFunctionMap() {
            return [{functionName: "HideWebDlg", nativeFunc: this.hideWebDlg}]
        }

        hideWebDlg(e, t, i, a) {
            do {
                if (null === e || void 0 === e) break;
                if (null === a || void 0 === a) break;
                let r = a[0], s = a[1];
                o.phoneAuthObject.closeDialog(s, r), e.callNativeFunctionCallback(t, i, n.NativeFunctionErrorCode.Success)
            } while (0)
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(7), a = i(0).default.getLogger("News-Popup.AdContainer"),
        r = o.default(n.join(__rootDir, "../bin/ThunderHelper.node")), s = 1125, l = 16;
    t.NewsAdContainer = class {
        constructor(e) {
            this.hwnd = 0, this.rect = null, this.id = e
        }

        getId() {
            return this.id
        }

        show() {
            a.information("show id:", this.id);
            do {
                if (!this.hwnd || !r.isWindowHandle(this.hwnd)) break;
                r.showWindow(this.hwnd, 5)
            } while (0)
        }

        hide() {
            a.information("hide id:", this.id);
            do {
                if (!this.hwnd || !r.isWindowHandle(this.hwnd)) break;
                r.showWindow(this.hwnd, 0)
            } while (0)
        }

        close() {
            a.information("close id:", this.id);
            do {
                if (!this.hwnd || !r.isWindowHandle(this.hwnd)) break;
                r.postMessage(this.hwnd, l, 0, 0)
            } while (0)
        }

        move(e, t, i, n) {
            do {
                if (this.rect = {
                    x: e,
                    y: t,
                    width: i,
                    height: n
                }, a.information("move id:", this.id, ", hwnd: ", this.hwnd, ", this.rect:", this.rect), !this.hwnd || !r.isWindowHandle(this.hwnd)) break;
                let o = (65535 & e) << 16 | 65535 & t, l = (65535 & i) << 16 | 65535 & n;
                r.postMessage(this.hwnd, s, o, l)
            } while (0)
        }

        onCreate(e) {
            this.hwnd = e
        }

        onClose() {
            this.hwnd = 0
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(526), o = i(10), a = i(5), r = i(0), s = i(27), l = r.default.getLogger("NativeFunction.News-Popup");
    t.newsPopupNative = new class {
        constructor() {
        }

        getNativeFunctionMap() {
            return [{functionName: "PageReady", nativeFunc: this.pageReady}, {
                functionName: "Close",
                nativeFunc: this.close
            }, {
                functionName: "SetStartMoveMousePos",
                nativeFunc: this.setStartMoveMousePos
            }, {functionName: "SetMoveMousePos", nativeFunc: this.setMoveMousePos}, {
                functionName: "Minimize",
                nativeFunc: this.minimize
            }, {functionName: "CreateAd", nativeFunc: this.createAd}, {
                functionName: "ShowAd",
                nativeFunc: this.showAd
            }, {functionName: "HideAd", nativeFunc: this.hideAd}, {
                functionName: "CloseAd",
                nativeFunc: this.closeAd
            }, {functionName: "SetConfigValue", nativeFunc: this.setConfigValue}]
        }

        pageReady(e, t, i, o) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                if (!o || !a.isNumber(o[0]) || !a.isNumber(o[1])) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let r = o[0], l = o[1], d = n.newsPopupObject.getSize();
                d[0] === r && d[1] === l || (n.newsPopupObject.setSize(r, l), n.newsPopupObject.center()), n.newsPopupObject.show().catch(), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        close(e, t, i, o) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                l.information("close"), n.newsPopupObject.close(), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        setStartMoveMousePos(e, t, i, o) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                if (!o || !a.isNumber(o[0]) || !a.isNumber(o[1])) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let r = o[0], d = o[1];
                n.newsPopupObject.setStartMoveMousePos(r, d).catch(), l.information("setStartMoveMousePos x:", r, ", y:", d), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        setMoveMousePos(e, t, i, o) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                let r = o[0], d = o[1];
                n.newsPopupObject.setMoveMousePos(r, d), l.information("setMoveMousePos x:", r, ", y:", d), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        minimize(e, t, i, o) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                l.information("minimize"), n.newsPopupObject.minimize(), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        createAd(e, t, i, o) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                let r = "";
                o.length > 0 && a.isString(o[0]) && (r = o[0]);
                let d = n.newsPopupObject.createAd(r);
                l.information("createAd adType:", r, ", id:", d), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, d)
            } while (0)
        }

        showAd(e, t, i, o) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                if (!(o && a.isNumber(o[0]) && a.isNumber(o[1]) && a.isNumber(o[2]) && a.isNumber(o[3]) && a.isNumber(o[4]))) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let r = o[0], d = o[1], u = o[2], c = o[3], h = o[4];
                n.newsPopupObject.showAd(r, d, u, c, h), l.information("showAd id:", r, ", x:", d, ", y:", u, ", width:", c, ", height:", h), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        hideAd(e, t, i, o) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                if (!o || !a.isNumber(o[0])) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let r = o[0];
                n.newsPopupObject.hideAd(r), l.information("hideAd id:", r), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        closeAd(e, t, i, o) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                if (!o || !a.isNumber(o[0])) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let r = o[0];
                l.information("closeAd id:", r), n.newsPopupObject.closeAd(r), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }

        setConfigValue(e, t, i, n) {
            do {
                if (!e || !a.isNumber(t) || !a.isNumber(i)) break;
                if (!(n && a.isString(n[0]) && a.isString(n[1]) && a.isString(n[2]))) {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                    break
                }
                let r = n[0], l = n[1], d = n[2];
                o.ConfigNS.setValue(r, l, d), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            } while (0)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3);
    t.postDownloadData = function (e) {
        return n(this, void 0, void 0, function* () {
            let t = null;
            return t = yield o.client.callRemoteClientFunction("User", "Request", "/fn/dlstatisc/1zb3oxs", {
                method: "POST",
                body: e,
                withCredentials: !0
            })
        })
    }, t.getDownloadData = function (e) {
        return n(this, void 0, void 0, function* () {
            let t = null;
            return t = yield o.client.callRemoteClientFunction("User", "Request", "/fn/dlstatisc/1zb3oxs", {
                method: "GET",
                body: e,
                withCredentials: !0
            })
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), a = i(42), r = i(11), s = i(0), l = i(397), d = i(2), u = i(8), c = i(66),
        h = i(16).DownloadKernelEventManager.getEventManager(), f = r.DownloadKernelTaskManager.getTaskManager(),
        p = s.default.getLogger("Preview-Data");
    t.videoPreviewData = new class {
        constructor() {
            this.previewDataMap = new Map, this.netRequestMap = new Map, this.previewCachePath = `${__profilesDir}/videoPreview/cache.json`, this.isSavingData = !1
        }

        init() {
            h.attachTaskEvent(o.DownloadKernel.TaskEventType.InsertToCategoryView, (e, t, i, n) => {
                if (e === o.DownloadKernel.TaskEventType.InsertToCategoryView && i === o.DownloadKernel.CategroyViewID.Recycle) if (n instanceof Array) for (let e = 0; e < n.length; e++) this.deleteTaskCache(n[e].getId()).catch(); else p.warning("传递数据错误")
            })
        }

        queryResInfo(e, t) {
            return n(this, void 0, void 0, function* () {
                let i, n = "", r = "", s = void 0, d = f.getTaskFromTaskId(e);
                if (d) {
                    if (0 === d.getVideoFileCount()) return;
                    let e = d.getType();
                    if (e === o.DownloadKernel.TaskType.P2sp || e === o.DownloadKernel.TaskType.Magnet) n = "url", r = d.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskUrl); else if (e === o.DownloadKernel.TaskType.Emule) n = "emule", r = d.getTaskAttribute(o.DownloadKernel.TaskAttribute.TaskUrl); else if (e === o.DownloadKernel.TaskType.Bt) {
                        n = "bt";
                        let e = d.getExtraObject(), t = e.getBtFileList();
                        for (let [e, i]of t) if (i.isSupportPlay()) {
                            s = e;
                            break
                        }
                        r = e.getInfoId()
                    }
                }
                return a.Common.isThunderPrivateUrl(r) && (r = a.Common.parseThunderPrivateUrl(r)), (i = yield l.getVideoPreviewInfo(n, r, s, t)) && i.data && !i.error ? i && 200 === i.status && (this.netRequestMap.get(e) ? p.information("本地已有文件记载") : (this.setPreviewData(e, i), this.saveLocalData().catch())) : this.netRequestMap.set(e, !1), p.information("getVideoPreviewInfo 网络获取  index=", s, " type=", n, " res=", i, " resInfo=", r), i
            })
        }

        getRealPath(e) {
            let t = e.indexOf("file:///");
            if (-1 === t) return e;
            let i = t + "file:///".length;
            return i > e.length - 1 ? e : e.substring(i)
        }

        getVideoPreview(e, t) {
            return n(this, void 0, void 0, function* () {
                if (!e) return;
                let i, n = yield this.queryResInfo(e, t);
                n && (i = n.data), yield this.getLocalData();
                let o = this.getPreviewData(e);
                if (o) {
                    p.information("使用本地");
                    let e = o.data;
                    return e && i && (e.total_time = i.total_time, p.information("[Test] 更新时间 total_time=", i.total_time)), o
                }
                return p.information("使用网络"), n
            })
        }

        isPreviewShow(e) {
            return n(this, void 0, void 0, function* () {
                let t = yield this.getVideoPreview(e);
                if (!t) return !1;
                let i = {};
                try {
                    "object" == typeof t.data ? i = t.data : "string" == typeof t.data && (i = JSON.parse(t.data))
                } catch (e) {
                    return !1
                }
                return !!i && !!i.pictures && 0 === i.code && i.pictures instanceof Array && i.pictures.length > 0
            })
        }

        setPreviewData(e, t) {
            p.information("taskid:", e), this.previewDataMap.set(e, t)
        }

        getPreviewData(e) {
            return this.previewDataMap.get(e)
        }

        deleteTaskCache(e) {
            return n(this, void 0, void 0, function* () {
                if (!e) return void p.warning("错误taskid");
                let t = `${__profilesDir}/videoPreview/${e}`;
                (yield u.FileSystemAWNS.existsAW(t)) ? (u.FileSystemAWNS.rmdirsAW(t).catch(), p.information("删除任务, taskId=", e), this.previewDataMap.delete(e), this.saveLocalData().catch()) : p.information("当前任务无缓存目录, taskId=", e)
            })
        }

        objectDeepClone(e, t) {
            if ("object" == typeof t) {
                e || (e = {});
                for (const i in t) t.hasOwnProperty(i) && (t[i] instanceof Array ? (e[i] || (e[i] = []), t[i].forEach(t => {
                    e[i].push(t)
                })) : t[i] instanceof Object ? (e[i] || (e[i] = {}), this.objectDeepClone(e[i], t[i])) : e[i] = t[i])
            }
        }

        getTimePercent(e) {
            if (e) {
                let t = new RegExp(/.*_([0-9]+)\.[a-zA-Z0-9]{1,4}?.*/), i = e.match(t);
                return i && i[1] ? parseFloat(i[1]) : void 0
            }
        }

        saveLocalData() {
            return n(this, void 0, void 0, function* () {
                p.information("saveLocalData enter"), this.isSavingData = !0;
                let e = new Map, t = `${__profilesDir}/videoPreview/`;
                (yield u.FileSystemAWNS.existsAW(t)) || (yield u.FileSystemAWNS.mkdirAW(t));
                let i, n = "";
                for (let o of this.previewDataMap.keys()) {
                    let a = {};
                    if (i = this.previewDataMap.get(o), p.information("get key=", o, " value=", i), !i) continue;
                    if (this.objectDeepClone(a, i.data), !a) continue;
                    if (!a.pictures) continue;
                    if ("object" != typeof a.pictures) continue;
                    if (a.pictures.length < 1) continue;
                    let r = {
                        "User-Agent": navigator.userAgent,
                        "Content-Type": "",
                        Accept: "image/jpeg",
                        "Accept-Encoding": "gzip, deflate",
                        "Accept-Language": "zh-CN,zh;q=0.9",
                        "Cache-Control": "no-cache",
                        Pragma: "no-cache",
                        Connection: "keep-alive"
                    }, s = "", l = ".png", h = [".jpg", ".jpeg", ".png", ".bmp", ".gif"], f = "", g = !1, m = 0;
                    n = t + o + "/";
                    let v = 0;
                    (yield u.FileSystemAWNS.existsAW(n)) || (yield u.FileSystemAWNS.mkdirAW(n));
                    let y = 0;
                    for (let e = 0; e < a.pictures.length; e++) a.pictures[e].startsWith("file:///") ? y++ : ((m = a.pictures[e].indexOf("?")) >= 0 && (f = d.extname(a.pictures[e].substring(0, m))), -1 !== h.indexOf(f) && (l = f), void 0 === (v = this.getTimePercent(a.pictures[e])) && (v = e), s = n + o + "_" + v + l, g = yield c.AxiosNS.downloadFileAW(a.pictures[e], s, r), p.information("下载文件,url=", a.pictures[e], " filePath=", s, " 结果,ret=", g), g && (a.pictures[e] = "file:///" + s, y++));
                    this.netRequestMap.set(o, 6 === y), p.information("saveMap key=", o, " data=", a), e.set(o, {
                        data: a,
                        status: i.status
                    }), a = void 0
                }
                if (p.information("saveMap size=", e.size), e.size > 0) {
                    let t = this.mapToJson(e);
                    yield u.FileSystemAWNS.writeFileAW(this.previewCachePath, t)
                }
                e.clear(), this.isSavingData = !1, p.information("saveLocalData leave")
            })
        }

        stringifyEx(e) {
            let t = [], i = JSON.stringify(e, (e, i) => {
                if ("object" == typeof i && null !== i) {
                    if (-1 !== t.indexOf(i)) return null;
                    t.push(i)
                }
                return i
            });
            return t = [], i
        }

        getLocalData() {
            return n(this, void 0, void 0, function* () {
                if (this.isSavingData) return void p.warning("正在保存数据...");
                let e, t = yield u.FileSystemAWNS.readFileAW(this.previewCachePath);
                if (t) {
                    try {
                        e = this.jsonToMap(t.toString())
                    } catch (e) {
                        p.warning("获取本地缓存失败, error=", e)
                    }
                    e ? (p.information("得到缓存,map=", e), this.previewDataMap = e) : p.warning("没有缓存,map=", e)
                } else p.information("读文件失败, buf=", t, " path=", this.previewCachePath)
            })
        }

        mapToObject(e) {
            let t = Object.create(null);
            for (let [i, n]of e) 0 !== i && (t[i] = n);
            return t
        }

        mapToJson(e) {
            let t = "";
            try {
                t = JSON.stringify(this.mapToObject(e))
            } catch (e) {
                p.warning("mapToJson error")
            }
            return t
        }

        objectToMap(e) {
            let t = new Map;
            for (let i of Object.keys(e)) t.set(parseInt(i, 10), e[i]);
            return t
        }

        jsonToMap(e) {
            return this.objectToMap(JSON.parse(e))
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(19), o = i(9), a = i(82), r = i(31), s = i(4), l = i(53), d = i(56),
        u = d.ToastNotifyManagerNS.getToastNotifyManger(), c = 18e4;
    const h = new class {
        constructor() {
            this.currentWords = "", this.toastTimerId = void 0
        }

        getContentType(e) {
            let t = void 0;
            return r.ThunderHelper.getTaskTypeFromUrl(e) === s.DownloadKernel.TaskType.Unkown ? a.URLHelperNS.isBirdKey(e) && (t = "bird") : t = "link", t
        }

        addListener(e, t) {
            do {
                if (void 0 === e && (e = n.clipboard.readText()), !e) break;
                if (e === this.currentWords) break;
                if (void 0 === t && (t = this.getContentType(e)), void 0 === t) break;
                this.toastTimerId && (clearTimeout(this.toastTimerId), this.toastTimerId = void 0), this.currentWords = e, this.toastTimerId = setTimeout(() => {
                    clearTimeout(this.toastTimerId), this.toastTimerId = void 0;
                    let e = n.clipboard.readText();
                    e === this.currentWords && (o.XLStatNS.trackEvent("download_leftpanel", "shear_plate_toast_show", "", 0, 0, 0, 0, `content=${encodeURIComponent(e)}`), u.showNotify(d.ToastNotifyManagerNS.notifyIdTaskOperatorCopyLink, l.ToastNotifyItemType.GreenNotify, "bird" === t ? "剪贴板有一个口令哦，去粘贴～" : "剪贴板有一个链接哦，去粘贴～", 3e3))
                }, c)
            } while (0)
        }
    };
    !function (e) {
        e.addListener = function (e, t) {
            h.addListener(e, t)
        }
    }(t.ShareToastListenerNS || (t.ShareToastListenerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(2), r = i(5), s = i(0), l = i(3), d = i(15), u = i(71), c = i(667), h = i(9), f = i(14),
        p = i(82), g = i(385), m = i(79), v = i(383), y = i(31), T = i(7), w = i(4), k = i(8), C = i(108), b = i(10),
        I = i(13), S = i(29), _ = i(73), D = i(527), A = i(514), N = i(109), x = i(27), E = i(390), O = i(34),
        P = i(145), M = i(110), F = i(39), L = i(30), R = i(59), B = i(388), U = i(393), V = i(28), K = i(382),
        G = i(36), W = i(127), j = i(83), H = i(22), z = i(668), X = i(111), q = i(146), Y = i(391), J = i(49),
        Z = i(530), Q = i(17), $ = s.default.getLogger("plugin-function"),
        ee = B.TaskInfoManagerNS.getTaskInfoManager(), te = T.default(a.join(__rootDir, "../bin/ThunderHelper.node")),
        ie = z.fileMediaInfoOssMangerNS.getfileMediaInfoOssManger();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, this.isPersonalPageTrackEvent = !1, this.clientWebExternalMap = {}
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        GetTaskInfo: this.getTaskInfo,
                        OperateTask: this.operateTask,
                        ShellOpen: this.shellOpen,
                        OpenFolderWithSelectFile: this.openFolderWithSelectFile,
                        ShowOpenDialog: this.showOpenDialog,
                        ShowSaveDialog: this.showSaveDialog,
                        GetFileMd5: this.getFileMd5,
                        GetPeerID: this.getPeerID,
                        GetDeviceID: this.getDeviceID,
                        GetCpuID: this.getCpuID,
                        GetDmideCode: this.getDmideCode,
                        GetThunderVersion: this.getThunderVersion,
                        TrackEvent: this.trackEvent,
                        GetCurrentCategoryId: this.getCurrentCategoryId,
                        GetCurrentTabId: this.getCurrentTabId,
                        SelectCategoryView: this.switchCategoryView,
                        GetCurInternetState: this.getCurInternetState,
                        DropOpenFile: this.dragOpenFile,
                        DropOpenUrl: this.dragOpenUrl,
                        GetCurPlatform: this.getCurPlatform,
                        CreateNewTask: this.createNewTask,
                        CreateNewTaskEx: this.createNewTaskEx,
                        AddUrls2Cloud: this.addUrls2Cloud,
                        AddBt2Cloud: this.addBt2Cloud,
                        FireEventFunction: this.fireEventFunction,
                        ShowCustomDownloadModeDlg: this.showCustomDownloadModeDlg,
                        GetTaskStartStatusPrompt: this.getTaskStartStatusPrompt,
                        ShowBrowserGuideDlg: this.showBrowserGuideDlg,
                        OpenURLByIEorDefault: this.openURLByIEorDefault,
                        OpenURLByDefault: this.openURLByDefault,
                        GetDownloadDir: this.getDownloadDir,
                        GetProfilesDir: this.getProfilesDir,
                        ShowPersonalPage: this.showPersonalPage.bind(this),
                        ShowWebWnd: this.showWebWnd,
                        CreateWebWnd: this.createWebWnd,
                        CreateWebWndEx: this.createWebWndEx,
                        CloseWebWnd: this.closeWebWnd,
                        ExistWebWnd: this.existWebWnd,
                        VisibleWebWnd: this.visibleWebWnd,
                        BringWebWndToTop: this.bringWebWndToTop,
                        EnableSignAutoShow: this.enableSignAutoShow,
                        RegisterWebFunction: this.registerWebFunction,
                        RegisterWebExternal: this.registerWebExternal.bind(this),
                        CallBackWebFunction: this.callBackWebFunction,
                        FireEventWebFunction: this.fireEventWebFunction,
                        IsPhoneAuth: this.isPhoneAuth,
                        GetSearchRecommends: this.getSearchRecommends,
                        SetSearchRecommends: this.setSearchRecommends,
                        GetBaiduDWZ: this.getBaiduDWZ,
                        GetShouleiShareLink: this.getShouleiShareLink,
                        GetShouleiShareLinkDlj: this.getShouleiShareLinkDlj,
                        GetShouleiShareLink2: this.getShouleiShareLink2,
                        GetShouleiShareLinkDlj2: this.getShouleiShareLinkDlj2,
                        GetShouleiFileTransferLink: this.getShouleiFileTransferLink,
                        GetShouleiFileTransferDlj: this.getShouleiFileTransferDlj,
                        GetShouleiFileTransferLink2: this.getShouleiFileTransferLink2,
                        GetShouleiFileTransferDlj2: this.getShouleiFileTransferDlj2,
                        Log: this.log,
                        IsDevToolsEnable: this.isDevToolsEnable,
                        IsMainWndVisible: this.isMainWndVisible,
                        IsInFullScreen: this.isInFullScreen,
                        IsValidDownloadPath: this.isValidDownloadPath,
                        SwitchDetail: this.switchDetail,
                        Utf8StringEncodeToBinary: this.utf8StringEncodeToBinary,
                        Utf8StringDecodeFromBinary: this.utf8StringDecodeFromBinary,
                        GetErrorCodeConfigMessage: this.getErrorCodeConfigMessage,
                        GetErrorCodeConfigData: this.getErrorCodeConfigData,
                        GetMainWndHandle: this.getMainWndHandle,
                        GetPluginStatus: this.getPluginStatus,
                        SetPluginStatus: this.setPluginStatus,
                        PopPluginGroups: this.popPluginGroups,
                        GetInitUserLoginParam: this.getInitUserLoginParam,
                        BringMainWndToTop: this.bringMainWndToTop,
                        MessageBoxPop: this.messageBoxPop,
                        MessageBoxConfirm: this.messageBoxConfirm,
                        MessageBoxCustom: this.messageBoxCustom,
                        FlashFrame: this.flashFrame,
                        SetTrayImage: this.setTrayImage,
                        FlashTray: this.flashTray,
                        FlashMessageTray: this.flashMessageTray,
                        DisFlashMessageTray: this.disFlashMessageTray,
                        GetMainWindowStates: this.getMainWindowStates,
                        ShowAniCover: this.showAniCover,
                        CloseAniCover: this.closeAniCover,
                        AllowPopMutualNow: this.allowPopMutualNow,
                        EnqueuePopMutual: this.enqueuePopMutual,
                        PopMutualCreated: this.popMutualCreated,
                        ClosePopMutual: this.closePopMutual,
                        PopFileSelect: this.popFileSelect,
                        PopFilesSelect: this.popFilesSelect,
                        GetMediaInfo: this.getMediaInfo,
                        CaclGcid: this.caclGcid,
                        CaclCid: this.caclCid,
                        CaclBCid: this.caclBCid,
                        GetUploadProg: this.getUploadProg,
                        UploadFileToOss: this.uploadFileToOss,
                        CancelUpload: this.cancelUpload,
                        PopFileSelectAndGetInfo: this.popFileSelectAndGetInfo,
                        PopFilesSelectAndGetInfo: this.popFilesSelectAndGetInfo,
                        ResumeUpload: this.resumeUpload,
                        PostUpload: this.postUpload,
                        PauseUpload: this.pauseUpload,
                        CreateDownloadAndPlayTask: this.createDownloadAndPlayTask,
                        CreateBtTaskWindow: this.createBtTaskWindow,
                        CreateTaskDirectly: this.createTaskDirectly,
                        PlayBtOrGroupTask: this.playBtOrGroupTask,
                        GetTaskBirdKeyData: this.getTaskBirdKeyData,
                        CreatePreNewTaskWindow: this.createPreNewTaskWindow,
                        ImportUncompleted: this.importUncompleted,
                        ExitThunder: this.exitThunder,
                        OpenDriftBottleDialog: this.openDriftBottleDialog
                    };
                    d.server.registerFunctions(e), d.server.on("end", e => {
                        let t = [];
                        for (let i in this.clientWebExternalMap) this.clientWebExternalMap[i] === e && (delete this.clientWebExternalMap[i], t.push(i));
                        t.length > 0 && ($.information("client end to remove native function", ...t), G.NativeCallNS.unregisterNativeFunction(t))
                    })
                }
            }

            createPreNewTaskWindow(e, t, ...i) {
                Z.default.showNewTaskPanel("system-menu")
            }

            importUncompleted(e, t, ...i) {
                Z.default.importUncompleted("system-menu")
            }

            exitThunder(e, t, ...i) {
                Z.default.exitThunder("system-menu").catch()
            }

            getTaskBirdKeyData(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = "";
                    do {
                        if (!e) break;
                        if (!i || !i[0]) break;
                        let n = i[0];
                        t = E.TaskOperate.getTaskBirdKeyData(n)
                    } while (0);
                    return t
                })
            }

            getTaskInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (!e) break;
                        if (!i || !i[0] || !i[2]) break;
                        let n = i[0];
                        if ("taskDetail" !== i[2]) break;
                        t = yield ee.getHistoryTaskInfoString(n)
                    } while (0);
                    return t
                })
            }

            operateTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !0;
                    do {
                        if (!e) break;
                        if (!i || !i[0] || !i[1]) {
                            t = !1;
                            break
                        }
                        let n = i[0], o = i[1], a = i[2];
                        yield E.TaskOperate.operateTaskActions(n, o, a)
                    } while (0);
                    return t
                })
            }

            playBtOrGroupTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (!e) break;
                        if (!i || !i[0]) break;
                        let t = i[0];
                        d.server.fireClientEvent("PlayBtOrGroupTask", t)
                    } while (0)
                })
            }

            shellOpen(e, t, ...i) {
                let n = !0;
                do {
                    if (!e) break;
                    if (!i || !i[0]) {
                        n = !1;
                        break
                    }
                    let t = i[0];
                    O.TaskOperatorNs.asyncOpenItem(t).catch()
                } while (0);
                return n
            }

            openFolderWithSelectFile(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !0;
                    do {
                        if (!e) break;
                        if (!i || !i[0]) {
                            t = !1;
                            break
                        }
                        let n = i[0];
                        t = yield(yield o.asyncRemoteCall.getShell()).showItemInFolder(n)
                    } while (0);
                    return t
                })
            }

            showOpenDialog(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(t => n(this, void 0, void 0, function* () {
                        do {
                            if (!e) {
                                t(void 0);
                                break
                            }
                            const n = yield o.asyncRemoteCall.getDialog();
                            let a = i[0];
                            a || (a = {properties: ["openDirectory"]});
                            let r = yield o.asyncRemoteCall.getCurrentWindow();
                            if (r && !(yield r.isDestroyed())) {
                                let e = yield n.showOpenDialog(r, a);
                                e.canceled ? t(void 0) : t(e.filePaths)
                            } else t(void 0)
                        } while (0)
                    }))
                })
            }

            showSaveDialog(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(t => n(this, void 0, void 0, function* () {
                        do {
                            if (!e) {
                                t(void 0);
                                break
                            }
                            const n = yield o.asyncRemoteCall.getDialog();
                            let a = i[0], r = yield o.asyncRemoteCall.getCurrentWindow();
                            n.showSaveDialog(r, a).then(e => {
                                e.canceled ? t("") : t(e.filePath)
                            })
                        } while (0)
                    }))
                })
            }

            getFileMd5(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = "";
                    do {
                        if (!e) break;
                        if (!i || !i[0]) break;
                        let n = i[0];
                        t = yield S.ToolsUtilitiesAWNS.calculateFileMd5(n)
                    } while (0);
                    return t
                })
            }

            getPeerID(e, t, ...i) {
                return te.getPeerID()
            }

            getDeviceID(e, t, ...i) {
                return te.getPeerID()
            }

            getCpuID(e, t, ...i) {
                return te.getCpuID()
            }

            getDmideCode(e, t, ...i) {
                return te.getDmideCode()
            }

            getThunderVersion(e, t, ...i) {
                let n = a.join(__rootDir, "../../Thunder.exe");
                return te.getFileVersion(n)
            }

            trackEvent(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = void 0 === i[1] ? "" : i[1], a = void 0 === i[2] ? "" : i[2],
                            s = void 0 === i[3] ? 0 : i[3], l = void 0 === i[4] ? 0 : i[4],
                            d = void 0 === i[5] ? 0 : i[5], u = void 0 === i[6] ? 0 : i[6],
                            c = void 0 === i[7] ? "" : i[7], f = void 0 === i[8] ? 0 : i[8];
                        t = yield h.XLStatNS.asyncTrackEvent(n, o, a, s, l, d, u, c, f)
                    } while (0);
                    return t
                })
            }

            getCurrentCategoryId(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    n = L.default.getCurrentCategoryId()
                } while (0);
                return n
            }

            getCurrentTabId(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    n = j.getCurrentTabID()
                } while (0);
                return n
            }

            switchCategoryView(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0]) || r.isNullOrUndefined(i[1])) break;
                    let t = i[0], n = i[1], o = void 0;
                    void 0 !== i[2] && (o = i[2]);
                    let a = i[3];
                    $.information(t, n, o), L.default.fireEvent(I.NodeEventMesssageNS.eventDownloadSwitchCategory, t, n, o, a)
                } while (0)
            }

            getCurInternetState(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    n = te.getCurInternetState()
                } while (0);
                return n
            }

            dragOpenFile(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                    let t = i[0];
                    if (void 0 === t || null === t || "" === t) break;
                    let n = i[1];
                    C.default.onCommand("path", t, n || "file_drag").catch()
                } while (0)
            }

            dragOpenUrl(e, t, ...i) {
                do {
                    if (void 0 === e || null === e) break;
                    let t = i[0];
                    if (void 0 === t || null === t || "" === t) break;
                    let n = i[1], o = y.ThunderHelper.getTaskTypeFromUrl(t);
                    o === w.DownloadKernel.TaskType.P2sp || o === w.DownloadKernel.TaskType.Emule ? F.ThunderNewTask.createPreNewTaskWindow([t], n || "url_drag") : o !== w.DownloadKernel.TaskType.Bt && o !== w.DownloadKernel.TaskType.Magnet || F.ThunderNewTask.createBtTaskWindow({
                        url: t,
                        type: "url"
                    }, {source: n || "url_drag"})
                } while (0)
            }

            getCurPlatform(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    n = "pc-xdas"
                } while (0);
                return n
            }

            createNewTask(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    let t = i[0], n = null;
                    try {
                        n = JSON.parse(t)
                    } catch (e) {
                        $.warning(e)
                    }
                    if ($.information("createNewTask", n), r.isNullOrUndefined(n)) break;
                    for (let e in n) {
                        let t = n[e];
                        if ("com" === t.type) {
                            let e = void 0;
                            for (let t in n) {
                                void 0 === e && (e = []), $.information("createNewTask url", n[t].url);
                                let i = n[t].url.split("%0A");
                                if (1 === i.length && (i = n[t].url.split(/[\n\r\n]/)), $.information("createNewTask urls", i), 1 === i.length) e.push({
                                    url: n[t].url,
                                    referer: n[t].refer,
                                    fileName: n[t].name,
                                    nameFixedFlag: n[t].name ? A.ThunderNewtaskHelperNS.taskOptFileNameFixed : void 0,
                                    statClick: n[t].stat ? n[t].stat : "outline",
                                    browser: n[t].browser ? n[t].browser : "xlbrowser.exe",
                                    fileSize: n[t].fileSize ? n[t].fileSize : 0
                                }); else for (let o of i) e.push({
                                    url: o,
                                    referer: n[t].refer,
                                    statClick: n[t].stat ? n[t].stat : "outline",
                                    browser: n[t].browser ? n[t].browser : "xlbrowser.exe"
                                })
                            }
                            F.ThunderNewTask.createPreNewTaskWindow(e);
                            break
                        }
                        if ("bt" === t.type) {
                            let e = t.url;
                            F.ThunderNewTask.createBtTaskWindow({
                                url: e,
                                type: "url"
                            }, {
                                source: t.stat ? t.stat : "outline",
                                browser: t.browser ? t.browser : "xlbrowser.exe",
                                referer: t.refer
                            });
                            break
                        }
                        "bird" === t.type && p.URLHelperNS.isBirdKey(t.url) && _.openBirdKeyDecodeDialog(t.url, {from: t.stat || "outline"})
                    }
                } while (0)
            }

            createNewTaskEx(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                    let t = i[0], n = [];
                    for (let e in t) {
                        let i = t[e];
                        if (p.URLHelperNS.isBirdKey(i.url)) {
                            _.openBirdKeyDecodeDialog(i.url, {from: i.stat});
                            continue
                        }
                        let o = y.ThunderHelper.getTaskTypeFromUrl(i.url);
                        if ($.information("createNewTaskEx", i.url, "type:", o), o === w.DownloadKernel.TaskType.P2sp || o === w.DownloadKernel.TaskType.Emule) n.push({
                            url: t[e].url,
                            referer: t[e].refer,
                            fileName: t[e].name,
                            statClick: t[e].stat
                        }); else if (o === w.DownloadKernel.TaskType.Bt || o === w.DownloadKernel.TaskType.Magnet) {
                            let e = i.url;
                            F.ThunderNewTask.createBtTaskWindow({url: e, type: "url"}, {
                                source: i.stat,
                                referer: i.refer
                            })
                        } else i.url.includes("taskGroupName") && F.ThunderNewTask.createThunderxTask(i.url, i.stat, !1).catch()
                    }
                    n.length > 0 && F.ThunderNewTask.createPreNewTaskWindow(n)
                } while (0)
            }

            addUrls2Cloud(e, t, ...i) {
                F.ThunderNewTask.addUrls2Cloud(i[0], i[1], i[2], i[3], i[4], i[5]).catch()
            }

            addBt2Cloud(e, t, ...i) {
                F.ThunderNewTask.addBt2Cloud(i[0], i[1], i[2], i[3]).catch()
            }

            showCustomDownloadModeDlg(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    N.DownloadModeNS.showCustomDownloadModeDlg().catch()
                } while (0)
            }

            getTaskStartStatusPrompt(e, t, ...i) {
                let n = "";
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                    let t = null;
                    try {
                        t = JSON.parse(i[0])
                    } catch (e) {
                    }
                    t && (n = R.TaskStatusHelper.getTaskStartStatusPrompt(t)), N.DownloadModeNS.showCustomDownloadModeDlg().catch()
                } while (0);
                return n
            }

            showBrowserGuideDlg(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    let t = !1 !== i[0], n = i[1], o = !1 !== i[2];
                    M.default().popUpBrowserGuide(t, n, o).catch()
                } while (0)
            }

            openURLByIEorDefault(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                    n = te.openURLByIEorDefault(i[0])
                } while (0);
                return n
            }

            openURLByDefault(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                    n = te.openURLByDefault(i[0])
                } while (0);
                return n
            }

            getDownloadDir(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = "";
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        do {
                            if (b.ConfigNS.getValue("TaskDefaultSettings", "UseLastCatalog", !0) && (t = b.ConfigNS.getValue("PathAndCategory", "LastUsedPath", "")) || (t = b.ConfigNS.getValue("TaskDefaultSettings", "DefaultPath", "")), void 0 !== t && null !== t && "" !== t && (yield k.FileSystemAWNS.mkdirsAW(t))) break;
                            t = f.ThunderUtil.getDefaultDownloadDir()
                        } while (0)
                    } while (0);
                    return t
                })
            }

            getProfilesDir(e, t, ...i) {
                return __profilesDir
            }

            showPersonalPage(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                        let n = i[0];
                        if (!this.isPersonalPageTrackEvent) {
                            this.isPersonalPageTrackEvent = !0;
                            let e = b.ConfigNS.getValue("Install", "PersonalUid", "");
                            void 0 !== e && null !== e || (e = "");
                            let i = "uid=" + e + ",start_page=" + (n ? "Individualization_home_page" : "official_home_page");
                            t = yield h.XLStatNS.asyncTrackEvent("core_event", "startup_page", "", 0, 0, 0, 0, i)
                        }
                    } while (0);
                    return t
                })
            }

            showWebWnd(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        if (null !== i[10] && void 0 !== i[10]) {
                            let e = i[10];
                            i[10] = (() => n(this, void 0, void 0, function* () {
                                return (yield e())[0]
                            }))
                        }
                        let t = i[0];
                        i.splice(0, 1), yield U.EmbeddedBrowserManagerNs.showWebWnd(t, ...i)
                    } while (0)
                })
            }

            createWebWnd(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        if (null !== i[10] && void 0 !== i[10]) {
                            let e = i[10];
                            i[10] = (() => n(this, void 0, void 0, function* () {
                                let t = yield e();
                                return $.information("embed createWebWnd showCallback", ...t), t[0]
                            }))
                        }
                        let t = i[0];
                        i.splice(0, 1), yield U.EmbeddedBrowserManagerNs.createWebWnd(t, ...i)
                    } while (0)
                })
            }

            openDriftBottleDialog(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    {
                        const e = "409DA9C8-E94F-4017-9E11-37C8786F2F99", t = {
                            business: "409DA9C8-E94F-4017-9E11-37C8786F2F99",
                            url: "https://pc.xunlei.com/pages/#/drift-bottle?from=main_menu&t=" + (new Date).getTime(),
                            title: "星际探索",
                            isModal: !1,
                            width: 556,
                            height: 620,
                            leftMargin: 0,
                            rightMargin: 0,
                            topMargin: 30,
                            bottomMargin: 0,
                            mapNative: void 0,
                            onShowCallback: void 0,
                            onCloseCallback: () => {
                            },
                            onBrowserEvent: e => {
                            }
                        };
                        Q.NativeCallModule.nativeCall.CallNativeFunction("CreateWebWnd", ...Object.values(t), (t, i) => {
                            t || (Q.NativeCallModule.nativeCall.CallNativeFunction("RegisterWebFunction", e, "OpenCommunityGroup", (...e) => {
                                Q.NativeCallModule.nativeCall.CallNativeFunction("OpenCommunityGroup", e[3][0])
                            }, () => {
                            }), Q.NativeCallModule.nativeCall.CallNativeFunction("RegisterWebFunction", e, "CreateNewTask", (...e) => {
                                Q.NativeCallModule.nativeCall.CallNativeFunction("CreateNewTask", e[3][0])
                            }, () => {
                            }))
                        })
                    }
                })
            }

            createWebWndEx(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let t = i[0];
                        if (!t || !t.business) break;
                        if (null !== t.onShowCallback && void 0 !== t.onShowCallback) {
                            let e = t.onShowCallback;
                            t.onShowCallback = (() => n(this, void 0, void 0, function* () {
                                let t = yield e();
                                return $.information("embed createWebWndEx showCallback", ...t), t[0]
                            }))
                        }
                        yield U.EmbeddedBrowserManagerNs.createWebWndEx(t)
                    } while (0)
                })
            }

            closeWebWnd(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    if ("" === t) break;
                    U.EmbeddedBrowserManagerNs.closeWebWnd(t)
                } while (0)
            }

            existWebWnd(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    if ("" === t) break;
                    n = U.EmbeddedBrowserManagerNs.existWebWnd(t)
                } while (0);
                return n
            }

            visibleWebWnd(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    if ("" === t) break;
                    n = U.EmbeddedBrowserManagerNs.visibleWebWnd(t, i[1], i[2])
                } while (0);
                return n
            }

            bringWebWndToTop(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    n = U.EmbeddedBrowserManagerNs.bringWebWndToTop(t)
                } while (0);
                return n
            }

            enableSignAutoShow(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i) break;
                    let t = i[0];
                    U.EmbeddedBrowserManagerNs.enableSignAutoShow(t)
                } while (0)
            }

            registerWebFunction(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], o = i[1], a = i[2];
                    if (!o) break;
                    if (!a) break;
                    U.EmbeddedBrowserManagerNs.registerWebFunction(t, o, (e, t, i, o) => n(this, void 0, void 0, function* () {
                        let n = yield a(...o);
                        e.callNativeFunctionCallback(t, i, x.NativeFunctionErrorCode.Success, n[0])
                    }))
                } while (0)
            }

            registerWebExternal(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i) break;
                    let t = i[0];
                    if (!t) break;
                    if ("object" != typeof t) break;
                    let o = [];
                    for (let i in t) {
                        if (!i) continue;
                        let a = t[i];
                        a && (G.NativeCallNS.checkNativeFunction(i) || (o.push({
                            functionName: i,
                            nativeFunc: (e, t, i, o) => n(this, void 0, void 0, function* () {
                                let n = yield a(...o);
                                e.callNativeFunctionCallback(t, i, x.NativeFunctionErrorCode.Success, n[0])
                            })
                        }), this.clientWebExternalMap[i] = e))
                    }
                    o.length > 0 && G.NativeCallNS.registerNativeFunction(o)
                } while (0)
            }

            fireEventFunction(e, t, ...i) {
                do {
                    if (!i || !i[0]) break;
                    V.NativeCallHostModule.nativeCallHost.fireNativeEvent("onWebEvent", ...i)
                } while (0)
            }

            callBackWebFunction(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], n = i[1], o = i[2], a = i[3];
                    if (!t) break;
                    if (void 0 === n || null === n) break;
                    if (void 0 === o || null === o) break;
                    U.EmbeddedBrowserManagerNs.callBackWebFunction(t, n, o, a)
                } while (0)
            }

            fireEventWebFunction(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    i.splice(0, 1), U.EmbeddedBrowserManagerNs.fireEventWebFunction(t, ...i)
                } while (0)
            }

            isPhoneAuth(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        t = yield P.phoneAuthObject.isPhoneAuthAw()
                    } while (0);
                    return t
                })
            }

            getSearchRecommends(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    n = D.SearchConfigNS.getRecommends()
                } while (0);
                return n
            }

            setSearchRecommends(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    D.SearchConfigNS.setRecommends(t)
                } while (0)
            }

            getBaiduDWZ(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0];
                        t = yield v.getBaiduDWZ(n)
                    } while (0);
                    return t
                })
            }

            getShouleiShareLink(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = "pic";
                        r.isString(i[1]) && (o = i[1]);
                        let a = "";
                        r.isString(i[2]) && (a = i[2]), t = yield W.getShouleiShareLink(n, o, a)
                    } while (0);
                    return t
                })
            }

            getShouleiShareLinkDlj(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = "pic";
                        r.isString(i[1]) && (o = i[1]);
                        let a = "";
                        r.isString(i[2]) && (a = i[2]), t = yield W.getShouleiShareLinkDlj(n, o, a)
                    } while (0);
                    return t
                })
            }

            getShouleiShareLink2(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = i[1], a = i[2], s = i[3], l = i[4], d = i[5], u = "pic";
                        r.isString(i[6]) && (u = i[6]);
                        let c = "";
                        r.isString(i[7]) && (c = i[7]), t = yield W.getShouleiShareLink2(n, o, a, s, l, d, u, c)
                    } while (0);
                    return t
                })
            }

            getShouleiShareLinkDlj2(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = i[1], a = i[2], s = i[3], l = i[4], d = i[5], u = "pic";
                        r.isString(i[6]) && (u = i[6]);
                        let c = "";
                        r.isString(i[7]) && (c = i[7]), t = yield W.getShouleiShareLinkDlj2(n, o, a, s, l, d, u, c)
                    } while (0);
                    return t
                })
            }

            getShouleiFileTransferLink(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || i[1]) break;
                        let n = i[0], o = i[1], a = "pic";
                        r.isString(i[2]) && (a = i[2]);
                        let s = "";
                        r.isString(i[3]) && (s = i[3]), t = yield W.getShouleiFileTransferLink(n, o, a, s)
                    } while (0);
                    return t
                })
            }

            getShouleiFileTransferDlj(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || !i[1]) break;
                        let n = i[0], o = i[1], a = "pic";
                        r.isString(i[2]) && (a = i[2]);
                        let s = "";
                        r.isString(i[3]) && (s = i[3]), t = yield W.getShouleiFileTransferDlj(n, o, a, s)
                    } while (0);
                    return t
                })
            }

            getShouleiFileTransferLink2(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || !i[6]) break;
                        let n = i[0], o = i[1], a = i[2], s = i[3], l = i[4], d = i[5], u = i[6], c = "pic";
                        r.isString(i[7]) && (c = i[7]);
                        let h = "";
                        r.isString(i[8]) && (h = i[8]), t = yield W.getShouleiFileTransferLink2(n, o, a, s, l, d, u, c, h)
                    } while (0);
                    return t
                })
            }

            getShouleiFileTransferDlj2(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || !i[6]) break;
                        let n = i[0], o = i[1], a = i[2], s = i[3], l = i[4], d = i[5], u = i[6], c = "pic";
                        r.isString(i[7]) && (c = i[7]);
                        let h = "";
                        r.isString(i[8]) && (h = i[8]), t = yield W.getShouleiFileTransferDlj2(n, o, a, s, l, d, u, c, h)
                    } while (0);
                    return t
                })
            }

            log(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || i.length < 3) break;
                    let t = i[0], n = i[1], o = null;
                    switch (o = r.isString(t) && t.length > 0 ? s.default.getLogger(t) : $, n) {
                        case"verbose":
                            o.verbose(...i.splice(2));
                            break;
                        case"information":
                            o.information(...i.splice(2));
                            break;
                        case"warning":
                            o.warning(...i.splice(2));
                            break;
                        case"error":
                            o.error(...i.splice(2));
                            break;
                        case"critical":
                            o.critical(...i.splice(2))
                    }
                } while (0)
            }

            isDevToolsEnable(e, t, ...i) {
                return m.DevEnvHelperNS.isDevToolsEnable()
            }

            isMainWndVisible(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        let i = yield o.asyncRemoteCall.getCurrentWindow(), n = yield i.isMinimized(),
                            a = yield i.isVisible();
                        i && !n && a && (t = !0)
                    } while (0);
                    return t
                })
            }

            isInFullScreen(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        t = te.IsInFullScreen()
                    } while (0);
                    return t
                })
            }

            isValidDownloadPath(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = !1;
                    do {
                        if (!i[0]) break;
                        e = yield f.ThunderUtil.isValidDownloadPath(i[0])
                    } while (0);
                    return e
                })
            }

            switchDetail(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                        let t = i[0], n = i[1];
                        yield F.ThunderNewTask.selectTask(t), n && setTimeout(() => {
                            V.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnSwitchDetail", t, n), d.server.fireClientEvent("OnTabChange", n)
                        }, 100), l.client.callServerFunction("SelectNav", J.NavViewID.Download).catch()
                    } while (0)
                })
            }

            utf8StringEncodeToBinary(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0]) || r.isNullOrUndefined(i[1])) break;
                    let t = i[0], o = i[1];
                    n = te.utf8StringEncodeToBinary(t, o)
                } while (0);
                return n
            }

            utf8StringDecodeFromBinary(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0]) || r.isNullOrUndefined(i[1])) break;
                    let t = i[0], o = i[1];
                    n = te.utf8StringDecodeFromBinary(t, o)
                } while (0);
                return n
            }

            getErrorCodeConfigMessage(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0]) || r.isNullOrUndefined(i[1])) break;
                    let t = i[0], o = i[1];
                    n = K.default.getMessage(t, o)
                } while (0);
                return n
            }

            getErrorCodeConfigData(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                    let t = i[0];
                    n = K.default.getData(t)
                } while (0);
                return n
            }

            getMainWndHandle(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        t = (yield(yield o.asyncRemoteCall.getCurrentWindow()).getNativeWindowHandle()).readUIntLE(0, 4)
                    } while (0);
                    return t
                })
            }

            getPluginStatus(e, t, ...i) {
                let n = null;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    let t = i[0];
                    if (!t) break;
                    n = g.PluginLoaderNS.pluginLoader.getPluginStatus(t)
                } while (0);
                return n
            }

            setPluginStatus(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = null;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        let n = i[0];
                        if (!n) break;
                        let o = i[1];
                        if (!o) break;
                        if ("ready" !== o && "loaded" !== o) break;
                        t = yield g.PluginLoaderNS.pluginLoader.setPluginStatus(n, o)
                    } while (0);
                    return t
                })
            }

            popPluginGroups(e, t, ...i) {
                let n = null;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    let t = i[0];
                    if (!t) break;
                    n = g.PluginLoaderNS.pluginLoader.popPluginGroups(t)
                } while (0);
                return n
            }

            getInitUserLoginParam(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = null;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        let i = yield(yield o.asyncRemoteCall.getCurrentWebContents()).session.getUserAgent(),
                            n = "XW-G4v1H72tgfJym", a = "Qbaferw2knfQKqxa25EYJGtZ2_6755CMwzXBN3ctW54",
                            s = "https://xluser-ssl.xunlei.com";
                        1 === b.ConfigNS.getValue("UserLoginConfig", "TestServer", 0) && (n = "XXDfQA-ruQKfza9f", a = "jXD0dQ-nm_yybCfqj7EqUKQtp6sc5q1kzodIj96Gfq0", s = "https://dev-xluser-ssl.xunlei.com"), t = {
                            clientId: n,
                            clientSecret: a,
                            apiOrigin: s,
                            userAgent: i
                        }
                    } while (0);
                    return t
                })
            }

            bringMainWndToTop(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        let t = yield o.asyncRemoteCall.getCurrentWindow();
                        t && ((yield t.isMinimized()) && (yield t.restore()), yield t.show(), yield S.ToolsUtilitiesAWNS.setForegroundWindow(te, t))
                    } while (0)
                })
            }

            messageBoxPop(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    $.information("messageBoxPop args:", i);
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || !i[1]) break;
                        let n = i[0], o = i[1];
                        if ("object" != typeof n || "object" != typeof o) break;
                        t = yield H.MessageBox.pop(n, o)
                    } while (0);
                    return t
                })
            }

            messageBoxConfirm(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    $.information("messageBoxConfirm args:", i);
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0] || !i[1]) break;
                        let n = i[0], o = i[1];
                        if ("object" != typeof n || "object" != typeof o) break;
                        t = yield H.MessageBox.confirm(n, o)
                    } while (0);
                    return t
                })
            }

            messageBoxCustom(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    $.information("messageBoxPop args:", i);
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        let n = i[0], o = i[1] || {}, a = i[2] || {};
                        t = yield H.MessageBox.custom(n, o, a)
                    } while (0);
                    return t
                })
            }

            flashFrame(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = yield o.asyncRemoteCall.getCurrentWindow();
                    e && (yield e.flashFrame(!0), e.on("focus", function t() {
                        e.flashFrame(!1), i && i[0] && i[0](), e.removeListener("focus", t)
                    }))
                })
            }

            setTrayImage(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        yield d.server.callClientFunctionByName(u.CommonIPCBase.mainProcessContext, "SetTrayImage", i[0])
                    } while (0)
                })
            }

            flashTray(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i) break;
                        yield l.client.callRemoteClientFunction(u.CommonIPCBase.mainProcessContext, "FlashTray", ...i)
                    } while (0)
                })
            }

            flashMessageTray(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i) break;
                        yield l.client.callRemoteClientFunction(u.CommonIPCBase.mainProcessContext, "FlashMessageTray", ...i)
                    } while (0)
                })
            }

            disFlashMessageTray(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i) break;
                        yield l.client.callRemoteClientFunction(u.CommonIPCBase.mainProcessContext, "DisFlashMessageTray", ...i)
                    } while (0)
                })
            }

            getMainWindowStates(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    function t() {
                        let e = te.getForegroundProcessName(), t = !1;
                        return (e.toLowerCase().indexOf("thunder.exe") > -1 || e.toLowerCase().indexOf("xlbrowser.exe") > -1) && (t = !0), t
                    }

                    let i = {};
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        let n = yield o.asyncRemoteCall.getCurrentWindow();
                        if (!n) break;
                        i = {
                            visible: yield n.isVisible(),
                            alwaysOnTop: yield n.isAlwaysOnTop(),
                            destroyed: yield n.isDestroyed(),
                            focused: yield n.isFocused(),
                            fullScreen: yield n.isFullScreen(),
                            maximized: yield n.isMaximized(),
                            minimized: yield n.isMinimized(),
                            modal: yield n.isModal(),
                            foreground: t()
                        }
                    } while (0);
                    return i
                })
            }

            showAniCover(e, t, ...i) {
                let n = void 0;
                do {
                    if (!i || !i[0]) break;
                    n = c.MatteNS.pop("MatteAni", i[0], {customClass: i[1] || "td-cover--ordinary"})
                } while (0);
                return n
            }

            closeAniCover(e, t, ...i) {
                do {
                    if (!i || !i[0]) break;
                    c.MatteNS.close("MatteAni", i[0])
                } while (0)
            }

            popFileSelect(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = "";
                    do {
                        if (r.isNullOrUndefined(ie)) break;
                        e = yield ie.popFileSelect()
                    } while (0);
                    return e
                })
            }

            popFilesSelect(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = [];
                    do {
                        if (r.isNullOrUndefined(ie)) break;
                        e = yield ie.popFileSelects()
                    } while (0);
                    return e
                })
            }

            getMediaInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = "";
                    do {
                        if (!i || !i[0] || r.isNullOrUndefined(ie)) break;
                        e = i[0]
                    } while (0);
                    return ie.getMediaInfo(e)
                })
            }

            caclGcid(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = "";
                    do {
                        if (!i || !i[0] || r.isNullOrUndefined(ie)) break;
                        e = i[0]
                    } while (0);
                    return ie.caclGCid(e)
                })
            }

            caclCid(e, t, ...i) {
                let n = "";
                do {
                    if (!i || !i[0] || r.isNullOrUndefined(ie)) break;
                    n = i[0]
                } while (0);
                return ie.caclCid(n)
            }

            caclBCid(e, t, ...i) {
                let n = "";
                do {
                    if (!i || !i[0] || r.isNullOrUndefined(ie)) break;
                    n = i[0]
                } while (0);
                return ie.caclBCid(n)
            }

            uploadFileToOss(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = "", t = "", n = void 0;
                    do {
                        if (!i || !i[0] || !i[1] || !i[2] || r.isNullOrUndefined(ie)) break;
                        if (e = i[0], t = i[1], !(n = i[2]).regin && n.endpoint) {
                            let e = n.endpoint.indexOf(".aliyuncs.com");
                            -1 !== e && (n.region = n.endpoint.slice(0, e))
                        }
                    } while (0);
                    return ie.uploadFileToOss(e, t, n)
                })
            }

            getUploadProg(e, t, ...i) {
                let n = "";
                do {
                    if (!i || !i[0]) break;
                    n = i[0]
                } while (0);
                return ie.getProg(n)
            }

            cancelUpload(e, t, ...i) {
                ie.cancelUpload()
            }

            pauseUpload(e, t, ...i) {
                ie.pauseUpload()
            }

            createDownloadAndPlayTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return !!(i && i[0] && i[1]) && Y.DownloadAndPlayUnionNS.createDowndAndPlayTask(i[0], i[1], i[2], !0)
                })
            }

            popFileSelectAndGetInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = [], t = yield ie.popFileSelect();
                    return k.FileSystemAWNS.existsAW(t) && e.push({
                        filePath: t,
                        fileInfo: yield ie.getMediaInfo(t),
                        fileSize: yield k.FileSystemAWNS.getFileSize(t)
                    }), e
                })
            }

            popFilesSelectAndGetInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = [], t = yield ie.popFileSelects(!0);
                    for (let i of t) k.FileSystemAWNS.existsAW(i) && e.push({
                        filePath: i,
                        fileInfo: yield ie.getMediaInfo(i),
                        fileSize: yield k.FileSystemAWNS.getFileSize(i)
                    });
                    return e
                })
            }

            resumeUpload(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = "", t = "", n = void 0;
                    do {
                        if (!i || !i[0] || !i[1] || !i[2] || r.isNullOrUndefined(ie)) break;
                        if (e = i[0], t = i[1], !(n = i[2]).regin && n.endpoint) {
                            let e = n.endpoint.indexOf(".aliyuncs.com");
                            -1 !== e && (n.region = n.endpoint.slice(0, e))
                        }
                    } while (0);
                    return ie.resumeUpload(e, t, n)
                })
            }

            postUpload(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = "", t = {}, n = "";
                    do {
                        if (!i || !i[0] || !i[1] || r.isNullOrUndefined(ie)) break;
                        n = i[0], e = i[1], t = i[2]
                    } while (0);
                    return ie.postUpload(n, e, t)
                })
            }

            allowPopMutualNow(e, t, ...i) {
                return q.popMutual.canAutoPopNow(i[0], i[1])
            }

            enqueuePopMutual(e, t, ...i) {
                do {
                    if (!i || !i[0]) break;
                    let e = i[0];
                    if (e === X.PopView.LOGIN) throw new Error("EnqueuePopMutual the first argument cannot provided as PopView.LOGIN");
                    let t = i[1], n = i[2];
                    q.popMutual.enqueue(e, t, n)
                } while (0)
            }

            popMutualCreated(e, t, ...i) {
                do {
                    if (!i || !i[0]) break;
                    let e = i[0], t = i[1];
                    e === X.PopView.THUNDER_PAN_IMPORT && (t = t || "auto"), q.popMutual.popNow(e, t)
                } while (0)
            }

            closePopMutual(e, t, ...i) {
                do {
                    if (!i || !i[0]) break;
                    q.popMutual.setFinish(i[0])
                } while (0)
            }

            createBtTaskWindow(e, t, ...i) {
                do {
                    if (!i || !i[0]) break;
                    let e = i[0];
                    if (e && e.length > 0) for (let t of e) F.ThunderNewTask.createBtTaskWindow({
                        url: t.url,
                        type: "url",
                        birdkeyChars: t.birdkeyChars
                    }, {source: t.statClick || "newwindow_url", referer: t.referer, clickFrom: i[1]})
                } while (0)
            }

            createTaskDirectly(e, t, ...i) {
                let n = i[0];
                F.ThunderNewTask.createP2spEmuleTasksDirectly(n).catch()
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.PluginFunctionNS || (t.PluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(20);
    !function (e) {
        const t = new class extends n.EventEmitter {
            constructor() {
                super(...arguments), this.index = 0
            }

            pop(e, t, i) {
                return this.index++, this.emit("matte-pop", e, t, i, this.index), this.index
            }

            close(e, t) {
                this.emit("matte-close", e, t)
            }
        };
        e.getInstance = function () {
            return t
        }, e.pop = function (e, i, n) {
            return t.pop(e, i, n)
        }, e.close = function (e, i) {
            return t.close(e, i)
        }
    }(t.MatteNS || (t.MatteNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(2), r = i(7), s = i(0), l = i(105), d = i(12), u = i(8), c = i(3), h = i(5), f = i(669),
        p = r.default(o.join(__rootDir, "../bin/ThunderHelper.node")), g = s.default.getLogger("FileMediaInfoOss");
    var m;
    !function (e) {
        e[e.UploadUnknown = 0] = "UploadUnknown", e[e.UploadSuccess = 1] = "UploadSuccess", e[e.UploadFail = 2] = "UploadFail", e[e.UploadPause = 3] = "UploadPause", e[e.UploadCancel = 4] = "UploadCancel"
    }(m || (m = {}));

    class v {
        constructor() {
            this.progress = new Map, this.inited = !1
        }

        getProg(e) {
            if ("" === e) return 0;
            let t = this.progress.get(e);
            return h.isNullOrUndefined(t) && (t = 0), t
        }

        popFileSelect() {
            return n(this, void 0, void 0, function* () {
                const e = yield d.asyncRemoteCall.getDialog();
                let t = yield d.asyncRemoteCall.getCurrentWindow(), i = yield e.showOpenDialog(t, {
                    title: "打开",
                    properties: ["openFile"],
                    filters: [{name: "All Files", extensions: ["*"]}]
                });
                if (i.canceled) return "";
                {
                    let e = i.filePaths;
                    return e ? e[0] : ""
                }
            })
        }

        popFileSelects(e = !1) {
            return n(this, void 0, void 0, function* () {
                const e = yield d.asyncRemoteCall.getDialog();
                let t = yield d.asyncRemoteCall.getCurrentWindow(), i = e.showOpenDialog(t, {
                    title: "打开",
                    properties: ["multiSelections"],
                    filters: [{name: "All Files", extensions: ["*"]}]
                });
                if (i.canceled) return [];
                {
                    let e = i.filePaths;
                    return e || []
                }
            })
        }

        caclGCid(e) {
            return n(this, void 0, void 0, function* () {
                return yield new Promise(t => {
                    p.calculateFileGCID(e, e => {
                        g.information("getVideoMediaInfo calculateFileGCID result", e), t(e)
                    })
                })
            })
        }

        caclCid(e) {
            return n(this, void 0, void 0, function* () {
                return yield new Promise(t => {
                    p.calculateFileCID(e, e => {
                        g.information("getVideoMediaInfo calculateFileCID result", e), t(e)
                    })
                })
            })
        }

        caclBCid(e) {
            return n(this, void 0, void 0, function* () {
                let t = "";
                return g.information("caclBcid filePath ", e), t = yield new Promise(t => {
                    p.calculateFileBCID(e, e => {
                        g.information("getVideoMediaInfo calculateFileCID result", e), t(e)
                    })
                })
            })
        }

        getMediaInfo(e) {
            return n(this, void 0, void 0, function* () {
                let t = "";
                return "" !== e && (t = yield new Promise(t => {
                    p.getMediaInfo(e, e => {
                        g.information("getVideoMediaInfo result", e), t(e)
                    })
                })), t
            })
        }

        getBlockSize(e) {
            let t = 0;
            do {
                if (e <= 0) {
                    t = 0;
                    break
                }
                if (e >= 0 && e <= 128 << 20) {
                    t = 262144;
                    break
                }
                if (e > 128 << 20 && e <= 256 << 20) {
                    t = 524288;
                    break
                }
                if (e > 256 << 20 && e <= 512 << 20) {
                    t = 1048576;
                    break
                }
                t = 2097152
            } while (0);
            return t
        }

        getFileMediaInfo() {
            return n(this, void 0, void 0, function* () {
                let e = yield this.popFileSelect();
                if (!e) return null;
                let t = a.basename(e), i = a.extname(e), n = yield u.FileSystemAWNS.getFileSize(e),
                    o = this.getBlockSize(n), r = {
                        mediaName: t,
                        mediaSuffix: i,
                        mediaGcid: "",
                        mediaBcid: "",
                        mediaCid: "",
                        mediaPath: e,
                        mediaSize: n.toString(),
                        mediaBlockSize: o.toString()
                    };
                do {
                    let t = yield this.getMediaInfo(e);
                    if (!t) {
                        g.information("getVideoMediaInfo result failed");
                        break
                    }
                    Object.assign(r, this.decodeMediaInfo(t)), r.mediaCid = yield this.caclCid(e), g.information("getVideoMediaInfo mediaInfo", r), r.mediaGcid = yield this.caclGCid(e), r.mediaBcid = yield this.caclBCid(e), g.information("getVideoMediaInfo mediaInfo gcid", r)
                } while (0);
                return r
            })
        }

        getFileMediaInfos() {
            return n(this, void 0, void 0, function* () {
                let e = yield this.popFileSelects();
                if (e.length < 1) return null;
                let t = [];
                for (let i in e) {
                    let e = a.basename(i), n = a.extname(i), o = yield u.FileSystemAWNS.getFileSize(i),
                        r = this.getBlockSize(o), s = {
                            mediaName: e,
                            mediaSuffix: n,
                            mediaGcid: "",
                            mediaBcid: "",
                            mediaCid: "",
                            mediaPath: i,
                            mediaSize: o.toString(),
                            mediaBlockSize: r.toString()
                        };
                    do {
                        let e = yield this.getMediaInfo(i);
                        if (!e) {
                            g.information("getVideoMediaInfo result failed");
                            break
                        }
                        Object.assign(s, this.decodeMediaInfo(e)), s.mediaCid = yield this.caclCid(i), g.information("getVideoMediaInfo mediaInfo", s), s.mediaGcid = yield this.caclGCid(i), s.mediaBcid = yield this.caclBCid(i), t.push(s), g.information("getVideoMediaInfo mediaInfo gcid", s)
                    } while (0)
                }
                return t
            })
        }

        timeStringToNumber(e) {
            let t = e.split(" "), i = 0;
            for (let e of t) {
                let t = e.indexOf("h");
                -1 === t ? -1 === (t = e.indexOf("mn")) ? -1 === (t = e.indexOf("ms")) ? -1 === (t = e.indexOf("s")) || (i += 1e3 * Number(e.substr(0, t))) : i += Number(e.substr(0, t)) : i += 60 * Number(e.substr(0, t)) * 1e3 : i += 60 * Number(e.substr(0, t)) * 60 * 1e3
            }
            return i
        }

        decodeMediaInfo(e) {
            let t = {}, i = e.split("\r\n"), n = "";
            for (let e of i) -1 !== e.indexOf("时长 =") && (n = e.substring(e.indexOf("时长 =") + "时长 =".length, e.length - 2), t.mediaTime = this.timeStringToNumber(n).toString()), -1 !== e.indexOf("画面宽度 =") && (t.mediaWidth = e.substring(e.indexOf("画面宽度 =") + "画面宽度 =".length, e.indexOf("pixels")).replace(/\s*/g, "")), -1 !== e.indexOf("画面高度 =") && (t.mediaHeight = e.substring(e.indexOf("画面高度 =") + "画面高度 =".length, e.indexOf("pixels")).replace(/\s*/g, "")), -1 !== e.indexOf("总体码率 =") && (t.mediaVideoBit = e.substring(e.indexOf("总体码率 =") + "总体码率 =".length, e.indexOf("Kbps")).replace(/\s*/g, ""));
            return t
        }

        cancelUpload() {
            c.client.broadcastEvent("cancelUpload", !0)
        }

        pauseUpload() {
            c.client.broadcastEvent("cancelUpload", !1)
        }

        initConfig() {
            return n(this, void 0, void 0, function* () {
                this.inited || (yield f.UploadConfigNS.init(o.join(__profilesDir, "uploadConfig.json")), this.inited = !0)
            })
        }

        getValue(e, t, i) {
            return n(this, void 0, void 0, function* () {
                return yield this.initConfig(), f.UploadConfigNS.getValue(e, t, i)
            })
        }

        deleteValue(e, t) {
            return n(this, void 0, void 0, function* () {
                return yield this.initConfig(), f.UploadConfigNS.removeValue(e, t)
            })
        }

        setValue(e, t, i) {
            return n(this, void 0, void 0, function* () {
                yield this.initConfig(), f.UploadConfigNS.setValue(e, t, i)
            })
        }

        getState(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let e = m.UploadUnknown, o = 0;
                return yield this.initConfig(), e = yield new Promise(e => {
                    o = c.client.attachServerEvent("cancelUpload", (o, a) => n(this, void 0, void 0, function* () {
                        a && (yield this.deleteValue(t, "checkpoint"), e(m.UploadCancel)), i.kill(), e(m.UploadPause)
                    })), i.on("message", i => n(this, void 0, void 0, function* () {
                        i.progress && this.progress.set(t, Math.floor(100 * Number(i.progress))), i.cpt && (yield this.setValue(t, "checkpoint", i.cpt)), i.result && (200 === i.result.res.status ? (this.progress.set(t, 100), e(m.UploadSuccess)) : (this.progress.delete(t), e(m.UploadFail)), g.warning("uploadFileToOss result: ", i.result, i.result.res.status)), i.error && (this.progress.delete(t), g.warning("uploadFileToOss error: ", i.error), e(m.UploadFail))
                    }))
                }), c.client.detachServerEvent("CancelUpload", o), c.client.broadcastEvent("UploadFileToOssState", e), e
            })
        }

        resumeUpload(e, t, i) {
            return n(this, void 0, void 0, function* () {
                if ("" !== e && "" !== t && !h.isNullOrUndefined(i)) {
                    this.progress.set(e, 0);
                    let n = `${__rootDir}/out/upload-oss.js`,
                        o = l.fork(n, ["--type=xdas-plugin-process", "--xdas-plugin-name=upload-oss"]),
                        a = yield this.getValue(t, "checkpoint", void 0);
                    o.send({filePath: e, key: t, checkpoint: a, token: i}), this.getState(e, t, o).catch()
                }
                return !0
            })
        }

        postUpload(e, t, i = {}) {
            return n(this, void 0, void 0, function* () {
                let o;
                return function (e) {
                    e[e.success = 0] = "success", e[e.fail = 1] = "fail", e[e.not_exist = 2] = "not_exist"
                }(o || (o = {})), new Promise(a => {
                    if ("" !== e && "" !== t && u.FileSystemAWNS.existsAW(t)) {
                        let r = `${__rootDir}/out/post-upload-oss`,
                            s = l.fork(r, ["--type=xdas-plugin-process", "--xdas-plugin-name=post-upload-oss"]);
                        s.send({
                            postUrl: e,
                            filePath: t,
                            params: i
                        }), s.on("message", e => n(this, void 0, void 0, function* () {
                            a(e ? o.success : o.fail)
                        }))
                    } else a(o.not_exist)
                })
            })
        }

        uploadFileToOss(e, t, i) {
            return n(this, void 0, void 0, function* () {
                if ("" !== e && "" !== t && !h.isNullOrUndefined(i)) {
                    this.progress.set(e, 0);
                    let n = `${__rootDir}/out/upload-oss.js`,
                        o = l.fork(n, ["--type=xdas-plugin-process", "--xdas-plugin-name=upload-oss"]), a = void 0;
                    o.send({filePath: e, key: t, checkpoint: a, token: i}), this.getState(e, t, o).catch()
                }
                return !0
            })
        }
    }

    t.FileMediaInfoOssManger = v, function (e) {
        const t = new v;
        e.getfileMediaInfoOssManger = function () {
            return t
        }
    }(t.fileMediaInfoOssMangerNS || (t.fileMediaInfoOssMangerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(41), a = i(0), r = i(47), s = i(8), l = i(13), d = a.default.getLogger("UploadConfig");

    class u {
        constructor() {
            this.isInit = !1, this.configData = {}, this.configPath = void 0, this.configBakPath = void 0, this.eventContainer = new r.default, this.changed = !1, this.timer = null, this.eventContainer.setMaxListeners(0)
        }

        init(e) {
            return n(this, void 0, void 0, function* () {
                if (!this.isInit) {
                    this.configPath = e, this.configBakPath = e + ".bak";
                    let t = null, i = yield s.FileSystemAWNS.existsAW(e);
                    if (i) {
                        let i = yield s.FileSystemAWNS.readFileAW(e);
                        if (i && i.length > 0) try {
                            t = JSON.parse(i.toString())
                        } catch (e) {
                            d.warning(e)
                        }
                    }
                    if (!t) if (i = yield s.FileSystemAWNS.existsAW(this.configBakPath)) {
                        let e = yield s.FileSystemAWNS.readFileAW(this.configBakPath);
                        if (e && e.length > 0) try {
                            t = JSON.parse(e.toString())
                        } catch (e) {
                            d.warning(e)
                        }
                    } else o.openSync(this.configPath, "w+");
                    t && this.mergeConfigData(t), this.isInit = !0, this.eventContainer.fireEvent(l.NodeEventMesssageNS.eventUploadConfigInitFinished)
                }
                this.timer || (this.timer = setInterval(() => {
                    this.changed && (this.changed = !1, this.save().catch())
                }, 5e3))
            })
        }

        getValue(e, t, i) {
            let n = i;
            do {
                if (!e || "" === e) break;
                if (!t || "" === t) break;
                let o = this.configData[e];
                if (!o) {
                    let n = {};
                    n[t] = i, this.configData[e] = n;
                    break
                }
                t in o ? n = o[t] : o[t] = i
            } while (0);
            return n
        }

        setValue(e, t, i) {
            do {
                if (!e || "" === e) break;
                if (!t || "" === t) break;
                let n = void 0, o = this.configData[e];
                if (o) n = o[t], o[t] = i; else {
                    let n = {};
                    n[t] = i, this.configData[e] = n
                }
                n !== i && (this.changed = !0, this.fireValueChangedEvent(e, t, n, i))
            } while (0)
        }

        removeValue(e, t) {
            do {
                if (!e || "" === e) break;
                if (!t || "" === t) break;
                let i = void 0, n = this.configData[e];
                n && (i = n[t], n[t] = void 0), void 0 !== i && this.fireValueChangedEvent(e, t, i, void 0)
            } while (0)
        }

        isInitConfigFinished() {
            return this.isInit
        }

        save() {
            return n(this, void 0, void 0, function* () {
                if (this.isInit) {
                    let e = JSON.stringify(this.configData, void 0, 2);
                    yield s.FileSystemAWNS.writeFileAW(this.configPath, e), yield s.FileSystemAWNS.writeFileAW(this.configBakPath, e)
                }
            })
        }

        saveSync() {
            if (this.isInit) {
                let e = JSON.stringify(this.configData, void 0, 2);
                o.writeFileSync(this.configPath, e), o.writeFileSync(this.configBakPath, e)
            }
        }

        attachListener(e, t) {
            do {
                if (e === l.NodeEventMesssageNS.eventUploadConfigInitFinished) {
                    if (this.isInit) {
                        t(this.isInit);
                        break
                    }
                    this.eventContainer.attachOnceListener(e, t);
                    break
                }
                this.eventContainer.attachListener(e, t)
            } while (0)
        }

        detachListener(e, t) {
            this.eventContainer.detachListener(e, t)
        }

        mergeConfigData(e) {
            if (e) if (null === this.configData) this.configData = e; else for (let t in e) {
                let i = e[t];
                if (!i) break;
                for (let e in i) {
                    let n = i[e], o = this.configData[t];
                    if (o) o[e] = n; else {
                        let i = {};
                        i[e] = n, this.configData[t] = i
                    }
                }
            }
        }

        fireValueChangedEvent(e, t, i, n) {
            this.eventContainer.fireEvent(l.NodeEventMesssageNS.eventUploadConfigValueChanged, e, t, i, n)
        }
    }

    t.UploadConfig = u;
    const c = new u;
    !function (e) {
        e.init = function (e) {
            return n(this, void 0, void 0, function* () {
                yield c.init(e)
            })
        }, e.isInitConfigFinished = function () {
            return c.isInitConfigFinished()
        }, e.save = function () {
            return n(this, void 0, void 0, function* () {
                yield c.save()
            })
        }, e.saveSync = function () {
            c.saveSync()
        }, e.getValue = function (e, t, i) {
            return c.getValue(e, t, i)
        }, e.setValue = function (e, t, i) {
            c.setValue(e, t, i)
        }, e.removeValue = function (e, t) {
            c.removeValue(e, t)
        }, e.attachListener = function (e, t) {
            c.attachListener(e, t)
        }, e.detachListener = function (e, t) {
            c.detachListener(e, t)
        }
    }(t.UploadConfigNS || (t.UploadConfigNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(5), a = i(15), r = i(10), s = i(13), l = i(25), d = i(400), u = i(89), c = i(90), h = i(401);
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, r.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigValueChanged, (e, t, i, n) => {
                    a.server.fireClientEvent("OnConfigValueChanged", e, t, i, n), a.server.fireClientEvent("OnConfigValueChanaged", e, t, i, n)
                }), r.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    a.server.fireClientEvent("OnConfigInitFinished")
                })
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        Save: this.save,
                        GetValue: this.getValue,
                        SetValue: this.setValue,
                        SaveConfig: this.save,
                        GetConfigValue: this.getValue,
                        SetConfigValue: this.setValue,
                        IsConfigInitFinish: this.isConfigInitFinish,
                        WaitForConfigInitFinish: this.isConfigInitFinish,
                        GetConfigModules: this.getConfigModules,
                        IsConfigBrowserInitFinish: this.isConfigBrowserInitFinish,
                        WaitForConfigBrowserInitFinish: this.isConfigBrowserInitFinish,
                        GetInstallBrowserInfo: this.getInstallBrowserInfo,
                        AddConfigSettingItemData: this.addConfigSettingItemData,
                        RemoveConfigSettingItemData: this.removeConfigSettingItemData,
                        SaveTaskFilters: this.saveTaskFilters,
                        GetPrivateSavePath: this.getPrivateSavePath
                    };
                    a.server.registerFunctions(e)
                }
            }

            save(e, t, ...i) {
                do {
                    if (!e) break;
                    r.ConfigNS.save().catch()
                } while (0)
            }

            getValue(e, t, ...i) {
                let n = void 0;
                do {
                    if (!e) break;
                    if (o.isNullOrUndefined(i) || o.isNullOrUndefined(i[0]) || o.isNullOrUndefined(i[1])) break;
                    let t = i[0], a = i[1], s = i[2];
                    n = r.ConfigNS.getValue(t, a, s)
                } while (0);
                return n
            }

            setValue(e, t, ...i) {
                do {
                    if (!e) break;
                    if (o.isNullOrUndefined(i) || o.isNullOrUndefined(i[0]) || o.isNullOrUndefined(i[1])) break;
                    let t = i[0], n = i[1], a = i[2];
                    r.ConfigNS.setValue(t, n, a)
                } while (0)
            }

            isConfigInitFinish(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise((t, i) => {
                        do {
                            if (!e) {
                                i(new Error("client is undefined"));
                                break
                            }
                            r.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigInitFinished, () => {
                                t(!0)
                            })
                        } while (0)
                    })
                })
            }

            getConfigModules(e, t, ...i) {
                let n = void 0;
                do {
                    if (!e) break;
                    let t = "", o = "";
                    i && (i[0] && (t = i[0]), i[1] && (o = i[1]), n = l.default.getConfigInfo(t, o))
                } while (0);
                return n
            }

            isConfigBrowserInitFinish(e, t, ...i) {
                return new Promise((t, i) => {
                    do {
                        if (!e) {
                            i(new Error("client is undefined"));
                            break
                        }
                        c.SettingConfigHelperNS.configBrowserHelper.attachListener(s.NodeEventMesssageNS.eventConfigBrowserInitFinished, () => {
                            t(!0)
                        })
                    } while (0)
                })
            }

            getInstallBrowserInfo(e, t, ...i) {
                let n = void 0;
                do {
                    if (!e) break;
                    if (o.isNullOrUndefined(i) || o.isNullOrUndefined(i[0])) break;
                    if ("" === i[0]) break;
                    let t = i[0];
                    n = c.SettingConfigHelperNS.configBrowserHelper.getWatchBrowerByName(t)
                } while (0);
                return n
            }

            addConfigSettingItemData(e, t, ...i) {
                let n = !1;
                do {
                    if (!e) break;
                    if (o.isNullOrUndefined(i) || o.isNullOrUndefined(i[0]) || o.isNullOrUndefined(i[1])) break;
                    let t = i[0], a = i[1];
                    if ("string" == typeof i[0]) try {
                        t = JSON.parse(i[0])
                    } catch (e) {
                    }
                    if ("string" == typeof i[1]) try {
                        a = JSON.parse(i[1])
                    } catch (e) {
                    }
                    t && a && (n = d.SettingInit.addSettingItemData(t, a))
                } while (0);
                return n
            }

            removeConfigSettingItemData(e, t, ...i) {
                let n = !1;
                do {
                    if (!e) break;
                    if (o.isNullOrUndefined(i) || o.isNullOrUndefined(i[0]) || o.isNullOrUndefined(i[1])) break;
                    let t = i[0], a = i[1];
                    if ("string" == typeof i[0]) try {
                        t = JSON.parse(i[0])
                    } catch (e) {
                    }
                    if ("string" == typeof i[1]) try {
                        a = JSON.parse(i[1])
                    } catch (e) {
                    }
                    t && a && (n = d.SettingInit.removeSettingItemData(t, a))
                } while (0);
                return n
            }

            saveTaskFilters(e, t, ...i) {
                do {
                    if (!e) break;
                    if (o.isNullOrUndefined(i) || o.isNullOrUndefined(i[0])) break;
                    let t = i[0];
                    h.CompletedFilterNS.saveFilter(t, i[1]).catch()
                } while (0)
            }

            getPrivateSavePath(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = "";
                    do {
                        if (!e) break;
                        if (o.isNullOrUndefined(i) || o.isNullOrUndefined(i[0])) break;
                        let n = i[0];
                        t = yield u.PrivateSpaceHelperNS.getPrivateSavePath(n)
                    } while (0);
                    return t
                })
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.ConfigPluginFunctionNS || (t.ConfigPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(42), a = i(8), r = i(2);
    t.confAdd = new class {
        isXmpExist() {
            return n(this, void 0, void 0, function* () {
                let e = o.Common.getXmpPath();
                return a.FileSystemAWNS.existsAW(e)
            })
        }

        isXmpLiteExist() {
            return n(this, void 0, void 0, function* () {
                let e = r.join(__rootDir, "../../XMP/XMP.exe");
                return a.FileSystemAWNS.existsAW(e)
            })
        }

        updateAssociate(e, t, i) {
            return n(this, void 0, void 0, function* () {
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(673), o = i(674);
    !function (e) {
        e.getWindowPreference = function (e = !1) {
            let t = o.default(), i = {};
            return t && t.colors && "string" == typeof t.colors.colorPrimaryControl1 && (i.hoverBackgroundColor = e ? parseInt(n.ColorUtilNS.rgbaStringToHexWith0xBegin(t.colors.colorPrimaryControl1), 16) : n.ColorUtilNS.rgbaStringToHexWith0xBegin(t.colors.colorPrimaryControl1)), i
        }
    }(t.WindowPreferenceNS || (t.WindowPreferenceNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        function t(e) {
            let t = e.toString(16).toUpperCase();
            return t.length < 2 && (t = "0" + t), t
        }

        function i(e, i, n, o) {
            return "0x" + t(o) + t(e) + t(i) + t(n)
        }

        e.rgbaStringToHexWith0xBegin = function (e) {
            if (void 0 !== e) {
                let t = e.split(",");
                return i(parseInt(t[0] || "0", 10), parseInt(t[1] || "0", 10), parseInt(t[2] || "0", 10), parseInt(t[3] || "255", 10))
            }
        }, e.colorNumberToHex = t, e.rgbaToHexWith0xBegin = i
    }(t.ColorUtilNS || (t.ColorUtilNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(19), a = i(0), r = i(3), s = a.default.getLogger("GetSkinInfo");
    let l;
    (function () {
        return n(this, void 0, void 0, function* () {
            "renderer" === process.type ? (s.information("renderer process"), r.client.callServerFunction("GetSkinInfo").then(e => {
                l = e, s.information("send OnChangeSkin", e)
            }).catch(e => {
                s.warning(e)
            }), r.client.attachServerEvent("OnChangeSkin", (e, t) => {
                l = t, s.information("send OnChangeSkin", t)
            })) : "browser" === process.type && (s.information("main process"), o.ipcMain.on("OnChangeSkin", (e, t) => {
                s.information("OnChangeSkin", t), l = t
            }))
        })
    })().catch(e => {
        s.information(e)
    }), t.default = function () {
        return l
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(45), a = i(15), r = n.default.getLogger("ConfigRemoteGlobalPluginFunction");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, o.default.attachListener("OnRemoteGlobalConfigLoaded", e => {
                    r.information("OnRemoteGlobalConfigLoaded ret:", e), a.server.fireClientEvent("OnRemoteGlobalConfigLoaded", e)
                }), o.default.attachListener("OnRemoteGlobalConfigUpdated", e => {
                    r.information("OnRemoteGlobalConfigUpdated ret:", e), a.server.fireClientEvent("OnRemoteGlobalConfigUpdated", e)
                })
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        GetRemoteGlobalConfigValue: this.getRemoteGlobalConfigValue,
                        IsRemoteGlobalConfigInitFinish: this.isRemoteGlobalConfigInitFinish
                    };
                    a.server.registerFunctions(e)
                }
            }

            getRemoteGlobalConfigValue(e, t, ...i) {
                let n = void 0;
                do {
                    if (!e) break;
                    if (!i || !i[0]) break;
                    let t = i[0], a = void 0;
                    i.length >= 2 && (a = i[1]);
                    let r = i[2];
                    n = o.default.getConfigValue(t, a, r)
                } while (0);
                return n
            }

            isRemoteGlobalConfigInitFinish(e, t, ...i) {
                let n = !1;
                do {
                    if (!e) break;
                    n = o.default.isInited()
                } while (0);
                return n
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.ConfigRemoteGlobalPluginFunctionNS || (t.ConfigRemoteGlobalPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), a = i(23), r = i(5), s = i(0), l = i(17), d = i(395), u = i(125), c = i(402),
        h = s.default.getLogger("plugin-function-Login");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        GetUserID: this.getUserID,
                        GetSessionID: this.getSessionID,
                        GetLoginOption: this.getLoginOption,
                        IsLogined: this.isLogined,
                        GetAllUserInfo: this.getAllUserInfo,
                        GetUserInfo: this.getUserInfo,
                        ShowLoginDlg: this.showLoginDlg,
                        Logout: this.logout,
                        IsAlreadySign: this.isAlreadySign,
                        IsHaveSignQuestion: this.isHaveSignQuestion,
                        GetSessionIDAw: this.getSessionIDAw,
                        GetUserInfoAw: this.getUserInfoAw,
                        GetUserInfoEx: this.getUserInfoEx,
                        GetAllUserInfoAw: this.getAllUserInfoAw,
                        GetUserInfoByKeyAw: this.getUserInfoByKeyAw,
                        Login: this.login,
                        SwitchAccount: this.switchAccount,
                        IsAutoLoginAw: this.isAutoLoginAw,
                        Channel: this.channel,
                        GetVipInfo: this.getVipInfo,
                        GetLoginDeviceID: this.getLoginDeviceID,
                        SendSms: this.sendSms,
                        CheckSms: this.checkSms,
                        RetryLogIn: this.retryLogIn,
                        GetLoginInfo: this.getLoginInfo
                    };
                    o.server.registerFunctions(e), l.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", () => {
                        a.LoginHelperNS.loginHelper.getAllUserInfo(e => {
                            do {
                                if (null === e || void 0 === e) break;
                                o.server.fireClientEvent("OnLoginSuc", e)
                            } while (0)
                        })
                    }), l.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                        o.server.fireClientEvent("OnLogout")
                    }), l.NativeCallModule.nativeCall.AttachNativeEvent("onGetUserInfoFinished", () => {
                        o.server.fireClientEvent("OnGetUserInfoFinished")
                    }), l.NativeCallModule.nativeCall.AttachNativeEvent("onUserDetailInfoChange", e => {
                        o.server.fireClientEvent("OnUserDetailInfoChange", e)
                    }), l.NativeCallModule.nativeCall.AttachNativeEvent("onLoginUpdate", (e, t) => {
                        o.server.fireClientEvent("OnLoginUpdate", e, t)
                    })
                }
            }

            getUserID(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        a.LoginHelperNS.loginHelper.getUserInfo("userid", t => {
                            h.information("getUserID:userid = ", t), null !== t && void 0 !== t && "" !== t || (t = "0"), e(t)
                        })
                    })
                })
            }

            getSessionID(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        a.LoginHelperNS.loginHelper.getUserInfo("sessionid", t => {
                            h.information("getSessionID:sessionid = ", t), e(t)
                        })
                    })
                })
            }

            getLoginOption(e, t, ...i) {
                return u.LoginOptionNS.loginOption.getOption()
            }

            getSessionIDAw(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return a.LoginHelperNS.loginHelper.getSessionIDAw()
                })
            }

            getUserInfoAw(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return a.LoginHelperNS.loginHelper.getUserInfoAw()
                })
            }

            getUserInfoEx(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    if (!i) return;
                    if (2 !== i.length) return;
                    let e = i[0], t = i[1];
                    a.LoginHelperNS.loginHelper.getUserInfoEx(e, e => {
                        t(e)
                    })
                })
            }

            getAllUserInfoAw(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return a.LoginHelperNS.loginHelper.getAllUserInfoAw()
                })
            }

            getUserInfoByKeyAw(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return a.LoginHelperNS.loginHelper.getUserInfoByKeyAw(i[0], i[1])
                })
            }

            isLogined(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        a.LoginHelperNS.loginHelper.isLogined(t => {
                            e(t)
                        })
                    })
                })
            }

            getAllUserInfo(e, t, ...i) {
                return new Promise(e => {
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) a.LoginHelperNS.loginHelper.getAllUserInfo(t => {
                        e(t)
                    }); else {
                        let t = i[0];
                        a.LoginHelperNS.loginHelper.getAllUserInfo(t, t => {
                            e(t)
                        })
                    }
                })
            }

            getUserInfo(e, t, ...i) {
                return h.information(i), new Promise(e => {
                    let t = 0;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) t = 0; else {
                        let e = i[0];
                        t = null === e || void 0 === e || "" === e ? 0 : Number(e)
                    }
                    a.LoginHelperNS.loginHelper.getUserInfoEx(t, t => {
                        e(t)
                    })
                })
            }

            showLoginDlg(e, t, ...i) {
                let n, o = "other", s = !0;
                r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0]) || (o = i[0]), r.isNullOrUndefined(i) || r.isNullOrUndefined(i[1]) || (s = i[1]), r.isNullOrUndefined(i) || r.isNullOrUndefined(i[2]) || (n = i[2]), a.LoginHelperNS.loginHelper.showLoginDlg(o, s, n)
            }

            logout(e, t, ...i) {
                a.LoginHelperNS.loginHelper.logout()
            }

            login(e, t, ...i) {
                let n;
                i && (n = i[0]), a.LoginHelperNS.loginHelper.logIn(n)
            }

            switchAccount(e, t, ...i) {
                let n;
                i && (n = i[0]), a.LoginHelperNS.loginHelper.switchAccount(n)
            }

            isAutoLoginAw(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        a.LoginHelperNS.loginHelper.isAutologin(t => {
                            e(t)
                        })
                    })
                })
            }

            channel(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                })
            }

            getVipInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return a.LoginHelperNS.loginHelper.getVipInfo()
                })
            }

            isAlreadySign(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return d.CommonSignFunctionNs.isAlreadySign()
                })
            }

            isHaveSignQuestion(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return d.CommonSignFunctionNs.isHaveSignQuestion()
                })
            }

            getLoginDeviceID(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return yield a.LoginHelperNS.loginSDKHelper.getDeviceID()
                })
            }

            sendSms(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = "";
                    return null !== i && void 0 !== i && i.length > 0 && (e = i[0]), yield c.commonLoginHelper.sendSmsAw(e)
                })
            }

            checkSms(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = void 0;
                    do {
                        if (null === i || void 0 === i || i.length < 2) break;
                        let t = i[0], n = i[1];
                        e = yield c.commonLoginHelper.checkSmsAw(t, n)
                    } while (0);
                    return e
                })
            }

            retryLogIn(e, t, ...i) {
                a.LoginHelperNS.loginHelper.logIn("retryLogIn")
            }

            getLoginInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        if (i[0]) {
                            let t = i[0];
                            a.LoginHelperNS.loginHelper.getUserInfo(t, function (t) {
                                e(t)
                            })
                        } else a.LoginHelperNS.loginHelper.getUserInfo(function (t) {
                            e(t)
                        })
                    })
                })
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.LoginPluginFunctionNS || (t.LoginPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(15), r = i(5), s = i(531), l = i(28), d = i(17),
        u = o.default.getLogger("NativeFunction.Login");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        AttachCallbackEvent: this.attachCallbackEvent,
                        IsTipsWndShow: this.isTipsWndShow,
                        IsMainWndShow: this.isMainWndShow,
                        CreateTipsWnd: this.createTipsWnd,
                        CloseTipsWnd: this.closeTipsWnd,
                        ShowOrHideTipsWnd: this.showOrHideTipsWnd
                    };
                    a.server.registerFunctions(e)
                }
            }

            attachCallbackEvent(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                    let e = i[0], t = i[1];
                    d.NativeCallModule.nativeCall.AttachNativeEvent(e, (...e) => {
                        l.NativeCallHostModule.nativeCallHost.fireNativeEvent(t, ...e)
                    })
                } while (0)
            }

            createTipsWnd(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(i)) break;
                    if (r.isNullOrUndefined(i[0]) || r.isNullOrUndefined(i[1])) break;
                    let e = i[0], t = i[1], n = "", o = null, a = null;
                    r.isNullOrUndefined(i[2]) || (o = i[2]), r.isNullOrUndefined(i[3]) || (a = i[3]), r.isNullOrUndefined(i[4]) || (n = i[4]), s.TipsHelperNS.tipsUIHelper.createTipsWnd(e, t, o, a, n).catch()
                } while (0)
            }

            isTipsWndShow(e, t, ...i) {
                return s.TipsHelperNS.tipsUIHelper.isTipsWndShow()
            }

            isMainWndShow(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return yield s.TipsHelperNS.tipsUIHelper.isMainWndShow()
                })
            }

            closeTipsWnd(e, t, ...i) {
                s.TipsHelperNS.tipsUIHelper.closeTipsWnd()
            }

            showOrHideTipsWnd(e, t, ...i) {
                u.information("showOrHideTipsWnd", ...i);
                let n = !1, o = null, a = null, l = null, d = null;
                r.isNullOrUndefined(i[0]) || (n = i[0]), r.isNullOrUndefined(i[1]) || (o = i[1]), r.isNullOrUndefined(i[2]) || (a = i[2]), r.isNullOrUndefined(i[3]) || (l = i[3]), r.isNullOrUndefined(i[4]) || (d = i[4]), s.TipsHelperNS.tipsUIHelper.showOrHideTipsWnd(n, o, a, l, d)
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.TipsPluginFunctionNS || (t.TipsPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), a = i(3), r = i(5), s = i(0), l = i(4), d = i(33), u = i(11), c = i(16), h = i(44), f = i(32),
        p = i(8), g = i(43), m = i(13), v = i(30), y = i(532), T = i(39), w = i(67), k = i(51), C = i(381), b = i(40),
        I = i(26), S = i(102), _ = s.default.getLogger("DKNativeFunction"),
        D = u.DownloadKernelTaskManager.getTaskManager(), A = c.DownloadKernelEventManager.getEventManager(),
        N = h.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        x = I.DownloadKernelCategoryManager.getCategoryManager();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, A.attachTaskEvent(l.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    this.onTaskDetailChanged(...e)
                }), A.attachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    this.onTaskStatusChanged(...e)
                }), A.attachTaskEvent(l.DownloadKernel.TaskEventType.DcdnStatusChanged, (...e) => {
                    this.onTaskDcdnStatusChanged(...e)
                }), A.attachTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileDetailChanged, (...e) => {
                    this.onBtSubFileDetailChanged(...e)
                }), A.attachTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileLoaded, (...e) => {
                    this.onBtSubFileLoaded(...e)
                }), A.attachTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileForbidden, (...e) => {
                    this.onBtSubFileForbidden(...e)
                }), A.attachTaskEvent(l.DownloadKernel.TaskEventType.BtSubFileDcdnStatusChanged, (...e) => {
                    this.onBtSubFileDcdnStatusChanged(...e)
                }), A.attachTaskEvent(l.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                    this.onTaskInserted(...e)
                }), A.attachTaskEvent(l.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                    this.onTaskRemoved(...e)
                }), A.attachTaskEvent(l.DownloadKernel.TaskEventType.TaskCategoryMovedEnd, (...e) => {
                    this.onTaskCategoryMovedEnd(...e)
                }), d.DownloadKernelManager.attachListener(m.NodeEventMesssageNS.eventGlobalDownloadSpeedChanged, (...e) => {
                    this.onGlobalDownloadSpeedChanged(...e)
                }), v.default.attachListener(m.NodeEventMesssageNS.eventDownloadItemActive, this.onDownloadItemActive.bind(this)), v.default.attachListener(m.NodeEventMesssageNS.eventDownloadItemChosen, this.onDownloadItemChosen.bind(this))
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        GetTaskBaseInfo: this.getTaskBaseInfo,
                        GetTaskBaseInfo2: this.getTaskBaseInfo2,
                        GetTaskBaseInfos: this.getTaskBaseInfos,
                        GetTaskStatus: this.getTaskStatus,
                        IsTaskExist: this.isTaskExist,
                        GetGroupSubTaskIds: this.getGroupSubTaskIds,
                        EnableDcdnWithVipCert: this.enableDcdnWithVipCert,
                        UpdateDcdnWithVipCert: this.updateDcdnWithVipCert,
                        DisableDcdnWithVipCert: this.disableDcdnWithVipCert,
                        GetTpPeerId: this.getPeerId,
                        ExecSqlite: this.execSqlite,
                        QuerySqlite: this.querySqlite,
                        ExecSqliteEx: this.execSqliteEx,
                        QuerySqliteEx: this.querySqliteEx,
                        GetCategoryViewTaskList: this.getCategoryViewTaskList,
                        GetCategoryViewTaskListForSuspensionWnd: this.getCategoryViewTaskListForSuspensionWnd,
                        IsLoadStorageTaskFinish: this.isLoadStorageTaskFinish,
                        SetTaskExtStat: this.setTaskExtStat,
                        DownloadBySDK: this.asynRequestFile,
                        QueryGlobalInfo: this.queryGlobalInfo,
                        IsFileSizeSetterWorking: this.isFileSizeSetterWorking,
                        LaunchFileAssistant: this.launchFileAssistant,
                        GetTaskProfileLog: this.getTaskProfileLog,
                        GetSubNetUploader: this.getSubNetUploader,
                        GetPrivateSpaceInfo: this.getPrivateSpaceInfo,
                        IsSingleBtTask: this.isSingleBtTask,
                        IsSupportPlay: this.isSupportPlay,
                        IsSupportInstall: this.isSupportInstall,
                        ImportTorrent: this.importTorrent,
                        GetDownloadProgress: this.getDownloadProgressPercent,
                        GetDownloadDetails: this.getDownloadDetails,
                        GetDownloadProgressNumber: this.getDownloadProgress,
                        CreateTask: this.createTask,
                        CreateBatchTask: this.createBatchTask,
                        StartTask: this.startTask,
                        StartWaitingTask: this.startWaitingTask,
                        StopTask: this.stopTask,
                        DeleteTask: this.deleteTask,
                        RemoveToRecycle: this.removeToRecycle,
                        RecoverFromRecycle: this.recoverFromRecycle,
                        BatchStartTask: this.batchStartTask,
                        BatchStartWaitingTask: this.batchStartWaitingTask,
                        BatchStopTask: this.batchStopTask,
                        BatchDeleteTask: this.batchDeleteTask,
                        BatchRemoveToRecycle: this.batchRemoveToRecycle,
                        BatchRecoverFromRecycle: this.batchRecoverFromRecycle,
                        BatchFindTaskAsync: this.batchFindTaskAsync,
                        IsCategoryLoaded: this.isCategoryLoaded,
                        GetCategoryFromUserId: this.getCategoryFromUserId,
                        GetCategoryById: this.getCategoryById,
                        GetCategoryByName: this.getCategoryByName,
                        GetCategoryTaskCount: this.getCategoryTaskCount,
                        GetCategoryTaskList: this.getCategoryTaskList,
                        AddServer: this.addServer,
                        DiscardServer: this.discardServer,
                        GetUserData: this.getUserData,
                        SetUserData: this.setUserData,
                        SetTaskUrl: this.setTaskUrl,
                        GetTaskAttribute: this.getTaskAttribute,
                        InsertPanTaskReference: this.insertPanTaskReference
                    };
                    o.server.registerFunctions(e)
                }
            }

            getTaskBaseInfo(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], o = D.getTaskFromTaskId(t);
                    if (o) {
                        let e = o.getTaskBaseInfo();
                        n = JSON.stringify(e)
                    }
                } while (0);
                return n
            }

            getTaskBaseInfo2(e, t, ...i) {
                let n = null;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], o = D.getTaskFromTaskId(t);
                    o && (n = o.getTaskBaseInfo())
                } while (0);
                return n
            }

            getGroupSubTaskIds(e, t, ...i) {
                let n = void 0;
                do {
                    let e = i[0];
                    if (!e) break;
                    let t = D.getTaskFromTaskId(e);
                    if (!t) break;
                    if (t.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskType) !== l.DownloadKernel.TaskType.Group) break;
                    n = t.getExtraObject().getSubTaskIds()
                } while (0);
                return n
            }

            getTaskBaseInfos(e, t, ...i) {
                let n = [];
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !r.isArray(i[0])) break;
                    i[0].forEach(e => {
                        let t = D.getTaskFromTaskId(e);
                        if (t) {
                            let e = t.getTaskBaseInfo();
                            n.push(e)
                        }
                    })
                } while (0);
                return n
            }

            getTaskStatus(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], o = D.getTaskFromTaskId(t);
                    o && (n = o.getTaskStatus())
                } while (0);
                return n
            }

            isTaskExist(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0];
                    D.getTaskFromTaskId(t) && (n = !0)
                } while (0);
                return n
            }

            enableDcdnWithVipCert(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0] || !i[1]) break;
                    let t = i[0], n = D.getTaskFromTaskId(t);
                    if (n) {
                        let e = -1;
                        r.isNumber(i[2]) && (e = i[2]), n.enableDcdnWithVipCert(i[1], e)
                    }
                } while (0)
            }

            updateDcdnWithVipCert(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0] || !i[1]) break;
                    let t = i[0], n = D.getTaskFromTaskId(t);
                    if (n) {
                        let e = -1;
                        r.isNumber(i[2]) && (e = i[2]), n.updateDcdnWithVipCert(i[1], e)
                    }
                } while (0)
            }

            disableDcdnWithVipCert(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = i[0], n = D.getTaskFromTaskId(t);
                    if (n) {
                        let e = -1;
                        r.isNumber(i[1]) && (e = i[1]), n.disableDcdnWithVipCert(e)
                    }
                } while (0)
            }

            getPeerId(e, t, ...i) {
                return new Promise(t => {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        _.verbose(i), d.DownloadKernelManager.getPeerId().then(e => {
                            t(e)
                        }).catch()
                    } while (0)
                })
            }

            execSqlite(e, t, ...i) {
                return new Promise(t => {
                    do {
                        if (r.isNullOrUndefined(e)) {
                            t(-1);
                            break
                        }
                        if (!i || !i[0]) {
                            t(-2);
                            break
                        }
                        f.ThunderKernel.execSqlite(i[0], (e, i) => {
                            t(e)
                        })
                    } while (0)
                })
            }

            querySqlite(e, t, ...i) {
                return new Promise(t => {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (!i || !i[0]) break;
                        f.ThunderKernel.querySqlite(i[0], (e, i, n) => {
                            t(i)
                        })
                    } while (0)
                })
            }

            execSqliteEx(e, t, ...i) {
                return new Promise(t => {
                    do {
                        if (r.isNullOrUndefined(e)) {
                            t({result: -1, msg: "client is null or undefined!"});
                            break
                        }
                        if (!i || !i[0]) {
                            t({result: -2, msg: "invalid args!"});
                            break
                        }
                        f.ThunderKernel.execSqliteEx(i[0], (e, i) => {
                            t({result: e, msg: i})
                        })
                    } while (0)
                })
            }

            querySqliteEx(e, t, ...i) {
                return new Promise(t => {
                    do {
                        if (r.isNullOrUndefined(e)) {
                            t({result: -1, infos: [], msg: "client is null or undefined!"});
                            break
                        }
                        if (!i || !i[0]) {
                            t({result: -2, infos: [], msg: "invalid args!"});
                            break
                        }
                        f.ThunderKernel.querySqliteEx(i[0], (e, i, n) => {
                            t({result: e, infos: i, msg: n})
                        })
                    } while (0)
                })
            }

            getCategoryViewTaskList(e, t, ...i) {
                let n = [];
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = N.getCategoryViewFromId(i[0]);
                    if (!t) break;
                    let o = t.getTasks();
                    if (o) for (let e of o) {
                        let t = e[0];
                        n.push(t)
                    }
                } while (0);
                return n
            }

            getCategoryViewTaskListForSuspensionWnd(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (!i || !i[0]) break;
                    let t = N.getCategoryViewFromId(i[0]);
                    if (!t) break;
                    {
                        let e = t.getTasks();
                        if (e) {
                            n = [];
                            for (let [, t]of e) {
                                let e = t.getTaskBaseInfo();
                                n.push(e)
                            }
                        }
                    }
                } while (0);
                return n
            }

            isLoadStorageTaskFinish(e, t, ...i) {
                return new Promise(e => {
                    d.DownloadKernelManager.attachListener(m.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, () => {
                        e(!0)
                    })
                })
            }

            setTaskExtStat(e, t, ...i) {
                let n = void 0, o = i[0], a = D.getTaskFromTaskId(o);
                if (a) {
                    let e = i[1], t = i[2], o = i[3], r = a.getTaskAttribute(l.DownloadKernel.TaskAttribute.VirtualId);
                    n = f.ThunderKernel.setTaskExtStat(r, e, t, o)
                }
                return n
            }

            asynRequestFile(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    {
                        if (!i) throw new Error("call AsynRequestFile expected args which is undefined");
                        let e = i[0];
                        if (!e.url) throw new Error("call AsynRequestFile expected url which is undefined");
                        if (!e.savePath) throw new Error("call AsynRequestFile expected savePath which is undefined");
                        if (!e.fileName) throw new Error("call AsynRequestFile expected fileName which is undefined");
                        let t = i[1];
                        return t && (e.onTaskFinish = t), y.sdkDownloader.createTaskBySDK(e)
                    }
                })
            }

            queryGlobalInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        f.ThunderKernel.queryGlobalInfo(0, t => {
                            e(t)
                        })
                    })
                })
            }

            isFileSizeSetterWorking(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        0 !== f.ThunderKernel.isFileSizeSetterWorking(t => {
                            e(t)
                        }) && e(!1)
                    })
                })
            }

            launchFileAssistant(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        let t = f.ThunderKernel.launchFileAssistant(t => {
                            e(t)
                        });
                        0 !== t && e(t)
                    })
                })
            }

            getTaskProfileLog(e, t, ...i) {
                let n = -1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0]) || r.isNullOrUndefined(i[1])) break;
                    let t = i[0], o = D.getTaskFromTaskId(t);
                    if (o) {
                        let e = i[1], t = o.getTaskAttribute(l.DownloadKernel.TaskAttribute.VirtualId);
                        n = f.ThunderKernel.getTaskProfileLog(t, e, (e, t) => {
                            null !== i[2] && void 0 !== i[2] && (0, i[2])()
                        })
                    }
                } while (0);
                return n
            }

            getSubNetUploader(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = null;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        t = yield new Promise(e => {
                            0 !== f.ThunderKernel.getSubNetUploader((t, i) => n(this, void 0, void 0, function* () {
                                _.information("getSubNetUploader result", t, i), 0 === t && e(i)
                            })) && e(null)
                        })
                    } while (0);
                    return t
                })
            }

            getPrivateSpaceInfo(e, t, ...i) {
                let n = !0, o = x.getCurrentPrivateCategory();
                if (o) {
                    let e = o.getPassword();
                    e && "" !== e && (n = !0)
                }
                return {privateOpen: n, currentCategoryId: v.default.getCurrentCategoryId()}
            }

            isSingleBtTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = i[0], t = D.getTaskFromTaskId(e);
                    return yield k.SingleBtTaskNS.isSingleBtTask(t)
                })
            }

            isSupportPlay(e, t, ...i) {
                let n = !1;
                do {
                    if (!i[0]) break;
                    let e = i[0], t = D.getTaskFromTaskId(e);
                    t && (n = t.isSupportPlay())
                } while (0);
                return n
            }

            isSupportInstall(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = {support: !1};
                    do {
                        if (!i[0]) break;
                        let t = i[0], n = D.getTaskFromTaskId(t);
                        if (!n) break;
                        if (n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskType) === l.DownloadKernel.TaskType.Group) {
                            let i = n.getExtraObject(),
                                o = i.getUserData(g.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile");
                            if (o && "0" !== o) {
                                let n = b.TaskCtrlOperatorNS.getSavePathByFileName(t, o);
                                if (yield p.FileSystemAWNS.existsAW(n)) {
                                    e = {
                                        support: !0,
                                        savePath: n,
                                        runParams: i.getUserData(g.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams")
                                    };
                                    break
                                }
                            }
                        }
                    } while (0);
                    return e
                })
            }

            importTorrent(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = i[0], t = yield a.client.callServerFunction("ShowOpenDialog", {
                        properties: ["openFile"],
                        filters: [{name: "BT种子文件（*.torrent）", extensions: ["torrent"]}]
                    });
                    if (e = e || {}, void 0 !== t) {
                        let i = t[0], n = yield w.TaskUtilitiesAWNS.parserBtFileInfoAW(i);
                        if (null === n) T.ThunderNewTask.createBtTaskWindow({
                            type: "file",
                            seedFile: i
                        }, Object.assign({}, e)); else {
                            let t = JSON.stringify(n);
                            T.ThunderNewTask.createBtTaskWindow({
                                data: t,
                                type: "file",
                                seedFile: i
                            }, Object.assign({}, e))
                        }
                    }
                    return t
                })
            }

            getDownloadProgressPercent(e, t, ...i) {
                return C.DownloadProgressNS.getDownloadProgressPercent()
            }

            getDownloadProgress(e, t, ...i) {
                return C.DownloadProgressNS.getDownloadProgress()
            }

            getDownloadDetails(e, t, ...i) {
                return C.DownloadProgressNS.getDownloadDetails()
            }

            createTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = void 0;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (i.length < 2 || !r.isNumber(i[0]) || !r.isObject(i[1])) {
                            _.warning("createTask failed, args invalid! (TaskType: number, newTaskInfo: INewTaskInfo) => Promise<number>", i);
                            break
                        }
                        let n = i[0], o = i[1], a = yield D.createTask(n, o);
                        if (!a) break;
                        t = a.getId()
                    } while (0);
                    return t
                })
            }

            createBatchTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = null;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !r.isArray(i[0])) {
                            _.warning("createBatchTask failed, args invalid! (newTaskInfos: INewTaskInfo[], groupTaskId?: number) => Promise<number[]>", i);
                            break
                        }
                        let n = i[0], o = null;
                        if (i.length >= 2 && r.isNumber(i[1])) {
                            let e = i[1];
                            o = D.getTaskFromTaskId(e)
                        }
                        let a = yield D.createBatchTask(n, o);
                        if (!a) break;
                        t = [], a.forEach(e => {
                            t.push(e.getId())
                        })
                    } while (0);
                    return t
                })
            }

            startTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !r.isNumber(i[0])) {
                            _.warning("startTask failed, args invalid! (taskId: number) => void", i);
                            break
                        }
                        let n = i[0];
                        t = yield D.startTask(n)
                    } while (0);
                    return t
                })
            }

            startWaitingTask(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !r.isNumber(i[0])) {
                        _.warning("startWaitingTask failed, args invalid! (taskId: number) => boolean", i);
                        break
                    }
                    let t = i[0];
                    n = D.startWaitingTask(t)
                } while (0);
                return n
            }

            stopTask(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !r.isNumber(i[0])) {
                        _.warning("stopTask failed, args invalid! (taskId: number, stopReason?: TaskStopReason) => void", i);
                        break
                    }
                    let t = i[0], n = l.DownloadKernel.TaskStopReason.Unknown;
                    i.length >= 2 && r.isNumber(i[1]) && (n = i[1]), D.stopTask(t, n)
                } while (0)
            }

            deleteTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !r.isNumber(i[0]) || !r.isBoolean(i[1])) {
                            _.warning("deleteTask failed, args invalid! (taskId: number, deleteFile: boolean) => Promise<boolean>", i);
                            break
                        }
                        let n = i[0], o = i[1];
                        t = yield D.deleteTask(n, o)
                    } while (0);
                    return t
                })
            }

            removeToRecycle(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !r.isNumber(i[0])) {
                            _.warning("removeToRecycle failed, args invalid! (taskId: number) => Promise<void>", i);
                            break
                        }
                        let t = i[0];
                        yield D.removeToRecycle(t)
                    } while (0)
                })
            }

            recoverFromRecycle(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !r.isNumber(i[0])) {
                        _.warning("recoverFromRecycle failed, args invalid! (taskId: number) => Promise<boolean>", i);
                        break
                    }
                    let t = i[0];
                    n = D.recoverFromRecycle(t)
                } while (0);
                return n
            }

            batchStartTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !r.isArray(i[0])) {
                            _.warning("batchStartTask failed, args invalid! (taskId: number) => void", i);
                            break
                        }
                        t = !0;
                        let n = i[0];
                        if (n) for (let e of n) t = (yield D.startTask(e)) && t
                    } while (0);
                    return t
                })
            }

            batchStartWaitingTask(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !r.isArray(i[0])) {
                        _.warning("batchStartWaitingTask failed, args invalid! (taskIds: number[]) => boolean", i);
                        break
                    }
                    let t = i[0];
                    n = D.startWaitingTasks(t)
                } while (0);
                return n
            }

            batchStopTask(e, t, ...i) {
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !r.isArray(i[0])) {
                        _.warning("stopTask failed, args invalid! (taskIds: number[], stopReason?: TaskStopReason) => void", i);
                        break
                    }
                    let t = i[0], n = l.DownloadKernel.TaskStopReason.Unknown;
                    i.length >= 2 && r.isNumber(i[1]) && (n = i[1]), D.batchStopTask(t, n)
                } while (0)
            }

            batchDeleteTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = !1;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !r.isArray(i[0]) || !r.isBoolean(i[1])) {
                            _.warning("batchDeleteTask failed, args invalid! (taskIds: number[], deleteFile: boolean) => Promise<boolean>", i);
                            break
                        }
                        let n = i[0], o = i[1];
                        t = yield D.deleteBatchTask(n, o)
                    } while (0);
                    return t
                })
            }

            batchRemoveToRecycle(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !r.isArray(i[0])) {
                            _.warning("batchRemoveToRecycle failed, args invalid! (taskIds: number[]) => Promise<void>", i);
                            break
                        }
                        let t = i[0];
                        yield D.batchRemoveToRecycle(t)
                    } while (0)
                })
            }

            batchRecoverFromRecycle(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !r.isArray(i[0])) {
                        _.warning("batchRecoverFromRecycle failed, args invalid! (taskIds: number[]) => boolean", i);
                        break
                    }
                    let t = i[0];
                    D.batchRecoverFromRecycle(t), n = !0
                } while (0);
                return n
            }

            batchFindTaskAsync(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = [];
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (i.length < 1 || !r.isArray(i[0])) {
                            _.warning("batchFindTaskAsync failed, args invalid! (keyInfos: IKeyInfo[]) => Promise<ITaskBase[]>", i);
                            break
                        }
                        let n = i[0], o = yield D.batchFindTaskAsync(n);
                        if (!o) break;
                        o.forEach(e => {
                            t.push(e.getTaskBaseInfo())
                        })
                    } while (0);
                    return t
                })
            }

            isCategoryLoaded(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        yield x.init()
                    } while (0);
                    return !0
                })
            }

            getCategoryFromUserId(e, t, ...i) {
                let n = null;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !r.isString(i[0]) || !r.isString(i[1])) {
                        _.warning("getCategoryFromUserId failed, args invalid! (categoryName: string, userId: string) => ICategoryData[]", i);
                        break
                    }
                    let t = i[0], o = i[1], a = void 0;
                    i.length >= 3 && (a = i[2]);
                    let s = x.getCategoryFromUserId(t, o, a);
                    s && (n = s.getCategoryData())
                } while (0);
                return n
            }

            getCategoryById(e, t, ...i) {
                let n = null;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !r.isNumber(i[0])) {
                        _.warning("getCategoryById failed, args invalid! (categoryId: number) => ICategoryData", i);
                        break
                    }
                    let t = i[0], o = x.getCategoryFromId(t);
                    o && (n = o.getCategoryData())
                } while (0);
                return n
            }

            getCategoryByName(e, t, ...i) {
                let n = [];
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 1 || !r.isString(i[0])) {
                        _.warning("getCategoryByName failed, args invalid! (categoryName: string) => ICategoryData[]", i);
                        break
                    }
                    let t = i[0], o = x.getCategoryByName(t);
                    o && o.size > 0 && o.forEach(e => {
                        n.push(e.getCategoryData())
                    })
                } while (0);
                return n
            }

            getCategoryTaskCount(e, t, ...i) {
                let n = 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !r.isNumber(i[0]) || !r.isString(i[1])) {
                        _.warning("getCategoryTaskCount failed, args invalid! (categoryId: number, categoryViewId: CategoryViewID) => number", i);
                        break
                    }
                    let t = i[0], o = i[1], a = x.getCategoryFromId(t);
                    if (!a) break;
                    let s = a.getCategoryViewFromId(o);
                    if (!s) break;
                    n = s.getTaskCount()
                } while (0);
                return n
            }

            getCategoryTaskList(e, t, ...i) {
                let n = [];
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !r.isNumber(i[0]) || !r.isString(i[1])) {
                        _.warning("getCategoryTaskList failed, args invalid! (categoryId: number, categoryViewId: CategoryViewID) => Promise<number[]>", i);
                        break
                    }
                    let t = i[0], o = i[1], a = x.getCategoryFromId(t);
                    if (!a) break;
                    let s = a.getCategoryViewFromId(o);
                    if (!s) break;
                    let l = s.getTasks();
                    if (!l) break;
                    l.forEach(e => {
                        n.push(e.getId())
                    })
                } while (0);
                return n
            }

            addServer(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 3 || !r.isNumber(i[0]) || !r.isNumber(i[1]) || !r.isObject(i[2])) {
                        _.warning("addServer failed, args invalid! (taskId: number, fileIndex: number, serverResourceInfo: IXLServerResourceInfo) => boolean", i);
                        break
                    }
                    let t = i[0], o = i[1], a = i[2], s = D.getTaskFromTaskId(t);
                    if (!s) break;
                    s.addServer(o, a), n = !0
                } while (0);
                return n
            }

            discardServer(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 3 || !r.isNumber(i[0]) || !r.isNumber(i[1]) || !r.isString(i[2])) {
                        _.warning("discardServer failed, args invalid! (taskId: number, fileIndex: number, url: string) => boolean", i);
                        break
                    }
                    let t = i[0], o = i[1], a = i[2], s = D.getTaskFromTaskId(t);
                    if (!s) break;
                    s.discardServer(o, a), n = !0
                } while (0);
                return n
            }

            getUserData(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !r.isNumber(i[0]) || !r.isString(i[1])) {
                        _.warning("getUserData failed, args invalid! (taskId: number, guid: string, key?: string) => string | number | {[key: string]: any}", i);
                        break
                    }
                    let t = i[0], o = D.getTaskFromTaskId(t);
                    if (!o) break;
                    let a = i[1], s = i[2], l = o.getExtraObject().getUserData(a, s);
                    if (r.isNullOrUndefined(l)) break;
                    if (r.isNumber(l) || r.isString(l)) n = l; else if (r.isArray(l)) {
                        let e = l, t = [];
                        for (let i = 0; i < e.length; ++i) t.push(e[i].toJs());
                        n = t
                    } else if (r.isObject(l)) {
                        let e = {};
                        l.forEach(function (t, i) {
                            e[i] = t.toJs()
                        }), n = e
                    }
                } while (0);
                return n
            }

            setUserData(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 3 || !r.isNumber(i[0]) || !r.isString(i[1]) || !r.isString(i[2]) || !r.isString(i[3]) && !r.isNumber(i[3]) && !r.isObject(i[3])) {
                        _.warning("setUserData failed, args invalid! (taskId: number, guid: string, key: string, value: string | number | {[key: string]: any}) => boolean", i);
                        break
                    }
                    let t = i[0], o = D.getTaskFromTaskId(t);
                    if (!o) break;
                    let a = i[1], s = i[2], l = i[3];
                    n = o.getExtraObject().setUserData(a, s, l)
                } while (0);
                return n
            }

            setTaskUrl(e, t, ...i) {
                let n = !1;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !r.isNumber(i[0]) || !r.isString(i[1])) {
                        _.warning("setTaskUrl failed, args invalid! (taskId: number, url: string) => boolean", i);
                        break
                    }
                    let t = i[0], o = D.getTaskFromTaskId(t);
                    if (!o) break;
                    let a = i[1];
                    n = o.setTaskUrl(a)
                } while (0);
                return n
            }

            getTaskAttribute(e, t, ...i) {
                let n = void 0;
                do {
                    if (r.isNullOrUndefined(e)) break;
                    if (i.length < 2 || !r.isNumber(i[0]) || !r.isNumber(i[1])) {
                        _.warning("getTaskAttribute failed, args invalid! (taskId: number, attr: DownloadKernel.TaskAttribute) => any", i);
                        break
                    }
                    let t = i[0], o = D.getTaskFromTaskId(t);
                    if (!o) break;
                    let a = i[1];
                    n = o.getTaskAttribute(a)
                } while (0);
                return n
            }

            onTaskDetailChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.DetailChanged) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = e[2], n = {};
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        let o = i.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId), a = i.getTaskBaseInfo();
                        n[o] = a
                    }
                    o.server.fireClientEvent("OnTaskDetailChanged", JSON.stringify(n), i)
                } while (0)
            }

            onTaskStatusChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!e[1]) break;
                    let t = e[1], i = {};
                    for (let e = 0; e < t.length; ++e) {
                        let n = t[e];
                        if (!n) continue;
                        let o = n.getTaskStatus();
                        i[n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId)] = o
                    }
                    o.server.fireClientEvent("OnTaskStatusChanged", JSON.stringify(i))
                } while (0)
            }

            onTaskDcdnStatusChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.DcdnStatusChanged) break;
                    if (!e[1]) break;
                    let t = e[1], i = {};
                    for (let e = 0; e < t.length; ++e) {
                        let n = t[e];
                        if (!n) continue;
                        let o = n.getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId),
                            a = n.getTaskChannelInfo().dcdnStatus;
                        i[o] = a
                    }
                    o.server.fireClientEvent("OnTaskDcdnStatusChanged", JSON.stringify(i))
                } while (0)
            }

            onBtSubFileDetailChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.BtSubFileDetailChanged) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = D.getTaskFromTaskId(t);
                    if (!i) break;
                    let n = e[2], a = i.getTaskBaseInfo();
                    o.server.fireClientEvent("OnBtSubFileDetailChanged", t, JSON.stringify(n), JSON.stringify(a))
                } while (0)
            }

            onBtSubFileLoaded(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.BtSubFileLoaded) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = e[2], n = D.getTaskFromTaskId(t);
                    if (!n) break;
                    let a = n.getTaskBaseInfo();
                    o.server.fireClientEvent("OnBtSubFileLoaded", t, JSON.stringify(i), JSON.stringify(a))
                } while (0)
            }

            onBtSubFileForbidden(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.BtSubFileForbidden) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = e[2];
                    o.server.fireClientEvent("OnBtSubFileForbidden", t, i)
                } while (0)
            }

            onBtSubFileDcdnStatusChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.BtSubFileDcdnStatusChanged) break;
                    if (!e[1] || null === e[2] || void 0 === e[2] || null === e[3] || void 0 === e[3] || null === e[4] || void 0 === e[4]) break;
                    let t = e[1], i = e[2], n = e[3], a = e[4];
                    o.server.fireClientEvent("OnBtSubFileDcdnStatusChanged", t, i, n, a)
                } while (0)
            }

            onTaskInserted(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.InsertToCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    let t = e[1], i = e[2], n = e[3], a = [];
                    for (let e = 0; e < n.length; ++e) {
                        let t = n[e].getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                        a.push(t)
                    }
                    let r = JSON.stringify(a);
                    o.server.fireClientEvent("OnTaskInserted", t, i, r)
                } while (0)
            }

            onTaskRemoved(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.RemoveFromCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    let t = e[1], i = e[2], n = e[3], a = [];
                    for (let e = 0; e < n.length; ++e) {
                        let t = n[e].getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId);
                        a.push(t)
                    }
                    let r = JSON.stringify(a);
                    o.server.fireClientEvent("OnTaskRemoved", t, i, r)
                } while (0)
            }

            onTaskCategoryMovedEnd(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== l.DownloadKernel.TaskEventType.TaskCategoryMovedEnd) break;
                    if (!e[1]) break;
                    let t = e[1], i = [];
                    for (let e of t) if (e) {
                        let t = e.getTaskBaseInfo();
                        i.push(t)
                    }
                    let n = JSON.stringify(i);
                    o.server.fireClientEvent("OnTaskCategoryMovedEnd", n)
                } while (0)
            }

            onGlobalDownloadSpeedChanged(...e) {
                let t = d.DownloadKernelManager.getTotalTaskDownloadSpeed(!1, !1),
                    i = d.DownloadKernelManager.getTotalTaskVipSpeed(!1, !1);
                o.server.fireClientEvent("OnGlobalDownloadSpeedChanged", t, i)
            }

            onDownloadItemActive(e, t, i, n, a, r) {
                if (n && t) {
                    let s = n.__vue__;
                    s ? s.$nextTick(() => {
                        _.information("active fire", t, i), o.server.fireClientEvent("OnDownloadItemActive", e, t, i, a, r)
                    }) : o.server.fireClientEvent("OnDownloadItemActive", e, t, i, a, r)
                } else o.server.fireClientEvent("OnDownloadItemActive", e, t, i, a, r)
            }

            onDownloadItemChosen(e, t, i, n) {
                o.server.fireClientEvent("OnDownloadItemChosen", e, i, t, n)
            }

            insertPanTaskReference(e, t, ...i) {
                !i || i.length < 4 || S.ThunderPanTaskNS.insertTask(i[0], i[1], i[2], i[3])
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.DkPluginFunctionNS || (t.DkPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.contextMenuDownloadImportUncomplete = "context_menu_download_import_uncompleted", e.contextMenuDownloadFolder = "context_menu_download_folder", e.contextMenuGroupAccelerate = "context_menu_group_accelerate", e.contxtMenuSubtitleSearch = "context_menu_subtitle_search", e.contextMenuDownloadStart = "context_menu_download_start", e.contextMenuDownloadPause = "context_menu_download_pause", e.contextMenuDownloadStartAll = "context_menu_download_start_all", e.contextMenuDownloadPauseAll = "context_menu_download_pause_all", e.contextMenuDownloadDelete = "context_menu_download_delete", e.contextMenuDownloadDestroy = "context_menu_download_destroy", e.contextMenuDownloadMoveFilePrivateSpace = "context_menu_download_move_file_private_space", e.contextMenuDownloadMoveFileOutPrivateSpace = "context_menu_download_move_file_out_private_space", e.contextMenuDownloadMoveFileOther = "context_menu_download_move_file_other", e.contextMenuDownloadMoveFileLastest = "context_menu_download_move_file_lastest", e.contextMenuDownloadMoveTop = "context_menu_download_move_top", e.contextMenuDownloadMoveBottom = "context_menu_download_move_bottom", e.contextMenuDownloadMerge = "context_menu_download_merge", e.contextMenuDownloadVipAcc = "context_menu_download_vip_acc", e.contextMenuDownloadCopyLink = "context_menu_download_copy_link", e.contextMenuDownloadTorrentSaveAs = "context_menu_download_torrent_save_as", e.contextMenuDownloadCopyMagnet = "context_menu_download_copy_magnet", e.contextMenuPlayFile = "context_menu_play_file", e.contextMenuDownloadFile = "context_menu_download_file", e.contextMenuDownloadOpenAs = "context_menu_download_open_as", e.contextMenuDownloadRename = "context_menu_download_rename", e.contextMenuDownloadCopyFileLastest = "context_menu_download_copy_file_lastest", e.contextMenuDownloadCopyFileOther = "context_menu_download_copy_file_other", e.contextMenuDownloadRedownload = "context_menu_download_redownload", e.contextMenuDownloadRecover = "context_menu_download_recover", e.contextMenuDownloadClear = "context_menu_download_clear", e.contextMenuDownloadByShoulei = "context_menu_download_shoulei", e.contextMenuDownloadAdd2Cloud = "context_menu_download_add2cloud", e.contextMenuDownloadShare = "context_menu_download_share", e.contextMenuDownloadSelectAll = "context_menu_download_select_all", e.contextMenuDownloadDeleteNonexisting = "context_menu_download_delete_non_existing", e.contextMenuDownloadAsReadedAll = "context_menu_download_as_readed_all", e.contextMenuToolbarMoreOpenSearch = "context_menu_toolbar_more_opensearch", e.contextMenuToolbarMoreOpenHelp = "context_menu_toolbar_more_openhelp", e.contextMenuToolbarMoreDestroy = "context_menu_toolbar_more_destroy", e.contextMenuToolbarMoreConfig = "context_menu_toolbar_more_config", e.contextMenuToolbarMoreSortByDefault = "context_menu_toolbar_more_sort_default", e.contextMenuToolbarMoreSortByTime = "context_menu_toolbar_more_sort_time", e.contextMenuToolbarMoreSortByType = "context_menu_toolbar_more_sort_type", e.contextMenuToolbarMoreSortByName = "context_menu_toolbar_more_sort_name", e.contextMenuToolbarMoreSortBySize = "context_menu_toolbar_more_sort_size", e.contextMenuToolbarMoreSortByStatus = "context_menu_toolbar_more_sort_status", e.contextMenuToolbarMoreSortByProgress = "context_menu_toolbar_more_sort_progress", e.contextMenuTabChangeCategoryMyComputer = "context_menu_tab_change_category_mycomputer", e.contextMenuTabChangeCategoryPrivateSpace = "context_menu_tab_change_category_privatespace", e.contextMenuToolbarPrivateSpaceSelectAll = "context_menu_toolbar_privatespace_select_all", e.contextMenuToolbarPrivateSpaceDownloadSetting = "context_menu_toolbar_privatespace_download_setting", e.contextMenuToolbarPrivateSpacePasswwordChange = "context_menu_toolbar_privatespace_passwword_change", e.contextMenuToolbarPrivateSpaceTaskManager = "context_menu_toolbar_privatespace_download_task_manager", e.contextMenuOpenTaskPosition = "context_menu_search_openfile_position", e.contextMenuShouleiFileTransfer = "context_menu_shoulei_file_transfer", e.contextMenuPanUpload = "context_menu_pan_upload", e.contextMenuPanAddLink = "context_menu_pan_add_link", e.contextMenuPanAddBt = "context_menu_pan_add_Bt", e.contextMenuPanCreateFolder = "context_menu_pan_create_folder"
    }(t.ContextMenuIdsNS || (t.ContextMenuIdsNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(112), r = i(0).default.getLogger("WebPageTip");
    const s = new class {
        constructor() {
            this.embeddedBrowserObj = null, this.title = "", this.url = "http://static1.ssp.xunlei.com/iframe/fx.html", this.width = 300, this.height = 280, this.lefttMargin = 0, this.rigthMargin = 0, this.topMargin = 30, this.bootomMargin = 0, this.x = 0, this.y = 0, this.callback = null, this.embeddedBrowserObj = new a.EmbeddedBrowser
        }

        createWebPageTipDlg(e, t, i, a, s) {
            return n(this, void 0, void 0, function* () {
                r.information("createWebPageTipDlg url:", e, t);
                {
                    void 0 !== e && null !== e && "" !== e && (this.url = e), this.title = a, this.width = t.width || this.width, this.height = t.height || this.height, this.x = t.x || this.x, this.y = t.y || this.y, this.callback = s;
                    let r = (e, t) => {
                        "click_close" === t ? this.callback && s("click_close") : this.callback && s(t)
                    };
                    (yield o.asyncRemoteCall.getIpcMain()).on("ad-webpagetip", r);
                    let l = !1;
                    this.embeddedBrowserObj.setBrowserEventHandler((e, ...t) => {
                        if ("OnBeforeNavigate" === e) this.callback && this.callback("webpage_loading", ...t); else if ("OnLoadEnd" === e) l || this.callback && this.callback("webpage_loaded", ...t); else if ("OnLoadError" === e) l = !0, this.callback && this.callback("webpage_load_failed", ...t); else if ("OnNewBrowserPopup" === e) return this.callback && this.callback("click", ...t), !0;
                        return !1
                    }), this.embeddedBrowserObj.setWindowTopLevel(!0), this.embeddedBrowserObj.setToolWindow(!0), yield this.embeddedBrowserObj.createWnd(this.url, this.title, !1, "ad-webpagetip", this.width, this.height, this.lefttMargin, this.rigthMargin, this.topMargin, this.bootomMargin, i, this.onWndShowResult.bind(this), () => n(this, void 0, void 0, function* () {
                        (yield o.asyncRemoteCall.getIpcMain()).removeListener("ad-webpagetip", r), this.callback && s("closed")
                    }))
                }
                return this.embeddedBrowserObj.getWnd()
            })
        }

        onWndShowResult() {
            return n(this, void 0, void 0, function* () {
                if (this.embeddedBrowserObj) {
                    let e = this.embeddedBrowserObj.getWnd();
                    e && (yield e.setBounds({x: this.x, y: this.y, width: this.width, height: this.height}))
                }
                return !0
            })
        }

        closeDialog() {
            this.embeddedBrowserObj.closeWnd().catch()
        }
    };
    t.default = s
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), a = i(0), r = i(5), s = i(14), l = i(536), d = i(538), u = i(22), c = i(25), h = i(2), f = i(7),
        p = a.default.getLogger("SkinNaviteFunction"), g = f.default(h.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, l.default.on("changeSkin", this.onChangeSkin)
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        GetSkinInfo: this.getSkinInfo,
                        SetSkinInfo: this.setSkinInfo,
                        ShowIndividuation: this.showIndividuation,
                        GetSuspensionSkinInfo: this.getSuspensionSkinInfo,
                        SetSuspensionSkinInfo: this.setSuspensionSkinInfo,
                        GetSkinInfoDetail: this.getSkinInfoDetail,
                        SetShakeInfo: this.setShakeInfo,
                        GetShakeInfo: this.getShakeInfo
                    };
                    o.server.registerFunctions(e)
                }
            }

            getSkinInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = null;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        yield l.default.initAW(), t = l.default.getSkinInfo(), p.information(t)
                    } while (0);
                    return t
                })
            }

            setSkinInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (r.isNullOrUndefined(i) || r.isNullOrUndefined(i[0])) break;
                        try {
                            yield l.default.setSkinInfo(i[0], i[1], i[2])
                        } catch (e) {
                            p.warning(e);
                            break
                        }
                    } while (0)
                })
            }

            onChangeSkin(e, t) {
                do {
                    if (s.ThunderUtil.isUndef(e)) break;
                    p.information(e), o.server.fireClientEvent("OnChangeSkin", e, t)
                } while (0)
            }

            showIndividuation(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let t = null;
                    do {
                        if (r.isNullOrUndefined(e)) break;
                        if (r.isNullOrUndefined(i)) break;
                        try {
                            t = yield u.MessageBox.customIndividuation("Individuation", Object.assign({
                                singleton: !0,
                                version: g.getFileVersion(h.join(__rootDir, "../../Thunder.exe")),
                                dynamicSkinVersion: c.default.getConfigInfo("dynamicSkinVersion")
                            }, i[0] || {}), {
                                modal: !1,
                                webPreferences: {spellcheck: !1, nodeIntegration: !0, webSecurity: !1}
                            })
                        } catch (e) {
                            break
                        }
                    } while (0);
                    return t
                })
            }

            getSuspensionSkinInfo(e, t, ...i) {
                return d.default.getSkinInfo()
            }

            setSuspensionSkinInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (!i || !i[0]) break;
                        yield d.default.setSkinInfo(i[0], i[1], i[2])
                    } while (0)
                })
            }

            getSkinInfoDetail(e, t, ...i) {
                return {skinInfo: l.default.getSkinInfo(), temp: l.default.getIsTemp()}
            }

            setShakeInfo(e, t, ...i) {
                o.server.fireClientEvent("OnChangeShake", i[0], i[1])
            }

            getShakeInfo(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return yield l.default.getShakeInfo(i[0])
                })
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.SkinPluginFunctionNS || (t.SkinPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.colorList = [{
            id: 0,
            nativeTheme: {
                colors: {
                    menu_background_color: 16777215,
                    menu_item_background_color: 15132390,
                    menu_text_color: 5066061,
                    menu_text_disable_color: 7501692,
                    menu_exit_text_color: 16743263
                }, themeSource: "light"
            }
        }, {
            id: 1,
            themeSource: "dark",
            nativeTheme: {
                colors: {
                    menu_background_color: 3355443,
                    menu_item_background_color: 4276545,
                    menu_text_color: 15132390,
                    menu_text_disable_color: 7501692,
                    menu_exit_text_color: 15132390
                }, themeSource: "dark"
            }
        }, {
            id: 2,
            themeSource: "light",
            nativeTheme: {
                colors: {
                    menu_background_color: 16777215,
                    menu_item_background_color: 15132390,
                    menu_text_color: 5066061,
                    menu_text_disable_color: 7501692,
                    menu_exit_text_color: 16743263
                }, themeSource: "light"
            }
        }]
    }(t.SkinConfigNS || (t.SkinConfigNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(18), a = i(0), r = i(14), s = i(404), l = i(10), d = i(13), u = i(537), c = i(141),
        h = i(3), {isDef: f} = r.ThunderUtil, p = a.default.getLogger("Thunder.Skin:spring-festival-skin");
    !function (e) {
        let t = void 0, a = !1;
        const r = 1e4;
        let g = null;
        e.init = function () {
            return n(this, void 0, void 0, function* () {
                yield function () {
                    return n(this, void 0, void 0, function* () {
                        return new Promise(e => {
                            l.ConfigNS.attachListener(d.NodeEventMesssageNS.eventConfigInitFinished, () => {
                                e(!0)
                            })
                        })
                    })
                }();
                let e = null;
                try {
                    const t = "http://msg.vip.xunlei.com/xlact/conf";
                    p.information("init", "url", t);
                    let n = yield h.client.callServerFunction("GetPeerID");
                    o.default.defaults.adapter = i(21);
                    let s = yield c.VipPluginFunctionNS.getThunderVersionNumber(), l = yield o.default.get(t, {
                        params: {
                            actid: "vip2019redpack",
                            source: 3e3,
                            peerid: n,
                            inVersion: s
                        }, timeout: r
                    });
                    p.information("init res", l), 200 === l.status && f(l.data) && 0 === l.data.result && f(l.data.data) && (a = Boolean(l.data.data.is_spring_festival), e = l.data.data.skin, g = l.data.data.scroll_text)
                } catch (e) {
                    p.warning(e)
                }
                e = e || {}, localStorage.setItem("springFestivalSkinData", JSON.stringify(e))
            })
        }, e.canShowSkin = function () {
            return n(this, void 0, void 0, function* () {
                do {
                    let e = l.ConfigNS.getValue("Skin", "DisableSpringFestivalSkin", !1);
                    if (p.information("showSkin disable", e), e) {
                        t = !1;
                        break
                    }
                    t = a
                } while (0);
                return t
            })
        }, e.getSkin = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                do {
                    let i = yield u.default.getSpringFestivalWallpaper();
                    if (!i) break;
                    e && (yield u.default.removeImage(i));
                    let n = yield u.default.getImage(i);
                    t = {
                        type: s.SkinHelperNS.SkinType.Wallpaper,
                        colorID: i.color,
                        image: n,
                        opacity: i.transparency / 100,
                        opacityDesc: !0,
                        skinID: i.id,
                        is_spring_festival: !0
                    }
                } while (0);
                return t
            })
        }, e.disableSkin = function () {
            !0 === t && (t = !1, l.ConfigNS.setValue("Skin", "DisableSpringFestivalSkin", !0))
        }, e.onClickLink = function () {
            let e = (new Date).toLocaleDateString();
            l.ConfigNS.setValue("Skin", "SpringFestivalLinkClickDate", e)
        }, e.canShowLink = function () {
            return n(this, void 0, void 0, function* () {
                let e = !0;
                return l.ConfigNS.getValue("Skin", "SpringFestivalLinkClickDate", "") === (new Date).toLocaleDateString() && (e = !1), e
            })
        }, e.getColor = function () {
            return {
                id: 11,
                defaultOpacity: .8,
                colors: {
                    colorAccordion: ["255,149,87", "255,64,64"],
                    colorGradientBackground: ["255,147,119", "255,64,51"],
                    colorGradientForeground: ["255,244,225", "255,239,214"],
                    colorPrimary: "236,78,78",
                    colorPrimaryControl1: "255,109,109",
                    colorPrimaryControl2: "236,78,78",
                    colorPrimaryControl3: "248,197,197",
                    colorPrimaryControl4: "251,229,229",
                    colorPrimaryGradient: ["255,136,106", "255,84,84"],
                    colorPrimaryText: "87,5,5",
                    colorSearch: "255,232,232",
                    colorSecondary: "183,68,68"
                }
            }
        }, e.getTextLink = function (e) {
            let t = null;
            return g && (t = e ? g.login : g.unlogin), t
        }
    }(t.SpringFestivalSkinNS || (t.SpringFestivalSkinNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), a = i(540), r = i(541);
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        GetToolbarVipButtonEnable: this.getToolbarVipButtonEnable,
                        GetVipRenewButtonEnable: this.getVipRenewButtonEnable,
                        GetVipLabelConfig: this.getVipLabelConfig
                    };
                    o.server.registerFunctions(e)
                }
            }

            getToolbarVipButtonEnable(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return r.VipPluginSwitchConfigNS.getToolbarVipButtonEnable()
                })
            }

            getVipRenewButtonEnable(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return r.VipPluginSwitchConfigNS.getVipRenewButtonEnable()
                })
            }

            getVipLabelConfig(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = i[0];
                    return yield a.VipLableConfigNS.getConfig(e)
                })
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.VipPluginFunctionNS || (t.VipPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), a = i(14), r = i(148), s = i(0), l = i(78), d = s.default.getLogger("NotificationPluginFunction");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        ShowNotification: this.showNotification,
                        QueryNotificationPriority: this.queryNotificationPriority
                    };
                    o.server.registerFunctions(e)
                }
            }

            showNotification(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = !1;
                    do {
                        if (a.ThunderUtil.isUndef(i) || a.ThunderUtil.isUndef(i[0])) break;
                        try {
                            let t = JSON.parse(i[0]);
                            if (d.information("showNotification", "options", t), !t) break;
                            let n = i[1], o = null;
                            d.information("notificationCallBackId", n), a.ThunderUtil.isDef(n) && (o = ((...e) => {
                                n(...e)
                            })), r.NotificationHelper.notify(t, o), e = !0
                        } catch (e) {
                            d.warning("showNotification error", e);
                            break
                        }
                    } while (0);
                    return e
                })
            }

            queryNotificationPriority(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = 0;
                    do {
                        if (a.ThunderUtil.isUndef(i) || a.ThunderUtil.isUndef(i[0])) break;
                        let t = new Map;
                        if (t.set(l.MsgQueueNS.MsgType.Community, l.MsgQueueNS.MsgPriority.Community), t.set(l.MsgQueueNS.MsgType.AdvertisementMarket, l.MsgQueueNS.MsgPriority.AdvertisementMarket), t.set(l.MsgQueueNS.MsgType.AdvertisementFunctional, l.MsgQueueNS.MsgPriority.AdvertisementFunctional), t.set(l.MsgQueueNS.MsgType.PreciseDelivery, l.MsgQueueNS.MsgPriority.PreciseDelivery), t.set(l.MsgQueueNS.MsgType.CenterVip, l.MsgQueueNS.MsgPriority.CenterVip), t.set(l.MsgQueueNS.MsgType.Download, l.MsgQueueNS.MsgPriority.Download), t.has(i[0])) {
                            e = t.get(i[0]);
                            break
                        }
                        if (a.ThunderUtil.isDef(i[1])) {
                            e = i[1];
                            break
                        }
                    } while (0);
                    return e
                })
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.NotificationPluginFunctionNS || (t.NotificationPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(15), o = i(116).ShouleiListSyncNS.getMananger();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, o.attachEvent("OnConnectStateChanged", e => {
                    n.server.fireClientEvent("OnShouleiConnectStateChanged", e)
                })
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {GetShouleiConnectState: this.getShouleiConnectState};
                    n.server.registerFunctions(e)
                }
            }

            getShouleiConnectState(e, t, ...i) {
                let n = "offline";
                do {
                    if (!e) break;
                    n = o.getState()
                } while (0);
                return n
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.ShouleiConnectPluginFunctionNS || (t.ShouleiConnectPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(15), a = i(3), r = i(49), s = i(396), l = i(4), d = i(32), u = i(398), c = i(11), h = i(5), f = i(542),
        p = c.DownloadKernelTaskManager.getTaskManager();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        GetCommonlySites: this.getCommonlySites,
                        DeleteCommonlySites: this.deleteCommonlySites,
                        ClearCommonlySites: this.clearCommonlySites,
                        GetLatestSearchKeywords: this.getLatestSearchKeywords,
                        AddSearchKeyword: this.addSearchKeyword,
                        DeleteSearchKeyword: this.deleteSearchKeyword,
                        ClearSearchKeyword: this.clearSearchKeyword,
                        SearchTask: this.searchTask,
                        SearchHistory: this.searchHistory,
                        SearchPanTask: this.searchPanTask,
                        IpcRedirectCurrentDirectoryById: this.ipcRedirectCurrentDirectoryById,
                        Recommend: this.recommend,
                        SearchMovie: this.searchMovie
                    };
                    o.server.registerFunctions(e)
                }
            }

            recommend() {
                return n(this, void 0, void 0, function* () {
                    return yield f.MovieRecommendNS.recommend()
                })
            }

            searchMovie(e, t, i) {
                return n(this, void 0, void 0, function* () {
                    return i ? yield f.MovieRecommendNS.search(i) : null
                })
            }

            getCommonlySites(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return yield s.CommonSitesMgrNS.getInstance().getMostCommonly()
                })
            }

            deleteCommonlySites(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (!e || !i || h.isNullOrUndefined(i[0])) break;
                        s.CommonSitesMgrNS.getInstance().delete(i[0]).catch()
                    } while (0)
                })
            }

            clearCommonlySites(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    yield s.CommonSitesMgrNS.getInstance().clear()
                })
            }

            getLatestSearchKeywords(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return s.CommonSitesMgrNS.getInstance().getLatestSearchKeywords()
                })
            }

            addSearchKeyword(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    i && i[0] && s.CommonSitesMgrNS.getInstance().addSearchKeyword(i[0])
                })
            }

            deleteSearchKeyword(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    i && !h.isNullOrUndefined(i[0]) && s.CommonSitesMgrNS.getInstance().deleteSearchKeyword(i[0])
                })
            }

            clearSearchKeyword(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    s.CommonSitesMgrNS.getInstance().clearSearchKeyword()
                })
            }

            searchTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    let e = l.DownloadKernel.SearchKeyType.NameInclude, t = [];
                    if (!i || !i[0]) return t;
                    let n = i[0].split(" ");
                    for (let i of n) if (yield new Promise(n => {
                        d.ThunderKernel.searchTask(e, i, -1, "", e => {
                            t = 0 === t.length ? e : t.filter(t => e.includes(t)), n()
                        })
                    }), 0 === t.length) return t;
                    let o, a = [];
                    for (let e of t) {
                        let t = p.getTaskFromTaskId(e);
                        t && (o = t.getTaskAttribute(l.DownloadKernel.TaskAttribute.CategoryViewId)) !== l.DownloadKernel.CategroyViewID.Recycle && a.push(e)
                    }
                    return a
                })
            }

            searchHistory(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return i && i[0] ? u.historyManager.search(i[0]) : []
                })
            }

            searchPanTask(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    return i && i[0] ? (yield o.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcSearchFileByName", {keyword: i[0]}))[0] : []
                })
            }

            ipcRedirectCurrentDirectoryById(e, t, ...i) {
                return n(this, void 0, void 0, function* () {
                    if (!i || !i[0]) return [];
                    o.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcRedirectCurrentDirectoryById", {id: i[0]}).catch(), a.client.callServerFunction("SelectNav", r.NavViewID.Cloud).catch()
                })
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.SearchPluginFunctionNS || (t.SearchPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(15), o = i(20), a = i(142), r = i(0), s = i(107), l = r.default.getLogger("plugin-function"),
        d = ["XmpPlugin"];

    class u extends o.EventEmitter {
        constructor() {
            super(), this.isRegister = !1, this.isRegister = !1
        }

        registerPluginFunction() {
            if (!this.isRegister) {
                this.isRegister = !0;
                let e = {
                    LoadNoneWebviewPlugin: this.loadNoneWebviewPlugin.bind(this),
                    AssociateForXmp: this.associateForXmp.bind(this),
                    DownloadOrOpenXmp: this.downloadOrOpenXmp
                };
                n.server.registerFunctions(e)
            }
        }

        loadNoneWebviewPlugin(e, t, ...i) {
            if (!i || i.length < 2) return;
            let n = i[0];
            if (-1 === d.indexOf(n)) return void l.warning("not support current bid, bid name ", n);
            let o, a = i[1];
            try {
                o = require(a.src)
            } catch (e) {
                l.warning(e)
            }
            l.information("loadPlugin result", o)
        }

        associateForXmp(e, t, ...i) {
            a.DownloadAndPlayNS.handleAssociate("xmp")
        }

        downloadOrOpenXmp(e, t, ...i) {
            s.default.openXmp("").catch()
        }
    }

    t.PluginXmpMgr = u, function (e) {
        const t = new u;
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.XmpPluginFunctionNS || (t.XmpPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(36), r = i(5), s = i(28), l = i(27), d = i(395), u = i(23), c = i(125), h = i(111),
        f = i(146), p = i(402), g = o.default.getLogger("NativeFunction.Login");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{
                        functionName: "NativeFireEvent",
                        nativeFunc: this.fireEvent
                    }, {
                        functionName: "CreateLoginWnd",
                        nativeFunc: this.createLoginWnd
                    }, {functionName: "CloseLoginWnd", nativeFunc: this.closeLoginWnd}, {
                        functionName: "UpdateLoginWnd",
                        nativeFunc: this.updateLoginWnd
                    }, {functionName: "SaveLoginData", nativeFunc: this.saveLoginData}, {
                        functionName: "LoadLoginData",
                        nativeFunc: this.loadLoginData
                    }, {functionName: "FireLoginEvent", nativeFunc: this.fireLoginEvent}, {
                        functionName: "GetUserID",
                        nativeFunc: this.getUserID
                    }, {functionName: "GetSessionID", nativeFunc: this.getSessionID}, {
                        functionName: "GetLoginOption",
                        nativeFunc: this.getLoginOption
                    }, {functionName: "ShowLoginDlg", nativeFunc: this.showLoginDlg}, {
                        functionName: "GetLoginInfo",
                        nativeFunc: this.getLoginInfo
                    }, {functionName: "GetUserInfo", nativeFunc: this.getUserInfo}, {
                        functionName: "GetAllUserInfo",
                        nativeFunc: this.getAllUserInfo
                    }, {functionName: "IsLogined", nativeFunc: this.isLogined}, {
                        functionName: "Logout",
                        nativeFunc: this.logout
                    }, {
                        functionName: "GetLoginDeviceID",
                        nativeFunc: this.getLoginDeviceID
                    }, {
                        functionName: "RetryLogIn",
                        nativeFunc: this.retryLogIn
                    }, {
                        functionName: "ShowModifierUserInfoWnd",
                        nativeFunc: this.showModifierUserInfoWnd
                    }, {
                        functionName: "GetUserHeaderByUserID",
                        nativeFunc: this.getUserHeaderByUserID
                    }, {
                        functionName: "IsAlreadySign",
                        nativeFunc: this.isAlreadySign
                    }, {
                        functionName: "IsHaveSignQuestion",
                        nativeFunc: this.isHaveSignQuestion
                    }, {functionName: "SendSms", nativeFunc: this.sendSms}, {
                        functionName: "CheckSms",
                        nativeFunc: this.checkSms
                    }];
                    a.NativeCallNS.registerNativeFunction(e)
                }
            }

            fireEvent(e, t, i, n) {
                if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0])) return void e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                let o = n[0];
                g.information("fireEvent eventName:", o), n.splice(0, 1), s.NativeCallHostModule.nativeCallHost.fireNativeEvent(o, ...n), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success)
            }

            getUserID(e, t, i, n) {
                g.information("getUserID:", n), u.LoginHelperNS.loginHelper.getUserInfo("userid", function (n) {
                    g.information("getUserID:userid = ", n), null !== n && void 0 !== n && "" !== n || (n = "0"), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                })
            }

            getSessionID(e, t, i, n) {
                g.information("getSessionID:", n), u.LoginHelperNS.loginHelper.getUserInfo("sessionid", function (n) {
                    g.information("getSessionID:sessionid = ", n), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                })
            }

            getLoginOption(e, t, i, n) {
                let o = c.LoginOptionNS.loginOption.getOption(), a = void 0;
                o && (a = JSON.stringify(o)), g.information("getLoginOption:option = ", a), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, a)
            }

            showLoginDlg(e, t, i, n) {
                g.information(n);
                let o = "other", a = !0, s = null;
                if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0]) || (o = n[0]), r.isNullOrUndefined(n) || r.isNullOrUndefined(n[1]) || (a = n[1]), !r.isNullOrUndefined(n) && !r.isNullOrUndefined(n[2])) {
                    let e = n[2];
                    try {
                        s = JSON.parse(e)
                    } catch (e) {
                        g.warning(e)
                    }
                }
                u.LoginHelperNS.loginHelper.showLoginDlg(o, a, s), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success)
            }

            getLoginInfo(e, t, i, n) {
                if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0])) u.LoginHelperNS.loginHelper.getUserInfo(function (n) {
                    e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                }); else {
                    let o = n[0];
                    u.LoginHelperNS.loginHelper.getUserInfo(o, function (n) {
                        e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                    })
                }
            }

            getUserInfo(e, t, i, n) {
                g.information(n), (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) && e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                let o = 0;
                if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0])) o = 0; else {
                    let e = n[0];
                    o = null === e || void 0 === e || "" === e ? 0 : Number(e)
                }
                u.LoginHelperNS.loginHelper.getUserInfoEx(o, function (n) {
                    e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                })
            }

            getAllUserInfo(e, t, i, n) {
                if (g.information(n), r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0])) u.LoginHelperNS.loginHelper.getAllUserInfo(function (n) {
                    e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                }); else {
                    let o = n[0];
                    u.LoginHelperNS.loginHelper.getAllUserInfo(o, function (n) {
                        e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                    })
                }
            }

            isLogined(e, t, i, n) {
                g.information(n), (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) && e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError), u.LoginHelperNS.loginHelper.isLogined(function (n) {
                    e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                })
            }

            logout(e, t, i, n) {
                g.information(n), u.LoginHelperNS.loginHelper.logout(), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success)
            }

            saveLoginData(e, t, i, n) {
                do {
                    if (g.information("saveLoginData", e, t, i), r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0]) || r.isNullOrUndefined(n[1]) || r.isNullOrUndefined(n[2])) {
                        e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], s = n[2];
                    u.LoginHelperNS.loginSDKHelper.saveData(o, a, s).then(n => {
                        e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                    }).catch(() => {
                        e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.CallFailed)
                    })
                } while (0)
            }

            loadLoginData(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    let n = null;
                    do {
                        if (g.information("loadLoginData", e, t, i), r.isNullOrUndefined(o) || r.isNullOrUndefined(o[0]) || r.isNullOrUndefined(o[1])) {
                            e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = o[0], s = o[1];
                        n = "memory" === a && "initconfig" === s ? yield u.LoginHelperNS.loginSDKHelper.getInitData() : u.LoginHelperNS.loginSDKHelper.loadData(a, s), g.information("loadLoginData:data = ", n), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            fireLoginEvent(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(o) || !Array.isArray(o)) {
                            e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        if ("string" != typeof o[0]) {
                            e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = o[1], s = yield u.LoginHelperNS.loginSDKHelper.fireEvent(n, a);
                        e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, JSON.stringify(s))
                    } while (0)
                })
            }

            createLoginWnd(e, t, i, n) {
                do {
                    if (g.information("createLoginWnd", e, t, i), r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i) || r.isNullOrUndefined(n)) {
                        g.information("createLoginWnd 失败");
                        break
                    }
                    if (r.isNullOrUndefined(n[0]) || r.isNullOrUndefined(n[1])) {
                        g.information("createLoginWnd 失败 参数错误"), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], s = "", d = null, c = null;
                    r.isNullOrUndefined(n[2]) || (s = n[2]), r.isNullOrUndefined(n[3]) || (d = n[3]), r.isNullOrUndefined(n[4]) || (c = n[4]);
                    let p = () => {
                        u.LoginHelperNS.loginUIHelper.createLoginWnd(o, a, s, d, c)
                    };
                    f.popMutual.enqueue(h.PopView.LOGIN, p, s), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success)
                } while (0)
            }

            closeLoginWnd(e, t, i, n) {
                do {
                    if (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i) || r.isNullOrUndefined(n)) break;
                    if (r.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    u.LoginHelperNS.loginUIHelper.closeLoginWnd(o)
                } while (0)
            }

            updateLoginWnd(e, t, i, n) {
                g.information("updateLoginWnd", e, t, i);
                let o = !1, a = null, s = null, d = null, c = null;
                r.isNullOrUndefined(n[0]) || (o = n[0]), r.isNullOrUndefined(n[1]) || (a = n[1]), r.isNullOrUndefined(n[2]) || (s = n[2]), r.isNullOrUndefined(n[3]) || (d = n[3]), r.isNullOrUndefined(n[4]) || (c = n[4]), u.LoginHelperNS.loginUIHelper.updateLoginWnd(o, a, s, d, c), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success)
            }

            getLoginDeviceID(e, t, i, n) {
                g.information("getDeviceID", e, t, i), u.LoginHelperNS.loginSDKHelper.getDeviceID().then(n => {
                    e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                }).catch(n => {
                    e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.CallFailed, n)
                })
            }

            retryLogIn(e, t, i, n) {
                g.information("retryLogIn"), u.LoginHelperNS.loginHelper.logIn("retryLogIn"), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success)
            }

            showModifierUserInfoWnd(e, t, i, n) {
                g.information("showModifierUserInfoWnd", e, t, i);
                let o = "";
                o = r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0]) ? "" : n[0], u.LoginHelperNS.loginUIHelper.createModifierUserInfoWnd(o), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success)
            }

            getUserHeaderByUserID(e, t, i, n) {
                if (g.information("getUserHeaderByUserID", e, t, i), r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0])) return void e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                let o = u.LoginHelperNS.loginHelper.getUserHeader(n[0]);
                e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, o)
            }

            isAlreadySign(e, t, i, n) {
                g.information("isAlreadySign", e, t, i), d.CommonSignFunctionNs.isAlreadySign().then(n => {
                    e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                }).catch()
            }

            isHaveSignQuestion(e, t, i, n) {
                g.information("isHaveSignQuestion", e, t, i), d.CommonSignFunctionNs.isHaveSignQuestion().then(n => {
                    e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                }).catch()
            }

            sendSms(e, t, i, n) {
                g.information("sendSms", e, t, i);
                let o = "";
                null !== n && void 0 !== n && n.length > 0 && (o = n[0]), p.commonLoginHelper.sendSmsAw(o).then(n => {
                    e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                }).catch()
            }

            checkSms(e, t, i, n) {
                g.information("checkSms", e, t, i);
                do {
                    if (null === n || void 0 === n || n.length < 2) {
                        g.information("checkSms args存在问题 args：", n), e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1];
                    p.commonLoginHelper.checkSmsAw(o, a).then(n => {
                        e.callNativeFunctionCallback(t, i, l.NativeFunctionErrorCode.Success, n)
                    }).catch()
                } while (0)
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.LoginNaviteFunctionNS || (t.LoginNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(4), r = i(33), s = i(11), l = i(16), d = i(44), u = i(36), c = i(27), h = i(28), f = i(32),
        p = i(13), g = i(40), m = i(8), v = i(43), y = i(381), T = i(51), w = i(532), k = i(407), C = i(5),
        b = o.default.getLogger("DKNativeFunction"), I = s.DownloadKernelTaskManager.getTaskManager(),
        S = l.DownloadKernelEventManager.getEventManager(),
        _ = d.DownloadKernelCategoryViewManager.getCategoryViewManager();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, S.attachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    this.onTaskDetailChanged(...e)
                }), S.attachTaskEvent(a.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    this.onTaskStatusChanged(...e)
                }), S.attachTaskEvent(a.DownloadKernel.TaskEventType.DcdnStatusChanged, (...e) => {
                    this.onTaskDcdnStatusChanged(...e)
                }), S.attachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileDetailChanged, (...e) => {
                    this.onBtSubFileDetailChanged(...e)
                }), S.attachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileLoaded, (...e) => {
                    this.onBtSubFileLoaded(...e)
                }), S.attachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileForbidden, (...e) => {
                    this.onBtSubFileForbidden(...e)
                }), S.attachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileDcdnStatusChanged, (...e) => {
                    this.onBtSubFileDcdnStatusChanged(...e)
                }), S.attachTaskEvent(a.DownloadKernel.TaskEventType.InsertToCategoryView, (...e) => {
                    this.onTaskInserted(...e)
                }), S.attachTaskEvent(a.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...e) => {
                    this.onTaskRemoved(...e)
                }), S.attachTaskEvent(a.DownloadKernel.TaskEventType.TaskCategoryMovedEnd, (...e) => {
                    this.onTaskCategoryMovedEnd(...e)
                }), r.DownloadKernelManager.attachListener(p.NodeEventMesssageNS.eventGlobalDownloadSpeedChanged, (...e) => {
                    this.onGlobalDownloadSpeedChanged(...e)
                })
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{
                        functionName: "GetTaskChannelInfo",
                        nativeFunc: this.getTaskChannelInfo
                    }, {
                        functionName: "GetTaskBaseInfo",
                        nativeFunc: this.getTaskBaseInfo
                    }, {
                        functionName: "GetTaskBaseInfos",
                        nativeFunc: this.getTaskBaseInfos
                    }, {
                        functionName: "GetTaskAttribute",
                        nativeFunc: this.getTaskAttribute
                    }, {functionName: "GetTaskStatus", nativeFunc: this.getTaskStatus}, {
                        functionName: "FindTask",
                        nativeFunc: this.findTask
                    }, {functionName: "IsTaskExist", nativeFunc: this.isTaskExist}, {
                        functionName: "IsSupportPlay",
                        nativeFunc: this.isSupportPlay
                    }, {
                        functionName: "GetTaskDownloadSpeed",
                        nativeFunc: this.getTaskDownloadSpeed
                    }, {
                        functionName: "EnableDcdnWithVipCert",
                        nativeFunc: this.enableDcdnWithVipCert
                    }, {
                        functionName: "UpdateDcdnWithVipCert",
                        nativeFunc: this.updateDcdnWithVipCert
                    }, {
                        functionName: "DisableDcdnWithVipCert",
                        nativeFunc: this.disableDcdnWithVipCert
                    }, {functionName: "GetTpPeerId", nativeFunc: this.getPeerId}, {
                        functionName: "ExecSqlite",
                        nativeFunc: this.execSqlite
                    }, {functionName: "ExecSqliteEx", nativeFunc: this.execSqliteEx}, {
                        functionName: "QuerySqlite",
                        nativeFunc: this.querySqlite
                    }, {
                        functionName: "GetCategoryViewTaskList",
                        nativeFunc: this.getCategoryViewTaskList
                    }, {
                        functionName: "GetCategoryViewTaskListForSuspensionWnd",
                        nativeFunc: this.getCategoryViewTaskListForSuspensionWnd
                    }, {
                        functionName: "IsLoadStorageTaskFinish",
                        nativeFunc: this.isLoadStorageTaskFinish
                    }, {
                        functionName: "IsSupportInstall",
                        nativeFunc: this.isSupportInstall
                    }, {
                        functionName: "GetDownloadProgress",
                        nativeFunc: this.getDownloadProgressPercent
                    }, {
                        functionName: "GetDownloadProgressNumber",
                        nativeFunc: this.getDownloadProgress
                    }, {functionName: "IsSingleBtTask", nativeFunc: this.isSingleBtTask}, {
                        functionName: "VerifyProxy",
                        nativeFunc: this.verifyProxy
                    }, {functionName: "SetProxy", nativeFunc: this.setProxy}, {
                        functionName: "SetTaskExtStat",
                        nativeFunc: this.setTaskExtStat
                    }, {
                        functionName: "DownloadBySDK",
                        nativeFunc: this.asynRequestFile
                    }, {
                        functionName: "IsFileSizeSetterWorking",
                        nativeFunc: this.isFileSizeSetterWorking
                    }, {functionName: "LaunchFileAssistant", nativeFunc: this.launchFileAssistant}];
                    u.NativeCallNS.registerNativeFunction(e)
                }
            }

            getTaskChannelInfo(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = I.getTaskFromTaskId(o);
                    if (a) {
                        let n = a.getTaskChannelInfo(), o = JSON.stringify(n);
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, o)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            getTaskAttribute(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], r = I.getTaskFromTaskId(o);
                    if (r) {
                        let n = r.getTaskAttribute(a), o = JSON.stringify(n);
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, o)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            getTaskBaseInfo(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = I.getTaskFromTaskId(o);
                    if (a) {
                        let n = a.getTaskBaseInfo(), o = JSON.stringify(n);
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, o)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            getTaskBaseInfos(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = null;
                    try {
                        a = JSON.parse(o)
                    } catch (e) {
                        b.warning(e)
                    }
                    if (a) {
                        let n = [];
                        for (let e = 0; e < a.length; ++e) {
                            let t = I.getTaskFromTaskId(a[e]);
                            if (t) {
                                let e = t.getTaskBaseInfo();
                                n.push(e)
                            }
                        }
                        let o = JSON.stringify(n);
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, o)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            getTaskDownloadSpeed(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = I.getTaskFromTaskId(o);
                    if (a) {
                        let n = a.getDownloadSpeed();
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            getTaskStatus(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = I.getTaskFromTaskId(o);
                    if (a) {
                        let n = a.getTaskStatus();
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            findTask(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0] || !n[1]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = {keyType: n[0], keyValue: n[1], keyFilter: a.DownloadKernel.KeyFilter.All};
                    I.batchFindTaskAsync([o]).then(n => {
                        if (n && n.length > 0) {
                            let o = n[0].getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !0, o)
                        } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !1, 0)
                    }).catch()
                } while (0)
            }

            isTaskExist(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0];
                    I.getTaskFromTaskId(o) ? e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !0) : e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !1)
                } while (0)
            }

            isSupportPlay(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = I.getTaskFromTaskId(o);
                    if (a) {
                        let n = a.isSupportPlay();
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !1)
                } while (0)
            }

            enableDcdnWithVipCert(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0] || !n[1]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = I.getTaskFromTaskId(o);
                    if (a) {
                        let o = -1;
                        C.isNumber(n[2]) && (o = n[2]), a.enableDcdnWithVipCert(n[1], o), e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            updateDcdnWithVipCert(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0] || !n[1]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = I.getTaskFromTaskId(o);
                    if (a) {
                        let o = -1;
                        C.isNumber(n[2]) && (o = n[2]), a.updateDcdnWithVipCert(n[1], o), e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            disableDcdnWithVipCert(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = I.getTaskFromTaskId(o);
                    if (a) {
                        let o = -1;
                        C.isNumber(n[1]) && (o = n[1]), a.disableDcdnWithVipCert(o), e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            getPeerId(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    b.verbose(n), r.DownloadKernelManager.getPeerId().then(n => {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                    }).catch()
                } while (0)
            }

            execSqlite(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    f.ThunderKernel.execSqlite(n[0], (n, o) => {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n, o)
                    })
                } while (0)
            }

            execSqliteEx(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    f.ThunderKernel.execSqliteEx(n[0], (n, o) => {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n, o)
                    })
                } while (0)
            }

            querySqlite(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    f.ThunderKernel.querySqlite(n[0], (n, o, a) => {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n, o, a)
                    })
                } while (0)
            }

            getCategoryViewTaskList(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError), b.warning("getCategoryViewTaskList args", n);
                        break
                    }
                    let o = _.getCategoryViewFromId(n[0]);
                    if (o) {
                        let n = [], a = o.getTasks();
                        if (a) for (let e of a) {
                            let t = e[0];
                            n.push(t)
                        }
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            getCategoryViewTaskListForSuspensionWnd(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = _.getCategoryViewFromId(n[0]);
                    if (o) {
                        let n = o.getTasks(), a = "", r = [];
                        if (n) {
                            for (let [, e]of n) {
                                let t = e.getTaskBaseInfo();
                                r.push(t)
                            }
                            a = JSON.stringify(r)
                        }
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, a)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
                } while (0)
            }

            isLoadStorageTaskFinish(e, t, i) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    r.DownloadKernelManager.attachListener(p.NodeEventMesssageNS.eventTaskDataBaseLoadEnd, () => {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !0)
                    })
                } while (0)
            }

            onTaskDetailChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.DetailChanged) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = e[2], n = {};
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        let o = i.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId), r = i.getTaskBaseInfo();
                        n[o] = r
                    }
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskDetailChanged", JSON.stringify(n), i)
                } while (0)
            }

            onTaskStatusChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.StatusChanged) break;
                    if (!e[1]) break;
                    let t = e[1], i = {};
                    for (let e = 0; e < t.length; ++e) {
                        let n = t[e];
                        if (!n) continue;
                        let o = n.getTaskStatus();
                        i[n.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId)] = o
                    }
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskStatusChanged", JSON.stringify(i))
                } while (0)
            }

            onTaskDcdnStatusChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.DcdnStatusChanged) break;
                    if (!e[1]) break;
                    let t = e[1], i = {};
                    for (let e = 0; e < t.length; ++e) {
                        let n = t[e];
                        if (!n) continue;
                        let o = n.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId),
                            r = n.getTaskChannelInfo().dcdnStatus;
                        i[o] = r
                    }
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskDcdnStatusChanged", JSON.stringify(i))
                } while (0)
            }

            onBtSubFileDetailChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.BtSubFileDetailChanged) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = I.getTaskFromTaskId(t);
                    if (!i) break;
                    let n = e[2], o = i.getTaskBaseInfo();
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnBtSubFileDetailChanged", t, JSON.stringify(n), JSON.stringify(o))
                } while (0)
            }

            onBtSubFileLoaded(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.BtSubFileLoaded) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = e[2], n = I.getTaskFromTaskId(t);
                    if (!n) break;
                    let o = n.getTaskBaseInfo();
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnBtSubFileLoaded", t, JSON.stringify(i), JSON.stringify(o))
                } while (0)
            }

            onBtSubFileForbidden(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.BtSubFileForbidden) break;
                    if (!e[1] || !e[2]) break;
                    let t = e[1], i = e[2];
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnBtSubFileForbidden", t, i)
                } while (0)
            }

            onBtSubFileDcdnStatusChanged(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.BtSubFileDcdnStatusChanged) break;
                    if (!e[1] || null === e[2] || void 0 === e[2] || null === e[3] || void 0 === e[3] || null === e[4] || void 0 === e[4]) break;
                    let t = e[1], i = e[2], n = e[3], o = e[4];
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnBtSubFileDcdnStatusChanged", t, i, n, o)
                } while (0)
            }

            onTaskInserted(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.InsertToCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    let t = e[1], i = e[2], n = e[3], o = [];
                    for (let e = 0; e < n.length; ++e) {
                        let t = n[e].getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                        o.push(t)
                    }
                    let r = JSON.stringify(o);
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskInserted", t, i, r)
                } while (0)
            }

            onTaskRemoved(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.RemoveFromCategoryView) break;
                    if (void 0 === e[1] || !e[2] || !e[3]) break;
                    let t = e[1], i = e[2], n = e[3], o = [];
                    for (let e = 0; e < n.length; ++e) {
                        let t = n[e].getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskId);
                        o.push(t)
                    }
                    let r = JSON.stringify(o);
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskRemoved", t, i, r)
                } while (0)
            }

            onTaskCategoryMovedEnd(...e) {
                do {
                    if (!e) break;
                    if (e[0] !== a.DownloadKernel.TaskEventType.TaskCategoryMovedEnd) break;
                    if (!e[1]) break;
                    let t = e[1], i = [];
                    for (let e of t) if (e) {
                        let t = e.getTaskBaseInfo();
                        i.push(t)
                    }
                    let n = JSON.stringify(i);
                    h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnTaskCategoryMovedEnd", n)
                } while (0)
            }

            onGlobalDownloadSpeedChanged(...e) {
                let t = r.DownloadKernelManager.getTotalTaskDownloadSpeed(!1, !1),
                    i = r.DownloadKernelManager.getTotalTaskVipSpeed(!1, !1);
                h.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnGlobalDownloadSpeedChanged", t, i)
            }

            isSupportInstall(e, t, i, n) {
                do {
                    if (C.isNullOrUndefined(e) || C.isNullOrUndefined(t) || C.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = I.getTaskFromTaskId(o);
                    if (!r) {
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if (r.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskType) === a.DownloadKernel.TaskType.Group) {
                        let n = r.getExtraObject(),
                            a = n.getUserData(v.TaskUserDataGUID.guidDownloadCompleteInstall, "installFile");
                        if (void 0 !== a && null !== a && "" !== a && "0" !== a) {
                            let r = g.TaskCtrlOperatorNS.getSavePathByFileName(o, a);
                            m.FileSystemAWNS.existsAW(r).then(o => {
                                if (o) {
                                    let o = n.getUserData(v.TaskUserDataGUID.guidDownloadCompleteRunParams, "runParams");
                                    e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !0, r, o)
                                } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !1)
                            }).catch()
                        } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !1)
                    } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, !1)
                } while (0)
            }

            getDownloadProgressPercent(e, t, i, n) {
                let o = y.DownloadProgressNS.getDownloadProgressPercent();
                e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, o)
            }

            getDownloadProgress(e, t, i, n) {
                let o = y.DownloadProgressNS.getDownloadProgress();
                e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, o)
            }

            isSingleBtTask(e, t, i, n) {
                let o = n[0], a = I.getTaskFromTaskId(o);
                T.SingleBtTaskNS.isSingleBtTask(a).then(n => {
                    e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                }).catch()
            }

            verifyProxy(e, t, i, n) {
                let o = n[0], a = n[1], r = n[2], s = n[3], l = n[4];
                0 !== f.ThunderKernel.verifyProxy(o, a, r, s, l, n => {
                    e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                }) && e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, k.ProxyNS.ProxyVerifyResult.ParamError)
            }

            setProxy(e, t, i, n) {
                let o = n[0], a = n[1], r = n[2], s = n[3], l = n[4], d = f.ThunderKernel.setProxy(o, a, r, s, l);
                e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, d)
            }

            setTaskExtStat(e, t, i, n) {
                let o = n[0], r = I.getTaskFromTaskId(o);
                if (r) {
                    let o = n[1], s = n[2], l = n[3], d = r.getTaskAttribute(a.DownloadKernel.TaskAttribute.VirtualId),
                        u = f.ThunderKernel.setTaskExtStat(d, o, s, l);
                    e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, u)
                } else e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError)
            }

            asynRequestFile(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = o[0];
                        if ("string" == typeof a) try {
                            a = JSON.parse(o[0])
                        } catch (e) {
                            b.warning(e)
                        }
                        if (!a) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        if (!a.url) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        if (!a.savePath) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        if (!a.fileName) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let r = o[1];
                        void 0 !== r && null !== r && (a.onTaskFinish = ((i, o) => n(this, void 0, void 0, function* () {
                            e.callNativeFunctionCallback(t, r, i, o)
                        })));
                        let s = yield w.sdkDownloader.createTaskBySDK(a);
                        e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, s)
                    } while (0)
                })
            }

            isFileSizeSetterWorking(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (!o) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = f.ThunderKernel.isFileSizeSetterWorking(n => {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                        });
                        0 !== n && e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.CallFailed, n)
                    } while (0)
                })
            }

            launchFileAssistant(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (!o) {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = f.ThunderKernel.launchFileAssistant(n => {
                            e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.Success, n)
                        });
                        0 !== n && e.callNativeFunctionCallback(t, i, c.NativeFunctionErrorCode.CallFailed, n)
                    } while (0)
                })
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.DKNaviteFunctionNS || (t.DKNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(13), a = i(36), r = i(27), s = i(28), l = i(10), d = i(400), u = i(25), c = i(90), h = i(5),
        f = i(19), p = i(35), g = n.default.getLogger("ConfigNaviteFunction");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, l.ConfigNS.attachListener(o.NodeEventMesssageNS.eventConfigValueChanged, (e, t, i, n) => {
                    f.ipcRenderer.send(p.ThunderChannelList.channelRMConfigValueChanged, e, t, i, n), s.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnConfigValueChanaged", e, t, i, n)
                }), l.ConfigNS.attachListener(o.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    f.ipcRenderer.send(p.ThunderChannelList.channelRMConfigInitFinished), s.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnConfigInitFinished")
                })
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{functionName: "Save", nativeFunc: this.save}, {
                        functionName: "GetValue",
                        nativeFunc: this.getValue
                    }, {functionName: "SetValue", nativeFunc: this.setValue}, {
                        functionName: "SaveConfig",
                        nativeFunc: this.save
                    }, {functionName: "GetConfigValue", nativeFunc: this.getValue}, {
                        functionName: "SetConfigValue",
                        nativeFunc: this.setValue
                    }, {
                        functionName: "IsConfigInitFinish",
                        nativeFunc: this.isConfigInitFinish
                    }, {
                        functionName: "GetConfigModules",
                        nativeFunc: this.getConfigModules
                    }, {
                        functionName: "IsConfigBrowserInitFinish",
                        nativeFunc: this.isConfigBrowserInitFinish
                    }, {
                        functionName: "GetInstallBrowserInfo",
                        nativeFunc: this.getInstallBrowserInfo
                    }, {
                        functionName: "AddConfigSettingItemData",
                        nativeFunc: this.addConfigSettingItemData
                    }, {functionName: "RemoveConfigSettingItemData", nativeFunc: this.removeConfigSettingItemData}];
                    a.NativeCallNS.registerNativeFunction(e)
                }
            }

            save(e, t, i, n) {
                do {
                    if (h.isNullOrUndefined(e) || h.isNullOrUndefined(t) || h.isNullOrUndefined(i)) break;
                    g.verbose(n), l.ConfigNS.save().then(() => {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
                    }).catch()
                } while (0)
            }

            getValue(e, t, i, n) {
                do {
                    if (h.isNullOrUndefined(e) || h.isNullOrUndefined(t) || h.isNullOrUndefined(i)) break;
                    if (!n || !n[0] || !n[1]) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], s = n[2], d = l.ConfigNS.getValue(o, a, s);
                    g.information("getValue section:", o, "key:", a, "ret: ", d), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, d)
                } while (0)
            }

            setValue(e, t, i, n) {
                do {
                    if (h.isNullOrUndefined(e) || h.isNullOrUndefined(t) || h.isNullOrUndefined(i)) break;
                    if (!n || !n[0] || !n[1]) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], s = n[2];
                    l.ConfigNS.setValue(o, a, s), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
                } while (0)
            }

            isConfigInitFinish(e, t, i) {
                do {
                    if (h.isNullOrUndefined(e) || h.isNullOrUndefined(t) || h.isNullOrUndefined(i)) break;
                    l.ConfigNS.attachListener(o.NodeEventMesssageNS.eventConfigInitFinished, () => {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, !0)
                    })
                } while (0)
            }

            getConfigModules(e, t, i, n) {
                do {
                    if (h.isNullOrUndefined(e) || h.isNullOrUndefined(t) || h.isNullOrUndefined(i)) break;
                    let o = "", a = "";
                    null !== n && void 0 !== n && (null !== n[0] && void 0 !== n[0] && "" !== n[0] && (o = n[0]), null !== n[1] && void 0 !== n[1] && "" !== n[1] && (a = n[1]));
                    let s = u.default.getConfigInfo(o, a);
                    e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, s)
                } while (0)
            }

            isConfigBrowserInitFinish(e, t, i) {
                do {
                    if (h.isNullOrUndefined(e) || h.isNullOrUndefined(t) || h.isNullOrUndefined(i)) break;
                    c.SettingConfigHelperNS.configBrowserHelper.attachListener(o.NodeEventMesssageNS.eventConfigBrowserInitFinished, () => {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, !0)
                    })
                } while (0)
            }

            getInstallBrowserInfo(e, t, i, n) {
                do {
                    if (h.isNullOrUndefined(e) || h.isNullOrUndefined(t) || h.isNullOrUndefined(i)) break;
                    if (null === n || void 0 === n || n.length <= 0 || void 0 === n[0] || null === n[0] || "" === n[0]) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = c.SettingConfigHelperNS.configBrowserHelper.getWatchBrowerByName(o);
                    e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, a)
                } while (0)
            }

            addConfigSettingItemData(e, t, i, n) {
                {
                    let o = null, a = null;
                    if (n[0] && n[1]) try {
                        o = JSON.parse(n[0]), a = JSON.parse(n[1])
                    } catch (e) {
                    }
                    if (o && a) {
                        let n = d.SettingInit.addSettingItemData(o, a);
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
                    } else e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError)
                }
            }

            removeConfigSettingItemData(e, t, i, n) {
                {
                    let o = null, a = null;
                    if (n[0] && n[1]) try {
                        o = JSON.parse(n[0]), a = JSON.parse(n[1])
                    } catch (e) {
                    }
                    if (o && a) {
                        let n = d.SettingInit.removeSettingItemData(o, a);
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
                    } else e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError)
                }
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.ConfigNaviteFunctionNS || (t.ConfigNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(36), a = i(27), r = i(28), s = i(45), l = i(5),
        d = n.default.getLogger("ConfigRemoteGlobalNaviteFunction");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, s.default.attachListener("OnRemoteGlobalConfigLoaded", e => {
                    d.information("OnRemoteGlobalConfigLoaded ret:", e), r.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnRemoteGlobalConfigLoaded", e)
                }), s.default.attachListener("OnRemoteGlobalConfigUpdated", e => {
                    d.information("OnRemoteGlobalConfigUpdated ret:", e), r.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnRemoteGlobalConfigUpdated", e)
                })
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{
                        functionName: "GetRemoteGlobalConfigValue",
                        nativeFunc: this.getRemoteGlobalConfigValue
                    }, {
                        functionName: "IsRemoteGlobalConfigInitFinish",
                        nativeFunc: this.isRemoteGlobalConfigInitFinish
                    }];
                    o.NativeCallNS.registerNativeFunction(e)
                }
            }

            getRemoteGlobalConfigValue(e, t, i, n) {
                do {
                    if (l.isNullOrUndefined(e) || l.isNullOrUndefined(t) || l.isNullOrUndefined(i)) break;
                    if (!n || !n[0]) {
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = void 0;
                    n.length >= 2 && (r = n[1]);
                    let u = void 0;
                    if (n.length >= 3 && (u = n[2], l.isString(u))) try {
                        u = JSON.parse(u)
                    } catch (e) {
                        d.warning(e), u = n[2]
                    }
                    let c = void 0, h = s.default.getConfigValue(o, r, u);
                    if (!l.isNullOrUndefined(h)) try {
                        c = JSON.stringify(h)
                    } catch (e) {
                        d.warning(e), c = h
                    }
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, c)
                } while (0)
            }

            isRemoteGlobalConfigInitFinish(e, t, i) {
                do {
                    if (l.isNullOrUndefined(e) || l.isNullOrUndefined(t) || l.isNullOrUndefined(i)) break;
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, s.default.isInited())
                } while (0)
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.ConfigRemoteGlobalNaviteFunctionNS || (t.ConfigRemoteGlobalNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(36), o = i(5), a = i(107), r = i(142), s = i(27), l = i(391);
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{functionName: "InstallXmp", nativeFunc: this.installXmp}, {
                        functionName: "OpenXmp",
                        nativeFunc: this.openXmp
                    }, {
                        functionName: "CreateDownloadAndPlayTask",
                        nativeFunc: this.createDownloadAndPlayTask
                    }, {
                        functionName: "GetXmpCoreVersion",
                        nativeFunc: this.getXmpCoreVersion
                    }, {functionName: "GetXmpBuildNum", nativeFunc: this.getXmpBuildNum}, {
                        functionName: "GetXmpPath",
                        nativeFunc: this.getXmpPath
                    }, {functionName: "GetXmpReg", nativeFunc: this.getXmpReg}, {
                        functionName: "GetXmpUserDataPath",
                        nativeFunc: this.getXmpUserDataPath
                    }];
                    n.NativeCallNS.registerNativeFunction(e)
                }
            }

            installXmp(e, t, i, n) {
                o.isNullOrUndefined(e) || o.isNullOrUndefined(t) || o.isNullOrUndefined(i) || a.default.installXmp().then(() => {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
                }).catch()
            }

            openXmp(e, t, i, n) {
                do {
                    if (o.isNullOrUndefined(e) || o.isNullOrUndefined(t) || o.isNullOrUndefined(i)) break;
                    let r = "";
                    o.isNullOrUndefined(n) || o.isNullOrUndefined(n[0]) || (r = n[0]), a.default.openXmp(r).then(n => {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, n)
                    }).catch()
                } while (0)
            }

            createDownloadAndPlayTask(e, t, i, n) {
                do {
                    if (o.isNullOrUndefined(e) || o.isNullOrUndefined(t) || o.isNullOrUndefined(i)) break;
                    l.DownloadAndPlayUnionNS.createDowndAndPlayTask(n[0], n[1], n[2], !0).then(n => {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, n)
                    }).catch()
                } while (0)
            }

            getXmpCoreVersion(e, t, i, n) {
                o.isNullOrUndefined(e) || o.isNullOrUndefined(t) || o.isNullOrUndefined(i) || a.default.getXmpCoreVersion().then(n => {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, n)
                }).catch()
            }

            getXmpBuildNum(e, t, i, n) {
                o.isNullOrUndefined(e) || o.isNullOrUndefined(t) || o.isNullOrUndefined(i) || a.default.getXmpBuildNum().then(n => {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, n)
                }).catch()
            }

            getXmpPath(e, t, i, n) {
                if (o.isNullOrUndefined(e) || o.isNullOrUndefined(t) || o.isNullOrUndefined(i)) return;
                let a = r.DownloadAndPlayNS.getXmpPath();
                e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, a)
            }

            getXmpReg(e, t, i, n) {
                do {
                    if (o.isNullOrUndefined(e) || o.isNullOrUndefined(t) || o.isNullOrUndefined(i)) break;
                    if (o.isNullOrUndefined(n) || o.isNullOrUndefined(n[0])) {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let a = n[0];
                    if (o.isNullOrUndefined(a) || "" === a) {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let l = r.DownloadAndPlayNS.getXmpReg(a);
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, l)
                } while (0)
            }

            getXmpUserDataPath(e, t, i, n) {
                o.isNullOrUndefined(e) || o.isNullOrUndefined(t) || o.isNullOrUndefined(i) || a.default.getXmpUserDataPath().then(n => {
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, n)
                }).catch()
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.DownloadAndPlayNaviteFunctionNS || (t.DownloadAndPlayNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(36), r = i(27), s = i(14), l = i(536), d = i(538), u = i(404), c = i(22), h = i(25), f = i(2),
        p = i(7), g = o.default.getLogger("SkinNaviteFunction"),
        m = p.default(f.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{functionName: "GetSkinInfo", nativeFunc: this.getSkinInfo}, {
                        functionName: "SetSkinInfo",
                        nativeFunc: this.setSkinInfo
                    }, {functionName: "SetShakeInfo", nativeFunc: this.setShakeInfo}, {
                        functionName: "GetShakeInfo",
                        nativeFunc: this.getShakeInfo
                    }, {
                        functionName: "ShowIndividuation",
                        nativeFunc: this.showIndividuation
                    }, {
                        functionName: "GetSuspensionSkinInfo",
                        nativeFunc: this.getSuspensionSkinInfo
                    }, {functionName: "SetSuspensionSkinInfo", nativeFunc: this.setSuspensionSkinInfo}];
                    a.NativeCallNS.registerNativeFunction(e)
                }
            }

            getSkinInfo(e, t, i) {
                do {
                    if (s.ThunderUtil.isUndef(e) || s.ThunderUtil.isUndef(t) || s.ThunderUtil.isUndef(i)) break;
                    let n = u.SkinHelperNS.defaultSkinInfo;
                    if (s.ThunderUtil.isUndef(n)) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    g.information(n), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
                } while (0)
            }

            setSkinInfo(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
                })
            }

            setShakeInfo(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
                })
            }

            getShakeInfo(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (s.ThunderUtil.isUndef(e) || s.ThunderUtil.isUndef(t) || s.ThunderUtil.isUndef(i)) break;
                        let n = yield l.default.getShakeInfo(o[0]);
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            showIndividuation(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (s.ThunderUtil.isUndef(e) || s.ThunderUtil.isUndef(t) || s.ThunderUtil.isUndef(i)) break;
                        if (s.ThunderUtil.isUndef(o)) {
                            e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n;
                        try {
                            let a = o[0];
                            "string" == typeof a && (a = JSON.parse(a)), n = yield c.MessageBox.customIndividuation("Individuation", Object.assign({
                                singleton: !0,
                                version: m.getFileVersion(f.join(__rootDir, "../../Thunder.exe")),
                                dynamicSkinVersion: h.default.getConfigInfo("dynamicSkinVersion")
                            }, a || {}), {
                                modal: !1,
                                alwaysOnTop: !0,
                                webPreferences: {spellcheck: !1, nodeIntegration: !0, webSecurity: !1}
                            })
                        } catch (n) {
                            e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            getSuspensionSkinInfo(e, t, i) {
                do {
                    if (s.ThunderUtil.isUndef(e) || s.ThunderUtil.isUndef(t) || s.ThunderUtil.isUndef(i)) break;
                    let n = d.default.getSkinInfo();
                    if (s.ThunderUtil.isUndef(n)) {
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    g.information(n), e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success, n)
                } while (0)
            }

            setSuspensionSkinInfo(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (s.ThunderUtil.isUndef(e) || s.ThunderUtil.isUndef(t) || s.ThunderUtil.isUndef(i)) break;
                        if (s.ThunderUtil.isUndef(o) || s.ThunderUtil.isUndef(o[0])) {
                            e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        try {
                            yield d.default.setSkinInfo(o[0], o[1], o[2])
                        } catch (n) {
                            e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        e.callNativeFunctionCallback(t, i, r.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.SkinNaviteFunctionNS || (t.SkinNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(36), a = i(27), r = i(14), s = i(141), l = i(540);
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{
                        functionName: "GetVipTaskInfo",
                        nativeFunc: this.getVipTaskInfo
                    }, {
                        functionName: "GetVipSubTaskInfo",
                        nativeFunc: this.getVipSubTaskInfo
                    }, {
                        functionName: "GetVipLabelConfig",
                        nativeFunc: this.getVipLabelConfig
                    }, {functionName: "ClickTryAcclerateBtn", nativeFunc: this.clickTryAcclerateBtn}];
                    o.NativeCallNS.registerNativeFunction(e)
                }
            }

            getVipTaskInfo(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.ThunderUtil.isUndef(e) || r.ThunderUtil.isUndef(t) || r.ThunderUtil.isUndef(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = void 0, l = o[0], d = yield s.VipPluginFunctionNS.getVipTaskInfo(l);
                        d && (n = JSON.stringify(d)), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            getVipSubTaskInfo(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.ThunderUtil.isUndef(e) || r.ThunderUtil.isUndef(t) || r.ThunderUtil.isUndef(i)) break;
                        if (!o || r.ThunderUtil.isUndef(o[0]) || r.ThunderUtil.isUndef(o[1])) {
                            e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = void 0, l = o[0], d = o[1], u = yield s.VipPluginFunctionNS.getVipSubTaskInfo(l, d);
                        u && (n = JSON.stringify(u)), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
                    } while (0)
                })
            }

            getVipLabelConfig(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.ThunderUtil.isUndef(e) || r.ThunderUtil.isUndef(t) || r.ThunderUtil.isUndef(i)) break;
                        if (!o || r.ThunderUtil.isUndef(o[0])) {
                            e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], s = yield l.VipLableConfigNS.getConfig(n), d = void 0;
                        s && (d = JSON.stringify(s)), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, d)
                    } while (0)
                })
            }

            clickTryAcclerateBtn(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.ThunderUtil.isUndef(e) || r.ThunderUtil.isUndef(t) || r.ThunderUtil.isUndef(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], l = o[1];
                        yield s.VipPluginFunctionNS.clickTryAcclerateBtn(n, l), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success)
                    } while (0)
                })
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.VipNaviteFunctionNS || (t.VipNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(12), r = i(0), s = i(36), l = i(5), d = i(27), u = i(143), c = i(4), h = i(11), f = i(7),
        p = i(28), g = r.default.getLogger("NativeFunction.Login"), m = u.SubtitleManagerNS.getSubtitleManger(),
        v = h.DownloadKernelTaskManager.getTaskManager(), y = f.default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{
                        functionName: "SubtitleQuerySubtitleByCid",
                        nativeFunc: this.querySubtitleByCid
                    }, {
                        functionName: "SubtitleQuerySubtitleByName",
                        nativeFunc: this.querySubtitleByName
                    }, {
                        functionName: "SubtitleGetFileList",
                        nativeFunc: this.getFileList
                    }, {
                        functionName: "SubtitleDownload",
                        nativeFunc: this.downloadSubtitle
                    }, {functionName: "SubtitleOpen", nativeFunc: this.openSubtitle}];
                    s.NativeCallNS.registerNativeFunction(e), m.attachListener(u.SubtitleManagerNS.SubtitleEvent.DownloadSuccess, (e, t, i) => {
                        p.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnSubtitleDownloadSuccess", e, t, JSON.stringify(i))
                    }), m.attachListener(u.SubtitleManagerNS.SubtitleEvent.DownloadFail, (e, t, i) => {
                        p.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnSubtitleDownloadFail", e, t, JSON.stringify(i))
                    })
                }
            }

            querySubtitleByCid(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (l.isNullOrUndefined(e) || l.isNullOrUndefined(t) || l.isNullOrUndefined(i)) break;
                        if (!o || !o[0] || !o[1]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = o[1], r = yield m.querySubtitleByCid(n, a);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(r))
                    } while (0)
                })
            }

            querySubtitleByName(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (l.isNullOrUndefined(e) || l.isNullOrUndefined(t) || l.isNullOrUndefined(i)) break;
                        if (!o || !o[0] || !o[1]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = o[1], r = yield m.querySubtitleByName(n, a);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(r))
                    } while (0)
                })
            }

            getFileList(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (l.isNullOrUndefined(e) || l.isNullOrUndefined(t) || l.isNullOrUndefined(i)) break;
                        if (!o || !o[0]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = o[0], a = m.getDisaplayName(n);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, JSON.stringify(a))
                    } while (0)
                })
            }

            downloadSubtitle(e, t, i, o) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (l.isNullOrUndefined(e) || l.isNullOrUndefined(t) || l.isNullOrUndefined(i)) break;
                        if (!(o && o[0] && o[1] && o[2])) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = null;
                        try {
                            n = JSON.parse(o[0])
                        } catch (e) {
                            g.warning("downloadSubtitle invalid param! JSON parse failed! e:", e)
                        }
                        if (!n) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let a = o[1], r = o[2], s = yield m.downloadSubtitle(n, a, r);
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, s)
                    } while (0)
                })
            }

            openSubtitle(e, t, i, r) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (l.isNullOrUndefined(e) || l.isNullOrUndefined(t) || l.isNullOrUndefined(i)) break;
                        if (!r || !r[0] || !r[1]) {
                            e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.ParamError);
                            break
                        }
                        let n = r[0], s = r[1], u = v.getTaskFromTaskId(n);
                        if (!u) break;
                        let h = u.getTaskName(), f = u.getType(), p = u.getSavePath();
                        f === c.DownloadKernel.TaskType.Bt && u.getExtraObject().getDownloadFile().length > 1 && (p = o.join(p, h));
                        let g = y.shellExecute(0, "open", o.join(p, s), null, null, "SW_SHOW");
                        if (g <= 32) {
                            let e = p + "\\.";
                            yield(yield a.asyncRemoteCall.getShell()).showItemInFolder(e)
                        }
                        e.callNativeFunctionCallback(t, i, d.NativeFunctionErrorCode.Success, g)
                    } while (0)
                })
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.SubtitleManagerNaviteFunctionNS || (t.SubtitleManagerNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(5), o = i(36), a = i(28), r = i(116), s = i(27), l = r.ShouleiListSyncNS.getMananger();
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1, l.attachEvent("OnConnectStateChanged", e => {
                    a.NativeCallHostModule.nativeCallHost.fireNativeEvent("OnShouleiConnectStateChanged", e)
                })
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{functionName: "GetShouleiConnectState", nativeFunc: this.getShouleiConnectState}];
                    o.NativeCallNS.registerNativeFunction(e)
                }
            }

            getShouleiConnectState(e, t, i, o) {
                do {
                    if (n.isNullOrUndefined(e) || n.isNullOrUndefined(t) || n.isNullOrUndefined(i)) break;
                    e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success, l.getState())
                } while (0)
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.ShouleiConnectNaviteFunctionNS || (t.ShouleiConnectNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(8), r = i(10), s = i(13), l = i(34), d = i(512), u = i(103), c = i(4), h = i(33), f = i(16),
        p = i(84), g = i(147), m = i(12), v = i(0), y = i(78), T = i(115), w = i(43), k = i(48), C = i(56), b = i(53),
        I = i(9), S = i(23), _ = i(44), D = i(108), A = i(7), N = i(3), x = i(40), E = i(22), O = i(38), P = i(26),
        M = A.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        F = T.MsgQueueManagerNS.MsgQueue.getInstance().getQueue("notification"),
        L = f.DownloadKernelEventManager.getEventManager(), R = v.default.getLogger("task-helper"),
        B = C.ToastNotifyManagerNS.getToastNotifyManger(), U = y.MsgQueueNS.MsgPriority.Download,
        V = _.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        K = P.DownloadKernelCategoryManager.getCategoryManager();
    const G = new class {
        init() {
            this.attachConfigInitFinished(), this.attachTaskStatusChanged(), this.attachTaskCreated()
        }

        calculateSurplusTime(e) {
            let t = [9, 12, 20, 21, 22, 23], i = {surplusTime: -9999, taskTye: 2}, n = new Date, o = n.getHours(),
                a = n.getMinutes(), r = n.getSeconds(), s = 0, l = new Date(e);
            do {
                if (o >= 23) break;
                if (0 !== e && l.getTime() + 12096e5 > n.getTime()) {
                    R.information("consumptionTips is in 14day", l.getTime(), n.getTime());
                    break
                }
                if (0 === a && 0 === r) {
                    for (s = 0; s < t.length; ++s) if (o === t[s]) {
                        i.surplusTime = 0, 9 === t[s] ? i.taskTye = 0 : 20 !== t[s] && 21 !== t[s] && 22 !== t[s] || (i.taskTye = 1);
                        break
                    }
                } else {
                    for (s = 0; s < t.length && !(o < t[s]); ++s) ;
                    9 === t[s] ? i.taskTye = 0 : 20 !== t[s] && 21 !== t[s] && 22 !== t[s] || (i.taskTye = 1), i.surplusTime = 1e3 * (60 - r + 60 * (60 - a - 1) + 60 * (t[s] - o - 1) * 60)
                }
            } while (0);
            return i
        }

        attachShowConsumptionTips() {
            let e = "", t = 0;
            if (e = "task_cnt_tag=" + (t = this.getCompletedTaskInfo().totalNumber), I.XLStatNS.trackEvent("business", "downloaded_check_cnt", "", 0, 0, 0, 0, e), R.information("trackEvent", "business", "downloaded_check_cnt", e), e = "task_cnt_tag=" + (t = this.getDownloadingTaskInfo().totalNumber), I.XLStatNS.trackEvent("business", "downloading_check_cnt", "", 0, 0, 0, 0, e), R.information("trackEvent", "business", "downloading_check_cnt", e), "AutoRun" !== D.default.getStartArgs()) return;
            let i = r.ConfigNS.getValue("Consumption", "ShowMainWindowTime", 0),
                o = r.ConfigNS.getValue("Consumption", "HideMainWindowTime", 0),
                a = r.ConfigNS.getValue("Consumption", "ShowTipsTime", 0);
            do {
                if ((i > 0 || o > 0) && Math.abs(i - o) >= 2592e5) {
                    let e = {surplusTime: -1, taskTye: 1};
                    if ((e = this.calculateSurplusTime(a)).surplusTime < 0) break;
                    R.information("consumptionTips calculateSurplusTime", e.surplusTime, e.taskTye), setTimeout(() => n(this, void 0, void 0, function* () {
                        yield this.onConsumptionNotifiy(e.taskTye)
                    }), e.surplusTime)
                }
            } while (0)
        }

        attachConfigInitFinished() {
            r.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigInitFinished, () => {
                this.onConfigInitFinished(), setTimeout(() => {
                    this.attachShowConsumptionTips()
                }, 3e4)
            })
        }

        onConfigInitFinished() {
            this.attachLoadStorageTaskFinish()
        }

        attachLoadStorageTaskFinish() {
            h.DownloadKernelManager.attachListener(s.NodeEventMesssageNS.eventDownloadKernelInitEnd, () => {
                this.autoStartUnfinishTask(), setTimeout(() => {
                    this.autoDeleteNonExistTasks().catch()
                }, 1e4)
            })
        }

        autoDeleteNonExistTasks() {
            return n(this, void 0, void 0, function* () {
                if (r.ConfigNS.getValue("ConfigNormalSession", "ConfigNormal_AutoDeleteNotExistFile", !1)) {
                    let e = yield l.TaskOperatorNs.removeNonExistingTask();
                    if (e > 0) {
                        let t = "已自动删除" + e + "个文件不存在的任务";
                        R.information(t), B.showNotify(C.ToastNotifyManagerNS.notifyIdAutoDeleteNonExistTasks, b.ToastNotifyItemType.GreenNotify, t, 3e3)
                    }
                }
            })
        }

        autoStartUnfinishTask() {
            let e = r.ConfigNS.getValue("ConfigNormalSession", "ConfigNormal_MaxRunningTaskCount", 5);
            k.DownloadDispatchNS.setStartTaskCount(e), r.ConfigNS.getValue("ConfigNormalSession", "ConfigNormal_AutoStartUnFinishedTask", !1) && l.TaskOperatorNs.startAll()
        }

        statJsSdkEvent(e, t, i) {
            do {
                if (null === e) break;
                if (e.getTaskAttribute(c.DownloadKernel.TaskAttribute.GroupTaskId) > 0) break;
                if (e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskType) !== c.DownloadKernel.TaskType.Group) break;
                if ("ThunderUnion" !== e.getTaskAttribute(c.DownloadKernel.TaskAttribute.Origin)) break;
                let n = e.getId();
                const o = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.FileSize);
                let a = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskName), r = encodeURIComponent(a),
                    s = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.Gcid), l = e.getExtraObject();
                if (null === l || void 0 === l) break;
                let d = `taskid=${n},filesize=${o},filename=${r},gcid=${s},filenum=${l.getSubTaskCount()}`;
                if ("js_grouptask_download_success" === t) {
                    if (null !== o && void 0 !== o && o >= 1048576) {
                        let t = 0, i = 0, n = 0, o = 0, a = e.getTaskChannelInfo();
                        if (null !== a && void 0 !== a) {
                            void 0 !== a.originSize && (t = this.getSizeFormat(a.originSize)), null !== a.p2sSize && void 0 !== a.p2sSize && (i = this.getSizeFormat(a.p2sSize)), null !== a.p2pSize && void 0 !== a.p2pSize && (n = this.getSizeFormat(a.p2pSize));
                            let e = 0;
                            null !== a.offlineSize && void 0 !== a.offlineSize && (e = a.offlineSize), null !== a.dcdnSize && void 0 !== a.dcdnSize && (e += a.dcdnSize), d = `${d},ysdzh=${t},jxjs=${i},P2P=${n},hyjs=${o = this.getSizeFormat(e)}`
                        }
                    }
                } else if ("js_grouptask_download_fail" === t) {
                    let t = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.ErrorCode);
                    d = 0 === t ? `${d},errorcode=${l.getErrorCodes().join(";")}` : `${d},errorcode=${t}`
                }
                void 0 !== i && (d = `${d},${i}`);
                let u = "core_operate";
                R.information("trackEvent", u, t, d), I.XLStatNS.trackEvent(u, t, "", 0, 0, 0, 0, d)
            } while (0)
        }

        getSizeFormat(e) {
            let t = 0;
            do {
                if (void 0 === e || null === e || e <= 0) break;
                t = Number((e / 1048576).toFixed(2))
            } while (0);
            return t
        }

        attachTaskCreated() {
            L.attachTaskEvent(c.DownloadKernel.TaskEventType.TaskCreated, (...e) => n(this, void 0, void 0, function* () {
                do {
                    if (!e) break;
                    if (e[0] !== c.DownloadKernel.TaskEventType.TaskCreated) break;
                    let t = e[1];
                    if (!t) break;
                    let i = yield N.client.callServerFunction("GetTpPeerId");
                    for (let e of t) {
                        let t = "location=", n = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.CategoryId);
                        if (-1 !== n) if (K.isPrivateCategory(n)) t += "private"; else {
                            let e = K.getCategoryFromId(n);
                            e && (t += e.getName())
                        } else {
                            let i = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.SavePath),
                                n = yield m.asyncRemoteCall.getApp(), o = yield n.getPath("desktop"),
                                a = yield n.getPath("documents"),
                                s = r.ConfigNS.getValue("TaskDefaultSettings", "InitPath", "");
                            "\\" === i[i.length - 1] && (i = i.slice(0, i.length - 1)), "\\" === s[s.length - 1] && (s = s.slice(0, s.length - 1)), i.toUpperCase() === o.toUpperCase() ? t += "desk" : i.toUpperCase() === a.toUpperCase() ? t += "my_file" : i.toUpperCase() === s.toUpperCase() ? t += "xl_download" : t += "other"
                        }
                        let o = e.getExtraObject();
                        if (o) {
                            let e = o.getUserData(w.TaskUserDataGUID.guidBirdKey, "birdKey");
                            if (e) {
                                let i = e.match(/[Xx]([0-9a-zA-Z])+/g);
                                i && i.length > 0 && (t += `,pass_word=${i[0]}`)
                            }
                            let i = o.getUserData(w.TaskUserDataGUID.guidSearchFrom, "searchFrom");
                            i && (t += `,search_from=${i}`)
                        }
                        let a = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.RefUrl) || "";
                        t += `,cpeerid=${i},referer=${encodeURIComponent(a)}`, d.statCoreEvent(e, "createtask", t).catch(), this.statJsSdkEvent(e, "js_grouptask_create", t)
                    }
                } while (0)
            }))
        }

        attachTaskStatusChanged() {
            L.attachTaskEvent(c.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== c.DownloadKernel.TaskEventType.StatusChanged) break;
                    let t = e[1];
                    if (!t) break;
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        let n = i.getTaskStatus();
                        if (i.getTaskAttribute(c.DownloadKernel.TaskAttribute.GroupTaskId) > 0) {
                            n === c.DownloadKernel.TaskStatus.Succeeded && this.checkOpenOnFinish(i).catch();
                            continue
                        }
                        let o = i.getTaskAttribute(c.DownloadKernel.TaskAttribute.Background);
                        if (n === c.DownloadKernel.TaskStatus.Succeeded) {
                            let e = `task_stop_type=success,errorcode=0,gcid=${i.getTaskAttribute(c.DownloadKernel.TaskAttribute.Gcid)},is_retry=${u.DownloadJammedNS.isJammedOnce(i.getId()) ? 1 : 0}`;
                            d.statCoreEvent(i, "download_task_result", e).catch();
                            let t = i.getTaskAttribute(c.DownloadKernel.TaskAttribute.CreateTime);
                            e = `downloadtime=${(i.getTaskAttribute(c.DownloadKernel.TaskAttribute.CompletionTime) - t) / 1e3}`, this.statJsSdkEvent(i, "js_grouptask_download_success", e), o || this.onTaskFinished(i).catch()
                        } else if (n === c.DownloadKernel.TaskStatus.Failed) {
                            let e = i.getTaskAttribute(c.DownloadKernel.TaskAttribute.Gcid),
                                t = `task_stop_type=fail,errorcode=${i.getTaskAttribute(c.DownloadKernel.TaskAttribute.ErrorCode)},gcid=${e},is_retry=0`;
                            d.statCoreEvent(i, "download_task_result", t).catch(), this.statJsSdkEvent(i, "js_grouptask_download_fail"), o || this.onTaskFailed(i).catch()
                        }
                    }
                } while (0)
            }), L.attachTaskEvent(c.DownloadKernel.TaskEventType.TaskDestroying, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== c.DownloadKernel.TaskEventType.TaskDestroying) break;
                    let t = e[1];
                    if (!t) break;
                    let i = e[2];
                    for (let e = 0; e < t.length; ++e) {
                        let n = t[e];
                        if (n) {
                            if (n.getTaskAttribute(c.DownloadKernel.TaskAttribute.Background)) break;
                            n.getTaskAttribute(c.DownloadKernel.TaskAttribute.GroupTaskId) > 0 || this.onTaskDestroy(n, i).catch()
                        }
                    }
                } while (0)
            }), L.attachTaskEvent(c.DownloadKernel.TaskEventType.TaskMovedEnd, (...e) => {
                do {
                    if (!e) break;
                    if (e[0] !== c.DownloadKernel.TaskEventType.TaskMovedEnd) break;
                    let t = e[1];
                    if (!t) break;
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (i) {
                            if (i.getTaskAttribute(c.DownloadKernel.TaskAttribute.Background)) break;
                            i.getTaskAttribute(c.DownloadKernel.TaskAttribute.GroupTaskId) > 0 || this.onTaskMoveEnd(i).catch()
                        }
                    }
                } while (0)
            })
        }

        getTaskUrl(e) {
            let t = "", i = e.getType();
            return i === c.DownloadKernel.TaskType.Bt ? t = e.getExtraObject().getSeedFilePath() : i !== c.DownloadKernel.TaskType.Emule && i !== c.DownloadKernel.TaskType.P2sp || (t = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskUrl)), t
        }

        getDownloadFileReportedData(e) {
            let t = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.FileSize),
                i = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.Cid), n = this.getTaskUrl(e), o = 0, a = 0,
                r = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.DownloadSize),
                s = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.DownloadingPeriod),
                l = e.getTaskChannelInfo().originSize;
            R.information("getDownloadFileReportedData fileSize=", t, ";cid=", i, ";url=", n, ";recvValidSize=", r, ";period=", s, ";originalsize=", l), null !== t && void 0 !== t && null !== s && void 0 !== s && null !== l && void 0 !== l && 0 !== l && null !== r && void 0 !== r && 0 !== r ? a = Math.floor((t / l - t / r) * s) : o = 1;
            let d = JSON.stringify({
                type: "dlfile_report",
                data: {dlFileSize: t, cid: i, url: n, deadLinks: o, saveTime: a}
            });
            return R.information("getDownloadFileReportedData data=", d), d
        }

        onTaskFinished(e) {
            return n(this, void 0, void 0, function* () {
                let t = r.ConfigNS.getValue("BossKey", "BossKeyState", !1);
                const i = r.ConfigNS.getValue("ConfigMsg", "ConfigMsg_Finish", !0),
                    n = yield m.asyncRemoteCall.getCurrentWindow(), o = n.isMinimized(), a = n.isVisible(),
                    s = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskName),
                    d = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.FileSize), u = e.getTaskBaseInfo(),
                    h = u.taskType === c.DownloadKernel.TaskType.Group, f = e.getIsPrivate();
                let v = !1;
                const y = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.CategoryId);
                let T = K.getCategoryFromId(y);
                T && T.getName() === P.CategoryManager.panCategoryName && (v = !0);
                const k = null !== (yield(yield m.asyncRemoteCall.getBrowserWindow()).getFocusedWindow());
                if (S.LoginHelperNS.loginHelper.channel(this.getDownloadFileReportedData(e)), t || this.playTaskFinishedSound().catch(), this.openFinishedTask(e).catch(), h) {
                    let t = e.getExtraObject().getUserData(w.TaskUserDataGUID.guidDownloadCompleteInstall, "isImmediatelyInstall");
                    null !== t && void 0 !== t && "1" === t && l.TaskOperatorNs.executeInstallFile(e).catch(), this.createShortcut(e).catch()
                }
                if (!t && i && (o || !a || !k) && s && !f) {
                    if (h && d < 10485760) return;
                    R.information("DownloadComplete", F), F.enQueue({
                        callback: () => {
                            R.information("trackEvent", "download_leftpanel", "dl_finished_tips_show", "panel_type=mypc"), I.XLStatNS.trackEvent("download_leftpanel", "dl_finished_tips_show", "", 0, 0, 0, 0, "panel_type=mypc"), g.NotificationNS.notify({
                                type: p.Notification.TipsType.DownloadComplete,
                                data: {exData: {isPanDownload: v}, taskBase: u},
                                width: 400,
                                height: 166
                            }).catch()
                        }, name: "download", priority: U
                    }), (yield g.NotificationNS.getCurrentWindow()) ? F.getCurrentProperty() < U && (yield g.NotificationNS.close()) : F.deQueue()
                }
            })
        }

        onTaskDestroy(e, t) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!t) break;
                    if (e.getTaskBaseInfo().taskType !== c.DownloadKernel.TaskType.Group) break;
                    if (e.getTaskStatus() !== c.DownloadKernel.TaskStatus.Succeeded) break;
                    let i = e.getExtraObject().getUserData(w.TaskUserDataGUID.guidCreateShortcut, "createShortcut");
                    if (!i || i.length <= 0) break;
                    let n = null;
                    try {
                        n = JSON.parse(i)
                    } catch (e) {
                        R.warning(e)
                    }
                    if (!n || !n.name || !n.targetFile) {
                        R.information("invalid createShortcut", n);
                        break
                    }
                    let r = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskId),
                        s = x.TaskCtrlOperatorNS.getSavePathByFileName(r, n.targetFile);
                    if (!(yield a.FileSystemAWNS.existsAW(s))) {
                        R.warning("targetFile not exist!", s);
                        break
                    }
                    let l = n.name.replace(/[*?/\\:|<>\"]/g, "_"), d = yield m.asyncRemoteCall.getApp(),
                        u = o.join(yield d.getPath("desktop"), `${l}.lnk`);
                    (yield a.FileSystemAWNS.existsAW(u)) && (yield a.FileSystemAWNS.unlinkAW(u))
                } while (0)
            })
        }

        onTaskMoveEnd(e) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (e.getTaskBaseInfo().taskType !== c.DownloadKernel.TaskType.Group) break;
                    if (e.getTaskStatus() !== c.DownloadKernel.TaskStatus.Succeeded) break;
                    let t = e.getExtraObject().getUserData(w.TaskUserDataGUID.guidCreateShortcut, "createShortcut");
                    if (!t || t.length <= 0) break;
                    let i = null;
                    try {
                        i = JSON.parse(t)
                    } catch (e) {
                        R.warning(e)
                    }
                    if (!i || !i.name || !i.targetFile) {
                        R.information("invalid createShortcut", i);
                        break
                    }
                    let n = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskId),
                        r = x.TaskCtrlOperatorNS.getSavePathByFileName(n, i.targetFile);
                    if (!(yield a.FileSystemAWNS.existsAW(r))) {
                        R.warning("targetFile not exist!", r);
                        break
                    }
                    let s = i.name.replace(/[*?/\\:|<>\"]/g, "_"), l = yield m.asyncRemoteCall.getApp(),
                        d = o.join(yield l.getPath("desktop"), `${s}.lnk`);
                    (yield a.FileSystemAWNS.existsAW(d)) && (yield a.FileSystemAWNS.unlinkAW(d), R.information("createShortcut", i, "lnkPath", d), yield new Promise(e => {
                        M.createShortcut(d, r, i.runParams || "", r, t => {
                            R.information("createShortcut result", t), e(t)
                        })
                    }))
                } while (0)
            })
        }

        getCompletedTaskInfo() {
            let e = [], t = 0, i = V.getCategoryViewFromId(c.DownloadKernel.CategroyViewID.Completed).getTasks(),
                n = new Date;
            for (let [, o]of i) if (null !== o && o.getTaskStatus() === c.DownloadKernel.TaskStatus.Succeeded) {
                let i = o.getTaskAttribute(c.DownloadKernel.TaskAttribute.CompletionTime),
                    a = o.getTaskAttribute(c.DownloadKernel.TaskAttribute.UserRead);
                if (n.getTime() - i <= 2592e6 && 0 === a) {
                    let i = o.getTaskBaseInfo().taskName;
                    t < 3 && e.push({taskName: i, percent: ""}), t += 1
                }
            }
            return {taskList: e, totalNumber: t}
        }

        getDownloadingTaskInfo() {
            let e = [], t = 0, i = V.getCategoryViewFromId(c.DownloadKernel.CategroyViewID.Downloading).getTasks();
            for (let [, n]of i) {
                if (null !== n && n.getTaskStatus() === c.DownloadKernel.TaskStatus.Stopped) {
                    const t = n.getTaskBaseInfo();
                    let i = t.taskName, o = 0;
                    0 !== t.fileSize && (o = t.downloadSize / t.fileSize), o >= 1 && (o = .9999);
                    let a = (100 * o).toFixed(0) + "%";
                    "100%" === a && (a = "99%"), e.length < 3 && e.push({taskName: i, percent: a})
                }
                t += 1
            }
            return {taskList: e, totalNumber: t}
        }

        onConsumptionNotifiy(e) {
            return n(this, void 0, void 0, function* () {
                let t = {taskList: [], totalNumber: 0}, i = 4, o = "downloaded_notcheck_popup_show", a = "task_cnt=";
                0 === e ? (t = this.getDownloadingTaskInfo(), o = "not_downloaded_popup_show") : 1 === e ? (t = this.getCompletedTaskInfo(), i = 3) : (t = this.getCompletedTaskInfo(), i = 3, 0 === t.totalNumber && (i = 4, o = "not_downloaded_popup_show", t = this.getDownloadingTaskInfo()));
                do {
                    if (0 === t.totalNumber) break;
                    a += t.totalNumber;
                    let e = new Date;
                    F.enQueue({
                        callback: () => {
                            R.information("trackEvent", "business", o, a), I.XLStatNS.trackEvent("business", o, "", 0, 0, 0, 0, a);
                            let s = "亲,";
                            S.LoginHelperNS.loginHelper.getAllUserInfo(o => n(this, void 0, void 0, function* () {
                                (yield N.client.callServerFunction("IsLogined")) && (s = o.nickName), R.information("consumpiton consumptionMsgType,taskInfo", i, t), g.NotificationNS.notify({
                                    type: p.Notification.TipsType.ConsumptionTips,
                                    data: {msgType: i, userName: s, fileCountNumber: t.totalNumber, exData: t.taskList},
                                    width: 400,
                                    height: 272
                                }).catch(), M.IsInFullScreen() ? this.attachShowConsumptionTips() : r.ConfigNS.setValue("Consumption", "ShowTipsTime", e.getTime())
                            }))
                        }, name: "download", priority: U
                    }), (yield g.NotificationNS.getCurrentWindow()) ? F.getCurrentProperty() < U && (yield g.NotificationNS.close()) : F.deQueue()
                } while (0)
            })
        }

        showAuthorizationDlg(e) {
            do {
                if (e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskType) !== c.DownloadKernel.TaskType.P2sp) break;
                let t = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskUrl), i = new URL(t),
                    o = i.protocol + "//" + i.host;
                E.MessageBox.custom("http-auth-login", {site: o}, {
                    width: 450,
                    height: 240
                }).then(t => n(this, void 0, void 0, function* () {
                    if (t.action === O.MessageBoxNS.Action.OK) {
                        let i = t.args.username, n = t.args.password || "";
                        if (i) {
                            let t = "Authorization", o = "Basic " + window.btoa(`${encodeURIComponent(i)}:${n}`);
                            e.getExtraObject().setUserData(w.TaskUserDataGUID.guidHttpHeaderField, t, o), R.information("http auth", t, o);
                            let a = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskId);
                            yield k.DownloadDispatchNS.startTask(a)
                        }
                    }
                })).catch()
            } while (0)
        }

        onTaskFailed(e) {
            return n(this, void 0, void 0, function* () {
                let t = r.ConfigNS.getValue("BossKey", "BossKeyState", !1);
                const i = r.ConfigNS.getValue("ConfigMsg", "ConfigMsg_FailSuggest", !0),
                    n = yield m.asyncRemoteCall.getCurrentWindow(), o = n.isMinimized(), a = n.isVisible(),
                    s = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskName),
                    l = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.FileSize), d = e.getTaskBaseInfo(),
                    u = d.taskType === c.DownloadKernel.TaskType.Group, h = e.getIsPrivate(),
                    f = null !== (yield(yield m.asyncRemoteCall.getBrowserWindow()).getFocusedWindow());
                401 === e.getTaskAttribute(c.DownloadKernel.TaskAttribute.ErrorCode) && this.showAuthorizationDlg(e);
                let v = !1;
                const y = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.CategoryId);
                let T = K.getCategoryFromId(y);
                if (T && T.getName() === P.CategoryManager.panCategoryName && (v = !0), !t && i && (o || !a || !f) && s && !h) {
                    if (u && l < 10485760) return;
                    F.enQueue({
                        callback: () => {
                            R.information("trackEvent", "download_leftpanel", "dl_fail_tips_show", "panel_type=mypc"), I.XLStatNS.trackEvent("download_leftpanel", "dl_fail_tips_show", "", 0, 0, 0, 0, "panel_type=mypc"), g.NotificationNS.notify({
                                type: p.Notification.TipsType.DownloadFail,
                                data: {exData: {isPanDownload: v}, taskBase: d},
                                width: 400,
                                height: 166
                            }).catch()
                        }, name: "download", priority: U
                    }), (yield g.NotificationNS.getCurrentWindow()) ? F.getCurrentProperty() < U && (yield g.NotificationNS.close()) : F.deQueue()
                }
            })
        }

        playTaskFinishedSound() {
            return n(this, void 0, void 0, function* () {
                if (r.ConfigNS.getValue("ConfigMsg", "ConfigMsg_PlayWaveWhileFinish", !0)) {
                    let e = o.join(__rootDir, "../../download-complete.wav"),
                        t = r.ConfigNS.getValue("ConfigMsg", "ConfigMsg_WavePath", e);
                    (yield a.FileSystemAWNS.existsAW(t)) ? yield new Audio(t).play() : (yield a.FileSystemAWNS.existsAW(e)) && (yield new Audio(e).play())
                }
            })
        }

        checkOpenOnFinish(e) {
            return n(this, void 0, void 0, function* () {
                let t = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskName);
                if (".torrent" === o.extname(t)) {
                    let t = r.ConfigNS.getValue("BtGenericSettings", "AutoBTNewTask", !0);
                    if (1 === e.getTaskAttribute(c.DownloadKernel.TaskAttribute.OpenOnComplete) || t) {
                        let t = e.getTaskBaseInfo();
                        yield l.TaskOperatorNs.openTaskItem(t)
                    }
                } else if (1 === e.getTaskAttribute(c.DownloadKernel.TaskAttribute.OpenOnComplete)) {
                    let t = e.getTaskBaseInfo();
                    yield l.TaskOperatorNs.openTaskItem(t)
                }
            })
        }

        openFinishedTask(e) {
            return n(this, void 0, void 0, function* () {
                if (r.ConfigNS.getValue("TaskDefaultSettings", "OpenFile", !1)) {
                    let t = e.getTaskBaseInfo();
                    yield l.TaskOperatorNs.openTaskItem(t)
                } else this.checkOpenOnFinish(e).catch()
            })
        }

        createShortcut(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                do {
                    let i = e.getExtraObject().getUserData(w.TaskUserDataGUID.guidCreateShortcut, "createShortcut");
                    if (!i || i.length <= 0) break;
                    let n = null;
                    try {
                        n = JSON.parse(i)
                    } catch (e) {
                        R.warning(e)
                    }
                    if (!n || !n.name || !n.targetFile) {
                        R.information("invalid createShortcut", n);
                        break
                    }
                    let r = e.getTaskAttribute(c.DownloadKernel.TaskAttribute.TaskId),
                        s = x.TaskCtrlOperatorNS.getSavePathByFileName(r, n.targetFile);
                    if (!(yield a.FileSystemAWNS.existsAW(s))) {
                        R.warning("targetFile not exist!", s);
                        break
                    }
                    let l = n.name.replace(/[*?/\\:|<>\"]/g, "_"), d = yield m.asyncRemoteCall.getApp(),
                        u = o.join(yield d.getPath("desktop"), `${l}.lnk`);
                    (yield a.FileSystemAWNS.existsAW(u)) && (yield a.FileSystemAWNS.unlinkAW(u)), R.information("createShortcut", n, "lnkPath", u), t = yield new Promise(e => {
                        M.createShortcut(u, s, n.runParams || "", s, t => {
                            R.information("createShortcut result", t), e(t)
                        })
                    })
                } while (0);
                return t
            })
        }
    };
    !function (e) {
        e.init = function () {
            G.init()
        }
    }(t.TaskHelperNS || (t.TaskHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(55), a = i(2), r = i(7), s = i(0), l = i(9), d = i(13), u = i(10), c = i(77), h = i(3), f = i(33),
        p = i(543), g = i(109), m = i(34), v = i(48), y = i(56), T = i(53), w = i(90), k = i(408), C = i(19), b = i(35),
        I = i(407), S = i(32), _ = i(700), D = i(42), A = i(25), N = i(8), x = i(702), E = i(31),
        O = s.default.getLogger("ConfigHandler"), P = r.default(a.join(__rootDir, "../bin/ThunderHelper.node")),
        M = y.ToastNotifyManagerNS.getToastNotifyManger();
    let F = "";
    const L = new class {
        init() {
            this.attachConfigInitFinished(), x.default.init(), u.ConfigNS.attachListener(d.NodeEventMesssageNS.eventConfigValueChanged, (e, t, i, n) => {
                switch (e) {
                    case"ConfigNormalSession":
                        this.onConfigNormalSessionChanged(t, i, n);
                        break;
                    case"TaskDefaultSettings":
                        this.onTaskDefaultSettingsChanged(t, i, n);
                        break;
                    case"ConfigNet":
                        this.onConfigNetChanged(t, i, n);
                        break;
                    case"ConfigMsg":
                        this.onConfigMsgChanged(t, i, n);
                        break;
                    case"Monitor":
                        this.onMonitorChanged(t, i, n);
                        break;
                    case"Proxy":
                        this.onProxyChanged(t, i, n);
                        break;
                    case"BtGenericSettings":
                        this.onBtGenericSettingsChanged(t, i, n);
                        break;
                    case"ConfigNoLimitDownload":
                        this.onConfigNoLimitDownloadChanged(t, i, n);
                        break;
                    case"Others":
                        this.onOthersChanged(t, i, n);
                        break;
                    case"IdleDownload":
                        this.onIdleDownloadChanged(t, i, n);
                        break;
                    case"EMuleGenericSettings":
                        this.onEMuleGenericSettingsChanged(t, i, n);
                        break;
                    case"MagnetGenericSettings":
                        this.onMagnetGenericSettingsChanged(t, i, n);
                        break;
                    case"BossKey":
                        this.onBossKeyChanged(t, i, n);
                        break;
                    case"DiskCache":
                        this.onDiskCacheChanged(t, i, n);
                        break;
                    case"Motitor":
                        this.onMotitorChanged(t, i, n);
                        break;
                    case"ProxySetting":
                        this.onProxySettingChanged(t, i, n);
                        break;
                    case"ThunderPanPlugin":
                        this.onThunderPanPluginChanged(t, i, n).catch()
                }
            }), c.BHOConfigNS.attachListener(d.NodeEventMesssageNS.eventBHOConfigValueChanged, (e, t, i, n) => {
                switch (e) {
                    case"Monitor":
                        this.onBHOConfigMonitorSessionChanged(t, i, n);
                        break;
                    case"EMuleGenericSettings":
                        "EMuleWatchLink" === t && this.handleWatchEmuleLink(i, n);
                        break;
                    case"MagnetGenericSettings":
                        "MagnetWatchLink" === t && this.handleWatchMagnetLink(i, n)
                }
            })
        }

        attachConfigInitFinished() {
            u.ConfigNS.attachListener(d.NodeEventMesssageNS.eventConfigInitFinished, () => {
                this.onConfigInitFinished().catch()
            })
        }

        updateVodCachePath() {
            return n(this, void 0, void 0, function* () {
                let e = "";
                (e = u.ConfigNS.getValue("ThunderPanPlugin", "SetVODCachePath", !0) ? yield u.ConfigNS.getNetDiscVODCachePath() : "") !== F && (F = e, O.information("updateNetDiscVODCachePath", e), S.ThunderKernel.updateNetDiscVODCachePath(e))
            })
        }

        onConfigInitFinished() {
            return n(this, void 0, void 0, function* () {
                this.updateVodCachePath().catch();
                let e = u.ConfigNS.getValue("DiskCache", "DiskCacheSelect", 256);
                f.DownloadKernelManager.setCacheSize(e);
                let t = u.ConfigNS.getValue("ConfigNormalSession", "ConfigNormal_MaxRunningTaskCount", 5);
                if (v.DownloadDispatchNS.setStartTaskCount(t), u.ConfigNS.getValue("ConfigNoLimitDownload", "TaskCountAutoAdd", !1)) {
                    let e = u.ConfigNS.getValue("ConfigNoLimitDownload", "TaskCountAutoAddRate", 100);
                    e = Number(e), !isNaN(e) && e > 0 && v.DownloadDispatchNS.setAutoAddTask(!0, e)
                }
                u.ConfigNS.getValue("ConfigNormalSession", "ConfigNormal_AutoSlowTask2Tail", !1) ? (this.handleAutoSlowTask2Tail(void 0, !0), l.XLStatNS.trackEvent("core_event", "setting_check", "", 0, 0, 0, 0, "auto_move2last=1")) : l.XLStatNS.trackEvent("core_event", "setting_check", "", 0, 0, 0, 0, "auto_move2last=0"), f.DownloadKernelManager.attachListener(d.NodeEventMesssageNS.eventDownloadKernelInitEnd, () => {
                    let e = u.ConfigNS.getValue("ConfigNet", "ConfigNet_Type", "1");
                    if (this.handleDownloadMode(void 0, e), u.ConfigNS.getValue("ConfigNoLimitDownload", "OpenNoLimitDownload", !1)) {
                        let e = u.ConfigNS.getValue("ConfigNoLimitDownload", "NoLimitDownloadFileSize", 30);
                        v.DownloadDispatchNS.setFreeFromScheduleOpen(!0, Number(e))
                    }
                    if (u.ConfigNS.getValue("TaskDefaultSettings", "MaxResourceLimit", !1)) {
                        let e = Number(u.ConfigNS.getValue("TaskDefaultSettings", "MaxResourceCount", "500"));
                        e && S.ThunderKernel.setGlobalConnectionLimit(e), l.XLStatNS.trackEvent("setting_center", "set_max_download_resources_cnt", "", 0, 0, 0, 0, `is_set=1,cnt=${e}`)
                    } else {
                        const e = 4294967295;
                        S.ThunderKernel.setGlobalConnectionLimit(e), l.XLStatNS.trackEvent("setting_center", "set_max_download_resources_cnt", "", 0, 0, 0, 0, "is_set=0")
                    }
                }), f.DownloadKernelManager.attachListener(d.NodeEventMesssageNS.eventDownloadSDKRecover, e => {
                    if (0 === e) {
                        let e = u.ConfigNS.getValue("ConfigNet", "ConfigNet_Type", "1");
                        this.handleDownloadMode(void 0, e)
                    }
                });
                let i = u.ConfigNS.getValue("ConfigNormalSession", "ConfigNormal_AutoRun", !0),
                    n = E.ThunderHelper.readRegString(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "Thunder");
                if (i && "" === n ? u.ConfigNS.setValue("ConfigNormalSession", "ConfigNormal_AutoRun", 0) : i || "" === n || u.ConfigNS.setValue("ConfigNormalSession", "ConfigNormal_AutoRun", 1), u.ConfigNS.getValue("ConfigNet", "ConfigNet_IdleDownload", !1) && k.ScheduleTaskNS.startFreeDownLoad(), u.ConfigNS.getValue("BtGenericSettings", "AssocTorrent", !0) && p.FileAssociationNS.checkAndRegisterTorrentFile(), 0 === u.ConfigNS.getValue("GenericSettings", "CheckCpu", 0)) {
                    u.ConfigNS.setValue("GenericSettings", "CheckCpu", 1);
                    let e = P.getCpuProcessors();
                    P.getCpuFrequency(t => {
                        let i = "0";
                        i = 1 === e ? "0" : 2 === e || 3 === e ? t < 3500 ? "0" : "1" : 4 === e && t < 3e3 ? "0" : "1", u.ConfigNS.setValue("GenericSettings", "AnimationLevel", i);
                        let n = "cpu_processors=" + e.toString();
                        n += ",cpu_frequency=", n += t.toString(), l.XLStatNS.trackEvent("xdas_client_pro", "cpu_info", "", 0, 0, 0, 0, n)
                    })
                }
                let o = u.ConfigNS.getValue("ProxySetting", "ConfigProxy_Type", "0");
                this.handleProxyTypeChanged(void 0, o), _.BHOConfigHttpServerNS.init().catch(), this.fixBHOFilterSitesForUI(), h.client.attachServerEvent("OnPlayVideo", (e, t) => {
                }), yield A.default.isInitedAw();
                let a = u.ConfigNS.getValue("ConfigNet", "ConfigNet_OpenMirrorImageIncreaseSpeed", !0);
                f.DownloadKernelManager.enableCommonP2sChannel(a);
                let r = u.ConfigNS.getValue("ConfigNet", "ConfigNet_OpenXunleiP2PIncreaseSpeed", !0);
                f.DownloadKernelManager.enableCommonP2pChannel(r)
            })
        }

        isXmpExist() {
            return n(this, void 0, void 0, function* () {
                let e = D.Common.getXmpPath();
                return N.FileSystemAWNS.existsAW(e)
            })
        }

        isXmpLiteExist() {
            return n(this, void 0, void 0, function* () {
                let e = a.join(__rootDir, "../../XMP/XMP.exe");
                return N.FileSystemAWNS.existsAW(e)
            })
        }

        fixBHOFilterSitesForUI() {
            let e = c.BHOConfigNS.getDefaultFilterSitesForUI(), t = e.replace(/\r\n/g, "||");
            t = t.replace(/\n/g, "||");
            let i = c.BHOConfigNS.getValue("Monitor", "FilterSitesForUI", t),
                n = u.ConfigNS.getValue("Monitor", "FilterSitesForUI", e);
            (n = (n = n.replace(/\r\n/g, "||")).replace(/\n/g, "||")) !== i && u.ConfigNS.setValue("Monitor", "FilterSitesForUI", i.replace(/\|\|/g, "\n"))
        }

        onConfigNormalSessionChanged(e, t, i) {
            switch (e) {
                case"ConfigNormal_AutoRun":
                    this.handleAutoRun(t, i);
                    break;
                case"ConfigNormal_AutoStartUnFinishedTask":
                    break;
                case"ConfigNormal_MaxRunningTaskCount":
                    this.handleSetMaxRunningTaskCount(t, i);
                    break;
                case"TaskCountTotalSpeed":
                    break;
                case"ConfigNormal_AutoSlowTask2Tail":
                    this.handleAutoSlowTask2Tail(t, i);
                    break;
                case"ConfigNormal_AutoDeleteNotExistFile":
                    this.handleAutoDeleteNonExistTasks(t, i).catch()
            }
        }

        onTaskDefaultSettingsChanged(e, t, i) {
            switch (e) {
                case"DefaultPath":
                case"UseLastCatalog":
                case"Win7Libraries":
                case"NewTaskStartMode":
                case"OpenFile":
                case"OpenSilenceDownload":
                    break;
                case"AwayModeEnabled":
                    this.handleAwayMode(t, i);
                    break;
                case"NewTaskDlgWithoutMainWnd":
                    this.handleNewTaskDlgWithoutMainWnd(t, i);
                    break;
                case"OrignHostThreads":
                    this.handleSetThreadCount(t, i);
                    break;
                case"MaxResourceLimit":
                    if (i) {
                        let e = Number(u.ConfigNS.getValue("TaskDefaultSettings", "MaxResourceCount", "500"));
                        e && S.ThunderKernel.setGlobalConnectionLimit(e)
                    } else {
                        const e = 4294967295;
                        S.ThunderKernel.setGlobalConnectionLimit(e)
                    }
                    break;
                case"MaxResourceCount":
                    u.ConfigNS.getValue("TaskDefaultSettings", "MaxResourceLimit", !1) && Number(i) && S.ThunderKernel.setGlobalConnectionLimit(Number(i))
            }
        }

        onConfigNetChanged(e, t, i) {
            switch (e) {
                case"ConfigNet_Type":
                    this.handleDownloadMode(t, i);
                    break;
                case"ConfigNet_Custom_DownloadSpeedChk":
                    (i = i) ? v.DownloadDispatchNS.setAutoAddTaskAvailable(!1) : v.DownloadDispatchNS.setAutoAddTaskAvailable(!0);
                    break;
                case"ConfigNet_Custom_MaxDownloadSpeed":
                case"ConfigNet_Custom_MaxUploadSpeed":
                case"ConfigNet_Custom_Time_Switch":
                case"ConfigNet_Custom_Time_Begin_Hour":
                case"ConfigNet_Custom_Time_Begin_Minute":
                case"ConfigNet_Custom_Time_End_Hour":
                case"ConfigNet_Custom_Time_End_Minute":
                    O.information("onConfigNetChanged DownloadMode handleCustomDownloadMode"), g.DownloadModeNS.handleCustomDownloadMode();
                    break;
                case"ConfigNet_OpenMirrorImageIncreaseSpeed":
                    this.handleOpenMirrorImageIncreaseSpeed(t, i);
                    break;
                case"ConfigNet_OpenXunleiP2PIncreaseSpeed":
                    this.handleOpenXunleiP2PIncreaseSpeed(t, i);
                    break;
                case"ConfigNet_IdleDownload":
                    this.handleSetFreedown(t, i)
            }
        }

        onConfigMsgChanged(e, t, i) {
            switch (e) {
                case"ConfigMsg_Finish":
                    break;
                case"ConfigMsg_PlayWaveWhileFinish":
                    this.handlePlayWaveWhileFinish(t, i);
                    break;
                case"ConfigMsg_WavePath":
                case"ConfigMsg_FailSuggest":
                    break;
                case"ConfigMsg_TodayRecommend":
                    O.information("trackEvent", "setting_center", "message_setting", "today_recommend=" + (i ? 1 : 0)), l.XLStatNS.trackEvent("setting_center", "message_setting", "", 0, 0, 0, 0, "today_recommend=" + (i ? 1 : 0))
            }
        }

        onMonitorChanged(e, t, i) {
            switch (e) {
                case"MonitorClipBoard":
                    this.handleMonitorClipBoard(t, i);
                    break;
                case"ShortcutMonitor":
                    break;
                case"WatchTraditionLink":
                    c.BHOConfigNS.setValue("Monitor", "WatchTraditionLink", i ? 1 : 0), c.BHOConfigNS.save().catch();
                    break;
                case"ConfigWatch_Bt":
                    c.BHOConfigNS.setValue("Monitor", "ConfigWatch_Bt", i ? 1 : 0), c.BHOConfigNS.save().catch();
                    break;
                case"ExtendNames":
                    if (t !== i) {
                        let e = i.trim();
                        c.BHOConfigNS.setValue("Monitor", "ExtendNames", e), c.BHOConfigNS.save().catch()
                    }
                    break;
                case"FilterSitesForUI":
                    if (t !== i) {
                        let e = i.trim();
                        e = (e = e.replace(/\r\n/g, "||")).replace(/\n/g, "||"), c.BHOConfigNS.setValue("Monitor", "FilterSitesForUI", e), c.BHOConfigNS.save().then(() => {
                            let e = P.notifyBrowserConfigChanged();
                            O.information("notifyBrowserConfigChanged notify:", e)
                        }).catch()
                    }
            }
        }

        handleSetFreedown(e, t) {
            O.verbose("handleSetMaxRunningTaskCount preValue:", e, "; newValue:", t), t && h.client.callServerFunction("ShowMessageToast", {
                message: "已开启空闲下载",
                type: "success"
            }).catch()
        }

        onMotitorChanged(e, t, i) {
            O.information("onMotitorChanged:", e, t, i);
            do {
                if ("MotitorAll" === e) break;
                let t = w.SettingConfigHelperNS.configBrowserHelper.getWriteIniConfigShowBrowsers();
                c.BHOConfigNS.setValue("Monitor", "ConfigBrowsers", t), w.SettingConfigHelperNS.configBrowserHelper.savaMotiorBrowserToConfig()
            } while (0)
        }

        onProxySettingChanged(e, t, i) {
            switch (O.information("onProxySettingChanged:", e, t, i), e) {
                case"ConfigProxy_Type":
                    this.handleProxyTypeChanged(t, i);
                    break;
                case"ConnectType_Http":
                    this.handleSetProxy(t, i)
            }
        }

        onProxyChanged(e, t, i) {
            switch (e) {
                case"UseProxy":
                    this.handleUseProxy(t, i)
            }
        }

        onBtGenericSettingsChanged(e, t, i) {
            switch (e) {
                case"AutoBTNewTask":
                case"AssocTorrent":
                    break;
                case"ConfigBt_SetPortType":
                    this.handleSetPortType(t, i)
            }
        }

        onConfigNoLimitDownloadChanged(e, t, i) {
            switch (e) {
                case"TaskCountAutoAdd":
                    this.handleAutoAddTask(t, i);
                    break;
                case"TaskCountAutoAddRate":
                    u.ConfigNS.getValue("ConfigNoLimitDownload", "TaskCountAutoAdd", !1) && t !== i && v.DownloadDispatchNS.setAutoAddTask(!0, Number(i));
                    break;
                case"OpenNoLimitDownload":
                    this.handleOpenNoLimitDownload(t, i);
                    break;
                case"NoLimitDownloadFileSize":
                    u.ConfigNS.getValue("ConfigNoLimitDownload", "OpenNoLimitDownload", !1) && t !== i && v.DownloadDispatchNS.setFreeFromScheduleOpen(!0, Number(i))
            }
        }

        onOthersChanged(e, t, i) {
            switch (e) {
                case"AntiDisturb":
                    this.handleAntiDisturb(t, i)
            }
        }

        onIdleDownloadChanged(e, t, i) {
            switch (e) {
                case"isOpen":
                    this.handleOpenIdleDownload(t, i)
            }
        }

        onEMuleGenericSettingsChanged(e, t, i) {
            switch (e) {
                case"EMuleWatchLink":
                    c.BHOConfigNS.setValue("EMuleGenericSettings", "EMuleWatchLink", i ? 1 : 0), c.BHOConfigNS.save().catch()
            }
        }

        onMagnetGenericSettingsChanged(e, t, i) {
            switch (e) {
                case"MagnetWatchLink":
                    c.BHOConfigNS.setValue("MagnetGenericSettings", "MagnetWatchLink", i ? 1 : 0), c.BHOConfigNS.save().catch()
            }
        }

        onBossKeyChanged(e, t, i) {
            switch (e) {
                case"BossKeySwitch":
                    this.handleBossKeySwitch(t, i)
            }
        }

        onDiskCacheChanged(e, t, i) {
            switch (e) {
                case"DiskCacheSelect":
                    this.handleDiskCacheSelect(t, i)
            }
        }

        handleAutoRun(e, t) {
            if (O.verbose("handleAutoRun preValue:", e, "; newValue:", t), t) {
                let e = a.join(__rootDir, "../../Thunder.exe") + " -silent -StartType:AutoRun";
                E.ThunderHelper.writeRegValue(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "Thunder", e, E.ThunderHelper.RegistryDataType.REG_SZ)
            } else E.ThunderHelper.deleteRegValue(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", "Thunder")
        }

        handleSetMaxRunningTaskCount(e, t) {
            O.verbose("handleSetMaxRunningTaskCount preValue:", e, "; newValue:", t), t && v.DownloadDispatchNS.setStartTaskCount(t)
        }

        handleAutoSlowTask2Tail(e, t) {
            v.DownloadDispatchNS.setAutoTail(t)
        }

        handleAutoDeleteNonExistTasks(e, t) {
            return n(this, void 0, void 0, function* () {
                if (t) {
                    let e = yield m.TaskOperatorNs.removeNonExistingTask();
                    if (e > 0) {
                        let t = "已自动删除" + e + "个文件不存在的任务";
                        O.information(t), M.showNotify(y.ToastNotifyManagerNS.notifyIdAutoDeleteNonExistTasks, T.ToastNotifyItemType.GreenNotify, t, 3e3)
                    }
                }
            })
        }

        handleSetThreadCount(e, t) {
            O.verbose("handleSetThreadCount preValue:", e, "; newValue:", t)
        }

        handleDownloadMode(e, t) {
            O.verbose("handleDownloadMode preValue:", e, "; newValue:", t), "1" === String(t) ? (O.information("handleDownloadMode DownloadMode setFullDownloadMode"), g.DownloadModeNS.setFullDownloadMode(), v.DownloadDispatchNS.setAutoAddTaskAvailable(!0)) : "0" === String(t) && (u.ConfigNS.getValue("ConfigNet", "ConfigNet_Custom_DownloadSpeedChk", !0) ? v.DownloadDispatchNS.setAutoAddTaskAvailable(!1) : v.DownloadDispatchNS.setAutoAddTaskAvailable(!0), O.information("handleDownloadMode DownloadMode handleCustomDownloadMode"), g.DownloadModeNS.handleCustomDownloadMode())
        }

        handleOpenMirrorImageIncreaseSpeed(e, t) {
            O.verbose("handleOpenMirrorImageIncreaseSpeed preValue:", e, "; newValue:", t), f.DownloadKernelManager.enableCommonP2sChannel(t)
        }

        handleOpenXunleiP2PIncreaseSpeed(e, t) {
            O.verbose("handleOpenXunleiP2PIncreaseSpeed preValue:", e, "; newValue:", t), f.DownloadKernelManager.enableCommonP2pChannel(t)
        }

        handleMonitorClipBoard(e, t) {
            O.verbose("handleMonitorClipBoard preValue:", e, "; newValue:", t)
        }

        handleUseProxy(e, t) {
            O.verbose("handleUseProxy preValue:", e, "; newValue:", t)
        }

        handleProxyTypeChanged(e, t) {
            O.verbose("handleUseProxy preValue:", e, "; newValue:", t);
            let i = "1", n = "null";
            if ("0" === t) void 0 !== e && S.ThunderKernel.setProxy(I.ProxyNS.ProxyType.None, "", 0, "", ""); else if ("1" === t) this.useIEProxy(), i = "0", n = "IE"; else if ("2" === t) {
                let e = u.ConfigNS.getValue("ProxySetting", "ConnectType_Http", "直接连接");
                "直接连接" !== e ? this.useCostomProxy(e) : S.ThunderKernel.setProxy(I.ProxyNS.ProxyType.None, "", 0, "", ""), i = "0", n = "custom"
            }
            let o = "download_agent=" + i;
            o = o + ",agent=" + n, O.information("trackEvent", "core_event", "download_agent_check", o), l.XLStatNS.trackEvent("core_event", "download_agent_check", "", 0, 0, 0, 0, o)
        }

        handleSetProxy(e, t) {
            this.useCostomProxy(t)
        }

        handlePlayWaveWhileFinish(e, t) {
            O.verbose("handlePlayWaveWhileFinish preValue:", e, "; newValue:", t)
        }

        handleSetPortType(e, t) {
            O.verbose("handleSetPortType preValue:", e, "; newValue:", t)
        }

        handleOpenNoLimitDownload(e, t) {
            O.verbose("handleOpenNoLimitDownload preValue:", e, "; newValue:", t);
            do {
                if (e === t) break;
                if (t) {
                    let e = u.ConfigNS.getValue("ConfigNoLimitDownload", "NoLimitDownloadFileSize", 30);
                    v.DownloadDispatchNS.setFreeFromScheduleOpen(!0, Number(e))
                } else v.DownloadDispatchNS.setFreeFromScheduleOpen(!1)
            } while (0)
        }

        handleAutoAddTask(e, t) {
            do {
                if (e === t) break;
                if (t) {
                    let e = u.ConfigNS.getValue("ConfigNoLimitDownload", "TaskCountAutoAddRate", 100);
                    v.DownloadDispatchNS.setAutoAddTask(!0, Number(e))
                } else v.DownloadDispatchNS.setAutoAddTask(!1)
            } while (0)
        }

        handleAntiDisturb(e, t) {
            O.verbose("handleAntiDisturb preValue:", e, "; newValue:", t)
        }

        handleOpenIdleDownload(e, t) {
            O.verbose("handleOpenIdleDownload preValue:", e, "; newValue:", t)
        }

        handleWatchEmuleLink(e, t) {
            O.verbose("handleWatchEmuleLink preValue:", e, "; newValue:", t);
            let i = '"' + a.join(__rootDir, "../../Thunder.exe") + '" "%1" -StartType:ed2k';
            if (O.information("emuleValue: ", i), 1 === t) E.ThunderHelper.createRegKey(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\ed2k\\Shell\\Open\\command"), E.ThunderHelper.writeRegValue(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\ed2k\\Shell\\Open\\command", "", i, E.ThunderHelper.RegistryDataType.REG_SZ), O.information("writeRegValue HKEY_CURRENT_USER Software\\Classes\\ed2k\\Shell\\Open\\command ", i); else {
                let e = E.ThunderHelper.readRegString(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\ed2k\\Shell\\Open\\command", "");
                O.information("oldEmuleValue: ", e), e === i && (E.ThunderHelper.writeRegValue(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\ed2k\\Shell\\Open\\command", "", "", E.ThunderHelper.RegistryDataType.REG_SZ), O.information("remove HKEY_CURRENT_USER Software\\Classes\\ed2k\\Shell\\Open\\command"))
            }
        }

        handleWatchMagnetLink(e, t) {
            O.verbose("handleWatchMagnetLink preValue:", e, "; newValue:", t);
            let i = '"' + a.join(__rootDir, "../../Thunder.exe") + '" "%1" -StartType:magnet';
            if (O.information("magnetValue: ", i), 1 === t) E.ThunderHelper.createRegKey(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\magnet\\Shell\\Open\\command"), E.ThunderHelper.writeRegValue(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\magnet\\Shell\\Open\\command", "", i, E.ThunderHelper.RegistryDataType.REG_SZ), O.information("writeRegValue HKEY_CURRENT_USER Software\\Classes\\magnet\\Shell\\Open\\command ", i); else {
                let e = E.ThunderHelper.readRegString(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\magnet\\Shell\\Open\\command", "");
                O.information("oldMagnetValue: ", e), e === i && (E.ThunderHelper.writeRegValue(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\magnet\\Shell\\Open\\command", "", "", E.ThunderHelper.RegistryDataType.REG_SZ), O.information("remove HKEY_CURRENT_USER Software\\Classes\\magnet\\Shell\\Open\\command"))
            }
        }

        handleBossKeySwitch(e, t) {
            O.verbose("handleBossKeySwitch preValue:", e, "; newValue:", t)
        }

        handleDiskCacheSelect(e, t) {
            O.verbose("handleBossKeySwitch preValue:", e, "; newValue:", t), f.DownloadKernelManager.setCacheSize(t)
        }

        onBHOConfigMonitorSessionChanged(e, t, i) {
            switch (c.BHOConfigNS.saveSync(), e) {
                case"ConfigBrowsers":
                case"FilterSitesForUI":
                    this.handleBHOConfigMonitorBrowserChanged(t, i)
            }
        }

        handleBHOConfigMonitorBrowserChanged(e, t) {
            P.notifyBrowserConfigChanged(), O.verbose("handleBHOConfigMonitorBrowserChanged preValue:", e, "; newValue:", t)
        }

        handleNewTaskDlgWithoutMainWnd(e, t) {
            e !== t && u.ConfigNS.saveSync()
        }

        setAwayMode(e) {
            let t = a.join(__rootDir, "../../ThunderCmd.exe");
            C.ipcRenderer.send(b.ThunderChannelList.channelRMExecute, "AwayMode", "runas", t, e, "", "SW_HIDE"), C.ipcRenderer.once(b.ThunderChannelList.channelMRExecuteResult, (t, i, n) => {
                if ("AwayMode" === i) if (n > 32) {
                    let t = !0;
                    "-CloseLeaveMode" === e && (t = !1), u.ConfigNS.setValue("TaskDefaultSettings", "AwayModeEnabled", t)
                } else {
                    let t = !1;
                    "-CloseLeaveMode" === e && (t = !0), u.ConfigNS.setValue("TaskDefaultSettings", "AwayModeEnabled", t)
                }
            })
        }

        handleAwayMode(e, t) {
            let i = t, n = o.release(), a = n.indexOf(".", 0), r = n.substring(0, a);
            if (null !== r && void 0 !== r && Number(r) >= 6) {
                let e = E.ThunderHelper.queryRegValue(E.ThunderHelper.RegistryHKey.HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", "AwayModeEnabled");
                O.information("设置离开模式:", i, e), i ? 1 !== e ? this.setAwayMode("-OpenLeaveMode") : u.ConfigNS.setValue("TaskDefaultSettings", "AwayModeEnabled", !0) : 1 === e ? this.setAwayMode("-CloseLeaveMode") : u.ConfigNS.setValue("TaskDefaultSettings", "AwayModeEnabled", !1)
            }
        }

        useCostomProxy(e) {
            if (O.verbose("useCostomProxy proxyName:", e), "直接连接" === e) return void S.ThunderKernel.setProxy(I.ProxyNS.ProxyType.None, "", 0, "", "");
            let t = {}, i = u.ConfigNS.getValue("ProxyList", "proxys", []);
            if (i.length > 0) for (let n = 0; n < i.length; ++n) {
                let o = i[n].split(";");
                if (o[0] === e) {
                    t.name = o[0], t.host = o[1], t.type = o[3], t.userName = o[4], t.passWord = o[5], o[2] ? t.port = Number(o[2]) ? Number(o[2]) : 80 : t.port = 80;
                    break
                }
            }
            if (t.host && t.port) {
                let e = I.ProxyNS.ProxyType.None;
                "HTTP" === t.type ? e = I.ProxyNS.ProxyType.Http : "SOCKS5" === t.type && (e = I.ProxyNS.ProxyType.Sock5), S.ThunderKernel.setProxy(e, t.host, t.port, t.userName, t.passWord)
            }
        }

        useIEProxy() {
            let e = this.getIEProxy();
            if (e.host && e.port) {
                let t = I.ProxyNS.ProxyType.None;
                "HTTP" === e.type ? t = I.ProxyNS.ProxyType.Http : "SOCKS5" === e.type && (t = I.ProxyNS.ProxyType.Sock5), S.ThunderKernel.setProxy(t, e.host, e.port, e.userName, e.passWord)
            }
        }

        getIEProxy() {
            let e = {}, t = P.getIEProxy();
            if (t && "" !== t) {
                let i = t.indexOf("http=");
                if (e.type = "HTTP", i > 0) {
                    let e = (t = t.substr(i, t.length - (i + 5))).indexOf(";");
                    e > 0 && (t = t.substr(0, t.length - e))
                } else if ((i = t.indexOf("socks=")) > 0) {
                    e.type = "SOCKS5";
                    let n = (t = t.substr(i, t.length - (i + 6))).indexOf(",");
                    n > 0 && (t = t.substr(0, t.length - n))
                }
                if (t && t.length > 0 && t.indexOf(":") > 0 && t.indexOf("=") < 0) {
                    i = t.indexOf(":");
                    let n = t.substr(0, i), o = t.substr(i + 1, t.length - (i + 1));
                    n && o && Number(o) && (e.host = n, e.port = Number(o))
                }
            }
            return e
        }

        onThunderPanPluginChanged(e, t, i) {
            return n(this, void 0, void 0, function* () {
                switch (e) {
                    case"StartCloudStopDownload":
                        x.default.onConfigSwitch(t, i);
                        break;
                    case"defaultDownloadPath":
                    case"downloadPaths":
                    case"SetVODCachePath":
                        this.updateVodCachePath().catch();
                        break;
                    case"ShellContextmenu":
                        if (i) {
                            E.ThunderHelper.createRegKey(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\*\\shell\\UploadToThunderPan\\command"), E.ThunderHelper.writeRegValue(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\*\\shell\\UploadToThunderPan", "", "上传到迅雷云盘", E.ThunderHelper.RegistryDataType.REG_SZ);
                            let e = a.join(__rootDir, "../../Thunder.exe"), t = e + ",0";
                            E.ThunderHelper.writeRegValue(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\*\\shell\\UploadToThunderPan", "Icon", t, E.ThunderHelper.RegistryDataType.REG_SZ);
                            let i = e + ' -ShellUpload:"%1" -StartType:Explorer';
                            E.ThunderHelper.writeRegValue(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\*\\shell\\UploadToThunderPan\\command", "", i, E.ThunderHelper.RegistryDataType.REG_SZ)
                        } else E.ThunderHelper.deleteRegKey(E.ThunderHelper.RegistryHKey.HKEY_CURRENT_USER, "Software\\Classes\\*\\shell\\UploadToThunderPan")
                }
            })
        }
    };
    !function (e) {
        e.init = function () {
            L.init()
        }
    }(t.ConfigHandlerNS || (t.ConfigHandlerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(100), a = i(50), r = i(701), s = i(77), l = i(5), d = i(0), u = i(10),
        c = d.default.getLogger("BHOConfigHttpServer");
    !function (e) {
        class t {
            constructor() {
                this.server = null
            }

            getBHOConfig(e, t, i, n) {
                if (t && i && l.isString(t) && l.isString(i)) {
                    let o = s.BHOConfigNS.getValue(t, i, n);
                    e.writeHead(200, {"Content-Type": "application/json"});
                    let a = {code: 0};
                    a.value = o, e.write(JSON.stringify(a))
                } else e.writeHead(400)
            }

            setBHOConfig(e, t, i, n) {
                if (t && i && l.isString(t) && l.isString(i) && !l.isNullOrUndefined(n)) {
                    c.information("setBHOConfig", t, i, n), s.BHOConfigNS.setValue(t, i, n), e.writeHead(200, {"Content-Type": "application/json"});
                    let o = {code: 0};
                    e.write(JSON.stringify(o))
                } else e.writeHead(400)
            }

            setConfig(e, t, i, n) {
                if (t && i && l.isString(t) && l.isString(i) && !l.isNullOrUndefined(n)) {
                    c.information("setConfig", t, i, n), u.ConfigNS.setValue(t, i, n), e.writeHead(200, {"Content-Type": "application/json"});
                    let o = {code: 0};
                    e.write(JSON.stringify(o))
                } else e.writeHead(400)
            }

            onRequest(e, t) {
                let i = "";
                e.on("readable", () => {
                    let t = e.read();
                    t && (i += t)
                }), e.on("end", () => {
                    let n = a.parse(e.url, !0);
                    const o = n.pathname;
                    let s = null;
                    if ("GET" === e.method) s = n.query; else if ("POST" === e.method) try {
                        s = JSON.parse(i)
                    } catch (e) {
                        s = r.parse(i)
                    }
                    c.information("onRequest end", o, s, i), "/getbhoconfig" === o ? this.getBHOConfig(t, s.section, s.key, s.default) : "/setbhoconfig" === o ? this.setBHOConfig(t, s.section, s.key, s.value) : "/setconfig" === o ? this.setConfig(t, s.section, s.key, s.value) : t.writeHead(404), t.end()
                })
            }

            init() {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (this.server) break;
                        this.server = o.createServer(this.onRequest.bind(this)), this.server.listen(5021)
                    } while (0)
                })
            }
        }

        let i = null;
        e.init = function () {
            return n(this, void 0, void 0, function* () {
                i || (i = new t), yield i.init()
            })
        }
    }(t.BHOConfigHttpServerNS || (t.BHOConfigHttpServerNS = {}))
}, function (e, t) {
    e.exports = require("querystring")
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(4), a = i(70), r = i(3), s = i(11).DownloadKernelTaskManager.getTaskManager(), l = i(10), d = i(0),
        u = i(81), c = i(69), h = d.default.getLogger("StartCloudStopDownload");
    var f;
    !function (e) {
        e[e.start = 1] = "start", e[e.pause = 2] = "pause", e[e.autoStart = 3] = "autoStart", e[e.autoPause = 4] = "autoPause"
    }(f || (f = {}));

    class p {
        constructor() {
            this.switch = void 0, this.panFileId = void 0, this.taskStatus = new Map, this.onTaskStatusChangedCookie = void 0, this.cloudRetrieveId = void 0, this.continueTimerHandle = null
        }

        init() {
            [a.XmpEvent.onPreOpen, a.XmpEvent.onOpenSucceeded, a.XmpEvent.onPreStop, a.XmpEvent.onStop].forEach(e => {
                r.client.attachServerEvent(e, (t, ...i) => n(this, void 0, void 0, function* () {
                    do {
                        if (h.information("xmpEvent", e), !(yield u.CommonNS.isYunBo())) break;
                        let t = yield u.CommonNS.callXmp(c.XmpPlayerFunction.getCurrentMediaAttribute, c.XmpMediaAttr.PanFileId);
                        switch (e) {
                            case a.XmpEvent.onPreOpen:
                            case a.XmpEvent.onOpenSucceeded:
                                yield this.onYunBoPreOpen(t);
                                break;
                            case a.XmpEvent.onPreStop:
                            case a.XmpEvent.onStop:
                                yield this.onYunBoPreStop(t)
                        }
                    } while (0)
                }))
            })
        }

        onConfigSwitch(e, t) {
            this.switch = t, this.taskStatus.clear()
        }

        onYunBoPreOpen(e) {
            return n(this, void 0, void 0, function* () {
                h.information("onYunBoPreOpen", e);
                do {
                    if (this.panFileId === e) break;
                    if (!this.isSwitch) break;
                    this.panFileId = e, this.clearTimeOut(this.continueTimerHandle), this.cloudRetrieveId || (yield this.getDownloadingTask(), yield this.stopTasks())
                } while (0)
            })
        }

        onYunBoPreStop(e) {
            return n(this, void 0, void 0, function* () {
                h.information("onYunBoPreStop");
                do {
                    if (this.panFileId !== e) break;
                    if (!this.isSwitch) break;
                    this.panFileId = null, this.clearTimeOut(this.continueTimerHandle), this.continueTimerHandle = setTimeout(() => {
                        this.continueTasks().catch()
                    }, 1e4)
                } while (0)
            })
        }

        onTaskStatusChanged(e, t) {
            return n(this, void 0, void 0, function* () {
                {
                    let e = null;
                    try {
                        e = JSON.parse(t)
                    } catch (e) {
                        h.error(e)
                    }
                    if (null !== e) for (let t in e) {
                        if (!this.taskStatus.has(Number(t))) continue;
                        switch (e[t]) {
                            case o.DownloadKernel.TaskStatus.Started:
                            case o.DownloadKernel.TaskStatus.StartWaiting:
                            case o.DownloadKernel.TaskStatus.StartPending:
                                this.taskStatus.delete(Number(t))
                        }
                    }
                }
            })
        }

        stopTasks() {
            return n(this, void 0, void 0, function* () {
                this.onTaskStatusChangedCookie && (r.client.detachServerEvent("OnTaskStatusChanged", this.onTaskStatusChangedCookie), this.onTaskStatusChangedCookie = void 0), this.taskStatus.forEach((e, t) => n(this, void 0, void 0, function* () {
                    yield r.client.callServerFunction("OperateTask", t, "pause")
                }));
                let e = yield r.client.callRemoteClientFunction("ThunderPanPluginWebview", "IpcAllRetrieveTaskControl", f.autoPause);
                this.cloudRetrieveId = e[0], this.onTaskStatusChangedCookie = r.client.attachServerEvent("OnTaskStatusChanged", this.onTaskStatusChanged.bind(this))
            })
        }

        getDownloadingTask() {
            return n(this, void 0, void 0, function* () {
                (yield r.client.callServerFunction("GetCategoryViewTaskList", "Downloading")).forEach(e => {
                    do {
                        let t = s.getTaskFromTaskId(e);
                        if (!t) break;
                        let i = t.getTaskBaseInfo();
                        if (!i) break;
                        if (i.isBackground) break;
                        switch (t.getTaskStatus()) {
                            case o.DownloadKernel.TaskStatus.PreDownloading:
                            case o.DownloadKernel.TaskStatus.StartWaiting:
                            case o.DownloadKernel.TaskStatus.StartPending:
                            case o.DownloadKernel.TaskStatus.Started:
                                this.taskStatus.set(e, t.getTaskStatus())
                        }
                    } while (0)
                })
            })
        }

        clearTimeOut(e) {
            e && (clearTimeout(e), e = null)
        }

        continueTasks() {
            return n(this, void 0, void 0, function* () {
                this.panFileId ? h.information("continueTasks return") : (this.taskStatus.forEach((e, t) => n(this, void 0, void 0, function* () {
                    e === o.DownloadKernel.TaskStatus.Started && (yield r.client.callServerFunction("OperateTask", t, "continue"))
                })), this.taskStatus.forEach((e, t) => n(this, void 0, void 0, function* () {
                    e !== o.DownloadKernel.TaskStatus.Started && (yield r.client.callServerFunction("OperateTask", t, "continue"))
                })), yield r.client.callRemoteClientFunction("ThunderPanPluginWebview", "IpcAllRetrieveTaskControl", f.autoStart, this.cloudRetrieveId), this.cloudRetrieveId = void 0)
            })
        }

        get isSwitch() {
            return void 0 === this.switch && (this.switch = l.ConfigNS.getValue("ThunderPanPlugin", "StartCloudStopDownload", !0)), this.switch
        }
    }

    t.StartCloudStopDownload = p, t.default = new p
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(420), o = i(159);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(916), i(917), i(918), i(919), i(920), i(921), i(922), i(923), i(924), i(925), i(926), i(927), i(928), i(929), i(930), i(931), i(932), i(933), i(934), i(935), i(936), i(937), i(938), i(939), i(940), i(941), i(942), i(943), i(944), i(945), i(946), i(947);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\app.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(161);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-left\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(421), o = i(163);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(736);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-left\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(423), o = i(165);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-left\\login-area\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(10), a = i(47), r = i(708), s = i(0).default.getLogger("login-prompt"), l = i(17);
    let d = new r.DataHelper;
    var u;
    !function (e) {
        e.promptDataGet = "OnpromptDataGet"
    }(u = t.LoginPromptManagerEventNS || (t.LoginPromptManagerEventNS = {}));

    class c extends a.default {
        constructor() {
            super(...arguments), this.dataList = null
        }

        init() {
            return n(this, void 0, void 0, function* () {
                s.information("init---\x3e"), this.setMaxListeners(1), this.fireEvent(u.promptDataGet, !0), s.information("1 fire prompt data get event"), (yield d.init()) && d.httpLoadDataInfo((e, t) => {
                    e && (this.dataList = t, s.information("datalist len", this.dataList.length), this.fireEvent(u.promptDataGet, !0), s.information("2 fire prompt data get event"), this.run())
                }), s.information("<---init")
            })
        }

        getPromptData() {
            return this.curShowData ? this.curShowData : null
        }

        run() {
            s.information("run---\x3e"), this.clearConfig(), this.startAttach(), this.startRun(), s.information("<---run")
        }

        getShowData(e) {
            for (let t = 0; t < this.dataList.length; t++) {
                const i = this.dataList[t];
                if (!e.includes(String(i.id))) return i
            }
            return null
        }

        updateData() {
            s.information("updateData---\x3e");
            let e = o.ConfigNS.getValue("XLLoginPrompt", "id", "");
            this.curShowData = this.getShowData(e), this.curShowData || (this.clearConfig(), this.curShowData = this.getShowData("")), s.information("cur show data", this.curShowData), e = "" === (e = o.ConfigNS.getValue("XLLoginPrompt", "id", "")) ? String(this.curShowData.id) : e + "," + this.curShowData.id, s.information("showids", e), o.ConfigNS.setValue("XLLoginPrompt", "id", e), this.fireEvent(u.promptDataGet, !0), s.information("3 fire prompt data get event"), s.information("<---updateData")
        }

        hideLoginPromptPanel() {
            s.information("hideLoginPromptPanel---\x3e")
        }

        startAttach() {
            s.information("startAttach---\x3e"), l.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", () => n(this, void 0, void 0, function* () {
                this.startRun()
            })), l.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                this.startRun()
            }), l.NativeCallModule.nativeCall.AttachNativeEvent("OnMainWindowVisibleChange", e => {
                s.information("OnMainWindowVisibleChange returnValue", e), e && this.startRun()
            }), this.startRun(), s.information("<---startAttach")
        }

        startRun() {
            s.information("startRun---\x3e"), l.NativeCallModule.nativeCall.CallNativeFunction("IsLogined", (e, t) => {
                0 === e ? (s.information("logined", t), l.NativeCallModule.nativeCall.CallNativeFunction("IsMainWndShow", e => {
                    s.information("IsMainWndShow returnValue", e), this.updateData()
                })) : this.hideLoginPromptPanel()
            }), s.information("<---startRun")
        }

        clearConfig() {
            s.information("clearConfig---\x3e"), o.ConfigNS.setValue("XLLoginPrompt", "id", ""), s.information("<---clearConfig")
        }
    }

    t.LoginPromptManager = c, function (e) {
        let t = new c;
        e.getManager = function () {
            return t
        }, e.init = function () {
            t.init().then().catch()
        }, e.getPromptData = function () {
            return t.getPromptData()
        }
    }(t.LoginPromptManagerNS || (t.LoginPromptManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(409), a = i(0).default.getLogger("login-prompt"), r = i(2), s = i(8), l = i(66);
    t.DataHelper = class extends o.HttpSession {
        constructor() {
            super(...arguments), this.dataList = [], this.adDataDir = r.resolve(__profilesDir, "LoginPrompt/")
        }

        init() {
            return n(this, void 0, void 0, function* () {
                let e = yield s.FileSystemAWNS.mkdirsAW(this.adDataDir);
                return e || a.information("初始化路径目录失败"), e
            })
        }

        httpLoadDataInfo(e) {
            a.information("httpLoadDataInfo---\x3e"), this.host = "static-xl.a.88cdn.com", this.retries = 2, this.timeout = 2e4, this.path = "/json/login_icon.json", a.information("uri:" + this.path), a.information("host:" + this.host), this.get(t => {
                if (200 === t.statusCode && t.body) {
                    let i = this.parseResponse(t.body);
                    this.downLoadResource(i, e).then().catch()
                }
            }, t => {
                a.information("error", t), e(!1, null)
            }), a.information("<---httpLoadDataInfo")
        }

        downLoadResource(e, t) {
        }

        parseResponse(e) {
            if (!e) return null;
            let t = e.toString(), i = null;
            try {
                i = JSON.parse(t)
            } catch (e) {
                a.warning(e)
            }
            return a.information("jsonstr", t), a.information("resObj", i), i || null
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(23), a = i(710), r = i(47), s = i(3), l = i(713), d = i(8), u = i(2),
        c = i(0).default.getLogger("vip-renewicon.manager");
    var h;
    !function (e) {
        e.userTypeChanged = "OnuserTypeChanged"
    }(h = t.UserEventNS || (t.UserEventNS = {}));

    class f extends r.default {
        constructor() {
            super(...arguments), this.cashHover = !1, this.hasCash = !1, this.isQueryCashBack = !1, this.isQueryTagsBack = !1, this.expiredRange = 7, this.userType = 0, this.vipData = null, this.aidfromMap = new Map, this.iconDataDir = u.resolve(__profilesDir, "vipicon/"), this.iconData = null, this.iconUrl = null
        }

        get $hasCash() {
            return this.hasCash
        }

        get $iconData() {
            return this.iconData
        }

        initDataDir() {
            return n(this, void 0, void 0, function* () {
                let e = yield d.FileSystemAWNS.mkdirsAW(this.iconDataDir);
                return e || c.information("初始化路径目录失败"), e
            })
        }

        init() {
            super.setMaxListeners(1), this.aidfromMap.set(6, "xfbtn_grow0_kt"), this.aidfromMap.set(7, "xfbtn_grow1_kt"), this.aidfromMap.set(8, "xfbtn_grow1_kt"), this.aidfromMap.set(9, "xfbtn_pt_mrxf"), this.aidfromMap.set(10, "xfbtn_pt_mrxf"), this.aidfromMap.set(11, "xfbtn_bj_mrxf"), this.aidfromMap.set(12, "xfbtn_bj_mrxf"), this.aidfromMap.set(13, "xfbtn_cj_mrxf"), this.aidfromMap.set(14, "xfbtn_cj_mrxf")
        }

        calculateExpireDate() {
            let e, t, i;
            e = this.vipData.expireDate.substring(0, 4), t = this.vipData.expireDate.substring(4, 6), i = this.vipData.expireDate.substring(6, 8);
            let n = new Date(e + "-" + t + "-" + i + " 00:00:00").getTime() / 1e3, o = new Date, a = o.getFullYear(),
                r = o.getMonth(), s = o.getDate(),
                l = (o = new Date(a + "-" + (r < 10 ? "0" + (r + 1) : r + 1) + "-" + (s < 10 ? "0" + s : s) + " 00:00:00")).getTime() / 1e3;
            return Math.ceil((n - l) / 86400)
        }

        updateUserVipData(e) {
            return n(this, void 0, void 0, function* () {
                c.information("updateUserData---\x3e"), c.information("vipData", e), this.clear(), yield this.querySettingInfo(), this.vipData = e, null !== this.vipData ? (c.information("expirerange", this.expiredRange), c.information("userType", this.userType), c.information("cashHover", this.cashHover), yield this.queryCashInfo(), yield this.queryUserTagInfo()) : c.information("vipData is null")
            })
        }

        onLogout() {
            this.clear(), this.fireEvent(h.userTypeChanged, this.userType)
        }

        clear() {
            this.cashHover = !1, this.vipData = null, this.expiredRange = 7, this.userType = 0, this.hasCash = !1, this.isQueryCashBack = !1, this.isQueryTagsBack = !1, this.iconUrl = null, this.iconData = null
        }

        openNewTab() {
            if (!this.iconUrl && this.mSetting) for (let e = 0; e < this.mSetting.settings.length; e++) {
                let t = this.mSetting.settings[e];
                t.id === this.userType && t.url && (this.iconUrl = t.url)
            }
            let e = this.iconUrl ? this.iconUrl : "https://pay.xunlei.com/pay.html?bizNo=baijin&referfrom=v_pc_xlx_ggong_pay_top&aidfrom=" + this.aidfromMap.get(this.userType);
            c.information("openNewTab---\x3e", e), s.client.callServerFunction("OpenNewTab", e).catch()
        }

        onIconClick() {
            if (c.information("onIconClick---\x3e"), this.openNewTab(), null === this.vipData) return void c.information("vipData is null");
            let e = new Map;
            e.set("show_type", this.userType), e.set("isvip", this.vipData.isVip), e.set("vas_type", this.vipData.vasType), e.set("referfrom", "v_pc_xlx_ggong_pay_top"), e.set("aidfrom", this.aidfromMap.get(this.userType));
            let t = {attribute1: "xufei_botton_click", extData: e};
            l.StatUtilitiesNS.trackEvent("clienttop", t), c.information("<----onIconClick")
        }

        onIconShow() {
            if (c.information("onIconShow---\x3e"), null === this.vipData) return void c.information("vipData is null");
            let e = new Map;
            e.set("show_type", this.userType), e.set("isvip", this.vipData.isVip), e.set("vas_type", this.vipData.vasType);
            let t = {attribute1: "xufei_botton_show", extData: e};
            l.StatUtilitiesNS.trackEvent("clienttop", t), c.information("<----onIconShow")
        }

        querySettingInfo() {
            return n(this, void 0, void 0, function* () {
                c.information("querySettingInfo");
                let e = new a.UserHttpSession;
                this.mSetting = yield e.querySettingInfo(), c.information("this.mSetting :", this.mSetting), this.mSetting && (1 === this.mSetting.cash_hover && (this.cashHover = !0), this.hasCash && !this.cashHover && (this.hasCash = !1), this.mSetting.expired_day > 0 && (this.expiredRange = this.mSetting.expired_day), c.information("this.mSetting :", this.mSetting), c.information("<---querySettingInfo"))
            })
        }

        checkUserType(e) {
            if (c.information("checkUserType---\x3e"), e && e.code && 1 === e.code && this.vipData) if (1 === this.vipData.isVip) {
                let t = this.calculateExpireDate();
                c.information("leftdays", t), t <= this.expiredRange && (5 === this.vipData.vasType ? 0 === e.usedToActPay ? this.userType = 14 : this.userType = 13 : 3 === this.vipData.vasType ? 0 === e.usedToActPay ? this.userType = 12 : this.userType = 11 : 2 === this.vipData.vasType && (0 === e.usedToActPay ? this.userType = 10 : this.userType = 9))
            } else 0 === e.payTimesRangeForDL ? this.userType = 6 : 0 === e.usedToActPay ? this.userType = 8 : this.userType = 7; else if (this.vipData) if (1 === this.vipData.isVip) {
                let e = this.calculateExpireDate();
                c.information("leftdays", e), e <= this.expiredRange && (5 === this.vipData.vasType ? this.userType = 14 : 3 === this.vipData.vasType ? this.userType = 12 : 2 === this.vipData.vasType && (this.userType = 10))
            } else this.userType = 6;
            c.information("usertype ", this.userType), c.information("<---checkUserType")
        }

        setIconData() {
            if (this.mSetting) for (let e = 0; e < this.mSetting.settings.length; e++) {
                let t = this.mSetting.settings[e];
                this.userType === t.id && (this.iconData = {iconUrl: t.icon_url, iconText: t.icon_text})
            }
        }

        queryUserTagInfo() {
            return n(this, void 0, void 0, function* () {
                c.information("queryUserTagInfo---\x3e");
                let e = new a.UserHttpSession, t = yield this.getUserID(), i = yield this.getSessionID();
                c.information("userId", t), c.information("sessionId", i), this.isQueryTagsBack = !1;
                let n = yield e.queryUserTags(t, i);
                c.information("response :", n), this.checkUserType(n), this.isQueryTagsBack = !0, c.information("usertype", this.userType), this.isQueryCashBack && (this.setIconData(), this.fireEvent(h.userTypeChanged, this.userType)), c.information("<---queryUserTagInfo")
            })
        }

        queryCashInfo() {
            return n(this, void 0, void 0, function* () {
                c.information("queryCashInfo---\x3e");
                let e = new a.UserHttpSession, t = yield this.getUserID(), i = yield this.getSessionID();
                c.information("userId", t), c.information("sessionId", i), this.isQueryCashBack = !1;
                let n = yield e.queryCashInfo(t, i);
                c.information("response", n), c.information("this.cashHover", this.cashHover), n && 0 === n.result && n.totalnum > 0 && this.cashHover ? this.hasCash = !0 : this.hasCash = !1, this.isQueryCashBack = !0, c.information("this.hasCash :", this.hasCash), this.isQueryTagsBack && (this.setIconData(), this.fireEvent(h.userTypeChanged, this.userType)), c.information("<---queryCashInfo")
            })
        }

        getUserID() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    o.LoginHelperNS.loginHelper.getUserInfo("userid", function (t) {
                        c.information("getUserID:userid = ", t), e(t)
                    })
                })
            })
        }

        getSessionID() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    o.LoginHelperNS.loginHelper.getUserInfo("sessionid", function (t) {
                        c.information("getSessionID:sessionid = ", t), e(t)
                    })
                })
            })
        }
    }

    t.VipRenewIconManager = f, function (e) {
        const t = new f;
        t.init(), e.getIconManager = function () {
            return t
        }
    }(t.VipRenewIconManagerNS || (t.VipRenewIconManagerNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(711), a = i(712), r = i(0).default.getLogger("vip-renewicon.http-session");
    t.UserHttpSession = class extends o.HttpSession {
        querySettingInfo() {
            return n(this, void 0, void 0, function* () {
                return r.information("querySettingInfo----\x3e"), this.host = "images.client.vip.xunlei.com", this.retries = 1, this.timeout = 5e3, this.path = "/mini/xlx/tips_300x310/ssi_html/xdsxfbtnconf.js", r.information("uri:", this.path), r.information("host:", this.host), new Promise(e => {
                    this.get(t => {
                        let i = null;
                        200 === t.statusCode && t.body && (i = a.UserHttpPackageNS.praseSettingBuffer(t.body)), e(i)
                    }, t => {
                        r.information("error", t), e(null)
                    })
                })
            })
        }

        queryCashInfo(e, t) {
            return n(this, void 0, void 0, function* () {
                return r.information("queryCashInfo"), this.host = "dynamic.vip.xunlei.com", this.retries = 1, this.timeout = 5e3, this.path = "/cashv2/userCashCount?userid=" + e + "&sessionid=" + t, r.information("host:", this.host), r.information("uri:", this.path), new Promise(e => {
                    this.get(t => {
                        let i = null;
                        200 === t.statusCode && t.body && (i = a.UserHttpPackageNS.praseCashBuffer(t.body)), e(i)
                    }, t => {
                        r.information("error", t), e(null)
                    })
                })
            })
        }

        queryUserTags(e, t) {
            return n(this, void 0, void 0, function* () {
                return r.information("queryUserTags--\x3e"), this.host = "soa.vip.xunlei.com", this.retries = 1, this.timeout = 5e3, this.path = "/xlvip.common.mooseapi/querytags?userid=" + e + "&sessionid=" + t + "&tags=isSign,payTimesRangeForDL,usedToActPay", r.information("uri:", this.path), r.information("host:", this.host), new Promise(e => {
                    this.get(t => {
                        let i = null;
                        200 === t.statusCode && t.body && (i = a.UserHttpPackageNS.praseTagBuffer(t.body)), e(i)
                    }, t => {
                        r.information("error", t), e(null)
                    })
                })
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(100);
    t.HttpSession = class {
        constructor() {
            this.mRetries = 0, this.mHost = void 0, this.mPort = 80, this.mPath = void 0, this.mAuth = void 0, this.mAccept = void 0, this.mBody = null, this.mUrl = void 0, this.mTimeout = void 0, this.mCurRetries = 0
        }

        set host(e) {
            this.mHost = e
        }

        get host() {
            return this.mHost
        }

        set port(e) {
            this.mPort = e
        }

        get port() {
            return this.mPort
        }

        set path(e) {
            this.mPath = e
        }

        get path() {
            return this.mPath
        }

        set url(e) {
            this.mUrl = e
        }

        get url() {
            return this.mUrl
        }

        set auth(e) {
            this.mAuth = e
        }

        get auth() {
            return this.mAuth
        }

        set accept(e) {
            this.mAccept = e
        }

        get accept() {
            return this.mAccept
        }

        set body(e) {
            this.mBody = e
        }

        get body() {
            return this.mBody
        }

        set retries(e) {
            this.mRetries = e
        }

        get retries() {
            return this.mRetries
        }

        set timeout(e) {
            this.mTimeout = e
        }

        get timeout() {
            return this.mTimeout
        }

        get(e, t) {
            let i = {hostname: this.host, port: this.port, path: this.path || "/", method: "GET"};
            this.getImpl(i, e, i => {
                this.mCurRetries < this.retries ? (this.mCurRetries++, this.get(e, t)) : t(i)
            })
        }

        getImpl(e, t, i) {
            n.get(e, e => {
                let i = null;
                e.on("data", e => {
                    i = i ? Buffer.concat([i, e]) : e
                }), e.on("end", () => {
                    t({statusCode: e.statusCode, headers: e.headers, body: i})
                })
            }).on("error", e => {
                i(e)
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0).default.getLogger("vip-renewicon.http-package");
    !function (e) {
        e.praseSettingBuffer = function (e) {
            n.information("--\x3epraseSettingBuffer");
            let t = null;
            if (e) {
                let i = e.toString();
                if (i) {
                    n.information("jsonStr :", i);
                    try {
                        let e = JSON.parse(i);
                        n.information("resobj", e);
                        let o = [];
                        for (let t = 6; t <= 14; t++) if (e[t] && e[t].url) {
                            let i = e[t];
                            i.id = t, n.information("node", i), o.push(i)
                        }
                        t = {cash_hover: Number(e.cash_hover), expired_day: Number(e.expired_day), settings: o}
                    } catch (e) {
                        n.information(e), n.information("parser json error")
                    }
                }
            }
            return n.information("<--praseSettingBuffer"), t
        }, e.praseCashBuffer = function (e) {
            n.information("--\x3epraseCashBuffer");
            let t = null;
            if (e) {
                let i = e.toString();
                if (i) {
                    n.information("jsonStr :", i);
                    try {
                        let e = JSON.parse(i);
                        t = {
                            result: Number(e.result),
                            msg: e.msg,
                            totalnum: Number(e.data.total_num),
                            expirenum: Number(e.data.expire_num)
                        }
                    } catch (e) {
                        n.information("parser json error")
                    }
                }
            }
            return n.information("<--praseCashBuffer"), t
        }, e.praseTagBuffer = function (e) {
            n.information("--\x3epraseTagBuffer");
            let t = null;
            if (e) {
                let i = e.toString();
                if (i) {
                    n.information("jsonStr :", i);
                    try {
                        let e = JSON.parse(i);
                        t = {
                            code: Number(e.code),
                            msg: e.message,
                            isSign: e.result ? Number(e.result.isSign) : 0,
                            payTimesRangeForDL: e.result ? Number(e.result.payTimesRangeForDL) : 0,
                            usedToActPay: e.result ? Number(e.result.usedToActPay) : 0
                        }
                    } catch (e) {
                        n.information("parser json error")
                    }
                }
            }
            return n.information("<--praseTagBuffer"), t
        }
    }(t.UserHttpPackageNS || (t.UserHttpPackageNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(3), o = i(0).default.getLogger("vip-renewicon.stat-utilities");
    !function (e) {
        e.trackEvent = function (e, t) {
            let i = (t = t || {}).attribute1 || "", a = t.attribute2 || "", r = function (e) {
                let t = "";
                return e.forEach((e, i) => {
                    "" !== t && (t += ","), t = t + i + "=" + e
                }), t
            }(t.extData || new Map);
            o.information("key : ", e), o.information("attribute1 : ", i), o.information("attribute2 ：", a), o.information("extData ： ", r), r = encodeURIComponent(r), n.client.callServerFunction("TrackEvent", e, i, a, 0, 0, 0, 0, r).catch()
        }
    }(t.StatUtilitiesNS || (t.StatUtilitiesNS = {}))
}, function (e, t) {
    e.exports = "data:image/png;base64, "
}, function (e, t) {
    e.exports = "data:image/png;base64, "
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(167);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-left\\system-buttons-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(425), o = i(169);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-left\\system-buttons.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(432), o = i(171);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\views\\main-menu.vue", t.default = s.exports
}, function (e, t) {
    e.exports = "../imgs/thunderPan--code.png"
}, function (e, t, i) {
    e.exports = i(65)(215)
}, function (e, t, i) {
    e.exports = i(65)(194)
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(74), a = i(128), r = i(70), s = i(2), l = i(0), d = i(7), u = i(5), c = i(82), h = i(39), f = i(29),
        p = i(3), g = i(83), m = i(10), v = i(12), y = i(49),
        T = l.default.getLogger("Thunder.MainRenderer.stroe.Tabs"),
        w = d.default(s.join(__rootDir, "../bin/ThunderHelper.node")), k = g.TabEventManagerNS.getEventEmitter();
    let C = g.createXDASTab({title: "推荐", showUrl: !1, name: "recommend", pinned: !0});
    u.isNullOrUndefined(C) && T.warning(C);
    let b = 1,
        I = ["http://misc.xl9.xunlei.com/chrome/client/view/dist/1.0/new_tab.html", "http://pc.xunlei.com/pages/#/new-tab"],
        S = 0;
    const _ = {
        tabs: [{title: C.getTitle(), tab: C, pinned: C.getPinned(), key: b++}],
        current: 0,
        curBrowserWndHandle: 0,
        hideTabs: []
    };

    function D(e, t, i) {
        return n(this, void 0, void 0, function* () {
            do {
                if (T.information("Remove_TAb_CTRL param:", i), u.isNullOrUndefined(i) || u.isNullOrUndefined(i.index) || u.isNullOrUndefined(i.tabInfo) || u.isNullOrUndefined(i.tabInfo.tab)) {
                    T.warning(i);
                    break
                }
                t.tabs.splice(i.index, 1), "设置中心" === i.tabInfo.title && m.ConfigNS.save().catch();
                let o = i.tabInfo.tab.getBrowser();
                if (o) {
                    let e = o.getWindowHandle();
                    w.isWindowHandle(e) && (T.information("doRemoveTabCtrl hide page"), w.showWindow(e, r.CmdShow.SW_HIDE))
                }
                t.current === i.index && i.index > 0 ? e.commit("UPDATE_CURRENT", i.index - 1) : t.current > i.index && e.commit("UPDATE_CURRENT", t.current - 1);
                let s = t.tabs[t.current];
                (u.isNullOrUndefined(s) || u.isNullOrUndefined(s.tab)) && T.warning(s);
                let l = s.tab.getBrowser();
                if (1 === t.tabs.length && setTimeout(() => n(this, void 0, void 0, function* () {
                    let e = yield v.asyncRemoteCall.getCurrentWindow();
                    yield f.ToolsUtilitiesAWNS.setForegroundWindow(w, e)
                }), 100), u.isNullOrUndefined(l)) {
                    k.emit(g.TabEventManagerNS.EventType.RemoveTab, i);
                    break
                }
                let d = l.getWindowHandle();
                if (!1 === w.isWindowHandle(d)) {
                    T.warning(d), k.emit(g.TabEventManagerNS.EventType.RemoveTab, i);
                    break
                }
                let c = t.tabs[t.current].tab;
                c.isErrorPage || c.isLoadingPage ? (T.information("doRemoveTabCtrl hide error page"), w.showWindow(d, r.CmdShow.SW_HIDE)) : e.getters.currentNav === y.NavViewID.Browser && i.tabInfo && !i.tabInfo.tab.hideUI && (T.information("[tbc] doRemoveTabCtrl showWindow", d), w.showWindow(d, r.CmdShow.SW_SHOW), a.BrowserSupportNS.resizeBrowserWindow(d).catch()), 0 !== t.curBrowserWndHandle && t.curBrowserWndHandle !== d && (T.information("doRemoveTabCtrl hide other page"), w.showWindow(t.curBrowserWndHandle, r.CmdShow.SW_HIDE)), w.setWindowFocus(d, !0), t.curBrowserWndHandle = d, k.emit(g.TabEventManagerNS.EventType.RemoveTab, i)
            } while (0)
        })
    }

    function A(e, t) {
        let i = null, n = null;
        for (let o = 0; o < e.length; ++o) n = e[o].tab.getBrowser(), u.isNullOrUndefined(n) || t === n && (i = e[o]);
        return i
    }

    function N(e, t, i) {
        return n(this, void 0, void 0, function* () {
            T.information("[tbc] doCreateNewTab createTabParam", i), i && i.tabParam && !i.tabParam.hideUI && (S = (new Date).getTime());
            let e = yield g.createNewTab(i.tabType, i.tabParam);
            T.information("[tbc] newTab", e), u.isNullOrUndefined(e) ? T.warning(e) : (i.tabType === o.TabType.XDAS && (w.isWindowHandle(t.curBrowserWndHandle) && (T.information("doCreateNewTab hide page"), w.showWindow(t.curBrowserWndHandle, r.CmdShow.SW_HIDE)), t.curBrowserWndHandle = 0), k.emit(g.TabEventManagerNS.EventType.CreateNewTab, e, i))
        })
    }

    function x(e, t, i) {
        return n(this, void 0, void 0, function* () {
            let t = i.tabInfo;
            e.commit("UPDATE_CURRENT", i.index), k.emit(g.TabEventManagerNS.EventType.SelectTab, i.index, t);
            let n = t.tab.getBrowser();
            u.isNullOrUndefined(n) || n.on("init-done", () => {
                e.commit("ON_BROWSER_CREATE", i)
            })
        })
    }

    const E = {
        SHOW_OR_HIDE_EMBEDDED_BROWSER(e, t) {
            if (this.getters.isSettingCenterOpened) return;
            t && t.nav || (t = {nav: this.getters.currentNav, show: !0});
            let i = e.hideTabs.find(e => t.nav === e.tab.name);
            if (this.getters.navList.find(e => t.nav === e.key).isEmbeddedBrowser && i && i.tab && i.tab.isEmbeddedBrowser) {
                let e = i.tab.getBrowser().getWindowHandle();
                if (!1 === w.isWindowHandle(e)) return;
                let n = i.tab;
                !t.show || n.isErrorPage || n.isLoadingPage || a.BrowserSupportNS.resizeBrowserWindow(e, !0).catch(), T.information("SHOW OR HIDE EMBEDDED_BROWSER: ", t.show, "  isErrorPage: ", n.isErrorPage, " isLoadingPage: ", n.isLoadingPage), !t.show || i.tab.isErrorPage || i.tab.isLoadingPage ? w.showWindow(e, r.CmdShow.SW_HIDE) : (w.showWindow(e, r.CmdShow.SW_SHOW), w.setWindowFocus(e, !0))
            }
        }, SHOW_OR_HIDE_BROWSER(e, t) {
            do {
                if (u.isNullOrUndefined(t)) break;
                if (t) {
                    let t = e.tabs[e.current];
                    if (u.isNullOrUndefined(t)) break;
                    let i = t.tab;
                    if (u.isNullOrUndefined(i)) break;
                    if (i.getTabType() === o.TabType.Chromium) {
                        let t = i.getBrowser();
                        if (u.isNullOrUndefined(t)) break;
                        let n = t.getWindowHandle();
                        if (!1 === w.isWindowHandle(n)) {
                            T.warning(n);
                            break
                        }
                        let o = e.tabs[e.current].tab;
                        o.isErrorPage || o.isLoadingPage || a.BrowserSupportNS.resizeBrowserWindow(n).catch(), w.isWindowHandle(n) && (i.isErrorPage ? (T.information("SHOW_OR_HIDE_BROWSER hide page"), w.showWindow(n, r.CmdShow.SW_HIDE), t.refresh()) : i.isLoadingPage ? (T.information("SHOW_OR_HIDE_BROWSER hide page"), w.showWindow(n, r.CmdShow.SW_HIDE)) : (T.information("SHOW_OR_HIDE_BROWSER show page"), w.showWindow(n, r.CmdShow.SW_SHOW), w.setWindowFocus(n, !0)))
                    }
                } else T.information("SHOW_OR_HIDE_BROWSER hide page"), w.showWindow(e.curBrowserWndHandle, r.CmdShow.SW_HIDE)
            } while (0)
        }, CREATE_NEW_TAB(e, t) {
            {
                T.information("[tbc] CREATE_NEW_TAB", t), t.tabType !== o.TabType.Chromium || t.tabParam.hideUI || (T.information("[tbc] SELECT_NAV", "find-page"), this.commit("SELECT_NAV", y.NavViewID.Browser, {root: !0})), t.tabType !== o.TabType.Chromium || t.tabParam.hideUI || (t.tabParam.rect = {
                    x: 0,
                    y: 0,
                    width: 0,
                    height: 0
                });
                let i = -1, n = e.tabs.concat(e.hideTabs);
                t.tabParam.name && (i = n.findIndex(e => e.tab.name === t.tabParam.name)), T.information("[tbc] CREATE_NEW_TAB tabIndex", i), -1 !== i ? (n[i].tab.hideUI || this.commit("SELECT_TAB", i), t.tabParam.url && n[i].tab.navigate(t.tabParam.url)) : N(0, e, t).catch()
            }
        }, SELECT_TAB(e, t) {
            T.information("SELECT_TAB index: " + t);
            do {
                if (u.isNullOrUndefined(t)) break;
                if (t < 0) break;
                if (t >= e.tabs.length) break;
                let i = e.tabs[t];
                if (u.isNullOrUndefined(i)) break;
                let n = {tabInfo: i, index: t}, s = n.tabInfo.tab;
                if (u.isNullOrUndefined(s)) break;
                if (s.getTabType() === o.TabType.Chromium) {
                    let t = s.getBrowser();
                    if (u.isNullOrUndefined(t)) {
                        x(this, 0, n).catch();
                        break
                    }
                    let i = t.getWindowHandle();
                    if (!1 === w.isWindowHandle(i)) {
                        T.warning(i);
                        break
                    }
                    if (T.information("SELECT_TAB hwnd: " + i + " curBrowserWndHandle: " + e.curBrowserWndHandle), i === e.curBrowserWndHandle) break;
                    let o = e.tabs[n.index].tab;
                    o.isErrorPage || o.isLoadingPage || a.BrowserSupportNS.resizeBrowserWindow(i).catch(), w.isWindowHandle(i) && (s.isErrorPage ? (T.information("SELECT_TAB hide page: isErrorPage"), w.showWindow(i, r.CmdShow.SW_HIDE), t.refresh()) : s.isLoadingPage ? (T.information("SELECT_TAB hide page: isLoadingPage"), w.showWindow(i, r.CmdShow.SW_HIDE)) : this.getters.currentNav === y.NavViewID.Browser && (T.information("SELECT_TAB show page"), w.showWindow(i, r.CmdShow.SW_SHOW), w.setWindowFocus(i, !0))), w.isWindowHandle(e.curBrowserWndHandle) && (T.information("SELECT_TAB hide page: isWindowHandle(curBrowserWndHandle)"), w.showWindow(e.curBrowserWndHandle, r.CmdShow.SW_HIDE)), e.curBrowserWndHandle = i
                } else s.getTabType() === o.TabType.IE ? T.information("ie") : s.getTabType() === o.TabType.XDAS && (w.isWindowHandle(e.curBrowserWndHandle) && (T.information("SELECT_TAB hide page: isWindowHandle(curBrowserWndHandle)2"), w.showWindow(e.curBrowserWndHandle, r.CmdShow.SW_HIDE)), e.curBrowserWndHandle = 0);
                this.commit("UPDATE_CURRENT", n.index), k.emit(g.TabEventManagerNS.EventType.SelectTab, t, s)
            } while (0)
        }, ON_BIND_WND_HANDLE(e, t) {
            T.information("ON_BIND_WND_HANDLE");
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.hwnd)) {
                    T.warning(t);
                    break
                }
                if (!1 === w.isWindowHandle(t.hwnd)) {
                    T.warning(t.hwnd);
                    break
                }
                if (t.browser) {
                    let i = A(e.hideTabs, t.browser);
                    if (i && i.tab && i.tab.hideUI) {
                        T.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, r.CmdShow.SW_HIDE);
                        break
                    }
                }
                let i = e.tabs[e.current].tab;
                if (!i) break;
                if (i.getTabType() === o.TabType.XDAS) {
                    T.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, r.CmdShow.SW_HIDE);
                    break
                }
                if (i.getTabType() === o.TabType.Chromium) {
                    let e = i.getBrowser();
                    if (e && e !== t.browser) {
                        T.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, r.CmdShow.SW_HIDE);
                        break
                    }
                }
                if (e.curBrowserWndHandle === t.hwnd) break;
                if (w.isWindowHandle(t.hwnd) && !w.isWindowVisible(t.hwnd)) break;
                let n = e.tabs[e.current].tab;
                n.isErrorPage || n.isLoadingPage ? (T.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, r.CmdShow.SW_HIDE)) : (a.BrowserSupportNS.resizeBrowserWindow(t.hwnd).catch(), this.getters.currentNav !== y.NavViewID.Browser ? (T.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(t.hwnd, r.CmdShow.SW_HIDE)) : (T.information("ON_BIND_WND_HANDLE show page"), w.showWindow(t.hwnd, r.CmdShow.SW_SHOW))), w.isWindowHandle(e.curBrowserWndHandle) && (T.information("ON_BIND_WND_HANDLE hide page"), w.showWindow(e.curBrowserWndHandle, r.CmdShow.SW_HIDE)), e.curBrowserWndHandle = t.hwnd
            } while (0);
            S && (p.client.callServerFunction("SendPerformanceItem", "CreateNewTab", (new Date).getTime() - S).catch(), S = 0)
        }, ON_NEW_TAB_CREATE(e, t) {
            let i = t.newTab, n = t.createTabParam, o = "index" in n.tabParam ? n.tabParam.index : e.current + 1;
            if (!i.getPinned()) {
                let t = 0;
                for (let i = 0; i < e.tabs.length; ++i) {
                    if (!e.tabs[i].tab.getPinned()) break;
                    t++
                }
                o < t && (o = t)
            }
            if (n.tabParam.hideUI) e.hideTabs.splice(0, 0, {
                title: i.getTitle(),
                tab: i,
                pinned: i.getPinned(),
                key: b++
            }); else {
                e.tabs.splice(o, 0, {
                    title: i.getTitle(),
                    tab: i,
                    pinned: i.getPinned(),
                    key: b++
                }), !1 !== n.tabParam.visible && this.commit("UPDATE_CURRENT", o), k.emit(g.TabEventManagerNS.EventType.AddTab, n)
            }
        }, ON_NEW_BROWSER_POPUP(e, t) {
            let i = e.current + 1;
            e.tabs.splice(i, 0, {
                title: t.getTitle(),
                tab: t,
                pinned: t.getPinned(),
                key: b++
            }), this.commit("UPDATE_CURRENT", i), k.emit(g.TabEventManagerNS.EventType.AddTab)
        }, ON_NEW_BROWSER_POPUP_COMPLETED(e, t) {
            T.information("ON_NEW_BROWSER_POPUP_COMPLETED");
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    T.warning(t);
                    break
                }
                for (let i of e.tabs) {
                    if (u.isNullOrUndefined(i) || u.isNullOrUndefined(i.tab)) continue;
                    let e = i.tab.getBrowser();
                    if (!u.isNullOrUndefined(e) && e === t.browser) break
                }
            } while (0)
        }, ON_TITLE_CHANGE(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser) || u.isNullOrUndefined(t.title)) {
                    T.warning(t);
                    break
                }
                for (let i of e.tabs) {
                    if (u.isNullOrUndefined(i) || u.isNullOrUndefined(i.tab)) continue;
                    let e = i.tab.getBrowser();
                    if (!u.isNullOrUndefined(e) && e === t.browser) {
                        i.title = t.title, i.tab.setTitle(t.title);
                        break
                    }
                }
            } while (0)
        }, ON_FAV_ICON_GET(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser) || u.isNullOrUndefined(t.iconUrl)) {
                    T.warning(t);
                    break
                }
                for (let i of e.tabs) {
                    if (u.isNullOrUndefined(i) || u.isNullOrUndefined(i.tab)) continue;
                    let e = i.tab.getBrowser();
                    if (!u.isNullOrUndefined(e) && e === t.browser) {
                        i.tab.setIconUrl(t.iconUrl);
                        break
                    }
                }
            } while (0)
        }, ON_ORIGINAL_URL_CHANGE(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser) || u.isNullOrUndefined(t.originalUrl)) {
                    T.warning(t);
                    break
                }
                for (let i of e.tabs) {
                    if (u.isNullOrUndefined(i) || u.isNullOrUndefined(i.tab)) continue;
                    let e = i.tab.getBrowser();
                    if (!u.isNullOrUndefined(e) && e === t.browser) {
                        i.tab.originalUrl = t.originalUrl;
                        break
                    }
                }
            } while (0)
        }, ON_LOAD_START(e, t) {
            T.information("ON_LOAD_START");
            {
                let i = this.getters.navList;
                for (let n of i) if (n.isEmbeddedBrowser) {
                    let i = e.hideTabs.find(e => e.tab.name === n.key);
                    if (i && i.tab) {
                        let e = i.tab.getBrowser();
                        if (u.isNullOrUndefined(e)) break;
                        e === t.browser && !0 === t.isMainFrame && (i.tab.state = "loading", i.tab.isErrorPage = !1, i.tab.isLoadingPage = !1), this.commit("SHOW_OR_HIDE_EMBEDDED_BROWSER")
                    }
                }
            }
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    T.warning(t);
                    break
                }
                for (let i of e.tabs) {
                    if (u.isNullOrUndefined(i) || u.isNullOrUndefined(i.tab)) continue;
                    let n = i.tab.getBrowser();
                    if (!u.isNullOrUndefined(n) && (n === t.browser && !0 === t.isMainFrame)) {
                        if (i.tab.state = "loading", i.tab.isErrorPage = !1, i.tab.isLoadingPage = !1, i.tab === e.tabs[e.current].tab) {
                            let o = this.getters.isSettingCenterOpened;
                            T.information("ON_LOAD_START current tab", i, t);
                            let s = n.getWindowHandle();
                            w.isWindowHandle(s) && (i.tab.isEmbeddedBrowser || (a.BrowserSupportNS.resizeBrowserWindow(s).catch(), this.getters.currentNav !== y.NavViewID.Browser || o ? (T.information("ON_LOAD_START hide page"), w.showWindow(s, r.CmdShow.SW_HIDE)) : (T.information("ON_LOAD_START show page"), w.showWindow(s, r.CmdShow.SW_SHOW)), e.curBrowserWndHandle = s))
                        }
                        break
                    }
                }
            } while (0)
        }, ON_LOAD_END(e, t) {
            T.information("ON_LOAD_END");
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    T.warning(t);
                    break
                }
                for (let i of e.tabs) {
                    if (u.isNullOrUndefined(i) || u.isNullOrUndefined(i.tab)) continue;
                    let e = i.tab.getBrowser();
                    if (!u.isNullOrUndefined(e) && (e === t.browser && !0 === t.isMainFrame)) {
                        "error" !== i.tab.state && (i.tab.state = "loaded", i.tab.isErrorPage = !1);
                        break
                    }
                }
            } while (0)
        }, ON_LOAD_STATUS_CHANGE(e, t) {
            T.information("ON_LOAD_STATUS_CHANGE");
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    T.warning(t);
                    break
                }
                for (let e of this.getters.allTabs) {
                    if (u.isNullOrUndefined(e) || u.isNullOrUndefined(e.tab)) continue;
                    let i = e.tab.getBrowser();
                    if (!u.isNullOrUndefined(i) && i === t.browser) {
                        e.tab.canGoBack = t.canGoBack, e.tab.canGoForward = t.canGoForward, t.isLoading && (e.tab.isErrorPage = !1);
                        break
                    }
                }
            } while (0)
        }, ON_ADDRESS_CHANGE(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    T.warning(t);
                    break
                }
                for (let i of e.tabs) {
                    if (u.isNullOrUndefined(i) || u.isNullOrUndefined(i.tab)) continue;
                    let e = i.tab.getBrowser();
                    if (!u.isNullOrUndefined(e) && (e === t.browser && !0 === t.isMainFrame)) {
                        i.tab.url = t.url, i.tab.setCurUrl(t.url), "community" !== i.tab.name && (I.includes(t.url) ? i.tab.setShowUrl(!1) : i.tab.setShowUrl(!0));
                        break
                    }
                }
            } while (0)
        }, ON_LOAD_ERROR(e, t) {
            T.warning("ON_LOAD_ERROR ", t.errorCode);
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.browser)) {
                    T.warning(t);
                    break
                }
                for (let e of this.getters.allTabs) {
                    if (u.isNullOrUndefined(e) || u.isNullOrUndefined(e.tab)) continue;
                    let i = e.tab.getBrowser();
                    if (!u.isNullOrUndefined(i) && (i === t.browser && !0 === t.isMainFrame && (-105 === t.errorCode || -21 === t.errorCode || -106 === t.errorCode || -118 === t.errorCode || -7 === t.errorCode || -101 === t.errorCode))) {
                        e.tab.state = "error", e.tab.url = t.failedUrl, e.tab.isErrorPage = !0, e.tab.isLoadingPage = !1;
                        let n = i.getWindowHandle();
                        if (0 === n) break;
                        T.warning("ON_LOAD_ERROR HIDE hwnd: ", n), w.isWindowHandle(n) && (T.information("ON_LOAD_ERROR hide page"), w.showWindow(n, r.CmdShow.SW_HIDE));
                        break
                    }
                }
            } while (0)
        }, ON_APP_QUIT(e) {
            T.information(e);
            for (let t of e.tabs) u.isNullOrUndefined(t) || u.isNullOrUndefined(t.tab) || t.tab.getTabType() === o.TabType.Chromium && t.tab.destroyBrowser(!0)
        }, REGISTER_NATIVE_FUNCTION(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(e.tabs[0]) || u.isNullOrUndefined(e.tabs[0].tab)) break;
                let i = e.tabs[0].tab.registerNativeFunction(t.functionName, t.nativeFunc);
                !1 === i && T.warning(i)
            } while (0)
        }, UN_REGISTER_NATIVE_FUNCTION(e, t) {
            do {
                if (u.isNullOrUndefined(e.tabs) || u.isNullOrUndefined(e.tabs[0].tab)) break
            } while (0);
            e.tabs[0].tab.unregisterNativeFunction(t)
        }, CLOSE_TAB(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.index) || u.isNullOrUndefined(t.tabInfo) || u.isNullOrUndefined(t.tabInfo.tab)) {
                    T.warning(t);
                    break
                }
                let i = t.tabInfo.tab;
                if (i.getTabType() === o.TabType.Chromium) {
                    i.destroyBrowser(!0) || D(this, e, t).catch()
                } else D(this, e, t).catch()
            } while (0)
        }, CLOSE_TAB_BY_NAME(e, t) {
            do {
                if (u.isNullOrUndefined(t)) {
                    T.warning(t);
                    break
                }
                let i = -1;
                for (let n = 0; n < e.tabs.length; n++) if (t === e.tabs[n].tab.name) {
                    i = n;
                    break
                }
                if (-1 !== i) {
                    let t = e.tabs[i].tab, n = t.getTabType(), a = {tabInfo: e.tabs[i], index: i};
                    if (n === o.TabType.Chromium) {
                        t.destroyBrowser(!0) || D(this, e, a).catch()
                    } else D(this, e, a).catch()
                } else {
                    i = -1;
                    for (let n = 0; n < e.hideTabs.length; n++) if (t === e.hideTabs[n].tab.name) {
                        i = n;
                        break
                    }
                    if (-1 === i) break;
                    let n = e.hideTabs[i].tab;
                    n.getTabType() === o.TabType.Chromium && n.destroyBrowser(!0), e.hideTabs.splice(i, 1)
                }
            } while (0)
        }, Remove_TAb_CTRL(e, t) {
            D(this, e, t).catch()
        }, ON_CHROMIUM_CALL_NATIVE_FUNCTION(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.functionName) || u.isNullOrUndefined(t.browser)) {
                    T.warning(t);
                    break
                }
                for (let e of this.getters.allTabs) {
                    if (u.isNullOrUndefined(e) || u.isNullOrUndefined(e.tab)) continue;
                    let i = e.tab.getBrowser();
                    if (!u.isNullOrUndefined(i) && i === t.browser) {
                        !1 === e.tab.onJsCallNativeFunction(0, t.functionName, t.callBackId, t.args) && T.warning("ON_CHROMIUM_CALL_NATIVE_FUNCTION failed", t)
                    }
                }
            } while (0)
        }, ON_CHROMIUM_CHECK_NATIVE_FUNCTION(e, t) {
            do {
                if (u.isNullOrUndefined(t) || u.isNullOrUndefined(t.functionName) || u.isNullOrUndefined(t.browser)) {
                    T.warning(t);
                    break
                }
                for (let i of e.tabs) {
                    if (u.isNullOrUndefined(i) || u.isNullOrUndefined(i.tab)) continue;
                    let e = i.tab.getBrowser();
                    if (!u.isNullOrUndefined(e) && e === t.browser) {
                        !1 === i.tab.onJsCheckNativeFunction(0, t.functionName, t.callBackId) && T.warning(t)
                    }
                }
            } while (0)
        }, ON_BROWSER_CREATE(e, t) {
            do {
                if (!t || !t.tabInfo) break;
                let i = t.tabInfo.tab;
                if (!i) break;
                if (e.tabs[e.current].tab !== i) break;
                let n = i.getBrowser();
                if (!n) break;
                let o = n.getWindowHandle();
                if (!1 === w.isWindowHandle(o)) {
                    T.warning(o);
                    break
                }
                w.isWindowHandle(o) && (i.isErrorPage ? (T.information("ON_BROWSER_CREATE hide page"), w.showWindow(o, r.CmdShow.SW_HIDE), n.refresh()) : this.getters.currentNav === y.NavViewID.Browser && (T.information("ON_BROWSER_CREATE show page"), w.showWindow(o, r.CmdShow.SW_SHOW), w.setWindowFocus(o, !0))), w.isWindowHandle(e.curBrowserWndHandle) && (T.information("ON_BROWSER_CREATE hide page"), w.showWindow(e.curBrowserWndHandle, r.CmdShow.SW_HIDE)), e.curBrowserWndHandle = o;
                let s = e.tabs[e.current].tab;
                s.isErrorPage || s.isLoadingPage || a.BrowserSupportNS.resizeBrowserWindow(e.curBrowserWndHandle).catch()
            } while (0)
        }, UPDATE_TAB_TITLE(e, t) {
            do {
                if (!t || !t.title || void 0 === t.index) break;
                let i = e.tabs[t.index];
                if (!i) break;
                i.title = t.title, i.tab.setTitle(t.title)
            } while (0)
        }, UPDATE_CURRENT(e, t) {
            let i = e.current;
            t >= e.tabs.length || (e.current = t, i !== e.current && (g.setCurrentTabID(e.current), k.emit(g.TabEventManagerNS.EventType.ChangeTab, e.current, e.tabs[e.current])))
        }, UPDATE_TABS(e, t) {
            e.tabs = t
        }
    }, O = {
        selectTab({commit: e}, t) {
            e("SELECT_TAB", t)
        }, closeTab({commit: e}, t) {
            e("CLOSE_TAB", t)
        }, closeTabByName({commit: e}, t) {
            e("CLOSE_TAB_BY_NAME", t)
        }, removeTabCtrl({commit: e}, t) {
            e("Remove_TAb_CTRL", t)
        }, onChromiumCallNativeFunction({commit: e}, t) {
            e("ON_CHROMIUM_CALL_NATIVE_FUNCTION", t)
        }, onChromiumCheckNativeFunction({commit: e}, t) {
            e("ON_CHROMIUM_CHECK_NATIVE_FUNCTION", t)
        }, onNewBrowserPopup({commit: e}, t) {
            return n(this, void 0, void 0, function* () {
                T.information("ON_NEW_BROWSER_POPUP");
                do {
                    if (u.isNullOrUndefined(t)) {
                        T.warning(t);
                        break
                    }
                    if (yield c.URLHelperNS.isCustomProtocol(t.url)) {
                        let e = "";
                        do {
                            if (!t.extData) break;
                            let i = null;
                            try {
                                i = JSON.parse(t.extData)
                            } catch (e) {
                            }
                            i && i.search_from && (e = i.search_from)
                        } while (0);
                        h.ThunderNewTask.createTaskByUrl(t.url, {
                            searchFrom: e,
                            referer: t.refUrl,
                            browser: "xlbrowser.exe"
                        });
                        break
                    }
                    let i = {isFromPopup: !0, url: t.url, extData: t.extData}, n = o.TabType.Chromium,
                        a = yield g.createNewTab(n, i, t.ev);
                    if (u.isNullOrUndefined(a)) {
                        T.warning(a);
                        break
                    }
                    e("ON_NEW_BROWSER_POPUP", a)
                } while (0)
            })
        }, onCreateNewTab({commit: e}, t) {
            e("ON_NEW_TAB_CREATE", t)
        }
    }, P = {
        currentTab: e => {
            let t = null;
            do {
                if (u.isNullOrUndefined(e) || u.isNullOrUndefined(e.current) || u.isNullOrUndefined(e.tabs)) {
                    T.warning(e);
                    break
                }
                let i = e.tabs[e.current];
                if (u.isNullOrUndefined(i) || u.isNullOrUndefined(i.tab)) break;
                t = i
            } while (0);
            return t
        }, allTabs: e => e.tabs.concat(e.hideTabs), showTabs: e => e.tabs, hideTabs: e => e.hideTabs || []
    };
    t.default = {state: _, mutations: E, actions: O, getters: P}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(10), o = i(400), a = i(98), r = i(0).default.getLogger("setting-conf"), s = {
        REMOVE_CONFIG_DATA(e) {
            e.formData = {}, e.confSchema = []
        }, SET_CONFIG_DATA(e, t) {
            e.formData = Object.assign({}, e.formData, t)
        }, SET_CONF_SCHEMA(e, t) {
            e.confSchema = t
        }, ADD_CONF_TAB_ITEM(e, t) {
            if (void 0 !== t.position) {
                let i = t.direction;
                e.confSchema[t.position].children.splice(i, 0, t.confTab), a.default.set(e.confSchema[t.position].children, "children", e.confSchema[t.position].children)
            }
        }, ADD_SCHEMA_ITEM(e, t) {
            if (r.information("ADD_SCHEMA_ITEM", t), void 0 !== t.position[0] && void 0 !== t.position[1]) {
                let i = 0;
                i = t.direction < 0 ? e.confSchema[t.position[0]].children[t.position[1]].children.length + t.direction + 1 : t.direction, e.confSchema[t.position[0]].children[t.position[1]].children.splice(i, 0, t.schemaItem), a.default.set(e.confSchema[t.position[0]].children[t.position[1]].children, "children", e.confSchema[t.position[0]].children[t.position[1]].children)
            }
        }, ADD_FORMDATA_ITEM(e, t) {
            let i = `${t.section}-${t.key}`;
            void 0 === e.formData[i] && a.default.set(e.formData, i, t)
        }, ADD_SELECT_ITEM(e, t) {
            let i = e.formData[t.target];
            r.information("targetItem", i), i.selectItems.includes(t.from) || (i.selectItems.push(t.from), a.default.set(e.formData[t.target], "selectItems", i.selectItems))
        }, SET_CONFIG_VALUE(e, t) {
            if (void 0 !== e.formData[t.name].optionToValue) {
                let i = t.value;
                n.ConfigNS.setValue(t.section, `${t.key}`, e.formData[t.name].optionToValue[i]), "" !== t.userId && n.ConfigNS.setValue(t.section, `${t.key}${t.userId}`, e.formData[t.name].optionToValue[i])
            } else if (e.formData[t.name].type && "number" === e.formData[t.name].type) {
                let e = Number(t.value);
                n.ConfigNS.setValue(t.section, `${t.key}`, e), "" !== t.userId && n.ConfigNS.setValue(t.section, `${t.key}${t.userId}`, e)
            } else n.ConfigNS.setValue(t.section, `${t.key}`, t.value), "" !== t.userId && n.ConfigNS.setValue(t.section, `${t.key}${t.userId}`, t.value);
            void 0 !== e.formData[t.name].immediatelySave && n.ConfigNS.saveSync(), function (e, t) {
                let i = e.formData[t.name];
                void 0 !== i.selectItems && i.selectItems.map(i => {
                    let o = t.value;
                    e.formData[i].type && "number" === e.formData[i].type && (o = Number(t.value)), n.ConfigNS.setValue(e.formData[i].section, e.formData[i].key, o)
                });
                if (void 0 !== i.selectAllName) {
                    let i = e.formData[t.name].selectAllName, o = e.formData[i];
                    if (t.value) {
                        let t = !0;
                        o.selectItems.map(i => {
                            t = n.ConfigNS.getValue(e.formData[i].section, e.formData[i].key, !1) && t
                        }), t && n.ConfigNS.setValue(o.section, o.key, !0)
                    } else {
                        let e = n.ConfigNS.getValue(o.section, o.key, "");
                        e && n.ConfigNS.setValue(o.section, o.key, !1)
                    }
                }
            }(e, t)
        }, SET_FOMR_DATA(e, t) {
            let i = `${t.section}-${t.key}`;
            if (void 0 === e.formData[i]) return;
            let n = t.value;
            if (void 0 !== e.formData[i] && void 0 !== e.formData[i].optionToValue) {
                let o = e.formData[i];
                for (let e in o.optionToValue) if (o.optionToValue[e] === t.value) {
                    n = e;
                    break
                }
            } else void 0 !== e.formData[`${t.section}-${t.key}`] && (n = t.value);
            e.formData[`${t.section}-${t.key}`].value = n
        }
    }, l = {
        initSettingData({commit: e}) {
            o.SettingInit.setBaseConf();
            let t = null;
            o.SettingInit.getConfSchemaEx().then(i => {
                (i => {
                    let n = o.SettingInit.getConfFormData();
                    try {
                        t = JSON.parse(JSON.stringify(i))
                    } catch (e) {
                    }
                    null === t && (t = o.SettingInit.getConfSchema()), e("SET_CONF_SCHEMA", t), e("SET_CONFIG_DATA", n)
                })(i)
            }).catch()
        }
    };
    t.default = {state: {confSchema: [], formData: {}}, mutations: s, actions: l}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(6), o = i(0), a = i(4), r = i(16), s = i(44), l = i(26), d = i(11), u = i(30), c = i(126),
        h = o.default.getLogger("DownloadStore"), f = d.DownloadKernelTaskManager.getTaskManager(),
        p = r.DownloadKernelEventManager.getEventManager(),
        g = s.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        m = l.DownloadKernelCategoryManager.getCategoryManager(), v = 20, y = {
            currentCategoryId: -1,
            currentPrivateCategoryId: Number.MIN_VALUE,
            currentCategoryViewId: window.__xadsSkeletonCompletedActive ? a.DownloadKernel.CategroyViewID.Completed : a.DownloadKernel.CategroyViewID.Downloading,
            taskList: [{
                categoryId: -1,
                id: a.DownloadKernel.CategroyViewID.Downloading,
                tasksMap: {},
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }, {
                categoryId: -1,
                id: a.DownloadKernel.CategroyViewID.Completed,
                tasksMap: {},
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }, {
                categoryId: -1,
                id: a.DownloadKernel.CategroyViewID.Recycle,
                tasksMap: {},
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }],
            taskListPrivate: [{
                id: a.DownloadKernel.CategroyViewID.Downloading,
                tasksMap: {},
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }, {id: a.DownloadKernel.CategroyViewID.Completed, tasksMap: {}, selected: [], taskIds: [], loadedIndex: 0}],
            filterTasks: {
                categoryId: -1,
                id: a.DownloadKernel.CategroyViewID.Completed,
                selected: [],
                taskIds: [],
                loadedIndex: 0
            }
        };

    function T(e) {
        let t = e.loadedIndex + v;
        t > e.taskIds.length && (t = e.taskIds.length);
        let i = e.taskIds.slice(0, t), n = u.default.getTaskBasesByTaskIds(e.categoryId, e.id, i);
        e.tasksMap = {}, e.tasksMap = Object.assign({}, n)
    }

    const w = {
        UNINIT_PAN_CATEGORY_TASKLIST(e) {
            let t = e.taskList;
            for (let e = 0; e < t.length; e++) {
                let i = t[e], n = u.default.getTaskBases(i.categoryId, i.id), o = {};
                for (let e in n) {
                    let t = n[e];
                    -1 === t.categoryId && (o[e] = t)
                }
                u.default.updateTaskMaps(i.categoryId, i.id, o);
                let a = [...Object.values(o)];
                a.sort(c.SortNS.getSortFuncByConfig(i.id, i.categoryId)), i.taskIds = a.map(e => e.taskId), i.selected = i.selected.filter(e => o.hasOwnProperty(e)), T(i)
            }
        }, INIT_PAN_CATEGORY_TASKLIST(e, t) {
            h.information("INIT_Pan_CATEGORY_TASKLIST categoryId:", t);
            let i = e.taskList;
            for (let e = 0; e < i.length; e++) {
                let n = i[e], o = m.getCategoryView(t, n.id);
                if (!o) continue;
                let a = o.getTasks(), r = {};
                for (let [e, t]of a) r[e] = t.getTaskBaseInfo();
                let s = u.default.getTaskBases(n.categoryId, n.id), l = Object.assign({}, s, r);
                u.default.updateTaskMaps(n.categoryId, n.id, l);
                let d = [...Object.values(l)];
                d.sort(c.SortNS.getSortFuncByConfig(n.id, n.categoryId)), i[e].taskIds = d.map(e => e.taskId), T(i[e])
            }
            h.information("INIT_Pan_CATEGORY_TASKLIST end")
        }, INIT_CATEGORY_TASKLIST(e) {
            h.information("INIT_CATEGORY_TASKLIST state.currentCategoryId:", e.currentCategoryId);
            let t = e.taskList;
            -1 !== e.currentCategoryId && (t = e.taskListPrivate);
            for (let i = 0; i < t.length; i++) {
                let n = t[i], o = null;
                if (!(o = -1 === e.currentCategoryId ? g.getCategoryViewFromId(n.id) : m.getCategoryView(e.currentCategoryId, n.id))) {
                    n.tasksMap = null, n.selected = [], n.loadedIndex = 0, n.taskIds = [], n.tasksMap = {};
                    continue
                }
                let a = o.getTasks();
                t[i].tasksMap = null, t[i].tasksMap = {}, t[i].selected = [], t[i].loadedIndex = 0, t[i].categoryId = e.currentCategoryId;
                let r = {};
                for (let [e, t]of a) r[e] = t.getTaskBaseInfo();
                let s = [...Object.values(r)];
                s.sort(c.SortNS.getSortFuncByConfig(n.id, n.categoryId)), u.default.updateTaskMaps(t[i].categoryId, t[i].id, r), t[i].taskIds = s.map(e => e.taskId), T(t[i])
            }
            h.information("INIT_CATEGORY_TASKLIST end")
        }, SORT_CATEGORY_HISTORY(e) {
            let t = e.taskList;
            -1 !== e.currentCategoryId && (t = e.taskListPrivate);
            for (let e = 0; e < t.length; e++) {
                let i = u.default.getTaskBases(t[e].categoryId, t[e].id), n = [...Object.values(i)];
                n.sort(c.SortNS.getSortFuncByConfig(t[e].id, t[e].categoryId)), t[e].taskIds = n.map(e => e.taskId), T(t[e])
            }
        }, SORT_CATEGORY_BY_FUNCTION(e, t) {
            do {
                if (t.index < 0 || t.index > 2) break;
                if ("function" != typeof t.compareFn) break;
                let i = u.default.getTaskBases(t.categoryId, t.categoryViewId), n = [...Object.values(i)];
                n.sort(t.compareFn);
                let o = e.taskList;
                -1 !== t.categoryId && (o = e.taskListPrivate), o[t.index].taskIds = n.map(e => e.taskId), o[t.index].selected = [], T(o[t.index])
            } while (0)
        }, UPDATE_CATEGORYVIEW(e, t) {
            e.currentCategoryViewId !== t && (e.currentCategoryViewId = t, u.default.setCurrentCategoryView(t))
        }, LOAD_MORE(e, t) {
            let i = e.taskList;
            -1 !== t.categoryId && m.isPrivateCategory(t.categoryId) && (i = e.taskListPrivate);
            for (let e = 0; e < i.length; e++) {
                let n = i[e];
                if (n.id === t.categoryViewId) {
                    let e = 0;
                    n.loadedIndex < n.taskIds.length && (e = !t.toIndex || t.toIndex < 0 ? n.loadedIndex + v > n.taskIds.length ? n.taskIds.length : n.loadedIndex + v : t.toIndex, n.loadedIndex = e, T(n));
                    break
                }
            }
        }, FILTER_TASK(e, t) {
            if (e.filterTasks.loadedIndex = 0, e.filterTasks.selected = [], t.length > 1) {
                let i = e.taskList[1].taskIds.filter(e => -1 !== t.indexOf(e));
                e.filterTasks.taskIds = i
            } else e.filterTasks.taskIds = t || [];
            T(e.filterTasks)
        }, FILTER_TASK_LOAD_MORE(e, t) {
            let i = 0, n = e.filterTasks;
            n.loadedIndex < n.taskIds.length && (i = n.loadedIndex + v > n.taskIds.length ? n.taskIds.length : n.loadedIndex + v, n.loadedIndex = i, T(n))
        }, INSERT_TO_CATEGORY_VIEW(e, t) {
            h.information("insert INSERT_TO_CATEGORY_VIEW in ");
            let i = e.taskList;
            -1 !== t.categoryId && m.isPrivateCategory(t.categoryId) && (i = e.taskListPrivate);
            for (let e = 0; e < i.length; e++) if (i[e].id === t.id) {
                let n = [], o = {};
                for (let e of t.tasks) o[e.taskId] = Object.assign({}, e), n.push(e.taskId);
                let a = u.default.getTaskBases(t.categoryId, t.id), r = Object.assign({}, a, o);
                u.default.updateTaskMaps(t.categoryId, t.id, r), n.length > 0 && i[e].taskIds.splice(0, 0, ...n), T(i[e]);
                break
            }
            h.information("insert INSERT_TO_CATEGORY_VIEW end ")
        }, REMOVE_FROM_CATEGORY_VIEW(e, t) {
            let i = e.taskList;
            -1 !== t.categoryId && m.isPrivateCategory(t.categoryId) && (i = e.taskListPrivate);
            for (let e = 0; e < i.length; e++) if (i[e].id === t.categoryViewId) {
                let n = u.default.getTaskBases(t.categoryId, t.categoryViewId), o = Object.assign([], i[e].taskIds),
                    a = Object.assign([], i[e].selected);
                for (let e of t.tasks) {
                    let t = e.taskId;
                    delete n[t];
                    let i = o.indexOf(t);
                    -1 !== i && o.splice(i, 1);
                    let r = a.indexOf(t);
                    -1 !== r && a.splice(r, 1)
                }
                u.default.updateTaskMaps(t.categoryId, t.categoryViewId, n), i[e].taskIds = o, i[e].selected = a, T(i[e]);
                break
            }
        }, UPDATE_TASK_INFO(e, t) {
            do {
                if (null === t || 0 === t.length) break;
                for (let i of t) {
                    let t = 0, n = i.categoryId, o = e.taskList;
                    -1 !== n && m.isPrivateCategory(n) && (o = e.taskListPrivate);
                    let r = u.default.getTaskBases(n, a.DownloadKernel.CategroyViewID.Downloading);
                    r.hasOwnProperty(String(i.taskId)) ? (r[i.taskId] = i, u.default.updateTaskMaps(n, a.DownloadKernel.CategroyViewID.Downloading, r), o[t].tasksMap.hasOwnProperty(String(i.taskId)) && Object.assign(o[t].tasksMap[i.taskId] || {}, i)) : (t = 1, (r = u.default.getTaskBases(n, a.DownloadKernel.CategroyViewID.Completed)).hasOwnProperty(String(i.taskId)) ? (r[i.taskId] = i, u.default.updateTaskMaps(n, a.DownloadKernel.CategroyViewID.Completed, r), o[t].tasksMap.hasOwnProperty(String(i.taskId)) && Object.assign(o[t].tasksMap[i.taskId] || {}, i)) : (t = 2, (r = u.default.getTaskBases(n, a.DownloadKernel.CategroyViewID.Recycle)) && r.hasOwnProperty(String(i.taskId)) && (r[i.taskId] = i, u.default.updateTaskMaps(n, a.DownloadKernel.CategroyViewID.Recycle, r), o[t].tasksMap.hasOwnProperty(String(i.taskId)) && Object.assign(o[t].tasksMap[i.taskId] || {}, i))))
                }
            } while (0)
        }, UPDATE_TASK_READED(e, t) {
            do {
                if (null === t || 0 === t.length) break;
                let i = 1, o = e.taskList;
                -1 !== e.currentCategoryId && (o = e.taskListPrivate);
                let r = u.default.getTaskBases(e.currentCategoryId, a.DownloadKernel.CategroyViewID.Completed);
                for (let s of t) r.hasOwnProperty(String(s.taskId)) && (r[s.taskId] = s, u.default.updateTaskMaps(e.currentCategoryId, a.DownloadKernel.CategroyViewID.Completed, r), o[i].tasksMap.hasOwnProperty(String(s.taskId)) && n.Vue.set(o[i].tasksMap, String(s.taskId), Object.assign({}, s)))
            } while (0)
        }, UPDATE_TASK_RENAME(e, t) {
            do {
                if (null === t || 0 === t.length) break;
                let i = 1, o = e.taskList;
                -1 !== e.currentCategoryId && (o = e.taskListPrivate);
                let r = u.default.getTaskBases(e.currentCategoryId, a.DownloadKernel.CategroyViewID.Completed);
                for (let s of t) r.hasOwnProperty(String(s.taskId)) && (r[s.taskId] = s, u.default.updateTaskMaps(e.currentCategoryId, a.DownloadKernel.CategroyViewID.Completed, r), o[i].tasksMap.hasOwnProperty(String(s.taskId)) && n.Vue.set(o[i].tasksMap, String(s.taskId), Object.assign({}, s)))
            } while (0)
        }, UPDATE_TASK_MOVING_STATE_CHANGE(e, t) {
            do {
                if (null === t || 0 === t.length) break;
                let i = 0, o = a.DownloadKernel.CategroyViewID.Downloading;
                t[0].taskStatus !== a.DownloadKernel.TaskStatus.Succeeded && t[0].taskStatus !== a.DownloadKernel.TaskStatus.Seeding || (i = 1, o = a.DownloadKernel.CategroyViewID.Completed);
                let r = e.taskList;
                -1 !== e.currentCategoryId && (r = e.taskListPrivate);
                let s = u.default.getTaskBases(e.currentCategoryId, o);
                for (let a of t) s.hasOwnProperty(String(a.taskId)) && (s[a.taskId] = a, u.default.updateTaskMaps(e.currentCategoryId, o, s), r[i].tasksMap.hasOwnProperty(String(a.taskId)) && n.Vue.set(r[i].tasksMap, String(a.taskId), Object.assign({}, a)))
            } while (0)
        }, UPDATE_TASK_MOVED(e, t) {
            do {
                if (null === t || 0 === t.length) break;
                let i = 0, o = a.DownloadKernel.CategroyViewID.Downloading;
                t[0].taskStatus !== a.DownloadKernel.TaskStatus.Succeeded && t[0].taskStatus !== a.DownloadKernel.TaskStatus.Seeding || (i = 1, o = a.DownloadKernel.CategroyViewID.Completed);
                let r = e.taskList;
                -1 !== e.currentCategoryId && (r = e.taskListPrivate);
                let s = u.default.getTaskBases(e.currentCategoryId, o);
                for (let a of t) s.hasOwnProperty(String(a.taskId)) && (s[a.taskId] = a, u.default.updateTaskMaps(e.currentCategoryId, o, s), r[i].tasksMap.hasOwnProperty(String(a.taskId)) && n.Vue.set(r[i].tasksMap, String(a.taskId), Object.assign({}, a)))
            } while (0)
        }, UPDATE_TASK_STATUS(e, t) {
            do {
                if (!t || 0 === t.length) break;
                let i = 0, n = a.DownloadKernel.CategroyViewID.Downloading, o = {}, r = e.taskList;
                -1 !== e.currentCategoryId && (r = e.taskListPrivate);
                let s = u.default.getTaskBases(e.currentCategoryId, n);
                for (let a of t) s.hasOwnProperty(String(a.taskId)) && (s[a.taskId] = a, u.default.updateTaskMaps(e.currentCategoryId, n, s), r[i].tasksMap.hasOwnProperty(String(a.taskId)) && (o[a.taskId] = a));
                r[i].tasksMap = Object.assign({}, r[i].tasksMap, o)
            } while (0)
        }, UPDATE_DOWNLOADING_SELECTED_TASKS(e, t) {
            -1 === e.currentCategoryId ? e.taskList[0].selected = [...t] : e.taskListPrivate[0].selected = [...t]
        }, UPDATE_COMPLETED_SELECTED_TASKS(e, t) {
            -1 === e.currentCategoryId ? e.taskList[1].selected = [...t] : e.taskListPrivate[1].selected = [...t]
        }, UPDATE_RECYCLE_SELECTED_TASKS(e, t) {
            -1 === e.currentCategoryId && (e.taskList[2].selected = [...t])
        }, MOVE_TO_TOP(e, t) {
            do {
                if (null === t || 0 === t.length) break;
                let i = e.taskList[0];
                -1 !== e.currentCategoryId && (i = e.taskListPrivate[0]);
                let n = [];
                for (let e of t) {
                    let t = i.taskIds.indexOf(e);
                    -1 !== t && n.push(t)
                }
                n.sort((e, t) => e - t);
                let o = [];
                for (let e = n.length - 1; e >= 0; e--) o.unshift(i.taskIds.splice(n[e], 1)[0]);
                i.taskIds.splice(0, 0, ...o), T(i)
            } while (0)
        }, MOVE_TO_BOTTOM(e, t) {
            do {
                if (null === t || 0 === t.length) break;
                let i = e.taskList[0];
                -1 !== e.currentCategoryId && (i = e.taskListPrivate[0]);
                let n = [];
                for (let e of t) {
                    let t = i.taskIds.indexOf(e);
                    -1 !== t && n.push(t)
                }
                n.sort((e, t) => e - t);
                let o = [];
                for (let e = n.length - 1; e >= 0; e--) o.unshift(i.taskIds.splice(n[e], 1)[0]);
                i.taskIds.splice(i.taskIds.length, 0, ...o), T(i)
            } while (0)
        }, SELECT_PRE(e) {
            let t = null, i = [], n = [];
            if (e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Downloading ? -1 === e.currentCategoryId ? 1 === e.taskList[0].selected.length && (t = e.taskList[0], n = e.taskList[0].taskIds, i = e.taskList[0].selected) : e.currentCategoryId === e.taskListPrivate[0].categoryId && (t = e.taskListPrivate[0], i = e.taskListPrivate[0].selected, n = e.taskListPrivate[0].taskIds) : e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Completed ? -1 === e.currentCategoryId ? (t = e.taskList[1], n = e.taskList[1].taskIds, i = e.taskList[1].selected) : e.currentCategoryId === e.taskListPrivate[1].categoryId && (t = e.taskListPrivate[1], n = e.taskListPrivate[1].taskIds, i = e.taskListPrivate[1].selected) : e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Recycle && -1 === e.currentCategoryId && (t = e.taskList[2], n = e.taskList[2].taskIds, i = e.taskList[2].selected), 1 === i.length) {
                let e = i[0], o = n.indexOf(e);
                -1 !== o && 0 !== o && (t.selected = [n[o - 1]])
            }
        }, SELECT_NEXT(e) {
            let t = null, i = [], n = [];
            if (e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Downloading ? -1 === e.currentCategoryId ? 1 === e.taskList[0].selected.length && (t = e.taskList[0], n = e.taskList[0].taskIds, i = e.taskList[0].selected) : e.currentCategoryId === e.taskListPrivate[0].categoryId && (t = e.taskListPrivate[0], i = e.taskListPrivate[0].selected, n = e.taskListPrivate[0].taskIds) : e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Completed ? -1 === e.currentCategoryId ? (t = e.taskList[1], n = e.taskList[1].taskIds, i = e.taskList[1].selected) : e.currentCategoryId === e.taskListPrivate[1].categoryId && (t = e.taskListPrivate[1], n = e.taskListPrivate[1].taskIds, i = e.taskListPrivate[1].selected) : e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Recycle && -1 === e.currentCategoryId && (t = e.taskList[2], n = e.taskList[2].taskIds, i = e.taskList[2].selected), 1 === i.length) {
                let e = i[0], o = n.indexOf(e);
                -1 !== o && o !== n.length - 1 && (t.selected = [n[o + 1]])
            }
        }, UPDATE_CATEGORY(e, t) {
            if (e.currentCategoryId !== t) {
                if (e.currentCategoryId = t, e.currentCategoryViewId = a.DownloadKernel.CategroyViewID.Downloading, -1 !== t && e.currentPrivateCategoryId !== t) {
                    e.currentPrivateCategoryId = t;
                    for (let i = 0; i < e.taskListPrivate.length; i++) e.taskListPrivate[i].categoryId = t, e.taskListPrivate[i].tasksMap = null, e.taskListPrivate[i].tasksMap = {}, e.taskListPrivate[i].taskIds = [], e.taskListPrivate[i].selected = [], e.taskListPrivate[i].loadedIndex = 0;
                    this.commit("INIT_CATEGORY_TASKLIST")
                }
                u.default.setCurrentCategoryId(t)
            }
        }, UPDATE_DOWNLOADING_TASKLIST(e, t) {
            if (t.length > 0) {
                let i = 0, n = null;
                (n = -1 === e.currentCategoryId ? e.taskList[i] : e.taskListPrivate[i]).taskIds.splice(0, t.length, ...t)
            }
        }, UPDATE_COMPLETED_TASKLIST(e, t) {
            if (t.length > 0) {
                let i = 1, n = null;
                (n = -1 === e.currentCategoryId ? e.taskList[i] : e.taskListPrivate[i]).taskIds.splice(0, t.length, ...t)
            }
        }, UPDATE_RECYCLE_TASKLIST(e, t) {
            t.length > 0 && -1 === e.currentCategoryId && e.taskList[2].taskIds.splice(0, t.length, ...t)
        }
    }, k = {
        attachTaskEvent({commit: e}) {
            p.attachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== a.DownloadKernel.TaskEventType.DetailChanged) break;
                    if (!t[1]) break;
                    let i = t[1].map(e => e.getTaskBaseInfo()), n = t[2];
                    n & a.DownloadKernel.TaskDetailChangedFlags.UserRead && e("UPDATE_TASK_READED", i), n !== a.DownloadKernel.TaskDetailChangedFlags.UserRead && e("UPDATE_TASK_INFO", i)
                } while (0)
            }), p.attachTaskEvent(a.DownloadKernel.TaskEventType.TaskMovingStateChange, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== a.DownloadKernel.TaskEventType.TaskMovingStateChange) break;
                    if (!t[1]) break;
                    let i = t[1].map(e => e.getTaskBaseInfo());
                    e("UPDATE_TASK_MOVING_STATE_CHANGE", i)
                } while (0)
            }), p.attachTaskEvent(a.DownloadKernel.TaskEventType.BtSubFileDetailChanged, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== a.DownloadKernel.TaskEventType.BtSubFileDetailChanged) break;
                    if (!t[1] || !t[2]) break;
                    let i = t[1];
                    if (t[2].length > 0) break;
                    let n = f.getTaskFromTaskId(i);
                    if (!n) break;
                    e("UPDATE_TASK_INFO", [n.getTaskBaseInfo()])
                } while (0)
            }), p.attachTaskEvent(a.DownloadKernel.TaskEventType.TaskRenamed, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== a.DownloadKernel.TaskEventType.TaskRenamed) break;
                    if (!t[1]) break;
                    let i = t[1].map(e => e.getTaskBaseInfo());
                    e("UPDATE_TASK_RENAME", i)
                } while (0)
            }), p.attachTaskEvent(a.DownloadKernel.TaskEventType.TaskMovedEnd, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== a.DownloadKernel.TaskEventType.TaskMovedEnd) break;
                    if (!t[1]) break;
                    let i = t[1], n = [];
                    for (let e of i) null !== e && n.push(e.getTaskBaseInfo());
                    n.length > 0 && e("UPDATE_TASK_MOVED", n)
                } while (0)
            }), p.attachTaskEvent(a.DownloadKernel.TaskEventType.TaskCategoryMovedEnd, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== a.DownloadKernel.TaskEventType.TaskCategoryMovedEnd) break;
                    if (!t[1]) break;
                    let i = t[1], n = [];
                    for (let e of i) null !== e && n.push(e.getTaskBaseInfo());
                    n.length > 0 && e("UPDATE_TASK_MOVED", n)
                } while (0)
            }), p.attachTaskEvent(a.DownloadKernel.TaskEventType.RemoveFromCategoryView, (...t) => {
                do {
                    if (!t) break;
                    if (t[0] !== a.DownloadKernel.TaskEventType.RemoveFromCategoryView) break;
                    if (void 0 === t[1] || !t[2] || !t[3]) break;
                    let i = t[1], n = t[2], o = t[3].map(e => e.getTaskBaseInfo());
                    e("REMOVE_FROM_CATEGORY_VIEW", {categoryId: i, categoryViewId: n, tasks: o})
                } while (0)
            })
        }
    }, C = {
        currentCategoryTaskCount: e => {
            let t = 0;
            return e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Downloading ? -1 === e.currentCategoryId ? t = e.taskList[0].taskIds.length : e.currentCategoryId === e.taskListPrivate[0].categoryId && (t = e.taskListPrivate[0].taskIds.length) : e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Completed ? -1 === e.currentCategoryId ? t = e.taskList[1].taskIds.length : e.currentCategoryId === e.taskListPrivate[0].categoryId && (t = e.taskListPrivate[1].taskIds.length) : e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Recycle && -1 === e.currentCategoryId && (t = e.taskList[2].taskIds.length), t
        }, currentSelectdTaskIds: e => {
            let t = e.taskList;
            -1 !== e.currentCategoryId && (t = e.taskListPrivate);
            let i = 0;
            return e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Completed ? i = 1 : e.currentCategoryViewId === a.DownloadKernel.CategroyViewID.Recycle && (i = 2), t[i].selected
        }, downloadingSelectedIndexs: e => {
            let t = [];
            return -1 === e.currentCategoryId ? t = e.taskList[0].selected : e.currentCategoryId === e.taskListPrivate[0].categoryId && (t = e.taskListPrivate[0].selected), t
        }, completedSelectedTaskIndexs: e => {
            let t = [];
            return -1 === e.currentCategoryId ? t = e.taskList[1].selected : e.currentCategoryId === e.taskListPrivate[1].categoryId && (t = e.taskListPrivate[1].selected), t
        }, recycleSelectedTaskIndexs: e => {
            let t = [];
            return -1 === e.currentCategoryId && (t = e.taskList[2].selected), t
        }, downloadingTaskList: e => {
            let t = [];
            return -1 === e.currentCategoryId ? t = e.taskList[0].taskIds : e.currentCategoryId === e.taskListPrivate[0].categoryId && (t = e.taskListPrivate[0].taskIds), t
        }, downloadingLoadedList: e => {
            let t = [];
            return -1 === e.currentCategoryId ? t = e.taskList[0].taskIds.slice(0, e.taskList[0].loadedIndex + v) : e.currentCategoryId === e.taskListPrivate[0].categoryId && (t = e.taskListPrivate[0].taskIds.slice(0, e.taskListPrivate[0].loadedIndex + v)), t
        }, completedTaskList: e => {
            let t = [];
            return -1 === e.currentCategoryId ? t = e.taskList[1].taskIds : e.currentCategoryId === e.taskListPrivate[1].categoryId && (t = e.taskListPrivate[1].taskIds), t
        }, completedFilterTaskList: e => e.filterTasks.taskIds, completedLoadedList: e => {
            let t = [];
            return -1 === e.currentCategoryId ? t = e.taskList[1].taskIds.slice(0, e.taskList[1].loadedIndex + v) : e.currentCategoryId === e.taskListPrivate[1].categoryId && (t = e.taskListPrivate[1].taskIds.slice(0, e.taskListPrivate[1].loadedIndex + v)), t
        }, completedFilterLoadedList: e => {
            return e.filterTasks.taskIds.slice(0, e.filterTasks.loadedIndex + v)
        }, recycleTaskList: e => {
            let t = [];
            return -1 === e.currentCategoryId && (t = e.taskList[2].taskIds), t
        }, recycleLoadedList: e => {
            let t = [];
            return -1 === e.currentCategoryId && (t = e.taskList[2].taskIds.slice(0, e.taskList[2].loadedIndex + v)), t
        }, downloadingOrder: e => {
            return e.taskList[0].taskIds
        }, startTaskCount: e => {
            let t = 0, i = {};
            i = -1 === e.currentCategoryId ? e.taskList[0].tasksMap : e.taskListPrivate[0].tasksMap;
            for (let e in i) {
                let n = i[e];
                n.taskStatus !== a.DownloadKernel.TaskStatus.StartPending && n.taskStatus !== a.DownloadKernel.TaskStatus.Started || (t += 1)
            }
            return t
        }
    };
    t.default = {state: y, mutations: w, actions: k, getters: C}
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(6), a = i(0), r = i(4), s = i(39), l = i(59), d = i(11), u = i(34), c = i(40), h = i(44), f = i(9),
        p = i(92), g = i(114), m = i(51), v = h.DownloadKernelCategoryViewManager.getCategoryViewManager(),
        y = a.default.getLogger("download-tool-bar"), T = d.DownloadKernelTaskManager.getTaskManager();
    let w = (e, t) => {
        f.XLStatNS.trackEvent("download_leftpanel", "top_newtask_click"), f.XLStatNS.trackEvent("core_event", "create_task_click", "", 0, 0, 0, 0, "click_source=dltab_menu"), s.ThunderNewTask.createPreNewTaskWindow(null)
    }, k = () => "", C = e => {
        let t = "";
        return e.showPrivateSpaceOpenPage && (t = "is-disabled"), t
    }, b = (e, t) => {
        y.verbose(e);
        let i = t.currentCategoryViewId, n = t.currentSelectdTaskInfos;
        i === r.DownloadKernel.CategroyViewID.Downloading ? u.TaskOperatorNs.startTasks(n) : y.warning("toolbar start tasks but not in downloading category")
    }, I = e => {
        let t = e.currentCategoryViewId, i = e.currentSelectdTaskInfos, n = "is-disabled";
        return !e.showPrivateSpaceOpenPage && l.TaskStatusHelper.canStartSelectedTask(t, i) && (n = ""), n
    }, S = (e, t) => {
        y.verbose(e);
        let i = t.currentCategoryViewId, n = t.currentSelectdTaskInfos;
        i === r.DownloadKernel.CategroyViewID.Downloading ? u.TaskOperatorNs.pauseTasks(n, r.DownloadKernel.TaskStopReason.Manual) : y.warning("toolbar pause tasks but not in downloading category")
    }, _ = e => {
        let t = e.currentCategoryViewId, i = e.currentSelectdTaskInfos, n = "is-disabled";
        return !e.showPrivateSpaceOpenPage && l.TaskStatusHelper.canStopSelectedTask(t, i) && (n = ""), n
    }, D = (e, t) => {
        f.XLStatNS.trackEvent("download_leftpanel", "top_delete_click");
        let i = t.currentSelectdTaskInfos, n = !1;
        e.shiftKey && (n = !0), n ? u.TaskOperatorNs.destroyTasks(i) : u.TaskOperatorNs.deleteTasks(i)
    }, A = (e, t) => {
        f.XLStatNS.trackEvent("download_leftpanel", "top_delete_click");
        let i = t.currentSelectdTaskInfos;
        u.TaskOperatorNs.destroyTasks(i)
    }, N = e => {
        let t = e.currentCategoryViewId, i = e.currentSelectdTaskInfos, n = "is-disabled";
        return !e.showPrivateSpaceOpenPage && l.TaskStatusHelper.canDeleteSelectedTask(t, i) && (n = ""), n
    }, x = (e, t) => n(this, void 0, void 0, function* () {
        y.verbose(e);
        let i = t.currentCategoryViewId, n = t.currentSelectdTaskInfos;
        do {
            if (i === r.DownloadKernel.CategroyViewID.Downloading) break;
            if (1 !== n.length) break;
            let e = n[0].taskType;
            if (e === r.DownloadKernel.TaskType.Bt) {
                let e = T.getTaskFromTaskId(n[0].taskId);
                (yield m.SingleBtTaskNS.isSingleBtTask(e)) ? yield u.TaskOperatorNs.openTaskItem(n[0]) : yield u.TaskOperatorNs.openTaskFolder(n[0], !0)
            } else if (e === r.DownloadKernel.TaskType.Group) if (i === r.DownloadKernel.CategroyViewID.Completed) {
                let e = T.getTaskFromTaskId(n[0].taskId);
                (yield u.TaskOperatorNs.executeInstallFile(e)) || (yield u.TaskOperatorNs.openTaskFolder(n[0], !0))
            } else yield u.TaskOperatorNs.openTaskFolder(n[0], !0); else {
                let e = "";
                i === r.DownloadKernel.CategroyViewID.Completed ? e = "finished" : i === r.DownloadKernel.CategroyViewID.Recycle && (e = "dustbin"), yield u.TaskOperatorNs.openTaskItem(n[0], void 0, void 0, e)
            }
            i === r.DownloadKernel.CategroyViewID.Completed && u.TaskOperatorNs.markReadStatus(n, 1)
        } while (0)
    }), E = (e, t) => n(this, void 0, void 0, function* () {
        y.verbose(e);
        let i = t.currentCategoryViewId, n = t.currentSelectdTaskInfos;
        do {
            if (i === r.DownloadKernel.CategroyViewID.Downloading) break;
            if (1 !== n.length) break;
            yield u.TaskOperatorNs.openTaskFolder(n[0]), i === r.DownloadKernel.CategroyViewID.Completed && u.TaskOperatorNs.markReadStatus(n, 1)
        } while (0)
    }), O = e => n(this, void 0, void 0, function* () {
        let t = e.currentCategoryViewId, i = e.currentSelectdTaskInfos, n = e.showPrivateSpaceOpenPage,
            o = "is-disabled";
        do {
            if (n || t !== r.DownloadKernel.CategroyViewID.Completed) break;
            if (1 === i.length) {
                if (!(yield c.TaskCtrlOperatorNS.canOpenSelectedTaskFile(i[0]))) break;
                o = ""
            }
        } while (0);
        return o
    }), P = e => n(this, void 0, void 0, function* () {
        let t = e.currentCategoryViewId, i = e.currentSelectdTaskInfos, n = e.showPrivateSpaceOpenPage,
            o = "is-disabled";
        do {
            if (n || t !== r.DownloadKernel.CategroyViewID.Completed) break;
            if (1 === i.length) {
                if (!(yield c.TaskCtrlOperatorNS.canOpenSelectedTaskFolder(i[0]))) break;
                o = ""
            }
        } while (0);
        return o
    }), M = e => {
        let t = e.currentCategoryViewId, i = e.currentSelectdTaskInfos, n = e.showPrivateSpaceOpenPage;
        y.verbose(t);
        let o = "is-disabled";
        return !n && i.length > 0 && (o = ""), o
    }, F = e => {
        let t = "";
        return e.showPrivateSpaceOpenPage && (t = "is-disabled"), t
    }, L = (e, t) => n(this, void 0, void 0, function* () {
    }), R = (e, t) => {
        f.XLStatNS.trackEvent("download_leftpanel", "top_more_click"), y.information("open more"), y.verbose(e), g.downloadContextMenu.setContextInfo(t, t.currentCategoryId), g.downloadContextMenu.popMenu(g.DownloadMenuType.ToolbarMore, e).catch()
    }, B = (e, t) => {
        f.XLStatNS.trackEvent("download_leftpanel", "top_private_setting_click"), g.downloadContextMenu.setContextInfo(t, t.currentCategoryId), g.downloadContextMenu.popMenu(g.DownloadMenuType.PrivateSpaceHome, e).catch()
    };
    const U = {
        downloadingButtons: [{
            id: "xlx-icon-nav-new",
            title: "新建任务",
            onClick: w,
            filterClass: C
        }, {id: "xlx-icon-nav-down", title: "下载", onClick: b, filterClass: I}, {
            id: "xlx-icon-nav-pause",
            title: "暂停",
            onClick: S,
            filterClass: _
        }, {id: "xlx-icon-nav-delete", title: "删除任务", onClick: D, filterClass: N}, {
            id: "xlx-icon-nav-vip",
            title: "会员",
            onClick: L,
            filterClass: k
        }, {id: "xlx-icon-nav-more", title: "更多", onClick: R, filterClass: C}],
        completedButtons: [{
            id: "xlx-icon-nav-new",
            title: "新建任务",
            onClick: w,
            filterClass: C
        }, {id: "xlx-icon-nav-file", title: "打开文件", onClick: x, filterClass: O}, {
            id: "xlx-icon-nav-folder",
            title: "打开文件夹",
            onClick: E,
            filterClass: P
        }, {id: "xlx-icon-nav-delete", title: "删除任务", onClick: D, filterClass: N}, {
            id: "xlx-icon-nav-vip",
            title: "会员",
            onClick: L,
            filterClass: k
        }, {id: "xlx-icon-nav-more", title: "更多", onClick: R, filterClass: C}],
        recycleButtons: [{
            id: "xlx-icon-nav-new",
            title: "新建任务",
            onClick: w,
            filterClass: C
        }, {
            id: "xlx-icon-nav-restore", title: "还原", onClick: (e, t) => {
                f.XLStatNS.trackEvent("download_leftpanel", "top_undo_click"), y.verbose(e);
                let i = t.currentCategoryViewId, n = t.currentSelectdTaskInfos;
                i === r.DownloadKernel.CategroyViewID.Recycle && u.TaskOperatorNs.recoverTask(n)
            }, filterClass: M
        }, {
            id: "xlx-icon-nav-clear", title: "彻底删除", onClick: (e, t) => {
                y.verbose(e), f.XLStatNS.trackEvent("download_leftpanel", "top_delete_click");
                let i = t.currentCategoryViewId, n = t.currentSelectdTaskInfos;
                i === r.DownloadKernel.CategroyViewID.Recycle && u.TaskOperatorNs.destroyTasks(n)
            }, filterClass: M
        }, {
            id: "xlx-icon-nav-rubbish", title: "清空回收站", onClick: () => {
                f.XLStatNS.trackEvent("download_leftpanel", "top_clear_click"), u.TaskOperatorNs.clearRecycle()
            }, filterClass: e => {
                let t = e.showPrivateSpaceOpenPage,
                    i = v.getCategoryViewFromId(r.DownloadKernel.CategroyViewID.Recycle).getTasks().size,
                    n = "is-disabled";
                return !t && i > 0 && (n = ""), n
            }
        }, {id: "xlx-icon-nav-vip", title: "会员", onClick: L, filterClass: k}, {
            id: "xlx-icon-nav-more",
            title: "更多",
            onClick: R,
            filterClass: C
        }],
        privateDownloadingButtons: [{
            id: "xlx-icon-nav-new",
            title: "新建任务",
            onClick: w,
            filterClass: C
        }, {id: "xlx-icon-nav-down", title: "下载", onClick: b, filterClass: I}, {
            id: "xlx-icon-nav-pause",
            title: "暂停",
            onClick: S,
            filterClass: _
        }, {id: "xlx-icon-nav-delete", title: "删除任务", onClick: A, filterClass: N}, {
            id: "xlx-icon-nav-vip",
            title: "会员",
            onClick: L,
            filterClass: k
        }, {id: "xlx-icon-nav-home", title: "私人空间设置", onClick: B, filterClass: F}],
        privateCompletedButtons: [{
            id: "xlx-icon-nav-new",
            title: "新建任务",
            onClick: w,
            filterClass: C
        }, {id: "xlx-icon-nav-file", title: "打开文件", onClick: x, filterClass: O}, {
            id: "xlx-icon-nav-folder",
            title: "打开文件夹",
            onClick: E,
            filterClass: P
        }, {id: "xlx-icon-nav-delete", title: "删除任务", onClick: A, filterClass: N}, {
            id: "xlx-icon-nav-vip",
            title: "会员",
            onClick: L,
            filterClass: k
        }, {id: "xlx-icon-nav-home", title: "私人空间设置", onClick: B, filterClass: F}]
    };

    function V(e, t) {
        let i = !1;
        for (let n of e) if (n.id === t.id) {
            i = !0;
            break
        }
        t.position || (t.position = e.length), t.position < 0 && (t.position = e.length + 1 + t.position), i || e.splice(t.position, 0, t)
    }

    function K(e, t) {
        for (let i = 0; i < e.length; i++) {
            if (e[i].id === t.id) {
                let n = Object.assign({}, e[i], t);
                o.Vue.set(e, String(i), Object.assign({}, n));
                break
            }
        }
    }

    function G(e, t) {
        for (let i = 0; i < e.length; i++) {
            if (e[i].id === t) {
                o.Vue.delete(e, String(i));
                break
            }
        }
    }

    const W = {
        ADD_BUTTON(e, t) {
            V(e.downloadingButtons, t), V(e.completedButtons, t), V(e.recycleButtons, t), V(e.privateDownloadingButtons, t), V(e.privateCompletedButtons, t)
        }, UPDATE_BUTTON(e, t) {
            K(e.downloadingButtons, t), K(e.completedButtons, t), K(e.recycleButtons, t), K(e.privateDownloadingButtons, t), K(e.privateCompletedButtons, t)
        }, REMOVE_BUTTON(e, t) {
            G(e.downloadingButtons, t), G(e.completedButtons, t), G(e.recycleButtons, t), G(e.privateDownloadingButtons, t), G(e.privateCompletedButtons, t)
        }
    }, j = {
        attachToolbarEvent({commit: e}) {
            p.PluginFunctionUINS.on("add_toolbar_button", t => {
                e("ADD_BUTTON", t)
            }), p.PluginFunctionUINS.on("update_toolbar_button", t => {
                e("UPDATE_BUTTON", t)
            }), p.PluginFunctionUINS.on("remove_toolbar_button", t => {
                e("REMOVE_BUTTON", t)
            })
        }
    };
    t.default = {state: U, mutations: W, actions: j, getters: {}}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = {
        UPDATE_VIP_SPEED_STATUS(e, t) {
            do {
                if (!t) break;
                let i = Object.assign({}, e.vipSpeedMap);
                for (let n in t) {
                    let o = t[n];
                    if (o) if (i.hasOwnProperty(String(n))) {
                        let e = i[n];
                        i[n] = Object.assign({}, e, o)
                    } else e.defaultStatus ? i[n] = Object.assign({}, e.defaultStatus, o) : i[n] = o; else delete i[n]
                }
                e.vipSpeedMap = Object.assign({}, i)
            } while (0)
        }, UPDATE_DEFAULT_SPEED_STATUS(e, t) {
            e.defaultStatus ? e.defaultStatus = Object.assign({}, e.defaultStatus, t) : e.defaultStatus = Object.assign({}, t)
        }
    };
    t.default = {state: {defaultStatus: null, vipSpeedMap: {}}, mutations: n}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = {
        ON_MOUNTED(e, t) {
            e.homePageUrl = t
        }
    };
    t.default = {state: {homePageUrl: ""}, mutations: n, actions: {}}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(397), a = n.default.getLogger("CommunityStore");
    a.verbose("enter");
    const r = {
        SET_UNREAD_NUMS(e, t) {
            e.unreadNums = Object.assign({}, e.unreadNums, t)
        }, SET_SHOW_MESSAGE_BUTTON(e, t) {
            e.showMessageButton = t
        }, SET_UNREAD_MESSAGES(e, t) {
            e.messages = t
        }, SET_UNREAD_STARS(e, t) {
            e.stars = t
        }, ADD_UNREAD_MESSAGES(e, t) {
            e.messages = e.messages.concat(t)
        }, ADD_UNREAD_STARS(e, t) {
            e.stars = e.stars.concat(t)
        }, SET_CHAT_MSGS(e, t) {
            a.information("SET_CHAT_MSGS", Object.assign({}, e.chatMsgs)), e.chatMsgs = e.chatMsgs.concat(t)
        }, RESET_CHATS_NUM(e) {
            e.chatMsgs = []
        }, SET_USERS_INFO(e, t) {
            e.chatUsersInfo[t.uid || "0"] = t, a.information(" state.chatUsersInfo", e.chatUsersInfo), e.chatUserId = t.uid || 0
        }, SET_CHATS_NUM(e, t) {
            e.unreadNums.chat = t
        }, SET_CIRCLE_NUM(e, t) {
            e.unreadNums.circle = t
        }, SET_MINE_ID(e, t) {
            e.mineId = t
        }
    }, s = {
        getUnreadNums: ({commit: e, state: t, rootState: i}, n) => (a.information("getUnreadNums"), o.getUnreadMsgNum(n).then(t => {
            t.error || "ok" !== t.data.result || (a.information("获取未读数消息", t), e("SET_UNREAD_NUMS", {
                star: t.data.data.unread_like_msg_cnt,
                comment: t.data.data.unread_reply_msg_cnt,
                chat: t.data.data.chitchat
            }))
        }).catch(e => {
            a.information("getUnreadNums error")
        })),
        getUnreadCircleMsgNum: ({commit: e, state: t, rootState: i}, n) => o.getUnreadCircleMsgNum(n).then(t => {
            a.information("获取圈子未读消息数", t), t.error || "ok" !== t.data.result || e("SET_UNREAD_NUMS", {circle: t.data.unread_reply_msg_count + t.data.unread_like_msg_count})
        }).catch(e => {
            a.information("getUnreadCircleMsgNum error")
        }),
        getUnreadNoticeNum: ({commit: e, state: t, rootState: i}, n) => (a.information("getUnreadNoticeNum"), o.getUnreadNoticeNum(n).then(t => {
            a.information("获取未读系统通知数", t), t.error || "ok" !== t.data.result || e("SET_UNREAD_NUMS", {notice: t.data.count})
        }).catch(e => {
            a.information("getUnreadNoticeNum error")
        })),
        getUserInfo: ({commit: e, state: t, rootState: i}, n) => (a.information("getUserInfo", n), void 0 !== t.chatUsersInfo[n] ? (a.information("用户信息已存在"), Promise.resolve({data: {result: "ok"}})) : o.getUserInfo(n).then(t => (a.information("getUserInfo....", t), t.error || "ok" !== t.data.result || (a.information("getUserInfo....", t.data.user_info), e("SET_USERS_INFO", t.data.user_info)), t)).catch(e => {
            a.information("getUserInfo error")
        })),
        getUserSessionList: ({commit: e, state: t, rootState: i}, n) => o.getUserSessionList(n).then(i => {
            if (a.information("获取用户会话列表", i), !i.error && "ok" === i.data.result) {
                let o = 0, r = [];
                a.information("getUserSessionList userId: ", n, ", sessions:", i.data.sessions);
                for (let e = 0; e < i.data.sessions.length; e++) a.information("mineId--", t.mineId), i.data.sessions[e].user_id === t.mineId || r.includes(i.data.sessions[e].record.sender) || (o += i.data.sessions[e].unread, r.push(i.data.sessions[e].record.sender));
                o > 0 && e("SET_CHATS_NUM", o), a.information("私信未读数 chatNum", o)
            }
        }).catch(e => {
            a.information("getUserSessionList error")
        })
    }, l = {
        totalUnread(e, t, i) {
            let {star: n, comment: o, notice: a, chat: r, circle: s} = e.unreadNums;
            return n + o + a + r + s
        },
        UnreadMsgsLen: (e, t, i) => (a.information("UnreadMsgsLen", e.messages.length + e.stars.length + e.chatMsgs.length), e.messages.length + e.stars.length + e.chatMsgs.length),
        chatUnread: (e, t, i) => e.unreadNums.chat
    };
    t.default = {
        state: {
            unreadNums: {star: 0, comment: 0, notice: 0, chat: 0, circle: 0},
            showMessageButton: !0,
            messages: [],
            stars: [],
            chatUserId: 0,
            chatMsgs: [],
            chatUsersInfo: {},
            mineId: 0
        }, mutations: r, actions: s, getters: l
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = {
        SHOW_PRIVATE_SPACE_OPEN_PAGE(e, t) {
            e.showPrivateSpaceOpenPage = t
        }
    };
    t.default = {state: {showPrivateSpaceOpenPage: !1}, mutations: n, actions: {}, getters: {}}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = {
        SHOW_UPGRADE_TASK(e, t) {
            e.showUpgradeTask !== t && (e.showUpgradeTask = t)
        }
    };
    t.default = {state: {showUpgradeTask: !1}, mutations: n, actions: {}, getters: {}}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(41), o = i(2), a = i(10), r = i(6), s = i(0).default.getLogger("book-marks-store"), l = i(46),
        d = o.join(__profilesDir, "XLBrowserApp", "bookmarks"), u = 1, c = {
            ADD_BOOK_MARKS_ITEM(e, t) {
                e.bookMarks = Object.assign({}, e.bookMarks, t);
                let i = JSON.stringify(e.bookMarks);
                a.ConfigNS.setValue("book-marks-section", "book-marks-key", i)
            }, REMOVE_BOOK_MARKS_ITEM(e, t) {
                if (s.information("REMOVE_BOOK_MARKS_ITEM", t), void 0 !== e.bookMarks[t]) {
                    s.information("delete state.bookMarks", e.bookMarks), r.Vue.delete(e.bookMarks, t);
                    let i = JSON.stringify(e.bookMarks);
                    a.ConfigNS.setValue("book-marks-section", "book-marks-key", i)
                }
            }, SET_BOOK_MARKS_STATE(e, t) {
                e.bookMarks = t
            }, UPDATE_BOOK_MARKS_ICONURL(e, t) {
                for (let i in e.bookMarks) {
                    let n = e.bookMarks[i];
                    if (n.url === t.url) {
                        n.iconUrl = t.iconUrl;
                        let i = JSON.stringify(e.bookMarks);
                        a.ConfigNS.setValue("book-marks-section", "book-marks-key", i);
                        break
                    }
                }
            }, SET_BOOK_MARKS_ITEM_TOP(e, t) {
                for (let i in e.bookMarks) {
                    let n = e.bookMarks[i];
                    if (n.url === t.url) {
                        t.top ? (n.top = !0, n.toptime = (new Date).getTime()) : (delete n.top, delete n.toptime);
                        let i = JSON.stringify(e.bookMarks);
                        a.ConfigNS.setValue("book-marks-section", "book-marks-key", i);
                        break
                    }
                }
            }
        }, h = {
            initBookMarks: ({commit: e, state: t, rootState: i}) => new Promise((e, t) => {
                let i = a.ConfigNS.getValue("book-marks-section", "book-marks-key", "/");
                if ("/" !== i) try {
                    let n = JSON.parse(i);
                    e(n)
                } catch (e) {
                    t(new Error("JSON parse book marks error"))
                } else n.readFile(`${d}`, "utf8", (i, n) => {
                    if (i) s.information("读取书签文件出错,书签路径..", d), t(new Error("read book marks file error")); else try {
                        let t = function (e) {
                            if (void 0 === l(e, "roots", "bookmarkbar", "itemlist")) return {};
                            let t = l(e, "roots", "bookmarkbar", "itemlist");
                            s.information("bookMarkItemList", t);
                            let i = {};
                            for (let e = 0; e < t.length; e++) l(t[e], "bmType") === u && void 0 === i[l(t[e], "url")] ? i[l(t[e], "url")] = {
                                url: l(t[e], "url"),
                                name: l(t[e], "name"),
                                iconUrl: l(t[e], "iconUrl") || ""
                            } : f(t[e], i);
                            return i
                        }(JSON.parse(n)), i = JSON.stringify(t);
                        a.ConfigNS.setValue("book-marks-section", "book-marks-key", i), e(t)
                    } catch (e) {
                        s.information("book marks data parse error")
                    }
                })
            }).then(t => {
                e("SET_BOOK_MARKS_STATE", t)
            }).catch(e => {
                s.information("初始化书签数据失败")
            })
        };

    function f(e, t) {
        let i = l(e, "itemlist");
        for (let e = 0; e < i.length; e++) l(i[e], "bmType") === u && void 0 === t[l(t[e], "url")] ? t[l(i[e], "url")] = {
            url: l(i[e], "url"),
            name: l(i[e], "name")
        } : f(i[e], t)
    }

    t.default = {state: {bookMarks: {}}, mutations: c, actions: h}
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(62), o = i(0), a = i(18), r = o.default.getLogger("groupStore"), s = {
        SET_GROUP_DATA(e, t) {
            e.all = t
        }
    }, l = {
        getGroupData({commit: e, state: t, rootState: o}) {
            try {
                a.default.defaults.adapter = i(21);
                let t = new n.Agent({rejectUnauthorized: !1});
                return a.default.get("https://static-xl.a.88cdn.com/json/group_data.json", {httpsAgent: t}).then(t => {
                    r.information(t), null !== t && void 0 !== t.status && 200 === t.status && void 0 !== t.data && null !== t.data && e("SET_GROUP_DATA", t.data)
                }).catch(e => {
                    r.information("getGroupData Error", e)
                })
            } catch (e) {
                return e
            }
        }
    };
    t.default = {state: {all: {}}, mutations: s, actions: l}
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(734), a = i(98), r = {
        SET_CURRENT_USER(e, t) {
            t.userID || "0" === t.userID || (t.userID = ""), e.curUser = Object.assign({}, t)
        }, SET_USER(e, t) {
            t || (t = {}), t.fans = t.fans || [], a.default.set(e.all, t.uid, Object.assign({nick_name: "迅雷用户"}, e.all[t.uid], t))
        }, ToggleFollow(e, {uid: t, follow: i}) {
            let n = e.all[t] && e.all[t].fans ? e.all[t].fans : [], o = e.curUser.userId, a = n.findIndex(e => e === o);
            i ? -1 === a && n.push(o) : a >= 0 && n.splice(a, 1)
        }
    }, s = {
        GetUser({commit: e}, t) {
            return n(this, void 0, void 0, function* () {
                return o.default.get(t).then(t => {
                    t && t.data && t.data.user_info && e("SET_USER", t.data.user_info)
                })
            })
        },
        ToggleFollow({commit: e, state: t}, {uid: i, follow: a}) {
            return n(this, void 0, void 0, function* () {
                return o.default.toggleFollow({uid: i, follow: a}).then(t => {
                    e("ToggleFollow", {uid: i, follow: a})
                })
            })
        },
        CheckFollow: ({commit: e, state: t}, i) => "0" === t.curUser.userId || 0 === i.length ? Promise.resolve() : o.default.isFollow(i).then(t => {
            Object.keys(t.info).forEach(i => {
                e("ToggleFollow", {uid: i, follow: t.info[i]})
            })
        })
    };
    t.default = {state: {curUser: {}, all: {}}, mutations: r, actions: s, getters: {}}
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(57);
    t.default = {
        get(e) {
            return n(this, void 0, void 0, function* () {
                return o.fetchSlRes({method: "get", url: "/user_info/pc_info", data: {uid: e}})
            })
        }, toggleFollow({uid: e, follow: t}) {
            return n(this, void 0, void 0, function* () {
                return t ? o.fetchSlRes({
                    method: "post",
                    url: "/follow/follow",
                    data: {follow_uid: e}
                }) : o.fetchSlRes({method: "post", url: "/follow/cancel", data: {follow_uid: e}})
            })
        }, isFollow(e) {
            return n(this, void 0, void 0, function* () {
                return o.fetchSlRes({method: "post", url: "/follow/is_follow", data: {follow_uid: e}})
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(56), a = i(53), r = i(4), s = i(16), l = i(10), d = i(12), u = i(83), c = i(3), h = i(0), f = i(57),
        p = i(5), g = i(17), m = i(49), v = o.ToastNotifyManagerNS.getToastNotifyManger(),
        y = s.DownloadKernelEventManager.getEventManager(), T = u.TabEventManagerNS.getEventEmitter(),
        w = h.default.getLogger("GetCoinPrizeToast");

    class k {
        constructor() {
            this.taskStatusChangedEventId = void 0, this.checkMainWindowStateListener = null, this.loginEventId = void 0
        }

        onTaskStatusChanged(e) {
            let t = !1;
            for (let i = 0; i < e.length; ++i) {
                let n = e[i];
                if (!n) continue;
                let o = n.getTaskStatus();
                if (o === r.DownloadKernel.TaskStatus.Succeeded || o === r.DownloadKernel.TaskStatus.Seeding) {
                    w.information("onTaskStatusChanged", o), t = !0;
                    break
                }
            }
            t ? setTimeout(() => n(this, void 0, void 0, function* () {
                (yield this.canPopState()) && 1 === (yield this.getCurrentPopTimes()) && this.toastNotify().catch()
            }), 3e3) : w.information("canPopState false")
        }

        toastNotify() {
            return n(this, void 0, void 0, function* () {
                if (yield this.canPopToday()) {
                    let e = v.getTopNotify();
                    if (e && e.getId() === o.ToastNotifyManagerNS.notifyIdGetCoinPrize) w.information("get-coin-prize toast pop now"); else if (yield this.hasCoinPrize()) {
                        let t = yield this.getToastTime();
                        w.information("toast time", t), t > 0 && ((e = v.getTopNotify()) && e.getId() === o.ToastNotifyManagerNS.notifyIdGetCoinPrize ? w.information("get-coin-prize toast pop now2") : (v.showNotify(o.ToastNotifyManagerNS.notifyIdGetCoinPrize, a.ToastNotifyItemType.Custom, "恭喜完成每日下载任务", t, "get-coin-prize-toast"), this.addPopTimes().catch()))
                    } else w.information("hasCoinPrize false")
                } else w.information("canPopToday false")
            })
        }

        hasCoinPrize() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                try {
                    let t = yield f.fetchSlRes({url: "/xlppc.coin.task/api/v2/get_task_info", data: {}, method: "get"});
                    if (null !== t && void 0 !== t && 200 === t.status) {
                        let i = t.data;
                        w.information("data", i), 0 !== i.code || p.isNullOrUndefined(i.data) || p.isNullOrUndefined(i.data.task1010) || 1 !== i.data.task1010.status || (e = !0)
                    }
                } catch (e) {
                }
                return e
            })
        }

        canPopState() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    let t = yield d.asyncRemoteCall.getCurrentWindow();
                    if (!t || (yield t.isDestroyed())) break;
                    if ((yield t.isMinimized()) || !(yield t.isVisible())) {
                        w.information("mainWindow minimized or hide");
                        break
                    }
                    let i = yield c.client.callServerFunction("GetCurrentNav");
                    if (i !== m.NavViewID.Download) {
                        w.information("GetCurrentNav", i);
                        break
                    }
                    e = !0
                } while (0);
                return e
            })
        }

        canPopToday() {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    if (!(yield c.client.callServerFunction("IsLogined"))) {
                        w.information("not login");
                        break
                    }
                    let t = yield c.client.callServerFunction("GetUserID");
                    if (!t || "" === t || "0" === t) {
                        w.information("userId invalid");
                        break
                    }
                    let i = l.ConfigNS.getValue("Toast", "GetCoinPrizePopDate" + t, "");
                    if ((new Date).toLocaleDateString() === i) {
                        if (l.ConfigNS.getValue("Toast", "GetCoinPrizePopClick" + t, !1)) {
                            w.information("toast clicked.");
                            break
                        }
                        let e = l.ConfigNS.getValue("Toast", "GetCoinPrizePopTimes" + t, 0);
                        if (e >= 2) {
                            w.information("canPopToday false, pop times today", e);
                            break
                        }
                    }
                    e = !0
                } while (0);
                return e
            })
        }

        getCurrentPopTimes() {
            return n(this, void 0, void 0, function* () {
                let e = -1;
                do {
                    if (!(yield c.client.callServerFunction("IsLogined"))) {
                        w.information("not login");
                        break
                    }
                    let t = yield c.client.callServerFunction("GetUserID");
                    if (!t || "" === t || "0" === t) {
                        w.information("userId invalid");
                        break
                    }
                    let i = l.ConfigNS.getValue("Toast", "GetCoinPrizePopDate" + t, "");
                    if ((new Date).toLocaleDateString() === i) {
                        if (l.ConfigNS.getValue("Toast", "GetCoinPrizePopClick" + t, !1)) {
                            w.information("pop clicked.");
                            break
                        }
                        let i = l.ConfigNS.getValue("Toast", "GetCoinPrizePopTimes" + t, 0);
                        if (1 === i) {
                            w.information("isSecondTimePop, pop times today", i), e = 2;
                            break
                        }
                    }
                    e = 1
                } while (0);
                return e
            })
        }

        getToastTime() {
            return n(this, void 0, void 0, function* () {
                let e = 0;
                do {
                    let t = yield c.client.callServerFunction("GetUserID");
                    if (!t || "" === t || "0" === t) {
                        w.information("userId invalid");
                        break
                    }
                    let i = l.ConfigNS.getValue("Toast", "GetCoinPrizePopDate" + t, "");
                    if ("" === i) {
                        e = 6e4;
                        break
                    }
                    if ((new Date).toLocaleDateString() === i) {
                        if (l.ConfigNS.getValue("Toast", "GetCoinPrizePopClick" + t, !1)) {
                            w.information("pop clicked.");
                            break
                        }
                        let i = l.ConfigNS.getValue("Toast", "GetCoinPrizePopTimes" + t, 0);
                        w.information("pop times today", i), 1 === i ? e = 1e4 : 0 === i && (e = 6e4)
                    } else e = 6e4
                } while (0);
                return e
            })
        }

        addPopTimes() {
            return n(this, void 0, void 0, function* () {
                do {
                    let e = yield c.client.callServerFunction("GetUserID");
                    if (!e || "" === e || "0" === e) break;
                    let t = 0, i = l.ConfigNS.getValue("Toast", "GetCoinPrizePopDate" + e, ""),
                        n = (new Date).toLocaleDateString();
                    "" !== i && n === i && (t = l.ConfigNS.getValue("Toast", "GetCoinPrizePopTimes" + e, 0)), l.ConfigNS.setValue("Toast", "GetCoinPrizePopDate" + e, n), l.ConfigNS.setValue("Toast", "GetCoinPrizePopTimes" + e, t + 1), l.ConfigNS.setValue("Toast", "GetCoinPrizePopClick" + e, !1)
                } while (0)
            })
        }

        onCheckMainWindowState() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (!(yield this.canPopState())) {
                        w.information("onCheckMainWindowState canPopState || getCurrentPopTimes false");
                        break
                    }
                    this.toastNotify().catch()
                } while (0)
            })
        }

        init() {
            return n(this, void 0, void 0, function* () {
                this.taskStatusChangedEventId = y.attachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, (...e) => {
                    e && e[0] === r.DownloadKernel.TaskEventType.StatusChanged && this.onTaskStatusChanged(e[1])
                });
                let e = yield d.asyncRemoteCall.getCurrentWindow();
                this.checkMainWindowStateListener = this.onCheckMainWindowState.bind(this), e.on("show", this.checkMainWindowStateListener), e.on("restore", this.checkMainWindowStateListener), T.on(u.TabEventManagerNS.EventType.ChangeTab, this.checkMainWindowStateListener), (yield this.canPopState()) && this.toastNotify().catch(), this.loginEventId = g.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => n(this, void 0, void 0, function* () {
                    (yield this.canPopState()) && this.toastNotify().catch()
                }))
            })
        }

        uninit() {
            return n(this, void 0, void 0, function* () {
                this.taskStatusChangedEventId && (y.detachTaskEvent(r.DownloadKernel.TaskEventType.StatusChanged, this.taskStatusChangedEventId), this.taskStatusChangedEventId = void 0);
                let e = yield d.asyncRemoteCall.getCurrentWindow();
                e.removeListener("show", this.checkMainWindowStateListener), e.removeListener("restore", this.checkMainWindowStateListener), T.removeListener(u.TabEventManagerNS.EventType.ChangeTab, this.checkMainWindowStateListener), this.checkMainWindowStateListener = null, this.loginEventId && (g.NativeCallModule.nativeCall.DetachNativeEvent("onLoginSuc", this.loginEventId), this.loginEventId = void 0)
            })
        }
    }

    let C = null;
    t.initGetCoinPrizeToast = function () {
        C || (C = new k), C.init().catch()
    }, t.uninitGetCoinPrizeToast = function () {
        C && C.uninit().catch()
    }
}, function (e, t, i) {
    "use strict";
    var n = i(992);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(173);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(422), o = i(175);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(915);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(177);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\search-view\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(426), o = i(179);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(745);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\search-view\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(433), o = i(181);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(744);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\address-bar\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(183);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\address-bar\\address-bar-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(460), o = i(185);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\address-bar\\address-bar.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(996);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(998);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(187);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(427), o = i(189);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(191);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\home-page\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(439), o = i(193);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(750);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "02fe07d9", null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\home-page\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1e3);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(2), r = o.default.getLogger("Thunder.renderer.contextmenu"), s = i(5), l = i(8), d = i(19),
        u = i(7), c = i(45), h = i(104), f = i(3), p = i(42), g = i(39), m = i(4), v = i(31), y = i(12),
        T = u.default(a.join(__rootDir, "../bin/ThunderHelper.node")),
        w = ".asf;.avi;.exe;.iso;.mp3;.mp4;.mkv;.mpeg;.mpg;.mpga;.ra;.rar;||.rm;.rmvb;.tar;.wma;.wmp;.wmv;.mov;.zip;.3gp;.chm;.mdf;",
        k = ["http://", "https://", "ftp://"], C = ["thunder://", "thunders://", "ed2k://", "magnet:"];

    function b(e) {
        let t = !1;
        if (e) for (let i = 0; i < k.length; ++i) {
            let n = k[i];
            if (0 === e.indexOf(n)) {
                t = !0;
                break
            }
        }
        return t
    }

    function I(e) {
        let t = !1;
        if (e) for (let i = 0; i < C.length; ++i) {
            let n = C[i];
            if (0 === e.indexOf(n)) {
                t = !0;
                break
            }
        }
        return t
    }

    function S(e) {
        let t = [], i = e;
        if (p.Common.isThunderPrivateUrl(i) && (i = p.Common.parseThunderPrivateUrl(i)), function (e) {
            let t = !1;
            do {
                if (!e) break;
                if (b(e)) {
                    let i = a.extname(e);
                    if (!i || i.length <= 0) break;
                    i += ";", w.indexOf(i) > -1 && (t = !0)
                } else I(e) && (t = !0)
            } while (0);
            return t
        }(i)) {
            let n = v.ThunderHelper.getTaskTypeFromUrl(i);
            if (n === m.DownloadKernel.TaskType.P2sp || n === m.DownloadKernel.TaskType.Emule) t.push(e); else if (n === m.DownloadKernel.TaskType.Magnet || n === m.DownloadKernel.TaskType.Bt) return g.ThunderNewTask.createBtTaskWindow({
                url: e,
                type: "url"
            }, {browser: "xlbrowser.exe"}), !0
        }
        return t.length > 0 && (g.ThunderNewTask.createPreNewTaskWindow(t), !0)
    }

    function _(e, t) {
        return n(this, void 0, void 0, function* () {
            let n = null, o = !1;
            try {
                n = yield(yield i(18)).get(e)
            } catch (e) {
            }
            return null !== n && void 0 !== n.status && 200 === n.status && null !== n.data && (o = yield l.FileSystemAWNS.writeFileAW(t, n.data)), o
        })
    }

    function D(e) {
        do {
            if (s.isNullOrUndefined(e)) break;
            let t = e;
            !1 === N(e) && (t = (t = c.default.getConfigValue("search", "search_engine_url", "https://www.baidu.com/s?tn=48021271_21_hao_pg&wd=$word$")).replace("$word$", e)), f.client.callServerFunction("openNewTab", t).catch()
        } while (0)
    }

    t.contextMenuPage = [{
        label: "返回", onclick: function (e, t) {
            r.information("goBack"), e.goBack()
        }, onadded: (e, t, i, n) => {
            e.isBackwardEnable() || i.setEnable(t, !1)
        }
    }, {
        label: "前进", onclick: function (e, t) {
            e.goForward()
        }, onadded: (e, t, i, n) => {
            e.isForwardEnable() || i.setEnable(t, !1)
        }
    }, {
        label: "重新加载", onclick: function (e, t) {
            e.refresh()
        }
    }, {
        label: "另存为", onclick: function (e, t) {
            return n(this, void 0, void 0, function* () {
                if (S(t.linkURL)) return;
                let e = yield y.asyncRemoteCall.getCurrentWindow(), i = yield y.asyncRemoteCall.getDialog();
                i.showSaveDialog(e, {
                    defaultPath: "新建网页.html",
                    filters: [{name: "网页 HTML（*.html）", extensions: ["html"]}]
                }).then(e => {
                    if (e.canceled) return;
                    let i = e.filePath;
                    if (void 0 === i || "" === i) return;
                    let n = a.extname(i);
                    ".html" !== n.toLowerCase() && (i += ".html"), setTimeout(() => {
                        _(t.pageURL, i).catch()
                    }, 0)
                }).catch()
            })
        }
    }, {
        label: "查看网页源代码", onclick: function (e, t) {
            f.client.callServerFunction("OpenNewTab", "view-source:" + t.pageURL).catch()
        }
    }], t.contextMenuDownloadableLink = [{label: "在新标签页打开链接", onclick: x}, {
        label: "链接另存为",
        onclick: E
    }, {
        label: "复制链接地址", onclick: function (e, t) {
            T.copyTextToClipBoard(t.linkURL)
        }
    }], t.contextMenuMedia = [{
        label: "在新标签页中打开图片", onclick: function (e, t) {
            D(t.sourceURL)
        }
    }, {
        label: "图片另存为", onclick: function (e, t) {
            return n(this, void 0, void 0, function* () {
                let e = a.basename(t.sourceURL), o = a.extname(e);
                "" === e && (e = function () {
                    let e = "";
                    for (let t = 1; t <= 32; t++) {
                        let i = Math.floor(16 * Math.random()).toString(16);
                        e += i, 8 !== t && 12 !== t && 16 !== t && 20 !== t || (e += "-")
                    }
                    return e
                }() + o);
                let r = void 0;
                r = "" !== o ? {
                    defaultPath: e,
                    filters: [{name: "图片（*" + o + "）", extensions: [o]}, {name: "所有文件", extensions: ["*"]}]
                } : {defaultPath: e, filters: [{name: "所有文件", extensions: ["*"]}]};
                let s = yield y.asyncRemoteCall.getCurrentWindow(), d = yield y.asyncRemoteCall.getDialog();
                d.showSaveDialog(s, r).then(e => {
                    let o = e.filePath;
                    void 0 !== o && "" !== o && setTimeout(() => {
                        (function (e, t) {
                            return n(this, void 0, void 0, function* () {
                                let n = null, o = !1;
                                try {
                                    n = yield(yield i(18)).get(e, {responseType: "arraybuffer"})
                                } catch (e) {
                                }
                                return null !== n && void 0 !== n.status && 200 === n.status && null !== n.data && (o = yield l.FileSystemAWNS.writeFileAW(t, n.data)), o
                            })
                        })(t.sourceURL, o).catch()
                    }, 0)
                }).catch()
            })
        }
    }, {
        label: "复制图片", onclick: function (e, t) {
            setTimeout(() => {
                (function (e) {
                    return n(this, void 0, void 0, function* () {
                        let t = null, n = !1;
                        try {
                            t = yield(yield i(18)).get(e, {responseType: "arraybuffer"})
                        } catch (e) {
                            return !1
                        }
                        if (null !== t && void 0 !== t.status && 200 === t.status && null !== t.data) {
                            let e = "data:" + t.headers["content-type"] + ";base64," + new Buffer(t.data).toString("base64"),
                                o = i(19).nativeImage.createFromDataURL(e);
                            d.clipboard.clear(), d.clipboard.writeImage(o), n = !0
                        }
                        return n
                    })
                })(t.sourceURL).catch()
            }, 0)
        }
    }, {
        label: "复制图片地址", onclick: function (e, t) {
            T.copyTextToClipBoard(t.sourceURL)
        }
    }], t.contextMenuSelection = [{
        label: "复制", onclick: function (e, t) {
            e.editCopy()
        }
    }, {
        label: "用百度搜索", onclick: function (e, t) {
            let i = c.default.getConfigValue("search", "search_engine_url", "https://www.baidu.com/s?tn=48021271_21_hao_pg&wd=$word$");
            i = i.replace("$word$", t.selectionText), f.client.callServerFunction("OpenNewTab", i).catch()
        }
    }], t.contextMenuEditable = [{
        label: "撤销", onclick: function (e, t) {
            e.editUndo()
        }
    }, {
        label: "剪切", onclick: function (e, t) {
            e.editCut()
        }
    }, {
        label: "复制", onclick: function (e, t) {
            e.editCopy()
        }
    }, {
        label: "粘贴", onclick: function (e, t) {
            e.editPaste()
        }
    }, {
        label: "删除", onclick: function (e, t) {
            e.editDelete()
        }
    }, {
        label: "全选", onclick: function (e, t) {
            e.editSelectAll()
        }
    }], t.contextMenuLink = [{label: "在新标签页打开链接", onclick: x}, {label: "链接另存为", onclick: E}, {
        label: "复制链接地址",
        onclick: function (e, t) {
            T.copyTextToClipBoard(t.linkURL), S(t.linkURL) && r.information(t.linkURL)
        }
    }];
    let A = {
        page: t.contextMenuPage,
        selection: t.contextMenuSelection,
        edit: t.contextMenuEditable,
        link: t.contextMenuLink,
        media: t.contextMenuMedia
    };

    function N(e) {
        let t = !1;
        do {
            let i = e.trim();
            if (s.isNullOrUndefined(i)) break;
            if (t = /([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test(i)) {
                t = 1 === T.isPingHostValid(i)
            }
        } while (0);
        return t
    }

    function x(e, t) {
        S(t.linkURL) ? r.information(t.linkURL) : D(t.linkURL)
    }

    function E(e, t) {
        return n(this, void 0, void 0, function* () {
            if (S(t.linkURL)) return;
            let e = yield y.asyncRemoteCall.getCurrentWindow();
            (yield y.asyncRemoteCall.getDialog()).showSaveDialog(e, {
                defaultPath: "新建网页.html",
                filters: [{name: "网页 HTML（*.html）", extensions: ["html"]}]
            }).then(e => {
                if (e.canceled) return;
                let i = e.filePath;
                void 0 !== i && "" !== i && (".html" !== a.extname(i).toLowerCase() && (i += ".html"), setTimeout(() => {
                    _(t.linkURL, i).catch()
                }, 0))
            }).catch()
        })
    }

    t.registerContextMenu = function (e) {
        e && (e.on("before-context-menu", (e, t, i, n) => {
            let o = e.target, a = [];
            n.elemTypeFlag & h.PopupElemTypeFlag.EDITABLE ? a.push(...A.edit) : (n.elemTypeFlag & h.PopupElemTypeFlag.MEDIA && a.push(...A.media), n.elemTypeFlag & h.PopupElemTypeFlag.LINK && a.push(...A.link), n.elemTypeFlag & h.PopupElemTypeFlag.SELECTION && a.push(...A.selection)), n.elemTypeFlag & h.PopupElemTypeFlag.PAGE && 0 === a.length && a.push(...A.page);
            let r = new Map;
            a.forEach((t, o) => {
                if ("separate" === t.type) i.addSeparator(); else {
                    let o = i.addItem(t.label);
                    t.onadded && t.onadded(e.target, o, i, n), r.set(o, t)
                }
            }), o.curRegistryMap = r, o.curMenuParam = n
        }), e.on("context-menu-command", (e, t, i) => {
            let n = e.target, o = n.curRegistryMap, a = n.curMenuParam;
            n.curRegistryMap = null, n.curMenuParam = null;
            let s = o.get(i);
            null !== s ? s.onclick(e.target, a) : r.warning("unknown menu command", i, o)
        }))
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), t.unread = function (e) {
        return e > 99 ? "..." : e ? String(e) : ""
    }
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(195);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\browser-view\\browser-view-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(440), o = i(197);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(545), i(756);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "6f847208", null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\browser-view\\browser-view.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1002);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1007);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(199);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\message-view\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(428), o = i(201);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(759);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "0302fe79", null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\message-view\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1009);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(424), o = i(203);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(761);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\pan-view.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1011);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(205);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(429), o = i(207);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(209);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\tool-bar\\tool-bar-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(441), o = i(211);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\tool-bar\\tool-bar.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(213);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\tool-bar\\tool-bar-button-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(471), o = i(215);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\tool-bar\\tool-bar-button.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(217);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\tool-bar\\tool-bar-vip-button-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(472), o = i(219);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\tool-bar\\tool-bar-vip-button.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(17), a = i(9), r = i(18), s = i(2), l = i(8), d = i(66),
        u = i(0).default.getLogger("DownloadPanel.ToolBarVipButton");

    class c {
        constructor() {
            this.mPeerId = void 0, this.mUserId = "0", this.mSessionId = void 0, this.mIsLogin = !1, this.mIsVip = !1, this.mVipLevel = 0, this.mVasType = 0, this.mVipData = null
        }

        get vasType() {
            return this.mVasType
        }

        get vipLevel() {
            return this.mVipLevel
        }

        get userId() {
            return this.mUserId
        }

        get isLogin() {
            return this.mIsLogin
        }

        get isVip() {
            return this.mIsVip
        }

        get isPlatinumVip() {
            return this.isVip && this.mVasType > 2
        }

        get isSuperVip() {
            return this.isVip && 5 === this.mVasType
        }

        get vipData() {
            return this.mVipData
        }

        getSessionId() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    this.mSessionId ? e(this.mSessionId) : o.NativeCallModule.nativeCall ? o.NativeCallModule.nativeCall.CallNativeFunction("GetSessionID", (t, i) => {
                        0 === t && (this.mSessionId = i), e(this.mSessionId || "0")
                    }) : e(this.mSessionId || "0")
                })
            })
        }

        getPeerId() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    this.mPeerId ? e(this.mPeerId) : o.NativeCallModule.nativeCall ? o.NativeCallModule.nativeCall.CallNativeFunction("GetPeerID", (t, i) => {
                        0 === t && i && "" !== i && (this.mPeerId = i), e(this.mPeerId || "")
                    }) : e(this.mPeerId || "")
                })
            })
        }

        getUserinfo() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    let t = null;
                    o.NativeCallModule.nativeCall ? o.NativeCallModule.nativeCall.CallNativeFunction("GetAllUserInfo", (i, n) => {
                        0 === i && (t = n), e(t)
                    }) : e(t)
                })
            })
        }

        parseUserInfo() {
            return n(this, void 0, void 0, function* () {
                let e = yield this.getUserinfo();
                if (e) if (this.mIsLogin = !0, this.mUserId = e.userID || "0", e.vipList && e.vipList[0]) {
                    if (e.vipList[0].isVip) {
                        let t = Number(e.vipList[0].isVip).valueOf();
                        this.mIsVip = t > 0
                    } else this.mIsVip = !1;
                    e.vipList[0].vipLevel && (this.mVipLevel = Number(e.vipList[0].vipLevel).valueOf()), e.vipList[0].vasType && (this.mVasType = Number(e.vipList[0].vasType).valueOf()), this.mVipData = e.vipList[0]
                } else this.mIsVip = !1
            })
        }

        onLogin() {
            return n(this, void 0, void 0, function* () {
                this.clear(), yield this.parseUserInfo()
            })
        }

        onLogout() {
            this.clear()
        }

        clear() {
            this.mUserId = "0", this.mSessionId = void 0, this.mIsVip = !1, this.mIsLogin = !1, this.mVasType = 0, this.mVipLevel = 0
        }
    }

    t.UserHelper = c;
    t.VipIconMgr = class {
        constructor(e) {
            this.mVueObj = null, this.mVipIconData = null, this.mModel = "b", this.mUserHelper = null, this.mUsedDLVipCache = null, this.mUpdateType = "", this.mIsFirstLoad = !0, this.mVueObj = e, this.mUserHelper = new c
        }

        init() {
            return n(this, void 0, void 0, function* () {
                try {
                    r.default.defaults.adapter = i(21), r.default.get("http://act.vip.xunlei.com/vip/2018/ssi/vipiconData.js", {timeout: 1e4}).then(e => n(this, void 0, void 0, function* () {
                        if (o.NativeCallModule.nativeCall && null !== e && 200 === e.status && null !== e.data && "string" == typeof e.data.atestuids) {
                            this.mVipIconData = e.data.btpl;
                            let t = yield this.mUserHelper.getPeerId();
                            u.information(`init: peerid=${t},ipData.data.atestuids=${e.data.atestuids}`), "" !== t && 16 === t.length && -1 !== e.data.atestuids.toLowerCase().indexOf(t.toLowerCase()[11]) && (this.mVipIconData = e.data.atpl, this.mModel = "a"), this.attachUserEvents(), this.updateUI().catch()
                        } else this.sendStat("download_leftpanel", "top_vipicon_show")
                    })).catch(e => {
                        u.warning(e)
                    })
                } catch (e) {
                    u.information(e)
                }
            })
        }

        sendStat(e, t, i = "") {
            let n = 0;
            this.mUserHelper.isLogin && (n = 5 === this.mUserHelper.vasType ? 5 : this.mUserHelper.vasType > 2 ? 3 : 2);
            let o = "";
            "newuser" === this.mUpdateType ? o = "new" : "inner15" === this.mUpdateType ? o = "expire_1_15" : "out15" === this.mUpdateType && (o = "expire_15+");
            let r = `is_red=${this.mVueObj.hasRedPoint ? 1 : 0},is_login=${this.mUserHelper.isLogin ? 1 : 0},is_vip=${this.mUserHelper.isVip ? 1 : 0},user_type=${o},vip_type=${n},test_type=${this.mModel}`;
            "" !== i && (r = `${r},${i}`), u.information(`sendStat: event=${e}, attr1=${t}, statExtData=${r}`), r = encodeURIComponent(r), a.XLStatNS.trackEvent(e, t, "", 0, 0, 0, 0, r)
        }

        updateUIDefault() {
            this.mVueObj.cfgType = "", this.mVueObj.hasRedPoint = !1, this.mVueObj.clickUrl = "https://vip.xunlei.com/index.html?referfrom=v_pc_xlx_ggong_taskbar_vip", this.mVueObj.vipIcon = "", this.mVueObj.hoverTitle = ""
        }

        updateUI() {
            return n(this, void 0, void 0, function* () {
                if (yield this.isLogin()) if (yield this.mUserHelper.onLogin(), this.mUserHelper.isVip) {
                    let e = "vip", t = "LastLink_PlatinumVip_" + String(this.mUserHelper.userId);
                    this.mUserHelper.isSuperVip && (e = "super", t = "LastLink_SuperVip_" + String(this.mUserHelper.userId)), this.updateUIPrivate(e, t)
                } else {
                    null === this.mUsedDLVipCache && (this.mUsedDLVipCache = {});
                    let e = () => {
                        if (0 === this.mUsedDLVipCache[this.mUserHelper.userId] || 2 === this.mUsedDLVipCache[this.mUserHelper.userId]) this.updateUIPrivate("newuser", "LastLink_Newuser_" + String(this.mUserHelper.userId)); else {
                            let e = "inner15", t = "LastLink_Inner15_" + String(this.mUserHelper.userId);
                            15 < this.calculateExpireDate() && (e = "out15", t = "LastLink_Out15_" + String(this.mUserHelper.userId)), this.updateUIPrivate(e, t)
                        }
                    };
                    if (void 0 === this.mUsedDLVipCache[this.mUserHelper.userId]) try {
                        let t = yield this.mUserHelper.getSessionId();
                        this.queryUsedToBeDLVip(this.mUserHelper.userId, t).then(t => {
                            null !== t && 200 === t.status && null !== t.data && 1 === t.data.code && null !== t.data.result && void 0 !== t.data.result.usedToBeDLVip ? (this.mUsedDLVipCache[this.mUserHelper.userId] = Number(t.data.result.usedToBeDLVip).valueOf(), e()) : this.updateUIDefault()
                        }).catch(e => {
                            u.warning(e), this.updateUIDefault()
                        })
                    } catch (e) {
                        u.information(e), this.updateUIDefault()
                    } else e()
                } else this.mIsFirstLoad ? (this.mIsFirstLoad = !1, setTimeout(() => n(this, void 0, void 0, function* () {
                    (yield this.isLogin()) || this.updateUIPrivate("visitor", "LastLink_UnLogin")
                }), 3e3)) : this.updateUIPrivate("visitor", "LastLink_UnLogin")
            })
        }

        calculateExpireDate() {
            if (!this.mUserHelper.vipData || !this.mUserHelper.vipData.expireDate) return 0;
            let e, t, i;
            e = this.mUserHelper.vipData.expireDate.substring(0, 4), t = this.mUserHelper.vipData.expireDate.substring(4, 6), i = this.mUserHelper.vipData.expireDate.substring(6, 8);
            let n = new Date(e + "-" + t + "-" + i + " 00:00:00").getTime() / 1e3, o = new Date(Date.now()),
                a = o.getFullYear(), r = o.getMonth(), s = o.getDate(),
                l = (o = new Date(a + "-" + (r < 10 ? "0" + (r + 1) : r + 1) + "-" + (s < 10 ? "0" + s : s) + " 00:00:00")).getTime() / 1e3;
            return Math.ceil((l - n) / 86400)
        }

        updateUIPrivate(e, t) {
            u.information(`updateUIPrivate: updateType=${e}, cfgType=${t}`), this.mUpdateType = e;
            let i = Date.now(), a = i;
            this.mVipIconData && this.mVipIconData[e] && this.mVipIconData[e].online && (a = new Date(this.mVipIconData[e].online).getTime());
            let r = i;
            this.mVipIconData && this.mVipIconData[e] && this.mVipIconData[e].offline && (r = new Date(this.mVipIconData[e].offline).getTime()), u.information("updateUIPrivate, curDate=" + String(i) + ", onlineDate=" + String(a) + ", offlineDate=" + String(r)), a >= i || i >= r || o.NativeCallModule.nativeCall.CallNativeFunction("GetValue", "ToolBarButtonVipIcon", t, "", (i, o) => n(this, void 0, void 0, function* () {
                let n = "";
                0 === i && (n = o);
                let a = this.mVueObj.clickUrl;
                this.mVipIconData && this.mVipIconData[e] && ("string" == typeof this.mVipIconData[e].xdslink && "" !== this.mVipIconData[e].xdslink ? a = this.mVipIconData[e].xdslink.trim() : "string" == typeof this.mVipIconData[e].link && "" !== this.mVipIconData[e].link && (a = this.mVipIconData[e].link.trim()));
                let r = "";
                r = "newuser" === this.mUpdateType ? "v_pc_xlx_ggong_taskbar_new" : "inner15" === this.mUpdateType ? "v_pc_xlx_ggong_taskbar_expire1" : "out15" === this.mUpdateType ? "v_pc_xlx_ggong_taskbar_over15" : "super" === this.mUpdateType ? "v_pc_xlx_ggong_taskbar_vip" : "vip" === this.mUpdateType ? "v_pc_xlx_ggong_taskbar_vip" : "v_pc_xlx_ggong_taskbar_nolog", r += "_", r += this.mModel, -1 === a.toLowerCase().indexOf("referfrom") && (a = -1 === a.indexOf("?") ? `${a}?referfrom=${r}` : `${a}&referfrom=${r}`), this.mVueObj.clickUrl = a, this.mVueObj.cfgType = t, this.mVueObj.hasRedPoint = n !== a;
                let c = "";
                this.mVipIconData && this.mVipIconData[e] && this.mVipIconData[e].xdsicon && (c = this.mVipIconData[e].xdsicon);
                let h = s.resolve(__profilesDir, "VipDownload/vipicon");
                if ((yield l.FileSystemAWNS.mkdirsAW(h)) && "" !== c) {
                    let e = s.basename(c), t = s.join(h, e), i = c, n = String(1e6 * Math.random()).valueOf();
                    i.indexOf("?") >= 0 ? i += "&rd=" + n : i += "?rd=" + n, d.AxiosNS.downloadFileAW(i, t).then(i => {
                        u.information("下载图片：result = ", i, ";fileName = ", e), this.mVueObj.vipIcon = i ? "file://" + t : ""
                    }).catch(e => {
                        u.warning(e), this.mVueObj.vipIcon = ""
                    })
                } else this.mVueObj.vipIcon = "";
                let f = "";
                this.mVipIconData && this.mVipIconData[e] && this.mVipIconData[e].hover && (f = this.mVipIconData[e].hover), "" !== f && (this.mVueObj.hoverTitle = f), this.sendStat("download_leftpanel", "top_vipicon_show")
            }))
        }

        queryUsedToBeDLVip(e, t) {
            return n(this, void 0, void 0, function* () {
                try {
                    let n = `http://soa.vip.xunlei.com/xlvip.common.mooseapi/querytags?userid=${e}&sessionid=${t}&tags=usedToBeDLVip&platform=xlx`;
                    return r.default.defaults.adapter = i(21), r.default.get(n, {timeout: 1e4})
                } catch (e) {
                    return e
                }
            })
        }

        isLogin() {
            return n(this, void 0, void 0, function* () {
                return new Promise(e => {
                    let t = null;
                    o.NativeCallModule.nativeCall ? o.NativeCallModule.nativeCall.CallNativeFunction("IsLogined", (i, n) => {
                        0 === i && (t = n), e(t)
                    }) : e(t)
                })
            })
        }

        attachUserEvents() {
            o.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", () => n(this, void 0, void 0, function* () {
                this.updateUI().catch()
            })), o.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => {
                this.mUserHelper.onLogout(), this.updateUI().catch()
            }), o.NativeCallModule.nativeCall.AttachNativeEvent("onUserInfoChange", (e, t) => n(this, void 0, void 0, function* () {
                yield this.onUserInfoChange(e, t)
            })), o.NativeCallModule.nativeCall.AttachNativeEvent("onLoginStatusChange", (e, t) => {
                this.onLoginStatusChange(t)
            })
        }

        onUserInfoChange(e, t) {
            return n(this, void 0, void 0, function* () {
                u.information("vipicon --\x3eonUserInfoChange"), "vipinfo" === e && this.updateUI().catch(), u.information("<--onUserInfoChange")
            })
        }

        onLoginStatusChange(e) {
            u.information("vipicon --\x3eonLoginStatusChange", "newStatus", e), "offline" === e && (this.mUserHelper.onLogout(), this.updateUI().catch()), u.information("<--onLoginStatusChange")
        }
    }
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(221);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\status-bar-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(442), o = i(223);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\status-bar.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(10), o = i(33), a = i(63);
    !function (e) {
        let t = 0, i = 0, r = "", s = 0, l = 0;

        function d() {
            let e = new Date;
            return e.getFullYear() + "." + (e.getMonth() + 1) + "." + e.getDate()
        }

        function u() {
            let e = !0;
            return d() === r && (e = !1), e
        }

        function c() {
            return n.ConfigNS.getValue("FlowMonitor", "DownloadSize", 0)
        }

        function h() {
            return n.ConfigNS.getValue("FlowMonitor", "UploadSize", 0)
        }

        function f(e, t) {
            n.ConfigNS.setValue("FlowMonitor", "DownloadSize", e), n.ConfigNS.setValue("FlowMonitor", "UploadSize", t), n.ConfigNS.setValue("FlowMonitor", "Date", d())
        }

        e.isDateChange = u, e.getDownloadSizeFromFile = c, e.getUploadSizeFromFile = h, e.setFlowData = f, e.startMonitor = function () {
            t = c(), i = h(), r = n.ConfigNS.getValue("FlowMonitor", "Date", ""), u() && (t = 0, i = 0, f(0, 0)), s = t, l = i, a.quitPromises.add(function () {
                return new Promise(e => {
                    f(s, l), n.ConfigNS.save().catch(), e(!0)
                })
            })
        }, e.getTodayDownloadSize = function () {
            let e = o.DownloadKernelManager.getTotalDownloadSize();
            return s = t + e
        }, e.getTodayUploadSize = function () {
            let e = o.DownloadKernelManager.getTotalUploadSize();
            return l = i + e
        }, e.getCurrentDownloadSpeed = function () {
            return o.DownloadKernelManager.getTotalTaskDownloadSpeed(!1)
        }, e.getCurrentVipSpeed = function () {
            return o.DownloadKernelManager.getTotalTaskVipSpeed(!1)
        }
    }(t.FlowMonitorNS || (t.FlowMonitorNS = {}))
}, function (e) {
    e.exports = {urls: [{url: "www.iqiyi.com"}, {url: "v.qq.com"}, {url: "www.youku.com"}, {url: "www.bilibili.com"}, {url: "www.pptv.com"}, {url: "www.youtube.com"}, {url: "tv.sohu.com"}, {url: "v.ifeng.com/film"}, {url: "www.mgtv.com"}, {url: "www.56.com"}, {url: "www.cctv.com"}, {url: "www.pps.tv"}, {url: "tv.sohu.com"}, {url: "www.tvb.com"}, {url: "www.wasu.cn"}, {url: "www.baomihua.com"}, {url: "www.1905.com"}, {url: "v.163.com"}, {url: "www.v1.cn"}, {url: "www.6.cn"}, {url: "www.tvbs.com.tw"}, {url: "www.tangdou.com"}, {url: "www.pipi.cn"}, {url: "www.360kan.com"}, {url: "www.le.com"}, {url: "v.baidu.com"}, {url: "www.tudou.com"}, {url: "www.douyu.com"}, {url: "www.huya.com"}, {url: "www.panda.tv"}, {url: "www.longzhu.com"}, {url: "www.zhanqi.tv"}, {url: "www.yy.com"}, {url: "www.huajiao.com"}]}
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(225);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\upgrade-task-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(443), o = i(227);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\upgrade-task.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(4), r = i(11), s = i(26), l = i(67), d = i(10), u = i(5),
        c = o.default.getLogger("PrivateSpace.Upgrade"), h = r.DownloadKernelTaskManager.getTaskManager(),
        f = s.DownloadKernelCategoryManager.getCategoryManager();

    class p {
        insertTaskToNewPrivateSpace(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let n = !1, o = yield l.TaskUtilitiesAWNS.batchFindTaskAW([i]);
                return (!o || o.length <= 0) && (c.information("insertTaskToNewPrivateSpace taskId:", t.getId(), ", findInfo:", i), n = h.moveCategoryTask(t.getId(), e.getId())), n
            })
        }

        getOldPrivateSpaceTaskList() {
            let e = [], t = f.getCategorys();
            for (let [, i]of t) {
                let t = i.getName(), n = i.getUserName();
                if (t === s.CategoryManager.privateCategoryName && "0" === n) {
                    let t = i.getCategoryViews();
                    for (let i = 0; i < t.length; i++) {
                        let n = t[i].getTasks();
                        for (let [, t]of n) e.push(t)
                    }
                }
            }
            return e
        }

        insertTaskListToNewPrivateSpace(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1, i = this.getOldPrivateSpaceTaskList();
                for (let n = 0; n < i.length; n++) {
                    let o = i[n], r = o.getType();
                    if (c.information("addTaskListToNewPrivateSpace taskType:", r), r === a.DownloadKernel.TaskType.P2sp) {
                        let i = o.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskUrl),
                            n = {taskType: a.DownloadKernel.TaskType.P2sp, value: i};
                        t = yield this.insertTaskToNewPrivateSpace(e, o, n)
                    } else if (r === a.DownloadKernel.TaskType.Bt) {
                        let i = o.getExtraObject().getInfoId(), n = {taskType: a.DownloadKernel.TaskType.Bt, value: i};
                        t = yield this.insertTaskToNewPrivateSpace(e, o, n)
                    } else if (r === a.DownloadKernel.TaskType.Emule) {
                        let i = o.getExtraObject().getFileHash(),
                            n = {taskType: a.DownloadKernel.TaskType.Emule, value: i};
                        t = yield this.insertTaskToNewPrivateSpace(e, o, n)
                    }
                }
                return t
            })
        }

        upgradePrivateSpace(e) {
            let t = !1, i = d.ConfigNS.getValue("TaskUpgrading", "UpgradedUsers", "");
            if (u.isString(i) || (i = ""), -1 === i.indexOf(e + ", ")) {
                let n = f.getPrivateCategoryFromUserId(e);
                n && (this.insertTaskListToNewPrivateSpace(n).catch(), i += e + ", ", d.ConfigNS.setValue("TaskUpgrading", "UpgradedUsers", i), t = !0)
            }
            return t
        }
    }

    t.PrivateSpaceUpgrade = p, function (e) {
        const t = new p;
        e.getUpgrade = function () {
            return t
        }
    }(t.PrivateSpaceUpgradeNS || (t.PrivateSpaceUpgradeNS = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(434), o = i(229);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\toast-notify\\toast-notify.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(444), o = i(231);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\toast-notify\\get-coin-prize-toast.vue", t.default = s.exports
}, function (e, t) {
    e.exports = "data:image/png;base64, "
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(435), o = i(233);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\ad-platform\\ad-platform.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(436), o = i(235);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\ad-platform\\ad-left-bottom.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(237);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(445), o = i(239);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(877);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "109c4717", null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(241);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\scan-code-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(473), o = i(243);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\scancode.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(41), a = i(2), r = i(5).promisify, s = i(0).default.getLogger("xmp-vip-fs-utilities");
    !function (e) {
        function t(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                if (void 0 !== e) {
                    const i = r(o.access);
                    try {
                        yield i(e), t = !0
                    } catch (e) {
                        s.information(e)
                    }
                }
                return t
            })
        }

        function l(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                if (void 0 !== e) {
                    const i = r(o.mkdir);
                    try {
                        yield i(e), t = !0
                    } catch (e) {
                        s.warning(e)
                    }
                }
                return t
            })
        }

        function d(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                if (void 0 !== e) {
                    const i = r(o.rmdir);
                    try {
                        yield i(e), t = !0
                    } catch (e) {
                        s.warning(e)
                    }
                }
                return t
            })
        }

        function u(e) {
            return n(this, void 0, void 0, function* () {
                let t = !1;
                if (void 0 !== e) {
                    const i = r(o.unlink);
                    try {
                        yield i(e), t = !0
                    } catch (e) {
                        s.warning(e)
                    }
                }
                return t
            })
        }

        function c(e) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                if (void 0 !== e) {
                    const i = r(o.readdir);
                    try {
                        t = yield i(e)
                    } catch (e) {
                        s.warning(e)
                    }
                }
                return t
            })
        }

        function h(e) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                if (void 0 !== e) {
                    const i = r(o.lstat);
                    try {
                        t = yield i(e)
                    } catch (e) {
                        s.warning(e)
                    }
                }
                return t
            })
        }

        function f(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                if (void 0 !== e && void 0 !== t) {
                    let n = a.join(e, t), o = yield h(n);
                    i = null !== o && o.isDirectory() ? yield p(n) : yield u(n)
                }
                return i
            })
        }

        function p(e) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                if (void 0 !== e) {
                    if (yield t(e)) {
                        i = !0;
                        let t = yield c(e);
                        for (let n = 0; n < t.length; n++) i = (yield f(e, t[n])) && i;
                        (i || 0 === t.length) && (i = (yield d(e)) && i)
                    }
                }
                return i
            })
        }

        function g(e) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                return s.information("mkdirsAW", e), void 0 !== e && ((yield t(e)) ? i = !0 : a.dirname(e) === e ? i = !1 : (yield g(a.dirname(e))) && (i = yield l(e))), i
            })
        }

        function m(e, i) {
            return n(this, void 0, void 0, function* () {
                let n;
                if (e.toLowerCase() !== i.toLowerCase() && (yield t(e))) {
                    let t = o.createReadStream(e), a = o.createWriteStream(i);
                    n = new Promise(e => {
                        t.pipe(a).on("finish", () => {
                            e(!0)
                        })
                    })
                } else n = new Promise(e => {
                    e(!1)
                });
                return n
            })
        }

        e.readFileAW = function (e) {
            return n(this, void 0, void 0, function* () {
                let t = null;
                if (void 0 !== e) {
                    const i = r(o.readFile);
                    try {
                        t = yield i(e)
                    } catch (e) {
                        s.warning(e)
                    }
                }
                return t
            })
        }, e.writeFileAW = function (e, t) {
            return n(this, void 0, void 0, function* () {
                let i = !1;
                if (void 0 !== e && null !== t) {
                    const n = r(o.writeFile);
                    try {
                        yield n(e, t), i = !0
                    } catch (e) {
                        s.warning(e)
                    }
                }
                return i
            })
        }, e.existsAW = t, e.mkdirAW = l, e.rmdirAW = d, e.unlinkAW = u, e.readdirAW = c, e.lstatAW = h, e.rmdirsAW = p, e.mkdirsAW = g, e.renameAW = function (e, t) {
            return n(this, void 0, void 0, function* () {
                if (void 0 !== e && void 0 !== t) {
                    const i = r(o.rename);
                    try {
                        yield i(e, t)
                    } catch (e) {
                        s.warning(e)
                    }
                }
            })
        }, e.copyFileAW = m, e.copyDirsAW = function e(i, o) {
            return n(this, void 0, void 0, function* () {
                let n = !1, r = yield h(i);
                if (r.isDirectory()) {
                    n = yield g(o);
                    let s = yield c(i);
                    for (let l = 0; l < s.length; l++) {
                        let d = a.join(i, s[l]), u = a.join(o, s[l]);
                        (n = yield t(d)) && (n = (r = yield h(d)).isDirectory() ? yield e(d, u) : yield m(d, u))
                    }
                }
                return n
            })
        }, e.mkdtempAW = function () {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                const t = r(o.mkdtemp), n = (yield Promise.resolve().then(() => i(55))).tmpdir();
                try {
                    e = yield t(`${n}${a.sep}`)
                } catch (e) {
                    s.warning(e)
                }
                return e
            })
        }
    }(t.FileSystemAWNS || (t.FileSystemAWNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(550), a = i(789), r = i(409), s = i(3), l = i(549),
        d = i(0).default.getLogger("VipDownload:token-query"), u = i(7), c = i(2),
        h = u.default(c.join(__rootDir, "../bin/ThunderHelper.node"));
    let f = c.join(__rootDir, "../../Thunder.exe"), p = h.getFileVersion(f).split("."), g = p[p.length - 1];

    class m extends r.HttpSession {
        constructor() {
            super(...arguments), this.mGcidTaskMap = new Map
        }

        queryToken(e) {
            return n(this, void 0, void 0, function* () {
                return this.queryImpl(e)
            })
        }

        queryStatus(e) {
            return n(this, void 0, void 0, function* () {
                return this.queryImpl(e, !0)
            })
        }

        queryImpl(e, t) {
            return n(this, void 0, void 0, function* () {
                let i = ++m.sequence, n = yield s.client.callServerFunction("GetUserID"),
                    a = e.verify || (yield s.client.callServerFunction("GetSessionID")), r = (new Date).getTime(),
                    d = e.verifyType, u = this.getUriParam(i, r, d);
                this.host = "ali.pc-x.speed.auth.vip.xunlei.com", this.retries = 2, this.timeout = 2e4;
                let c = t ? "/speed/res_status?" : "/speed/speedup?";
                this.path = c + u;
                let h = e.sessiontype, f = e.appid;
                return this.auth = o.HttpJsonCryptoNS.getAuthorization(n, a, h, f), this.accept = o.HttpJsonCryptoNS.getAccept(), e.userId = n, e.random = r, this.mGcidTaskMap.clear(), this.body = yield l.VipTaskHttpPackageNS.createTokenBuffer(e, this.mGcidTaskMap, t), yield this.postTokenRequest(e, t)
            })
        }

        postTokenRequest(e, t) {
            return n(this, void 0, void 0, function* () {
                return new Promise(i => n(this, void 0, void 0, function* () {
                    let o = yield s.client.callServerFunction("GetUserID");
                    this.post(r => n(this, void 0, void 0, function* () {
                        let n = [];
                        if (o === e.userId) {
                            let i = r.headers["random-num"];
                            d.information("random", i);
                            let o = null, s = void 0, u = void 0;
                            do {
                                if (200 !== (u = r.statusCode)) {
                                    s = a.HttpErrorNS.errorStatusCode;
                                    break
                                }
                                if (!r.body || !i) {
                                    s = a.HttpErrorNS.errorData;
                                    break
                                }
                                {
                                    let n = Number(i).valueOf();
                                    o = l.VipTaskHttpPackageNS.praseTokenBuffer(e.userId, n, r.body, t)
                                }
                                if (!o) {
                                    s = a.HttpErrorNS.errorPrase;
                                    break
                                }
                                s = a.HttpErrorNS.errorOk
                            } while (0);
                            n = yield this.createTokenResponse(s, e, u, o)
                        }
                        i(n)
                    }), t => n(this, void 0, void 0, function* () {
                        d.information("error", t);
                        let n = [];
                        o === e.userId && (n = yield this.createTokenResponse(a.HttpErrorNS.errorConnect, e)), i(n)
                    }))
                }))
            })
        }

        createTokenResponse(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                let n = [];
                if (e === a.HttpErrorNS.errorOk) if (0 === o.result && o.task_infos && o.task_infos.length > 0) for (let e of o.task_infos) {
                    let t = this.getSubIdByGcid(e.gcid);
                    if (void 0 !== t) {
                        let i = {
                            subId: t,
                            result: e.result,
                            message: e.simple_msg,
                            detailMessage: e.message,
                            token: e.token,
                            interval: e.time_interval,
                            maxTime: o.speed_duration
                        };
                        n.push(i)
                    }
                } else for (let e of t.files) {
                    let t = {subId: e.subId, result: o.result, message: o.message, detailMessage: o.detailMessage};
                    n.push(t)
                } else {
                    let o = void 0;
                    e === a.HttpErrorNS.errorStatusCode && (o = `new Error occupied, message status: ${i}`), o || (o = a.HttpErrorNS.getMessage(e));
                    for (let i of t.files) {
                        let t = {subId: i.subId, result: e, message: o};
                        n.push(t)
                    }
                }
                return n
            })
        }

        getSubIdByGcid(e) {
            return this.mGcidTaskMap.get(e)
        }

        getUriParam(e, t, i) {
            let n = "client_name=xl_pc&client_version=" + g + "&client_sequence=" + e + "&r=" + t + "&isvip=" + Number(0);
            return void 0 !== i && (n = n + "&verify_type=" + i), n
        }
    }

    m.sequence = 0, t.VipTaskHttpSession = m
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        let t;
        !function (e) {
            e[e.Commit = 0] = "Commit", e[e.Token = 1] = "Token", e[e.Acclerate = 2] = "Acclerate"
        }(t = e.ErrorStep || (e.ErrorStep = {}))
    }(t.HttpDefineNS || (t.HttpDefineNS = {})), function (e) {
        let t = new Map;
        e.getMessage = function (e) {
            return t.get(e)
        }, e.errorOk = 0, t.set(e.errorOk, "成功"), e.errorConnect = -1, t.set(e.errorConnect, "服务器响应超时"), e.errorStatusCode = -2, t.set(e.errorStatusCode, "服务器响应超时"), e.errorData = -3, t.set(e.errorData, "服务器响应超时"), e.errorPrase = -4, t.set(e.errorPrase, "服务器响应超时")
    }(t.HttpErrorNS || (t.HttpErrorNS = {}))
}, function (e, t) {
    e.exports = "data:image/png;base64, "
}, function (e, t) {
    e.exports = "data:image/png;base64, "
}, function (e, t) {
    e.exports = "data:image/png;base64, "
}, function (e, t, i) {
    var n = i(794), o = i(552), a = i(812), r = i(824), s = i(825), l = i(826);

    function d(e, t, i) {
        if (void 0 === e) throw new Error("String required as first argument");
        if (void 0 === i && (i = t, t = {}), "function" != typeof i) {
            if (!n()) throw new Error("Callback required as last argument");
            t = i || {}, i = null
        }
        return {opts: t, cb: i}
    }

    function u(e) {
        switch (e) {
            case"svg":
                return l;
            case"txt":
            case"utf8":
                return r;
            case"png":
            case"image/png":
            default:
                return a
        }
    }

    function c(e, t, i) {
        if (!i.cb) return new Promise(function (n, a) {
            try {
                var r = o.create(t, i.opts);
                return e(r, i.opts, function (e, t) {
                    return e ? a(e) : n(t)
                })
            } catch (e) {
                a(e)
            }
        });
        try {
            var n = o.create(t, i.opts);
            return e(n, i.opts, i.cb)
        } catch (e) {
            i.cb(e)
        }
    }

    t.create = o.create, t.toCanvas = i(827).toCanvas, t.toString = function (e, t, i) {
        var n = d(e, t, i);
        return c(function (e) {
            switch (e) {
                case"svg":
                    return l;
                case"terminal":
                    return s;
                case"utf8":
                default:
                    return r
            }
        }(n.opts.type).render, e, n)
    }, t.toDataURL = function (e, t, i) {
        var n = d(e, t, i);
        return c(u(n.opts.type).renderToDataURL, e, n)
    }, t.toBuffer = function (e, t, i) {
        var n = d(e, t, i);
        return c(u(n.opts.type).renderToBuffer, e, n)
    }, t.toFile = function (e, t, i, o) {
        if ("string" != typeof e || "string" != typeof t && "object" != typeof t) throw new Error("Invalid argument");
        if (arguments.length < 3 && !n()) throw new Error("Too few arguments provided");
        var a = d(t, i, o);
        return c(u(a.opts.type || function (e) {
            return e.slice(2 + (e.lastIndexOf(".") - 1 >>> 0)).toLowerCase()
        }(e)).renderToFile.bind(null, e), t, a)
    }, t.toFileStream = function (e, t, i) {
        if (arguments.length < 2) throw new Error("Too few arguments provided");
        var n = d(t, i, e.emit.bind(e, "error"));
        c(u("png").renderToFileStream.bind(null, e), t, n)
    }
}, function (e, t, i) {
    "use strict";
    var n = i(795);
    e.exports = function () {
        return "function" == typeof n.Promise && "function" == typeof n.Promise.prototype.then
    }
}, function (e, t, i) {
    "use strict";
    e.exports = "object" == typeof self && self.self === self && self || "object" == typeof global && global.global === global && global || this
}, function (e, t) {
    function i() {
        this.buffer = [], this.length = 0
    }

    i.prototype = {
        get: function (e) {
            var t = Math.floor(e / 8);
            return 1 == (this.buffer[t] >>> 7 - e % 8 & 1)
        }, put: function (e, t) {
            for (var i = 0; i < t; i++) this.putBit(1 == (e >>> t - i - 1 & 1))
        }, getLengthInBits: function () {
            return this.length
        }, putBit: function (e) {
            var t = Math.floor(this.length / 8);
            this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++
        }
    }, e.exports = i
}, function (e, t, i) {
    var n = i(93);

    function o(e) {
        if (!e || e < 1) throw new Error("BitMatrix size must be defined and greater than 0");
        this.size = e, this.data = new n(e * e), this.data.fill(0), this.reservedBit = new n(e * e), this.reservedBit.fill(0)
    }

    o.prototype.set = function (e, t, i, n) {
        var o = e * this.size + t;
        this.data[o] = i, n && (this.reservedBit[o] = !0)
    }, o.prototype.get = function (e, t) {
        return this.data[e * this.size + t]
    }, o.prototype.xor = function (e, t, i) {
        this.data[e * this.size + t] ^= i
    }, o.prototype.isReserved = function (e, t) {
        return this.reservedBit[e * this.size + t]
    }, e.exports = o
}, function (e, t, i) {
    var n = i(86).getSymbolSize;
    t.getRowColCoords = function (e) {
        if (1 === e) return [];
        for (var t = Math.floor(e / 7) + 2, i = n(e), o = 145 === i ? 26 : 2 * Math.ceil((i - 13) / (2 * t - 2)), a = [i - 7], r = 1; r < t - 1; r++) a[r] = a[r - 1] - o;
        return a.push(6), a.reverse()
    }, t.getPositions = function (e) {
        for (var i = [], n = t.getRowColCoords(e), o = n.length, a = 0; a < o; a++) for (var r = 0; r < o; r++) 0 === a && 0 === r || 0 === a && r === o - 1 || a === o - 1 && 0 === r || i.push([n[a], n[r]]);
        return i
    }
}, function (e, t, i) {
    var n = i(86).getSymbolSize;
    t.getPositions = function (e) {
        var t = n(e);
        return [[0, 0], [t - 7, 0], [0, t - 7]]
    }
}, function (e, t) {
    t.Patterns = {
        PATTERN000: 0,
        PATTERN001: 1,
        PATTERN010: 2,
        PATTERN011: 3,
        PATTERN100: 4,
        PATTERN101: 5,
        PATTERN110: 6,
        PATTERN111: 7
    };
    var i = 3, n = 3, o = 40, a = 10;

    function r(e, i, n) {
        switch (e) {
            case t.Patterns.PATTERN000:
                return (i + n) % 2 == 0;
            case t.Patterns.PATTERN001:
                return i % 2 == 0;
            case t.Patterns.PATTERN010:
                return n % 3 == 0;
            case t.Patterns.PATTERN011:
                return (i + n) % 3 == 0;
            case t.Patterns.PATTERN100:
                return (Math.floor(i / 2) + Math.floor(n / 3)) % 2 == 0;
            case t.Patterns.PATTERN101:
                return i * n % 2 + i * n % 3 == 0;
            case t.Patterns.PATTERN110:
                return (i * n % 2 + i * n % 3) % 2 == 0;
            case t.Patterns.PATTERN111:
                return (i * n % 3 + (i + n) % 2) % 2 == 0;
            default:
                throw new Error("bad maskPattern:" + e)
        }
    }

    t.isValid = function (e) {
        return null != e && "" !== e && !isNaN(e) && e >= 0 && e <= 7
    }, t.from = function (e) {
        return t.isValid(e) ? parseInt(e, 10) : void 0
    }, t.getPenaltyN1 = function (e) {
        for (var t = e.size, n = 0, o = 0, a = 0, r = null, s = null, l = 0; l < t; l++) {
            o = a = 0, r = s = null;
            for (var d = 0; d < t; d++) {
                var u = e.get(l, d);
                u === r ? o++ : (o >= 5 && (n += i + (o - 5)), r = u, o = 1), (u = e.get(d, l)) === s ? a++ : (a >= 5 && (n += i + (a - 5)), s = u, a = 1)
            }
            o >= 5 && (n += i + (o - 5)), a >= 5 && (n += i + (a - 5))
        }
        return n
    }, t.getPenaltyN2 = function (e) {
        for (var t = e.size, i = 0, o = 0; o < t - 1; o++) for (var a = 0; a < t - 1; a++) {
            var r = e.get(o, a) + e.get(o, a + 1) + e.get(o + 1, a) + e.get(o + 1, a + 1);
            4 !== r && 0 !== r || i++
        }
        return i * n
    }, t.getPenaltyN3 = function (e) {
        for (var t = e.size, i = 0, n = 0, a = 0, r = 0; r < t; r++) {
            n = a = 0;
            for (var s = 0; s < t; s++) n = n << 1 & 2047 | e.get(r, s), s >= 10 && (1488 === n || 93 === n) && i++, a = a << 1 & 2047 | e.get(s, r), s >= 10 && (1488 === a || 93 === a) && i++
        }
        return i * o
    }, t.getPenaltyN4 = function (e) {
        for (var t = 0, i = e.data.length, n = 0; n < i; n++) t += e.data[n];
        return Math.abs(Math.ceil(100 * t / i / 5) - 10) * a
    }, t.applyMask = function (e, t) {
        for (var i = t.size, n = 0; n < i; n++) for (var o = 0; o < i; o++) t.isReserved(o, n) || t.xor(o, n, r(e, o, n))
    }, t.getBestMask = function (e, i) {
        for (var n = Object.keys(t.Patterns).length, o = 0, a = 1 / 0, r = 0; r < n; r++) {
            i(r), t.applyMask(r, e);
            var s = t.getPenaltyN1(e) + t.getPenaltyN2(e) + t.getPenaltyN3(e) + t.getPenaltyN4(e);
            t.applyMask(r, e), s < a && (a = s, o = r)
        }
        return o
    }
}, function (e, t, i) {
    var n = i(93), o = i(802);

    function a(e) {
        this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree)
    }

    a.prototype.initialize = function (e) {
        this.degree = e, this.genPoly = o.generateECPolynomial(this.degree)
    }, a.prototype.encode = function (e) {
        if (!this.genPoly) throw new Error("Encoder not initialized");
        var t = new n(this.degree);
        t.fill(0);
        var i = n.concat([e, t], e.length + this.degree), a = o.mod(i, this.genPoly), r = this.degree - a.length;
        if (r > 0) {
            var s = new n(this.degree);
            return s.fill(0), a.copy(s, r), s
        }
        return a
    }, e.exports = a
}, function (e, t, i) {
    var n = i(93), o = i(803);
    t.mul = function (e, t) {
        var i = new n(e.length + t.length - 1);
        i.fill(0);
        for (var a = 0; a < e.length; a++) for (var r = 0; r < t.length; r++) i[a + r] ^= o.mul(e[a], t[r]);
        return i
    }, t.mod = function (e, t) {
        for (var i = new n(e); i.length - t.length >= 0;) {
            for (var a = i[0], r = 0; r < t.length; r++) i[r] ^= o.mul(t[r], a);
            for (var s = 0; s < i.length && 0 === i[s];) s++;
            i = i.slice(s)
        }
        return i
    }, t.generateECPolynomial = function (e) {
        for (var i = new n([1]), a = 0; a < e; a++) i = t.mul(i, [1, o.exp(a)]);
        return i
    }
}, function (e, t, i) {
    var n = i(93);
    if (n.alloc) var o = n.alloc(512), a = n.alloc(256); else o = new n(512), a = new n(256);
    !function () {
        for (var e = 1, t = 0; t < 255; t++) o[t] = e, a[e] = t, 256 & (e <<= 1) && (e ^= 285);
        for (t = 255; t < 512; t++) o[t] = o[t - 255]
    }(), t.log = function (e) {
        if (e < 1) throw new Error("log(" + e + ")");
        return a[e]
    }, t.exp = function (e) {
        return o[e]
    }, t.mul = function (e, t) {
        return 0 === e || 0 === t ? 0 : o[a[e] + a[t]]
    }
}, function (e, t, i) {
    var n = i(86), o = i(553), a = i(413), r = i(87), s = i(554), l = i(556), d = n.getBCHDigit(7973);

    function u(e, t) {
        return r.getCharCountIndicator(e, t) + 4
    }

    function c(e, t) {
        var i = 0;
        return e.forEach(function (e) {
            var n = u(e.mode, t);
            i += n + e.getBitsLength()
        }), i
    }

    t.from = function (e, t) {
        return s.isValid(e) ? parseInt(e, 10) : t
    }, t.getCapacity = function (e, t, i) {
        if (!s.isValid(e)) throw new Error("Invalid QR Code version");
        void 0 === i && (i = r.BYTE);
        var a = 8 * (n.getSymbolTotalCodewords(e) - o.getTotalCodewordsCount(e, t));
        if (i === r.MIXED) return a;
        var l = a - u(i, e);
        switch (i) {
            case r.NUMERIC:
                return Math.floor(l / 10 * 3);
            case r.ALPHANUMERIC:
                return Math.floor(l / 11 * 2);
            case r.KANJI:
                return Math.floor(l / 13);
            case r.BYTE:
            default:
                return Math.floor(l / 8)
        }
    }, t.getBestVersionForData = function (e, i) {
        var n, o = a.from(i, a.M);
        if (l(e)) {
            if (e.length > 1) return function (e, i) {
                for (var n = 1; n <= 40; n++) if (c(e, n) <= t.getCapacity(n, i, r.MIXED)) return n
            }(e, o);
            if (0 === e.length) return 1;
            n = e[0]
        } else n = e;
        return function (e, i, n) {
            for (var o = 1; o <= 40; o++) if (i <= t.getCapacity(o, n, e)) return o
        }(n.mode, n.getLength(), o)
    }, t.getEncodedBits = function (e) {
        if (!s.isValid(e) || e < 7) throw new Error("Invalid QR Code version");
        for (var t = e << 12; n.getBCHDigit(t) - d >= 0;) t ^= 7973 << n.getBCHDigit(t) - d;
        return e << 12 | t
    }
}, function (e, t, i) {
    var n = i(86), o = n.getBCHDigit(1335);
    t.getEncodedBits = function (e, t) {
        for (var i = e.bit << 3 | t, a = i << 10; n.getBCHDigit(a) - o >= 0;) a ^= 1335 << n.getBCHDigit(a) - o;
        return 21522 ^ (i << 10 | a)
    }
}, function (e, t, i) {
    var n = i(87), o = i(807), a = i(808), r = i(809), s = i(810), l = i(555), d = i(86), u = i(811);

    function c(e) {
        return unescape(encodeURIComponent(e)).length
    }

    function h(e, t, i) {
        for (var n, o = []; null !== (n = e.exec(i));) o.push({
            data: n[0],
            index: n.index,
            mode: t,
            length: n[0].length
        });
        return o
    }

    function f(e) {
        var t, i, o = h(l.NUMERIC, n.NUMERIC, e), a = h(l.ALPHANUMERIC, n.ALPHANUMERIC, e);
        return d.isKanjiModeEnabled() ? (t = h(l.BYTE, n.BYTE, e), i = h(l.KANJI, n.KANJI, e)) : (t = h(l.BYTE_KANJI, n.BYTE, e), i = []), o.concat(a, t, i).sort(function (e, t) {
            return e.index - t.index
        }).map(function (e) {
            return {data: e.data, mode: e.mode, length: e.length}
        })
    }

    function p(e, t) {
        switch (t) {
            case n.NUMERIC:
                return o.getBitsLength(e);
            case n.ALPHANUMERIC:
                return a.getBitsLength(e);
            case n.KANJI:
                return s.getBitsLength(e);
            case n.BYTE:
                return r.getBitsLength(e)
        }
    }

    function g(e, t) {
        var i, l = n.getBestModeForData(e);
        if ((i = n.from(t, l)) !== n.BYTE && i.bit < l.bit) throw new Error('"' + e + '" cannot be encoded with mode ' + n.toString(i) + ".\n Suggested mode is: " + n.toString(l));
        switch (i !== n.KANJI || d.isKanjiModeEnabled() || (i = n.BYTE), i) {
            case n.NUMERIC:
                return new o(e);
            case n.ALPHANUMERIC:
                return new a(e);
            case n.KANJI:
                return new s(e);
            case n.BYTE:
                return new r(e)
        }
    }

    t.fromArray = function (e) {
        return e.reduce(function (e, t) {
            return "string" == typeof t ? e.push(g(t, null)) : t.data && e.push(g(t.data, t.mode)), e
        }, [])
    }, t.fromString = function (e, i) {
        for (var o = function (e, t) {
            for (var i = {}, o = {start: {}}, a = ["start"], r = 0; r < e.length; r++) {
                for (var s = e[r], l = [], d = 0; d < s.length; d++) {
                    var u = s[d], c = "" + r + d;
                    l.push(c), i[c] = {node: u, lastCount: 0}, o[c] = {};
                    for (var h = 0; h < a.length; h++) {
                        var f = a[h];
                        i[f] && i[f].node.mode === u.mode ? (o[f][c] = p(i[f].lastCount + u.length, u.mode) - p(i[f].lastCount, u.mode), i[f].lastCount += u.length) : (i[f] && (i[f].lastCount = u.length), o[f][c] = p(u.length, u.mode) + 4 + n.getCharCountIndicator(u.mode, t))
                    }
                }
                a = l
            }
            for (h = 0; h < a.length; h++) o[a[h]].end = 0;
            return {map: o, table: i}
        }(function (e) {
            for (var t = [], i = 0; i < e.length; i++) {
                var o = e[i];
                switch (o.mode) {
                    case n.NUMERIC:
                        t.push([o, {data: o.data, mode: n.ALPHANUMERIC, length: o.length}, {
                            data: o.data,
                            mode: n.BYTE,
                            length: o.length
                        }]);
                        break;
                    case n.ALPHANUMERIC:
                        t.push([o, {data: o.data, mode: n.BYTE, length: o.length}]);
                        break;
                    case n.KANJI:
                        t.push([o, {data: o.data, mode: n.BYTE, length: c(o.data)}]);
                        break;
                    case n.BYTE:
                        t.push([{data: o.data, mode: n.BYTE, length: c(o.data)}])
                }
            }
            return t
        }(f(e, d.isKanjiModeEnabled())), i), a = u.find_path(o.map, "start", "end"), r = [], s = 1; s < a.length - 1; s++) r.push(o.table[a[s]].node);
        return t.fromArray(function (e) {
            return e.reduce(function (e, t) {
                var i = e.length - 1 >= 0 ? e[e.length - 1] : null;
                return i && i.mode === t.mode ? (e[e.length - 1].data += t.data, e) : (e.push(t), e)
            }, [])
        }(r))
    }, t.rawSplit = function (e) {
        return t.fromArray(f(e, d.isKanjiModeEnabled()))
    }
}, function (e, t, i) {
    var n = i(87);

    function o(e) {
        this.mode = n.NUMERIC, this.data = e.toString()
    }

    o.getBitsLength = function (e) {
        return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0)
    }, o.prototype.getLength = function () {
        return this.data.length
    }, o.prototype.getBitsLength = function () {
        return o.getBitsLength(this.data.length)
    }, o.prototype.write = function (e) {
        var t, i, n;
        for (t = 0; t + 3 <= this.data.length; t += 3) i = this.data.substr(t, 3), n = parseInt(i, 10), e.put(n, 10);
        var o = this.data.length - t;
        o > 0 && (i = this.data.substr(t), n = parseInt(i, 10), e.put(n, 3 * o + 1))
    }, e.exports = o
}, function (e, t, i) {
    var n = i(87),
        o = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$", "%", "*", "+", "-", ".", "/", ":"];

    function a(e) {
        this.mode = n.ALPHANUMERIC, this.data = e
    }

    a.getBitsLength = function (e) {
        return 11 * Math.floor(e / 2) + e % 2 * 6
    }, a.prototype.getLength = function () {
        return this.data.length
    }, a.prototype.getBitsLength = function () {
        return a.getBitsLength(this.data.length)
    }, a.prototype.write = function (e) {
        var t;
        for (t = 0; t + 2 <= this.data.length; t += 2) {
            var i = 45 * o.indexOf(this.data[t]);
            i += o.indexOf(this.data[t + 1]), e.put(i, 11)
        }
        this.data.length % 2 && e.put(o.indexOf(this.data[t]), 6)
    }, e.exports = a
}, function (e, t, i) {
    var n = i(93), o = i(87);

    function a(e) {
        this.mode = o.BYTE, this.data = new n(e)
    }

    a.getBitsLength = function (e) {
        return 8 * e
    }, a.prototype.getLength = function () {
        return this.data.length
    }, a.prototype.getBitsLength = function () {
        return a.getBitsLength(this.data.length)
    }, a.prototype.write = function (e) {
        for (var t = 0, i = this.data.length; t < i; t++) e.put(this.data[t], 8)
    }, e.exports = a
}, function (e, t, i) {
    var n = i(87), o = i(86);

    function a(e) {
        this.mode = n.KANJI, this.data = e
    }

    a.getBitsLength = function (e) {
        return 13 * e
    }, a.prototype.getLength = function () {
        return this.data.length
    }, a.prototype.getBitsLength = function () {
        return a.getBitsLength(this.data.length)
    }, a.prototype.write = function (e) {
        var t;
        for (t = 0; t < this.data.length; t++) {
            var i = o.toSJIS(this.data[t]);
            if (i >= 33088 && i <= 40956) i -= 33088; else {
                if (!(i >= 57408 && i <= 60351)) throw new Error("Invalid SJIS character: " + this.data[t] + "\nMake sure your charset is UTF-8");
                i -= 49472
            }
            i = 192 * (i >>> 8 & 255) + (255 & i), e.put(i, 13)
        }
    }, e.exports = a
}, function (e, t, i) {
    "use strict";
    var n = {
        single_source_shortest_paths: function (e, t, i) {
            var o = {}, a = {};
            a[t] = 0;
            var r, s, l, d, u, c, h, f = n.PriorityQueue.make();
            for (f.push(t, 0); !f.empty();) for (l in s = (r = f.pop()).value, d = r.cost, u = e[s] || {}) u.hasOwnProperty(l) && (c = d + u[l], h = a[l], (void 0 === a[l] || h > c) && (a[l] = c, f.push(l, c), o[l] = s));
            if (void 0 !== i && void 0 === a[i]) {
                var p = ["Could not find a path from ", t, " to ", i, "."].join("");
                throw new Error(p)
            }
            return o
        }, extract_shortest_path_from_predecessor_list: function (e, t) {
            for (var i = [], n = t; n;) i.push(n), e[n], n = e[n];
            return i.reverse(), i
        }, find_path: function (e, t, i) {
            var o = n.single_source_shortest_paths(e, t, i);
            return n.extract_shortest_path_from_predecessor_list(o, i)
        }, PriorityQueue: {
            make: function (e) {
                var t, i = n.PriorityQueue, o = {};
                for (t in e = e || {}, i) i.hasOwnProperty(t) && (o[t] = i[t]);
                return o.queue = [], o.sorter = e.sorter || i.default_sorter, o
            }, default_sorter: function (e, t) {
                return e.cost - t.cost
            }, push: function (e, t) {
                var i = {value: e, cost: t};
                this.queue.push(i), this.queue.sort(this.sorter)
            }, pop: function () {
                return this.queue.shift()
            }, empty: function () {
                return 0 === this.queue.length
            }
        }
    };
    e.exports = n
}, function (e, t, i) {
    var n = i(41), o = i(813).PNG, a = i(152);
    t.render = function (e, t) {
        var i = a.getOptions(t), n = i.rendererOpts, r = a.getImageWidth(e.modules.size, i);
        n.width = r, n.height = r;
        var s = new o(n);
        return a.qrToImageData(s.data, e, i), s
    }, t.renderToDataURL = function (e, i, n) {
        void 0 === n && (n = i, i = void 0), t.renderToBuffer(e, i, function (e, t) {
            e && n(e);
            var i = "data:image/png;base64,";
            i += t.toString("base64"), n(null, i)
        })
    }, t.renderToBuffer = function (e, i, n) {
        void 0 === n && (n = i, i = void 0);
        var o = t.render(e, i), a = [];
        o.on("error", n), o.on("data", function (e) {
            a.push(e)
        }), o.on("end", function () {
            n(null, Buffer.concat(a))
        }), o.pack()
    }, t.renderToFile = function (e, i, o, a) {
        void 0 === a && (a = o, o = void 0);
        var r = n.createWriteStream(e);
        r.on("error", a), r.on("close", a), t.renderToFileStream(r, i, o)
    }, t.renderToFileStream = function (e, i, n) {
        t.render(i, n).pack().pipe(e)
    }
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(101), a = i(814), r = i(816), s = i(819), l = t.PNG = function (e) {
        o.call(this), e = e || {}, this.width = 0 | e.width, this.height = 0 | e.height, this.data = this.width > 0 && this.height > 0 ? new Buffer(4 * this.width * this.height) : null, e.fill && this.data && this.data.fill(0), this.gamma = 0, this.readable = this.writable = !0, this._parser = new a(e), this._parser.on("error", this.emit.bind(this, "error")), this._parser.on("close", this._handleClose.bind(this)), this._parser.on("metadata", this._metadata.bind(this)), this._parser.on("gamma", this._gamma.bind(this)), this._parser.on("parsed", function (e) {
            this.data = e, this.emit("parsed", e)
        }.bind(this)), this._packer = new r(e), this._packer.on("data", this.emit.bind(this, "data")), this._packer.on("end", this.emit.bind(this, "end")), this._parser.on("close", this._handleClose.bind(this)), this._packer.on("error", this.emit.bind(this, "error"))
    };
    n.inherits(l, o), l.sync = s, l.prototype.pack = function () {
        return this.data && this.data.length ? (process.nextTick(function () {
            this._packer.pack(this.data, this.width, this.height, this.gamma)
        }.bind(this)), this) : (this.emit("error", "No data provided"), this)
    }, l.prototype.parse = function (e, t) {
        var i, n;
        t && (i = function (e) {
            this.removeListener("error", n), this.data = e, t(null, this)
        }.bind(this), n = function (e) {
            this.removeListener("parsed", i), t(e, null)
        }.bind(this), this.once("parsed", i), this.once("error", n));
        return this.end(e), this
    }, l.prototype.write = function (e) {
        return this._parser.write(e), !0
    }, l.prototype.end = function (e) {
        this._parser.end(e)
    }, l.prototype._metadata = function (e) {
        this.width = e.width, this.height = e.height, this.emit("metadata", e)
    }, l.prototype._gamma = function (e) {
        this.gamma = e
    }, l.prototype._handleClose = function () {
        this._parser.writable || this._packer.readable || this.emit("close")
    }, l.bitblt = function (e, t, i, n, o, a, r, s) {
        if (n |= 0, o |= 0, a |= 0, r |= 0, s |= 0, (i |= 0) > e.width || n > e.height || i + o > e.width || n + a > e.height) throw new Error("bitblt reading outside image");
        if (r > t.width || s > t.height || r + o > t.width || s + a > t.height) throw new Error("bitblt writing outside image");
        for (var l = 0; l < a; l++) e.data.copy(t.data, (s + l) * t.width + r << 2, (n + l) * e.width + i << 2, (n + l) * e.width + i + o << 2)
    }, l.prototype.bitblt = function (e, t, i, n, o, a, r) {
        return l.bitblt(this, e, t, i, n, o, a, r), this
    }, l.adjustGamma = function (e) {
        if (e.gamma) {
            for (var t = 0; t < e.height; t++) for (var i = 0; i < e.width; i++) for (var n = e.width * t + i << 2, o = 0; o < 3; o++) {
                var a = e.data[n + o] / 255;
                a = Math.pow(a, 1 / 2.2 / e.gamma), e.data[n + o] = Math.round(255 * a)
            }
            e.gamma = 0
        }
    }, l.prototype.adjustGamma = function () {
        l.adjustGamma(this)
    }
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(80), a = i(557), r = i(815), s = i(561), l = i(563), d = i(564), u = e.exports = function (e) {
        a.call(this), this._parser = new s(e, {
            read: this.read.bind(this),
            error: this._handleError.bind(this),
            metadata: this._handleMetaData.bind(this),
            gamma: this.emit.bind(this, "gamma"),
            palette: this._handlePalette.bind(this),
            transColor: this._handleTransColor.bind(this),
            finished: this._finished.bind(this),
            inflateData: this._inflateData.bind(this)
        }), this._options = e, this.writable = !0, this._parser.start()
    };
    n.inherits(u, a), u.prototype._handleError = function (e) {
        this.emit("error", e), this.writable = !1, this.destroy(), this._inflate && this._inflate.destroy && this._inflate.destroy(), this._filter && (this._filter.destroy(), this._filter.on("error", function () {
        })), this.errord = !0
    }, u.prototype._inflateData = function (e) {
        if (!this._inflate) if (this._bitmapInfo.interlace) this._inflate = o.createInflate(), this._inflate.on("error", this.emit.bind(this, "error")), this._filter.on("complete", this._complete.bind(this)), this._inflate.pipe(this._filter); else {
            var t = (1 + (this._bitmapInfo.width * this._bitmapInfo.bpp * this._bitmapInfo.depth + 7 >> 3)) * this._bitmapInfo.height,
                i = Math.max(t, o.Z_MIN_CHUNK);
            this._inflate = o.createInflate({chunkSize: i});
            var n = t, a = this.emit.bind(this, "error");
            this._inflate.on("error", function (e) {
                n && a(e)
            }), this._filter.on("complete", this._complete.bind(this));
            var r = this._filter.write.bind(this._filter);
            this._inflate.on("data", function (e) {
                n && (e.length > n && (e = e.slice(0, n)), n -= e.length, r(e))
            }), this._inflate.on("end", this._filter.end.bind(this._filter))
        }
        this._inflate.write(e)
    }, u.prototype._handleMetaData = function (e) {
        this.emit("metadata", e), this._bitmapInfo = Object.create(e), this._filter = new r(this._bitmapInfo)
    }, u.prototype._handleTransColor = function (e) {
        this._bitmapInfo.transColor = e
    }, u.prototype._handlePalette = function (e) {
        this._bitmapInfo.palette = e
    }, u.prototype._finished = function () {
        this.errord || (this._inflate ? this._inflate.end() : this.emit("error", "No Inflate block"), this.destroySoon())
    }, u.prototype._complete = function (e) {
        if (!this.errord) {
            try {
                var t = l.dataToBitMap(e, this._bitmapInfo), i = d(t, this._bitmapInfo);
                t = null
            } catch (e) {
                return void this._handleError(e)
            }
            this.emit("parsed", i)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(557), a = i(558), r = e.exports = function (e) {
        o.call(this);
        var t = [], i = this;
        this._filter = new a(e, {
            read: this.read.bind(this), write: function (e) {
                t.push(e)
            }, complete: function () {
                i.emit("complete", Buffer.concat(t))
            }
        }), this._filter.start()
    };
    n.inherits(r, o)
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(101), a = i(118), r = i(565), s = e.exports = function (e) {
        o.call(this);
        var t = e || {};
        this._packer = new r(t), this._deflate = this._packer.createDeflate(), this.readable = !0
    };
    n.inherits(s, o), s.prototype.pack = function (e, t, i, n) {
        this.emit("data", new Buffer(a.PNG_SIGNATURE)), this.emit("data", this._packer.packIHDR(t, i)), n && this.emit("data", this._packer.packGAMA(n));
        var o = this._packer.filterData(e, t, i);
        this._deflate.on("error", this.emit.bind(this, "error")), this._deflate.on("data", function (e) {
            this.emit("data", this._packer.packIDAT(e))
        }.bind(this)), this._deflate.on("end", function () {
            this.emit("data", this._packer.packIEND()), this.emit("end")
        }.bind(this)), this._deflate.end(o)
    }
}, function (e, t, i) {
    "use strict";
    var n = i(118);
    e.exports = function (e, t, i, o) {
        var a, r = -1 !== [n.COLORTYPE_COLOR_ALPHA, n.COLORTYPE_ALPHA].indexOf(o.colorType);
        if (o.colorType === o.inputColorType) {
            var s = (a = new ArrayBuffer(2), new DataView(a).setInt16(0, 256, !0), 256 !== new Int16Array(a)[0]);
            if (8 === o.bitDepth || 16 === o.bitDepth && s) return e
        }
        var l = 16 !== o.bitDepth ? e : new Uint16Array(e.buffer), d = 255,
            u = n.COLORTYPE_TO_BPP_MAP[o.inputColorType];
        4 != u || o.inputHasAlpha || (u = 3);
        var c = n.COLORTYPE_TO_BPP_MAP[o.colorType];
        16 === o.bitDepth && (d = 65535, c *= 2);
        var h = new Buffer(t * i * c), f = 0, p = 0, g = o.bgColor || {};

        function m(e, t) {
            var i, a, s, l = d;
            switch (o.inputColorType) {
                case n.COLORTYPE_COLOR_ALPHA:
                    l = e[t + 3], i = e[t], a = e[t + 1], s = e[t + 2];
                    break;
                case n.COLORTYPE_COLOR:
                    i = e[t], a = e[t + 1], s = e[t + 2];
                    break;
                case n.COLORTYPE_ALPHA:
                    l = e[t + 1], a = i = e[t], s = i;
                    break;
                case n.COLORTYPE_GRAYSCALE:
                    a = i = e[t], s = i;
                    break;
                default:
                    throw new Error("input color type:" + o.inputColorType + " is not supported at present")
            }
            return o.inputHasAlpha && (r || (l /= d, i = Math.min(Math.max(Math.round((1 - l) * g.red + l * i), 0), d), a = Math.min(Math.max(Math.round((1 - l) * g.green + l * a), 0), d), s = Math.min(Math.max(Math.round((1 - l) * g.blue + l * s), 0), d))), {
                red: i,
                green: a,
                blue: s,
                alpha: l
            }
        }

        void 0 === g.red && (g.red = d), void 0 === g.green && (g.green = d), void 0 === g.blue && (g.blue = d);
        for (var v = 0; v < i; v++) for (var y = 0; y < t; y++) {
            var T = m(l, f);
            switch (o.colorType) {
                case n.COLORTYPE_COLOR_ALPHA:
                case n.COLORTYPE_COLOR:
                    8 === o.bitDepth ? (h[p] = T.red, h[p + 1] = T.green, h[p + 2] = T.blue, r && (h[p + 3] = T.alpha)) : (h.writeUInt16BE(T.red, p), h.writeUInt16BE(T.green, p + 2), h.writeUInt16BE(T.blue, p + 4), r && h.writeUInt16BE(T.alpha, p + 6));
                    break;
                case n.COLORTYPE_ALPHA:
                case n.COLORTYPE_GRAYSCALE:
                    var w = (T.red + T.green + T.blue) / 3;
                    8 === o.bitDepth ? (h[p] = w, r && (h[p + 1] = T.alpha)) : (h.writeUInt16BE(w, p), r && h.writeUInt16BE(T.alpha, p + 2))
            }
            f += u, p += c
        }
        return h
    }
}, function (e, t, i) {
    "use strict";
    var n = i(560);
    var o = {
        0: function (e, t, i, n, o) {
            for (var a = 0; a < i; a++) n[o + a] = e[t + a]
        }, 1: function (e, t, i, n, o, a) {
            for (var r = 0; r < i; r++) {
                var s = r >= a ? e[t + r - a] : 0, l = e[t + r] - s;
                n[o + r] = l
            }
        }, 2: function (e, t, i, n, o) {
            for (var a = 0; a < i; a++) {
                var r = t > 0 ? e[t + a - i] : 0, s = e[t + a] - r;
                n[o + a] = s
            }
        }, 3: function (e, t, i, n, o, a) {
            for (var r = 0; r < i; r++) {
                var s = r >= a ? e[t + r - a] : 0, l = t > 0 ? e[t + r - i] : 0, d = e[t + r] - (s + l >> 1);
                n[o + r] = d
            }
        }, 4: function (e, t, i, o, a, r) {
            for (var s = 0; s < i; s++) {
                var l = s >= r ? e[t + s - r] : 0, d = t > 0 ? e[t + s - i] : 0,
                    u = t > 0 && s >= r ? e[t + s - (i + r)] : 0, c = e[t + s] - n(l, d, u);
                o[a + s] = c
            }
        }
    }, a = {
        0: function (e, t, i) {
            for (var n = 0, o = t + i, a = t; a < o; a++) n += Math.abs(e[a]);
            return n
        }, 1: function (e, t, i, n) {
            for (var o = 0, a = 0; a < i; a++) {
                var r = a >= n ? e[t + a - n] : 0, s = e[t + a] - r;
                o += Math.abs(s)
            }
            return o
        }, 2: function (e, t, i) {
            for (var n = 0, o = t + i, a = t; a < o; a++) {
                var r = t > 0 ? e[a - i] : 0, s = e[a] - r;
                n += Math.abs(s)
            }
            return n
        }, 3: function (e, t, i, n) {
            for (var o = 0, a = 0; a < i; a++) {
                var r = a >= n ? e[t + a - n] : 0, s = t > 0 ? e[t + a - i] : 0, l = e[t + a] - (r + s >> 1);
                o += Math.abs(l)
            }
            return o
        }, 4: function (e, t, i, o) {
            for (var a = 0, r = 0; r < i; r++) {
                var s = r >= o ? e[t + r - o] : 0, l = t > 0 ? e[t + r - i] : 0,
                    d = t > 0 && r >= o ? e[t + r - (i + o)] : 0, u = e[t + r] - n(s, l, d);
                a += Math.abs(u)
            }
            return a
        }
    };
    e.exports = function (e, t, i, n, r) {
        var s;
        if ("filterType" in n && -1 !== n.filterType) {
            if ("number" != typeof n.filterType) throw new Error("unrecognised filter types");
            s = [n.filterType]
        } else s = [0, 1, 2, 3, 4];
        16 === n.bitDepth && (r *= 2);
        for (var l = t * r, d = 0, u = 0, c = new Buffer((l + 1) * i), h = s[0], f = 0; f < i; f++) {
            if (s.length > 1) for (var p = 1 / 0, g = 0; g < s.length; g++) {
                var m = a[s[g]](e, u, l, r);
                m < p && (h = s[g], p = m)
            }
            c[d] = h, d++, o[h](e, u, l, c, d, r), d += l, u += l
        }
        return c
    }
}, function (e, t, i) {
    "use strict";
    var n = i(820), o = i(823);
    t.read = function (e, t) {
        return n(e, t || {})
    }, t.write = function (e, t) {
        return o(e, t)
    }
}, function (e, t, i) {
    "use strict";
    var n = !0, o = i(80), a = i(821);
    o.deflateSync || (n = !1);
    var r = i(566), s = i(822), l = i(561), d = i(563), u = i(564);
    e.exports = function (e, t) {
        if (!n) throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");
        var i, c, h;
        var f = [];
        var p = new r(e);
        if (new l(t, {
            read: p.read.bind(p), error: function (e) {
                i = e
            }, metadata: function (e) {
                c = e
            }, gamma: function (e) {
                h = e
            }, palette: function (e) {
                c.palette = e
            }, transColor: function (e) {
                c.transColor = e
            }, inflateData: function (e) {
                f.push(e)
            }
        }).start(), p.process(), i) throw i;
        var g, m = Buffer.concat(f);
        if (f.length = 0, c.interlace) g = o.inflateSync(m); else {
            var v = (1 + (c.width * c.bpp * c.depth + 7 >> 3)) * c.height;
            g = a(m, {chunkSize: v, maxLength: v})
        }
        if (m = null, !g || !g.length) throw new Error("bad png - invalid inflate data response");
        var y = s.process(g, c);
        m = null;
        var T = d.dataToBitMap(y, c);
        y = null;
        var w = u(T, c);
        return c.data = w, c.gamma = h || 0, c
    }
}, function (e, t, i) {
    "use strict";
    var n = i(508).ok, o = i(80), a = i(5), r = i(97).kMaxLength;

    function s(e) {
        if (!(this instanceof s)) return new s(e);
        e && e.chunkSize < o.Z_MIN_CHUNK && (e.chunkSize = o.Z_MIN_CHUNK), o.Inflate.call(this, e), this._offset = void 0 === this._offset ? this._outOffset : this._offset, this._buffer = this._buffer || this._outBuffer, e && null != e.maxLength && (this._maxLength = e.maxLength)
    }

    function l(e, t) {
        t && process.nextTick(t), e._handle && (e._handle.close(), e._handle = null)
    }

    function d(e, t) {
        return function (e, t) {
            if ("string" == typeof t && (t = Buffer.from(t)), !(t instanceof Buffer)) throw new TypeError("Not a string or buffer");
            var i = e._finishFlushFlag;
            return null == i && (i = o.Z_FINISH), e._processChunk(t, i)
        }(new s(t), e)
    }

    s.prototype._processChunk = function (e, t, i) {
        if ("function" == typeof i) return o.Inflate._processChunk.call(this, e, t, i);
        var a, s = this, d = e && e.length, u = this._chunkSize - this._offset, c = this._maxLength, h = 0, f = [],
            p = 0;

        function g(e, t) {
            if (!s._hadError) {
                var i = u - t;
                if (n(i >= 0, "have should not go down"), i > 0) {
                    var o = s._buffer.slice(s._offset, s._offset + i);
                    if (s._offset += i, o.length > c && (o = o.slice(0, c)), f.push(o), p += o.length, 0 === (c -= o.length)) return !1
                }
                return (0 === t || s._offset >= s._chunkSize) && (u = s._chunkSize, s._offset = 0, s._buffer = Buffer.allocUnsafe(s._chunkSize)), 0 === t && (h += d - e, d = e, !0)
            }
        }

        this.on("error", function (e) {
            a = e
        }), n(this._handle, "zlib binding closed");
        do {
            var m = this._handle.writeSync(t, e, h, d, this._buffer, this._offset, u);
            m = m || this._writeState
        } while (!this._hadError && g(m[0], m[1]));
        if (this._hadError) throw a;
        if (p >= r) throw l(this), new RangeError("Cannot create final Buffer. It would be larger than 0x" + r.toString(16) + " bytes");
        var v = Buffer.concat(f, p);
        return l(this), v
    }, a.inherits(s, o.Inflate), e.exports = t = d, t.Inflate = s, t.createInflate = function (e) {
        return new s(e)
    }, t.inflateSync = d
}, function (e, t, i) {
    "use strict";
    var n = i(566), o = i(558);
    t.process = function (e, t) {
        var i = [], a = new n(e);
        return new o(t, {
            read: a.read.bind(a), write: function (e) {
                i.push(e)
            }, complete: function () {
            }
        }).start(), a.process(), Buffer.concat(i)
    }
}, function (e, t, i) {
    "use strict";
    var n = !0, o = i(80);
    o.deflateSync || (n = !1);
    var a = i(118), r = i(565);
    e.exports = function (e, t) {
        if (!n) throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");
        var i = new r(t || {}), s = [];
        s.push(new Buffer(a.PNG_SIGNATURE)), s.push(i.packIHDR(e.width, e.height)), e.gamma && s.push(i.packGAMA(e.gamma));
        var l = i.filterData(e.data, e.width, e.height), d = o.deflateSync(l, i.getDeflateOptions());
        if (l = null, !d || !d.length) throw new Error("bad png - invalid compressed data response");
        return s.push(i.packIDAT(d)), s.push(i.packIEND()), Buffer.concat(s)
    }
}, function (e, t, i) {
    var n = i(152), o = {WW: " ", WB: "▄", BB: "█", BW: "▀"};
    t.render = function (e, t, i) {
        var a = e.modules.size, r = e.modules.data, s = n.getOptions(t), l = "",
            d = Array(a + 2 * s.margin + 1).join(o.WW);
        d = Array(s.margin / 2 + 1).join(d + "\n");
        var u, c, h = Array(s.margin + 1).join(o.WW);
        l += d;
        for (var f = 0; f < a; f += 2) {
            l += h;
            for (var p = 0; p < a; p++) {
                var g = r[f * a + p], m = r[(f + 1) * a + p];
                l += (c = m, (u = g) && c ? o.BB : u && !c ? o.BW : !u && c ? o.WB : o.WW)
            }
            l += h + "\n"
        }
        return l += d.slice(0, -1), "function" == typeof i && i(null, l), l
    }, t.renderToFile = function (e, n, o, a) {
        void 0 === a && (a = o, o = void 0);
        var r = i(41), s = t.render(n, o);
        r.writeFile(e, s, a)
    }
}, function (e, t) {
    t.render = function (e, t, i) {
        var n = e.modules.size, o = e.modules.data, a = "[47m  [0m", r = "", s = Array(n + 3).join(a),
            l = Array(2).join(a);
        r += s + "\n";
        for (var d = 0; d < n; ++d) {
            r += a;
            for (var u = 0; u < n; u++) r += o[d * n + u] ? "[40m  [0m" : a;
            r += l + "\n"
        }
        return r += s + "\n", "function" == typeof i && i(null, r), r
    }
}, function (e, t, i) {
    var n = i(567);
    t.render = n.render, t.renderToFile = function (e, n, o, a) {
        void 0 === a && (a = o, o = void 0);
        var r = i(41),
            s = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' + t.render(n, o);
        r.writeFile(e, s, a)
    }
}, function (e, t, i) {
    var n = i(828), o = i(552), a = i(829), r = i(567);

    function s(e, t, i, a, r) {
        var s = [].slice.call(arguments, 1), l = s.length, d = "function" == typeof s[l - 1];
        if (!d && !n()) throw new Error("Callback required as last argument");
        if (!d) {
            if (l < 1) throw new Error("Too few arguments provided");
            return 1 === l ? (i = t, t = a = void 0) : 2 !== l || t.getContext || (a = i, i = t, t = void 0), new Promise(function (n, r) {
                try {
                    var s = o.create(i, a);
                    n(e(s, t, a))
                } catch (e) {
                    r(e)
                }
            })
        }
        if (l < 2) throw new Error("Too few arguments provided");
        2 === l ? (r = i, i = t, t = a = void 0) : 3 === l && (t.getContext && void 0 === r ? (r = a, a = void 0) : (r = a, a = i, i = t, t = void 0));
        try {
            var u = o.create(i, a);
            r(null, e(u, t, a))
        } catch (e) {
            r(e)
        }
    }

    t.create = o.create, t.toCanvas = s.bind(null, a.render), t.toDataURL = s.bind(null, a.renderToDataURL), t.toString = s.bind(null, function (e, t, i) {
        return r.render(e, i)
    })
}, function (e, t) {
    e.exports = function () {
        return "function" == typeof Promise && Promise.prototype && Promise.prototype.then
    }
}, function (e, t, i) {
    var n = i(152);
    t.render = function (e, t, i) {
        var o = i, a = t;
        void 0 !== o || t && t.getContext || (o = t, t = void 0), t || (a = function () {
            try {
                return document.createElement("canvas")
            } catch (e) {
                throw new Error("You need to specify a canvas element")
            }
        }()), o = n.getOptions(o);
        var r = n.getImageWidth(e.modules.size, o), s = a.getContext("2d"), l = s.createImageData(r, r);
        return n.qrToImageData(l.data, e, o), function (e, t, i) {
            e.clearRect(0, 0, t.width, t.height), t.style || (t.style = {}), t.height = i, t.width = i, t.style.height = i + "px", t.style.width = i + "px"
        }(s, a, r), s.putImageData(l, 0, 0), a
    }, t.renderToDataURL = function (e, i, n) {
        var o = n;
        void 0 !== o || i && i.getContext || (o = i, i = void 0), o || (o = {});
        var a = t.render(e, i, o), r = o.type || "image/png", s = o.rendererOpts || {};
        return a.toDataURL(r, s.quality)
    }
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(461), o = i(245);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\XlTab.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(474), o = i(247);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\tabs\\Preview.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(479), o = i(249);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(835), i(836);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\xmp-vip\\view\\video-state.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), a = i(81), r = i(0), s = i(15), l = i(69), d = i(568), u = i(117),
        c = r.default.getLogger("XmpPlayTry");
    !function (e) {
        let t, i, r, h;
        !function (e) {
            e.none = "PlayTry.State.none", e.ready = "PlayTry.State.ready", e.commiting = "PlayTry.State.commiting", e.commifailed = "PlayTry.State.commifailed", e.runing = "PlayTry.State.runing", e.stop = "PlayTry.State.stop", e.finish = "PlayTry.State.finish", e.over = "PlayTry.State.over"
        }(t = e.State || (e.State = {})), function (e) {
            e.stateChange = "PlayTry.Event.stateChange", e.acclerateUpdate = "PlayTry.Event.acclerateUpdate", e.progessUpdate = "PlayTry.Event.progessUpdate", e.activeTaskDel = "PlayTry.Event.activeTaskDel", e.afterFinishOneMin = "PlayTry.Event.afterFinishOneMin"
        }(i = e.Event || (e.Event = {})), function (e) {
            e.getState = "GetState", e.getStateInfo = "GetStateInfo", e.gotoPlayTry = "GotoPlayTry", e.clearPlayTry = "ClearPlayTry", e.tryShowPlayTry = "TryShowPlayTry"
        }(r = e.Function || (e.Function = {})), function (e) {
            e.stateChange = "PlayTry.FireEvent.StateChange"
        }(h = e.FireEvent || (e.FireEvent = {}));
        const f = "OnVipTaskInfoChanged";
        let p = {state: t.none, useTick: 0, allTick: 60, vipspeed: 0, speed: 0, isCloudTask: !1}, g = new Map;

        function m(e, i) {
            return n(this, void 0, void 0, function* () {
                if (!e) return a.CommonNS.callXmp(r.getState, i);
                if (p.state === t.ready) {
                    let e = g.get(i);
                    if (c.information("vipTaskInfo", i, e), !e || e.isHResource || void 0 === e.isHResource || e.isCloudTask) return t.none;
                    let n = yield a.CommonNS.callXmp(l.XmpPlayerFunction.getDuration);
                    if (n < 6e5) return c.information("durnation < 600000, cant not try", n), t.none;
                    if (yield a.CommonNS.callXmp(l.XmpPlayerFunction.isPlayMusic)) return c.information("is music, cant not try"), t.none
                }
                return p.state
            })
        }

        function v(e) {
            return n(this, void 0, void 0, function* () {
                return e ? p : a.CommonNS.callXmp(r.getStateInfo)
            })
        }

        function y(e, i, o) {
            return n(this, void 0, void 0, function* () {
                c.information("onStateChange", i, o);
                let e = g.get(yield a.CommonNS.getCurrentTaskId());
                switch (e && (p.isCloudTask = e.isCloudTask), i) {
                    case t.ready:
                        p.state = i, p.tryNum = o.tryNum;
                        break;
                    default:
                        p.state = i, p.tryNum = o.tryNum, t.finish === i && (p.beforeSpeed = o.beforeSpeed, p.tryingSpeed = o.tryingSpeed, p.promotePercent = o.percent), void 0 !== o.beforeSpeed && (p.beforeSpeed = o.beforeSpeed)
                }
                p.stateChangeTick = (new Date).getTime(), s.server.fireClientEvent(h.stateChange)
            })
        }

        function T(e, t, i, o, a) {
            return n(this, void 0, void 0, function* () {
                p.useTick = t, p.allTick = i, p.speed = o, p.vipspeed = a, c.information("onProgessUpdate", p), s.server.fireClientEvent(h.stateChange)
            })
        }

        function w(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let e = g.get(t), n = {
                    isCloudTask: i.isCloudTask,
                    isHResource: i.isHResource,
                    isPlayAndDownload: i.isPlayAndDownload
                };
                g.set(t, n), e && e.isHResource !== n.isHResource && s.server.fireClientEvent(h.stateChange), c.information("onVipTaskInfoChanged", t, n)
            })
        }

        function k(e) {
            return n(this, void 0, void 0, function* () {
                c.information("onXmpStop"), p = {
                    state: t.none,
                    useTick: 0,
                    allTick: 60,
                    vipspeed: 0,
                    speed: 0,
                    isCloudTask: !1
                }, a.CommonNS.callVipPlugin(r.clearPlayTry).catch()
            })
        }

        function C(e) {
            return n(this, void 0, void 0, function* () {
                u.default.isVip || !(yield a.CommonNS.isPlayAndDownload()) || (yield a.CommonNS.isYunRecvTask()) ? c.information("onXmpPlaying isPlayAndDownload") : (c.information("onXmpPlaying TryShowPlayTry"), a.CommonNS.callVipPlugin(r.tryShowPlayTry, yield a.CommonNS.getCurrentTaskId()).catch())
            })
        }

        function b(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                c.information("onAfterFinishOneMin");
                let e = yield a.CommonNS.callXmp(l.XmpPlayerFunction.getDuration);
                d.VipStatNS.playTryAfterOneMin(yield a.CommonNS.getCurrentTaskGcid(), "bottom", p.isCloudTask, Math.floor(e / 1e3), Math.floor(t / 1024), Math.floor(i / 1024), Math.floor(o / 1024)).catch()
            })
        }

        e.init = function () {
            return n(this, void 0, void 0, function* () {
                o.client.attachServerEvent(i.stateChange, y), o.client.attachServerEvent(i.progessUpdate, T), o.client.attachServerEvent(f, w), o.client.attachServerEvent(l.XmpEvent.onStop, k), o.client.attachServerEvent(l.XmpEvent.onPlaying, C), o.client.attachServerEvent(i.afterFinishOneMin, b);
                let e = {[r.getState]: m, [r.getStateInfo]: v};
                o.client.registerFunctions(e), y(null, yield a.CommonNS.callVipPlugin("GetPackageTryState"), {tryNum: yield a.CommonNS.callVipPlugin("GetPackageTryPlayNum")}).catch()
            })
        }, e.getState = m, e.getStateInfo = v
    }(t.PlayTryNS || (t.PlayTryNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(411), o = i(3), a = i(0).default.getLogger("vip-stat-utilities");
    !function (e) {
        e.trackEvent = function (e, t) {
            let i = (t = t || {}).attribute1 || "", r = t.attribute2 || "", s = t.extData || new Map;
            s.set("plugin_version", n.default.pluginVersion), s.set("client_version", n.default.thunderVersionString);
            let l = function (e) {
                let t = "";
                return e.forEach((e, i) => {
                    "" !== t && (t += ","), t = t + i + "=" + e
                }), t
            }(s);
            a.information("key", e), a.information("attribute1", i), a.information("attribute2", r), a.information("extData", l), o.client.callServerFunction("TrackEvent", e, i, r, 0, 0, 0, 0, l).catch()
        }, e.initUtilities = function () {
            let e = {TrackShowEvent: i};
            o.client.registerFunctions(e)
        };
        let t = new Map;

        function i(e, ...i) {
            let n = i[0], r = i[1], s = i[2], l = i[3];
            do {
                if (t.has(s) && n - t.get(s) < 2e3) {
                    a.information("break trackShowEvent", n, s), t.get(s);
                    break
                }
                a.information("key", r, "attribute1", s, "extData", l), o.client.callServerFunction("TrackEvent", r, s, "", 0, 0, 0, 0, l).catch()
            } while (0);
            t.set(s, n)
        }
    }(t.StatUtilitiesNS || (t.StatUtilitiesNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = i(1017);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1019);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(251);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\tabs\\zipFileList-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(480), o = i(253);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(839);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "96303570", null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\tabs\\zipFileList.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1022);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(475), o = i(255);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\tabs\\Attribute.vue", t.default = s.exports
}, function (e, t, i) {
    !function (e) {
        "use strict";
        var t, i = 2311, n = function () {
                return i++
            }, o = "object" == typeof wx && "function" == typeof wx.getSystemInfoSync ? {
                browser: {},
                os: {},
                node: !1,
                wxa: !0,
                canvasSupported: !0,
                svgSupported: !1,
                touchEventsSupported: !0,
                domSupported: !1
            } : "undefined" == typeof document && "undefined" != typeof self ? {
                browser: {},
                os: {},
                node: !1,
                worker: !0,
                canvasSupported: !0,
                domSupported: !1
            } : "undefined" == typeof navigator ? {
                browser: {},
                os: {},
                node: !0,
                worker: !1,
                canvasSupported: !0,
                svgSupported: !0,
                domSupported: !1
            } : function (e) {
                var t = {}, i = e.match(/Firefox\/([\d.]+)/),
                    n = e.match(/MSIE\s([\d.]+)/) || e.match(/Trident\/.+?rv:(([\d.]+))/), o = e.match(/Edge\/([\d.]+)/),
                    a = /micromessenger/i.test(e);
                return i && (t.firefox = !0, t.version = i[1]), n && (t.ie = !0, t.version = n[1]), o && (t.edge = !0, t.version = o[1]), a && (t.weChat = !0), {
                    browser: t,
                    os: {},
                    node: !1,
                    canvasSupported: !!document.createElement("canvas").getContext,
                    svgSupported: "undefined" != typeof SVGRect,
                    touchEventsSupported: "ontouchstart" in window && !t.ie && !t.edge,
                    pointerEventsSupported: "onpointerdown" in window && (t.edge || t.ie && 11 <= t.version),
                    domSupported: "undefined" != typeof document
                }
            }(navigator.userAgent), a = {
                "[object Function]": 1,
                "[object RegExp]": 1,
                "[object Date]": 1,
                "[object Error]": 1,
                "[object CanvasGradient]": 1,
                "[object CanvasPattern]": 1,
                "[object Image]": 1,
                "[object Canvas]": 1
            }, r = {
                "[object Int8Array]": 1,
                "[object Uint8Array]": 1,
                "[object Uint8ClampedArray]": 1,
                "[object Int16Array]": 1,
                "[object Uint16Array]": 1,
                "[object Int32Array]": 1,
                "[object Uint32Array]": 1,
                "[object Float32Array]": 1,
                "[object Float64Array]": 1
            }, s = Object.prototype.toString, l = Array.prototype, d = l.forEach, u = l.filter, c = l.slice, h = l.map,
            f = l.reduce, p = {};

        function g(e, i) {
            "createCanvas" === e && (t = null), p[e] = i
        }

        function m(e) {
            if (null == e || "object" != typeof e) return e;
            var t = e, i = s.call(e);
            if ("[object Array]" === i) {
                if (!Z(e)) {
                    t = [];
                    for (var n = 0, o = e.length; n < o; n++) t[n] = m(e[n])
                }
            } else if (r[i]) {
                if (!Z(e)) {
                    var l = e.constructor;
                    if (e.constructor.from) t = l.from(e); else for (t = new l(e.length), n = 0, o = e.length; n < o; n++) t[n] = m(e[n])
                }
            } else if (!a[i] && !Z(e) && !V(e)) for (var d in t = {}, e) e.hasOwnProperty(d) && (t[d] = m(e[d]));
            return t
        }

        function v(e, t, i) {
            if (!R(t) || !R(e)) return i ? m(t) : e;
            for (var n in t) if (t.hasOwnProperty(n)) {
                var o = e[n], a = t[n];
                !R(a) || !R(o) || M(a) || M(o) || V(a) || V(o) || B(a) || B(o) || Z(a) || Z(o) ? !i && n in e || (e[n] = m(t[n])) : v(o, a, i)
            }
            return e
        }

        function y(e, t) {
            for (var i = e[0], n = 1, o = e.length; n < o; n++) i = v(i, e[n], t);
            return i
        }

        function T(e, t) {
            for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i]);
            return e
        }

        function w(e, t, i) {
            for (var n in t) t.hasOwnProperty(n) && (i ? null != t[n] : null == e[n]) && (e[n] = t[n]);
            return e
        }

        function k() {
            return p.createCanvas()
        }

        function C() {
            return t = t || k().getContext("2d")
        }

        function b(e, t) {
            if (e) {
                if (e.indexOf) return e.indexOf(t);
                for (var i = 0, n = e.length; i < n; i++) if (e[i] === t) return i
            }
            return -1
        }

        function I(e, t) {
            var i = e.prototype;

            function n() {
            }

            for (var o in n.prototype = t.prototype, e.prototype = new n, i) i.hasOwnProperty(o) && (e.prototype[o] = i[o]);
            (e.prototype.constructor = e).superClass = t
        }

        function S(e, t, i) {
            w(e = "prototype" in e ? e.prototype : e, t = "prototype" in t ? t.prototype : t, i)
        }

        function _(e) {
            if (e) return "string" != typeof e && "number" == typeof e.length
        }

        function D(e, t, i) {
            if (e && t) if (e.forEach && e.forEach === d) e.forEach(t, i); else if (e.length === +e.length) for (var n = 0, o = e.length; n < o; n++) t.call(i, e[n], n, e); else for (var a in e) e.hasOwnProperty(a) && t.call(i, e[a], a, e)
        }

        function A(e, t, i) {
            if (e && t) {
                if (e.map && e.map === h) return e.map(t, i);
                for (var n = [], o = 0, a = e.length; o < a; o++) n.push(t.call(i, e[o], o, e));
                return n
            }
        }

        function N(e, t, i, n) {
            if (e && t) {
                if (e.reduce && e.reduce === f) return e.reduce(t, i, n);
                for (var o = 0, a = e.length; o < a; o++) i = t.call(n, i, e[o], o, e);
                return i
            }
        }

        function x(e, t, i) {
            if (e && t) {
                if (e.filter && e.filter === u) return e.filter(t, i);
                for (var n = [], o = 0, a = e.length; o < a; o++) t.call(i, e[o], o, e) && n.push(e[o]);
                return n
            }
        }

        function E(e, t, i) {
            if (e && t) for (var n = 0, o = e.length; n < o; n++) if (t.call(i, e[n], n, e)) return e[n]
        }

        function O(e, t) {
            var i = c.call(arguments, 2);
            return function () {
                return e.apply(t, i.concat(c.call(arguments)))
            }
        }

        function P(e) {
            var t = c.call(arguments, 1);
            return function () {
                return e.apply(this, t.concat(c.call(arguments)))
            }
        }

        function M(e) {
            return "[object Array]" === s.call(e)
        }

        function F(e) {
            return "function" == typeof e
        }

        function L(e) {
            return "[object String]" === s.call(e)
        }

        function R(e) {
            var t = typeof e;
            return "function" == t || !!e && "object" == t
        }

        function B(e) {
            return !!a[s.call(e)]
        }

        function U(e) {
            return !!r[s.call(e)]
        }

        function V(e) {
            return "object" == typeof e && "number" == typeof e.nodeType && "object" == typeof e.ownerDocument
        }

        function K(e) {
            return e != e
        }

        function G(e) {
            for (var t = 0, i = arguments.length; t < i; t++) if (null != arguments[t]) return arguments[t]
        }

        function W(e, t) {
            return null != e ? e : t
        }

        function j(e, t, i) {
            return null != e ? e : null != t ? t : i
        }

        function H() {
            return Function.call.apply(c, arguments)
        }

        function z(e) {
            if ("number" == typeof e) return [e, e, e, e];
            var t = e.length;
            return 2 === t ? [e[0], e[1], e[0], e[1]] : 3 === t ? [e[0], e[1], e[2], e[1]] : e
        }

        function X(e, t) {
            if (!e) throw new Error(t)
        }

        function q(e) {
            return null == e ? null : "function" == typeof e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
        }

        p.createCanvas = function () {
            return document.createElement("canvas")
        };
        var Y = "__ec_primitive__";

        function J(e) {
            e[Y] = !0
        }

        function Z(e) {
            return e[Y]
        }

        function Q(e) {
            var t = M(e);
            this.data = {};
            var i = this;

            function n(e, n) {
                t ? i.set(e, n) : i.set(n, e)
            }

            e instanceof Q ? e.each(n) : e && D(e, n)
        }

        function $(e) {
            return new Q(e)
        }

        function ee(e, t) {
            for (var i = new e.constructor(e.length + t.length), n = 0; n < e.length; n++) i[n] = e[n];
            var o = e.length;
            for (n = 0; n < t.length; n++) i[n + o] = t[n];
            return i
        }

        function te() {
        }

        Q.prototype = {
            constructor: Q, get: function (e) {
                return this.data.hasOwnProperty(e) ? this.data[e] : null
            }, set: function (e, t) {
                return this.data[e] = t
            }, each: function (e, t) {
                for (var i in void 0 !== t && (e = O(e, t)), this.data) this.data.hasOwnProperty(i) && e(this.data[i], i)
            }, removeKey: function (e) {
                delete this.data[e]
            }
        };
        var ie = (Object.freeze || Object)({
            $override: g,
            clone: m,
            merge: v,
            mergeAll: y,
            extend: T,
            defaults: w,
            createCanvas: k,
            getContext: C,
            indexOf: b,
            inherits: I,
            mixin: S,
            isArrayLike: _,
            each: D,
            map: A,
            reduce: N,
            filter: x,
            find: E,
            bind: O,
            curry: P,
            isArray: M,
            isFunction: F,
            isString: L,
            isObject: R,
            isBuiltInObject: B,
            isTypedArray: U,
            isDom: V,
            eqNaN: K,
            retrieve: G,
            retrieve2: W,
            retrieve3: j,
            slice: H,
            normalizeCssArray: z,
            assert: X,
            trim: q,
            setAsPrimitive: J,
            isPrimitive: Z,
            createHashMap: $,
            concatArray: ee,
            noop: te
        }), ne = "undefined" == typeof Float32Array ? Array : Float32Array;

        function oe(e, t) {
            var i = new ne(2);
            return null == e && (e = 0), null == t && (t = 0), i[0] = e, i[1] = t, i
        }

        function ae(e, t) {
            return e[0] = t[0], e[1] = t[1], e
        }

        function re(e) {
            var t = new ne(2);
            return t[0] = e[0], t[1] = e[1], t
        }

        function se(e, t, i) {
            return e[0] = t, e[1] = i, e
        }

        function le(e, t, i) {
            return e[0] = t[0] + i[0], e[1] = t[1] + i[1], e
        }

        function de(e, t, i, n) {
            return e[0] = t[0] + i[0] * n, e[1] = t[1] + i[1] * n, e
        }

        function ue(e, t, i) {
            return e[0] = t[0] - i[0], e[1] = t[1] - i[1], e
        }

        function ce(e) {
            return Math.sqrt(fe(e))
        }

        var he = ce;

        function fe(e) {
            return e[0] * e[0] + e[1] * e[1]
        }

        var pe = fe;

        function ge(e, t, i) {
            return e[0] = t[0] * i, e[1] = t[1] * i, e
        }

        function me(e, t) {
            var i = ce(t);
            return 0 === i ? (e[0] = 0, e[1] = 0) : (e[0] = t[0] / i, e[1] = t[1] / i), e
        }

        function ve(e, t) {
            return Math.sqrt((e[0] - t[0]) * (e[0] - t[0]) + (e[1] - t[1]) * (e[1] - t[1]))
        }

        var ye = ve;

        function Te(e, t) {
            return (e[0] - t[0]) * (e[0] - t[0]) + (e[1] - t[1]) * (e[1] - t[1])
        }

        var we = Te;

        function ke(e, t, i, n) {
            return e[0] = t[0] + n * (i[0] - t[0]), e[1] = t[1] + n * (i[1] - t[1]), e
        }

        function Ce(e, t, i) {
            var n = t[0], o = t[1];
            return e[0] = i[0] * n + i[2] * o + i[4], e[1] = i[1] * n + i[3] * o + i[5], e
        }

        function be(e, t, i) {
            return e[0] = Math.min(t[0], i[0]), e[1] = Math.min(t[1], i[1]), e
        }

        function Ie(e, t, i) {
            return e[0] = Math.max(t[0], i[0]), e[1] = Math.max(t[1], i[1]), e
        }

        var Se = (Object.freeze || Object)({
            create: oe,
            copy: ae,
            clone: re,
            set: se,
            add: le,
            scaleAndAdd: de,
            sub: ue,
            len: ce,
            length: he,
            lenSquare: fe,
            lengthSquare: pe,
            mul: function (e, t, i) {
                return e[0] = t[0] * i[0], e[1] = t[1] * i[1], e
            },
            div: function (e, t, i) {
                return e[0] = t[0] / i[0], e[1] = t[1] / i[1], e
            },
            dot: function (e, t) {
                return e[0] * t[0] + e[1] * t[1]
            },
            scale: ge,
            normalize: me,
            distance: ve,
            dist: ye,
            distanceSquare: Te,
            distSquare: we,
            negate: function (e, t) {
                return e[0] = -t[0], e[1] = -t[1], e
            },
            lerp: ke,
            applyTransform: Ce,
            min: be,
            max: Ie
        });

        function _e() {
            this.on("mousedown", this._dragStart, this), this.on("mousemove", this._drag, this), this.on("mouseup", this._dragEnd, this)
        }

        function De(e, t) {
            return {target: e, topTarget: t && t.topTarget}
        }

        _e.prototype = {
            constructor: _e, _dragStart: function (e) {
                for (var t = e.target; t && !t.draggable;) t = t.parent;
                t && ((this._draggingTarget = t).dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.dispatchToElement(De(t, e), "dragstart", e.event))
            }, _drag: function (e) {
                var t = this._draggingTarget;
                if (t) {
                    var i = e.offsetX, n = e.offsetY, o = i - this._x, a = n - this._y;
                    this._x = i, this._y = n, t.drift(o, a, e), this.dispatchToElement(De(t, e), "drag", e.event);
                    var r = this.findHover(i, n, t).target, s = this._dropTarget;
                    t !== (this._dropTarget = r) && (s && r !== s && this.dispatchToElement(De(s, e), "dragleave", e.event), r && r !== s && this.dispatchToElement(De(r, e), "dragenter", e.event))
                }
            }, _dragEnd: function (e) {
                var t = this._draggingTarget;
                t && (t.dragging = !1), this.dispatchToElement(De(t, e), "dragend", e.event), this._dropTarget && this.dispatchToElement(De(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null
            }
        };
        var Ae = Array.prototype.slice, Ne = function (e) {
            this._$handlers = {}, this._$eventProcessor = e
        };

        function xe(e, t, i, n, o, a) {
            var r = e._$handlers;
            if ("function" == typeof i && (o = n, n = i, i = null), !n || !t) return e;
            i = function (e, t) {
                var i = e._$eventProcessor;
                return null != t && i && i.normalizeQuery && (t = i.normalizeQuery(t)), t
            }(e, i), r[t] || (r[t] = []);
            for (var s = 0; s < r[t].length; s++) if (r[t][s].h === n) return e;
            var l = {h: n, one: a, query: i, ctx: o || e, callAtLast: n.zrEventfulCallAtLast}, d = r[t].length - 1,
                u = r[t][d];
            return u && u.callAtLast ? r[t].splice(d, 0, l) : r[t].push(l), e
        }

        Ne.prototype = {
            constructor: Ne, one: function (e, t, i, n) {
                return xe(this, e, t, i, n, !0)
            }, on: function (e, t, i, n) {
                return xe(this, e, t, i, n, !1)
            }, isSilent: function (e) {
                var t = this._$handlers;
                return !t[e] || !t[e].length
            }, off: function (e, t) {
                var i = this._$handlers;
                if (!e) return this._$handlers = {}, this;
                if (t) {
                    if (i[e]) {
                        for (var n = [], o = 0, a = i[e].length; o < a; o++) i[e][o].h !== t && n.push(i[e][o]);
                        i[e] = n
                    }
                    i[e] && 0 === i[e].length && delete i[e]
                } else delete i[e];
                return this
            }, trigger: function (e) {
                var t = this._$handlers[e], i = this._$eventProcessor;
                if (t) {
                    var n = arguments, o = n.length;
                    3 < o && (n = Ae.call(n, 1));
                    for (var a = t.length, r = 0; r < a;) {
                        var s = t[r];
                        if (i && i.filter && null != s.query && !i.filter(e, s.query)) r++; else {
                            switch (o) {
                                case 1:
                                    s.h.call(s.ctx);
                                    break;
                                case 2:
                                    s.h.call(s.ctx, n[1]);
                                    break;
                                case 3:
                                    s.h.call(s.ctx, n[1], n[2]);
                                    break;
                                default:
                                    s.h.apply(s.ctx, n)
                            }
                            s.one ? (t.splice(r, 1), a--) : r++
                        }
                    }
                }
                return i && i.afterTrigger && i.afterTrigger(e), this
            }, triggerWithContext: function (e) {
                var t = this._$handlers[e], i = this._$eventProcessor;
                if (t) {
                    var n = arguments, o = n.length;
                    4 < o && (n = Ae.call(n, 1, n.length - 1));
                    for (var a = n[n.length - 1], r = t.length, s = 0; s < r;) {
                        var l = t[s];
                        if (i && i.filter && null != l.query && !i.filter(e, l.query)) s++; else {
                            switch (o) {
                                case 1:
                                    l.h.call(a);
                                    break;
                                case 2:
                                    l.h.call(a, n[1]);
                                    break;
                                case 3:
                                    l.h.call(a, n[1], n[2]);
                                    break;
                                default:
                                    l.h.apply(a, n)
                            }
                            l.one ? (t.splice(s, 1), r--) : s++
                        }
                    }
                }
                return i && i.afterTrigger && i.afterTrigger(e), this
            }
        };
        var Ee = Math.log(2);

        function Oe(e, t, i, n, o, a) {
            var r = n + "-" + o, s = e.length;
            if (a.hasOwnProperty(r)) return a[r];
            if (1 === t) {
                var l = Math.round(Math.log((1 << s) - 1 & ~o) / Ee);
                return e[i][l]
            }
            for (var d = n | 1 << i, u = i + 1; n & 1 << u;) u++;
            for (var c = 0, h = 0, f = 0; h < s; h++) {
                var p = 1 << h;
                p & o || (c += (f % 2 ? -1 : 1) * e[i][h] * Oe(e, t - 1, u, d, o | p, a), f++)
            }
            return a[r] = c
        }

        function Pe(e, t) {
            var i = [[e[0], e[1], 1, 0, 0, 0, -t[0] * e[0], -t[0] * e[1]], [0, 0, 0, e[0], e[1], 1, -t[1] * e[0], -t[1] * e[1]], [e[2], e[3], 1, 0, 0, 0, -t[2] * e[2], -t[2] * e[3]], [0, 0, 0, e[2], e[3], 1, -t[3] * e[2], -t[3] * e[3]], [e[4], e[5], 1, 0, 0, 0, -t[4] * e[4], -t[4] * e[5]], [0, 0, 0, e[4], e[5], 1, -t[5] * e[4], -t[5] * e[5]], [e[6], e[7], 1, 0, 0, 0, -t[6] * e[6], -t[6] * e[7]], [0, 0, 0, e[6], e[7], 1, -t[7] * e[6], -t[7] * e[7]]],
                n = {}, o = Oe(i, 8, 0, 0, 0, n);
            if (0 !== o) {
                for (var a = [], r = 0; r < 8; r++) for (var s = 0; s < 8; s++) null == a[s] && (a[s] = 0), a[s] += ((r + s) % 2 ? -1 : 1) * Oe(i, 7, 0 === r ? 1 : 0, 1 << r, 1 << s, n) / o * t[r];
                return function (e, t, i) {
                    var n = t * a[6] + i * a[7] + 1;
                    e[0] = (t * a[0] + i * a[1] + a[2]) / n, e[1] = (t * a[3] + i * a[4] + a[5]) / n
                }
            }
        }

        var Me = "___zrEVENTSAVED", Fe = [];

        function Le(e, t, i, n, a) {
            if (t.getBoundingClientRect && o.domSupported && !Re(t)) {
                var r = t[Me] || (t[Me] = {}), s = function (e, t, i) {
                    for (var n = i ? "invTrans" : "trans", o = t[n], a = t.srcCoords, r = !0, s = [], l = [], d = 0; d < 4; d++) {
                        var u = e[d].getBoundingClientRect(), c = 2 * d, h = u.left, f = u.top;
                        s.push(h, f), r = r && a && h === a[c] && f === a[1 + c], l.push(e[d].offsetLeft, e[d].offsetTop)
                    }
                    return r && o ? o : (t.srcCoords = s, t[n] = i ? Pe(l, s) : Pe(s, l))
                }(function (e, t) {
                    var i = t.markers;
                    if (i) return i;
                    i = t.markers = [];
                    for (var n = ["left", "right"], o = ["top", "bottom"], a = 0; a < 4; a++) {
                        var r = document.createElement("div"), s = r.style, l = a % 2, d = (a >> 1) % 2;
                        s.cssText = ["position: absolute", "visibility: hidden", "padding: 0", "margin: 0", "border-width: 0", "user-select: none", "width:0", "height:0", n[l] + ":0", o[d] + ":0", n[1 - l] + ":auto", o[1 - d] + ":auto", ""].join("!important;"), e.appendChild(r), i.push(r)
                    }
                    return i
                }(t, r), r, a);
                if (s) return s(e, i, n), !0
            }
            return !1
        }

        function Re(e) {
            return "CANVAS" === e.nodeName.toUpperCase()
        }

        var Be = "undefined" != typeof window && !!window.addEventListener,
            Ue = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, Ve = [];

        function Ke(e, t, i, n) {
            return i = i || {}, n || !o.canvasSupported ? Ge(e, t, i) : o.browser.firefox && null != t.layerX && t.layerX !== t.offsetX ? (i.zrX = t.layerX, i.zrY = t.layerY) : null != t.offsetX ? (i.zrX = t.offsetX, i.zrY = t.offsetY) : Ge(e, t, i), i
        }

        function Ge(e, t, i) {
            if (o.domSupported && e.getBoundingClientRect) {
                var n = t.clientX, a = t.clientY;
                if (Re(e)) {
                    var r = e.getBoundingClientRect();
                    return i.zrX = n - r.left, void (i.zrY = a - r.top)
                }
                if (Le(Ve, e, n, a)) return i.zrX = Ve[0], void (i.zrY = Ve[1])
            }
            i.zrX = i.zrY = 0
        }

        function We(e) {
            return e || window.event
        }

        function je(e, t, i) {
            if (null != (t = We(t)).zrX) return t;
            var n = t.type;
            if (n && 0 <= n.indexOf("touch")) {
                var o = "touchend" !== n ? t.targetTouches[0] : t.changedTouches[0];
                o && Ke(e, o, t, i)
            } else Ke(e, t, t, i), t.zrDelta = t.wheelDelta ? t.wheelDelta / 120 : -(t.detail || 0) / 3;
            var a = t.button;
            return null == t.which && void 0 !== a && Ue.test(t.type) && (t.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), t
        }

        function He(e, t, i, n) {
            Be ? e.addEventListener(t, i, n) : e.attachEvent("on" + t, i)
        }

        var ze = Be ? function (e) {
            e.preventDefault(), e.stopPropagation(), e.cancelBubble = !0
        } : function (e) {
            e.returnValue = !1, e.cancelBubble = !0
        };

        function Xe(e) {
            return 2 === e.which || 3 === e.which
        }

        function qe() {
            this._track = []
        }

        function Ye(e) {
            var t = e[1][0] - e[0][0], i = e[1][1] - e[0][1];
            return Math.sqrt(t * t + i * i)
        }

        qe.prototype = {
            constructor: qe, recognize: function (e, t, i) {
                return this._doTrack(e, t, i), this._recognize(e)
            }, clear: function () {
                return this._track.length = 0, this
            }, _doTrack: function (e, t, i) {
                var n = e.touches;
                if (n) {
                    for (var o = {points: [], touches: [], target: t, event: e}, a = 0, r = n.length; a < r; a++) {
                        var s = n[a], l = Ke(i, s, {});
                        o.points.push([l.zrX, l.zrY]), o.touches.push(s)
                    }
                    this._track.push(o)
                }
            }, _recognize: function (e) {
                for (var t in Je) if (Je.hasOwnProperty(t)) {
                    var i = Je[t](this._track, e);
                    if (i) return i
                }
            }
        };
        var Je = {
            pinch: function (e, t) {
                var i = e.length;
                if (i) {
                    var n = (e[i - 1] || {}).points, o = (e[i - 2] || {}).points || n;
                    if (o && 1 < o.length && n && 1 < n.length) {
                        var a = Ye(n) / Ye(o);
                        isFinite(a) || (a = 1), t.pinchScale = a;
                        var r = function (e) {
                            return [(e[0][0] + e[1][0]) / 2, (e[0][1] + e[1][1]) / 2]
                        }(n);
                        return t.pinchX = r[0], t.pinchY = r[1], {type: "pinch", target: e[0].target, event: t}
                    }
                }
            }
        }, Ze = "silent";

        function Qe() {
            ze(this.event)
        }

        function $e() {
        }

        function et(e, t, i, n) {
            Ne.call(this), this.storage = e, this.painter = t, this.painterRoot = n, i = i || new $e, this.proxy = null, this._hovered = {}, this._lastTouchMoment, this._lastX, this._lastY, this._gestureMgr, _e.call(this), this.setHandlerProxy(i)
        }

        $e.prototype.dispose = function () {
        };
        var tt = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"];

        function it(e, t, i) {
            if (e[e.rectHover ? "rectContain" : "contain"](t, i)) {
                for (var n, o = e; o;) {
                    if (o.clipPath && !o.clipPath.contain(t, i)) return !1;
                    o.silent && (n = !0), o = o.parent
                }
                return !n || Ze
            }
            return !1
        }

        function nt(e, t, i) {
            var n = e.painter;
            return t < 0 || t > n.getWidth() || i < 0 || i > n.getHeight()
        }

        et.prototype = {
            constructor: et, setHandlerProxy: function (e) {
                this.proxy && this.proxy.dispose(), e && (D(tt, function (t) {
                    e.on && e.on(t, this[t], this)
                }, this), e.handler = this), this.proxy = e
            }, mousemove: function (e) {
                var t = e.zrX, i = e.zrY, n = nt(this, t, i), o = this._hovered, a = o.target;
                a && !a.__zr && (a = (o = this.findHover(o.x, o.y)).target);
                var r = this._hovered = n ? {x: t, y: i} : this.findHover(t, i), s = r.target, l = this.proxy;
                l.setCursor && l.setCursor(s ? s.cursor : "default"), a && s !== a && this.dispatchToElement(o, "mouseout", e), this.dispatchToElement(r, "mousemove", e), s && s !== a && this.dispatchToElement(r, "mouseover", e)
            }, mouseout: function (e) {
                var t = e.zrEventControl, i = e.zrIsToLocalDOM;
                "only_globalout" !== t && this.dispatchToElement(this._hovered, "mouseout", e), "no_globalout" !== t && (i || this.trigger("globalout", {
                    type: "globalout",
                    event: e
                }))
            }, resize: function (e) {
                this._hovered = {}
            }, dispatch: function (e, t) {
                var i = this[e];
                i && i.call(this, t)
            }, dispose: function () {
                this.proxy.dispose(), this.storage = this.proxy = this.painter = null
            }, setCursorStyle: function (e) {
                var t = this.proxy;
                t.setCursor && t.setCursor(e)
            }, dispatchToElement: function (e, t, i) {
                var n = (e = e || {}).target;
                if (!n || !n.silent) {
                    for (var o = "on" + t, a = function (e, t, i) {
                        return {
                            type: e,
                            event: i,
                            target: t.target,
                            topTarget: t.topTarget,
                            cancelBubble: !1,
                            offsetX: i.zrX,
                            offsetY: i.zrY,
                            gestureEvent: i.gestureEvent,
                            pinchX: i.pinchX,
                            pinchY: i.pinchY,
                            pinchScale: i.pinchScale,
                            wheelDelta: i.zrDelta,
                            zrByTouch: i.zrByTouch,
                            which: i.which,
                            stop: Qe
                        }
                    }(t, e, i); n && (n[o] && (a.cancelBubble = n[o].call(n, a)), n.trigger(t, a), n = n.parent, !a.cancelBubble);) ;
                    a.cancelBubble || (this.trigger(t, a), this.painter && this.painter.eachOtherLayer(function (e) {
                        "function" == typeof e[o] && e[o].call(e, a), e.trigger && e.trigger(t, a)
                    }))
                }
            }, findHover: function (e, t, i) {
                for (var n = this.storage.getDisplayList(), o = {x: e, y: t}, a = n.length - 1; 0 <= a; a--) {
                    var r;
                    if (n[a] !== i && !n[a].ignore && (r = it(n[a], e, t)) && (o.topTarget || (o.topTarget = n[a]), r !== Ze)) {
                        o.target = n[a];
                        break
                    }
                }
                return o
            }, processGesture: function (e, t) {
                this._gestureMgr || (this._gestureMgr = new qe);
                var i = this._gestureMgr;
                "start" === t && i.clear();
                var n = i.recognize(e, this.findHover(e.zrX, e.zrY, null).target, this.proxy.dom);
                if ("end" === t && i.clear(), n) {
                    var o = n.type;
                    e.gestureEvent = o, this.dispatchToElement({target: n.target}, o, n.event)
                }
            }
        }, D(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (e) {
            et.prototype[e] = function (t) {
                var i, n, o = t.zrX, a = t.zrY, r = nt(this, o, a);
                if ("mouseup" === e && r || (n = (i = this.findHover(o, a)).target), "mousedown" === e) this._downEl = n, this._downPoint = [t.zrX, t.zrY], this._upEl = n; else if ("mouseup" === e) this._upEl = n; else if ("click" === e) {
                    if (this._downEl !== this._upEl || !this._downPoint || 4 < ye(this._downPoint, [t.zrX, t.zrY])) return;
                    this._downPoint = null
                }
                this.dispatchToElement(i, e, t)
            }
        }), S(et, Ne), S(et, _e);
        var ot = "undefined" == typeof Float32Array ? Array : Float32Array;

        function at() {
            var e = new ot(6);
            return rt(e), e
        }

        function rt(e) {
            return e[0] = 1, e[1] = 0, e[2] = 0, e[3] = 1, e[4] = 0, e[5] = 0, e
        }

        function st(e, t) {
            return e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e
        }

        function lt(e, t, i) {
            var n = t[0] * i[0] + t[2] * i[1], o = t[1] * i[0] + t[3] * i[1], a = t[0] * i[2] + t[2] * i[3],
                r = t[1] * i[2] + t[3] * i[3], s = t[0] * i[4] + t[2] * i[5] + t[4],
                l = t[1] * i[4] + t[3] * i[5] + t[5];
            return e[0] = n, e[1] = o, e[2] = a, e[3] = r, e[4] = s, e[5] = l, e
        }

        function dt(e, t, i) {
            return e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4] + i[0], e[5] = t[5] + i[1], e
        }

        function ut(e, t, i) {
            var n = t[0], o = t[2], a = t[4], r = t[1], s = t[3], l = t[5], d = Math.sin(i), u = Math.cos(i);
            return e[0] = n * u + r * d, e[1] = -n * d + r * u, e[2] = o * u + s * d, e[3] = -o * d + u * s, e[4] = u * a + d * l, e[5] = u * l - d * a, e
        }

        function ct(e, t, i) {
            var n = i[0], o = i[1];
            return e[0] = t[0] * n, e[1] = t[1] * o, e[2] = t[2] * n, e[3] = t[3] * o, e[4] = t[4] * n, e[5] = t[5] * o, e
        }

        function ht(e, t) {
            var i = t[0], n = t[2], o = t[4], a = t[1], r = t[3], s = t[5], l = i * r - a * n;
            return l ? (l = 1 / l, e[0] = r * l, e[1] = -a * l, e[2] = -n * l, e[3] = i * l, e[4] = (n * s - r * o) * l, e[5] = (a * o - i * s) * l, e) : null
        }

        function ft(e) {
            var t = at();
            return st(t, e), t
        }

        var pt = (Object.freeze || Object)({
            create: at,
            identity: rt,
            copy: st,
            mul: lt,
            translate: dt,
            rotate: ut,
            scale: ct,
            invert: ht,
            clone: ft
        }), gt = rt;

        function mt(e) {
            return 5e-5 < e || e < -5e-5
        }

        var vt = function (e) {
            (e = e || {}).position || (this.position = [0, 0]), null == e.rotation && (this.rotation = 0), e.scale || (this.scale = [1, 1]), this.origin = this.origin || null
        }, yt = vt.prototype;
        yt.transform = null, yt.needLocalTransform = function () {
            return mt(this.rotation) || mt(this.position[0]) || mt(this.position[1]) || mt(this.scale[0] - 1) || mt(this.scale[1] - 1)
        };
        var Tt = [];
        yt.updateTransform = function () {
            var e = this.parent, t = e && e.transform, i = this.needLocalTransform(), n = this.transform;
            if (i || t) {
                n = n || at(), i ? this.getLocalTransform(n) : gt(n), t && (i ? lt(n, e.transform, n) : st(n, e.transform)), this.transform = n;
                var o = this.globalScaleRatio;
                if (null != o && 1 !== o) {
                    this.getGlobalScale(Tt);
                    var a = Tt[0] < 0 ? -1 : 1, r = Tt[1] < 0 ? -1 : 1, s = ((Tt[0] - a) * o + a) / Tt[0] || 0,
                        l = ((Tt[1] - r) * o + r) / Tt[1] || 0;
                    n[0] *= s, n[1] *= s, n[2] *= l, n[3] *= l
                }
                this.invTransform = this.invTransform || at(), ht(this.invTransform, n)
            } else n && gt(n)
        }, yt.getLocalTransform = function (e) {
            return vt.getLocalTransform(this, e)
        }, yt.setTransform = function (e) {
            var t = this.transform, i = e.dpr || 1;
            t ? e.setTransform(i * t[0], i * t[1], i * t[2], i * t[3], i * t[4], i * t[5]) : e.setTransform(i, 0, 0, i, 0, 0)
        }, yt.restoreTransform = function (e) {
            var t = e.dpr || 1;
            e.setTransform(t, 0, 0, t, 0, 0)
        };
        var wt = [], kt = at();
        yt.setLocalTransform = function (e) {
            if (e) {
                var t = e[0] * e[0] + e[1] * e[1], i = e[2] * e[2] + e[3] * e[3], n = this.position, o = this.scale;
                mt(t - 1) && (t = Math.sqrt(t)), mt(i - 1) && (i = Math.sqrt(i)), e[0] < 0 && (t = -t), e[3] < 0 && (i = -i), n[0] = e[4], n[1] = e[5], o[0] = t, o[1] = i, this.rotation = Math.atan2(-e[1] / i, e[0] / t)
            }
        }, yt.decomposeTransform = function () {
            if (this.transform) {
                var e = this.parent, t = this.transform;
                e && e.transform && (lt(wt, e.invTransform, t), t = wt);
                var i = this.origin;
                i && (i[0] || i[1]) && (kt[4] = i[0], kt[5] = i[1], lt(wt, t, kt), wt[4] -= i[0], wt[5] -= i[1], t = wt), this.setLocalTransform(t)
            }
        }, yt.getGlobalScale = function (e) {
            var t = this.transform;
            return e = e || [], t ? (e[0] = Math.sqrt(t[0] * t[0] + t[1] * t[1]), e[1] = Math.sqrt(t[2] * t[2] + t[3] * t[3]), t[0] < 0 && (e[0] = -e[0]), t[3] < 0 && (e[1] = -e[1])) : (e[0] = 1, e[1] = 1), e
        }, yt.transformCoordToLocal = function (e, t) {
            var i = [e, t], n = this.invTransform;
            return n && Ce(i, i, n), i
        }, yt.transformCoordToGlobal = function (e, t) {
            var i = [e, t], n = this.transform;
            return n && Ce(i, i, n), i
        }, vt.getLocalTransform = function (e, t) {
            gt(t = t || []);
            var i = e.origin, n = e.scale || [1, 1], o = e.rotation || 0, a = e.position || [0, 0];
            return i && (t[4] -= i[0], t[5] -= i[1]), ct(t, t, n), o && ut(t, t, o), i && (t[4] += i[0], t[5] += i[1]), t[4] += a[0], t[5] += a[1], t
        };
        var Ct = {
            linear: function (e) {
                return e
            }, quadraticIn: function (e) {
                return e * e
            }, quadraticOut: function (e) {
                return e * (2 - e)
            }, quadraticInOut: function (e) {
                return (e *= 2) < 1 ? .5 * e * e : -.5 * (--e * (e - 2) - 1)
            }, cubicIn: function (e) {
                return e * e * e
            }, cubicOut: function (e) {
                return --e * e * e + 1
            }, cubicInOut: function (e) {
                return (e *= 2) < 1 ? .5 * e * e * e : .5 * ((e -= 2) * e * e + 2)
            }, quarticIn: function (e) {
                return e * e * e * e
            }, quarticOut: function (e) {
                return 1 - --e * e * e * e
            }, quarticInOut: function (e) {
                return (e *= 2) < 1 ? .5 * e * e * e * e : -.5 * ((e -= 2) * e * e * e - 2)
            }, quinticIn: function (e) {
                return e * e * e * e * e
            }, quinticOut: function (e) {
                return --e * e * e * e * e + 1
            }, quinticInOut: function (e) {
                return (e *= 2) < 1 ? .5 * e * e * e * e * e : .5 * ((e -= 2) * e * e * e * e + 2)
            }, sinusoidalIn: function (e) {
                return 1 - Math.cos(e * Math.PI / 2)
            }, sinusoidalOut: function (e) {
                return Math.sin(e * Math.PI / 2)
            }, sinusoidalInOut: function (e) {
                return .5 * (1 - Math.cos(Math.PI * e))
            }, exponentialIn: function (e) {
                return 0 === e ? 0 : Math.pow(1024, e - 1)
            }, exponentialOut: function (e) {
                return 1 === e ? 1 : 1 - Math.pow(2, -10 * e)
            }, exponentialInOut: function (e) {
                return 0 === e ? 0 : 1 === e ? 1 : (e *= 2) < 1 ? .5 * Math.pow(1024, e - 1) : .5 * (2 - Math.pow(2, -10 * (e - 1)))
            }, circularIn: function (e) {
                return 1 - Math.sqrt(1 - e * e)
            }, circularOut: function (e) {
                return Math.sqrt(1 - --e * e)
            }, circularInOut: function (e) {
                return (e *= 2) < 1 ? -.5 * (Math.sqrt(1 - e * e) - 1) : .5 * (Math.sqrt(1 - (e -= 2) * e) + 1)
            }, elasticIn: function (e) {
                var t, i = .1;
                return 0 === e ? 0 : 1 === e ? 1 : (t = !i || i < 1 ? (i = 1, .1) : .4 * Math.asin(1 / i) / (2 * Math.PI), -i * Math.pow(2, 10 * (e -= 1)) * Math.sin((e - t) * (2 * Math.PI) / .4))
            }, elasticOut: function (e) {
                var t, i = .1;
                return 0 === e ? 0 : 1 === e ? 1 : (t = !i || i < 1 ? (i = 1, .1) : .4 * Math.asin(1 / i) / (2 * Math.PI), i * Math.pow(2, -10 * e) * Math.sin((e - t) * (2 * Math.PI) / .4) + 1)
            }, elasticInOut: function (e) {
                var t, i = .1;
                return 0 === e ? 0 : 1 === e ? 1 : (t = !i || i < 1 ? (i = 1, .1) : .4 * Math.asin(1 / i) / (2 * Math.PI), (e *= 2) < 1 ? i * Math.pow(2, 10 * (e -= 1)) * Math.sin((e - t) * (2 * Math.PI) / .4) * -.5 : i * Math.pow(2, -10 * (e -= 1)) * Math.sin((e - t) * (2 * Math.PI) / .4) * .5 + 1)
            }, backIn: function (e) {
                return e * e * (2.70158 * e - 1.70158)
            }, backOut: function (e) {
                return --e * e * (2.70158 * e + 1.70158) + 1
            }, backInOut: function (e) {
                var t = 2.5949095;
                return (e *= 2) < 1 ? e * e * ((1 + t) * e - t) * .5 : .5 * ((e -= 2) * e * ((1 + t) * e + t) + 2)
            }, bounceIn: function (e) {
                return 1 - Ct.bounceOut(1 - e)
            }, bounceOut: function (e) {
                return e < 1 / 2.75 ? 7.5625 * e * e : e < 2 / 2.75 ? 7.5625 * (e -= 1.5 / 2.75) * e + .75 : e < 2.5 / 2.75 ? 7.5625 * (e -= 2.25 / 2.75) * e + .9375 : 7.5625 * (e -= 2.625 / 2.75) * e + .984375
            }, bounceInOut: function (e) {
                return e < .5 ? .5 * Ct.bounceIn(2 * e) : .5 * Ct.bounceOut(2 * e - 1) + .5
            }
        };

        function bt(e) {
            this._target = e.target, this._life = e.life || 1e3, this._delay = e.delay || 0, this._initialized = !1, this.loop = null != e.loop && e.loop, this.gap = e.gap || 0, this.easing = e.easing || "Linear", this.onframe = e.onframe, this.ondestroy = e.ondestroy, this.onrestart = e.onrestart, this._pausedTime = 0, this._paused = !1
        }

        function It() {
            this.head = null, this.tail = null, this._len = 0
        }

        bt.prototype = {
            constructor: bt, step: function (e, t) {
                if (this._initialized || (this._startTime = e + this._delay, this._initialized = !0), this._paused) this._pausedTime += t; else {
                    var i = (e - this._startTime - this._pausedTime) / this._life;
                    if (!(i < 0)) {
                        i = Math.min(i, 1);
                        var n = this.easing, o = "string" == typeof n ? Ct[n] : n,
                            a = "function" == typeof o ? o(i) : i;
                        return this.fire("frame", a), 1 === i ? this.loop ? (this.restart(e), "restart") : (this._needsRemove = !0, "destroy") : null
                    }
                }
            }, restart: function (e) {
                var t = (e - this._startTime - this._pausedTime) % this._life;
                this._startTime = e - t + this.gap, this._pausedTime = 0, this._needsRemove = !1
            }, fire: function (e, t) {
                this[e = "on" + e] && this[e](this._target, t)
            }, pause: function () {
                this._paused = !0
            }, resume: function () {
                this._paused = !1
            }
        };
        var St = It.prototype;

        function _t(e) {
            this._list = new It, this._map = {}, this._maxSize = e || 10, this._lastRemovedEntry = null
        }

        St.insert = function (e) {
            var t = new Dt(e);
            return this.insertEntry(t), t
        }, St.insertEntry = function (e) {
            this.head ? ((this.tail.next = e).prev = this.tail, e.next = null, this.tail = e) : this.head = this.tail = e, this._len++
        }, St.remove = function (e) {
            var t = e.prev, i = e.next;
            t ? t.next = i : this.head = i, i ? i.prev = t : this.tail = t, e.next = e.prev = null, this._len--
        }, St.len = function () {
            return this._len
        }, St.clear = function () {
            this.head = this.tail = null, this._len = 0
        };
        var Dt = function (e) {
            this.value = e, this.next, this.prev
        }, At = _t.prototype;
        At.put = function (e, t) {
            var i = this._list, n = this._map, o = null;
            if (null == n[e]) {
                var a = i.len(), r = this._lastRemovedEntry;
                if (a >= this._maxSize && 0 < a) {
                    var s = i.head;
                    i.remove(s), delete n[s.key], o = s.value, this._lastRemovedEntry = s
                }
                r ? r.value = t : r = new Dt(t), r.key = e, i.insertEntry(r), n[e] = r
            }
            return o
        }, At.get = function (e) {
            var t = this._map[e], i = this._list;
            if (null != t) return t !== i.tail && (i.remove(t), i.insertEntry(t)), t.value
        }, At.clear = function () {
            this._list.clear(), this._map = {}
        };
        var Nt = {
            transparent: [0, 0, 0, 0],
            aliceblue: [240, 248, 255, 1],
            antiquewhite: [250, 235, 215, 1],
            aqua: [0, 255, 255, 1],
            aquamarine: [127, 255, 212, 1],
            azure: [240, 255, 255, 1],
            beige: [245, 245, 220, 1],
            bisque: [255, 228, 196, 1],
            black: [0, 0, 0, 1],
            blanchedalmond: [255, 235, 205, 1],
            blue: [0, 0, 255, 1],
            blueviolet: [138, 43, 226, 1],
            brown: [165, 42, 42, 1],
            burlywood: [222, 184, 135, 1],
            cadetblue: [95, 158, 160, 1],
            chartreuse: [127, 255, 0, 1],
            chocolate: [210, 105, 30, 1],
            coral: [255, 127, 80, 1],
            cornflowerblue: [100, 149, 237, 1],
            cornsilk: [255, 248, 220, 1],
            crimson: [220, 20, 60, 1],
            cyan: [0, 255, 255, 1],
            darkblue: [0, 0, 139, 1],
            darkcyan: [0, 139, 139, 1],
            darkgoldenrod: [184, 134, 11, 1],
            darkgray: [169, 169, 169, 1],
            darkgreen: [0, 100, 0, 1],
            darkgrey: [169, 169, 169, 1],
            darkkhaki: [189, 183, 107, 1],
            darkmagenta: [139, 0, 139, 1],
            darkolivegreen: [85, 107, 47, 1],
            darkorange: [255, 140, 0, 1],
            darkorchid: [153, 50, 204, 1],
            darkred: [139, 0, 0, 1],
            darksalmon: [233, 150, 122, 1],
            darkseagreen: [143, 188, 143, 1],
            darkslateblue: [72, 61, 139, 1],
            darkslategray: [47, 79, 79, 1],
            darkslategrey: [47, 79, 79, 1],
            darkturquoise: [0, 206, 209, 1],
            darkviolet: [148, 0, 211, 1],
            deeppink: [255, 20, 147, 1],
            deepskyblue: [0, 191, 255, 1],
            dimgray: [105, 105, 105, 1],
            dimgrey: [105, 105, 105, 1],
            dodgerblue: [30, 144, 255, 1],
            firebrick: [178, 34, 34, 1],
            floralwhite: [255, 250, 240, 1],
            forestgreen: [34, 139, 34, 1],
            fuchsia: [255, 0, 255, 1],
            gainsboro: [220, 220, 220, 1],
            ghostwhite: [248, 248, 255, 1],
            gold: [255, 215, 0, 1],
            goldenrod: [218, 165, 32, 1],
            gray: [128, 128, 128, 1],
            green: [0, 128, 0, 1],
            greenyellow: [173, 255, 47, 1],
            grey: [128, 128, 128, 1],
            honeydew: [240, 255, 240, 1],
            hotpink: [255, 105, 180, 1],
            indianred: [205, 92, 92, 1],
            indigo: [75, 0, 130, 1],
            ivory: [255, 255, 240, 1],
            khaki: [240, 230, 140, 1],
            lavender: [230, 230, 250, 1],
            lavenderblush: [255, 240, 245, 1],
            lawngreen: [124, 252, 0, 1],
            lemonchiffon: [255, 250, 205, 1],
            lightblue: [173, 216, 230, 1],
            lightcoral: [240, 128, 128, 1],
            lightcyan: [224, 255, 255, 1],
            lightgoldenrodyellow: [250, 250, 210, 1],
            lightgray: [211, 211, 211, 1],
            lightgreen: [144, 238, 144, 1],
            lightgrey: [211, 211, 211, 1],
            lightpink: [255, 182, 193, 1],
            lightsalmon: [255, 160, 122, 1],
            lightseagreen: [32, 178, 170, 1],
            lightskyblue: [135, 206, 250, 1],
            lightslategray: [119, 136, 153, 1],
            lightslategrey: [119, 136, 153, 1],
            lightsteelblue: [176, 196, 222, 1],
            lightyellow: [255, 255, 224, 1],
            lime: [0, 255, 0, 1],
            limegreen: [50, 205, 50, 1],
            linen: [250, 240, 230, 1],
            magenta: [255, 0, 255, 1],
            maroon: [128, 0, 0, 1],
            mediumaquamarine: [102, 205, 170, 1],
            mediumblue: [0, 0, 205, 1],
            mediumorchid: [186, 85, 211, 1],
            mediumpurple: [147, 112, 219, 1],
            mediumseagreen: [60, 179, 113, 1],
            mediumslateblue: [123, 104, 238, 1],
            mediumspringgreen: [0, 250, 154, 1],
            mediumturquoise: [72, 209, 204, 1],
            mediumvioletred: [199, 21, 133, 1],
            midnightblue: [25, 25, 112, 1],
            mintcream: [245, 255, 250, 1],
            mistyrose: [255, 228, 225, 1],
            moccasin: [255, 228, 181, 1],
            navajowhite: [255, 222, 173, 1],
            navy: [0, 0, 128, 1],
            oldlace: [253, 245, 230, 1],
            olive: [128, 128, 0, 1],
            olivedrab: [107, 142, 35, 1],
            orange: [255, 165, 0, 1],
            orangered: [255, 69, 0, 1],
            orchid: [218, 112, 214, 1],
            palegoldenrod: [238, 232, 170, 1],
            palegreen: [152, 251, 152, 1],
            paleturquoise: [175, 238, 238, 1],
            palevioletred: [219, 112, 147, 1],
            papayawhip: [255, 239, 213, 1],
            peachpuff: [255, 218, 185, 1],
            peru: [205, 133, 63, 1],
            pink: [255, 192, 203, 1],
            plum: [221, 160, 221, 1],
            powderblue: [176, 224, 230, 1],
            purple: [128, 0, 128, 1],
            red: [255, 0, 0, 1],
            rosybrown: [188, 143, 143, 1],
            royalblue: [65, 105, 225, 1],
            saddlebrown: [139, 69, 19, 1],
            salmon: [250, 128, 114, 1],
            sandybrown: [244, 164, 96, 1],
            seagreen: [46, 139, 87, 1],
            seashell: [255, 245, 238, 1],
            sienna: [160, 82, 45, 1],
            silver: [192, 192, 192, 1],
            skyblue: [135, 206, 235, 1],
            slateblue: [106, 90, 205, 1],
            slategray: [112, 128, 144, 1],
            slategrey: [112, 128, 144, 1],
            snow: [255, 250, 250, 1],
            springgreen: [0, 255, 127, 1],
            steelblue: [70, 130, 180, 1],
            tan: [210, 180, 140, 1],
            teal: [0, 128, 128, 1],
            thistle: [216, 191, 216, 1],
            tomato: [255, 99, 71, 1],
            turquoise: [64, 224, 208, 1],
            violet: [238, 130, 238, 1],
            wheat: [245, 222, 179, 1],
            white: [255, 255, 255, 1],
            whitesmoke: [245, 245, 245, 1],
            yellow: [255, 255, 0, 1],
            yellowgreen: [154, 205, 50, 1]
        };

        function xt(e) {
            return (e = Math.round(e)) < 0 ? 0 : 255 < e ? 255 : e
        }

        function Et(e) {
            return e < 0 ? 0 : 1 < e ? 1 : e
        }

        function Ot(e) {
            return e.length && "%" === e.charAt(e.length - 1) ? xt(parseFloat(e) / 100 * 255) : xt(parseInt(e, 10))
        }

        function Pt(e) {
            return e.length && "%" === e.charAt(e.length - 1) ? Et(parseFloat(e) / 100) : Et(parseFloat(e))
        }

        function Mt(e, t, i) {
            return i < 0 ? i += 1 : 1 < i && (i -= 1), 6 * i < 1 ? e + (t - e) * i * 6 : 2 * i < 1 ? t : 3 * i < 2 ? e + (t - e) * (2 / 3 - i) * 6 : e
        }

        function Ft(e, t, i) {
            return e + (t - e) * i
        }

        function Lt(e, t, i, n, o) {
            return e[0] = t, e[1] = i, e[2] = n, e[3] = o, e
        }

        function Rt(e, t) {
            return e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e
        }

        var Bt = new _t(20), Ut = null;

        function Vt(e, t) {
            Ut && Rt(Ut, t), Ut = Bt.put(e, Ut || t.slice())
        }

        function Kt(e, t) {
            if (e) {
                t = t || [];
                var i = Bt.get(e);
                if (i) return Rt(t, i);
                var n, o = (e += "").replace(/ /g, "").toLowerCase();
                if (o in Nt) return Rt(t, Nt[o]), Vt(e, t), t;
                if ("#" === o.charAt(0)) return 4 === o.length ? 0 <= (n = parseInt(o.substr(1), 16)) && n <= 4095 ? (Lt(t, (3840 & n) >> 4 | (3840 & n) >> 8, 240 & n | (240 & n) >> 4, 15 & n | (15 & n) << 4, 1), Vt(e, t), t) : void Lt(t, 0, 0, 0, 1) : 7 === o.length ? 0 <= (n = parseInt(o.substr(1), 16)) && n <= 16777215 ? (Lt(t, (16711680 & n) >> 16, (65280 & n) >> 8, 255 & n, 1), Vt(e, t), t) : void Lt(t, 0, 0, 0, 1) : void 0;
                var a = o.indexOf("("), r = o.indexOf(")");
                if (-1 !== a && r + 1 === o.length) {
                    var s = o.substr(0, a), l = o.substr(a + 1, r - (a + 1)).split(","), d = 1;
                    switch (s) {
                        case"rgba":
                            if (4 !== l.length) return void Lt(t, 0, 0, 0, 1);
                            d = Pt(l.pop());
                        case"rgb":
                            return 3 !== l.length ? void Lt(t, 0, 0, 0, 1) : (Lt(t, Ot(l[0]), Ot(l[1]), Ot(l[2]), d), Vt(e, t), t);
                        case"hsla":
                            return 4 !== l.length ? void Lt(t, 0, 0, 0, 1) : (l[3] = Pt(l[3]), Gt(l, t), Vt(e, t), t);
                        case"hsl":
                            return 3 !== l.length ? void Lt(t, 0, 0, 0, 1) : (Gt(l, t), Vt(e, t), t);
                        default:
                            return
                    }
                }
                Lt(t, 0, 0, 0, 1)
            }
        }

        function Gt(e, t) {
            var i = (parseFloat(e[0]) % 360 + 360) % 360 / 360, n = Pt(e[1]), o = Pt(e[2]),
                a = o <= .5 ? o * (n + 1) : o + n - o * n, r = 2 * o - a;
            return Lt(t = t || [], xt(255 * Mt(r, a, i + 1 / 3)), xt(255 * Mt(r, a, i)), xt(255 * Mt(r, a, i - 1 / 3)), 1), 4 === e.length && (t[3] = e[3]), t
        }

        function Wt(e, t) {
            var i = Kt(e);
            if (i) {
                for (var n = 0; n < 3; n++) i[n] = t < 0 ? i[n] * (1 - t) | 0 : (255 - i[n]) * t + i[n] | 0, 255 < i[n] ? i[n] = 255 : e[n] < 0 && (i[n] = 0);
                return Zt(i, 4 === i.length ? "rgba" : "rgb")
            }
        }

        function jt(e) {
            var t = Kt(e);
            if (t) return ((1 << 24) + (t[0] << 16) + (t[1] << 8) + +t[2]).toString(16).slice(1)
        }

        function Ht(e, t, i) {
            if (t && t.length && 0 <= e && e <= 1) {
                i = i || [];
                var n = e * (t.length - 1), o = Math.floor(n), a = Math.ceil(n), r = t[o], s = t[a], l = n - o;
                return i[0] = xt(Ft(r[0], s[0], l)), i[1] = xt(Ft(r[1], s[1], l)), i[2] = xt(Ft(r[2], s[2], l)), i[3] = Et(Ft(r[3], s[3], l)), i
            }
        }

        var zt = Ht;

        function Xt(e, t, i) {
            if (t && t.length && 0 <= e && e <= 1) {
                var n = e * (t.length - 1), o = Math.floor(n), a = Math.ceil(n), r = Kt(t[o]), s = Kt(t[a]), l = n - o,
                    d = Zt([xt(Ft(r[0], s[0], l)), xt(Ft(r[1], s[1], l)), xt(Ft(r[2], s[2], l)), Et(Ft(r[3], s[3], l))], "rgba");
                return i ? {color: d, leftIndex: o, rightIndex: a, value: n} : d
            }
        }

        var qt = Xt;

        function Yt(e, t, i, n) {
            if (e = Kt(e)) return e = function (e) {
                if (e) {
                    var t, i, n = e[0] / 255, o = e[1] / 255, a = e[2] / 255, r = Math.min(n, o, a),
                        s = Math.max(n, o, a), l = s - r, d = (s + r) / 2;
                    if (0 == l) i = t = 0; else {
                        i = d < .5 ? l / (s + r) : l / (2 - s - r);
                        var u = ((s - n) / 6 + l / 2) / l, c = ((s - o) / 6 + l / 2) / l, h = ((s - a) / 6 + l / 2) / l;
                        n === s ? t = h - c : o === s ? t = 1 / 3 + u - h : a === s && (t = 2 / 3 + c - u), t < 0 && (t += 1), 1 < t && (t -= 1)
                    }
                    var f = [360 * t, i, d];
                    return null != e[3] && f.push(e[3]), f
                }
            }(e), null != t && (e[0] = function (e) {
                return (e = Math.round(e)) < 0 ? 0 : 360 < e ? 360 : e
            }(t)), null != i && (e[1] = Pt(i)), null != n && (e[2] = Pt(n)), Zt(Gt(e), "rgba")
        }

        function Jt(e, t) {
            if ((e = Kt(e)) && null != t) return e[3] = Et(t), Zt(e, "rgba")
        }

        function Zt(e, t) {
            if (e && e.length) {
                var i = e[0] + "," + e[1] + "," + e[2];
                return "rgba" !== t && "hsva" !== t && "hsla" !== t || (i += "," + e[3]), t + "(" + i + ")"
            }
        }

        var Qt = (Object.freeze || Object)({
            parse: Kt,
            lift: Wt,
            toHex: jt,
            fastLerp: Ht,
            fastMapToColor: zt,
            lerp: Xt,
            mapToColor: qt,
            modifyHSL: Yt,
            modifyAlpha: Jt,
            stringify: Zt
        }), $t = Array.prototype.slice;

        function ei(e, t) {
            return e[t]
        }

        function ti(e, t, i) {
            e[t] = i
        }

        function ii(e, t, i) {
            return (t - e) * i + e
        }

        function ni(e, t, i) {
            return .5 < i ? t : e
        }

        function oi(e, t, i, n, o) {
            var a = e.length;
            if (1 === o) for (var r = 0; r < a; r++) n[r] = ii(e[r], t[r], i); else {
                var s = a && e[0].length;
                for (r = 0; r < a; r++) for (var l = 0; l < s; l++) n[r][l] = ii(e[r][l], t[r][l], i)
            }
        }

        function ai(e, t, i) {
            var n = e.length, o = t.length;
            if (n !== o) if (o < n) e.length = o; else for (var a = n; a < o; a++) e.push(1 === i ? t[a] : $t.call(t[a]));
            var r = e[0] && e[0].length;
            for (a = 0; a < e.length; a++) if (1 === i) isNaN(e[a]) && (e[a] = t[a]); else for (var s = 0; s < r; s++) isNaN(e[a][s]) && (e[a][s] = t[a][s])
        }

        function ri(e, t, i) {
            if (e === t) return !0;
            var n = e.length;
            if (n !== t.length) return !1;
            if (1 === i) {
                for (var o = 0; o < n; o++) if (e[o] !== t[o]) return !1
            } else {
                var a = e[0].length;
                for (o = 0; o < n; o++) for (var r = 0; r < a; r++) if (e[o][r] !== t[o][r]) return !1
            }
            return !0
        }

        function si(e, t, i, n, o, a, r, s, l) {
            var d = e.length;
            if (1 === l) for (var u = 0; u < d; u++) s[u] = li(e[u], t[u], i[u], n[u], o, a, r); else {
                var c = e[0].length;
                for (u = 0; u < d; u++) for (var h = 0; h < c; h++) s[u][h] = li(e[u][h], t[u][h], i[u][h], n[u][h], o, a, r)
            }
        }

        function li(e, t, i, n, o, a, r) {
            var s = .5 * (i - e), l = .5 * (n - t);
            return (2 * (t - i) + s + l) * r + (-3 * (t - i) - 2 * s - l) * a + s * o + t
        }

        function di(e) {
            if (_(e)) {
                var t = e.length;
                if (_(e[0])) {
                    for (var i = [], n = 0; n < t; n++) i.push($t.call(e[n]));
                    return i
                }
                return $t.call(e)
            }
            return e
        }

        function ui(e) {
            return e[0] = Math.floor(e[0]), e[1] = Math.floor(e[1]), e[2] = Math.floor(e[2]), "rgba(" + e.join(",") + ")"
        }

        function ci(e, t, i, n, o, a) {
            var r = e._getter, s = e._setter, l = "spline" === t, d = n.length;
            if (d) {
                var u, c = _(n[0].value), h = !1, f = !1, p = c ? function (e) {
                    var t = e[e.length - 1].value;
                    return _(t && t[0]) ? 2 : 1
                }(n) : 0;
                n.sort(function (e, t) {
                    return e.time - t.time
                }), u = n[d - 1].time;
                for (var g = [], m = [], v = n[0].value, y = !0, T = 0; T < d; T++) {
                    g.push(n[T].time / u);
                    var w = n[T].value;
                    if (c && ri(w, v, p) || !c && w === v || (y = !1), "string" == typeof (v = w)) {
                        var k = Kt(w);
                        k ? (w = k, h = !0) : f = !0
                    }
                    m.push(w)
                }
                if (a || !y) {
                    var C = m[d - 1];
                    for (T = 0; T < d - 1; T++) c ? ai(m[T], C, p) : !isNaN(m[T]) || isNaN(C) || f || h || (m[T] = C);
                    c && ai(r(e._target, o), C, p);
                    var b, I, S, D, A, N = 0, x = 0;
                    if (h) var E = [0, 0, 0, 0];
                    var O = new bt({
                        target: e._target,
                        life: u,
                        loop: e._loop,
                        delay: e._delay,
                        onframe: function (e, t) {
                            var i;
                            if (t < 0) i = 0; else if (t < x) {
                                for (i = Math.min(N + 1, d - 1); 0 <= i && !(g[i] <= t); i--) ;
                                i = Math.min(i, d - 2)
                            } else {
                                for (i = N; i < d && !(g[i] > t); i++) ;
                                i = Math.min(i - 1, d - 2)
                            }
                            x = t;
                            var n = g[(N = i) + 1] - g[i];
                            if (0 != n) if (b = (t - g[i]) / n, l) if (S = m[i], I = m[0 === i ? i : i - 1], D = m[d - 2 < i ? d - 1 : i + 1], A = m[d - 3 < i ? d - 1 : i + 2], c) si(I, S, D, A, b, b * b, b * b * b, r(e, o), p); else {
                                if (h) a = si(I, S, D, A, b, b * b, b * b * b, E, 1), a = ui(E); else {
                                    if (f) return ni(S, D, b);
                                    a = li(I, S, D, A, b, b * b, b * b * b)
                                }
                                s(e, o, a)
                            } else if (c) oi(m[i], m[i + 1], b, r(e, o), p); else {
                                var a;
                                if (h) oi(m[i], m[i + 1], b, E, 1), a = ui(E); else {
                                    if (f) return ni(m[i], m[i + 1], b);
                                    a = ii(m[i], m[i + 1], b)
                                }
                                s(e, o, a)
                            }
                        },
                        ondestroy: i
                    });
                    return t && "spline" !== t && (O.easing = t), O
                }
            }
        }

        function hi(e, t, i, n) {
            this._tracks = {}, this._target = e, this._loop = t || !1, this._getter = i || ei, this._setter = n || ti, this._clipCount = 0, this._delay = 0, this._doneList = [], this._onframeList = [], this._clipList = []
        }

        hi.prototype = {
            when: function (e, t) {
                var i = this._tracks;
                for (var n in t) if (t.hasOwnProperty(n)) {
                    if (!i[n]) {
                        i[n] = [];
                        var o = this._getter(this._target, n);
                        if (null == o) continue;
                        0 !== e && i[n].push({time: 0, value: di(o)})
                    }
                    i[n].push({time: e, value: t[n]})
                }
                return this
            }, during: function (e) {
                return this._onframeList.push(e), this
            }, pause: function () {
                for (var e = 0; e < this._clipList.length; e++) this._clipList[e].pause();
                this._paused = !0
            }, resume: function () {
                for (var e = 0; e < this._clipList.length; e++) this._clipList[e].resume();
                this._paused = !1
            }, isPaused: function () {
                return !!this._paused
            }, _doneCallback: function () {
                this._tracks = {}, this._clipList.length = 0;
                for (var e = this._doneList, t = e.length, i = 0; i < t; i++) e[i].call(this)
            }, start: function (e, t) {
                function i() {
                    --a || o._doneCallback()
                }

                var n, o = this, a = 0;
                for (var r in this._tracks) if (this._tracks.hasOwnProperty(r)) {
                    var s = ci(this, e, i, this._tracks[r], r, t);
                    s && (this._clipList.push(s), a++, this.animation && this.animation.addClip(s), n = s)
                }
                if (n) {
                    var l = n.onframe;
                    n.onframe = function (e, t) {
                        l(e, t);
                        for (var i = 0; i < o._onframeList.length; i++) o._onframeList[i](e, t)
                    }
                }
                return a || this._doneCallback(), this
            }, stop: function (e) {
                for (var t = this._clipList, i = this.animation, n = 0; n < t.length; n++) {
                    var o = t[n];
                    e && o.onframe(this._target, 1), i && i.removeClip(o)
                }
                t.length = 0
            }, delay: function (e) {
                return this._delay = e, this
            }, done: function (e) {
                return e && this._doneList.push(e), this
            }, getClips: function () {
                return this._clipList
            }
        };
        var fi = 1;
        "undefined" != typeof window && (fi = Math.max(window.devicePixelRatio || 1, 1));
        var pi = fi;

        function gi() {
            this.animators = []
        }

        var mi = function () {
        };

        function vi(e, t, i, n, o, a, r, s) {
            L(n) ? (a = o, o = n, n = 0) : F(o) ? (a = o, o = "linear", n = 0) : F(n) ? (a = n, n = 0) : i = F(i) ? (a = i, 500) : i || 500, e.stopAnimation(), function e(t, i, n, o, a, r, s) {
                var l = {}, d = 0;
                for (var u in o) o.hasOwnProperty(u) && (null != n[u] ? R(o[u]) && !_(o[u]) ? e(t, i ? i + "." + u : u, n[u], o[u], a, r, s) : (s ? (l[u] = n[u], yi(t, i, u, o[u])) : l[u] = o[u], d++) : null == o[u] || s || yi(t, i, u, o[u]));
                0 < d && t.animate(i, !1).when(null == a ? 500 : a, l).delay(r || 0)
            }(e, "", e, t, i, n, s);
            var l = e.animators.slice(), d = l.length;

            function u() {
                --d || a && a()
            }

            d || a && a();
            for (var c = 0; c < l.length; c++) l[c].done(u).start(o, r)
        }

        function yi(e, t, i, n) {
            if (t) {
                var o = {};
                o[t] = {}, o[t][i] = n, e.attr(o)
            } else e.attr(i, n)
        }

        gi.prototype = {
            constructor: gi, animate: function (e, t) {
                var i, n = !1, o = this, a = this.__zr;
                if (e) {
                    var r = e.split("."), s = o;
                    n = "shape" === r[0];
                    for (var l = 0, d = r.length; l < d; l++) s = s && s[r[l]];
                    s && (i = s)
                } else i = o;
                if (i) {
                    var u = o.animators, c = new hi(i, t);
                    return c.during(function (e) {
                        o.dirty(n)
                    }).done(function () {
                        u.splice(b(u, c), 1)
                    }), u.push(c), a && a.animation.addAnimator(c), c
                }
                mi('Property "' + e + '" is not existed in element ' + o.id)
            }, stopAnimation: function (e) {
                for (var t = this.animators, i = t.length, n = 0; n < i; n++) t[n].stop(e);
                return t.length = 0, this
            }, animateTo: function (e, t, i, n, o, a) {
                vi(this, e, t, i, n, o, a)
            }, animateFrom: function (e, t, i, n, o, a) {
                vi(this, e, t, i, n, o, a, !0)
            }
        };
        var Ti = function (e) {
            vt.call(this, e), Ne.call(this, e), gi.call(this, e), this.id = e.id || n()
        };
        Ti.prototype = {
            type: "element", name: "", __zr: null, ignore: !1, clipPath: null, isGroup: !1, drift: function (e, t) {
                switch (this.draggable) {
                    case"horizontal":
                        t = 0;
                        break;
                    case"vertical":
                        e = 0
                }
                var i = this.transform;
                (i = i || (this.transform = [1, 0, 0, 1, 0, 0]))[4] += e, i[5] += t, this.decomposeTransform(), this.dirty(!1)
            }, beforeUpdate: function () {
            }, afterUpdate: function () {
            }, update: function () {
                this.updateTransform()
            }, traverse: function (e, t) {
            }, attrKV: function (e, t) {
                if ("position" === e || "scale" === e || "origin" === e) {
                    if (t) {
                        var i = this[e];
                        (i = i || (this[e] = []))[0] = t[0], i[1] = t[1]
                    }
                } else this[e] = t
            }, hide: function () {
                this.ignore = !0, this.__zr && this.__zr.refresh()
            }, show: function () {
                this.ignore = !1, this.__zr && this.__zr.refresh()
            }, attr: function (e, t) {
                if ("string" == typeof e) this.attrKV(e, t); else if (R(e)) for (var i in e) e.hasOwnProperty(i) && this.attrKV(i, e[i]);
                return this.dirty(!1), this
            }, setClipPath: function (e) {
                var t = this.__zr;
                t && e.addSelfToZr(t), this.clipPath && this.clipPath !== e && this.removeClipPath(), (this.clipPath = e).__zr = t, (e.__clipTarget = this).dirty(!1)
            }, removeClipPath: function () {
                var e = this.clipPath;
                e && (e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__clipTarget = null, this.clipPath = null, this.dirty(!1))
            }, addSelfToZr: function (e) {
                this.__zr = e;
                var t = this.animators;
                if (t) for (var i = 0; i < t.length; i++) e.animation.addAnimator(t[i]);
                this.clipPath && this.clipPath.addSelfToZr(e)
            }, removeSelfFromZr: function (e) {
                this.__zr = null;
                var t = this.animators;
                if (t) for (var i = 0; i < t.length; i++) e.animation.removeAnimator(t[i]);
                this.clipPath && this.clipPath.removeSelfFromZr(e)
            }
        }, S(Ti, gi), S(Ti, vt), S(Ti, Ne);
        var wi, ki, Ci, bi, Ii = Ce, Si = Math.min, _i = Math.max;

        function Di(e, t, i, n) {
            i < 0 && (e += i, i = -i), n < 0 && (t += n, n = -n), this.x = e, this.y = t, this.width = i, this.height = n
        }

        Di.prototype = {
            constructor: Di, union: function (e) {
                var t = Si(e.x, this.x), i = Si(e.y, this.y);
                this.width = _i(e.x + e.width, this.x + this.width) - t, this.height = _i(e.y + e.height, this.y + this.height) - i, this.x = t, this.y = i
            }, applyTransform: (wi = [], ki = [], Ci = [], bi = [], function (e) {
                if (e) {
                    wi[0] = Ci[0] = this.x, wi[1] = bi[1] = this.y, ki[0] = bi[0] = this.x + this.width, ki[1] = Ci[1] = this.y + this.height, Ii(wi, wi, e), Ii(ki, ki, e), Ii(Ci, Ci, e), Ii(bi, bi, e), this.x = Si(wi[0], ki[0], Ci[0], bi[0]), this.y = Si(wi[1], ki[1], Ci[1], bi[1]);
                    var t = _i(wi[0], ki[0], Ci[0], bi[0]), i = _i(wi[1], ki[1], Ci[1], bi[1]);
                    this.width = t - this.x, this.height = i - this.y
                }
            }), calculateTransform: function (e) {
                var t = e.width / this.width, i = e.height / this.height, n = at();
                return dt(n, n, [-this.x, -this.y]), ct(n, n, [t, i]), dt(n, n, [e.x, e.y]), n
            }, intersect: function (e) {
                if (!e) return !1;
                e instanceof Di || (e = Di.create(e));
                var t = this, i = t.x, n = t.x + t.width, o = t.y, a = t.y + t.height, r = e.x, s = e.x + e.width,
                    l = e.y, d = e.y + e.height;
                return !(n < r || s < i || a < l || d < o)
            }, contain: function (e, t) {
                var i = this;
                return e >= i.x && e <= i.x + i.width && t >= i.y && t <= i.y + i.height
            }, clone: function () {
                return new Di(this.x, this.y, this.width, this.height)
            }, copy: function (e) {
                this.x = e.x, this.y = e.y, this.width = e.width, this.height = e.height
            }, plain: function () {
                return {x: this.x, y: this.y, width: this.width, height: this.height}
            }
        }, Di.create = function (e) {
            return new Di(e.x, e.y, e.width, e.height)
        };
        var Ai = function (e) {
            for (var t in e = e || {}, Ti.call(this, e), e) e.hasOwnProperty(t) && (this[t] = e[t]);
            this._children = [], this.__storage = null, this.__dirty = !0
        };
        Ai.prototype = {
            constructor: Ai, isGroup: !0, type: "group", silent: !1, children: function () {
                return this._children.slice()
            }, childAt: function (e) {
                return this._children[e]
            }, childOfName: function (e) {
                for (var t = this._children, i = 0; i < t.length; i++) if (t[i].name === e) return t[i]
            }, childCount: function () {
                return this._children.length
            }, add: function (e) {
                return e && e !== this && e.parent !== this && (this._children.push(e), this._doAdd(e)), this
            }, addBefore: function (e, t) {
                if (e && e !== this && e.parent !== this && t && t.parent === this) {
                    var i = this._children, n = i.indexOf(t);
                    0 <= n && (i.splice(n, 0, e), this._doAdd(e))
                }
                return this
            }, _doAdd: function (e) {
                e.parent && e.parent.remove(e);
                var t = (e.parent = this).__storage, i = this.__zr;
                t && t !== e.__storage && (t.addToStorage(e), e instanceof Ai && e.addChildrenToStorage(t)), i && i.refresh()
            }, remove: function (e) {
                var t = this.__zr, i = this.__storage, n = this._children, o = b(n, e);
                return o < 0 || (n.splice(o, 1), e.parent = null, i && (i.delFromStorage(e), e instanceof Ai && e.delChildrenFromStorage(i)), t && t.refresh()), this
            }, removeAll: function () {
                var e, t, i = this._children, n = this.__storage;
                for (t = 0; t < i.length; t++) e = i[t], n && (n.delFromStorage(e), e instanceof Ai && e.delChildrenFromStorage(n)), e.parent = null;
                return i.length = 0, this
            }, eachChild: function (e, t) {
                for (var i = this._children, n = 0; n < i.length; n++) {
                    var o = i[n];
                    e.call(t, o, n)
                }
                return this
            }, traverse: function (e, t) {
                for (var i = 0; i < this._children.length; i++) {
                    var n = this._children[i];
                    e.call(t, n), "group" === n.type && n.traverse(e, t)
                }
                return this
            }, addChildrenToStorage: function (e) {
                for (var t = 0; t < this._children.length; t++) {
                    var i = this._children[t];
                    e.addToStorage(i), i instanceof Ai && i.addChildrenToStorage(e)
                }
            }, delChildrenFromStorage: function (e) {
                for (var t = 0; t < this._children.length; t++) {
                    var i = this._children[t];
                    e.delFromStorage(i), i instanceof Ai && i.delChildrenFromStorage(e)
                }
            }, dirty: function () {
                return this.__dirty = !0, this.__zr && this.__zr.refresh(), this
            }, getBoundingRect: function (e) {
                for (var t = null, i = new Di(0, 0, 0, 0), n = e || this._children, o = [], a = 0; a < n.length; a++) {
                    var r = n[a];
                    if (!r.ignore && !r.invisible) {
                        var s = r.getBoundingRect(), l = r.getLocalTransform(o);
                        l ? (i.copy(s), i.applyTransform(l), (t = t || i.clone()).union(i)) : (t = t || s.clone()).union(s)
                    }
                }
                return t || i
            }
        }, I(Ai, Ti);
        var Ni = 32, xi = 7;

        function Ei(e, t, i, n) {
            var o = t + 1;
            if (o === i) return 1;
            if (n(e[o++], e[t]) < 0) {
                for (; o < i && n(e[o], e[o - 1]) < 0;) o++;
                !function (e, t, i) {
                    for (i--; t < i;) {
                        var n = e[t];
                        e[t++] = e[i], e[i--] = n
                    }
                }(e, t, o)
            } else for (; o < i && 0 <= n(e[o], e[o - 1]);) o++;
            return o - t
        }

        function Oi(e, t, i, n, o) {
            for (n === t && n++; n < i; n++) {
                for (var a, r = e[n], s = t, l = n; s < l;) o(r, e[a = s + l >>> 1]) < 0 ? l = a : s = 1 + a;
                var d = n - s;
                switch (d) {
                    case 3:
                        e[s + 3] = e[s + 2];
                    case 2:
                        e[s + 2] = e[s + 1];
                    case 1:
                        e[s + 1] = e[s];
                        break;
                    default:
                        for (; 0 < d;) e[s + d] = e[s + d - 1], d--
                }
                e[s] = r
            }
        }

        function Pi(e, t, i, n, o, a) {
            var r = 0, s = 0, l = 1;
            if (0 < a(e, t[i + o])) {
                for (s = n - o; l < s && 0 < a(e, t[i + o + l]);) (l = 1 + ((r = l) << 1)) <= 0 && (l = s);
                s < l && (l = s), r += o, l += o
            } else {
                for (s = o + 1; l < s && a(e, t[i + o - l]) <= 0;) (l = 1 + ((r = l) << 1)) <= 0 && (l = s);
                s < l && (l = s);
                var d = r;
                r = o - l, l = o - d
            }
            for (r++; r < l;) {
                var u = r + (l - r >>> 1);
                0 < a(e, t[i + u]) ? r = u + 1 : l = u
            }
            return l
        }

        function Mi(e, t, i, n, o, a) {
            var r = 0, s = 0, l = 1;
            if (a(e, t[i + o]) < 0) {
                for (s = o + 1; l < s && a(e, t[i + o - l]) < 0;) (l = 1 + ((r = l) << 1)) <= 0 && (l = s);
                s < l && (l = s);
                var d = r;
                r = o - l, l = o - d
            } else {
                for (s = n - o; l < s && 0 <= a(e, t[i + o + l]);) (l = 1 + ((r = l) << 1)) <= 0 && (l = s);
                s < l && (l = s), r += o, l += o
            }
            for (r++; r < l;) {
                var u = r + (l - r >>> 1);
                a(e, t[i + u]) < 0 ? l = u : r = u + 1
            }
            return l
        }

        function Fi(e, t, i, n) {
            i = i || 0;
            var o = (n = n || e.length) - i;
            if (!(o < 2)) {
                var a = 0;
                if (o < Ni) Oi(e, i, n, i + (a = Ei(e, i, n, t)), t); else {
                    var r = new function (e, t) {
                        var i, n, o = xi, a = 0, r = [];

                        function s(s) {
                            var l = i[s], d = n[s], u = i[s + 1], c = n[s + 1];
                            n[s] = d + c, s === a - 3 && (i[s + 1] = i[s + 2], n[s + 1] = n[s + 2]), a--;
                            var h = Mi(e[u], e, l, d, 0, t);
                            l += h, 0 != (d -= h) && 0 !== (c = Pi(e[l + d - 1], e, u, c, c - 1, t)) && (d <= c ? function (i, n, a, s) {
                                var l = 0;
                                for (l = 0; l < n; l++) r[l] = e[i + l];
                                var d = 0, u = a, c = i;
                                if (e[c++] = e[u++], 0 != --s) {
                                    if (1 === n) {
                                        for (l = 0; l < s; l++) e[c + l] = e[u + l];
                                        return e[c + s] = r[d]
                                    }
                                    for (var h, f, p, g = o; ;) {
                                        f = h = 0, p = !1;
                                        do {
                                            if (t(e[u], r[d]) < 0) {
                                                if (e[c++] = e[u++], f++, (h = 0) == --s) {
                                                    p = !0;
                                                    break
                                                }
                                            } else if (e[c++] = r[d++], h++, f = 0, 1 == --n) {
                                                p = !0;
                                                break
                                            }
                                        } while ((h | f) < g);
                                        if (p) break;
                                        do {
                                            if (0 !== (h = Mi(e[u], r, d, n, 0, t))) {
                                                for (l = 0; l < h; l++) e[c + l] = r[d + l];
                                                if (c += h, d += h, (n -= h) <= 1) {
                                                    p = !0;
                                                    break
                                                }
                                            }
                                            if (e[c++] = e[u++], 0 == --s) {
                                                p = !0;
                                                break
                                            }
                                            if (0 !== (f = Pi(r[d], e, u, s, 0, t))) {
                                                for (l = 0; l < f; l++) e[c + l] = e[u + l];
                                                if (c += f, u += f, 0 == (s -= f)) {
                                                    p = !0;
                                                    break
                                                }
                                            }
                                            if (e[c++] = r[d++], 1 == --n) {
                                                p = !0;
                                                break
                                            }
                                            g--
                                        } while (xi <= h || xi <= f);
                                        if (p) break;
                                        g < 0 && (g = 0), g += 2
                                    }
                                    if ((o = g) < 1 && (o = 1), 1 === n) {
                                        for (l = 0; l < s; l++) e[c + l] = e[u + l];
                                        e[c + s] = r[d]
                                    } else {
                                        if (0 === n) throw new Error;
                                        for (l = 0; l < n; l++) e[c + l] = r[d + l]
                                    }
                                } else for (l = 0; l < n; l++) e[c + l] = r[d + l]
                            }(l, d, u, c) : function (i, n, a, s) {
                                var l = 0;
                                for (l = 0; l < s; l++) r[l] = e[a + l];
                                var d = i + n - 1, u = s - 1, c = a + s - 1, h = 0, f = 0;
                                if (e[c--] = e[d--], 0 != --n) {
                                    if (1 === s) {
                                        for (f = 1 + (c -= n), h = 1 + (d -= n), l = n - 1; 0 <= l; l--) e[f + l] = e[h + l];
                                        return e[c] = r[u]
                                    }
                                    for (var p = o; ;) {
                                        var g = 0, m = 0, v = !1;
                                        do {
                                            if (t(r[u], e[d]) < 0) {
                                                if (e[c--] = e[d--], g++, (m = 0) == --n) {
                                                    v = !0;
                                                    break
                                                }
                                            } else if (e[c--] = r[u--], m++, g = 0, 1 == --s) {
                                                v = !0;
                                                break
                                            }
                                        } while ((g | m) < p);
                                        if (v) break;
                                        do {
                                            if (0 != (g = n - Mi(r[u], e, i, n, n - 1, t))) {
                                                for (n -= g, f = 1 + (c -= g), h = 1 + (d -= g), l = g - 1; 0 <= l; l--) e[f + l] = e[h + l];
                                                if (0 === n) {
                                                    v = !0;
                                                    break
                                                }
                                            }
                                            if (e[c--] = r[u--], 1 == --s) {
                                                v = !0;
                                                break
                                            }
                                            if (0 != (m = s - Pi(e[d], r, 0, s, s - 1, t))) {
                                                for (s -= m, f = 1 + (c -= m), h = 1 + (u -= m), l = 0; l < m; l++) e[f + l] = r[h + l];
                                                if (s <= 1) {
                                                    v = !0;
                                                    break
                                                }
                                            }
                                            if (e[c--] = e[d--], 0 == --n) {
                                                v = !0;
                                                break
                                            }
                                            p--
                                        } while (xi <= g || xi <= m);
                                        if (v) break;
                                        p < 0 && (p = 0), p += 2
                                    }
                                    if ((o = p) < 1 && (o = 1), 1 === s) {
                                        for (f = 1 + (c -= n), h = 1 + (d -= n), l = n - 1; 0 <= l; l--) e[f + l] = e[h + l];
                                        e[c] = r[u]
                                    } else {
                                        if (0 === s) throw new Error;
                                        for (h = c - (s - 1), l = 0; l < s; l++) e[h + l] = r[l]
                                    }
                                } else for (h = c - (s - 1), l = 0; l < s; l++) e[h + l] = r[l]
                            }(l, d, u, c))
                        }

                        i = [], n = [], this.mergeRuns = function () {
                            for (; 1 < a;) {
                                var e = a - 2;
                                if (1 <= e && n[e - 1] <= n[e] + n[e + 1] || 2 <= e && n[e - 2] <= n[e] + n[e - 1]) n[e - 1] < n[e + 1] && e--; else if (n[e] > n[e + 1]) break;
                                s(e)
                            }
                        }, this.forceMergeRuns = function () {
                            for (; 1 < a;) {
                                var e = a - 2;
                                0 < e && n[e - 1] < n[e + 1] && e--, s(e)
                            }
                        }, this.pushRun = function (e, t) {
                            i[a] = e, n[a] = t, a += 1
                        }
                    }(e, t), s = function (e) {
                        for (var t = 0; Ni <= e;) t |= 1 & e, e >>= 1;
                        return e + t
                    }(o);
                    do {
                        if ((a = Ei(e, i, n, t)) < s) {
                            var l = o;
                            s < l && (l = s), Oi(e, i, i + l, i + a, t), a = l
                        }
                        r.pushRun(i, a), r.mergeRuns(), o -= a, i += a
                    } while (0 !== o);
                    r.forceMergeRuns()
                }
            }
        }

        function Li(e, t) {
            return e.zlevel === t.zlevel ? e.z === t.z ? e.z2 - t.z2 : e.z - t.z : e.zlevel - t.zlevel
        }

        function Ri() {
            this._roots = [], this._displayList = [], this._displayListLen = 0
        }

        Ri.prototype = {
            constructor: Ri, traverse: function (e, t) {
                for (var i = 0; i < this._roots.length; i++) this._roots[i].traverse(e, t)
            }, getDisplayList: function (e, t) {
                return t = t || !1, e && this.updateDisplayList(t), this._displayList
            }, updateDisplayList: function (e) {
                this._displayListLen = 0;
                for (var t = this._roots, i = this._displayList, n = 0, a = t.length; n < a; n++) this._updateAndAddDisplayable(t[n], null, e);
                i.length = this._displayListLen, o.canvasSupported && Fi(i, Li)
            }, _updateAndAddDisplayable: function (e, t, i) {
                if (!e.ignore || i) {
                    e.beforeUpdate(), e.__dirty && e.update(), e.afterUpdate();
                    var n = e.clipPath;
                    if (n) {
                        t = t ? t.slice() : [];
                        for (var o = n, a = e; o;) o.parent = a, o.updateTransform(), t.push(o), o = (a = o).clipPath
                    }
                    if (e.isGroup) {
                        for (var r = e._children, s = 0; s < r.length; s++) {
                            var l = r[s];
                            e.__dirty && (l.__dirty = !0), this._updateAndAddDisplayable(l, t, i)
                        }
                        e.__dirty = !1
                    } else e.__clipPaths = t, this._displayList[this._displayListLen++] = e
                }
            }, addRoot: function (e) {
                e.__storage !== this && (e instanceof Ai && e.addChildrenToStorage(this), this.addToStorage(e), this._roots.push(e))
            }, delRoot: function (e) {
                if (null == e) {
                    for (var t = 0; t < this._roots.length; t++) {
                        var i = this._roots[t];
                        i instanceof Ai && i.delChildrenFromStorage(this)
                    }
                    return this._roots = [], this._displayList = [], void (this._displayListLen = 0)
                }
                if (e instanceof Array) {
                    t = 0;
                    for (var n = e.length; t < n; t++) this.delRoot(e[t])
                } else {
                    var o = b(this._roots, e);
                    0 <= o && (this.delFromStorage(e), this._roots.splice(o, 1), e instanceof Ai && e.delChildrenFromStorage(this))
                }
            }, addToStorage: function (e) {
                return e && (e.__storage = this, e.dirty(!1)), this
            }, delFromStorage: function (e) {
                return e && (e.__storage = null), this
            }, dispose: function () {
                this._renderList = this._roots = null
            }, displayableSortFunc: Li
        };
        var Bi = {
                shadowBlur: 1,
                shadowOffsetX: 1,
                shadowOffsetY: 1,
                textShadowBlur: 1,
                textShadowOffsetX: 1,
                textShadowOffsetY: 1,
                textBoxShadowBlur: 1,
                textBoxShadowOffsetX: 1,
                textBoxShadowOffsetY: 1
            }, Ui = function (e, t, i) {
                return Bi.hasOwnProperty(t) ? i * e.dpr : i
            }, Vi = {NONE: 0, STYLE_BIND: 1, PLAIN_TEXT: 2}, Ki = 9,
            Gi = [["shadowBlur", 0], ["shadowOffsetX", 0], ["shadowOffsetY", 0], ["shadowColor", "#000"], ["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10]],
            Wi = function (e) {
                this.extendFrom(e, !1)
            };
        Wi.prototype = {
            constructor: Wi,
            fill: "#000",
            stroke: null,
            opacity: 1,
            fillOpacity: null,
            strokeOpacity: null,
            lineDash: null,
            lineDashOffset: 0,
            shadowBlur: 0,
            shadowOffsetX: 0,
            shadowOffsetY: 0,
            lineWidth: 1,
            strokeNoScale: !1,
            text: null,
            font: null,
            textFont: null,
            fontStyle: null,
            fontWeight: null,
            fontSize: null,
            fontFamily: null,
            textTag: null,
            textFill: "#000",
            textStroke: null,
            textWidth: null,
            textHeight: null,
            textStrokeWidth: 0,
            textLineHeight: null,
            textPosition: "inside",
            textRect: null,
            textOffset: null,
            textAlign: null,
            textVerticalAlign: null,
            textDistance: 5,
            textShadowColor: "transparent",
            textShadowBlur: 0,
            textShadowOffsetX: 0,
            textShadowOffsetY: 0,
            textBoxShadowColor: "transparent",
            textBoxShadowBlur: 0,
            textBoxShadowOffsetX: 0,
            textBoxShadowOffsetY: 0,
            transformText: !1,
            textRotation: 0,
            textOrigin: null,
            textBackgroundColor: null,
            textBorderColor: null,
            textBorderWidth: 0,
            textBorderRadius: 0,
            textPadding: null,
            rich: null,
            truncate: null,
            blend: null,
            bind: function (e, t, i) {
                var n = this, o = i && i.style, a = !o || e.__attrCachedBy !== Vi.STYLE_BIND;
                e.__attrCachedBy = Vi.STYLE_BIND;
                for (var r = 0; r < Gi.length; r++) {
                    var s = Gi[r], l = s[0];
                    !a && n[l] === o[l] || (e[l] = Ui(e, l, n[l] || s[1]))
                }
                if (!a && n.fill === o.fill || (e.fillStyle = n.fill), !a && n.stroke === o.stroke || (e.strokeStyle = n.stroke), !a && n.opacity === o.opacity || (e.globalAlpha = null == n.opacity ? 1 : n.opacity), !a && n.blend === o.blend || (e.globalCompositeOperation = n.blend || "source-over"), this.hasStroke()) {
                    var d = n.lineWidth;
                    e.lineWidth = d / (this.strokeNoScale && t && t.getLineScale ? t.getLineScale() : 1)
                }
            },
            hasFill: function () {
                var e = this.fill;
                return null != e && "none" !== e
            },
            hasStroke: function () {
                var e = this.stroke;
                return null != e && "none" !== e && 0 < this.lineWidth
            },
            extendFrom: function (e, t) {
                if (e) for (var i in e) !e.hasOwnProperty(i) || !0 !== t && (!1 === t ? this.hasOwnProperty(i) : null == e[i]) || (this[i] = e[i])
            },
            set: function (e, t) {
                "string" == typeof e ? this[e] = t : this.extendFrom(e, !0)
            },
            clone: function () {
                var e = new this.constructor;
                return e.extendFrom(this, !0), e
            },
            getGradient: function (e, t, i) {
                for (var n = ("radial" === t.type ? function (e, t, i) {
                    var n = i.width, o = i.height, a = Math.min(n, o), r = null == t.x ? .5 : t.x,
                        s = null == t.y ? .5 : t.y, l = null == t.r ? .5 : t.r;
                    return t.global || (r = r * n + i.x, s = s * o + i.y, l *= a), e.createRadialGradient(r, s, 0, r, s, l)
                } : function (e, t, i) {
                    var n = null == t.x ? 0 : t.x, o = null == t.x2 ? 1 : t.x2, a = null == t.y ? 0 : t.y,
                        r = null == t.y2 ? 0 : t.y2;
                    return t.global || (n = n * i.width + i.x, o = o * i.width + i.x, a = a * i.height + i.y, r = r * i.height + i.y), n = isNaN(n) ? 0 : n, o = isNaN(o) ? 1 : o, a = isNaN(a) ? 0 : a, r = isNaN(r) ? 0 : r, e.createLinearGradient(n, a, o, r)
                })(e, t, i), o = t.colorStops, a = 0; a < o.length; a++) n.addColorStop(o[a].offset, o[a].color);
                return n
            }
        };
        for (var ji = Wi.prototype, Hi = 0; Hi < Gi.length; Hi++) {
            var zi = Gi[Hi];
            zi[0] in ji || (ji[zi[0]] = zi[1])
        }

        function Xi(e, t) {
            this.image = e, this.repeat = t, this.type = "pattern"
        }

        function qi() {
            return !1
        }

        function Yi(e, t, i) {
            var n = k(), o = t.getWidth(), a = t.getHeight(), r = n.style;
            return r && (r.position = "absolute", r.left = 0, r.top = 0, r.width = o + "px", r.height = a + "px", n.setAttribute("data-zr-dom-id", e)), n.width = o * i, n.height = a * i, n
        }

        function Ji(e, t, i) {
            var n;
            i = i || pi, "string" == typeof e ? n = Yi(e, t, i) : R(e) && (e = (n = e).id), this.id = e;
            var o = (this.dom = n).style;
            o && (n.onselectstart = qi, o["-webkit-user-select"] = "none", o["user-select"] = "none", o["-webkit-touch-callout"] = "none", o["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)", o.padding = 0, o.margin = 0, o["border-width"] = 0), this.domBack = null, this.ctxBack = null, this.painter = t, this.config = null, this.clearColor = 0, this.motionBlur = !1, this.lastFrameAlpha = .7, this.dpr = i
        }

        Wi.getGradient = ji.getGradient, Ji.prototype = {
            constructor: Ji, __dirty: !0, __used: !(Xi.prototype.getCanvasPattern = function (e) {
                return e.createPattern(this.image, this.repeat || "repeat")
            }), __drawIndex: 0, __startIndex: 0, __endIndex: 0, incremental: !1, getElementCount: function () {
                return this.__endIndex - this.__startIndex
            }, initContext: function () {
                this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr
            }, createBackBuffer: function () {
                var e = this.dpr;
                this.domBack = Yi("back-" + this.id, this.painter, e), this.ctxBack = this.domBack.getContext("2d"), 1 !== e && this.ctxBack.scale(e, e)
            }, resize: function (e, t) {
                var i = this.dpr, n = this.dom, o = n.style, a = this.domBack;
                o && (o.width = e + "px", o.height = t + "px"), n.width = e * i, n.height = t * i, a && (a.width = e * i, a.height = t * i, 1 !== i && this.ctxBack.scale(i, i))
            }, clear: function (e, t) {
                var i, n = this.dom, o = this.ctx, a = n.width, r = n.height,
                    s = (t = t || this.clearColor, this.motionBlur && !e), l = this.lastFrameAlpha, d = this.dpr;
                if (s && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(n, 0, 0, a / d, r / d)), o.clearRect(0, 0, a, r), t && "transparent" !== t && (t.colorStops ? (i = t.__canvasGradient || Wi.getGradient(o, t, {
                    x: 0,
                    y: 0,
                    width: a,
                    height: r
                }), t.__canvasGradient = i) : t.image && (i = Xi.prototype.getCanvasPattern.call(t, o)), o.save(), o.fillStyle = i || t, o.fillRect(0, 0, a, r), o.restore()), s) {
                    var u = this.domBack;
                    o.save(), o.globalAlpha = l, o.drawImage(u, 0, 0, a, r), o.restore()
                }
            }
        };
        var Zi = "undefined" != typeof window && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function (e) {
            setTimeout(e, 16)
        }, Qi = new _t(50);

        function $i(e) {
            if ("string" != typeof e) return e;
            var t = Qi.get(e);
            return t && t.image
        }

        function en(e, t, i, n, o) {
            if (e) {
                if ("string" != typeof e) return e;
                if (t && t.__zrImageSrc === e || !i) return t;
                var a = Qi.get(e), r = {hostEl: i, cb: n, cbPayload: o};
                return a ? nn(t = a.image) || a.pending.push(r) : ((t = new Image).onload = t.onerror = tn, Qi.put(e, t.__cachedImgObj = {
                    image: t,
                    pending: [r]
                }), t.src = t.__zrImageSrc = e), t
            }
            return t
        }

        function tn() {
            var e = this.__cachedImgObj;
            this.onload = this.onerror = this.__cachedImgObj = null;
            for (var t = 0; t < e.pending.length; t++) {
                var i = e.pending[t], n = i.cb;
                n && n(this, i.cbPayload), i.hostEl.dirty()
            }
            e.pending.length = 0
        }

        function nn(e) {
            return e && e.width && e.height
        }

        var on = {}, an = 0, rn = 5e3, sn = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g, ln = "12px sans-serif", dn = {};

        function un(e, t) {
            var i = e + ":" + (t = t || ln);
            if (on[i]) return on[i];
            for (var n, o, a = (e + "").split("\n"), r = 0, s = 0, l = a.length; s < l; s++) r = Math.max((n = a[s], o = t, dn.measureText(n, o)).width, r);
            return rn < an && (an = 0, on = {}), an++, on[i] = r
        }

        function cn(e, t, i, n, o, a, r, s) {
            return r ? function (e, t, i, n, o, a, r, s) {
                var l = kn(e, {rich: r, truncate: s, font: t, textAlign: i, textPadding: o, textLineHeight: a}),
                    d = l.outerWidth, u = l.outerHeight, c = hn(0, d, i), h = fn(0, u, n);
                return new Di(c, h, d, u)
            }(e, t, i, n, o, a, r, s) : function (e, t, i, n, o, a, r) {
                var s = wn(e, t, o, a, r), l = un(e, t);
                o && (l += o[1] + o[3]);
                var d = s.outerHeight, u = hn(0, l, i), c = fn(0, d, n), h = new Di(u, c, l, d);
                return h.lineHeight = s.lineHeight, h
            }(e, t, i, n, o, a, s)
        }

        function hn(e, t, i) {
            return "right" === i ? e -= t : "center" === i && (e -= t / 2), e
        }

        function fn(e, t, i) {
            return "middle" === i ? e -= t / 2 : "bottom" === i && (e -= t), e
        }

        function pn(e, t, i) {
            var n = t.textPosition, o = t.textDistance, a = i.x, r = i.y;
            o = o || 0;
            var s = i.height, l = i.width, d = s / 2, u = "left", c = "top";
            switch (n) {
                case"left":
                    a -= o, r += d, u = "right", c = "middle";
                    break;
                case"right":
                    a += o + l, r += d, c = "middle";
                    break;
                case"top":
                    a += l / 2, r -= o, u = "center", c = "bottom";
                    break;
                case"bottom":
                    a += l / 2, r += s + o, u = "center";
                    break;
                case"inside":
                    a += l / 2, r += d, u = "center", c = "middle";
                    break;
                case"insideLeft":
                    a += o, r += d, c = "middle";
                    break;
                case"insideRight":
                    a += l - o, r += d, u = "right", c = "middle";
                    break;
                case"insideTop":
                    a += l / 2, r += o, u = "center";
                    break;
                case"insideBottom":
                    a += l / 2, r += s - o, u = "center", c = "bottom";
                    break;
                case"insideTopLeft":
                    a += o, r += o;
                    break;
                case"insideTopRight":
                    a += l - o, r += o, u = "right";
                    break;
                case"insideBottomLeft":
                    a += o, r += s - o, c = "bottom";
                    break;
                case"insideBottomRight":
                    a += l - o, r += s - o, u = "right", c = "bottom"
            }
            return (e = e || {}).x = a, e.y = r, e.textAlign = u, e.textVerticalAlign = c, e
        }

        function gn(e, t, i, n, o) {
            if (!t) return "";
            var a = (e + "").split("\n");
            o = mn(t, i, n, o);
            for (var r = 0, s = a.length; r < s; r++) a[r] = vn(a[r], o);
            return a.join("\n")
        }

        function mn(e, t, i, n) {
            (n = T({}, n)).font = t, i = W(i, "..."), n.maxIterations = W(n.maxIterations, 2);
            var o = n.minChar = W(n.minChar, 0);
            n.cnCharWidth = un("国", t);
            var a = n.ascCharWidth = un("a", t);
            n.placeholder = W(n.placeholder, "");
            for (var r = e = Math.max(0, e - 1), s = 0; s < o && a <= r; s++) r -= a;
            var l = un(i, t);
            return r < l && (i = "", l = 0), r = e - l, n.ellipsis = i, n.ellipsisWidth = l, n.contentWidth = r, n.containerWidth = e, n
        }

        function vn(e, t) {
            var i = t.containerWidth, n = t.font, o = t.contentWidth;
            if (!i) return "";
            var a = un(e, n);
            if (a <= i) return e;
            for (var r = 0; ; r++) {
                if (a <= o || r >= t.maxIterations) {
                    e += t.ellipsis;
                    break
                }
                var s = 0 === r ? yn(e, o, t.ascCharWidth, t.cnCharWidth) : 0 < a ? Math.floor(e.length * o / a) : 0;
                a = un(e = e.substr(0, s), n)
            }
            return "" === e && (e = t.placeholder), e
        }

        function yn(e, t, i, n) {
            for (var o = 0, a = 0, r = e.length; a < r && o < t; a++) {
                var s = e.charCodeAt(a);
                o += 0 <= s && s <= 127 ? i : n
            }
            return a
        }

        function Tn(e) {
            return un("国", e)
        }

        function wn(e, t, i, n, o) {
            null != e && (e += "");
            var a = W(n, Tn(t)), r = e ? e.split("\n") : [], s = r.length * a, l = s, d = !0;
            if (i && (l += i[0] + i[2]), e && o) {
                d = !1;
                var u = o.outerHeight, c = o.outerWidth;
                if (null != u && u < l) e = "", r = []; else if (null != c) for (var h = mn(c - (i ? i[1] + i[3] : 0), t, o.ellipsis, {
                    minChar: o.minChar,
                    placeholder: o.placeholder
                }), f = 0, p = r.length; f < p; f++) r[f] = vn(r[f], h)
            }
            return {lines: r, height: s, outerHeight: l, lineHeight: a, canCacheByTextString: d}
        }

        function kn(e, t) {
            var i = {lines: [], width: 0, height: 0};
            if (null != e && (e += ""), !e) return i;
            for (var n, o = sn.lastIndex = 0; null != (n = sn.exec(e));) {
                var a = n.index;
                o < a && Cn(i, e.substring(o, a)), Cn(i, n[2], n[1]), o = sn.lastIndex
            }
            o < e.length && Cn(i, e.substring(o, e.length));
            var r = i.lines, s = 0, l = 0, d = [], u = t.textPadding, c = t.truncate, h = c && c.outerWidth,
                f = c && c.outerHeight;
            u && (null != h && (h -= u[1] + u[3]), null != f && (f -= u[0] + u[2]));
            for (var p = 0; p < r.length; p++) {
                for (var g = r[p], m = 0, v = 0, y = 0; y < g.tokens.length; y++) {
                    var T = (N = g.tokens[y]).styleName && t.rich[N.styleName] || {}, w = N.textPadding = T.textPadding,
                        k = N.font = T.font || t.font, C = N.textHeight = W(T.textHeight, Tn(k));
                    if (w && (C += w[0] + w[2]), N.height = C, N.lineHeight = j(T.textLineHeight, t.textLineHeight, C), N.textAlign = T && T.textAlign || t.textAlign, N.textVerticalAlign = T && T.textVerticalAlign || "middle", null != f && s + N.lineHeight > f) return {
                        lines: [],
                        width: 0,
                        height: 0
                    };
                    N.textWidth = un(N.text, k);
                    var b = T.textWidth, I = null == b || "auto" === b;
                    if ("string" == typeof b && "%" === b.charAt(b.length - 1)) N.percentWidth = b, d.push(N), b = 0; else {
                        if (I) {
                            b = N.textWidth;
                            var S = T.textBackgroundColor, _ = S && S.image;
                            _ && nn(_ = $i(_)) && (b = Math.max(b, _.width * C / _.height))
                        }
                        var D = w ? w[1] + w[3] : 0;
                        b += D;
                        var A = null != h ? h - v : null;
                        null != A && A < b && (!I || A < D ? (N.text = "", N.textWidth = b = 0) : (N.text = gn(N.text, A - D, k, c.ellipsis, {minChar: c.minChar}), N.textWidth = un(N.text, k), b = N.textWidth + D))
                    }
                    v += N.width = b, T && (m = Math.max(m, N.lineHeight))
                }
                g.width = v, s += g.lineHeight = m, l = Math.max(l, v)
            }
            for (i.outerWidth = i.width = W(t.textWidth, l), i.outerHeight = i.height = W(t.textHeight, s), u && (i.outerWidth += u[1] + u[3], i.outerHeight += u[0] + u[2]), p = 0; p < d.length; p++) {
                var N, x = (N = d[p]).percentWidth;
                N.width = parseInt(x, 10) / 100 * l
            }
            return i
        }

        function Cn(e, t, i) {
            for (var n = "" === t, o = t.split("\n"), a = e.lines, r = 0; r < o.length; r++) {
                var s = o[r], l = {styleName: i, text: s, isLineHolder: !s && !n};
                if (r) a.push({tokens: [l]}); else {
                    var d = (a[a.length - 1] || (a[0] = {tokens: []})).tokens, u = d.length;
                    1 === u && d[0].isLineHolder ? d[0] = l : !s && u && !n || d.push(l)
                }
            }
        }

        function bn(e) {
            var t = (e.fontSize || e.fontFamily) && [e.fontStyle, e.fontWeight, (e.fontSize || 12) + "px", e.fontFamily || "sans-serif"].join(" ");
            return t && q(t) || e.textFont || e.font
        }

        function In(e, t) {
            var i, n, o, a, r, s = t.x, l = t.y, d = t.width, u = t.height, c = t.r;
            d < 0 && (s += d, d = -d), u < 0 && (l += u, u = -u), "number" == typeof c ? i = n = o = a = c : c instanceof Array ? 1 === c.length ? i = n = o = a = c[0] : 2 === c.length ? (i = o = c[0], n = a = c[1]) : 3 === c.length ? (i = c[0], n = a = c[1], o = c[2]) : (i = c[0], n = c[1], o = c[2], a = c[3]) : i = n = o = a = 0, d < i + n && (i *= d / (r = i + n), n *= d / r), d < o + a && (o *= d / (r = o + a), a *= d / r), u < n + o && (n *= u / (r = n + o), o *= u / r), u < i + a && (i *= u / (r = i + a), a *= u / r), e.moveTo(s + i, l), e.lineTo(s + d - n, l), 0 !== n && e.arc(s + d - n, l + n, n, -Math.PI / 2, 0), e.lineTo(s + d, l + u - o), 0 !== o && e.arc(s + d - o, l + u - o, o, 0, Math.PI / 2), e.lineTo(s + a, l + u), 0 !== a && e.arc(s + a, l + u - a, a, Math.PI / 2, Math.PI), e.lineTo(s, l + i), 0 !== i && e.arc(s + i, l + i, i, Math.PI, 1.5 * Math.PI)
        }

        dn.measureText = function (e, t) {
            var i = C();
            return i.font = t || ln, i.measureText(e)
        };
        var Sn = ln, _n = {left: 1, right: 1, center: 1}, Dn = {top: 1, bottom: 1, middle: 1},
            An = [["textShadowBlur", "shadowBlur", 0], ["textShadowOffsetX", "shadowOffsetX", 0], ["textShadowOffsetY", "shadowOffsetY", 0], ["textShadowColor", "shadowColor", "transparent"]],
            Nn = {}, xn = {};

        function En(e) {
            return On(e), D(e.rich, On), e
        }

        function On(e) {
            if (e) {
                e.font = bn(e);
                var t = e.textAlign;
                "middle" === t && (t = "center"), e.textAlign = null == t || _n[t] ? t : "left";
                var i = e.textVerticalAlign || e.textBaseline;
                "center" === i && (i = "middle"), e.textVerticalAlign = null == i || Dn[i] ? i : "top", e.textPadding && (e.textPadding = z(e.textPadding))
            }
        }

        function Pn(e, t, i, n, o, a) {
            n.rich ? function (e, t, i, n, o, a) {
                a !== Ki && (t.__attrCachedBy = Vi.NONE);
                var r = e.__textCotentBlock;
                r && !e.__dirtyText || (r = e.__textCotentBlock = kn(i, n)), function (e, t, i, n, o) {
                    var a = i.width, r = i.outerWidth, s = i.outerHeight, l = n.textPadding, d = Un(xn, e, n, o),
                        u = d.baseX, c = d.baseY, h = d.textAlign, f = d.textVerticalAlign;
                    Mn(t, n, o, u, c);
                    var p = hn(u, r, h), g = fn(c, s, f), m = p, v = g;
                    l && (m += l[3], v += l[0]);
                    var y = m + a;
                    Ln(n) && Rn(e, t, n, p, g, r, s);
                    for (var T = 0; T < i.lines.length; T++) {
                        for (var w, k = i.lines[T], C = k.tokens, b = C.length, I = k.lineHeight, S = k.width, _ = 0, D = m, A = y, N = b - 1; _ < b && (!(w = C[_]).textAlign || "left" === w.textAlign);) Fn(e, t, w, n, I, v, D, "left"), S -= w.width, D += w.width, _++;
                        for (; 0 <= N && "right" === (w = C[N]).textAlign;) Fn(e, t, w, n, I, v, A, "right"), S -= w.width, A -= w.width, N--;
                        for (D += (a - (D - m) - (y - A) - S) / 2; _ <= N;) w = C[_], Fn(e, t, w, n, I, v, D + w.width / 2, "center"), D += w.width, _++;
                        v += I
                    }
                }(e, t, r, n, o)
            }(e, t, i, n, o, a) : function (e, t, i, n, o, a) {
                var r, s = Ln(n), l = !1, d = t.__attrCachedBy === Vi.PLAIN_TEXT;
                a !== Ki ? (a && (r = a.style, l = !s && d && r), t.__attrCachedBy = s ? Vi.NONE : Vi.PLAIN_TEXT) : d && (t.__attrCachedBy = Vi.NONE);
                var u = n.font || Sn;
                l && u === (r.font || Sn) || (t.font = u);
                var c = e.__computedFont;
                e.__styleFont !== u && (e.__styleFont = u, c = e.__computedFont = t.font);
                var h = n.textPadding, f = n.textLineHeight, p = e.__textCotentBlock;
                p && !e.__dirtyText || (p = e.__textCotentBlock = wn(i, c, h, f, n.truncate));
                var g = p.outerHeight, m = p.lines, v = p.lineHeight, y = Un(xn, e, n, o), T = y.baseX, w = y.baseY,
                    k = y.textAlign || "left", C = y.textVerticalAlign;
                Mn(t, n, o, T, w);
                var b = fn(w, g, C), I = T, S = b;
                if (s || h) {
                    var _ = un(i, c);
                    h && (_ += h[1] + h[3]);
                    var D = hn(T, _, k);
                    s && Rn(e, t, n, D, b, _, g), h && (I = jn(T, k, h), S += h[0])
                }
                t.textAlign = k, t.textBaseline = "middle", t.globalAlpha = n.opacity || 1;
                for (var A = 0; A < An.length; A++) {
                    var N = An[A], x = N[0], E = N[1], O = n[x];
                    l && O === r[x] || (t[E] = Ui(t, E, O || N[2]))
                }
                S += v / 2;
                var P = n.textStrokeWidth, M = l ? r.textStrokeWidth : null, F = !l || P !== M,
                    L = !l || F || n.textStroke !== r.textStroke, R = Kn(n.textStroke, P), B = Gn(n.textFill);
                if (R && (F && (t.lineWidth = P), L && (t.strokeStyle = R)), B && (l && n.textFill === r.textFill || (t.fillStyle = B)), 1 === m.length) R && t.strokeText(m[0], I, S), B && t.fillText(m[0], I, S); else for (A = 0; A < m.length; A++) R && t.strokeText(m[A], I, S), B && t.fillText(m[A], I, S), S += v
            }(e, t, i, n, o, a)
        }

        function Mn(e, t, i, n, o) {
            if (i && t.textRotation) {
                var a = t.textOrigin;
                "center" === a ? (n = i.width / 2 + i.x, o = i.height / 2 + i.y) : a && (n = a[0] + i.x, o = a[1] + i.y), e.translate(n, o), e.rotate(-t.textRotation), e.translate(-n, -o)
            }
        }

        function Fn(e, t, i, n, o, a, r, s) {
            var l = n.rich[i.styleName] || {};
            l.text = i.text;
            var d = i.textVerticalAlign, u = a + o / 2;
            "top" === d ? u = a + i.height / 2 : "bottom" === d && (u = a + o - i.height / 2), !i.isLineHolder && Ln(l) && Rn(e, t, l, "right" === s ? r - i.width : "center" === s ? r - i.width / 2 : r, u - i.height / 2, i.width, i.height);
            var c = i.textPadding;
            c && (r = jn(r, s, c), u -= i.height / 2 - c[2] - i.textHeight / 2), Vn(t, "shadowBlur", j(l.textShadowBlur, n.textShadowBlur, 0)), Vn(t, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"), Vn(t, "shadowOffsetX", j(l.textShadowOffsetX, n.textShadowOffsetX, 0)), Vn(t, "shadowOffsetY", j(l.textShadowOffsetY, n.textShadowOffsetY, 0)), Vn(t, "textAlign", s), Vn(t, "textBaseline", "middle"), Vn(t, "font", i.font || Sn);
            var h = Kn(l.textStroke || n.textStroke, p), f = Gn(l.textFill || n.textFill),
                p = W(l.textStrokeWidth, n.textStrokeWidth);
            h && (Vn(t, "lineWidth", p), Vn(t, "strokeStyle", h), t.strokeText(i.text, r, u)), f && (Vn(t, "fillStyle", f), t.fillText(i.text, r, u))
        }

        function Ln(e) {
            return !!(e.textBackgroundColor || e.textBorderWidth && e.textBorderColor)
        }

        function Rn(e, t, i, n, o, a, r) {
            var s = i.textBackgroundColor, l = i.textBorderWidth, d = i.textBorderColor, u = L(s);
            if (Vn(t, "shadowBlur", i.textBoxShadowBlur || 0), Vn(t, "shadowColor", i.textBoxShadowColor || "transparent"), Vn(t, "shadowOffsetX", i.textBoxShadowOffsetX || 0), Vn(t, "shadowOffsetY", i.textBoxShadowOffsetY || 0), u || l && d) {
                t.beginPath();
                var c = i.textBorderRadius;
                c ? In(t, {x: n, y: o, width: a, height: r, r: c}) : t.rect(n, o, a, r), t.closePath()
            }
            if (u) if (Vn(t, "fillStyle", s), null != i.fillOpacity) {
                var h = t.globalAlpha;
                t.globalAlpha = i.fillOpacity * i.opacity, t.fill(), t.globalAlpha = h
            } else t.fill(); else if (R(s)) {
                var f = s.image;
                (f = en(f, null, e, Bn, s)) && nn(f) && t.drawImage(f, n, o, a, r)
            }
            l && d && (Vn(t, "lineWidth", l), Vn(t, "strokeStyle", d), null != i.strokeOpacity ? (h = t.globalAlpha, t.globalAlpha = i.strokeOpacity * i.opacity, t.stroke(), t.globalAlpha = h) : t.stroke())
        }

        function Bn(e, t) {
            t.image = e
        }

        function Un(e, t, i, n) {
            var o = i.x || 0, a = i.y || 0, r = i.textAlign, s = i.textVerticalAlign;
            if (n) {
                var l = i.textPosition;
                if (l instanceof Array) o = n.x + Wn(l[0], n.width), a = n.y + Wn(l[1], n.height); else {
                    var d = t && t.calculateTextPosition ? t.calculateTextPosition(Nn, i, n) : pn(Nn, i, n);
                    o = d.x, a = d.y, r = r || d.textAlign, s = s || d.textVerticalAlign
                }
                var u = i.textOffset;
                u && (o += u[0], a += u[1])
            }
            return (e = e || {}).baseX = o, e.baseY = a, e.textAlign = r, e.textVerticalAlign = s, e
        }

        function Vn(e, t, i) {
            return e[t] = Ui(e, t, i), e[t]
        }

        function Kn(e, t) {
            return null == e || t <= 0 || "transparent" === e || "none" === e ? null : e.image || e.colorStops ? "#000" : e
        }

        function Gn(e) {
            return null == e || "none" === e ? null : e.image || e.colorStops ? "#000" : e
        }

        function Wn(e, t) {
            return "string" == typeof e ? 0 <= e.lastIndexOf("%") ? parseFloat(e) / 100 * t : parseFloat(e) : e
        }

        function jn(e, t, i) {
            return "right" === t ? e - i[1] : "center" === t ? e + i[3] / 2 - i[1] / 2 : e + i[3]
        }

        function Hn(e, t) {
            return null != e && (e || t.textBackgroundColor || t.textBorderWidth && t.textBorderColor || t.textPadding)
        }

        function zn() {
        }

        var Xn = new Di;

        function qn(e) {
            for (var t in e = e || {}, Ti.call(this, e), e) e.hasOwnProperty(t) && "style" !== t && (this[t] = e[t]);
            this.style = new Wi(e.style, this), this._rect = null, this.__clipPaths = null
        }

        function Yn(e) {
            qn.call(this, e)
        }

        qn.prototype = {
            constructor: qn,
            type: "displayable",
            __dirty: !0,
            invisible: !(zn.prototype = {
                constructor: zn, drawRectText: function (e, t) {
                    var i = this.style;
                    t = i.textRect || t, this.__dirty && En(i);
                    var n = i.text;
                    if (null != n && (n += ""), Hn(n, i)) {
                        e.save();
                        var o = this.transform;
                        i.transformText ? this.setTransform(e) : o && (Xn.copy(t), Xn.applyTransform(o), t = Xn), Pn(this, e, n, i, t, Ki), e.restore()
                    }
                }
            }),
            z: 0,
            z2: 0,
            zlevel: 0,
            draggable: !1,
            dragging: !1,
            silent: !1,
            culling: !1,
            cursor: "pointer",
            rectHover: !1,
            progressive: !1,
            incremental: !1,
            globalScaleRatio: 1,
            beforeBrush: function (e) {
            },
            afterBrush: function (e) {
            },
            brush: function (e, t) {
            },
            getBoundingRect: function () {
            },
            contain: function (e, t) {
                return this.rectContain(e, t)
            },
            traverse: function (e, t) {
                e.call(t, this)
            },
            rectContain: function (e, t) {
                var i = this.transformCoordToLocal(e, t);
                return this.getBoundingRect().contain(i[0], i[1])
            },
            dirty: function () {
                this.__dirty = this.__dirtyText = !0, this._rect = null, this.__zr && this.__zr.refresh()
            },
            animateStyle: function (e) {
                return this.animate("style", e)
            },
            attrKV: function (e, t) {
                "style" !== e ? Ti.prototype.attrKV.call(this, e, t) : this.style.set(t)
            },
            setStyle: function (e, t) {
                return this.style.set(e, t), this.dirty(!1), this
            },
            useStyle: function (e) {
                return this.style = new Wi(e, this), this.dirty(!1), this
            },
            calculateTextPosition: null
        }, I(qn, Ti), S(qn, zn), Yn.prototype = {
            constructor: Yn, type: "image", brush: function (e, t) {
                var i = this.style, n = i.image;
                i.bind(e, this, t);
                var o = this._image = en(n, this._image, this, this.onload);
                if (o && nn(o)) {
                    var a = i.x || 0, r = i.y || 0, s = i.width, l = i.height, d = o.width / o.height;
                    if (null == s && null != l ? s = l * d : null == l && null != s ? l = s / d : null == s && null == l && (s = o.width, l = o.height), this.setTransform(e), i.sWidth && i.sHeight) {
                        var u = i.sx || 0, c = i.sy || 0;
                        e.drawImage(o, u, c, i.sWidth, i.sHeight, a, r, s, l)
                    } else if (i.sx && i.sy) {
                        var h = s - (u = i.sx), f = l - (c = i.sy);
                        e.drawImage(o, u, c, h, f, a, r, s, l)
                    } else e.drawImage(o, a, r, s, l);
                    null != i.text && (this.restoreTransform(e), this.drawRectText(e, this.getBoundingRect()))
                }
            }, getBoundingRect: function () {
                var e = this.style;
                return this._rect || (this._rect = new Di(e.x || 0, e.y || 0, e.width || 0, e.height || 0)), this._rect
            }
        }, I(Yn, qn);
        var Jn = 314159;

        function Zn(e) {
            return parseInt(e, 10)
        }

        var Qn = new Di(0, 0, 0, 0), $n = new Di(0, 0, 0, 0);

        function eo(e, t, i) {
            this.type = "canvas";
            var n = !e.nodeName || "CANVAS" === e.nodeName.toUpperCase();
            this._opts = i = T({}, i || {}), this.dpr = i.devicePixelRatio || pi, this._singleCanvas = n;
            var o = (this.root = e).style;
            o && (o["-webkit-tap-highlight-color"] = "transparent", o["-webkit-user-select"] = o["user-select"] = o["-webkit-touch-callout"] = "none", e.innerHTML = ""), this.storage = t;
            var a = this._zlevelList = [], r = this._layers = {};
            if (this._layerConfig = {}, this._needsManuallyCompositing = !1, n) {
                var s = e.width, l = e.height;
                null != i.width && (s = i.width), null != i.height && (l = i.height), this.dpr = i.devicePixelRatio || 1, e.width = s * this.dpr, e.height = l * this.dpr, this._width = s, this._height = l;
                var d = new Ji(e, this, this.dpr);
                d.__builtin__ = !0, d.initContext(), (r[Jn] = d).zlevel = Jn, a.push(Jn), this._domRoot = e
            } else {
                this._width = this._getSize(0), this._height = this._getSize(1);
                var u = this._domRoot = function (e, t) {
                    var i = document.createElement("div");
                    return i.style.cssText = ["position:relative", "width:" + e + "px", "height:" + t + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";", i
                }(this._width, this._height);
                e.appendChild(u)
            }
            this._hoverlayer = null, this._hoverElements = []
        }

        function to(e) {
            e = e || {}, this.stage = e.stage || {}, this.onframe = e.onframe || function () {
            }, this._clips = [], this._running = !1, this._time, this._pausedTime, this._pauseStart, this._paused = !1, Ne.call(this)
        }

        eo.prototype = {
            constructor: eo, getType: function () {
                return "canvas"
            }, isSingleCanvas: function () {
                return this._singleCanvas
            }, getViewportRoot: function () {
                return this._domRoot
            }, getViewportRootOffset: function () {
                var e = this.getViewportRoot();
                if (e) return {offsetLeft: e.offsetLeft || 0, offsetTop: e.offsetTop || 0}
            }, refresh: function (e) {
                var t = this.storage.getDisplayList(!0), i = this._zlevelList;
                this._redrawId = Math.random(), this._paintList(t, e, this._redrawId);
                for (var n = 0; n < i.length; n++) {
                    var o = i[n], a = this._layers[o];
                    if (!a.__builtin__ && a.refresh) {
                        var r = 0 === n ? this._backgroundColor : null;
                        a.refresh(r)
                    }
                }
                return this.refreshHover(), this
            }, addHover: function (e, t) {
                if (!e.__hoverMir) {
                    var i = new e.constructor({style: e.style, shape: e.shape, z: e.z, z2: e.z2, silent: e.silent});
                    return (i.__from = e).__hoverMir = i, t && i.setStyle(t), this._hoverElements.push(i), i
                }
            }, removeHover: function (e) {
                var t = e.__hoverMir, i = this._hoverElements, n = b(i, t);
                0 <= n && i.splice(n, 1), e.__hoverMir = null
            }, clearHover: function (e) {
                for (var t = this._hoverElements, i = 0; i < t.length; i++) {
                    var n = t[i].__from;
                    n && (n.__hoverMir = null)
                }
                t.length = 0
            }, refreshHover: function () {
                var e = this._hoverElements, t = e.length, i = this._hoverlayer;
                if (i && i.clear(), t) {
                    Fi(e, this.storage.displayableSortFunc);
                    var n = {};
                    (i = i || (this._hoverlayer = this.getLayer(1e5))).ctx.save();
                    for (var o = 0; o < t;) {
                        var a = e[o], r = a.__from;
                        r && r.__zr ? (o++, r.invisible || (a.transform = r.transform, a.invTransform = r.invTransform, a.__clipPaths = r.__clipPaths, this._doPaintEl(a, i, !0, n))) : (e.splice(o, 1), r.__hoverMir = null, t--)
                    }
                    i.ctx.restore()
                }
            }, getHoverLayer: function () {
                return this.getLayer(1e5)
            }, _paintList: function (e, t, i) {
                if (this._redrawId === i) {
                    t = t || !1, this._updateLayerStatus(e);
                    var n = this._doPaintList(e, t);
                    if (this._needsManuallyCompositing && this._compositeManually(), !n) {
                        var o = this;
                        Zi(function () {
                            o._paintList(e, t, i)
                        })
                    }
                }
            }, _compositeManually: function () {
                var e = this.getLayer(Jn).ctx, t = this._domRoot.width, i = this._domRoot.height;
                e.clearRect(0, 0, t, i), this.eachBuiltinLayer(function (n) {
                    n.virtual && e.drawImage(n.dom, 0, 0, t, i)
                })
            }, _doPaintList: function (e, t) {
                for (var i = [], n = 0; n < this._zlevelList.length; n++) {
                    var a = this._zlevelList[n];
                    (l = this._layers[a]).__builtin__ && l !== this._hoverlayer && (l.__dirty || t) && i.push(l)
                }
                for (var r = !0, s = 0; s < i.length; s++) {
                    var l, d = (l = i[s]).ctx, u = {};
                    d.save();
                    var c = t ? l.__startIndex : l.__drawIndex, h = !t && l.incremental && Date.now,
                        f = h && Date.now(), p = l.zlevel === this._zlevelList[0] ? this._backgroundColor : null;
                    if (l.__startIndex === l.__endIndex) l.clear(!1, p); else if (c === l.__startIndex) {
                        var g = e[c];
                        g.incremental && g.notClear && !t || l.clear(!1, p)
                    }
                    -1 === c && (console.error("For some unknown reason. drawIndex is -1"), c = l.__startIndex);
                    for (var m = c; m < l.__endIndex; m++) {
                        var v = e[m];
                        if (this._doPaintEl(v, l, t, u), v.__dirty = v.__dirtyText = !1, h && 15 < Date.now() - f) break
                    }
                    l.__drawIndex = m, l.__drawIndex < l.__endIndex && (r = !1), u.prevElClipPaths && d.restore(), d.restore()
                }
                return o.wxa && D(this._layers, function (e) {
                    e && e.ctx && e.ctx.draw && e.ctx.draw()
                }), r
            }, _doPaintEl: function (e, t, i, n) {
                var o = t.ctx, a = e.transform;
                if ((t.__dirty || i) && !e.invisible && 0 !== e.style.opacity && (!a || a[0] || a[3]) && (!e.culling || !function (e, t, i) {
                    return Qn.copy(e.getBoundingRect()), e.transform && Qn.applyTransform(e.transform), $n.width = t, $n.height = i, !Qn.intersect($n)
                }(e, this._width, this._height))) {
                    var r = e.__clipPaths, s = n.prevElClipPaths;
                    s && !function (e, t) {
                        if (e === t) return !1;
                        if (!e || !t || e.length !== t.length) return !0;
                        for (var i = 0; i < e.length; i++) if (e[i] !== t[i]) return !0;
                        return !1
                    }(r, s) || (s && (o.restore(), n.prevElClipPaths = null, n.prevEl = null), r && (o.save(), function (e, t) {
                        for (var i = 0; i < e.length; i++) {
                            var n = e[i];
                            n.setTransform(t), t.beginPath(), n.buildPath(t, n.shape), t.clip(), n.restoreTransform(t)
                        }
                    }(r, o), n.prevElClipPaths = r)), e.beforeBrush && e.beforeBrush(o), e.brush(o, n.prevEl || null), (n.prevEl = e).afterBrush && e.afterBrush(o)
                }
            }, getLayer: function (e, t) {
                this._singleCanvas && !this._needsManuallyCompositing && (e = Jn);
                var i = this._layers[e];
                return i || ((i = new Ji("zr_" + e, this, this.dpr)).zlevel = e, i.__builtin__ = !0, this._layerConfig[e] ? v(i, this._layerConfig[e], !0) : this._layerConfig[e - .01] && v(i, this._layerConfig[e - .01], !0), t && (i.virtual = t), this.insertLayer(e, i), i.initContext()), i
            }, insertLayer: function (e, t) {
                var i = this._layers, n = this._zlevelList, o = n.length, a = null, r = -1, s = this._domRoot;
                if (i[e]) mi("ZLevel " + e + " has been used already"); else if (function (e) {
                    return !!e && (!!e.__builtin__ || "function" == typeof e.resize && "function" == typeof e.refresh)
                }(t)) {
                    if (0 < o && e > n[0]) {
                        for (r = 0; r < o - 1 && !(n[r] < e && n[r + 1] > e); r++) ;
                        a = i[n[r]]
                    }
                    if (n.splice(r + 1, 0, e), !(i[e] = t).virtual) if (a) {
                        var l = a.dom;
                        l.nextSibling ? s.insertBefore(t.dom, l.nextSibling) : s.appendChild(t.dom)
                    } else s.firstChild ? s.insertBefore(t.dom, s.firstChild) : s.appendChild(t.dom)
                } else mi("Layer of zlevel " + e + " is not valid")
            }, eachLayer: function (e, t) {
                var i, n, o = this._zlevelList;
                for (n = 0; n < o.length; n++) i = o[n], e.call(t, this._layers[i], i)
            }, eachBuiltinLayer: function (e, t) {
                var i, n, o, a = this._zlevelList;
                for (o = 0; o < a.length; o++) n = a[o], (i = this._layers[n]).__builtin__ && e.call(t, i, n)
            }, eachOtherLayer: function (e, t) {
                var i, n, o, a = this._zlevelList;
                for (o = 0; o < a.length; o++) n = a[o], (i = this._layers[n]).__builtin__ || e.call(t, i, n)
            }, getLayers: function () {
                return this._layers
            }, _updateLayerStatus: function (e) {
                function t(e) {
                    o && (o.__endIndex !== e && (o.__dirty = !0), o.__endIndex = e)
                }

                if (this.eachBuiltinLayer(function (e, t) {
                    e.__dirty = e.__used = !1
                }), this._singleCanvas) for (var i = 1; i < e.length; i++) if ((r = e[i]).zlevel !== e[i - 1].zlevel || r.incremental) {
                    this._needsManuallyCompositing = !0;
                    break
                }
                var n, o = null, a = 0;
                for (i = 0; i < e.length; i++) {
                    var r, s, l = (r = e[i]).zlevel;
                    n !== l && (n = l, a = 0), r.incremental ? ((s = this.getLayer(l + .001, this._needsManuallyCompositing)).incremental = !0, a = 1) : s = this.getLayer(l + (0 < a ? .01 : 0), this._needsManuallyCompositing), s.__builtin__ || mi("ZLevel " + l + " has been used by unkown layer " + s.id), s !== o && (s.__used = !0, s.__startIndex !== i && (s.__dirty = !0), s.__startIndex = i, s.incremental ? s.__drawIndex = -1 : s.__drawIndex = i, t(i), o = s), r.__dirty && (s.__dirty = !0, s.incremental && s.__drawIndex < 0 && (s.__drawIndex = i))
                }
                t(i), this.eachBuiltinLayer(function (e, t) {
                    !e.__used && 0 < e.getElementCount() && (e.__dirty = !0, e.__startIndex = e.__endIndex = e.__drawIndex = 0), e.__dirty && e.__drawIndex < 0 && (e.__drawIndex = e.__startIndex)
                })
            }, clear: function () {
                return this.eachBuiltinLayer(this._clearLayer), this
            }, _clearLayer: function (e) {
                e.clear()
            }, setBackgroundColor: function (e) {
                this._backgroundColor = e
            }, configLayer: function (e, t) {
                if (t) {
                    var i = this._layerConfig;
                    i[e] ? v(i[e], t, !0) : i[e] = t;
                    for (var n = 0; n < this._zlevelList.length; n++) {
                        var o = this._zlevelList[n];
                        o !== e && o !== e + .01 || v(this._layers[o], i[e], !0)
                    }
                }
            }, delLayer: function (e) {
                var t = this._layers, i = this._zlevelList, n = t[e];
                n && (n.dom.parentNode.removeChild(n.dom), delete t[e], i.splice(b(i, e), 1))
            }, resize: function (e, t) {
                if (this._domRoot.style) {
                    var i = this._domRoot;
                    i.style.display = "none";
                    var n = this._opts;
                    if (null != e && (n.width = e), null != t && (n.height = t), e = this._getSize(0), t = this._getSize(1), i.style.display = "", this._width !== e || t !== this._height) {
                        for (var o in i.style.width = e + "px", i.style.height = t + "px", this._layers) this._layers.hasOwnProperty(o) && this._layers[o].resize(e, t);
                        D(this._progressiveLayers, function (i) {
                            i.resize(e, t)
                        }), this.refresh(!0)
                    }
                    this._width = e, this._height = t
                } else {
                    if (null == e || null == t) return;
                    this._width = e, this._height = t, this.getLayer(Jn).resize(e, t)
                }
                return this
            }, clearLayer: function (e) {
                var t = this._layers[e];
                t && t.clear()
            }, dispose: function () {
                this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null
            }, getRenderedCanvas: function (e) {
                if (e = e || {}, this._singleCanvas && !this._compositeManually) return this._layers[Jn].dom;
                var t = new Ji("image", this, e.pixelRatio || this.dpr);
                if (t.initContext(), t.clear(!1, e.backgroundColor || this._backgroundColor), e.pixelRatio <= this.dpr) {
                    this.refresh();
                    var i = t.dom.width, n = t.dom.height, o = t.ctx;
                    this.eachLayer(function (e) {
                        e.__builtin__ ? o.drawImage(e.dom, 0, 0, i, n) : e.renderToCanvas && (t.ctx.save(), e.renderToCanvas(t.ctx), t.ctx.restore())
                    })
                } else for (var a = {}, r = this.storage.getDisplayList(!0), s = 0; s < r.length; s++) {
                    var l = r[s];
                    this._doPaintEl(l, t, !0, a)
                }
                return t.dom
            }, getWidth: function () {
                return this._width
            }, getHeight: function () {
                return this._height
            }, _getSize: function (e) {
                var t = this._opts, i = ["width", "height"][e], n = ["clientWidth", "clientHeight"][e],
                    o = ["paddingLeft", "paddingTop"][e], a = ["paddingRight", "paddingBottom"][e];
                if (null != t[i] && "auto" !== t[i]) return parseFloat(t[i]);
                var r = this.root, s = document.defaultView.getComputedStyle(r);
                return (r[n] || Zn(s[i]) || Zn(r.style[i])) - (Zn(s[o]) || 0) - (Zn(s[a]) || 0) | 0
            }, pathToImage: function (e, t) {
                t = t || this.dpr;
                var i = document.createElement("canvas"), n = i.getContext("2d"), o = e.getBoundingRect(), a = e.style,
                    r = a.shadowBlur * t, s = a.shadowOffsetX * t, l = a.shadowOffsetY * t,
                    d = a.hasStroke() ? a.lineWidth : 0, u = Math.max(d / 2, r - s), c = Math.max(d / 2, s + r),
                    h = Math.max(d / 2, r - l), f = Math.max(d / 2, l + r), p = o.width + u + c, g = o.height + h + f;
                i.width = p * t, i.height = g * t, n.scale(t, t), n.clearRect(0, 0, p, g), n.dpr = t;
                var m = {position: e.position, rotation: e.rotation, scale: e.scale};
                e.position = [u - o.x, h - o.y], e.rotation = 0, e.scale = [1, 1], e.updateTransform(), e && e.brush(n);
                var v = new Yn({style: {x: 0, y: 0, image: i}});
                return null != m.position && (v.position = e.position = m.position), null != m.rotation && (v.rotation = e.rotation = m.rotation), null != m.scale && (v.scale = e.scale = m.scale), v
            }
        }, to.prototype = {
            constructor: to, addClip: function (e) {
                this._clips.push(e)
            }, addAnimator: function (e) {
                e.animation = this;
                for (var t = e.getClips(), i = 0; i < t.length; i++) this.addClip(t[i])
            }, removeClip: function (e) {
                var t = b(this._clips, e);
                0 <= t && this._clips.splice(t, 1)
            }, removeAnimator: function (e) {
                for (var t = e.getClips(), i = 0; i < t.length; i++) this.removeClip(t[i]);
                e.animation = null
            }, _update: function () {
                for (var e = (new Date).getTime() - this._pausedTime, t = e - this._time, i = this._clips, n = i.length, o = [], a = [], r = 0; r < n; r++) {
                    var s = i[r], l = s.step(e, t);
                    l && (o.push(l), a.push(s))
                }
                for (r = 0; r < n;) i[r]._needsRemove ? (i[r] = i[n - 1], i.pop(), n--) : r++;
                for (n = o.length, r = 0; r < n; r++) a[r].fire(o[r]);
                this._time = e, this.onframe(t), this.trigger("frame", t), this.stage.update && this.stage.update()
            }, _startLoop: function () {
                var e = this;
                this._running = !0, Zi(function t() {
                    e._running && (Zi(t), e._paused || e._update())
                })
            }, start: function () {
                this._time = (new Date).getTime(), this._pausedTime = 0, this._startLoop()
            }, stop: function () {
                this._running = !1
            }, pause: function () {
                this._paused || (this._pauseStart = (new Date).getTime(), this._paused = !0)
            }, resume: function () {
                this._paused && (this._pausedTime += (new Date).getTime() - this._pauseStart, this._paused = !1)
            }, clear: function () {
                this._clips = []
            }, isFinished: function () {
                return !this._clips.length
            }, animate: function (e, t) {
                var i = new hi(e, (t = t || {}).loop, t.getter, t.setter);
                return this.addAnimator(i), i
            }
        }, S(to, Ne);
        var io, no, oo = o.domSupported, ao = (no = {
            pointerdown: 1,
            pointerup: 1,
            pointermove: 1,
            pointerout: 1
        }, {
            mouse: io = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
            touch: ["touchstart", "touchend", "touchmove"],
            pointer: A(io, function (e) {
                var t = e.replace("mouse", "pointer");
                return no.hasOwnProperty(t) ? t : e
            })
        }), ro = {mouse: ["mousemove", "mouseup"], pointer: ["pointermove", "pointerup"]};

        function so(e) {
            return "mousewheel" === e && o.browser.firefox ? "DOMMouseScroll" : e
        }

        function lo(e) {
            var t = e.pointerType;
            return "pen" === t || "touch" === t
        }

        function uo(e) {
            e && (e.zrByTouch = !0)
        }

        function co(e, t) {
            for (var i = t, n = !1; i && 9 !== i.nodeType && !(n = i.domBelongToZr || i !== t && i === e.painterRoot);) i = i.parentNode;
            return n
        }

        function ho(e, t) {
            this.type = t.type, this.target = this.currentTarget = e.dom, this.pointerType = t.pointerType, this.clientX = t.clientX, this.clientY = t.clientY
        }

        var fo = ho.prototype;
        fo.stopPropagation = fo.stopImmediatePropagation = fo.preventDefault = te;
        var po = {
            mousedown: function (e) {
                e = je(this.dom, e), this._mayPointerCapture = [e.zrX, e.zrY], this.trigger("mousedown", e)
            }, mousemove: function (e) {
                e = je(this.dom, e);
                var t = this._mayPointerCapture;
                !t || e.zrX === t[0] && e.zrY === t[1] || yo(this, !0), this.trigger("mousemove", e)
            }, mouseup: function (e) {
                e = je(this.dom, e), yo(this, !1), this.trigger("mouseup", e)
            }, mouseout: function (e) {
                e = je(this.dom, e), this._pointerCapturing && (e.zrEventControl = "no_globalout");
                var t = e.toElement || e.relatedTarget;
                e.zrIsToLocalDOM = co(this, t), this.trigger("mouseout", e)
            }, touchstart: function (e) {
                uo(e = je(this.dom, e)), this._lastTouchMoment = new Date, this.handler.processGesture(e, "start"), po.mousemove.call(this, e), po.mousedown.call(this, e)
            }, touchmove: function (e) {
                uo(e = je(this.dom, e)), this.handler.processGesture(e, "change"), po.mousemove.call(this, e)
            }, touchend: function (e) {
                uo(e = je(this.dom, e)), this.handler.processGesture(e, "end"), po.mouseup.call(this, e), +new Date - this._lastTouchMoment < 300 && po.click.call(this, e)
            }, pointerdown: function (e) {
                po.mousedown.call(this, e)
            }, pointermove: function (e) {
                lo(e) || po.mousemove.call(this, e)
            }, pointerup: function (e) {
                po.mouseup.call(this, e)
            }, pointerout: function (e) {
                lo(e) || po.mouseout.call(this, e)
            }
        };
        D(["click", "mousewheel", "dblclick", "contextmenu"], function (e) {
            po[e] = function (t) {
                t = je(this.dom, t), this.trigger(e, t)
            }
        });
        var go = {
            pointermove: function (e) {
                lo(e) || go.mousemove.call(this, e)
            }, pointerup: function (e) {
                go.mouseup.call(this, e)
            }, mousemove: function (e) {
                this.trigger("mousemove", e)
            }, mouseup: function (e) {
                var t = this._pointerCapturing;
                yo(this, !1), this.trigger("mouseup", e), t && (e.zrEventControl = "only_globalout", this.trigger("mouseout", e))
            }
        };

        function mo(e, t, i, n) {
            e.mounted[t] = i, e.listenerOpts[t] = n, He(e.domTarget, so(t), i, n)
        }

        function vo(e) {
            var t, i, n, o, a = e.mounted;
            for (var r in a) a.hasOwnProperty(r) && (t = e.domTarget, i = so(r), n = a[r], o = e.listenerOpts[r], Be ? t.removeEventListener(i, n, o) : t.detachEvent("on" + i, n));
            e.mounted = {}
        }

        function yo(e, t) {
            if (e._mayPointerCapture = null, oo && e._pointerCapturing ^ t) {
                e._pointerCapturing = t;
                var i = e._globalHandlerScope;
                t ? function (e, t) {
                    function i(i) {
                        mo(t, i, function (n) {
                            n = We(n), co(e, n.target) || (n = function (e, t) {
                                return je(e.dom, new ho(e, t), !0)
                            }(e, n), t.domHandlers[i].call(e, n))
                        }, {capture: !0})
                    }

                    o.pointerEventsSupported ? D(ro.pointer, i) : o.touchEventsSupported || D(ro.mouse, i)
                }(e, i) : vo(i)
            }
        }

        function To(e, t) {
            this.domTarget = e, this.domHandlers = t, this.mounted = {}, this.listenerOpts = {}, this.touchTimer = null, this.touching = !1
        }

        function wo(e, t) {
            var i, n, a;
            Ne.call(this), this.dom = e, this.painterRoot = t, this._localHandlerScope = new To(e, po), oo && (this._globalHandlerScope = new To(document, go)), this._pointerCapturing = !1, this._mayPointerCapture = null, i = this, n = this._localHandlerScope, a = n.domHandlers, o.pointerEventsSupported ? D(ao.pointer, function (e) {
                mo(n, e, function (t) {
                    a[e].call(i, t)
                })
            }) : (o.touchEventsSupported && D(ao.touch, function (e) {
                mo(n, e, function (t) {
                    a[e].call(i, t), function (e) {
                        e.touching = !0, null != e.touchTimer && (clearTimeout(e.touchTimer), e.touchTimer = null), e.touchTimer = setTimeout(function () {
                            e.touching = !1, e.touchTimer = null
                        }, 700)
                    }(n)
                })
            }), D(ao.mouse, function (e) {
                mo(n, e, function (t) {
                    t = We(t), n.touching || a[e].call(i, t)
                })
            }))
        }

        var ko = wo.prototype;
        ko.dispose = function () {
            vo(this._localHandlerScope), oo && vo(this._globalHandlerScope)
        }, ko.setCursor = function (e) {
            this.dom.style && (this.dom.style.cursor = e || "default")
        }, S(wo, Ne);
        var Co = !o.canvasSupported, bo = {canvas: eo}, Io = {};

        function So(e, t) {
            var i = new Do(n(), e, t);
            return Io[i.id] = i
        }

        function _o(e, t) {
            bo[e] = t
        }

        var Do = function (e, t, i) {
            i = i || {}, this.dom = t, this.id = e;
            var n = this, a = new Ri, r = i.renderer;
            if (Co) {
                if (!bo.vml) throw new Error("You need to require 'zrender/vml/vml' to support IE8");
                r = "vml"
            } else r && bo[r] || (r = "canvas");
            var s = new bo[r](t, a, i, e);
            this.storage = a, this.painter = s;
            var l = o.node || o.worker ? null : new wo(s.getViewportRoot(), s.root);
            this.handler = new et(a, s, l, s.root), this.animation = new to({stage: {update: O(this.flush, this)}}), this.animation.start(), this._needsRefresh;
            var d = a.delFromStorage, u = a.addToStorage;
            a.delFromStorage = function (e) {
                d.call(a, e), e && e.removeSelfFromZr(n)
            }, a.addToStorage = function (e) {
                u.call(a, e), e.addSelfToZr(n)
            }
        };
        Do.prototype = {
            constructor: Do, getId: function () {
                return this.id
            }, add: function (e) {
                this.storage.addRoot(e), this._needsRefresh = !0
            }, remove: function (e) {
                this.storage.delRoot(e), this._needsRefresh = !0
            }, configLayer: function (e, t) {
                this.painter.configLayer && this.painter.configLayer(e, t), this._needsRefresh = !0
            }, setBackgroundColor: function (e) {
                this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this._needsRefresh = !0
            }, refreshImmediately: function () {
                this._needsRefresh = this._needsRefreshHover = !1, this.painter.refresh(), this._needsRefresh = this._needsRefreshHover = !1
            }, refresh: function () {
                this._needsRefresh = !0
            }, flush: function () {
                var e;
                this._needsRefresh && (e = !0, this.refreshImmediately()), this._needsRefreshHover && (e = !0, this.refreshHoverImmediately()), e && this.trigger("rendered")
            }, addHover: function (e, t) {
                if (this.painter.addHover) {
                    var i = this.painter.addHover(e, t);
                    return this.refreshHover(), i
                }
            }, removeHover: function (e) {
                this.painter.removeHover && (this.painter.removeHover(e), this.refreshHover())
            }, clearHover: function () {
                this.painter.clearHover && (this.painter.clearHover(), this.refreshHover())
            }, refreshHover: function () {
                this._needsRefreshHover = !0
            }, refreshHoverImmediately: function () {
                this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.refreshHover()
            }, resize: function (e) {
                e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize()
            }, clearAnimation: function () {
                this.animation.clear()
            }, getWidth: function () {
                return this.painter.getWidth()
            }, getHeight: function () {
                return this.painter.getHeight()
            }, pathToImage: function (e, t) {
                return this.painter.pathToImage(e, t)
            }, setCursorStyle: function (e) {
                this.handler.setCursorStyle(e)
            }, findHover: function (e, t) {
                return this.handler.findHover(e, t)
            }, on: function (e, t, i) {
                this.handler.on(e, t, i)
            }, off: function (e, t) {
                this.handler.off(e, t)
            }, trigger: function (e, t) {
                this.handler.trigger(e, t)
            }, clear: function () {
                this.storage.delRoot(), this.painter.clear()
            }, dispose: function () {
                var e;
                this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, e = this.id, delete Io[e]
            }
        };
        var Ao = (Object.freeze || Object)({
            version: "4.3.1", init: So, dispose: function (e) {
                if (e) e.dispose(); else {
                    for (var t in Io) Io.hasOwnProperty(t) && Io[t].dispose();
                    Io = {}
                }
                return this
            }, getInstance: function (e) {
                return Io[e]
            }, registerPainter: _o
        }), No = D, xo = R, Eo = M, Oo = "series\0";

        function Po(e) {
            return e instanceof Array ? e : null == e ? [] : [e]
        }

        function Mo(e, t, i) {
            if (e) {
                e[t] = e[t] || {}, e.emphasis = e.emphasis || {}, e.emphasis[t] = e.emphasis[t] || {};
                for (var n = 0, o = i.length; n < o; n++) {
                    var a = i[n];
                    !e.emphasis[t].hasOwnProperty(a) && e[t].hasOwnProperty(a) && (e.emphasis[t][a] = e[t][a])
                }
            }
        }

        var Fo = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"];

        function Lo(e) {
            return !xo(e) || Eo(e) || e instanceof Date ? e : e.value
        }

        function Ro(e, t) {
            t = (t || []).slice();
            var i = A(e || [], function (e, t) {
                return {exist: e}
            });
            return No(t, function (e, n) {
                if (xo(e)) {
                    for (var o = 0; o < i.length; o++) if (!i[o].option && null != e.id && i[o].exist.id === e.id + "") return i[o].option = e, void (t[n] = null);
                    for (o = 0; o < i.length; o++) {
                        var a = i[o].exist;
                        if (!(i[o].option || null != a.id && null != e.id || null == e.name || Vo(e) || Vo(a) || a.name !== e.name + "")) return i[o].option = e, void (t[n] = null)
                    }
                }
            }), No(t, function (e, t) {
                if (xo(e)) {
                    for (var n = 0; n < i.length; n++) {
                        var o = i[n].exist;
                        if (!i[n].option && !Vo(o) && null == e.id) {
                            i[n].option = e;
                            break
                        }
                    }
                    n >= i.length && i.push({option: e})
                }
            }), i
        }

        function Bo(e) {
            var t = $();
            No(e, function (e, i) {
                var n = e.exist;
                n && t.set(n.id, e)
            }), No(e, function (e, i) {
                var n = e.option;
                X(!n || null == n.id || !t.get(n.id) || t.get(n.id) === e, "id duplicates: " + (n && n.id)), n && null != n.id && t.set(n.id, e), e.keyInfo || (e.keyInfo = {})
            }), No(e, function (e, i) {
                var n = e.exist, o = e.option, a = e.keyInfo;
                if (xo(o)) {
                    if (a.name = null != o.name ? o.name + "" : n ? n.name : Oo + i, n) a.id = n.id; else if (null != o.id) a.id = o.id + ""; else for (var r = 0; a.id = "\0" + a.name + "\0" + r++, t.get(a.id);) ;
                    t.set(a.id, e)
                }
            })
        }

        function Uo(e) {
            var t = e.name;
            return !(!t || !t.indexOf(Oo))
        }

        function Vo(e) {
            return xo(e) && e.id && 0 === (e.id + "").indexOf("\0_ec_\0")
        }

        function Ko(e, t) {
            return null != t.dataIndexInside ? t.dataIndexInside : null != t.dataIndex ? M(t.dataIndex) ? A(t.dataIndex, function (t) {
                return e.indexOfRawIndex(t)
            }) : e.indexOfRawIndex(t.dataIndex) : null != t.name ? M(t.name) ? A(t.name, function (t) {
                return e.indexOfName(t)
            }) : e.indexOfName(t.name) : void 0
        }

        function Go() {
            var e = "__\0ec_inner_" + Wo++ + "_" + Math.random().toFixed(5);
            return function (t) {
                return t[e] || (t[e] = {})
            }
        }

        var Wo = 0;

        function jo(e, t, i) {
            if (L(t)) {
                var n = {};
                n[t + "Index"] = 0, t = n
            }
            var o = i && i.defaultMainType;
            !o || Ho(t, o + "Index") || Ho(t, o + "Id") || Ho(t, o + "Name") || (t[o + "Index"] = 0);
            var a = {};
            return No(t, function (n, o) {
                if (n = t[o], "dataIndex" !== o && "dataIndexInside" !== o) {
                    var r = o.match(/^(\w+)(Index|Id|Name)$/) || [], s = r[1], l = (r[2] || "").toLowerCase();
                    if (!(!s || !l || null == n || "index" === l && "none" === n || i && i.includeMainTypes && b(i.includeMainTypes, s) < 0)) {
                        var d = {mainType: s};
                        "index" === l && "all" === n || (d[l] = n);
                        var u = e.queryComponents(d);
                        a[s + "Models"] = u, a[s + "Model"] = u[0]
                    }
                } else a[o] = n
            }), a
        }

        function Ho(e, t) {
            return e && e.hasOwnProperty(t)
        }

        function zo(e, t, i) {
            e.setAttribute ? e.setAttribute(t, i) : e[t] = i
        }

        function Xo(e) {
            return "auto" === e ? o.domSupported ? "html" : "richText" : e || "html"
        }

        function qo(e, t) {
            var i = $(), n = [];
            return D(e, function (e) {
                var o = t(e);
                (i.get(o) || (n.push(o), i.set(o, []))).push(e)
            }), {keys: n, buckets: i}
        }

        var Yo = ".", Jo = "___EC__COMPONENT__CONTAINER___";

        function Zo(e) {
            var t = {main: "", sub: ""};
            return e && (e = e.split(Yo), t.main = e[0] || "", t.sub = e[1] || ""), t
        }

        function Qo(e) {
            (e.$constructor = e).extend = function (e) {
                function t() {
                    e.$constructor ? e.$constructor.apply(this, arguments) : i.apply(this, arguments)
                }

                var i = this;
                return T(t.prototype, e), t.extend = this.extend, t.superCall = ta, t.superApply = ia, I(t, this), t.superClass = i, t
            }
        }

        var $o = 0;

        function ea(e) {
            var t = ["__\0is_clz", $o++, Math.random().toFixed(3)].join("_");
            e.prototype[t] = !0, e.isInstance = function (e) {
                return !(!e || !e[t])
            }
        }

        function ta(e, t) {
            var i = H(arguments, 2);
            return this.superClass.prototype[t].apply(e, i)
        }

        function ia(e, t, i) {
            return this.superClass.prototype[t].apply(e, i)
        }

        function na(e, t) {
            t = t || {};
            var i = {};
            if (e.registerClass = function (e, t) {
                return t && (function (e) {
                    X(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e), 'componentType "' + e + '" illegal')
                }(t), (t = Zo(t)).sub ? t.sub !== Jo && ((function (e) {
                    var t = i[e.main];
                    return t && t[Jo] || ((t = i[e.main] = {})[Jo] = !0), t
                }(t))[t.sub] = e) : i[t.main] = e), e
            }, e.getClass = function (e, t, n) {
                var o = i[e];
                if (o && o[Jo] && (o = t ? o[t] : null), n && !o) throw new Error(t ? "Component " + e + "." + (t || "") + " not exists. Load it first." : e + ".type should be specified.");
                return o
            }, e.getClassesByMainType = function (e) {
                e = Zo(e);
                var t = [], n = i[e.main];
                return n && n[Jo] ? D(n, function (e, i) {
                    i !== Jo && t.push(e)
                }) : t.push(n), t
            }, e.hasClass = function (e) {
                return e = Zo(e), !!i[e.main]
            }, e.getAllClassMainTypes = function () {
                var e = [];
                return D(i, function (t, i) {
                    e.push(i)
                }), e
            }, e.hasSubTypes = function (e) {
                e = Zo(e);
                var t = i[e.main];
                return t && t[Jo]
            }, e.parseClassType = Zo, t.registerWhenExtend) {
                var n = e.extend;
                n && (e.extend = function (t) {
                    var i = n.call(this, t);
                    return e.registerClass(i, t.type)
                })
            }
            return e
        }

        function oa(e) {
            for (var t = 0; t < e.length; t++) e[t][1] || (e[t][1] = e[t][0]);
            return function (t, i, n) {
                for (var o = {}, a = 0; a < e.length; a++) {
                    var r = e[a][1];
                    if (!(i && 0 <= b(i, r) || n && b(n, r) < 0)) {
                        var s = t.getShallow(r);
                        null != s && (o[e[a][0]] = s)
                    }
                }
                return o
            }
        }

        var aa = oa([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]),
            ra = {
                getLineStyle: function (e) {
                    var t = aa(this, e);
                    return t.lineDash = this.getLineDash(t.lineWidth), t
                }, getLineDash: function (e) {
                    null == e && (e = 1);
                    var t = this.get("type"), i = Math.max(e, 2), n = 4 * e;
                    return "solid" !== t && null != t && ("dashed" === t ? [n, n] : [i, i])
                }
            },
            sa = oa([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]),
            la = {
                getAreaStyle: function (e, t) {
                    return sa(this, e, t)
                }
            }, da = Math.pow, ua = Math.sqrt, ca = 1e-8, ha = 1e-4, fa = ua(3), pa = 1 / 3, ga = oe(), ma = oe(),
            va = oe();

        function ya(e) {
            return -ca < e && e < ca
        }

        function Ta(e) {
            return ca < e || e < -ca
        }

        function wa(e, t, i, n, o) {
            var a = 1 - o;
            return a * a * (a * e + 3 * o * t) + o * o * (o * n + 3 * a * i)
        }

        function ka(e, t, i, n, o) {
            var a = 1 - o;
            return 3 * (((t - e) * a + 2 * (i - t) * o) * a + (n - i) * o * o)
        }

        function Ca(e, t, i, n, o) {
            var a = 6 * i - 12 * t + 6 * e, r = 9 * t + 3 * n - 3 * e - 9 * i, s = 3 * t - 3 * e, l = 0;
            if (ya(r)) Ta(a) && 0 <= (u = -s / a) && u <= 1 && (o[l++] = u); else {
                var d = a * a - 4 * r * s;
                if (ya(d)) o[0] = -a / (2 * r); else if (0 < d) {
                    var u, c = ua(d), h = (-a - c) / (2 * r);
                    0 <= (u = (-a + c) / (2 * r)) && u <= 1 && (o[l++] = u), 0 <= h && h <= 1 && (o[l++] = h)
                }
            }
            return l
        }

        function ba(e, t, i, n, o, a) {
            var r = (t - e) * o + e, s = (i - t) * o + t, l = (n - i) * o + i, d = (s - r) * o + r, u = (l - s) * o + s,
                c = (u - d) * o + d;
            a[0] = e, a[1] = r, a[2] = d, a[3] = c, a[4] = c, a[5] = u, a[6] = l, a[7] = n
        }

        function Ia(e, t, i, n) {
            var o = 1 - n;
            return o * (o * e + 2 * n * t) + n * n * i
        }

        function Sa(e, t, i, n) {
            return 2 * ((1 - n) * (t - e) + n * (i - t))
        }

        function _a(e, t, i) {
            var n = e + i - 2 * t;
            return 0 == n ? .5 : (e - t) / n
        }

        function Da(e, t, i, n, o) {
            var a = (t - e) * n + e, r = (i - t) * n + t, s = (r - a) * n + a;
            o[0] = e, o[1] = a, o[2] = s, o[3] = s, o[4] = r, o[5] = i
        }

        var Aa = Math.min, Na = Math.max, xa = Math.sin, Ea = Math.cos, Oa = 2 * Math.PI, Pa = oe(), Ma = oe(),
            Fa = oe();

        function La(e, t, i) {
            if (0 !== e.length) {
                var n, o = e[0], a = o[0], r = o[0], s = o[1], l = o[1];
                for (n = 1; n < e.length; n++) o = e[n], a = Aa(a, o[0]), r = Na(r, o[0]), s = Aa(s, o[1]), l = Na(l, o[1]);
                t[0] = a, t[1] = s, i[0] = r, i[1] = l
            }
        }

        function Ra(e, t, i, n, o, a) {
            o[0] = Aa(e, i), o[1] = Aa(t, n), a[0] = Na(e, i), a[1] = Na(t, n)
        }

        var Ba = [], Ua = [];

        function Va(e, t, i, n, o, a, r, s, l, d) {
            var u, c = Ca, h = wa, f = c(e, i, o, r, Ba);
            for (l[0] = 1 / 0, l[1] = 1 / 0, d[0] = -1 / 0, d[1] = -1 / 0, u = 0; u < f; u++) {
                var p = h(e, i, o, r, Ba[u]);
                l[0] = Aa(p, l[0]), d[0] = Na(p, d[0])
            }
            for (f = c(t, n, a, s, Ua), u = 0; u < f; u++) {
                var g = h(t, n, a, s, Ua[u]);
                l[1] = Aa(g, l[1]), d[1] = Na(g, d[1])
            }
            l[0] = Aa(e, l[0]), d[0] = Na(e, d[0]), l[0] = Aa(r, l[0]), d[0] = Na(r, d[0]), l[1] = Aa(t, l[1]), d[1] = Na(t, d[1]), l[1] = Aa(s, l[1]), d[1] = Na(s, d[1])
        }

        function Ka(e, t, i, n, o, a, r, s, l) {
            var d = be, u = Ie, c = Math.abs(o - a);
            if (c % Oa < 1e-4 && 1e-4 < c) return s[0] = e - i, s[1] = t - n, l[0] = e + i, void (l[1] = t + n);
            if (Pa[0] = Ea(o) * i + e, Pa[1] = xa(o) * n + t, Ma[0] = Ea(a) * i + e, Ma[1] = xa(a) * n + t, d(s, Pa, Ma), u(l, Pa, Ma), (o %= Oa) < 0 && (o += Oa), (a %= Oa) < 0 && (a += Oa), a < o && !r ? a += Oa : o < a && r && (o += Oa), r) {
                var h = a;
                a = o, o = h
            }
            for (var f = 0; f < a; f += Math.PI / 2) o < f && (Fa[0] = Ea(f) * i + e, Fa[1] = xa(f) * n + t, d(s, Fa, s), u(l, Fa, l))
        }

        var Ga = {M: 1, L: 2, C: 3, Q: 4, A: 5, Z: 6, R: 7}, Wa = [], ja = [], Ha = [], za = [], Xa = Math.min,
            qa = Math.max, Ya = Math.cos, Ja = Math.sin, Za = Math.sqrt, Qa = Math.abs,
            $a = "undefined" != typeof Float32Array, er = function (e) {
                this._saveData = !e, this._saveData && (this.data = []), this._ctx = null
            };

        function tr(e, t, i, n, o, a, r) {
            if (0 === o) return !1;
            var s = o, l = 0;
            if (t + s < r && n + s < r || r < t - s && r < n - s || e + s < a && i + s < a || a < e - s && a < i - s) return !1;
            if (e === i) return Math.abs(a - e) <= s / 2;
            var d = (l = (t - n) / (e - i)) * a - r + (e * n - i * t) / (e - i);
            return d * d / (l * l + 1) <= s / 2 * s / 2
        }

        function ir(e, t, i, n, o, a, r, s, l, d, u) {
            if (0 === l) return !1;
            var c = l;
            return !(t + c < u && n + c < u && a + c < u && s + c < u || u < t - c && u < n - c && u < a - c && u < s - c || e + c < d && i + c < d && o + c < d && r + c < d || d < e - c && d < i - c && d < o - c && d < r - c) && function (e, t, i, n, o, a, r, s, l, d, u) {
                var c, h, f, p, g, m = .005, v = 1 / 0;
                ga[0] = l, ga[1] = d;
                for (var y = 0; y < 1; y += .05) ma[0] = wa(e, i, o, r, y), ma[1] = wa(t, n, a, s, y), (p = we(ga, ma)) < v && (c = y, v = p);
                v = 1 / 0;
                for (var T = 0; T < 32 && !(m < ha); T++) h = c - m, f = c + m, ma[0] = wa(e, i, o, r, h), ma[1] = wa(t, n, a, s, h), p = we(ma, ga), 0 <= h && p < v ? (c = h, v = p) : (va[0] = wa(e, i, o, r, f), va[1] = wa(t, n, a, s, f), g = we(va, ga), f <= 1 && g < v ? (c = f, v = g) : m *= .5);
                return ua(v)
            }(e, t, i, n, o, a, r, s, d, u) <= c / 2
        }

        function nr(e, t, i, n, o, a, r, s, l) {
            if (0 === r) return !1;
            var d = r;
            return !(t + d < l && n + d < l && a + d < l || l < t - d && l < n - d && l < a - d || e + d < s && i + d < s && o + d < s || s < e - d && s < i - d && s < o - d) && function (e, t, i, n, o, a, r, s, l) {
                var d, u = .005, c = 1 / 0;
                ga[0] = r, ga[1] = s;
                for (var h = 0; h < 1; h += .05) ma[0] = Ia(e, i, o, h), ma[1] = Ia(t, n, a, h), (m = we(ga, ma)) < c && (d = h, c = m);
                c = 1 / 0;
                for (var f = 0; f < 32 && !(u < ha); f++) {
                    var p = d - u, g = d + u;
                    ma[0] = Ia(e, i, o, p), ma[1] = Ia(t, n, a, p);
                    var m = we(ma, ga);
                    if (0 <= p && m < c) d = p, c = m; else {
                        va[0] = Ia(e, i, o, g), va[1] = Ia(t, n, a, g);
                        var v = we(va, ga);
                        g <= 1 && v < c ? (d = g, c = v) : u *= .5
                    }
                }
                return ua(c)
            }(e, t, i, n, o, a, s, l) <= d / 2
        }

        er.prototype = {
            constructor: er,
            _xi: 0,
            _yi: 0,
            _x0: 0,
            _y0: 0,
            _ux: 0,
            _uy: 0,
            _len: 0,
            _lineDash: null,
            _dashOffset: 0,
            _dashIdx: 0,
            _dashSum: 0,
            setScale: function (e, t, i) {
                i = i || 0, this._ux = Qa(i / pi / e) || 0, this._uy = Qa(i / pi / t) || 0
            },
            getContext: function () {
                return this._ctx
            },
            beginPath: function (e) {
                return (this._ctx = e) && e.beginPath(), e && (this.dpr = e.dpr), this._saveData && (this._len = 0), this._lineDash && (this._lineDash = null, this._dashOffset = 0), this
            },
            moveTo: function (e, t) {
                return this.addData(Ga.M, e, t), this._ctx && this._ctx.moveTo(e, t), this._x0 = e, this._y0 = t, this._xi = e, this._yi = t, this
            },
            lineTo: function (e, t) {
                var i = Qa(e - this._xi) > this._ux || Qa(t - this._yi) > this._uy || this._len < 5;
                return this.addData(Ga.L, e, t), this._ctx && i && (this._needsDash() ? this._dashedLineTo(e, t) : this._ctx.lineTo(e, t)), i && (this._xi = e, this._yi = t), this
            },
            bezierCurveTo: function (e, t, i, n, o, a) {
                return this.addData(Ga.C, e, t, i, n, o, a), this._ctx && (this._needsDash() ? this._dashedBezierTo(e, t, i, n, o, a) : this._ctx.bezierCurveTo(e, t, i, n, o, a)), this._xi = o, this._yi = a, this
            },
            quadraticCurveTo: function (e, t, i, n) {
                return this.addData(Ga.Q, e, t, i, n), this._ctx && (this._needsDash() ? this._dashedQuadraticTo(e, t, i, n) : this._ctx.quadraticCurveTo(e, t, i, n)), this._xi = i, this._yi = n, this
            },
            arc: function (e, t, i, n, o, a) {
                return this.addData(Ga.A, e, t, i, i, n, o - n, 0, a ? 0 : 1), this._ctx && this._ctx.arc(e, t, i, n, o, a), this._xi = Ya(o) * i + e, this._yi = Ja(o) * i + t, this
            },
            arcTo: function (e, t, i, n, o) {
                return this._ctx && this._ctx.arcTo(e, t, i, n, o), this
            },
            rect: function (e, t, i, n) {
                return this._ctx && this._ctx.rect(e, t, i, n), this.addData(Ga.R, e, t, i, n), this
            },
            closePath: function () {
                this.addData(Ga.Z);
                var e = this._ctx, t = this._x0, i = this._y0;
                return e && (this._needsDash() && this._dashedLineTo(t, i), e.closePath()), this._xi = t, this._yi = i, this
            },
            fill: function (e) {
                e && e.fill(), this.toStatic()
            },
            stroke: function (e) {
                e && e.stroke(), this.toStatic()
            },
            setLineDash: function (e) {
                if (e instanceof Array) {
                    this._lineDash = e;
                    for (var t = this._dashIdx = 0, i = 0; i < e.length; i++) t += e[i];
                    this._dashSum = t
                }
                return this
            },
            setLineDashOffset: function (e) {
                return this._dashOffset = e, this
            },
            len: function () {
                return this._len
            },
            setData: function (e) {
                var t = e.length;
                this.data && this.data.length === t || !$a || (this.data = new Float32Array(t));
                for (var i = 0; i < t; i++) this.data[i] = e[i];
                this._len = t
            },
            appendPath: function (e) {
                e instanceof Array || (e = [e]);
                for (var t = e.length, i = 0, n = this._len, o = 0; o < t; o++) i += e[o].len();
                for ($a && this.data instanceof Float32Array && (this.data = new Float32Array(n + i)), o = 0; o < t; o++) for (var a = e[o].data, r = 0; r < a.length; r++) this.data[n++] = a[r];
                this._len = n
            },
            addData: function (e) {
                if (this._saveData) {
                    var t = this.data;
                    this._len + arguments.length > t.length && (this._expandData(), t = this.data);
                    for (var i = 0; i < arguments.length; i++) t[this._len++] = arguments[i];
                    this._prevCmd = e
                }
            },
            _expandData: function () {
                if (!(this.data instanceof Array)) {
                    for (var e = [], t = 0; t < this._len; t++) e[t] = this.data[t];
                    this.data = e
                }
            },
            _needsDash: function () {
                return this._lineDash
            },
            _dashedLineTo: function (e, t) {
                var i, n, o = this._dashSum, a = this._dashOffset, r = this._lineDash, s = this._ctx, l = this._xi,
                    d = this._yi, u = e - l, c = t - d, h = Za(u * u + c * c), f = l, p = d, g = r.length;
                for (a < 0 && (a = o + a), f -= (a %= o) * (u /= h), p -= a * (c /= h); 0 < u && f <= e || u < 0 && e <= f || 0 === u && (0 < c && p <= t || c < 0 && t <= p);) f += u * (i = r[n = this._dashIdx]), p += c * i, this._dashIdx = (n + 1) % g, 0 < u && f < l || u < 0 && l < f || 0 < c && p < d || c < 0 && d < p || s[n % 2 ? "moveTo" : "lineTo"](0 <= u ? Xa(f, e) : qa(f, e), 0 <= c ? Xa(p, t) : qa(p, t));
                u = f - e, c = p - t, this._dashOffset = -Za(u * u + c * c)
            },
            _dashedBezierTo: function (e, t, i, n, o, a) {
                var r, s, l, d, u, c = this._dashSum, h = this._dashOffset, f = this._lineDash, p = this._ctx,
                    g = this._xi, m = this._yi, v = wa, y = 0, T = this._dashIdx, w = f.length, k = 0;
                for (h < 0 && (h = c + h), h %= c, r = 0; r < 1; r += .1) s = v(g, e, i, o, r + .1) - v(g, e, i, o, r), l = v(m, t, n, a, r + .1) - v(m, t, n, a, r), y += Za(s * s + l * l);
                for (; T < w && !(h < (k += f[T])); T++) ;
                for (r = (k - h) / y; r <= 1;) d = v(g, e, i, o, r), u = v(m, t, n, a, r), T % 2 ? p.moveTo(d, u) : p.lineTo(d, u), r += f[T] / y, T = (T + 1) % w;
                T % 2 != 0 && p.lineTo(o, a), s = o - d, l = a - u, this._dashOffset = -Za(s * s + l * l)
            },
            _dashedQuadraticTo: function (e, t, i, n) {
                var o = i, a = n;
                i = (i + 2 * e) / 3, n = (n + 2 * t) / 3, e = (this._xi + 2 * e) / 3, t = (this._yi + 2 * t) / 3, this._dashedBezierTo(e, t, i, n, o, a)
            },
            toStatic: function () {
                var e = this.data;
                e instanceof Array && (e.length = this._len, $a && (this.data = new Float32Array(e)))
            },
            getBoundingRect: function () {
                Wa[0] = Wa[1] = Ha[0] = Ha[1] = Number.MAX_VALUE, ja[0] = ja[1] = za[0] = za[1] = -Number.MAX_VALUE;
                for (var e, t, i, n, o, a, r, s, l, d, u, c, h, f, p = this.data, g = 0, m = 0, v = 0, y = 0, T = 0; T < p.length;) {
                    var w = p[T++];
                    switch (1 === T && (v = g = p[T], y = m = p[T + 1]), w) {
                        case Ga.M:
                            g = v = p[T++], m = y = p[T++], Ha[0] = v, Ha[1] = y, za[0] = v, za[1] = y;
                            break;
                        case Ga.L:
                            Ra(g, m, p[T], p[T + 1], Ha, za), g = p[T++], m = p[T++];
                            break;
                        case Ga.C:
                            Va(g, m, p[T++], p[T++], p[T++], p[T++], p[T], p[T + 1], Ha, za), g = p[T++], m = p[T++];
                            break;
                        case Ga.Q:
                            e = g, t = m, i = p[T++], n = p[T++], o = p[T], a = p[T + 1], r = Ha, s = za, d = l = void 0, d = Ia, u = Na(Aa((l = _a)(e, i, o), 1), 0), c = Na(Aa(l(t, n, a), 1), 0), h = d(e, i, o, u), f = d(t, n, a, c), r[0] = Aa(e, o, h), r[1] = Aa(t, a, f), s[0] = Na(e, o, h), s[1] = Na(t, a, f), g = p[T++], m = p[T++];
                            break;
                        case Ga.A:
                            var k = p[T++], C = p[T++], b = p[T++], I = p[T++], S = p[T++], _ = p[T++] + S;
                            T += 1;
                            var D = 1 - p[T++];
                            1 === T && (v = Ya(S) * b + k, y = Ja(S) * I + C), Ka(k, C, b, I, S, _, D, Ha, za), g = Ya(_) * b + k, m = Ja(_) * I + C;
                            break;
                        case Ga.R:
                            Ra(v = g = p[T++], y = m = p[T++], v + p[T++], y + p[T++], Ha, za);
                            break;
                        case Ga.Z:
                            g = v, m = y
                    }
                    be(Wa, Wa, Ha), Ie(ja, ja, za)
                }
                return 0 === T && (Wa[0] = Wa[1] = ja[0] = ja[1] = 0), new Di(Wa[0], Wa[1], ja[0] - Wa[0], ja[1] - Wa[1])
            },
            rebuildPath: function (e) {
                for (var t, i, n, o, a, r, s = this.data, l = this._ux, d = this._uy, u = this._len, c = 0; c < u;) {
                    var h = s[c++];
                    switch (1 === c && (t = n = s[c], i = o = s[c + 1]), h) {
                        case Ga.M:
                            t = n = s[c++], i = o = s[c++], e.moveTo(n, o);
                            break;
                        case Ga.L:
                            a = s[c++], r = s[c++], (Qa(a - n) > l || Qa(r - o) > d || c === u - 1) && (e.lineTo(a, r), n = a, o = r);
                            break;
                        case Ga.C:
                            e.bezierCurveTo(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], o = s[c - 1];
                            break;
                        case Ga.Q:
                            e.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], o = s[c - 1];
                            break;
                        case Ga.A:
                            var f = s[c++], p = s[c++], g = s[c++], m = s[c++], v = s[c++], y = s[c++], T = s[c++],
                                w = s[c++], k = m < g ? g : m, C = m < g ? 1 : g / m, b = m < g ? m / g : 1, I = v + y;
                            .001 < Math.abs(g - m) ? (e.translate(f, p), e.rotate(T), e.scale(C, b), e.arc(0, 0, k, v, I, 1 - w), e.scale(1 / C, 1 / b), e.rotate(-T), e.translate(-f, -p)) : e.arc(f, p, k, v, I, 1 - w), 1 === c && (t = Ya(v) * g + f, i = Ja(v) * m + p), n = Ya(I) * g + f, o = Ja(I) * m + p;
                            break;
                        case Ga.R:
                            t = n = s[c], i = o = s[c + 1], e.rect(s[c++], s[c++], s[c++], s[c++]);
                            break;
                        case Ga.Z:
                            e.closePath(), n = t, o = i
                    }
                }
            }
        }, er.CMD = Ga;
        var or = 2 * Math.PI;

        function ar(e) {
            return (e %= or) < 0 && (e += or), e
        }

        var rr = 2 * Math.PI;

        function sr(e, t, i, n, o, a, r, s, l) {
            if (0 === r) return !1;
            var d = r;
            s -= e, l -= t;
            var u = Math.sqrt(s * s + l * l);
            if (i < u - d || u + d < i) return !1;
            if (Math.abs(n - o) % rr < 1e-4) return !0;
            if (a) {
                var c = n;
                n = ar(o), o = ar(c)
            } else n = ar(n), o = ar(o);
            o < n && (o += rr);
            var h = Math.atan2(l, s);
            return h < 0 && (h += rr), n <= h && h <= o || n <= h + rr && h + rr <= o
        }

        function lr(e, t, i, n, o, a) {
            if (t < a && n < a || a < t && a < n) return 0;
            if (n === t) return 0;
            var r = n < t ? 1 : -1, s = (a - t) / (n - t);
            1 != s && 0 != s || (r = n < t ? .5 : -.5);
            var l = s * (i - e) + e;
            return l === o ? 1 / 0 : o < l ? r : 0
        }

        var dr = er.CMD, ur = 2 * Math.PI, cr = 1e-4, hr = [-1, -1, -1], fr = [-1, -1];

        function pr(e, t, i, n, o, a, r, s, l, d) {
            if (t < d && n < d && a < d && s < d || d < t && d < n && d < a && d < s) return 0;
            var u, c = function (e, t, i, n, o, a) {
                var r = n + 3 * (t - i) - e, s = 3 * (i - 2 * t + e), l = 3 * (t - e), d = e - o, u = s * s - 3 * r * l,
                    c = s * l - 9 * r * d, h = l * l - 3 * s * d, f = 0;
                if (ya(u) && ya(c)) ya(s) ? a[0] = 0 : 0 <= (I = -l / s) && I <= 1 && (a[f++] = I); else {
                    var p = c * c - 4 * u * h;
                    if (ya(p)) {
                        var g = c / u, m = -g / 2;
                        0 <= (I = -s / r + g) && I <= 1 && (a[f++] = I), 0 <= m && m <= 1 && (a[f++] = m)
                    } else if (0 < p) {
                        var v = ua(p), y = u * s + 1.5 * r * (-c + v), T = u * s + 1.5 * r * (-c - v);
                        0 <= (I = (-s - ((y = y < 0 ? -da(-y, pa) : da(y, pa)) + (T = T < 0 ? -da(-T, pa) : da(T, pa)))) / (3 * r)) && I <= 1 && (a[f++] = I)
                    } else {
                        var w = (2 * u * s - 3 * r * c) / (2 * ua(u * u * u)), k = Math.acos(w) / 3, C = ua(u),
                            b = Math.cos(k), I = (-s - 2 * C * b) / (3 * r),
                            S = (m = (-s + C * (b + fa * Math.sin(k))) / (3 * r), (-s + C * (b - fa * Math.sin(k))) / (3 * r));
                        0 <= I && I <= 1 && (a[f++] = I), 0 <= m && m <= 1 && (a[f++] = m), 0 <= S && S <= 1 && (a[f++] = S)
                    }
                }
                return f
            }(t, n, a, s, d, hr);
            if (0 === c) return 0;
            for (var h, f, p = 0, g = -1, m = 0; m < c; m++) {
                var v = hr[m], y = 0 === v || 1 === v ? .5 : 1;
                wa(e, i, o, r, v) < l || (g < 0 && (g = Ca(t, n, a, s, fr), fr[1] < fr[0] && 1 < g && (u = fr[0], fr[0] = fr[1], fr[1] = u), h = wa(t, n, a, s, fr[0]), 1 < g && (f = wa(t, n, a, s, fr[1]))), 2 === g ? v < fr[0] ? p += h < t ? y : -y : v < fr[1] ? p += f < h ? y : -y : p += s < f ? y : -y : v < fr[0] ? p += h < t ? y : -y : p += s < h ? y : -y)
            }
            return p
        }

        function gr(e, t, i, n, o, a, r, s) {
            if (t < s && n < s && a < s || s < t && s < n && s < a) return 0;
            var l = function (e, t, i, n, o) {
                var a = e - 2 * t + i, r = 2 * (t - e), s = e - n, l = 0;
                if (ya(a)) Ta(r) && 0 <= (u = -s / r) && u <= 1 && (o[l++] = u); else {
                    var d = r * r - 4 * a * s;
                    if (ya(d)) 0 <= (u = -r / (2 * a)) && u <= 1 && (o[l++] = u); else if (0 < d) {
                        var u, c = ua(d), h = (-r - c) / (2 * a);
                        0 <= (u = (-r + c) / (2 * a)) && u <= 1 && (o[l++] = u), 0 <= h && h <= 1 && (o[l++] = h)
                    }
                }
                return l
            }(t, n, a, s, hr);
            if (0 === l) return 0;
            var d = _a(t, n, a);
            if (0 <= d && d <= 1) {
                for (var u = 0, c = Ia(t, n, a, d), h = 0; h < l; h++) {
                    var f = 0 === hr[h] || 1 === hr[h] ? .5 : 1;
                    Ia(e, i, o, hr[h]) < r || (hr[h] < d ? u += c < t ? f : -f : u += a < c ? f : -f)
                }
                return u
            }
            return f = 0 === hr[0] || 1 === hr[0] ? .5 : 1, Ia(e, i, o, hr[0]) < r ? 0 : a < t ? f : -f
        }

        function mr(e, t, i, n, o, a, r, s) {
            if (i < (s -= t) || s < -i) return 0;
            var l = Math.sqrt(i * i - s * s);
            hr[0] = -l, hr[1] = l;
            var d = Math.abs(n - o);
            if (d < 1e-4) return 0;
            if (d % ur < 1e-4) {
                o = ur;
                var u = a ? 1 : -1;
                return r >= hr[n = 0] + e && r <= hr[1] + e ? u : 0
            }
            a ? (l = n, n = ar(o), o = ar(l)) : (n = ar(n), o = ar(o)), o < n && (o += ur);
            for (var c = 0, h = 0; h < 2; h++) {
                var f = hr[h];
                if (r < f + e) {
                    var p = Math.atan2(s, f);
                    u = a ? 1 : -1, p < 0 && (p = ur + p), (n <= p && p <= o || n <= p + ur && p + ur <= o) && (p > Math.PI / 2 && p < 1.5 * Math.PI && (u = -u), c += u)
                }
            }
            return c
        }

        function vr(e, t, i, n, o) {
            for (var a = 0, r = 0, s = 0, l = 0, d = 0, u = 0; u < e.length;) {
                var c = e[u++];
                switch (c === dr.M && 1 < u && (i || (a += lr(r, s, l, d, n, o))), 1 === u && (l = r = e[u], d = s = e[u + 1]), c) {
                    case dr.M:
                        r = l = e[u++], s = d = e[u++];
                        break;
                    case dr.L:
                        if (i) {
                            if (tr(r, s, e[u], e[u + 1], t, n, o)) return !0
                        } else a += lr(r, s, e[u], e[u + 1], n, o) || 0;
                        r = e[u++], s = e[u++];
                        break;
                    case dr.C:
                        if (i) {
                            if (ir(r, s, e[u++], e[u++], e[u++], e[u++], e[u], e[u + 1], t, n, o)) return !0
                        } else a += pr(r, s, e[u++], e[u++], e[u++], e[u++], e[u], e[u + 1], n, o) || 0;
                        r = e[u++], s = e[u++];
                        break;
                    case dr.Q:
                        if (i) {
                            if (nr(r, s, e[u++], e[u++], e[u], e[u + 1], t, n, o)) return !0
                        } else a += gr(r, s, e[u++], e[u++], e[u], e[u + 1], n, o) || 0;
                        r = e[u++], s = e[u++];
                        break;
                    case dr.A:
                        var h = e[u++], f = e[u++], p = e[u++], g = e[u++], m = e[u++], v = e[u++];
                        u += 1;
                        var y = 1 - e[u++], T = Math.cos(m) * p + h, w = Math.sin(m) * g + f;
                        1 < u ? a += lr(r, s, T, w, n, o) : (l = T, d = w);
                        var k = (n - h) * g / p + h;
                        if (i) {
                            if (sr(h, f, g, m, m + v, y, t, k, o)) return !0
                        } else a += mr(h, f, g, m, m + v, y, k, o);
                        r = Math.cos(m + v) * p + h, s = Math.sin(m + v) * g + f;
                        break;
                    case dr.R:
                        if (l = r = e[u++], d = s = e[u++], T = l + e[u++], w = d + e[u++], i) {
                            if (tr(l, d, T, d, t, n, o) || tr(T, d, T, w, t, n, o) || tr(T, w, l, w, t, n, o) || tr(l, w, l, d, t, n, o)) return !0
                        } else a += lr(T, d, T, w, n, o), a += lr(l, w, l, d, n, o);
                        break;
                    case dr.Z:
                        if (i) {
                            if (tr(r, s, l, d, t, n, o)) return !0
                        } else a += lr(r, s, l, d, n, o);
                        r = l, s = d
                }
            }
            return i || function (e, t) {
                return Math.abs(e - t) < cr
            }(s, d) || (a += lr(r, s, l, d, n, o) || 0), 0 !== a
        }

        var yr = Xi.prototype.getCanvasPattern, Tr = Math.abs, wr = new er(!0);

        function kr(e) {
            qn.call(this, e), this.path = null
        }

        function Cr(e) {
            return Math.sqrt(e[0] * e[0] + e[1] * e[1])
        }

        kr.prototype = {
            constructor: kr,
            type: "path",
            __dirtyPath: !0,
            strokeContainThreshold: 5,
            segmentIgnoreThreshold: 0,
            subPixelOptimize: !1,
            brush: function (e, t) {
                var i, n = this.style, o = this.path || wr, a = n.hasStroke(), r = n.hasFill(), s = n.fill,
                    l = n.stroke, d = r && !!s.colorStops, u = a && !!l.colorStops, c = r && !!s.image,
                    h = a && !!l.image;
                n.bind(e, this, t), this.setTransform(e), this.__dirty && (d && (i = i || this.getBoundingRect(), this._fillGradient = n.getGradient(e, s, i)), u && (i = i || this.getBoundingRect(), this._strokeGradient = n.getGradient(e, l, i))), d ? e.fillStyle = this._fillGradient : c && (e.fillStyle = yr.call(s, e)), u ? e.strokeStyle = this._strokeGradient : h && (e.strokeStyle = yr.call(l, e));
                var f = n.lineDash, p = n.lineDashOffset, g = !!e.setLineDash, m = this.getGlobalScale();
                if (o.setScale(m[0], m[1], this.segmentIgnoreThreshold), this.__dirtyPath || f && !g && a ? (o.beginPath(e), f && !g && (o.setLineDash(f), o.setLineDashOffset(p)), this.buildPath(o, this.shape, !1), this.path && (this.__dirtyPath = !1)) : (e.beginPath(), this.path.rebuildPath(e)), r) if (null != n.fillOpacity) {
                    var v = e.globalAlpha;
                    e.globalAlpha = n.fillOpacity * n.opacity, o.fill(e), e.globalAlpha = v
                } else o.fill(e);
                f && g && (e.setLineDash(f), e.lineDashOffset = p), a && (null != n.strokeOpacity ? (v = e.globalAlpha, e.globalAlpha = n.strokeOpacity * n.opacity, o.stroke(e), e.globalAlpha = v) : o.stroke(e)), f && g && e.setLineDash([]), null != n.text && (this.restoreTransform(e), this.drawRectText(e, this.getBoundingRect()))
            },
            buildPath: function (e, t, i) {
            },
            createPathProxy: function () {
                this.path = new er
            },
            getBoundingRect: function () {
                var e = this._rect, t = this.style, i = !e;
                if (i) {
                    var n = this.path;
                    n = n || (this.path = new er), this.__dirtyPath && (n.beginPath(), this.buildPath(n, this.shape, !1)), e = n.getBoundingRect()
                }
                if (this._rect = e, t.hasStroke()) {
                    var o = this._rectWithStroke || (this._rectWithStroke = e.clone());
                    if (this.__dirty || i) {
                        o.copy(e);
                        var a = t.lineWidth, r = t.strokeNoScale ? this.getLineScale() : 1;
                        t.hasFill() || (a = Math.max(a, this.strokeContainThreshold || 4)), 1e-10 < r && (o.width += a / r, o.height += a / r, o.x -= a / r / 2, o.y -= a / r / 2)
                    }
                    return o
                }
                return e
            },
            contain: function (e, t) {
                var i = this.transformCoordToLocal(e, t), n = this.getBoundingRect(), o = this.style;
                if (e = i[0], t = i[1], n.contain(e, t)) {
                    var a = this.path.data;
                    if (o.hasStroke()) {
                        var r = o.lineWidth, s = o.strokeNoScale ? this.getLineScale() : 1;
                        if (1e-10 < s && (o.hasFill() || (r = Math.max(r, this.strokeContainThreshold)), function (e, t, i, n) {
                            return vr(e, t, !0, i, n)
                        }(a, r / s, e, t))) return !0
                    }
                    if (o.hasFill()) return function (e, t, i) {
                        return vr(e, 0, !1, t, i)
                    }(a, e, t)
                }
                return !1
            },
            dirty: function (e) {
                null == e && (e = !0), e && (this.__dirtyPath = e, this._rect = null), this.__dirty = this.__dirtyText = !0, this.__zr && this.__zr.refresh(), this.__clipTarget && this.__clipTarget.dirty()
            },
            animateShape: function (e) {
                return this.animate("shape", e)
            },
            attrKV: function (e, t) {
                "shape" === e ? (this.setShape(t), this.__dirtyPath = !0, this._rect = null) : qn.prototype.attrKV.call(this, e, t)
            },
            setShape: function (e, t) {
                var i = this.shape;
                if (i) {
                    if (R(e)) for (var n in e) e.hasOwnProperty(n) && (i[n] = e[n]); else i[e] = t;
                    this.dirty(!0)
                }
                return this
            },
            getLineScale: function () {
                var e = this.transform;
                return e && 1e-10 < Tr(e[0] - 1) && 1e-10 < Tr(e[3] - 1) ? Math.sqrt(Tr(e[0] * e[3] - e[2] * e[1])) : 1
            }
        }, kr.extend = function (e) {
            function t(t) {
                kr.call(this, t), e.style && this.style.extendFrom(e.style, !1);
                var i = e.shape;
                if (i) {
                    this.shape = this.shape || {};
                    var n = this.shape;
                    for (var o in i) !n.hasOwnProperty(o) && i.hasOwnProperty(o) && (n[o] = i[o])
                }
                e.init && e.init.call(this, t)
            }

            for (var i in I(t, kr), e) "style" !== i && "shape" !== i && (t.prototype[i] = e[i]);
            return t
        }, I(kr, qn);
        var br = er.CMD, Ir = [[], [], []], Sr = Math.sqrt, _r = Math.atan2, Dr = function (e, t) {
            var i, n, o, a, r, s = e.data, l = br.M, d = br.C, u = br.L, c = br.R, h = br.A, f = br.Q;
            for (a = o = 0; o < s.length;) {
                switch (i = s[o++], a = o, n = 0, i) {
                    case l:
                    case u:
                        n = 1;
                        break;
                    case d:
                        n = 3;
                        break;
                    case f:
                        n = 2;
                        break;
                    case h:
                        var p = t[4], g = t[5], m = Sr(t[0] * t[0] + t[1] * t[1]), v = Sr(t[2] * t[2] + t[3] * t[3]),
                            y = _r(-t[1] / v, t[0] / m);
                        s[o] *= m, s[o++] += p, s[o] *= v, s[o++] += g, s[o++] *= m, s[o++] *= v, s[o++] += y, s[o++] += y, a = o += 2;
                        break;
                    case c:
                        T[0] = s[o++], T[1] = s[o++], Ce(T, T, t), s[a++] = T[0], s[a++] = T[1], T[0] += s[o++], T[1] += s[o++], Ce(T, T, t), s[a++] = T[0], s[a++] = T[1]
                }
                for (r = 0; r < n; r++) {
                    var T;
                    (T = Ir[r])[0] = s[o++], T[1] = s[o++], Ce(T, T, t), s[a++] = T[0], s[a++] = T[1]
                }
            }
        }, Ar = Math.sqrt, Nr = Math.sin, xr = Math.cos, Er = Math.PI, Or = function (e, t) {
            return (e[0] * t[0] + e[1] * t[1]) / (Cr(e) * Cr(t))
        }, Pr = function (e, t) {
            return (e[0] * t[1] < e[1] * t[0] ? -1 : 1) * Math.acos(Or(e, t))
        };

        function Mr(e, t, i, n, o, a, r, s, l, d, u) {
            var c = l * (Er / 180), h = xr(c) * (e - i) / 2 + Nr(c) * (t - n) / 2,
                f = -1 * Nr(c) * (e - i) / 2 + xr(c) * (t - n) / 2, p = h * h / (r * r) + f * f / (s * s);
            1 < p && (r *= Ar(p), s *= Ar(p));
            var g = (o === a ? -1 : 1) * Ar((r * r * (s * s) - r * r * (f * f) - s * s * (h * h)) / (r * r * (f * f) + s * s * (h * h))) || 0,
                m = g * r * f / s, v = g * -s * h / r, y = (e + i) / 2 + xr(c) * m - Nr(c) * v,
                T = (t + n) / 2 + Nr(c) * m + xr(c) * v, w = Pr([1, 0], [(h - m) / r, (f - v) / s]),
                k = [(h - m) / r, (f - v) / s], C = [(-1 * h - m) / r, (-1 * f - v) / s], b = Pr(k, C);
            Or(k, C) <= -1 && (b = Er), 1 <= Or(k, C) && (b = 0), 0 === a && 0 < b && (b -= 2 * Er), 1 === a && b < 0 && (b += 2 * Er), u.addData(d, y, T, r, s, w, b, c, a)
        }

        var Fr = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi, Lr = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;

        function Rr(e, t) {
            var i = function (e) {
                if (!e) return new er;
                for (var t, i = 0, n = 0, o = i, a = n, r = new er, s = er.CMD, l = e.match(Fr), d = 0; d < l.length; d++) {
                    for (var u, c = l[d], h = c.charAt(0), f = c.match(Lr) || [], p = f.length, g = 0; g < p; g++) f[g] = parseFloat(f[g]);
                    for (var m = 0; m < p;) {
                        var v, y, T, w, k, C, b, I = i, S = n;
                        switch (h) {
                            case"l":
                                i += f[m++], n += f[m++], u = s.L, r.addData(u, i, n);
                                break;
                            case"L":
                                i = f[m++], n = f[m++], u = s.L, r.addData(u, i, n);
                                break;
                            case"m":
                                i += f[m++], n += f[m++], u = s.M, r.addData(u, i, n), o = i, a = n, h = "l";
                                break;
                            case"M":
                                i = f[m++], n = f[m++], u = s.M, r.addData(u, i, n), o = i, a = n, h = "L";
                                break;
                            case"h":
                                i += f[m++], u = s.L, r.addData(u, i, n);
                                break;
                            case"H":
                                i = f[m++], u = s.L, r.addData(u, i, n);
                                break;
                            case"v":
                                n += f[m++], u = s.L, r.addData(u, i, n);
                                break;
                            case"V":
                                n = f[m++], u = s.L, r.addData(u, i, n);
                                break;
                            case"C":
                                u = s.C, r.addData(u, f[m++], f[m++], f[m++], f[m++], f[m++], f[m++]), i = f[m - 2], n = f[m - 1];
                                break;
                            case"c":
                                u = s.C, r.addData(u, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n), i += f[m - 2], n += f[m - 1];
                                break;
                            case"S":
                                v = i, y = n;
                                var _ = r.len(), D = r.data;
                                t === s.C && (v += i - D[_ - 4], y += n - D[_ - 3]), u = s.C, I = f[m++], S = f[m++], i = f[m++], n = f[m++], r.addData(u, v, y, I, S, i, n);
                                break;
                            case"s":
                                v = i, y = n, _ = r.len(), D = r.data, t === s.C && (v += i - D[_ - 4], y += n - D[_ - 3]), u = s.C, I = i + f[m++], S = n + f[m++], i += f[m++], n += f[m++], r.addData(u, v, y, I, S, i, n);
                                break;
                            case"Q":
                                I = f[m++], S = f[m++], i = f[m++], n = f[m++], u = s.Q, r.addData(u, I, S, i, n);
                                break;
                            case"q":
                                I = f[m++] + i, S = f[m++] + n, i += f[m++], n += f[m++], u = s.Q, r.addData(u, I, S, i, n);
                                break;
                            case"T":
                                v = i, y = n, _ = r.len(), D = r.data, t === s.Q && (v += i - D[_ - 4], y += n - D[_ - 3]), i = f[m++], n = f[m++], u = s.Q, r.addData(u, v, y, i, n);
                                break;
                            case"t":
                                v = i, y = n, _ = r.len(), D = r.data, t === s.Q && (v += i - D[_ - 4], y += n - D[_ - 3]), i += f[m++], n += f[m++], u = s.Q, r.addData(u, v, y, i, n);
                                break;
                            case"A":
                                T = f[m++], w = f[m++], k = f[m++], C = f[m++], b = f[m++], Mr(I = i, S = n, i = f[m++], n = f[m++], C, b, T, w, k, u = s.A, r);
                                break;
                            case"a":
                                T = f[m++], w = f[m++], k = f[m++], C = f[m++], b = f[m++], Mr(I = i, S = n, i += f[m++], n += f[m++], C, b, T, w, k, u = s.A, r)
                        }
                    }
                    "z" !== h && "Z" !== h || (u = s.Z, r.addData(u), i = o, n = a), t = u
                }
                return r.toStatic(), r
            }(e);
            return (t = t || {}).buildPath = function (e) {
                if (e.setData) e.setData(i.data), (t = e.getContext()) && e.rebuildPath(t); else {
                    var t = e;
                    i.rebuildPath(t)
                }
            }, t.applyTransform = function (e) {
                Dr(i, e), this.dirty(!0)
            }, t
        }

        function Br(e, t) {
            return new kr(Rr(e, t))
        }

        var Ur = function (e) {
            qn.call(this, e)
        };

        function Vr(e) {
            return o.browser.ie && 11 <= o.browser.version ? function () {
                var t, i = this.__clipPaths, n = this.style;
                if (i) for (var o = 0; o < i.length; o++) {
                    var a = i[o], r = a && a.shape, s = a && a.type;
                    if (r && ("sector" === s && r.startAngle === r.endAngle || "rect" === s && (!r.width || !r.height))) {
                        for (var l = 0; l < Gr.length; l++) Gr[l][2] = n[Gr[l][0]], n[Gr[l][0]] = Gr[l][1];
                        t = !0;
                        break
                    }
                }
                if (e.apply(this, arguments), t) for (l = 0; l < Gr.length; l++) n[Gr[l][0]] = Gr[l][2]
            } : e
        }

        Ur.prototype = {
            constructor: Ur, type: "text", brush: function (e, t) {
                var i = this.style;
                this.__dirty && En(i), i.fill = i.stroke = i.shadowBlur = i.shadowColor = i.shadowOffsetX = i.shadowOffsetY = null;
                var n = i.text;
                null != n && (n += ""), Hn(n, i) ? (this.setTransform(e), Pn(this, e, n, i, null, t), this.restoreTransform(e)) : e.__attrCachedBy = Vi.NONE
            }, getBoundingRect: function () {
                var e = this.style;
                if (this.__dirty && En(e), !this._rect) {
                    var t = e.text;
                    null != t ? t += "" : t = "";
                    var i = cn(e.text + "", e.font, e.textAlign, e.textVerticalAlign, e.textPadding, e.textLineHeight, e.rich);
                    if (i.x += e.x || 0, i.y += e.y || 0, Kn(e.textStroke, e.textStrokeWidth)) {
                        var n = e.textStrokeWidth;
                        i.x -= n / 2, i.y -= n / 2, i.width += n, i.height += n
                    }
                    this._rect = i
                }
                return this._rect
            }
        }, I(Ur, qn);
        var Kr = kr.extend({
                type: "circle", shape: {cx: 0, cy: 0, r: 0}, buildPath: function (e, t, i) {
                    i && e.moveTo(t.cx + t.r, t.cy), e.arc(t.cx, t.cy, t.r, 0, 2 * Math.PI, !0)
                }
            }), Gr = [["shadowBlur", 0], ["shadowColor", "#000"], ["shadowOffsetX", 0], ["shadowOffsetY", 0]],
            Wr = kr.extend({
                type: "sector",
                shape: {cx: 0, cy: 0, r0: 0, r: 0, startAngle: 0, endAngle: 2 * Math.PI, clockwise: !0},
                brush: Vr(kr.prototype.brush),
                buildPath: function (e, t) {
                    var i = t.cx, n = t.cy, o = Math.max(t.r0 || 0, 0), a = Math.max(t.r, 0), r = t.startAngle,
                        s = t.endAngle, l = t.clockwise, d = Math.cos(r), u = Math.sin(r);
                    e.moveTo(d * o + i, u * o + n), e.lineTo(d * a + i, u * a + n), e.arc(i, n, a, r, s, !l), e.lineTo(Math.cos(s) * o + i, Math.sin(s) * o + n), 0 !== o && e.arc(i, n, o, s, r, l), e.closePath()
                }
            }), jr = kr.extend({
                type: "ring", shape: {cx: 0, cy: 0, r: 0, r0: 0}, buildPath: function (e, t) {
                    var i = t.cx, n = t.cy, o = 2 * Math.PI;
                    e.moveTo(i + t.r, n), e.arc(i, n, t.r, 0, o, !1), e.moveTo(i + t.r0, n), e.arc(i, n, t.r0, 0, o, !0)
                }
            });

        function Hr(e, t, i, n, o, a, r) {
            var s = .5 * (i - e), l = .5 * (n - t);
            return (2 * (t - i) + s + l) * r + (-3 * (t - i) - 2 * s - l) * a + s * o + t
        }

        function zr(e, t, i) {
            var n = t.points, o = t.smooth;
            if (n && 2 <= n.length) {
                if (o && "spline" !== o) {
                    var a = function (e, t, i, n) {
                        var o, a, r, s, l = [], d = [], u = [], c = [];
                        if (n) {
                            r = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0];
                            for (var h = 0, f = e.length; h < f; h++) be(r, r, e[h]), Ie(s, s, e[h]);
                            be(r, r, n[0]), Ie(s, s, n[1])
                        }
                        for (h = 0, f = e.length; h < f; h++) {
                            var p = e[h];
                            if (i) o = e[h ? h - 1 : f - 1], a = e[(h + 1) % f]; else {
                                if (0 === h || h === f - 1) {
                                    l.push(re(e[h]));
                                    continue
                                }
                                o = e[h - 1], a = e[h + 1]
                            }
                            ue(d, a, o), ge(d, d, t);
                            var g = ve(p, o), m = ve(p, a), v = g + m;
                            0 !== v && (g /= v, m /= v), ge(u, d, -g), ge(c, d, m);
                            var y = le([], p, u), T = le([], p, c);
                            n && (Ie(y, y, r), be(y, y, s), Ie(T, T, r), be(T, T, s)), l.push(y), l.push(T)
                        }
                        return i && l.push(l.shift()), l
                    }(n, o, i, t.smoothConstraint);
                    e.moveTo(n[0][0], n[0][1]);
                    for (var r = n.length, s = 0; s < (i ? r : r - 1); s++) {
                        var l = a[2 * s], d = a[2 * s + 1], u = n[(s + 1) % r];
                        e.bezierCurveTo(l[0], l[1], d[0], d[1], u[0], u[1])
                    }
                } else {
                    "spline" === o && (n = function (e, t) {
                        for (var i = e.length, n = [], o = 0, a = 1; a < i; a++) o += ve(e[a - 1], e[a]);
                        var r = o / 2;
                        for (r = r < i ? i : r, a = 0; a < r; a++) {
                            var s, l, d, u = a / (r - 1) * (t ? i : i - 1), c = Math.floor(u), h = u - c, f = e[c % i];
                            d = t ? (s = e[(c - 1 + i) % i], l = e[(c + 1) % i], e[(c + 2) % i]) : (s = e[0 === c ? c : c - 1], l = e[i - 2 < c ? i - 1 : c + 1], e[i - 3 < c ? i - 1 : c + 2]);
                            var p = h * h, g = h * p;
                            n.push([Hr(s[0], f[0], l[0], d[0], h, p, g), Hr(s[1], f[1], l[1], d[1], h, p, g)])
                        }
                        return n
                    }(n, i)), e.moveTo(n[0][0], n[0][1]), s = 1;
                    for (var c = n.length; s < c; s++) e.lineTo(n[s][0], n[s][1])
                }
                i && e.closePath()
            }
        }

        var Xr = kr.extend({
            type: "polygon",
            shape: {points: null, smooth: !1, smoothConstraint: null},
            buildPath: function (e, t) {
                zr(e, t, !0)
            }
        }), qr = kr.extend({
            type: "polyline",
            shape: {points: null, smooth: !1, smoothConstraint: null},
            style: {stroke: "#000", fill: null},
            buildPath: function (e, t) {
                zr(e, t, !1)
            }
        }), Yr = Math.round;

        function Jr(e, t, i) {
            if (t) {
                var n = t.x1, o = t.x2, a = t.y1, r = t.y2;
                e.x1 = n, e.x2 = o, e.y1 = a, e.y2 = r;
                var s = i && i.lineWidth;
                s && (Yr(2 * n) === Yr(2 * o) && (e.x1 = e.x2 = Qr(n, s, !0)), Yr(2 * a) === Yr(2 * r) && (e.y1 = e.y2 = Qr(a, s, !0)))
            }
        }

        function Zr(e, t, i) {
            if (t) {
                var n = t.x, o = t.y, a = t.width, r = t.height;
                e.x = n, e.y = o, e.width = a, e.height = r;
                var s = i && i.lineWidth;
                s && (e.x = Qr(n, s, !0), e.y = Qr(o, s, !0), e.width = Math.max(Qr(n + a, s, !1) - e.x, 0 === a ? 0 : 1), e.height = Math.max(Qr(o + r, s, !1) - e.y, 0 === r ? 0 : 1))
            }
        }

        function Qr(e, t, i) {
            if (!t) return e;
            var n = Yr(2 * e);
            return (n + Yr(t)) % 2 == 0 ? n / 2 : (n + (i ? 1 : -1)) / 2
        }

        var $r = {}, es = kr.extend({
            type: "rect", shape: {r: 0, x: 0, y: 0, width: 0, height: 0}, buildPath: function (e, t) {
                var i, n, o, a;
                this.subPixelOptimize ? (Zr($r, t, this.style), i = $r.x, n = $r.y, o = $r.width, a = $r.height, $r.r = t.r, t = $r) : (i = t.x, n = t.y, o = t.width, a = t.height), t.r ? In(e, t) : e.rect(i, n, o, a), e.closePath()
            }
        }), ts = {}, is = kr.extend({
            type: "line",
            shape: {x1: 0, y1: 0, x2: 0, y2: 0, percent: 1},
            style: {stroke: "#000", fill: null},
            buildPath: function (e, t) {
                var i, n, o, a;
                a = this.subPixelOptimize ? (Jr(ts, t, this.style), i = ts.x1, n = ts.y1, o = ts.x2, ts.y2) : (i = t.x1, n = t.y1, o = t.x2, t.y2);
                var r = t.percent;
                0 !== r && (e.moveTo(i, n), r < 1 && (o = i * (1 - r) + o * r, a = n * (1 - r) + a * r), e.lineTo(o, a))
            },
            pointAt: function (e) {
                var t = this.shape;
                return [t.x1 * (1 - e) + t.x2 * e, t.y1 * (1 - e) + t.y2 * e]
            }
        }), ns = [];

        function os(e, t, i) {
            var n = e.cpx2, o = e.cpy2;
            return null === n || null === o ? [(i ? ka : wa)(e.x1, e.cpx1, e.cpx2, e.x2, t), (i ? ka : wa)(e.y1, e.cpy1, e.cpy2, e.y2, t)] : [(i ? Sa : Ia)(e.x1, e.cpx1, e.x2, t), (i ? Sa : Ia)(e.y1, e.cpy1, e.y2, t)]
        }

        function as(e) {
            this.colorStops = e || []
        }

        var rs = kr.extend({
            type: "bezier-curve",
            shape: {x1: 0, y1: 0, x2: 0, y2: 0, cpx1: 0, cpy1: 0, percent: 1},
            style: {stroke: "#000", fill: null},
            buildPath: function (e, t) {
                var i = t.x1, n = t.y1, o = t.x2, a = t.y2, r = t.cpx1, s = t.cpy1, l = t.cpx2, d = t.cpy2,
                    u = t.percent;
                0 !== u && (e.moveTo(i, n), null == l || null == d ? (u < 1 && (Da(i, r, o, u, ns), r = ns[1], o = ns[2], Da(n, s, a, u, ns), s = ns[1], a = ns[2]), e.quadraticCurveTo(r, s, o, a)) : (u < 1 && (ba(i, r, l, o, u, ns), r = ns[1], l = ns[2], o = ns[3], ba(n, s, d, a, u, ns), s = ns[1], d = ns[2], a = ns[3]), e.bezierCurveTo(r, s, l, d, o, a)))
            },
            pointAt: function (e) {
                return os(this.shape, e, !1)
            },
            tangentAt: function (e) {
                var t = os(this.shape, e, !0);
                return me(t, t)
            }
        }), ss = kr.extend({
            type: "arc",
            shape: {cx: 0, cy: 0, r: 0, startAngle: 0, endAngle: 2 * Math.PI, clockwise: !0},
            style: {stroke: "#000", fill: null},
            buildPath: function (e, t) {
                var i = t.cx, n = t.cy, o = Math.max(t.r, 0), a = t.startAngle, r = t.endAngle, s = t.clockwise,
                    l = Math.cos(a), d = Math.sin(a);
                e.moveTo(l * o + i, d * o + n), e.arc(i, n, o, a, r, !s)
            }
        }), ls = kr.extend({
            type: "compound", shape: {paths: null}, _updatePathDirty: function () {
                for (var e = this.__dirtyPath, t = this.shape.paths, i = 0; i < t.length; i++) e = e || t[i].__dirtyPath;
                this.__dirtyPath = e, this.__dirty = this.__dirty || e
            }, beforeBrush: function () {
                this._updatePathDirty();
                for (var e = this.shape.paths || [], t = this.getGlobalScale(), i = 0; i < e.length; i++) e[i].path || e[i].createPathProxy(), e[i].path.setScale(t[0], t[1], e[i].segmentIgnoreThreshold)
            }, buildPath: function (e, t) {
                for (var i = t.paths || [], n = 0; n < i.length; n++) i[n].buildPath(e, i[n].shape, !0)
            }, afterBrush: function () {
                for (var e = this.shape.paths || [], t = 0; t < e.length; t++) e[t].__dirtyPath = !1
            }, getBoundingRect: function () {
                return this._updatePathDirty(), kr.prototype.getBoundingRect.call(this)
            }
        });

        function ds(e, t, i, n, o, a) {
            this.x = null == e ? 0 : e, this.y = null == t ? 0 : t, this.x2 = null == i ? 1 : i, this.y2 = null == n ? 0 : n, this.type = "linear", this.global = a || !1, as.call(this, o)
        }

        function us(e, t, i, n, o) {
            this.x = null == e ? .5 : e, this.y = null == t ? .5 : t, this.r = null == i ? .5 : i, this.type = "radial", this.global = o || !1, as.call(this, n)
        }

        function cs(e) {
            qn.call(this, e), this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.notClear = !0
        }

        as.prototype = {
            constructor: as, addColorStop: function (e, t) {
                this.colorStops.push({offset: e, color: t})
            }
        }, ds.prototype = {constructor: ds}, I(ds, as), us.prototype = {constructor: us}, I(us, as), cs.prototype.incremental = !0, cs.prototype.clearDisplaybles = function () {
            this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.dirty(), this.notClear = !1
        }, cs.prototype.addDisplayable = function (e, t) {
            t ? this._temporaryDisplayables.push(e) : this._displayables.push(e), this.dirty()
        }, cs.prototype.addDisplayables = function (e, t) {
            t = t || !1;
            for (var i = 0; i < e.length; i++) this.addDisplayable(e[i], t)
        }, cs.prototype.eachPendingDisplayable = function (e) {
            for (var t = this._cursor; t < this._displayables.length; t++) e && e(this._displayables[t]);
            for (t = 0; t < this._temporaryDisplayables.length; t++) e && e(this._temporaryDisplayables[t])
        }, cs.prototype.update = function () {
            this.updateTransform();
            for (var e = this._cursor; e < this._displayables.length; e++) (t = this._displayables[e]).parent = this, t.update(), t.parent = null;
            for (e = 0; e < this._temporaryDisplayables.length; e++) {
                var t;
                (t = this._temporaryDisplayables[e]).parent = this, t.update(), t.parent = null
            }
        }, cs.prototype.brush = function (e, t) {
            for (var i = this._cursor; i < this._displayables.length; i++) (n = this._displayables[i]).beforeBrush && n.beforeBrush(e), n.brush(e, i === this._cursor ? null : this._displayables[i - 1]), n.afterBrush && n.afterBrush(e);
            for (this._cursor = i, i = 0; i < this._temporaryDisplayables.length; i++) {
                var n;
                (n = this._temporaryDisplayables[i]).beforeBrush && n.beforeBrush(e), n.brush(e, 0 === i ? null : this._temporaryDisplayables[i - 1]), n.afterBrush && n.afterBrush(e)
            }
            this._temporaryDisplayables = [], this.notClear = !0
        };
        var hs = [];
        cs.prototype.getBoundingRect = function () {
            if (!this._rect) {
                for (var e = new Di(1 / 0, 1 / 0, -1 / 0, -1 / 0), t = 0; t < this._displayables.length; t++) {
                    var i = this._displayables[t], n = i.getBoundingRect().clone();
                    i.needLocalTransform() && n.applyTransform(i.getLocalTransform(hs)), e.union(n)
                }
                this._rect = e
            }
            return this._rect
        }, cs.prototype.contain = function (e, t) {
            var i = this.transformCoordToLocal(e, t);
            if (this.getBoundingRect().contain(i[0], i[1])) for (var n = 0; n < this._displayables.length; n++) if (this._displayables[n].contain(e, t)) return !0;
            return !1
        }, I(cs, qn);
        var fs = Math.max, ps = Math.min, gs = {}, ms = 1,
            vs = {color: "textFill", textBorderColor: "textStroke", textBorderWidth: "textStrokeWidth"},
            ys = "emphasis", Ts = "normal", ws = 1, ks = {}, Cs = {};

        function bs(e) {
            return kr.extend(e)
        }

        function Is(e, t) {
            Cs[e] = t
        }

        function Ss(e) {
            if (Cs.hasOwnProperty(e)) return Cs[e]
        }

        function _s(e, t, i, n) {
            var o = Br(e, t);
            return i && ("center" === n && (i = As(i, o.getBoundingRect())), xs(o, i)), o
        }

        function Ds(e, t, i) {
            var n = new Yn({
                style: {image: e, x: t.x, y: t.y, width: t.width, height: t.height}, onload: function (e) {
                    if ("center" === i) {
                        var o = {width: e.width, height: e.height};
                        n.setStyle(As(t, o))
                    }
                }
            });
            return n
        }

        function As(e, t) {
            var i, n = t.width / t.height, o = e.height * n;
            return i = o <= e.width ? e.height : (o = e.width) / n, {
                x: e.x + e.width / 2 - o / 2,
                y: e.y + e.height / 2 - i / 2,
                width: o,
                height: i
            }
        }

        var Ns = function (e, t) {
            for (var i = [], n = e.length, o = 0; o < n; o++) {
                var a = e[o];
                a.path || a.createPathProxy(), a.__dirtyPath && a.buildPath(a.path, a.shape, !0), i.push(a.path)
            }
            var r = new kr(t);
            return r.createPathProxy(), r.buildPath = function (e) {
                e.appendPath(i);
                var t = e.getContext();
                t && e.rebuildPath(t)
            }, r
        };

        function xs(e, t) {
            if (e.applyTransform) {
                var i = e.getBoundingRect().calculateTransform(t);
                e.applyTransform(i)
            }
        }

        var Es = Qr;

        function Os(e) {
            return null != e && "none" !== e
        }

        var Ps = $(), Ms = 0;

        function Fs(e) {
            var t = e.__hoverStl;
            if (t && !e.__highlighted) {
                var i = e.__zr, n = e.useHoverLayer && i && "canvas" === i.painter.type;
                if (e.__highlighted = n ? "layer" : "plain", !(e.isGroup || !i && e.useHoverLayer)) {
                    var o = e, a = e.style;
                    n && (a = (o = i.addHover(e)).style), il(a), n || function (e) {
                        if (e.__hoverStlDirty) {
                            e.__hoverStlDirty = !1;
                            var t = e.__hoverStl;
                            if (t) {
                                var i = e.__cachedNormalStl = {};
                                e.__cachedNormalZ2 = e.z2;
                                var n = e.style;
                                for (var o in t) null != t[o] && (i[o] = n[o]);
                                i.fill = n.fill, i.stroke = n.stroke
                            } else e.__cachedNormalStl = e.__cachedNormalZ2 = null
                        }
                    }(o), a.extendFrom(t), Ls(a, t, "fill"), Ls(a, t, "stroke"), tl(a), n || (e.dirty(!1), e.z2 += ms)
                }
            }
        }

        function Ls(e, t, i) {
            !Os(t[i]) && Os(e[i]) && (e[i] = function (e) {
                if ("string" != typeof e) return e;
                var t = Ps.get(e);
                return t || (t = Wt(e, -.1), Ms < 1e4 && (Ps.set(e, t), Ms++)), t
            }(e[i]))
        }

        function Rs(e) {
            var t = e.__highlighted;
            if (t && (e.__highlighted = !1, !e.isGroup)) if ("layer" === t) e.__zr && e.__zr.removeHover(e); else {
                var i = e.style, n = e.__cachedNormalStl;
                n && (il(i), e.setStyle(n), tl(i));
                var o = e.__cachedNormalZ2;
                null != o && e.z2 - o === ms && (e.z2 = o)
            }
        }

        function Bs(e, t, i) {
            var n, o = Ts, a = Ts;
            e.__highlighted && (o = ys, n = !0), t(e, i), e.__highlighted && (a = ys, n = !0), e.isGroup && e.traverse(function (e) {
                e.isGroup || t(e, i)
            }), n && e.__highDownOnUpdate && e.__highDownOnUpdate(o, a)
        }

        function Us(e, t) {
            t = e.__hoverStl = !1 !== t && (e.hoverStyle || t || {}), e.__hoverStlDirty = !0, e.__highlighted && (e.__cachedNormalStl = null, Rs(e), Fs(e))
        }

        function Vs(e) {
            js(this, e) || this.__highByOuter || Bs(this, Fs)
        }

        function Ks(e) {
            js(this, e) || this.__highByOuter || Bs(this, Rs)
        }

        function Gs(e) {
            this.__highByOuter |= 1 << (e || 0), Bs(this, Fs)
        }

        function Ws(e) {
            (this.__highByOuter &= ~(1 << (e || 0))) || Bs(this, Rs)
        }

        function js(e, t) {
            return e.__highDownSilentOnTouch && t.zrByTouch
        }

        function Hs(e, t) {
            zs(e, !0), Bs(e, Us, t)
        }

        function zs(e, t) {
            var i = !1 === t;
            if (e.__highDownSilentOnTouch = e.highDownSilentOnTouch, e.__highDownOnUpdate = e.highDownOnUpdate, !i || e.__highDownDispatcher) {
                var n = i ? "off" : "on";
                e[n]("mouseover", Vs)[n]("mouseout", Ks), e[n]("emphasis", Gs)[n]("normal", Ws), e.__highByOuter = e.__highByOuter || 0, e.__highDownDispatcher = !i
            }
        }

        function Xs(e) {
            return !(!e || !e.__highDownDispatcher)
        }

        function qs(e) {
            var t = ks[e];
            return null == t && ws <= 32 && (t = ks[e] = ws++), t
        }

        function Ys(e, t, i, n, o, a, r) {
            var s, l = (o = o || gs).labelFetcher, d = o.labelDataIndex, u = o.labelDimIndex, c = o.labelProp,
                h = i.getShallow("show"), f = n.getShallow("show");
            (h || f) && (l && (s = l.getFormattedLabel(d, "normal", null, u, c)), null == s && (s = F(o.defaultText) ? o.defaultText(d, o) : o.defaultText));
            var p = h ? s : null, g = f ? W(l ? l.getFormattedLabel(d, "emphasis", null, u, c) : null, s) : null;
            null == p && null == g || (Zs(e, i, a, o), Zs(t, n, r, o, !0)), e.text = p, t.text = g
        }

        function Js(e, t, i) {
            var n = e.style;
            t && (il(n), e.setStyle(t), tl(n)), n = e.__hoverStl, i && n && (il(n), T(n, i), tl(n))
        }

        function Zs(e, t, i, n, o) {
            return Qs(e, t, n, o), i && T(e, i), e
        }

        function Qs(e, t, i, n) {
            if ((i = i || gs).isRectText) {
                var o;
                i.getTextPosition ? o = i.getTextPosition(t, n) : "outside" === (o = t.getShallow("position") || (n ? null : "inside")) && (o = "top"), e.textPosition = o, e.textOffset = t.getShallow("offset");
                var a = t.getShallow("rotate");
                null != a && (a *= Math.PI / 180), e.textRotation = a, e.textDistance = W(t.getShallow("distance"), n ? null : 5)
            }
            var r, s = t.ecModel, l = s && s.option.textStyle, d = function (e) {
                for (var t; e && e !== e.ecModel;) {
                    var i = (e.option || gs).rich;
                    if (i) for (var n in t = t || {}, i) i.hasOwnProperty(n) && (t[n] = 1);
                    e = e.parentModel
                }
                return t
            }(t);
            if (d) for (var u in r = {}, d) if (d.hasOwnProperty(u)) {
                var c = t.getModel(["rich", u]);
                $s(r[u] = {}, c, l, i, n)
            }
            return e.rich = r, $s(e, t, l, i, n, !0), i.forceRich && !i.textStyle && (i.textStyle = {}), e
        }

        function $s(e, t, i, n, o, a) {
            i = !o && i || gs, e.textFill = el(t.getShallow("color"), n) || i.color, e.textStroke = el(t.getShallow("textBorderColor"), n) || i.textBorderColor, e.textStrokeWidth = W(t.getShallow("textBorderWidth"), i.textBorderWidth), o || (a && (e.insideRollbackOpt = n, tl(e)), null == e.textFill && (e.textFill = n.autoColor)), e.fontStyle = t.getShallow("fontStyle") || i.fontStyle, e.fontWeight = t.getShallow("fontWeight") || i.fontWeight, e.fontSize = t.getShallow("fontSize") || i.fontSize, e.fontFamily = t.getShallow("fontFamily") || i.fontFamily, e.textAlign = t.getShallow("align"), e.textVerticalAlign = t.getShallow("verticalAlign") || t.getShallow("baseline"), e.textLineHeight = t.getShallow("lineHeight"), e.textWidth = t.getShallow("width"), e.textHeight = t.getShallow("height"), e.textTag = t.getShallow("tag"), a && n.disableBox || (e.textBackgroundColor = el(t.getShallow("backgroundColor"), n), e.textPadding = t.getShallow("padding"), e.textBorderColor = el(t.getShallow("borderColor"), n), e.textBorderWidth = t.getShallow("borderWidth"), e.textBorderRadius = t.getShallow("borderRadius"), e.textBoxShadowColor = t.getShallow("shadowColor"), e.textBoxShadowBlur = t.getShallow("shadowBlur"), e.textBoxShadowOffsetX = t.getShallow("shadowOffsetX"), e.textBoxShadowOffsetY = t.getShallow("shadowOffsetY")), e.textShadowColor = t.getShallow("textShadowColor") || i.textShadowColor, e.textShadowBlur = t.getShallow("textShadowBlur") || i.textShadowBlur, e.textShadowOffsetX = t.getShallow("textShadowOffsetX") || i.textShadowOffsetX, e.textShadowOffsetY = t.getShallow("textShadowOffsetY") || i.textShadowOffsetY
        }

        function el(e, t) {
            return "auto" !== e ? e : t && t.autoColor ? t.autoColor : null
        }

        function tl(e) {
            var t, i = e.textPosition, n = e.insideRollbackOpt;
            if (n && null == e.textFill) {
                var o = n.autoColor, a = n.isRectText, r = n.useInsideStyle,
                    s = !1 !== r && (!0 === r || a && i && "string" == typeof i && 0 <= i.indexOf("inside")),
                    l = !s && null != o;
                (s || l) && (t = {
                    textFill: e.textFill,
                    textStroke: e.textStroke,
                    textStrokeWidth: e.textStrokeWidth
                }), s && (e.textFill = "#fff", null == e.textStroke && (e.textStroke = o, null == e.textStrokeWidth && (e.textStrokeWidth = 2))), l && (e.textFill = o)
            }
            e.insideRollback = t
        }

        function il(e) {
            var t = e.insideRollback;
            t && (e.textFill = t.textFill, e.textStroke = t.textStroke, e.textStrokeWidth = t.textStrokeWidth, e.insideRollback = null)
        }

        function nl(e, t) {
            var i = t && t.getModel("textStyle");
            return q([e.fontStyle || i && i.getShallow("fontStyle") || "", e.fontWeight || i && i.getShallow("fontWeight") || "", (e.fontSize || i && i.getShallow("fontSize") || 12) + "px", e.fontFamily || i && i.getShallow("fontFamily") || "sans-serif"].join(" "))
        }

        function ol(e, t, i, n, o, a) {
            if ("function" == typeof o && (a = o, o = null), n && n.isAnimationEnabled()) {
                var r = e ? "Update" : "", s = n.getShallow("animationDuration" + r),
                    l = n.getShallow("animationEasing" + r), d = n.getShallow("animationDelay" + r);
                "function" == typeof d && (d = d(o, n.getAnimationDelayParams ? n.getAnimationDelayParams(t, o) : null)), "function" == typeof s && (s = s(o)), 0 < s ? t.animateTo(i, s, d || 0, l, a, !!a) : (t.stopAnimation(), t.attr(i), a && a())
            } else t.stopAnimation(), t.attr(i), a && a()
        }

        function al(e, t, i, n, o) {
            ol(!0, e, t, i, n, o)
        }

        function rl(e, t, i, n, o) {
            ol(!1, e, t, i, n, o)
        }

        function sl(e, t) {
            for (var i = rt([]); e && e !== t;) lt(i, e.getLocalTransform(), i), e = e.parent;
            return i
        }

        function ll(e, t, i) {
            return t && !_(t) && (t = vt.getLocalTransform(t)), i && (t = ht([], t)), Ce([], e, t)
        }

        function dl(e, t, i) {
            var n = 0 === t[4] || 0 === t[5] || 0 === t[0] ? 1 : Math.abs(2 * t[4] / t[0]),
                o = 0 === t[4] || 0 === t[5] || 0 === t[2] ? 1 : Math.abs(2 * t[4] / t[2]),
                a = ["left" === e ? -n : "right" === e ? n : 0, "top" === e ? -o : "bottom" === e ? o : 0];
            return a = ll(a, t, i), Math.abs(a[0]) > Math.abs(a[1]) ? 0 < a[0] ? "right" : "left" : 0 < a[1] ? "bottom" : "top"
        }

        function ul(e, t, i, n) {
            if (e && t) {
                var o, a = (o = {}, e.traverse(function (e) {
                    !e.isGroup && e.anid && (o[e.anid] = e)
                }), o);
                t.traverse(function (e) {
                    if (!e.isGroup && e.anid) {
                        var t = a[e.anid];
                        if (t) {
                            var n = r(e);
                            e.attr(r(t)), al(e, n, i, e.dataIndex)
                        }
                    }
                })
            }

            function r(e) {
                var t = {position: re(e.position), rotation: e.rotation};
                return e.shape && (t.shape = T({}, e.shape)), t
            }
        }

        function cl(e, t) {
            return A(e, function (e) {
                var i = e[0];
                i = fs(i, t.x), i = ps(i, t.x + t.width);
                var n = e[1];
                return n = fs(n, t.y), [i, n = ps(n, t.y + t.height)]
            })
        }

        function hl(e, t, i) {
            var n = (t = T({rectHover: !0}, t)).style = {strokeNoScale: !0};
            if (i = i || {
                x: -1,
                y: -1,
                width: 2,
                height: 2
            }, e) return 0 === e.indexOf("image://") ? (n.image = e.slice(8), w(n, i), new Yn(t)) : _s(e.replace("path://", ""), t, i, "center")
        }

        function fl(e, t, i, n, o) {
            for (var a = 0, r = o[o.length - 1]; a < o.length; a++) {
                var s = o[a];
                if (pl(e, t, i, n, s[0], s[1], r[0], r[1])) return !0;
                r = s
            }
        }

        function pl(e, t, i, n, o, a, r, s) {
            var l = i - e, d = n - t, u = r - o, c = s - a, h = gl(u, c, l, d);
            var f = e - o, p = t - a, g = gl(f, p, l, d) / h;
            if (g < 0 || 1 < g) return !1;
            var m = gl(f, p, u, c) / h;
            return !(m < 0 || 1 < m)
        }

        function gl(e, t, i, n) {
            return e * n - i * t
        }

        Is("circle", Kr), Is("sector", Wr), Is("ring", jr), Is("polygon", Xr), Is("polyline", qr), Is("rect", es), Is("line", is), Is("bezierCurve", rs), Is("arc", ss);
        var ml = (Object.freeze || Object)({
                Z2_EMPHASIS_LIFT: ms,
                CACHED_LABEL_STYLE_PROPERTIES: vs,
                extendShape: bs,
                extendPath: function (e, t) {
                    return function (e, t) {
                        return kr.extend(Rr(e, t))
                    }(e, t)
                },
                registerShape: Is,
                getShapeClass: Ss,
                makePath: _s,
                makeImage: Ds,
                mergePath: Ns,
                resizePath: xs,
                subPixelOptimizeLine: function (e) {
                    return Jr(e.shape, e.shape, e.style), e
                },
                subPixelOptimizeRect: function (e) {
                    return Zr(e.shape, e.shape, e.style), e
                },
                subPixelOptimize: Es,
                setElementHoverStyle: Us,
                setHoverStyle: Hs,
                setAsHighDownDispatcher: zs,
                isHighDownDispatcher: Xs,
                getHighlightDigit: qs,
                setLabelStyle: Ys,
                modifyLabelStyle: Js,
                setTextStyle: Zs,
                setText: function (e, t, i) {
                    var n, o = {isRectText: !0};
                    !1 === i ? n = !0 : o.autoColor = i, Qs(e, t, o, n)
                },
                getFont: nl,
                updateProps: al,
                initProps: rl,
                getTransform: sl,
                applyTransform: ll,
                transformDirection: dl,
                groupTransition: ul,
                clipPointsByRect: cl,
                clipRectByRect: function (e, t) {
                    var i = fs(e.x, t.x), n = ps(e.x + e.width, t.x + t.width), o = fs(e.y, t.y),
                        a = ps(e.y + e.height, t.y + t.height);
                    if (i <= n && o <= a) return {x: i, y: o, width: n - i, height: a - o}
                },
                createIcon: hl,
                linePolygonIntersect: fl,
                lineLineIntersect: pl,
                Group: Ai,
                Image: Yn,
                Text: Ur,
                Circle: Kr,
                Sector: Wr,
                Ring: jr,
                Polygon: Xr,
                Polyline: qr,
                Rect: es,
                Line: is,
                BezierCurve: rs,
                Arc: ss,
                IncrementalDisplayable: cs,
                CompoundPath: ls,
                LinearGradient: ds,
                RadialGradient: us,
                BoundingRect: Di
            }), vl = ["textStyle", "color"], yl = {
                getTextColor: function (e) {
                    var t = this.ecModel;
                    return this.getShallow("color") || (!e && t ? t.get(vl) : null)
                }, getFont: function () {
                    return nl({
                        fontStyle: this.getShallow("fontStyle"),
                        fontWeight: this.getShallow("fontWeight"),
                        fontSize: this.getShallow("fontSize"),
                        fontFamily: this.getShallow("fontFamily")
                    }, this.ecModel)
                }, getTextRect: function (e) {
                    return cn(e, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow("baseline"), this.getShallow("padding"), this.getShallow("lineHeight"), this.getShallow("rich"), this.getShallow("truncateText"))
                }
            },
            Tl = oa([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]]),
            wl = {
                getItemStyle: function (e, t) {
                    var i = Tl(this, e, t), n = this.getBorderLineDash();
                    return n && (i.lineDash = n), i
                }, getBorderLineDash: function () {
                    var e = this.get("borderType");
                    return "solid" === e || null == e ? null : "dashed" === e ? [5, 5] : [1, 1]
                }
            }, kl = S, Cl = Go();

        function bl(e, t, i) {
            this.parentModel = t, this.ecModel = i, this.option = e
        }

        function Il(e, t, i) {
            for (var n = 0; n < t.length && (!t[n] || null != (e = e && "object" == typeof e ? e[t[n]] : null)); n++) ;
            return null == e && i && (e = i.get(t)), e
        }

        function Sl(e, t) {
            var i = Cl(e).getParent;
            return i ? i.call(e, t) : e.parentModel
        }

        bl.prototype = {
            constructor: bl, init: null, mergeOption: function (e) {
                v(this.option, e, !0)
            }, get: function (e, t) {
                return null == e ? this.option : Il(this.option, this.parsePath(e), !t && Sl(this, e))
            }, getShallow: function (e, t) {
                var i = this.option, n = null == i ? i : i[e], o = !t && Sl(this, e);
                return null == n && o && (n = o.getShallow(e)), n
            }, getModel: function (e, t) {
                var i;
                return new bl(null == e ? this.option : Il(this.option, e = this.parsePath(e)), t = t || (i = Sl(this, e)) && i.getModel(e), this.ecModel)
            }, isEmpty: function () {
                return null == this.option
            }, restoreData: function () {
            }, clone: function () {
                return new this.constructor(m(this.option))
            }, setReadOnly: function (e) {
            }, parsePath: function (e) {
                return "string" == typeof e && (e = e.split(".")), e
            }, customizeGetParent: function (e) {
                Cl(this).getParent = e
            }, isAnimationEnabled: function () {
                if (!o.node) {
                    if (null != this.option.animation) return !!this.option.animation;
                    if (this.parentModel) return this.parentModel.isAnimationEnabled()
                }
            }
        }, Qo(bl), ea(bl), kl(bl, ra), kl(bl, la), kl(bl, yl), kl(bl, wl);
        var _l = 0;

        function Dl(e) {
            return [e || "", _l++, Math.random().toFixed(5)].join("_")
        }

        var Al = 1e-4;

        function Nl(e, t, i, n) {
            var o = t[1] - t[0], a = i[1] - i[0];
            if (0 == o) return 0 == a ? i[0] : (i[0] + i[1]) / 2;
            if (n) if (0 < o) {
                if (e <= t[0]) return i[0];
                if (e >= t[1]) return i[1]
            } else {
                if (e >= t[0]) return i[0];
                if (e <= t[1]) return i[1]
            } else {
                if (e === t[0]) return i[0];
                if (e === t[1]) return i[1]
            }
            return (e - t[0]) / o * a + i[0]
        }

        function xl(e, t) {
            switch (e) {
                case"center":
                case"middle":
                    e = "50%";
                    break;
                case"left":
                case"top":
                    e = "0%";
                    break;
                case"right":
                case"bottom":
                    e = "100%"
            }
            return "string" == typeof e ? function (e) {
                return e.replace(/^\s+|\s+$/g, "")
            }(e).match(/%$/) ? parseFloat(e) / 100 * t : parseFloat(e) : null == e ? NaN : +e
        }

        function El(e, t, i) {
            return null == t && (t = 10), t = Math.min(Math.max(0, t), 20), e = (+e).toFixed(t), i ? e : +e
        }

        function Ol(e) {
            return e.sort(function (e, t) {
                return e - t
            }), e
        }

        function Pl(e) {
            if (e = +e, isNaN(e)) return 0;
            for (var t = 1, i = 0; Math.round(e * t) / t !== e;) t *= 10, i++;
            return i
        }

        function Ml(e) {
            var t = e.toString(), i = t.indexOf("e");
            if (0 < i) {
                var n = +t.slice(i + 1);
                return n < 0 ? -n : 0
            }
            var o = t.indexOf(".");
            return o < 0 ? 0 : t.length - 1 - o
        }

        function Fl(e, t) {
            var i = Math.log, n = Math.LN10, o = Math.floor(i(e[1] - e[0]) / n),
                a = Math.round(i(Math.abs(t[1] - t[0])) / n), r = Math.min(Math.max(-o + a, 0), 20);
            return isFinite(r) ? r : 20
        }

        function Ll(e, t, i) {
            if (!e[t]) return 0;
            var n = N(e, function (e, t) {
                return e + (isNaN(t) ? 0 : t)
            }, 0);
            if (0 === n) return 0;
            for (var o = Math.pow(10, i), a = A(e, function (e) {
                return (isNaN(e) ? 0 : e) / n * o * 100
            }), r = 100 * o, s = A(a, function (e) {
                return Math.floor(e)
            }), l = N(s, function (e, t) {
                return e + t
            }, 0), d = A(a, function (e, t) {
                return e - s[t]
            }); l < r;) {
                for (var u = Number.NEGATIVE_INFINITY, c = null, h = 0, f = d.length; h < f; ++h) d[h] > u && (u = d[h], c = h);
                ++s[c], d[c] = 0, ++l
            }
            return s[t] / o
        }

        var Rl = 9007199254740991;

        function Bl(e) {
            var t = 2 * Math.PI;
            return (e % t + t) % t
        }

        function Ul(e) {
            return -Al < e && e < Al
        }

        var Vl = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;

        function Kl(e) {
            if (e instanceof Date) return e;
            if ("string" != typeof e) return null == e ? new Date(NaN) : new Date(Math.round(e));
            var t = Vl.exec(e);
            if (!t) return new Date(NaN);
            if (t[8]) {
                var i = +t[4] || 0;
                return "Z" !== t[8].toUpperCase() && (i -= t[8].slice(0, 3)), new Date(Date.UTC(+t[1], +(t[2] || 1) - 1, +t[3] || 1, i, +(t[5] || 0), +t[6] || 0, +t[7] || 0))
            }
            return new Date(+t[1], +(t[2] || 1) - 1, +t[3] || 1, +t[4] || 0, +(t[5] || 0), +t[6] || 0, +t[7] || 0)
        }

        function Gl(e) {
            return Math.pow(10, Wl(e))
        }

        function Wl(e) {
            if (0 === e) return 0;
            var t = Math.floor(Math.log(e) / Math.LN10);
            return 10 <= e / Math.pow(10, t) && t++, t
        }

        function jl(e, t) {
            var i = Wl(e), n = Math.pow(10, i), o = e / n;
            return e = (t ? o < 1.5 ? 1 : o < 2.5 ? 2 : o < 4 ? 3 : o < 7 ? 5 : 10 : o < 1 ? 1 : o < 2 ? 2 : o < 3 ? 3 : o < 5 ? 5 : 10) * n, -20 <= i ? +e.toFixed(i < 0 ? -i : 0) : e
        }

        function Hl(e) {
            e.sort(function (e, t) {
                return function e(t, i, n) {
                    return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] == (n ? -1 : 1) || !n && e(t, i, 1))
                }(e, t, 0) ? -1 : 1
            });
            for (var t = -1 / 0, i = 1, n = 0; n < e.length;) {
                for (var o = e[n].interval, a = e[n].close, r = 0; r < 2; r++) o[r] <= t && (o[r] = t, a[r] = r ? 1 : 1 - i), t = o[r], i = a[r];
                o[0] === o[1] && a[0] * a[1] != 1 ? e.splice(n, 1) : n++
            }
            return e
        }

        function zl(e) {
            return 0 <= e - parseFloat(e)
        }

        var Xl = (Object.freeze || Object)({
            linearMap: Nl,
            parsePercent: xl,
            round: El,
            asc: Ol,
            getPrecision: Pl,
            getPrecisionSafe: Ml,
            getPixelPrecision: Fl,
            getPercentWithPrecision: Ll,
            MAX_SAFE_INTEGER: Rl,
            remRadian: Bl,
            isRadianAroundZero: Ul,
            parseDate: Kl,
            quantity: Gl,
            quantityExponent: Wl,
            nice: jl,
            quantile: function (e, t) {
                var i = (e.length - 1) * t + 1, n = Math.floor(i), o = +e[n - 1], a = i - n;
                return a ? o + a * (e[n] - o) : o
            },
            reformIntervals: Hl,
            isNumeric: zl
        });

        function ql(e) {
            return isNaN(e) ? "-" : (e = (e + "").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (1 < e.length ? "." + e[1] : "")
        }

        function Yl(e, t) {
            return e = (e || "").toLowerCase().replace(/-(.)/g, function (e, t) {
                return t.toUpperCase()
            }), t && e && (e = e.charAt(0).toUpperCase() + e.slice(1)), e
        }

        var Jl = z, Zl = /([&<>"'])/g, Ql = {"&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;"};

        function $l(e) {
            return null == e ? "" : (e + "").replace(Zl, function (e, t) {
                return Ql[t]
            })
        }

        function ed(e, t) {
            return "{" + e + (null == t ? "" : t) + "}"
        }

        var td = ["a", "b", "c", "d", "e", "f", "g"];

        function id(e, t, i) {
            M(t) || (t = [t]);
            var n = t.length;
            if (!n) return "";
            for (var o = t[0].$vars || [], a = 0; a < o.length; a++) {
                var r = td[a];
                e = e.replace(ed(r), ed(r, 0))
            }
            for (var s = 0; s < n; s++) for (var l = 0; l < o.length; l++) {
                var d = t[s][o[l]];
                e = e.replace(ed(td[l], s), i ? $l(d) : d)
            }
            return e
        }

        function nd(e, t, i) {
            return D(t, function (t, n) {
                e = e.replace("{" + n + "}", i ? $l(t) : t)
            }), e
        }

        function od(e, t) {
            var i = (e = L(e) ? {color: e, extraCssText: t} : e || {}).color, n = e.type,
                o = (t = e.extraCssText, e.renderMode || "html"), a = e.markerId || "X";
            return i ? "html" === o ? "subItem" === n ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + $l(i) + ";" + (t || "") + '"></span>' : '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + $l(i) + ";" + (t || "") + '"></span>' : {
                renderMode: o,
                content: "{marker" + a + "|}  ",
                style: {color: i}
            } : ""
        }

        function ad(e, t) {
            return "0000".substr(0, t - (e += "").length) + e
        }

        function rd(e, t, i) {
            "week" !== e && "month" !== e && "quarter" !== e && "half-year" !== e && "year" !== e || (e = "MM-dd\nyyyy");
            var n = Kl(t), o = i ? "UTC" : "", a = n["get" + o + "FullYear"](), r = n["get" + o + "Month"]() + 1,
                s = n["get" + o + "Date"](), l = n["get" + o + "Hours"](), d = n["get" + o + "Minutes"](),
                u = n["get" + o + "Seconds"](), c = n["get" + o + "Milliseconds"]();
            return e = e.replace("MM", ad(r, 2)).replace("M", r).replace("yyyy", a).replace("yy", a % 100).replace("dd", ad(s, 2)).replace("d", s).replace("hh", ad(l, 2)).replace("h", l).replace("mm", ad(d, 2)).replace("m", d).replace("ss", ad(u, 2)).replace("s", u).replace("SSS", ad(c, 3))
        }

        function sd(e) {
            return e ? e.charAt(0).toUpperCase() + e.substr(1) : e
        }

        var ld = gn;

        function dd(e, t) {
            if ("_blank" === t || "blank" === t) {
                var i = window.open();
                i.opener = null, i.location = e
            } else window.open(e, t)
        }

        var ud = (Object.freeze || Object)({
                addCommas: ql,
                toCamelCase: Yl,
                normalizeCssArray: Jl,
                encodeHTML: $l,
                formatTpl: id,
                formatTplSimple: nd,
                getTooltipMarker: od,
                formatTime: rd,
                capitalFirst: sd,
                truncateText: ld,
                getTextBoundingRect: function (e) {
                    return cn(e.text, e.font, e.textAlign, e.textVerticalAlign, e.textPadding, e.textLineHeight, e.rich, e.truncate)
                },
                getTextRect: function (e, t, i, n, o, a, r, s) {
                    return cn(e, t, i, n, o, s, a, r)
                },
                windowOpen: dd
            }), cd = D, hd = ["left", "right", "top", "bottom", "width", "height"],
            fd = [["width", "left", "right"], ["height", "top", "bottom"]];

        function pd(e, t, i, n, o) {
            var a = 0, r = 0;
            null == n && (n = 1 / 0), null == o && (o = 1 / 0);
            var s = 0;
            t.eachChild(function (l, d) {
                var u, c, h = l.position, f = l.getBoundingRect(), p = t.childAt(d + 1), g = p && p.getBoundingRect();
                if ("horizontal" === e) {
                    var m = f.width + (g ? -g.x + f.x : 0);
                    s = n < (u = a + m) || l.newline ? (a = 0, u = m, r += s + i, f.height) : Math.max(s, f.height)
                } else {
                    var v = f.height + (g ? -g.y + f.y : 0);
                    s = o < (c = r + v) || l.newline ? (a += s + i, r = 0, c = v, f.width) : Math.max(s, f.width)
                }
                l.newline || (h[0] = a, h[1] = r, "horizontal" === e ? a = u + i : r = c + i)
            })
        }

        var gd = pd;

        function md(e, t, i) {
            i = Jl(i || 0);
            var n = t.width, o = t.height, a = xl(e.left, n), r = xl(e.top, o), s = xl(e.right, n), l = xl(e.bottom, o),
                d = xl(e.width, n), u = xl(e.height, o), c = i[2] + i[0], h = i[1] + i[3], f = e.aspect;
            switch (isNaN(d) && (d = n - s - h - a), isNaN(u) && (u = o - l - c - r), null != f && (isNaN(d) && isNaN(u) && (n / o < f ? d = .8 * n : u = .8 * o), isNaN(d) && (d = f * u), isNaN(u) && (u = d / f)), isNaN(a) && (a = n - s - d - h), isNaN(r) && (r = o - l - u - c), e.left || e.right) {
                case"center":
                    a = n / 2 - d / 2 - i[3];
                    break;
                case"right":
                    a = n - d - h
            }
            switch (e.top || e.bottom) {
                case"middle":
                case"center":
                    r = o / 2 - u / 2 - i[0];
                    break;
                case"bottom":
                    r = o - u - c
            }
            a = a || 0, r = r || 0, isNaN(d) && (d = n - h - a - (s || 0)), isNaN(u) && (u = o - c - r - (l || 0));
            var p = new Di(a + i[3], r + i[0], d, u);
            return p.margin = i, p
        }

        function vd(e, t, i, n, o) {
            var a = !o || !o.hv || o.hv[0], r = !o || !o.hv || o.hv[1], s = o && o.boundingMode || "all";
            if (a || r) {
                var l;
                if ("raw" === s) l = "group" === e.type ? new Di(0, 0, +t.width || 0, +t.height || 0) : e.getBoundingRect(); else if (l = e.getBoundingRect(), e.needLocalTransform()) {
                    var d = e.getLocalTransform();
                    (l = l.clone()).applyTransform(d)
                }
                t = md(w({width: l.width, height: l.height}, t), i, n);
                var u = e.position, c = a ? t.x - l.x : 0, h = r ? t.y - l.y : 0;
                e.attr("position", "raw" === s ? [c, h] : [u[0] + c, u[1] + h])
            }
        }

        function yd(e, t, i) {
            R(i) || (i = {});
            var n = i.ignoreSize;
            M(n) || (n = [n, n]);
            var o = r(fd[0], 0), a = r(fd[1], 1);

            function r(i, o) {
                var a = {}, r = 0, d = {}, u = 0;
                if (cd(i, function (t) {
                    d[t] = e[t]
                }), cd(i, function (e) {
                    s(t, e) && (a[e] = d[e] = t[e]), l(a, e) && r++, l(d, e) && u++
                }), n[o]) return l(t, i[1]) ? d[i[2]] = null : l(t, i[2]) && (d[i[1]] = null), d;
                if (2 !== u && r) {
                    if (2 <= r) return a;
                    for (var c = 0; c < i.length; c++) {
                        var h = i[c];
                        if (!s(a, h) && s(e, h)) {
                            a[h] = e[h];
                            break
                        }
                    }
                    return a
                }
                return d
            }

            function s(e, t) {
                return e.hasOwnProperty(t)
            }

            function l(e, t) {
                return null != e[t] && "auto" !== e[t]
            }

            function d(e, t, i) {
                cd(e, function (e) {
                    t[e] = i[e]
                })
            }

            d(fd[0], e, o), d(fd[1], e, a)
        }

        function Td(e) {
            return wd({}, e)
        }

        function wd(e, t) {
            return t && e && cd(hd, function (i) {
                t.hasOwnProperty(i) && (e[i] = t[i])
            }), e
        }

        P(pd, "vertical"), P(pd, "horizontal");
        var kd, Cd, bd, Id = Go(), Sd = bl.extend({
            type: "component",
            id: "",
            name: "",
            mainType: "",
            subType: "",
            componentIndex: 0,
            defaultOption: null,
            ecModel: null,
            dependentModels: [],
            uid: null,
            layoutMode: null,
            $constructor: function (e, t, i, n) {
                bl.call(this, e, t, i, n), this.uid = Dl("ec_cpt_model")
            },
            init: function (e, t, i, n) {
                this.mergeDefaultAndTheme(e, i)
            },
            mergeDefaultAndTheme: function (e, t) {
                var i = this.layoutMode, n = i ? Td(e) : {};
                v(e, t.getTheme().get(this.mainType)), v(e, this.getDefaultOption()), i && yd(e, n, i)
            },
            mergeOption: function (e, t) {
                v(this.option, e, !0);
                var i = this.layoutMode;
                i && yd(this.option, e, i)
            },
            optionUpdated: function (e, t) {
            },
            getDefaultOption: function () {
                var e = Id(this);
                if (!e.defaultOption) {
                    for (var t = [], i = this.constructor; i;) {
                        var n = i.prototype.defaultOption;
                        n && t.push(n), i = i.superClass
                    }
                    for (var o = {}, a = t.length - 1; 0 <= a; a--) o = v(o, t[a], !0);
                    e.defaultOption = o
                }
                return e.defaultOption
            },
            getReferringComponents: function (e) {
                return this.ecModel.queryComponents({
                    mainType: e,
                    index: this.get(e + "Index", !0),
                    id: this.get(e + "Id", !0)
                })
            }
        });

        function _d(e, t) {
            return e[t] || (e[t] = {predecessor: [], successor: []}), e[t]
        }

        na(Sd, {registerWhenExtend: !0}), Cd = {}, (kd = Sd).registerSubTypeDefaulter = function (e, t) {
            e = Zo(e), Cd[e.main] = t
        }, kd.determineSubType = function (e, t) {
            var i = t.type;
            if (!i) {
                var n = Zo(e).main;
                kd.hasSubTypes(e) && Cd[n] && (i = Cd[n](t))
            }
            return i
        }, bd = function (e) {
            var t = [];
            return D(Sd.getClassesByMainType(e), function (e) {
                t = t.concat(e.prototype.dependencies || [])
            }), t = A(t, function (e) {
                return Zo(e).main
            }), "dataset" !== e && b(t, "dataset") <= 0 && t.unshift("dataset"), t
        }, Sd.topologicalTravel = function (e, t, i, n) {
            if (e.length) {
                var o = function (e) {
                    var t = {}, i = [];
                    return D(e, function (n) {
                        var o = _d(t, n), a = function (e, t) {
                            var i = [];
                            return D(e, function (e) {
                                0 <= b(t, e) && i.push(e)
                            }), i
                        }(o.originalDeps = bd(n), e);
                        o.entryCount = a.length, 0 === o.entryCount && i.push(n), D(a, function (e) {
                            b(o.predecessor, e) < 0 && o.predecessor.push(e);
                            var i = _d(t, e);
                            b(i.successor, e) < 0 && i.successor.push(n)
                        })
                    }), {graph: t, noEntryList: i}
                }(t), a = o.graph, r = o.noEntryList, s = {};
                for (D(e, function (e) {
                    s[e] = !0
                }); r.length;) {
                    var l = r.pop(), d = a[l], u = !!s[l];
                    u && (i.call(n, l, d.originalDeps.slice()), delete s[l]), D(d.successor, u ? h : c)
                }
                D(s, function () {
                    throw new Error("Circle dependency may exists")
                })
            }

            function c(e) {
                a[e].entryCount--, 0 === a[e].entryCount && r.push(e)
            }

            function h(e) {
                s[e] = !0, c(e)
            }
        }, S(Sd, {
            getBoxLayoutParams: function () {
                return {
                    left: this.get("left"),
                    top: this.get("top"),
                    right: this.get("right"),
                    bottom: this.get("bottom"),
                    width: this.get("width"),
                    height: this.get("height")
                }
            }
        });
        var Dd = "";
        "undefined" != typeof navigator && (Dd = navigator.platform || "");
        var Ad = {
                color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3"],
                gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
                textStyle: {
                    fontFamily: Dd.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
                    fontSize: 12,
                    fontStyle: "normal",
                    fontWeight: "normal"
                },
                blendMode: null,
                animation: "auto",
                animationDuration: 1e3,
                animationDurationUpdate: 300,
                animationEasing: "exponentialOut",
                animationEasingUpdate: "cubicOut",
                animationThreshold: 2e3,
                progressiveThreshold: 3e3,
                progressive: 400,
                hoverLayerThreshold: 3e3,
                useUTC: !1
            }, Nd = Go(), xd = {
                clearColorPalette: function () {
                    Nd(this).colorIdx = 0, Nd(this).colorNameMap = {}
                }, getColorFromPalette: function (e, t, i) {
                    var n = Nd(t = t || this), o = n.colorIdx || 0, a = n.colorNameMap = n.colorNameMap || {};
                    if (a.hasOwnProperty(e)) return a[e];
                    var r = Po(this.get("color", !0)), s = this.get("colorLayer", !0),
                        l = null != i && s ? function (e, t) {
                            for (var i = e.length, n = 0; n < i; n++) if (e[n].length > t) return e[n];
                            return e[i - 1]
                        }(s, i) : r;
                    if ((l = l || r) && l.length) {
                        var d = l[o];
                        return e && (a[e] = d), n.colorIdx = (o + 1) % l.length, d
                    }
                }
            }, Ed = "original", Od = "arrayRows", Pd = "objectRows", Md = "keyedColumns", Fd = "unknown", Ld = "typedArray",
            Rd = "column", Bd = "row";

        function Ud(e) {
            this.fromDataset = e.fromDataset, this.data = e.data || (e.sourceFormat === Md ? {} : []), this.sourceFormat = e.sourceFormat || Fd, this.seriesLayoutBy = e.seriesLayoutBy || Rd, this.dimensionsDefine = e.dimensionsDefine, this.encodeDefine = e.encodeDefine && $(e.encodeDefine), this.startIndex = e.startIndex || 0, this.dimensionsDetectCount = e.dimensionsDetectCount
        }

        Ud.seriesDataToSource = function (e) {
            return new Ud({data: e, sourceFormat: U(e) ? Ld : Ed, fromDataset: !1})
        }, ea(Ud);
        var Vd = {Must: 1, Might: 2, Not: 3}, Kd = Go();

        function Gd(e) {
            var t = e.option, i = t.data, n = U(i) ? Ld : Ed, o = !1, a = t.seriesLayoutBy, r = t.sourceHeader,
                s = t.dimensions, l = Xd(e);
            if (l) {
                var d = l.option;
                i = d.source, n = Kd(l).sourceFormat, o = !0, a = a || d.seriesLayoutBy, null == r && (r = d.sourceHeader), s = s || d.dimensions
            }
            var u = function (e, t, i, n, o) {
                if (!e) return {dimensionsDefine: Wd(o)};
                var a, r;
                if (t === Od) "auto" === n || null == n ? jd(function (e) {
                    null != e && "-" !== e && (L(e) ? null == r && (r = 1) : r = 0)
                }, i, e, 10) : r = n ? 1 : 0, o || 1 !== r || (o = [], jd(function (e, t) {
                    o[t] = null != e ? e : ""
                }, i, e)), a = o ? o.length : i === Bd ? e.length : e[0] ? e[0].length : null; else if (t === Pd) o = o || function (e) {
                    for (var t, i = 0; i < e.length && !(t = e[i++]);) ;
                    if (t) {
                        var n = [];
                        return D(t, function (e, t) {
                            n.push(t)
                        }), n
                    }
                }(e); else if (t === Md) o || (o = [], D(e, function (e, t) {
                    o.push(t)
                })); else if (t === Ed) {
                    var s = Lo(e[0]);
                    a = M(s) && s.length || 1
                }
                return {startIndex: r, dimensionsDefine: Wd(o), dimensionsDetectCount: a}
            }(i, n, a, r, s);
            Kd(e).source = new Ud({
                data: i,
                fromDataset: o,
                seriesLayoutBy: a,
                sourceFormat: n,
                dimensionsDefine: u.dimensionsDefine,
                startIndex: u.startIndex,
                dimensionsDetectCount: u.dimensionsDetectCount,
                encodeDefine: t.encode
            })
        }

        function Wd(e) {
            if (e) {
                var t = $();
                return A(e, function (e, i) {
                    if (null == (e = T({}, R(e) ? e : {name: e})).name) return e;
                    e.name += "", null == e.displayName && (e.displayName = e.name);
                    var n = t.get(e.name);
                    return n ? e.name += "-" + n.count++ : t.set(e.name, {count: 1}), e
                })
            }
        }

        function jd(e, t, i, n) {
            if (null == n && (n = 1 / 0), t === Bd) for (var o = 0; o < i.length && o < n; o++) e(i[o] ? i[o][0] : null, o); else {
                var a = i[0] || [];
                for (o = 0; o < a.length && o < n; o++) e(a[o], o)
            }
        }

        function Hd(e, t, i) {
            var n = {}, o = Xd(t);
            if (!o || !e) return n;
            var a, r, s = [], l = [], d = t.ecModel, u = Kd(d).datasetMap, c = o.uid + "_" + i.seriesLayoutBy;
            D(e = e.slice(), function (t, i) {
                R(t) || (e[i] = {name: t}), "ordinal" === t.type && null == a && (r = p(e[a = i])), n[t.name] = []
            });
            var h = u.get(c) || u.set(c, {categoryWayDim: r, valueWayDim: 0});

            function f(e, t, i) {
                for (var n = 0; n < i; n++) e.push(t + n)
            }

            function p(e) {
                var t = e.dimsDef;
                return t ? t.length : 1
            }

            return D(e, function (e, t) {
                var i = e.name, o = p(e);
                if (null == a) {
                    var r = h.valueWayDim;
                    f(n[i], r, o), f(l, r, o), h.valueWayDim += o
                } else a === t ? (f(n[i], 0, o), f(s, 0, o)) : (r = h.categoryWayDim, f(n[i], r, o), f(l, r, o), h.categoryWayDim += o)
            }), s.length && (n.itemName = s), l.length && (n.seriesName = l), n
        }

        function zd(e, t, i) {
            var n = {};
            if (!Xd(e)) return n;
            var o, a = t.sourceFormat, r = t.dimensionsDefine;
            a !== Pd && a !== Md || D(r, function (e, t) {
                "name" === (R(e) ? e.name : e) && (o = t)
            });
            var s = function () {
                for (var e = {}, n = {}, s = [], l = 0, d = Math.min(5, i); l < d; l++) {
                    var u = qd(t.data, a, t.seriesLayoutBy, r, t.startIndex, l);
                    s.push(u);
                    var c = u === Vd.Not;
                    if (c && null == e.v && l !== o && (e.v = l), null != e.n && e.n !== e.v && (c || s[e.n] !== Vd.Not) || (e.n = l), h(e) && s[e.n] !== Vd.Not) return e;
                    c || (u === Vd.Might && null == n.v && l !== o && (n.v = l), null != n.n && n.n !== n.v || (n.n = l))
                }

                function h(e) {
                    return null != e.v && null != e.n
                }

                return h(e) ? e : h(n) ? n : null
            }();
            if (s) {
                n.value = s.v;
                var l = null != o ? o : s.n;
                n.itemName = [l], n.seriesName = [l]
            }
            return n
        }

        function Xd(e) {
            var t = e.option;
            if (!t.data) return e.ecModel.getComponent("dataset", t.datasetIndex || 0)
        }

        function qd(e, t, i, n, o, a) {
            var r, s, l;
            if (U(e)) return Vd.Not;
            if (n) {
                var d = n[a];
                R(d) ? (s = d.name, l = d.type) : L(d) && (s = d)
            }
            if (null != l) return "ordinal" === l ? Vd.Must : Vd.Not;
            if (t === Od) if (i === Bd) {
                for (var u = e[a], c = 0; c < (u || []).length && c < 5; c++) if (null != (r = g(u[o + c]))) return r
            } else for (c = 0; c < e.length && c < 5; c++) {
                var h = e[o + c];
                if (h && null != (r = g(h[a]))) return r
            } else if (t === Pd) {
                if (!s) return Vd.Not;
                for (c = 0; c < e.length && c < 5; c++) if ((f = e[c]) && null != (r = g(f[s]))) return r
            } else if (t === Md) {
                if (!s) return Vd.Not;
                if (!(u = e[s]) || U(u)) return Vd.Not;
                for (c = 0; c < u.length && c < 5; c++) if (null != (r = g(u[c]))) return r
            } else if (t === Ed) for (c = 0; c < e.length && c < 5; c++) {
                var f, p = Lo(f = e[c]);
                if (!M(p)) return Vd.Not;
                if (null != (r = g(p[a]))) return r
            }

            function g(e) {
                var t = L(e);
                return null != e && isFinite(e) && "" !== e ? t ? Vd.Might : Vd.Not : t && "-" !== e ? Vd.Must : void 0
            }

            return Vd.Not
        }

        var Yd = "\0_ec_inner", Jd = bl.extend({
            init: function (e, t, i, n) {
                i = i || {}, this.option = null, this._theme = new bl(i), this._optionManager = n
            }, setOption: function (e, t) {
                X(!(Yd in e), "please use chart.getOption()"), this._optionManager.setOption(e, t), this.resetOption(null)
            }, resetOption: function (e) {
                var t = !1, i = this._optionManager;
                if (!e || "recreate" === e) {
                    var n = i.mountOption("recreate" === e);
                    this.option && "recreate" !== e ? (this.restoreData(), this.mergeOption(n)) : function (e) {
                        e = e, this.option = {}, this.option[Yd] = 1, this._componentsMap = $({series: []}), this._seriesIndices, this._seriesIndicesMap, function (e, t) {
                            var i = e.color && !e.colorLayer;
                            D(t, function (t, n) {
                                "colorLayer" === n && i || Sd.hasClass(n) || ("object" == typeof t ? e[n] = e[n] ? v(e[n], t, !1) : m(t) : null == e[n] && (e[n] = t))
                            })
                        }(e, this._theme.option), v(e, Ad, !1), this.mergeOption(e)
                    }.call(this, n), t = !0
                }
                if ("timeline" !== e && "media" !== e || this.restoreData(), !e || "recreate" === e || "timeline" === e) {
                    var o = i.getTimelineOption(this);
                    o && (this.mergeOption(o), t = !0)
                }
                if (!e || "recreate" === e || "media" === e) {
                    var a = i.getMediaOption(this, this._api);
                    a.length && D(a, function (e) {
                        this.mergeOption(e, t = !0)
                    }, this)
                }
                return t
            }, mergeOption: function (e) {
                var t = this.option, i = this._componentsMap, n = [];
                Kd(this).datasetMap = $(), D(e, function (e, i) {
                    null != e && (Sd.hasClass(i) ? i && n.push(i) : t[i] = null == t[i] ? m(e) : v(t[i], e, !0))
                }), Sd.topologicalTravel(n, Sd.getAllClassMainTypes(), function (n, o) {
                    var a = Po(e[n]), r = Ro(i.get(n), a);
                    Bo(r), D(r, function (e, t) {
                        var i = e.option;
                        R(i) && (e.keyInfo.mainType = n, e.keyInfo.subType = function (e, t, i) {
                            return t.type ? t.type : i ? i.subType : Sd.determineSubType(e, t)
                        }(n, i, e.exist))
                    });
                    var s = function (e, t) {
                        M(t) || (t = t ? [t] : []);
                        var i = {};
                        return D(t, function (t) {
                            i[t] = (e.get(t) || []).slice()
                        }), i
                    }(i, o);
                    t[n] = [], i.set(n, []), D(r, function (e, o) {
                        var a = e.exist, r = e.option;
                        if (X(R(r) || a, "Empty component definition"), r) {
                            var l = Sd.getClass(n, e.keyInfo.subType, !0);
                            if (a && a.constructor === l) a.name = e.keyInfo.name, a.mergeOption(r, this), a.optionUpdated(r, !1); else {
                                var d = T({dependentModels: s, componentIndex: o}, e.keyInfo);
                                T(a = new l(r, this, this, d), d), a.init(r, this, this, d), a.optionUpdated(null, !0)
                            }
                        } else a.mergeOption({}, this), a.optionUpdated({}, !1);
                        i.get(n)[o] = a, t[n][o] = a.option
                    }, this), "series" === n && Zd(this, i.get("series"))
                }, this), this._seriesIndicesMap = $(this._seriesIndices = this._seriesIndices || [])
            }, getOption: function () {
                var e = m(this.option);
                return D(e, function (t, i) {
                    if (Sd.hasClass(i)) {
                        for (var n = (t = Po(t)).length - 1; 0 <= n; n--) Vo(t[n]) && t.splice(n, 1);
                        e[i] = t
                    }
                }), delete e[Yd], e
            }, getTheme: function () {
                return this._theme
            }, getComponent: function (e, t) {
                var i = this._componentsMap.get(e);
                if (i) return i[t || 0]
            }, queryComponents: function (e) {
                var t = e.mainType;
                if (!t) return [];
                var i, n = e.index, o = e.id, a = e.name, r = this._componentsMap.get(t);
                if (!r || !r.length) return [];
                if (null != n) M(n) || (n = [n]), i = x(A(n, function (e) {
                    return r[e]
                }), function (e) {
                    return !!e
                }); else if (null != o) {
                    var s = M(o);
                    i = x(r, function (e) {
                        return s && 0 <= b(o, e.id) || !s && e.id === o
                    })
                } else if (null != a) {
                    var l = M(a);
                    i = x(r, function (e) {
                        return l && 0 <= b(a, e.name) || !l && e.name === a
                    })
                } else i = r.slice();
                return Qd(i, e)
            }, findComponents: function (e) {
                var t, i, n, o, a, r = e.query, s = e.mainType,
                    l = (i = s + "Index", n = s + "Id", o = s + "Name", !(t = r) || null == t[i] && null == t[n] && null == t[o] ? null : {
                        mainType: s,
                        index: t[i],
                        id: t[n],
                        name: t[o]
                    }), d = l ? this.queryComponents(l) : this._componentsMap.get(s);
                return a = Qd(d, e), e.filter ? x(a, e.filter) : a
            }, eachComponent: function (e, t, i) {
                var n = this._componentsMap;
                "function" == typeof e ? (i = t, t = e, n.each(function (e, n) {
                    D(e, function (e, o) {
                        t.call(i, n, e, o)
                    })
                })) : L(e) ? D(n.get(e), t, i) : R(e) && D(this.findComponents(e), t, i)
            }, getSeriesByName: function (e) {
                return x(this._componentsMap.get("series"), function (t) {
                    return t.name === e
                })
            }, getSeriesByIndex: function (e) {
                return this._componentsMap.get("series")[e]
            }, getSeriesByType: function (e) {
                return x(this._componentsMap.get("series"), function (t) {
                    return t.subType === e
                })
            }, getSeries: function () {
                return this._componentsMap.get("series").slice()
            }, getSeriesCount: function () {
                return this._componentsMap.get("series").length
            }, eachSeries: function (e, t) {
                D(this._seriesIndices, function (i) {
                    var n = this._componentsMap.get("series")[i];
                    e.call(t, n, i)
                }, this)
            }, eachRawSeries: function (e, t) {
                D(this._componentsMap.get("series"), e, t)
            }, eachSeriesByType: function (e, t, i) {
                D(this._seriesIndices, function (n) {
                    var o = this._componentsMap.get("series")[n];
                    o.subType === e && t.call(i, o, n)
                }, this)
            }, eachRawSeriesByType: function (e, t, i) {
                return D(this.getSeriesByType(e), t, i)
            }, isSeriesFiltered: function (e) {
                return null == this._seriesIndicesMap.get(e.componentIndex)
            }, getCurrentSeriesIndices: function () {
                return (this._seriesIndices || []).slice()
            }, filterSeries: function (e, t) {
                var i = x(this._componentsMap.get("series"), e, t);
                Zd(this, i)
            }, restoreData: function (e) {
                var t = this._componentsMap;
                Zd(this, t.get("series"));
                var i = [];
                t.each(function (e, t) {
                    i.push(t)
                }), Sd.topologicalTravel(i, Sd.getAllClassMainTypes(), function (i, n) {
                    D(t.get(i), function (t) {
                        "series" === i && function (e, t) {
                            if (t) {
                                var i = t.seiresIndex, n = t.seriesId, o = t.seriesName;
                                return null != i && e.componentIndex !== i || null != n && e.id !== n || null != o && e.name !== o
                            }
                        }(t, e) || t.restoreData()
                    })
                })
            }
        });

        function Zd(e, t) {
            e._seriesIndicesMap = $(e._seriesIndices = A(t, function (e) {
                return e.componentIndex
            }) || [])
        }

        function Qd(e, t) {
            return t.hasOwnProperty("subType") ? x(e, function (e) {
                return e.subType === t.subType
            }) : e
        }

        S(Jd, xd);
        var $d = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getModel", "getOption", "getViewOfComponentModel", "getViewOfSeriesModel"];

        function eu(e) {
            D($d, function (t) {
                this[t] = O(e[t], e)
            }, this)
        }

        var tu = {};

        function iu() {
            this._coordinateSystems = []
        }

        iu.prototype = {
            constructor: iu, create: function (e, t) {
                var i = [];
                D(tu, function (n, o) {
                    var a = n.create(e, t);
                    i = i.concat(a || [])
                }), this._coordinateSystems = i
            }, update: function (e, t) {
                D(this._coordinateSystems, function (i) {
                    i.update && i.update(e, t)
                })
            }, getCoordinateSystems: function () {
                return this._coordinateSystems.slice()
            }
        }, iu.register = function (e, t) {
            tu[e] = t
        }, iu.get = function (e) {
            return tu[e]
        };
        var nu = D, ou = m, au = A, ru = v, su = /^(min|max)?(.+)$/;

        function lu(e) {
            this._api = e, this._timelineOptions = [], this._mediaList = [], this._mediaDefault, this._currentMediaIndices = [], this._optionBackup, this._newBaseOption
        }

        function du(e, t, i) {
            var n = {width: t, height: i, aspectratio: t / i}, o = !0;
            return D(e, function (e, t) {
                var i = t.match(su);
                if (i && i[1] && i[2]) {
                    i[1];
                    var a = i[2].toLowerCase();
                    !function (e, t, i) {
                        return e === t
                    }(n[a], e) && (o = !1)
                }
            }), o
        }

        lu.prototype = {
            constructor: lu, setOption: function (e, t) {
                e && D(Po(e.series), function (e) {
                    e && e.data && U(e.data) && J(e.data)
                }), e = ou(e);
                var i = this._optionBackup, n = function (e, t, i) {
                    var n, o, a = [], r = [], s = e.timeline;
                    if (e.baseOption && (o = e.baseOption), (s || e.options) && (o = o || {}, a = (e.options || []).slice()), e.media) {
                        o = o || {};
                        var l = e.media;
                        nu(l, function (e) {
                            e && e.option && (e.query ? r.push(e) : n = n || e)
                        })
                    }
                    return (o = o || e).timeline || (o.timeline = s), nu([o].concat(a).concat(A(r, function (e) {
                        return e.option
                    })), function (e) {
                        nu(t, function (t) {
                            t(e, i)
                        })
                    }), {baseOption: o, timelineOptions: a, mediaDefault: n, mediaList: r}
                }.call(this, e, t, !i);
                this._newBaseOption = n.baseOption, i ? (function (e, t) {
                    nu(t = t || {}, function (t, i) {
                        if (null != t) {
                            var n = e[i];
                            if (Sd.hasClass(i)) {
                                t = Po(t);
                                var o = Ro(n = Po(n), t);
                                e[i] = au(o, function (e) {
                                    return e.option && e.exist ? ru(e.exist, e.option, !0) : e.exist || e.option
                                })
                            } else e[i] = ru(n, t, !0)
                        }
                    })
                }(i.baseOption, n.baseOption), n.timelineOptions.length && (i.timelineOptions = n.timelineOptions), n.mediaList.length && (i.mediaList = n.mediaList), n.mediaDefault && (i.mediaDefault = n.mediaDefault)) : this._optionBackup = n
            }, mountOption: function (e) {
                var t = this._optionBackup;
                return this._timelineOptions = au(t.timelineOptions, ou), this._mediaList = au(t.mediaList, ou), this._mediaDefault = ou(t.mediaDefault), this._currentMediaIndices = [], ou(e ? t.baseOption : this._newBaseOption)
            }, getTimelineOption: function (e) {
                var t, i = this._timelineOptions;
                if (i.length) {
                    var n = e.getComponent("timeline");
                    n && (t = ou(i[n.getCurrentIndex()], !0))
                }
                return t
            }, getMediaOption: function (e) {
                var t = this._api.getWidth(), i = this._api.getHeight(), n = this._mediaList, o = this._mediaDefault,
                    a = [], r = [];
                if (!n.length && !o) return r;
                for (var s = 0, l = n.length; s < l; s++) du(n[s].query, t, i) && a.push(s);
                return !a.length && o && (a = [-1]), a.length && !function (e, t) {
                    return e.join(",") === t.join(",")
                }(a, this._currentMediaIndices) && (r = au(a, function (e) {
                    return ou(-1 === e ? o.option : n[e].option)
                })), this._currentMediaIndices = a, r
            }
        };
        var uu = D, cu = R,
            hu = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];

        function fu(e) {
            var t = e && e.itemStyle;
            if (t) for (var i = 0, n = hu.length; i < n; i++) {
                var o = hu[i], a = t.normal, r = t.emphasis;
                a && a[o] && (e[o] = e[o] || {}, e[o].normal ? v(e[o].normal, a[o]) : e[o].normal = a[o], a[o] = null), r && r[o] && (e[o] = e[o] || {}, e[o].emphasis ? v(e[o].emphasis, r[o]) : e[o].emphasis = r[o], r[o] = null)
            }
        }

        function pu(e, t, i) {
            if (e && e[t] && (e[t].normal || e[t].emphasis)) {
                var n = e[t].normal, o = e[t].emphasis;
                n && (i ? (e[t].normal = e[t].emphasis = null, w(e[t], n)) : e[t] = n), o && (e.emphasis = e.emphasis || {}, e.emphasis[t] = o)
            }
        }

        function gu(e) {
            pu(e, "itemStyle"), pu(e, "lineStyle"), pu(e, "areaStyle"), pu(e, "label"), pu(e, "labelLine"), pu(e, "upperLabel"), pu(e, "edgeLabel")
        }

        function mu(e, t) {
            var i = cu(e) && e[t], n = cu(i) && i.textStyle;
            if (n) for (var o = 0, a = Fo.length; o < a; o++) t = Fo[o], n.hasOwnProperty(t) && (i[t] = n[t])
        }

        function vu(e) {
            e && (gu(e), mu(e, "label"), e.emphasis && mu(e.emphasis, "label"))
        }

        function yu(e) {
            return M(e) ? e : e ? [e] : []
        }

        function Tu(e) {
            return (M(e) ? e[0] : e) || {}
        }

        function wu(e) {
            D(ku, function (t) {
                t[0] in e && !(t[1] in e) && (e[t[1]] = e[t[0]])
            })
        }

        var ku = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]],
            Cu = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"],
            bu = function (e, t) {
                (function (e, t) {
                    uu(yu(e.series), function (e) {
                        cu(e) && function (e) {
                            if (cu(e)) {
                                fu(e), gu(e), mu(e, "label"), mu(e, "upperLabel"), mu(e, "edgeLabel"), e.emphasis && (mu(e.emphasis, "label"), mu(e.emphasis, "upperLabel"), mu(e.emphasis, "edgeLabel")), (i = e.markPoint) && (fu(i), vu(i)), (n = e.markLine) && (fu(n), vu(n));
                                var t = e.markArea;
                                t && vu(t);
                                var i, n, o = e.data;
                                if ("graph" === e.type) {
                                    o = o || e.nodes;
                                    var a = e.links || e.edges;
                                    if (a && !U(a)) for (var r = 0; r < a.length; r++) vu(a[r]);
                                    D(e.categories, function (e) {
                                        gu(e)
                                    })
                                }
                                if (o && !U(o)) for (r = 0; r < o.length; r++) vu(o[r]);
                                if ((i = e.markPoint) && i.data) {
                                    var s = i.data;
                                    for (r = 0; r < s.length; r++) vu(s[r])
                                }
                                if ((n = e.markLine) && n.data) {
                                    var l = n.data;
                                    for (r = 0; r < l.length; r++) M(l[r]) ? (vu(l[r][0]), vu(l[r][1])) : vu(l[r])
                                }
                                "gauge" === e.type ? (mu(e, "axisLabel"), mu(e, "title"), mu(e, "detail")) : "treemap" === e.type ? (pu(e.breadcrumb, "itemStyle"), D(e.levels, function (e) {
                                    gu(e)
                                })) : "tree" === e.type && gu(e.leaves)
                            }
                        }(e)
                    });
                    var i = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
                    t && i.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), uu(i, function (t) {
                        uu(yu(e[t]), function (e) {
                            e && (mu(e, "axisLabel"), mu(e.axisPointer, "label"))
                        })
                    }), uu(yu(e.parallel), function (e) {
                        var t = e && e.parallelAxisDefault;
                        mu(t, "axisLabel"), mu(t && t.axisPointer, "label")
                    }), uu(yu(e.calendar), function (e) {
                        pu(e, "itemStyle"), mu(e, "dayLabel"), mu(e, "monthLabel"), mu(e, "yearLabel")
                    }), uu(yu(e.radar), function (e) {
                        mu(e, "name")
                    }), uu(yu(e.geo), function (e) {
                        cu(e) && (vu(e), uu(yu(e.regions), function (e) {
                            vu(e)
                        }))
                    }), uu(yu(e.timeline), function (e) {
                        vu(e), pu(e, "label"), pu(e, "itemStyle"), pu(e, "controlStyle", !0);
                        var t = e.data;
                        M(t) && D(t, function (e) {
                            R(e) && (pu(e, "label"), pu(e, "itemStyle"))
                        })
                    }), uu(yu(e.toolbox), function (e) {
                        pu(e, "iconStyle"), uu(e.feature, function (e) {
                            pu(e, "iconStyle")
                        })
                    }), mu(Tu(e.axisPointer), "label"), mu(Tu(e.tooltip).axisPointer, "label")
                })(e, t), e.series = Po(e.series), D(e.series, function (e) {
                    if (R(e)) {
                        var t = e.type;
                        if ("line" === t) null != e.clipOverflow && (e.clip = e.clipOverflow); else if ("pie" === t || "gauge" === t) null != e.clockWise && (e.clockwise = e.clockWise); else if ("gauge" === t) {
                            var i = function (e, t) {
                                t = t.split(",");
                                for (var i = e, n = 0; n < t.length && null != (i = i && i[t[n]]); n++) ;
                                return i
                            }(e, "pointer.color");
                            null != i && function (e, t, i, n) {
                                t = t.split(",");
                                for (var o, a = e, r = 0; r < t.length - 1; r++) null == a[o = t[r]] && (a[o] = {}), a = a[o];
                                null != a[t[r]] || (a[t[r]] = i)
                            }(e, "itemStyle.color", i)
                        }
                        wu(e)
                    }
                }), e.dataRange && (e.visualMap = e.dataRange), D(Cu, function (t) {
                    var i = e[t];
                    i && (M(i) || (i = [i]), D(i, function (e) {
                        wu(e)
                    }))
                })
            };

        function Iu(e) {
            D(e, function (t, i) {
                var n = [], o = [NaN, NaN], a = [t.stackResultDimension, t.stackedOverDimension], r = t.data,
                    s = t.isStackedByIndex, l = r.map(a, function (a, l, d) {
                        var u, c, h = r.get(t.stackedDimension, d);
                        if (isNaN(h)) return o;
                        s ? c = r.getRawIndex(d) : u = r.get(t.stackedByDimension, d);
                        for (var f = NaN, p = i - 1; 0 <= p; p--) {
                            var g = e[p];
                            if (s || (c = g.data.rawIndexOf(g.stackedByDimension, u)), 0 <= c) {
                                var m = g.data.getByRawIndex(g.stackResultDimension, c);
                                if (0 <= h && 0 < m || h <= 0 && m < 0) {
                                    h += m, f = m;
                                    break
                                }
                            }
                        }
                        return n[0] = h, n[1] = f, n
                    });
                r.hostModel.setData(l), t.data = l
            })
        }

        function Su(e, t) {
            Ud.isInstance(e) || (e = Ud.seriesDataToSource(e)), this._source = e;
            var i = this._data = e.data, n = e.sourceFormat;
            n === Ld && (this._offset = 0, this._dimSize = t, this._data = i), T(this, Du[n === Od ? n + "_" + e.seriesLayoutBy : n])
        }

        var _u = Su.prototype;
        _u.pure = !1;
        var Du = {
            arrayRows_column: {
                pure: _u.persistent = !0, count: function () {
                    return Math.max(0, this._data.length - this._source.startIndex)
                }, getItem: function (e) {
                    return this._data[e + this._source.startIndex]
                }, appendData: xu
            },
            arrayRows_row: {
                pure: !0, count: function () {
                    var e = this._data[0];
                    return e ? Math.max(0, e.length - this._source.startIndex) : 0
                }, getItem: function (e) {
                    e += this._source.startIndex;
                    for (var t = [], i = this._data, n = 0; n < i.length; n++) {
                        var o = i[n];
                        t.push(o ? o[e] : null)
                    }
                    return t
                }, appendData: function () {
                    throw new Error('Do not support appendData when set seriesLayoutBy: "row".')
                }
            },
            objectRows: {pure: !0, count: Au, getItem: Nu, appendData: xu},
            keyedColumns: {
                pure: !0, count: function () {
                    var e = this._source.dimensionsDefine[0].name, t = this._data[e];
                    return t ? t.length : 0
                }, getItem: function (e) {
                    for (var t = [], i = this._source.dimensionsDefine, n = 0; n < i.length; n++) {
                        var o = this._data[i[n].name];
                        t.push(o ? o[e] : null)
                    }
                    return t
                }, appendData: function (e) {
                    var t = this._data;
                    D(e, function (e, i) {
                        for (var n = t[i] || (t[i] = []), o = 0; o < (e || []).length; o++) n.push(e[o])
                    })
                }
            },
            original: {count: Au, getItem: Nu, appendData: xu},
            typedArray: {
                persistent: !(_u.getSource = function () {
                    return this._source
                }), pure: !0, count: function () {
                    return this._data ? this._data.length / this._dimSize : 0
                }, getItem: function (e, t) {
                    e -= this._offset, t = t || [];
                    for (var i = this._dimSize * e, n = 0; n < this._dimSize; n++) t[n] = this._data[i + n];
                    return t
                }, appendData: function (e) {
                    this._data = e
                }, clean: function () {
                    this._offset += this.count(), this._data = null
                }
            }
        };

        function Au() {
            return this._data.length
        }

        function Nu(e) {
            return this._data[e]
        }

        function xu(e) {
            for (var t = 0; t < e.length; t++) this._data.push(e[t])
        }

        var Eu = {
            arrayRows: Ou, objectRows: function (e, t, i, n) {
                return null != i ? e[n] : e
            }, keyedColumns: Ou, original: function (e, t, i, n) {
                var o = Lo(e);
                return null != i && o instanceof Array ? o[i] : o
            }, typedArray: Ou
        };

        function Ou(e, t, i, n) {
            return null != i ? e[i] : e
        }

        var Pu = {
            arrayRows: Mu, objectRows: function (e, t, i, n) {
                return Fu(e[t], this._dimensionInfos[t])
            }, keyedColumns: Mu, original: function (e, t, i, n) {
                var o = e && (null == e.value ? e : e.value);
                return !this._rawData.pure && function (e) {
                    return xo(e) && !(e instanceof Array)
                }(e) && (this.hasItemOption = !0), Fu(o instanceof Array ? o[n] : o, this._dimensionInfos[t])
            }, typedArray: function (e, t, i, n) {
                return e[n]
            }
        };

        function Mu(e, t, i, n) {
            return Fu(e[n], this._dimensionInfos[t])
        }

        function Fu(e, t) {
            var i = t && t.type;
            if ("ordinal" !== i) return "time" === i && "number" != typeof e && null != e && "-" !== e && (e = +Kl(e)), null == e || "" === e ? NaN : +e;
            var n = t && t.ordinalMeta;
            return n ? n.parseAndCollect(e) : e
        }

        function Lu(e, t, i) {
            if (e) {
                var n = e.getRawDataItem(t);
                if (null != n) {
                    var o, a, r = e.getProvider().getSource().sourceFormat, s = e.getDimensionInfo(i);
                    return s && (o = s.name, a = s.index), Eu[r](n, t, a, o)
                }
            }
        }

        function Ru(e, t, i) {
            if (e) {
                var n = e.getProvider().getSource().sourceFormat;
                if (n === Ed || n === Pd) {
                    var o = e.getRawDataItem(t);
                    return n !== Ed || R(o) || (o = null), o ? o[i] : void 0
                }
            }
        }

        var Bu = /\{@(.+?)\}/g, Uu = {
            getDataParams: function (e, t) {
                var i = this.getData(t), n = this.getRawValue(e, t), o = i.getRawIndex(e), a = i.getName(e),
                    r = i.getRawDataItem(e), s = i.getItemVisual(e, "color"), l = i.getItemVisual(e, "borderColor"),
                    d = this.ecModel.getComponent("tooltip"), u = Xo(d && d.get("renderMode")), c = this.mainType,
                    h = "series" === c, f = i.userOutput;
                return {
                    componentType: c,
                    componentSubType: this.subType,
                    componentIndex: this.componentIndex,
                    seriesType: h ? this.subType : null,
                    seriesIndex: this.seriesIndex,
                    seriesId: h ? this.id : null,
                    seriesName: h ? this.name : null,
                    name: a,
                    dataIndex: o,
                    data: r,
                    dataType: t,
                    value: n,
                    color: s,
                    borderColor: l,
                    dimensionNames: f ? f.dimensionNames : null,
                    encode: f ? f.encode : null,
                    marker: od({color: s, renderMode: u}),
                    $vars: ["seriesName", "name", "value"]
                }
            }, getFormattedLabel: function (e, t, i, n, o) {
                t = t || "normal";
                var a = this.getData(i), r = a.getItemModel(e), s = this.getDataParams(e, i);
                null != n && s.value instanceof Array && (s.value = s.value[n]);
                var l = r.get("normal" === t ? [o || "label", "formatter"] : [t, o || "label", "formatter"]);
                return "function" == typeof l ? (s.status = t, s.dimensionIndex = n, l(s)) : "string" == typeof l ? id(l, s).replace(Bu, function (t, i) {
                    var n = i.length;
                    return "[" === i.charAt(0) && "]" === i.charAt(n - 1) && (i = +i.slice(1, n - 1)), Lu(a, e, i)
                }) : void 0
            }, getRawValue: function (e, t) {
                return Lu(this.getData(t), e)
            }, formatTooltip: function () {
            }
        };

        function Vu(e) {
            return new Ku(e)
        }

        function Ku(e) {
            e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0, this.context
        }

        var Gu = Ku.prototype;
        Gu.perform = function (e) {
            var t, i = this._upstream, n = e && e.skip;
            if (this._dirty && i) {
                var o = this.context;
                o.data = o.outputData = i.context.outputData
            }
            this.__pipeline && (this.__pipeline.currentTask = this), this._plan && !n && (t = this._plan(this.context));
            var a, r = u(this._modBy), s = this._modDataCount || 0, l = u(e && e.modBy), d = e && e.modDataCount || 0;

            function u(e) {
                return 1 <= e || (e = 1), e
            }

            r === l && s === d || (t = "reset"), !this._dirty && "reset" !== t || (this._dirty = !1, a = function (e, t) {
                var i, n;
                e._dueIndex = e._outputDueEnd = e._dueEnd = 0, e._settedOutputEnd = null, !t && e._reset && ((i = e._reset(e.context)) && i.progress && (n = i.forceFirstProgress, i = i.progress), M(i) && !i.length && (i = null)), e._progress = i, e._modBy = e._modDataCount = null;
                var o = e._downstream;
                return o && o.dirty(), n
            }(this, n)), this._modBy = l, this._modDataCount = d;
            var c = e && e.step;
            if (this._dueEnd = i ? i._outputDueEnd : this._count ? this._count(this.context) : 1 / 0, this._progress) {
                var h = this._dueIndex, f = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd);
                if (!n && (a || h < f)) {
                    var p = this._progress;
                    if (M(p)) for (var g = 0; g < p.length; g++) Qu(this, p[g], h, f, l, d); else Qu(this, p, h, f, l, d)
                }
                this._dueIndex = f;
                var m = null != this._settedOutputEnd ? this._settedOutputEnd : f;
                this._outputDueEnd = m
            } else this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd;
            return this.unfinished()
        };
        var Wu, ju, Hu, zu, Xu, qu, Yu = qu = {
            reset: function (e, t, i, n) {
                ju = e, Wu = t, Hu = i, zu = n, Xu = Math.ceil(zu / Hu), qu.next = 1 < Hu && 0 < zu ? Zu : Ju
            }
        };

        function Ju() {
            return ju < Wu ? ju++ : null
        }

        function Zu() {
            var e = ju % Xu * Hu + Math.ceil(ju / Xu), t = Wu <= ju ? null : e < zu ? e : ju;
            return ju++, t
        }

        function Qu(e, t, i, n, o, a) {
            Yu.reset(i, n, o, a), e._callingProgress = t, e._callingProgress({
                start: i,
                end: n,
                count: n - i,
                next: Yu.next
            }, e.context)
        }

        Gu.dirty = function () {
            this._dirty = !0, this._onDirty && this._onDirty(this.context)
        }, Gu.unfinished = function () {
            return this._progress && this._dueIndex < this._dueEnd
        }, Gu.pipe = function (e) {
            this._downstream === e && !this._dirty || ((this._downstream = e)._upstream = this, e.dirty())
        }, Gu.dispose = function () {
            this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0)
        }, Gu.getUpstream = function () {
            return this._upstream
        }, Gu.getDownstream = function () {
            return this._downstream
        }, Gu.setOutputEnd = function (e) {
            this._outputDueEnd = this._settedOutputEnd = e
        };
        var $u = Go(), ec = Sd.extend({
            type: "series.__base__",
            seriesIndex: 0,
            coordinateSystem: null,
            defaultOption: null,
            legendVisualProvider: null,
            visualColorAccessPath: "itemStyle.color",
            visualBorderColorAccessPath: "itemStyle.borderColor",
            layoutMode: null,
            init: function (e, t, i, n) {
                this.seriesIndex = this.componentIndex, this.dataTask = Vu({
                    count: ic,
                    reset: nc
                }), this.dataTask.context = {model: this}, this.mergeDefaultAndTheme(e, i), Gd(this);
                var o = this.getInitialData(e, i);
                ac(o, this), this.dataTask.context.data = o, $u(this).dataBeforeProcessed = o, tc(this)
            },
            mergeDefaultAndTheme: function (e, t) {
                var i = this.layoutMode, n = i ? Td(e) : {}, o = this.subType;
                Sd.hasClass(o) && (o += "Series"), v(e, t.getTheme().get(this.subType)), v(e, this.getDefaultOption()), Mo(e, "label", ["show"]), this.fillDataTextStyle(e.data), i && yd(e, n, i)
            },
            mergeOption: function (e, t) {
                e = v(this.option, e, !0), this.fillDataTextStyle(e.data);
                var i = this.layoutMode;
                i && yd(this.option, e, i), Gd(this);
                var n = this.getInitialData(e, t);
                ac(n, this), this.dataTask.dirty(), this.dataTask.context.data = n, $u(this).dataBeforeProcessed = n, tc(this)
            },
            fillDataTextStyle: function (e) {
                if (e && !U(e)) for (var t = ["show"], i = 0; i < e.length; i++) e[i] && e[i].label && Mo(e[i], "label", t)
            },
            getInitialData: function () {
            },
            appendData: function (e) {
                this.getRawData().appendData(e.data)
            },
            getData: function (e) {
                var t = sc(this);
                if (t) {
                    var i = t.context.data;
                    return null == e ? i : i.getLinkedData(e)
                }
                return $u(this).data
            },
            setData: function (e) {
                var t = sc(this);
                if (t) {
                    var i = t.context;
                    i.data !== e && t.modifyOutputEnd && t.setOutputEnd(e.count()), i.outputData = e, t !== this.dataTask && (i.data = e)
                }
                $u(this).data = e
            },
            getSource: function () {
                return Kd(this).source
            },
            getRawData: function () {
                return $u(this).dataBeforeProcessed
            },
            getBaseAxis: function () {
                var e = this.coordinateSystem;
                return e && e.getBaseAxis && e.getBaseAxis()
            },
            formatTooltip: function (e, t, i, n) {
                var o = this, a = "html" === (n = n || "html") ? "<br/>" : "\n", r = "richText" === n, s = {}, l = 0,
                    d = this.getData(), u = d.mapDimension("defaultedTooltip", !0), c = u.length,
                    h = this.getRawValue(e), f = M(h), p = d.getItemVisual(e, "color");
                R(p) && p.colorStops && (p = (p.colorStops[0] || {}).color), p = p || "transparent";
                var g = (1 < c || f && !c ? function (i) {
                        var a = N(i, function (e, t, i) {
                            var n = d.getDimensionInfo(i);
                            return e | (n && !1 !== n.tooltip && null != n.displayName)
                        }, 0), c = [];

                        function h(e, i) {
                            var u = d.getDimensionInfo(i);
                            if (u && !1 !== u.otherDims.tooltip) {
                                var h = u.type, f = "sub" + o.seriesIndex + "at" + l,
                                    g = od({color: p, type: "subItem", renderMode: n, markerId: f}),
                                    m = "string" == typeof g ? g : g.content,
                                    v = (a ? m + $l(u.displayName || "-") + ": " : "") + $l("ordinal" === h ? e + "" : "time" === h ? t ? "" : rd("yyyy/MM/dd hh:mm:ss", e) : ql(e));
                                v && c.push(v), r && (s[f] = p, ++l)
                            }
                        }

                        u.length ? D(u, function (t) {
                            h(Lu(d, e, t), t)
                        }) : D(i, h);
                        var f = a ? r ? "\n" : "<br/>" : "", g = f + c.join(f || ", ");
                        return {renderMode: n, content: g, style: s}
                    }(h) : function (e) {
                        return {renderMode: n, content: $l(ql(e)), style: s}
                    }(c ? Lu(d, e, u[0]) : f ? h[0] : h)).content, m = o.seriesIndex + "at" + l,
                    v = od({color: p, type: "item", renderMode: n, markerId: m});
                s[m] = p, ++l;
                var y = d.getName(e), T = this.name;
                Uo(this) || (T = ""), T = T ? $l(T) + (t ? ": " : a) : "";
                var w = "string" == typeof v ? v : v.content;
                return {html: t ? w + T + g : T + w + (y ? $l(y) + ": " + g : g), markers: s}
            },
            isAnimationEnabled: function () {
                if (o.node) return !1;
                var e = this.getShallow("animation");
                return e && this.getData().count() > this.getShallow("animationThreshold") && (e = !1), e
            },
            restoreData: function () {
                this.dataTask.dirty()
            },
            getColorFromPalette: function (e, t, i) {
                var n = this.ecModel, o = xd.getColorFromPalette.call(this, e, t, i);
                return o = o || n.getColorFromPalette(e, t, i)
            },
            coordDimToDataDim: function (e) {
                return this.getRawData().mapDimension(e, !0)
            },
            getProgressive: function () {
                return this.get("progressive")
            },
            getProgressiveThreshold: function () {
                return this.get("progressiveThreshold")
            },
            getAxisTooltipData: null,
            getTooltipPosition: null,
            pipeTask: null,
            preventIncremental: null,
            pipelineContext: null
        });

        function tc(e) {
            var t = e.name;
            Uo(e) || (e.name = function (e) {
                var t = e.getRawData(), i = t.mapDimension("seriesName", !0), n = [];
                return D(i, function (e) {
                    var i = t.getDimensionInfo(e);
                    i.displayName && n.push(i.displayName)
                }), n.join(" ")
            }(e) || t)
        }

        function ic(e) {
            return e.model.getRawData().count()
        }

        function nc(e) {
            var t = e.model;
            return t.setData(t.getRawData().cloneShallow()), oc
        }

        function oc(e, t) {
            t.outputData && e.end > t.outputData.count() && t.model.getRawData().cloneShallow(t.outputData)
        }

        function ac(e, t) {
            D(e.CHANGABLE_METHODS, function (i) {
                e.wrapMethod(i, P(rc, t))
            })
        }

        function rc(e) {
            var t = sc(e);
            t && t.setOutputEnd(this.count())
        }

        function sc(e) {
            var t = (e.ecModel || {}).scheduler, i = t && t.getPipeline(e.uid);
            if (i) {
                var n = i.currentTask;
                if (n) {
                    var o = n.agentStubMap;
                    o && (n = o.get(e.uid))
                }
                return n
            }
        }

        S(ec, Uu), S(ec, xd);
        var lc = function () {
            this.group = new Ai, this.uid = Dl("viewComponent")
        };
        lc.prototype = {
            constructor: lc, init: function (e, t) {
            }, render: function (e, t, i, n) {
            }, dispose: function () {
            }, filterForExposedEvent: null
        };
        var dc = lc.prototype;

        function uc() {
            var e = Go();
            return function (t) {
                var i = e(t), n = t.pipelineContext, o = i.large, a = i.progressiveRender, r = i.large = n && n.large,
                    s = i.progressiveRender = n && n.progressiveRender;
                return !!(o ^ r || a ^ s) && "reset"
            }
        }

        dc.updateView = dc.updateLayout = dc.updateVisual = function (e, t, i, n) {
        }, Qo(lc), na(lc, {registerWhenExtend: !0});
        var cc = Go(), hc = uc();

        function fc() {
            this.group = new Ai, this.uid = Dl("viewChart"), this.renderTask = Vu({
                plan: vc,
                reset: yc
            }), this.renderTask.context = {view: this}
        }

        var pc = fc.prototype = {
            type: "chart",
            init: function (e, t) {
            },
            render: function (e, t, i, n) {
            },
            highlight: function (e, t, i, n) {
                mc(e.getData(), n, "emphasis")
            },
            downplay: function (e, t, i, n) {
                mc(e.getData(), n, "normal")
            },
            remove: function (e, t) {
                this.group.removeAll()
            },
            dispose: function () {
            },
            incrementalPrepareRender: null,
            incrementalRender: null,
            updateTransform: null,
            filterForExposedEvent: null
        };

        function gc(e, t, i) {
            if (e && (e.trigger(t, i), e.isGroup && !Xs(e))) for (var n = 0, o = e.childCount(); n < o; n++) gc(e.childAt(n), t, i)
        }

        function mc(e, t, i) {
            var n = Ko(e, t), o = t && null != t.highlightKey ? qs(t.highlightKey) : null;
            null != n ? D(Po(n), function (t) {
                gc(e.getItemGraphicEl(t), i, o)
            }) : e.eachItemGraphicEl(function (e) {
                gc(e, i, o)
            })
        }

        function vc(e) {
            return hc(e.model)
        }

        function yc(e) {
            var t = e.model, i = e.ecModel, n = e.api, o = e.payload, a = t.pipelineContext.progressiveRender,
                r = e.view, s = o && cc(o).updateMethod, l = a ? "incrementalPrepareRender" : s && r[s] ? s : "render";
            return "render" !== l && r[l](t, i, n, o), Tc[l]
        }

        pc.updateView = pc.updateLayout = pc.updateVisual = function (e, t, i, n) {
            this.render(e, t, i, n)
        }, Qo(fc), na(fc, {registerWhenExtend: !0}), fc.markUpdateMethod = function (e, t) {
            cc(e).updateMethod = t
        };
        var Tc = {
            incrementalPrepareRender: {
                progress: function (e, t) {
                    t.view.incrementalRender(e, t.model, t.ecModel, t.api, t.payload)
                }
            }, render: {
                forceFirstProgress: !0, progress: function (e, t) {
                    t.view.render(t.model, t.ecModel, t.api, t.payload)
                }
            }
        }, wc = "\0__throttleOriginMethod", kc = "\0__throttleRate", Cc = "\0__throttleType";

        function bc(e, t, i) {
            var n, o, a, r, s, l = 0, d = 0, u = null;

            function c() {
                d = (new Date).getTime(), u = null, e.apply(a, r || [])
            }

            function h() {
                n = (new Date).getTime(), a = this, r = arguments;
                var e = s || t, h = s || i;
                s = null, o = n - (h ? l : d) - e, clearTimeout(u), h ? u = setTimeout(c, e) : 0 <= o ? c() : u = setTimeout(c, -o), l = n
            }

            return t = t || 0, h.clear = function () {
                u && (clearTimeout(u), u = null)
            }, h.debounceNextCall = function (e) {
                s = e
            }, h
        }

        function Ic(e, t, i, n) {
            var o = e[t];
            if (o) {
                var a = o[wc] || o, r = o[Cc];
                if (o[kc] !== i || r !== n) {
                    if (null == i || !n) return e[t] = a;
                    (o = e[t] = bc(a, i, "debounce" === n))[wc] = a, o[Cc] = n, o[kc] = i
                }
                return o
            }
        }

        function Sc(e, t) {
            var i = e[t];
            i && i[wc] && (e[t] = i[wc])
        }

        var _c = {
            createOnAllSeries: !0, performRawSeries: !0, reset: function (e, t) {
                var i = e.getData(), n = (e.visualColorAccessPath || "itemStyle.color").split("."), o = e.get(n),
                    a = !F(o) || o instanceof as ? null : o;
                o && !a || (o = e.getColorFromPalette(e.name, null, t.getSeriesCount())), i.setVisual("color", o);
                var r = (e.visualBorderColorAccessPath || "itemStyle.borderColor").split("."), s = e.get(r);
                if (i.setVisual("borderColor", s), !t.isSeriesFiltered(e)) return a && i.each(function (t) {
                    i.setItemVisual(t, "color", a(e.getDataParams(t)))
                }), {
                    dataEach: i.hasItemOption ? function (e, t) {
                        var i = e.getItemModel(t), o = i.get(n, !0), a = i.get(r, !0);
                        null != o && e.setItemVisual(t, "color", o), null != a && e.setItemVisual(t, "borderColor", a)
                    } : null
                }
            }
        }, Dc = {
            legend: {selector: {all: "全选", inverse: "反选"}},
            toolbox: {
                brush: {
                    title: {
                        rect: "矩形选择",
                        polygon: "圈选",
                        lineX: "横向选择",
                        lineY: "纵向选择",
                        keep: "保持选择",
                        clear: "清除选择"
                    }
                },
                dataView: {title: "数据视图", lang: ["数据视图", "关闭", "刷新"]},
                dataZoom: {title: {zoom: "区域缩放", back: "区域缩放还原"}},
                magicType: {title: {line: "切换为折线图", bar: "切换为柱状图", stack: "切换为堆叠", tiled: "切换为平铺"}},
                restore: {title: "还原"},
                saveAsImage: {title: "保存为图片", lang: ["右键另存为图片"]}
            },
            series: {
                typeNames: {
                    pie: "饼图",
                    bar: "柱状图",
                    line: "折线图",
                    scatter: "散点图",
                    effectScatter: "涟漪散点图",
                    radar: "雷达图",
                    tree: "树图",
                    treemap: "矩形树图",
                    boxplot: "箱型图",
                    candlestick: "K线图",
                    k: "K线图",
                    heatmap: "热力图",
                    map: "地图",
                    parallel: "平行坐标图",
                    lines: "线图",
                    graph: "关系图",
                    sankey: "桑基图",
                    funnel: "漏斗图",
                    gauge: "仪表盘图",
                    pictorialBar: "象形柱图",
                    themeRiver: "主题河流图",
                    sunburst: "旭日图"
                }
            },
            aria: {
                general: {withTitle: "这是一个关于“{title}”的图表。", withoutTitle: "这是一个图表，"},
                series: {
                    single: {
                        prefix: "",
                        withName: "图表类型是{seriesType}，表示{seriesName}。",
                        withoutName: "图表类型是{seriesType}。"
                    },
                    multiple: {
                        prefix: "它由{seriesCount}个图表系列组成。",
                        withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",
                        withoutName: "第{seriesId}个系列是一个{seriesType}，",
                        separator: {middle: "；", end: "。"}
                    }
                },
                data: {
                    allData: "其数据是——",
                    partialData: "其中，前{displayCnt}项是——",
                    withName: "{name}的数据是{value}",
                    withoutName: "{value}",
                    separator: {middle: "，", end: ""}
                }
            }
        }, Ac = function (e, t) {
            var i = t.getModel("aria");
            if (i.get("show")) if (i.get("description")) e.setAttribute("aria-label", i.get("description")); else {
                var n = 0;
                t.eachSeries(function (e, t) {
                    ++n
                }, this);
                var o, a = i.get("data.maxCount") || 10, r = i.get("series.maxCount") || 10, s = Math.min(n, r);
                if (!(n < 1)) {
                    var l = function () {
                        var e = t.getModel("title").option;
                        return e && e.length && (e = e[0]), e && e.text
                    }();
                    o = l ? u(c("general.withTitle"), {title: l}) : c("general.withoutTitle");
                    var d = [];
                    o += u(c(1 < n ? "series.multiple.prefix" : "series.single.prefix"), {seriesCount: n}), t.eachSeries(function (e, t) {
                        if (t < s) {
                            var i, o = e.get("name"), r = "series." + (1 < n ? "multiple" : "single") + ".";
                            i = u(i = c(o ? r + "withName" : r + "withoutName"), {
                                seriesId: e.seriesIndex,
                                seriesName: e.get("name"),
                                seriesType: function (e) {
                                    return Dc.series.typeNames[e] || "自定义图"
                                }(e.subType)
                            });
                            var l = e.getData();
                            (window.data = l).count() > a ? i += u(c("data.partialData"), {displayCnt: a}) : i += c("data.allData");
                            for (var h = [], f = 0; f < l.count(); f++) if (f < a) {
                                var p = l.getName(f), g = Lu(l, f);
                                h.push(u(c(p ? "data.withName" : "data.withoutName"), {name: p, value: g}))
                            }
                            i += h.join(c("data.separator.middle")) + c("data.separator.end"), d.push(i)
                        }
                    }), o += d.join(c("series.multiple.separator.middle")) + c("series.multiple.separator.end"), e.setAttribute("aria-label", o)
                }
            }

            function u(e, t) {
                if ("string" != typeof e) return e;
                var i = e;
                return D(t, function (e, t) {
                    i = i.replace(new RegExp("\\{\\s*" + t + "\\s*\\}", "g"), e)
                }), i
            }

            function c(e) {
                var t = i.get(e);
                if (null != t) return t;
                for (var n = e.split("."), o = Dc.aria, a = 0; a < n.length; ++a) o = o[n[a]];
                return o
            }
        }, Nc = Math.PI;

        function xc(e, t, i, n) {
            this.ecInstance = e, this.api = t, this.unfinished, i = this._dataProcessorHandlers = i.slice(), n = this._visualHandlers = n.slice(), this._allHandlers = i.concat(n), this._stageTaskMap = $()
        }

        var Ec = xc.prototype;

        function Oc(e, t, i, n, o) {
            var a;

            function r(e, t) {
                return e.setDirty && (!e.dirtyMap || e.dirtyMap.get(t.__pipeline.id))
            }

            o = o || {}, D(t, function (t, s) {
                if (!o.visualType || o.visualType === t.visualType) {
                    var l = e._stageTaskMap.get(t.uid), d = l.seriesTaskMap, u = l.overallTask;
                    if (u) {
                        var c, h = u.agentStubMap;
                        h.each(function (e) {
                            r(o, e) && (e.dirty(), c = !0)
                        }), c && u.dirty(), Pc(u, n);
                        var f = e.getPerformArgs(u, o.block);
                        h.each(function (e) {
                            e.perform(f)
                        }), a |= u.perform(f)
                    } else d && d.each(function (s, l) {
                        r(o, s) && s.dirty();
                        var d = e.getPerformArgs(s, o.block);
                        d.skip = !t.performRawSeries && i.isSeriesFiltered(s.context.model), Pc(s, n), a |= s.perform(d)
                    })
                }
            }), e.unfinished |= a
        }

        Ec.restoreData = function (e, t) {
            e.restoreData(t), this._stageTaskMap.each(function (e) {
                var t = e.overallTask;
                t && t.dirty()
            })
        }, Ec.getPerformArgs = function (e, t) {
            if (e.__pipeline) {
                var i = this._pipelineMap.get(e.__pipeline.id), n = i.context,
                    o = !t && i.progressiveEnabled && (!n || n.progressiveRender) && e.__idxInPipeline > i.blockIndex ? i.step : null,
                    a = n && n.modDataCount;
                return {step: o, modBy: null != a ? Math.ceil(a / o) : null, modDataCount: a}
            }
        }, Ec.getPipeline = function (e) {
            return this._pipelineMap.get(e)
        }, Ec.updateStreamModes = function (e, t) {
            var i = this._pipelineMap.get(e.uid), n = e.getData().count(),
                o = i.progressiveEnabled && t.incrementalPrepareRender && n >= i.threshold,
                a = e.get("large") && n >= e.get("largeThreshold"),
                r = "mod" === e.get("progressiveChunkMode") ? n : null;
            e.pipelineContext = i.context = {progressiveRender: o, modDataCount: r, large: a}
        }, Ec.restorePipelines = function (e) {
            var t = this, i = t._pipelineMap = $();
            e.eachSeries(function (e) {
                var n = e.getProgressive(), o = e.uid;
                i.set(o, {
                    id: o,
                    head: null,
                    tail: null,
                    threshold: e.getProgressiveThreshold(),
                    progressiveEnabled: n && !(e.preventIncremental && e.preventIncremental()),
                    blockIndex: -1,
                    step: Math.round(n || 700),
                    count: 0
                }), Wc(t, e, e.dataTask)
            })
        }, Ec.prepareStageTasks = function () {
            var e = this._stageTaskMap, t = this.ecInstance.getModel(), i = this.api;
            D(this._allHandlers, function (n) {
                var o = e.get(n.uid) || e.set(n.uid, []);
                n.reset && function (e, t, i, n, o) {
                    var a = i.seriesTaskMap || (i.seriesTaskMap = $()), r = t.seriesType, s = t.getTargetSeries;

                    function l(i) {
                        var r = i.uid, s = a.get(r) || a.set(r, Vu({plan: Bc, reset: Uc, count: Gc}));
                        s.context = {
                            model: i,
                            ecModel: n,
                            api: o,
                            useClearVisual: t.isVisual && !t.isLayout,
                            plan: t.plan,
                            reset: t.reset,
                            scheduler: e
                        }, Wc(e, i, s)
                    }

                    t.createOnAllSeries ? n.eachRawSeries(l) : r ? n.eachRawSeriesByType(r, l) : s && s(n, o).each(l);
                    var d = e._pipelineMap;
                    a.each(function (e, t) {
                        d.get(t) || (e.dispose(), a.removeKey(t))
                    })
                }(this, n, o, t, i), n.overallReset && function (e, t, i, n, o) {
                    var a = i.overallTask = i.overallTask || Vu({reset: Mc});
                    a.context = {ecModel: n, api: o, overallReset: t.overallReset, scheduler: e};
                    var r = a.agentStubMap = a.agentStubMap || $(), s = t.seriesType, l = t.getTargetSeries, d = !0,
                        u = t.modifyOutputEnd;

                    function c(t) {
                        var i = t.uid, n = r.get(i);
                        n || (n = r.set(i, Vu({reset: Fc, onDirty: Rc})), a.dirty()), n.context = {
                            model: t,
                            overallProgress: d,
                            modifyOutputEnd: u
                        }, n.agent = a, n.__block = d, Wc(e, t, n)
                    }

                    s ? n.eachRawSeriesByType(s, c) : l ? l(n, o).each(c) : (d = !1, D(n.getSeries(), c));
                    var h = e._pipelineMap;
                    r.each(function (e, t) {
                        h.get(t) || (e.dispose(), a.dirty(), r.removeKey(t))
                    })
                }(this, n, o, t, i)
            }, this)
        }, Ec.prepareView = function (e, t, i, n) {
            var o = e.renderTask, a = o.context;
            a.model = t, a.ecModel = i, a.api = n, o.__block = !e.incrementalPrepareRender, Wc(this, t, o)
        }, Ec.performDataProcessorTasks = function (e, t) {
            Oc(this, this._dataProcessorHandlers, e, t, {block: !0})
        }, Ec.performVisualTasks = function (e, t, i) {
            Oc(this, this._visualHandlers, e, t, i)
        }, Ec.performSeriesTasks = function (e) {
            var t;
            e.eachSeries(function (e) {
                t |= e.dataTask.perform()
            }), this.unfinished |= t
        }, Ec.plan = function () {
            this._pipelineMap.each(function (e) {
                var t = e.tail;
                do {
                    if (t.__block) {
                        e.blockIndex = t.__idxInPipeline;
                        break
                    }
                    t = t.getUpstream()
                } while (t)
            })
        };
        var Pc = Ec.updatePayload = function (e, t) {
            "remain" !== t && (e.context.payload = t)
        };

        function Mc(e) {
            e.overallReset(e.ecModel, e.api, e.payload)
        }

        function Fc(e, t) {
            return e.overallProgress && Lc
        }

        function Lc() {
            this.agent.dirty(), this.getDownstream().dirty()
        }

        function Rc() {
            this.agent && this.agent.dirty()
        }

        function Bc(e) {
            return e.plan && e.plan(e.model, e.ecModel, e.api, e.payload)
        }

        function Uc(e) {
            e.useClearVisual && e.data.clearAllVisual();
            var t = e.resetDefines = Po(e.reset(e.model, e.ecModel, e.api, e.payload));
            return 1 < t.length ? A(t, function (e, t) {
                return Kc(t)
            }) : Vc
        }

        var Vc = Kc(0);

        function Kc(e) {
            return function (t, i) {
                var n = i.data, o = i.resetDefines[e];
                if (o && o.dataEach) for (var a = t.start; a < t.end; a++) o.dataEach(n, a); else o && o.progress && o.progress(t, n)
            }
        }

        function Gc(e) {
            return e.data.count()
        }

        function Wc(e, t, i) {
            var n = t.uid, o = e._pipelineMap.get(n);
            o.head || (o.head = i), o.tail && o.tail.pipe(i), (o.tail = i).__idxInPipeline = o.count++, i.__pipeline = o
        }

        xc.wrapStageHandler = function (e, t) {
            return F(e) && (e = {
                overallReset: e, seriesType: function (e) {
                    jc = null;
                    try {
                        e(Hc, zc)
                    } catch (e) {
                    }
                    return jc
                }(e)
            }), e.uid = Dl("stageHandler"), t && (e.visualType = t), e
        };
        var jc, Hc = {}, zc = {};

        function Xc(e, t) {
            for (var i in t.prototype) e[i] = te
        }

        function qc() {
            return {
                axisLine: {lineStyle: {color: Zc}},
                axisTick: {lineStyle: {color: Zc}},
                axisLabel: {textStyle: {color: Zc}},
                splitLine: {lineStyle: {type: "dashed", color: "#aaa"}},
                splitArea: {areaStyle: {color: Zc}}
            }
        }

        Xc(Hc, Jd), Xc(zc, eu), Hc.eachSeriesByType = Hc.eachRawSeriesByType = function (e) {
            jc = e
        }, Hc.eachComponent = function (e) {
            "series" === e.mainType && e.subType && (jc = e.subType)
        };
        var Yc = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"],
            Jc = {
                color: Yc,
                colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], Yc]
            }, Zc = "#eee",
            Qc = ["#dd6b66", "#759aa0", "#e69d87", "#8dc1a9", "#ea7e53", "#eedd78", "#73a373", "#73b9bc", "#7289ab", "#91ca8c", "#f49f42"],
            $c = {
                color: Qc,
                backgroundColor: "#333",
                tooltip: {axisPointer: {lineStyle: {color: Zc}, crossStyle: {color: Zc}, label: {color: "#000"}}},
                legend: {textStyle: {color: Zc}},
                textStyle: {color: Zc},
                title: {textStyle: {color: Zc}},
                toolbox: {iconStyle: {normal: {borderColor: Zc}}},
                dataZoom: {textStyle: {color: Zc}},
                visualMap: {textStyle: {color: Zc}},
                timeline: {
                    lineStyle: {color: Zc},
                    itemStyle: {normal: {color: Qc[1]}},
                    label: {normal: {textStyle: {color: Zc}}},
                    controlStyle: {normal: {color: Zc, borderColor: Zc}}
                },
                timeAxis: qc(),
                logAxis: qc(),
                valueAxis: qc(),
                categoryAxis: qc(),
                line: {symbol: "circle"},
                graph: {color: Qc},
                gauge: {title: {textStyle: {color: Zc}}},
                candlestick: {
                    itemStyle: {
                        normal: {
                            color: "#FD1050",
                            color0: "#0CF49B",
                            borderColor: "#FD1050",
                            borderColor0: "#0CF49B"
                        }
                    }
                }
            };
        $c.categoryAxis.splitLine.show = !1, Sd.extend({
            type: "dataset",
            defaultOption: {seriesLayoutBy: Rd, sourceHeader: null, dimensions: null, source: null},
            optionUpdated: function () {
                !function (e) {
                    var t = e.option.source, i = Fd;
                    if (U(t)) i = Ld; else if (M(t)) {
                        0 === t.length && (i = Od);
                        for (var n = 0, o = t.length; n < o; n++) {
                            var a = t[n];
                            if (null != a) {
                                if (M(a)) {
                                    i = Od;
                                    break
                                }
                                if (R(a)) {
                                    i = Pd;
                                    break
                                }
                            }
                        }
                    } else if (R(t)) {
                        for (var r in t) if (t.hasOwnProperty(r) && _(t[r])) {
                            i = Md;
                            break
                        }
                    } else if (null != t) throw new Error("Invalid data");
                    Kd(e).sourceFormat = i
                }(this)
            }
        }), lc.extend({type: "dataset"});
        var eh = kr.extend({
            type: "ellipse", shape: {cx: 0, cy: 0, rx: 0, ry: 0}, buildPath: function (e, t) {
                var i = t.cx, n = t.cy, o = t.rx, a = t.ry, r = .5522848 * o, s = .5522848 * a;
                e.moveTo(i - o, n), e.bezierCurveTo(i - o, n - s, i - r, n - a, i, n - a), e.bezierCurveTo(i + r, n - a, i + o, n - s, i + o, n), e.bezierCurveTo(i + o, n + s, i + r, n + a, i, n + a), e.bezierCurveTo(i - r, n + a, i - o, n + s, i - o, n), e.closePath()
            }
        }), th = /[\s,]+/;

        function ih(e) {
            for (L(e) && (e = (new DOMParser).parseFromString(e, "text/xml")), 9 === e.nodeType && (e = e.firstChild); "svg" !== e.nodeName.toLowerCase() || 1 !== e.nodeType;) e = e.nextSibling;
            return e
        }

        function nh() {
            this._defs = {}, this._root = null, this._isDefine = !1, this._isText = !1
        }

        nh.prototype.parse = function (e, t) {
            t = t || {};
            var i = ih(e);
            if (!i) throw new Error("Illegal svg");
            var n = new Ai;
            this._root = n;
            var o = i.getAttribute("viewBox") || "", a = parseFloat(i.getAttribute("width") || t.width),
                r = parseFloat(i.getAttribute("height") || t.height);
            isNaN(a) && (a = null), isNaN(r) && (r = null), dh(i, n, null, !0);
            for (var s, l, d = i.firstChild; d;) this._parseNode(d, n), d = d.nextSibling;
            if (o) {
                var u = q(o).split(th);
                4 <= u.length && (s = {
                    x: parseFloat(u[0] || 0),
                    y: parseFloat(u[1] || 0),
                    width: parseFloat(u[2]),
                    height: parseFloat(u[3])
                })
            }
            if (s && null != a && null != r && (l = ph(s, a, r), !t.ignoreViewBox)) {
                var c = n;
                (n = new Ai).add(c), c.scale = l.scale.slice(), c.position = l.position.slice()
            }
            return t.ignoreRootClip || null == a || null == r || n.setClipPath(new es({
                shape: {
                    x: 0,
                    y: 0,
                    width: a,
                    height: r
                }
            })), {root: n, width: a, height: r, viewBoxRect: s, viewBoxTransform: l}
        }, nh.prototype._parseNode = function (e, t) {
            var i, n, o = e.nodeName.toLowerCase();
            if ("defs" === o ? this._isDefine = !0 : "text" === o && (this._isText = !0), this._isDefine) {
                if (n = ah[o]) {
                    var a = n.call(this, e), r = e.getAttribute("id");
                    r && (this._defs[r] = a)
                }
            } else (n = oh[o]) && (i = n.call(this, e, t), t.add(i));
            for (var s = e.firstChild; s;) 1 === s.nodeType && this._parseNode(s, i), 3 === s.nodeType && this._isText && this._parseText(s, i), s = s.nextSibling;
            "defs" === o ? this._isDefine = !1 : "text" === o && (this._isText = !1)
        }, nh.prototype._parseText = function (e, t) {
            if (1 === e.nodeType) {
                var i = e.getAttribute("dx") || 0, n = e.getAttribute("dy") || 0;
                this._textX += parseFloat(i), this._textY += parseFloat(n)
            }
            var o = new Ur({
                style: {text: e.textContent, transformText: !0},
                position: [this._textX || 0, this._textY || 0]
            });
            rh(t, o), dh(e, o, this._defs);
            var a = o.style.fontSize;
            a && a < 9 && (o.style.fontSize = 9, o.scale = o.scale || [1, 1], o.scale[0] *= a / 9, o.scale[1] *= a / 9);
            var r = o.getBoundingRect();
            return this._textX += r.width, t.add(o), o
        };
        var oh = {
            g: function (e, t) {
                var i = new Ai;
                return rh(t, i), dh(e, i, this._defs), i
            }, rect: function (e, t) {
                var i = new es;
                return rh(t, i), dh(e, i, this._defs), i.setShape({
                    x: parseFloat(e.getAttribute("x") || 0),
                    y: parseFloat(e.getAttribute("y") || 0),
                    width: parseFloat(e.getAttribute("width") || 0),
                    height: parseFloat(e.getAttribute("height") || 0)
                }), i
            }, circle: function (e, t) {
                var i = new Kr;
                return rh(t, i), dh(e, i, this._defs), i.setShape({
                    cx: parseFloat(e.getAttribute("cx") || 0),
                    cy: parseFloat(e.getAttribute("cy") || 0),
                    r: parseFloat(e.getAttribute("r") || 0)
                }), i
            }, line: function (e, t) {
                var i = new is;
                return rh(t, i), dh(e, i, this._defs), i.setShape({
                    x1: parseFloat(e.getAttribute("x1") || 0),
                    y1: parseFloat(e.getAttribute("y1") || 0),
                    x2: parseFloat(e.getAttribute("x2") || 0),
                    y2: parseFloat(e.getAttribute("y2") || 0)
                }), i
            }, ellipse: function (e, t) {
                var i = new eh;
                return rh(t, i), dh(e, i, this._defs), i.setShape({
                    cx: parseFloat(e.getAttribute("cx") || 0),
                    cy: parseFloat(e.getAttribute("cy") || 0),
                    rx: parseFloat(e.getAttribute("rx") || 0),
                    ry: parseFloat(e.getAttribute("ry") || 0)
                }), i
            }, polygon: function (e, t) {
                var i = e.getAttribute("points");
                i = i && sh(i);
                var n = new Xr({shape: {points: i || []}});
                return rh(t, n), dh(e, n, this._defs), n
            }, polyline: function (e, t) {
                var i = new kr;
                rh(t, i), dh(e, i, this._defs);
                var n = e.getAttribute("points");
                return n = n && sh(n), new qr({shape: {points: n || []}})
            }, image: function (e, t) {
                var i = new Yn;
                return rh(t, i), dh(e, i, this._defs), i.setStyle({
                    image: e.getAttribute("xlink:href"),
                    x: e.getAttribute("x"),
                    y: e.getAttribute("y"),
                    width: e.getAttribute("width"),
                    height: e.getAttribute("height")
                }), i
            }, text: function (e, t) {
                var i = e.getAttribute("x") || 0, n = e.getAttribute("y") || 0, o = e.getAttribute("dx") || 0,
                    a = e.getAttribute("dy") || 0;
                this._textX = parseFloat(i) + parseFloat(o), this._textY = parseFloat(n) + parseFloat(a);
                var r = new Ai;
                return rh(t, r), dh(e, r, this._defs), r
            }, tspan: function (e, t) {
                var i = e.getAttribute("x"), n = e.getAttribute("y");
                null != i && (this._textX = parseFloat(i)), null != n && (this._textY = parseFloat(n));
                var o = e.getAttribute("dx") || 0, a = e.getAttribute("dy") || 0, r = new Ai;
                return rh(t, r), dh(e, r, this._defs), this._textX += o, this._textY += a, r
            }, path: function (e, t) {
                var i = Br(e.getAttribute("d") || "");
                return rh(t, i), dh(e, i, this._defs), i
            }
        }, ah = {
            lineargradient: function (e) {
                var t = parseInt(e.getAttribute("x1") || 0, 10), i = parseInt(e.getAttribute("y1") || 0, 10),
                    n = parseInt(e.getAttribute("x2") || 10, 10), o = parseInt(e.getAttribute("y2") || 0, 10),
                    a = new ds(t, i, n, o);
                return function (e, t) {
                    for (var i = e.firstChild; i;) {
                        if (1 === i.nodeType) {
                            var n = i.getAttribute("offset");
                            n = 0 < n.indexOf("%") ? parseInt(n, 10) / 100 : n ? parseFloat(n) : 0;
                            var o = i.getAttribute("stop-color") || "#000000";
                            t.addColorStop(n, o)
                        }
                        i = i.nextSibling
                    }
                }(e, a), a
            }, radialgradient: function (e) {
            }
        };

        function rh(e, t) {
            e && e.__inheritedStyle && (t.__inheritedStyle || (t.__inheritedStyle = {}), w(t.__inheritedStyle, e.__inheritedStyle))
        }

        function sh(e) {
            for (var t = q(e).split(th), i = [], n = 0; n < t.length; n += 2) {
                var o = parseFloat(t[n]), a = parseFloat(t[n + 1]);
                i.push([o, a])
            }
            return i
        }

        var lh = {
            fill: "fill",
            stroke: "stroke",
            "stroke-width": "lineWidth",
            opacity: "opacity",
            "fill-opacity": "fillOpacity",
            "stroke-opacity": "strokeOpacity",
            "stroke-dasharray": "lineDash",
            "stroke-dashoffset": "lineDashOffset",
            "stroke-linecap": "lineCap",
            "stroke-linejoin": "lineJoin",
            "stroke-miterlimit": "miterLimit",
            "font-family": "fontFamily",
            "font-size": "fontSize",
            "font-style": "fontStyle",
            "font-weight": "fontWeight",
            "text-align": "textAlign",
            "alignment-baseline": "textBaseline"
        };

        function dh(e, t, i, n) {
            var o = t.__inheritedStyle || {}, a = "text" === t.type;
            if (1 === e.nodeType && (function (e, t) {
                var i = e.getAttribute("transform");
                if (i) {
                    var n = null, o = [];
                    (i = i.replace(/,/g, " ")).replace(hh, function (e, t, i) {
                        o.push(t, i)
                    });
                    for (var a = o.length - 1; 0 < a; a -= 2) {
                        var r = o[a], s = o[a - 1];
                        switch (n = n || at(), s) {
                            case"translate":
                                r = q(r).split(th), dt(n, n, [parseFloat(r[0]), parseFloat(r[1] || 0)]);
                                break;
                            case"scale":
                                r = q(r).split(th), ct(n, n, [parseFloat(r[0]), parseFloat(r[1] || r[0])]);
                                break;
                            case"rotate":
                                r = q(r).split(th), ut(n, n, parseFloat(r[0]));
                                break;
                            case"skew":
                                r = q(r).split(th), console.warn("Skew transform is not supported yet");
                                break;
                            case"matrix":
                                r = q(r).split(th), n[0] = parseFloat(r[0]), n[1] = parseFloat(r[1]), n[2] = parseFloat(r[2]), n[3] = parseFloat(r[3]), n[4] = parseFloat(r[4]), n[5] = parseFloat(r[5])
                        }
                    }
                    t.setLocalTransform(n)
                }
            }(e, t), T(o, function (e) {
                var t = e.getAttribute("style"), i = {};
                if (!t) return i;
                var n, o = {};
                for (fh.lastIndex = 0; null != (n = fh.exec(t));) o[n[1]] = n[2];
                for (var a in lh) lh.hasOwnProperty(a) && null != o[a] && (i[lh[a]] = o[a]);
                return i
            }(e)), !n)) for (var r in lh) if (lh.hasOwnProperty(r)) {
                var s = e.getAttribute(r);
                null != s && (o[lh[r]] = s)
            }
            var l = a ? "textFill" : "fill", d = a ? "textStroke" : "stroke";
            t.style = t.style || new Wi;
            var u = t.style;
            null != o.fill && u.set(l, ch(o.fill, i)), null != o.stroke && u.set(d, ch(o.stroke, i)), D(["lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"], function (e) {
                var t = "lineWidth" === e && a ? "textStrokeWidth" : e;
                null != o[e] && u.set(t, parseFloat(o[e]))
            }), o.textBaseline && "auto" !== o.textBaseline || (o.textBaseline = "alphabetic"), "alphabetic" === o.textBaseline && (o.textBaseline = "bottom"), "start" === o.textAlign && (o.textAlign = "left"), "end" === o.textAlign && (o.textAlign = "right"), D(["lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign", "textBaseline"], function (e) {
                null != o[e] && u.set(e, o[e])
            }), o.lineDash && (t.style.lineDash = q(o.lineDash).split(th)), u[d] && "none" !== u[d] && (t[d] = !0), t.__inheritedStyle = o
        }

        var uh = /url\(\s*#(.*?)\)/;

        function ch(e, t) {
            var i = t && e && e.match(uh);
            return i ? t[q(i[1])] : e
        }

        var hh = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g, fh = /([^\s:;]+)\s*:\s*([^:;]+)/g;

        function ph(e, t, i) {
            var n = t / e.width, o = i / e.height, a = Math.min(n, o);
            return {scale: [a, a], position: [-(e.x + e.width / 2) * a + t / 2, -(e.y + e.height / 2) * a + i / 2]}
        }

        var gh = $(), mh = {
            registerMap: function (e, t, i) {
                var n;
                return D(n = M(t) ? t : t.svg ? [{
                    type: "svg",
                    source: t.svg,
                    specialAreas: t.specialAreas
                }] : (t.geoJson && !t.features && (i = t.specialAreas, t = t.geoJson), [{
                    type: "geoJSON",
                    source: t,
                    specialAreas: i
                }]), function (e) {
                    var t = e.type;
                    "geoJson" === t && (t = e.type = "geoJSON"), (0, vh[t])(e)
                }), gh.set(e, n)
            }, retrieveMap: function (e) {
                return gh.get(e)
            }
        }, vh = {
            geoJSON: function (e) {
                var t = e.source;
                e.geoJSON = L(t) ? "undefined" != typeof JSON && JSON.parse ? JSON.parse(t) : new Function("return (" + t + ");")() : t
            }, svg: function (e) {
                e.svgXML = ih(e.source)
            }
        }, yh = X, Th = D, wh = F, kh = R, Ch = Sd.parseClassType, bh = {
            PROCESSOR: {FILTER: 1e3, SERIES_FILTER: 800, STATISTIC: 5e3},
            VISUAL: {
                LAYOUT: 1e3,
                PROGRESSIVE_LAYOUT: 1100,
                GLOBAL: 2e3,
                CHART: 3e3,
                POST_CHART_LAYOUT: 3500,
                COMPONENT: 4e3,
                BRUSH: 5e3
            }
        }, Ih = "__flagInMainProcess", Sh = "__optionUpdated", _h = /^[a-zA-Z0-9_]+$/;

        function Dh(e, t) {
            return function (i, n, o) {
                !t && this._disposed || (i = i && i.toLowerCase(), Ne.prototype[e].call(this, i, n, o))
            }
        }

        function Ah() {
            Ne.call(this)
        }

        function Nh(e, t, i) {
            i = i || {}, "string" == typeof t && (t = $h[t]), this.id, this.group, this._dom = e;
            var n = this._zr = So(e, {
                renderer: i.renderer || "canvas",
                devicePixelRatio: i.devicePixelRatio,
                width: i.width,
                height: i.height
            });
            this._throttledZrFlush = bc(O(n.flush, n), 17), (t = m(t)) && bu(t, !0), this._theme = t, this._chartsViews = [], this._chartsMap = {}, this._componentsViews = [], this._componentsMap = {}, this._coordSysMgr = new iu;
            var o = this._api = function (e) {
                var t = e._coordSysMgr;
                return T(new eu(e), {
                    getCoordinateSystems: O(t.getCoordinateSystems, t),
                    getComponentByElement: function (t) {
                        for (; t;) {
                            var i = t.__ecComponentInfo;
                            if (null != i) return e._model.getComponent(i.mainType, i.index);
                            t = t.parent
                        }
                    }
                })
            }(this);

            function a(e, t) {
                return e.__prio - t.__prio
            }

            Fi(Qh, a), Fi(Yh, a), this._scheduler = new xc(this, o, Yh, Qh), Ne.call(this, this._ecEventProcessor = new zh), this._messageCenter = new Ah, this._initEvents(), this.resize = O(this.resize, this), this._pendingActions = [], n.animation.on("frame", this._onframe, this), function (e, t) {
                e.on("rendered", function () {
                    t.trigger("rendered"), !e.animation.isFinished() || t[Sh] || t._scheduler.unfinished || t._pendingActions.length || t.trigger("finished")
                })
            }(n, this), J(this)
        }

        Ah.prototype.on = Dh("on", !0), Ah.prototype.off = Dh("off", !0), Ah.prototype.one = Dh("one", !0), S(Ah, Ne);
        var xh = Nh.prototype;

        function Eh(e, t, i) {
            if (!this._disposed) {
                var n, o = this._model, a = this._coordSysMgr.getCoordinateSystems();
                t = jo(o, t);
                for (var r = 0; r < a.length; r++) {
                    var s = a[r];
                    if (s[e] && null != (n = s[e](o, t, i))) return n
                }
            }
        }

        xh._onframe = function () {
            if (!this._disposed) {
                var e = this._scheduler;
                if (this[Sh]) {
                    var t = this[Sh].silent;
                    this[Ih] = !0, Ph(this), Oh.update.call(this), this[Ih] = !1, this[Sh] = !1, Rh.call(this, t), Bh.call(this, t)
                } else if (e.unfinished) {
                    var i = 1, n = this._model;
                    this._api;
                    e.unfinished = !1;
                    do {
                        var o = +new Date;
                        e.performSeriesTasks(n), e.performDataProcessorTasks(n), Fh(this, n), e.performVisualTasks(n), Gh(this, this._model, 0, "remain"), i -= +new Date - o
                    } while (0 < i && e.unfinished);
                    e.unfinished || this._zr.flush()
                }
            }
        }, xh.getDom = function () {
            return this._dom
        }, xh.getZr = function () {
            return this._zr
        }, xh.setOption = function (e, t, i) {
            if (!this._disposed) {
                var n;
                if (kh(t) && (i = t.lazyUpdate, n = t.silent, t = t.notMerge), this[Ih] = !0, !this._model || t) {
                    var o = new lu(this._api), a = this._theme, r = this._model = new Jd;
                    r.scheduler = this._scheduler, r.init(null, null, a, o)
                }
                this._model.setOption(e, Jh), i ? (this[Sh] = {silent: n}, this[Ih] = !1) : (Ph(this), Oh.update.call(this), this._zr.flush(), this[Sh] = !1, this[Ih] = !1, Rh.call(this, n), Bh.call(this, n))
            }
        }, xh.setTheme = function () {
            console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")
        }, xh.getModel = function () {
            return this._model
        }, xh.getOption = function () {
            return this._model && this._model.getOption()
        }, xh.getWidth = function () {
            return this._zr.getWidth()
        }, xh.getHeight = function () {
            return this._zr.getHeight()
        }, xh.getDevicePixelRatio = function () {
            return this._zr.painter.dpr || window.devicePixelRatio || 1
        }, xh.getRenderedCanvas = function (e) {
            if (o.canvasSupported) return (e = e || {}).pixelRatio = e.pixelRatio || 1, e.backgroundColor = e.backgroundColor || this._model.get("backgroundColor"), this._zr.painter.getRenderedCanvas(e)
        }, xh.getSvgDataURL = function () {
            if (o.svgSupported) {
                var e = this._zr;
                return D(e.storage.getDisplayList(), function (e) {
                    e.stopAnimation(!0)
                }), e.painter.toDataURL()
            }
        }, xh.getDataURL = function (e) {
            if (!this._disposed) {
                var t = (e = e || {}).excludeComponents, i = this._model, n = [], o = this;
                Th(t, function (e) {
                    i.eachComponent({mainType: e}, function (e) {
                        var t = o._componentsMap[e.__viewId];
                        t.group.ignore || (n.push(t), t.group.ignore = !0)
                    })
                });
                var a = "svg" === this._zr.painter.getType() ? this.getSvgDataURL() : this.getRenderedCanvas(e).toDataURL("image/" + (e && e.type || "png"));
                return Th(n, function (e) {
                    e.group.ignore = !1
                }), a
            }
        }, xh.getConnectedDataURL = function (e) {
            if (!this._disposed && o.canvasSupported) {
                var t = "svg" === e.type, i = this.group, n = Math.min, a = Math.max;
                if (nf[i]) {
                    var r = 1 / 0, s = 1 / 0, l = -1 / 0, d = -1 / 0, u = [], c = e && e.pixelRatio || 1;
                    D(tf, function (o, c) {
                        if (o.group === i) {
                            var h = t ? o.getZr().painter.getSvgDom().innerHTML : o.getRenderedCanvas(m(e)),
                                f = o.getDom().getBoundingClientRect();
                            r = n(f.left, r), s = n(f.top, s), l = a(f.right, l), d = a(f.bottom, d), u.push({
                                dom: h,
                                left: f.left,
                                top: f.top
                            })
                        }
                    });
                    var h = (l *= c) - (r *= c), f = (d *= c) - (s *= c), p = k(),
                        g = So(p, {renderer: t ? "svg" : "canvas"});
                    if (g.resize({width: h, height: f}), t) {
                        var v = "";
                        return Th(u, function (e) {
                            var t = e.left - r, i = e.top - s;
                            v += '<g transform="translate(' + t + "," + i + ')">' + e.dom + "</g>"
                        }), g.painter.getSvgRoot().innerHTML = v, e.connectedBackgroundColor && g.painter.setBackgroundColor(e.connectedBackgroundColor), g.refreshImmediately(), g.painter.toDataURL()
                    }
                    return e.connectedBackgroundColor && g.add(new es({
                        shape: {x: 0, y: 0, width: h, height: f},
                        style: {fill: e.connectedBackgroundColor}
                    })), Th(u, function (e) {
                        var t = new Yn({style: {x: e.left * c - r, y: e.top * c - s, image: e.dom}});
                        g.add(t)
                    }), g.refreshImmediately(), p.toDataURL("image/" + (e && e.type || "png"))
                }
                return this.getDataURL(e)
            }
        }, xh.convertToPixel = P(Eh, "convertToPixel"), xh.convertFromPixel = P(Eh, "convertFromPixel"), xh.containPixel = function (e, t) {
            var i;
            if (!this._disposed) return D(e = jo(this._model, e), function (e, n) {
                0 <= n.indexOf("Models") && D(e, function (e) {
                    var o = e.coordinateSystem;
                    if (o && o.containPoint) i |= !!o.containPoint(t); else if ("seriesModels" === n) {
                        var a = this._chartsMap[e.__viewId];
                        a && a.containPoint && (i |= a.containPoint(t, e))
                    }
                }, this)
            }, this), !!i
        }, xh.getVisual = function (e, t) {
            var i = (e = jo(this._model, e, {defaultMainType: "series"})).seriesModel.getData(),
                n = e.hasOwnProperty("dataIndexInside") ? e.dataIndexInside : e.hasOwnProperty("dataIndex") ? i.indexOfRawIndex(e.dataIndex) : null;
            return null != n ? i.getItemVisual(n, t) : i.getVisual(t)
        }, xh.getViewOfComponentModel = function (e) {
            return this._componentsMap[e.__viewId]
        }, xh.getViewOfSeriesModel = function (e) {
            return this._chartsMap[e.__viewId]
        };
        var Oh = {
            prepareAndUpdate: function (e) {
                Ph(this), Oh.update.call(this, e)
            }, update: function (e) {
                var t = this._model, i = this._api, n = this._zr, a = this._coordSysMgr, r = this._scheduler;
                if (t) {
                    r.restoreData(t, e), r.performSeriesTasks(t), a.create(t, i), r.performDataProcessorTasks(t, e), Fh(this, t), a.update(t, i), Vh(t), r.performVisualTasks(t, e), Kh(this, t, i, e);
                    var s = t.get("backgroundColor") || "transparent";
                    if (o.canvasSupported) n.setBackgroundColor(s); else {
                        var l = Kt(s);
                        s = Zt(l, "rgb"), 0 === l[3] && (s = "transparent")
                    }
                    Wh(t, i)
                }
            }, updateTransform: function (e) {
                var t = this._model, i = this, n = this._api;
                if (t) {
                    var o = [];
                    t.eachComponent(function (a, r) {
                        var s = i.getViewOfComponentModel(r);
                        if (s && s.__alive) if (s.updateTransform) {
                            var l = s.updateTransform(r, t, n, e);
                            l && l.update && o.push(s)
                        } else o.push(s)
                    });
                    var a = $();
                    t.eachSeries(function (o) {
                        var r = i._chartsMap[o.__viewId];
                        if (r.updateTransform) {
                            var s = r.updateTransform(o, t, n, e);
                            s && s.update && a.set(o.uid, 1)
                        } else a.set(o.uid, 1)
                    }), Vh(t), this._scheduler.performVisualTasks(t, e, {
                        setDirty: !0,
                        dirtyMap: a
                    }), Gh(i, t, 0, e, a), Wh(t, this._api)
                }
            }, updateView: function (e) {
                var t = this._model;
                t && (fc.markUpdateMethod(e, "updateView"), Vh(t), this._scheduler.performVisualTasks(t, e, {setDirty: !0}), Kh(this, this._model, this._api, e), Wh(t, this._api))
            }, updateVisual: function (e) {
                Oh.update.call(this, e)
            }, updateLayout: function (e) {
                Oh.update.call(this, e)
            }
        };

        function Ph(e) {
            var t = e._model, i = e._scheduler;
            i.restorePipelines(t), i.prepareStageTasks(), Uh(e, "component", t, i), Uh(e, "chart", t, i), i.plan()
        }

        function Mh(e, t, i, n, o) {
            var a = e._model;
            if (n) {
                var r = {};
                r[n + "Id"] = i[n + "Id"], r[n + "Index"] = i[n + "Index"], r[n + "Name"] = i[n + "Name"];
                var s = {mainType: n, query: r};
                o && (s.subType = o);
                var l = i.excludeSeriesId;
                null != l && (l = $(Po(l))), a && a.eachComponent(s, function (t) {
                    l && null != l.get(t.id) || d(e["series" === n ? "_chartsMap" : "_componentsMap"][t.__viewId])
                }, e)
            } else Th(e._componentsViews.concat(e._chartsViews), d);

            function d(n) {
                n && n.__alive && n[t] && n[t](n.__model, a, e._api, i)
            }
        }

        function Fh(e, t) {
            var i = e._chartsMap, n = e._scheduler;
            t.eachSeries(function (e) {
                n.updateStreamModes(e, i[e.__viewId])
            })
        }

        function Lh(e, t) {
            var i = e.type, n = e.escapeConnect, o = Xh[i], a = o.actionInfo, r = (a.update || "update").split(":"),
                s = r.pop();
            r = null != r[0] && Ch(r[0]), this[Ih] = !0;
            var l = [e], d = !1;
            e.batch && (d = !0, l = A(e.batch, function (t) {
                return (t = w(T({}, t), e)).batch = null, t
            }));
            var u, c = [], h = "highlight" === i || "downplay" === i;
            Th(l, function (e) {
                (u = (u = o.action(e, this._model, this._api)) || T({}, e)).type = a.event || u.type, c.push(u), h ? Mh(this, s, e, "series") : r && Mh(this, s, e, r.main, r.sub)
            }, this), "none" === s || h || r || (this[Sh] ? (Ph(this), Oh.update.call(this, e), this[Sh] = !1) : Oh[s].call(this, e)), u = d ? {
                type: a.event || i,
                escapeConnect: n,
                batch: c
            } : c[0], this[Ih] = !1, t || this._messageCenter.trigger(u.type, u)
        }

        function Rh(e) {
            for (var t = this._pendingActions; t.length;) {
                var i = t.shift();
                Lh.call(this, i, e)
            }
        }

        function Bh(e) {
            e || this.trigger("updated")
        }

        function Uh(e, t, i, n) {
            for (var o = "component" === t, a = o ? e._componentsViews : e._chartsViews, r = o ? e._componentsMap : e._chartsMap, s = e._zr, l = e._api, d = 0; d < a.length; d++) a[d].__alive = !1;

            function u(e) {
                var t = "_ec_" + e.id + "_" + e.type, d = r[t];
                if (!d) {
                    var u = Ch(e.type);
                    (d = new (o ? lc.getClass(u.main, u.sub) : fc.getClass(u.sub))).init(i, l), r[t] = d, a.push(d), s.add(d.group)
                }
                e.__viewId = d.__id = t, d.__alive = !0, d.__model = e, d.group.__ecComponentInfo = {
                    mainType: e.mainType,
                    index: e.componentIndex
                }, o || n.prepareView(d, e, i, l)
            }

            for (o ? i.eachComponent(function (e, t) {
                "series" !== e && u(t)
            }) : i.eachSeries(u), d = 0; d < a.length;) {
                var c = a[d];
                c.__alive ? d++ : (o || c.renderTask.dispose(), s.remove(c.group), c.dispose(i, l), a.splice(d, 1), delete r[c.__id], c.__id = c.group.__ecComponentInfo = null)
            }
        }

        function Vh(e) {
            e.clearColorPalette(), e.eachSeries(function (e) {
                e.clearColorPalette()
            })
        }

        function Kh(e, t, i, n) {
            !function (e, t, i, n, o) {
                Th(e._componentsViews, function (e) {
                    var o = e.__model;
                    e.render(o, t, i, n), Hh(o, e)
                })
            }(e, t, i, n), Th(e._chartsViews, function (e) {
                e.__alive = !1
            }), Gh(e, t, 0, n), Th(e._chartsViews, function (e) {
                e.__alive || e.remove(t, i)
            })
        }

        function Gh(e, t, i, n, a) {
            var r, s = e._scheduler;
            t.eachSeries(function (t) {
                var i = e._chartsMap[t.__viewId];
                i.__alive = !0;
                var o = i.renderTask;
                s.updatePayload(o, n), a && a.get(t.uid) && o.dirty(), r |= o.perform(s.getPerformArgs(o)), i.group.silent = !!t.get("silent"), Hh(t, i), function (e, t) {
                    var i = e.get("blendMode") || null;
                    t.group.traverse(function (e) {
                        e.isGroup || e.style.blend !== i && e.setStyle("blend", i), e.eachPendingDisplayable && e.eachPendingDisplayable(function (e) {
                            e.setStyle("blend", i)
                        })
                    })
                }(t, i)
            }), s.unfinished |= r, function (e, t) {
                var i = e._zr.storage, n = 0;
                i.traverse(function (e) {
                    n++
                }), n > t.get("hoverLayerThreshold") && !o.node && t.eachSeries(function (t) {
                    if (!t.preventUsingHoverLayer) {
                        var i = e._chartsMap[t.__viewId];
                        i.__alive && i.group.traverse(function (e) {
                            e.useHoverLayer = !0
                        })
                    }
                })
            }(e, t), Ac(e._zr.dom, t)
        }

        function Wh(e, t) {
            Th(Zh, function (i) {
                i(e, t)
            })
        }

        xh.resize = function (e) {
            if (!this._disposed) {
                this._zr.resize(e);
                var t = this._model;
                if (this._loadingFX && this._loadingFX.resize(), t) {
                    var i = t.resetOption("media"), n = e && e.silent;
                    this[Ih] = !0, i && Ph(this), Oh.update.call(this), this[Ih] = !1, Rh.call(this, n), Bh.call(this, n)
                }
            }
        }, xh.showLoading = function (e, t) {
            if (!this._disposed && (kh(e) && (t = e, e = ""), e = e || "default", this.hideLoading(), ef[e])) {
                var i = ef[e](this._api, t), n = this._zr;
                this._loadingFX = i, n.add(i)
            }
        }, xh.hideLoading = function () {
            this._disposed || (this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null)
        }, xh.makeActionFromEvent = function (e) {
            var t = T({}, e);
            return t.type = qh[e.type], t
        }, xh.dispatchAction = function (e, t) {
            this._disposed || (kh(t) || (t = {silent: !!t}), Xh[e.type] && this._model && (this[Ih] ? this._pendingActions.push(e) : (Lh.call(this, e, t.silent), t.flush ? this._zr.flush(!0) : !1 !== t.flush && o.browser.weChat && this._throttledZrFlush(), Rh.call(this, t.silent), Bh.call(this, t.silent))))
        }, xh.appendData = function (e) {
            if (!this._disposed) {
                var t = e.seriesIndex;
                this.getModel().getSeriesByIndex(t).appendData(e), this._scheduler.unfinished = !0
            }
        }, xh.on = Dh("on", !1), xh.off = Dh("off", !1), xh.one = Dh("one", !1);
        var jh = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];

        function Hh(e, t) {
            var i = e.get("z"), n = e.get("zlevel");
            t.group.traverse(function (e) {
                "group" !== e.type && (null != i && (e.z = i), null != n && (e.zlevel = n))
            })
        }

        function zh() {
            this.eventInfo
        }

        xh._initEvents = function () {
            Th(jh, function (e) {
                function t(t) {
                    var i, n = this.getModel(), o = t.target;
                    if ("globalout" === e) i = {}; else if (o && null != o.dataIndex) {
                        var a = o.dataModel || n.getSeriesByIndex(o.seriesIndex);
                        i = a && a.getDataParams(o.dataIndex, o.dataType, o) || {}
                    } else o && o.eventData && (i = T({}, o.eventData));
                    if (i) {
                        var r = i.componentType, s = i.componentIndex;
                        "markLine" !== r && "markPoint" !== r && "markArea" !== r || (r = "series", s = i.seriesIndex);
                        var l = r && null != s && n.getComponent(r, s),
                            d = l && this["series" === l.mainType ? "_chartsMap" : "_componentsMap"][l.__viewId];
                        i.event = t, i.type = e, this._ecEventProcessor.eventInfo = {
                            targetEl: o,
                            packedEvent: i,
                            model: l,
                            view: d
                        }, this.trigger(e, i)
                    }
                }

                t.zrEventfulCallAtLast = !0, this._zr.on(e, t, this)
            }, this), Th(qh, function (e, t) {
                this._messageCenter.on(t, function (e) {
                    this.trigger(t, e)
                }, this)
            }, this)
        }, xh.isDisposed = function () {
            return this._disposed
        }, xh.clear = function () {
            this._disposed || this.setOption({series: []}, !0)
        }, xh.dispose = function () {
            if (!this._disposed) {
                this._disposed = !0, zo(this.getDom(), rf, "");
                var e = this._api, t = this._model;
                Th(this._componentsViews, function (i) {
                    i.dispose(t, e)
                }), Th(this._chartsViews, function (i) {
                    i.dispose(t, e)
                }), this._zr.dispose(), delete tf[this.id]
            }
        }, S(Nh, Ne), zh.prototype = {
            constructor: zh, normalizeQuery: function (e) {
                var t = {}, i = {}, n = {};
                if (L(e)) {
                    var o = Ch(e);
                    t.mainType = o.main || null, t.subType = o.sub || null
                } else {
                    var a = ["Index", "Name", "Id"], r = {name: 1, dataIndex: 1, dataType: 1};
                    D(e, function (e, o) {
                        for (var s = !1, l = 0; l < a.length; l++) {
                            var d = a[l], u = o.lastIndexOf(d);
                            if (0 < u && u === o.length - d.length) {
                                var c = o.slice(0, u);
                                "data" !== c && (t.mainType = c, t[d.toLowerCase()] = e, s = !0)
                            }
                        }
                        r.hasOwnProperty(o) && (i[o] = e, s = !0), s || (n[o] = e)
                    })
                }
                return {cptQuery: t, dataQuery: i, otherQuery: n}
            }, filter: function (e, t, i) {
                var n = this.eventInfo;
                if (!n) return !0;
                var o = n.targetEl, a = n.packedEvent, r = n.model, s = n.view;
                if (!r || !s) return !0;
                var l = t.cptQuery, d = t.dataQuery;
                return u(l, r, "mainType") && u(l, r, "subType") && u(l, r, "index", "componentIndex") && u(l, r, "name") && u(l, r, "id") && u(d, a, "name") && u(d, a, "dataIndex") && u(d, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(e, t.otherQuery, o, a));

                function u(e, t, i, n) {
                    return null == e[i] || t[n || i] === e[i]
                }
            }, afterTrigger: function () {
                this.eventInfo = null
            }
        };
        var Xh = {}, qh = {}, Yh = [], Jh = [], Zh = [], Qh = [], $h = {}, ef = {}, tf = {}, nf = {}, of = new Date - 0,
            af = new Date - 0, rf = "_echarts_instance_";

        function sf(e) {
            nf[e] = !1
        }

        var lf = sf;

        function df(e) {
            return tf[function (e, t) {
                return e.getAttribute ? e.getAttribute(t) : e[t]
            }(e, rf)]
        }

        function uf(e, t) {
            $h[e] = t
        }

        function cf(e) {
            Jh.push(e)
        }

        function hf(e, t) {
            vf(Yh, e, t, 1e3)
        }

        function ff(e, t, i) {
            "function" == typeof t && (i = t, t = "");
            var n = kh(e) ? e.type : [e, e = {event: t}][0];
            e.event = (e.event || n).toLowerCase(), t = e.event, yh(_h.test(n) && _h.test(t)), Xh[n] || (Xh[n] = {
                action: i,
                actionInfo: e
            }), qh[t] = n
        }

        function pf(e, t) {
            iu.register(e, t)
        }

        function gf(e, t) {
            vf(Qh, e, t, 1e3, "layout")
        }

        function mf(e, t) {
            vf(Qh, e, t, 3e3, "visual")
        }

        function vf(e, t, i, n, o) {
            (wh(t) || kh(t)) && (i = t, t = n);
            var a = xc.wrapStageHandler(i, o);
            return a.__prio = t, a.__raw = i, e.push(a), a
        }

        function yf(e, t) {
            ef[e] = t
        }

        function Tf(e) {
            return Sd.extend(e)
        }

        function wf(e) {
            return lc.extend(e)
        }

        function kf(e) {
            return ec.extend(e)
        }

        function Cf(e) {
            return fc.extend(e)
        }

        function bf(e) {
            return e
        }

        function If(e, t, i, n, o) {
            this._old = e, this._new = t, this._oldKeyGetter = i || bf, this._newKeyGetter = n || bf, this.context = o
        }

        function Sf(e, t, i, n, o) {
            for (var a = 0; a < e.length; a++) {
                var r = "_ec_" + o[n](e[a], a), s = t[r];
                null == s ? (i.push(r), t[r] = a) : (s.length || (t[r] = s = [s]), s.push(a))
            }
        }

        mf(2e3, _c), cf(bu), hf(900, function (e) {
            var t = $();
            e.eachSeries(function (e) {
                var i = e.get("stack");
                if (i) {
                    var n = t.get(i) || t.set(i, []), o = e.getData(), a = {
                        stackResultDimension: o.getCalculationInfo("stackResultDimension"),
                        stackedOverDimension: o.getCalculationInfo("stackedOverDimension"),
                        stackedDimension: o.getCalculationInfo("stackedDimension"),
                        stackedByDimension: o.getCalculationInfo("stackedByDimension"),
                        isStackedByIndex: o.getCalculationInfo("isStackedByIndex"),
                        data: o,
                        seriesModel: e
                    };
                    if (!a.stackedDimension || !a.isStackedByIndex && !a.stackedByDimension) return;
                    n.length && o.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(a)
                }
            }), t.each(Iu)
        }), yf("default", function (e, t) {
            w(t = t || {}, {
                text: "loading",
                textColor: "#000",
                fontSize: "12px",
                maskColor: "rgba(255, 255, 255, 0.8)",
                showSpinner: !0,
                color: "#c23531",
                spinnerRadius: 10,
                lineWidth: 5,
                zlevel: 0
            });
            var i = new Ai, n = new es({style: {fill: t.maskColor}, zlevel: t.zlevel, z: 1e4});
            i.add(n);
            var o = t.fontSize + " sans-serif", a = new es({
                style: {
                    fill: "none",
                    text: t.text,
                    font: o,
                    textPosition: "right",
                    textDistance: 10,
                    textFill: t.textColor
                }, zlevel: t.zlevel, z: 10001
            });
            if (i.add(a), t.showSpinner) {
                var r = new ss({
                    shape: {startAngle: -Nc / 2, endAngle: -Nc / 2 + .1, r: t.spinnerRadius},
                    style: {stroke: t.color, lineCap: "round", lineWidth: t.lineWidth},
                    zlevel: t.zlevel,
                    z: 10001
                });
                r.animateShape(!0).when(1e3, {endAngle: 3 * Nc / 2}).start("circularInOut"), r.animateShape(!0).when(1e3, {startAngle: 3 * Nc / 2}).delay(300).start("circularInOut"), i.add(r)
            }
            return i.resize = function () {
                var i = un(t.text, o), s = t.showSpinner ? t.spinnerRadius : 0,
                    l = (e.getWidth() - 2 * s - (t.showSpinner && i ? 10 : 0) - i) / 2 - (t.showSpinner ? 0 : i / 2),
                    d = e.getHeight() / 2;
                t.showSpinner && r.setShape({cx: l, cy: d}), a.setShape({
                    x: l - s,
                    y: d - s,
                    width: 2 * s,
                    height: 2 * s
                }), n.setShape({x: 0, y: 0, width: e.getWidth(), height: e.getHeight()})
            }, i.resize(), i
        }), ff({type: "highlight", event: "highlight", update: "highlight"}, te), ff({
            type: "downplay",
            event: "downplay",
            update: "downplay"
        }, te), uf("light", Jc), uf("dark", $c), If.prototype = {
            constructor: If, add: function (e) {
                return this._add = e, this
            }, update: function (e) {
                return this._update = e, this
            }, remove: function (e) {
                return this._remove = e, this
            }, execute: function () {
                var e = this._old, t = this._new, i = {}, n = [], o = [];
                for (Sf(e, {}, n, "_oldKeyGetter", this), Sf(t, i, o, "_newKeyGetter", this), a = 0; a < e.length; a++) null != (s = i[r = n[a]]) ? ((d = s.length) ? (1 === d && (i[r] = null), s = s.shift()) : i[r] = null, this._update && this._update(s, a)) : this._remove && this._remove(a);
                for (var a = 0; a < o.length; a++) {
                    var r = o[a];
                    if (i.hasOwnProperty(r)) {
                        var s;
                        if (null == (s = i[r])) continue;
                        if (s.length) for (var l = 0, d = s.length; l < d; l++) this._add && this._add(s[l]); else this._add && this._add(s)
                    }
                }
            }
        };
        var _f = $(["tooltip", "label", "itemName", "itemId", "seriesName"]);

        function Df(e, t) {
            return e.hasOwnProperty(t) || (e[t] = []), e[t]
        }

        function Af(e) {
            return "category" === e ? "ordinal" : "time" === e ? "time" : "float"
        }

        function Nf(e) {
            null != e && T(this, e), this.otherDims = {}
        }

        var xf = R, Ef = "undefined", Of = {
                float: typeof Float64Array == Ef ? Array : Float64Array,
                int: typeof Int32Array == Ef ? Array : Int32Array,
                ordinal: Array,
                number: Array,
                time: Array
            }, Pf = typeof Uint32Array == Ef ? Array : Uint32Array, Mf = typeof Int32Array == Ef ? Array : Int32Array,
            Ff = typeof Uint16Array == Ef ? Array : Uint16Array;

        function Lf(e) {
            return 65535 < e._rawCount ? Pf : Ff
        }

        var Rf = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_rawData", "_chunkSize", "_chunkCount", "_dimValueGetter", "_count", "_rawCount", "_nameDimIdx", "_idDimIdx"],
            Bf = ["_extent", "_approximateExtent", "_rawExtent"];

        function Uf(e, t) {
            D(Rf.concat(t.__wrappedMethods || []), function (i) {
                t.hasOwnProperty(i) && (e[i] = t[i])
            }), e.__wrappedMethods = t.__wrappedMethods, D(Bf, function (i) {
                e[i] = m(t[i])
            }), e._calculationInfo = T(t._calculationInfo)
        }

        var Vf = function (e, t) {
            e = e || ["x", "y"];
            for (var i = {}, n = [], o = {}, a = 0; a < e.length; a++) {
                var r = e[a];
                L(r) ? r = new Nf({name: r}) : r instanceof Nf || (r = new Nf(r));
                var s = r.name;
                r.type = r.type || "float", r.coordDim || (r.coordDim = s, r.coordDimIndex = 0), r.otherDims = r.otherDims || {}, n.push(s), (i[s] = r).index = a, r.createInvertedIndices && (o[s] = [])
            }
            this.dimensions = n, this._dimensionInfos = i, this.hostModel = t, this.dataType, this._indices = null, this._count = 0, this._rawCount = 0, this._storage = {}, this._nameList = [], this._idList = [], this._optionModels = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this.hasItemVisual = {}, this._itemLayouts = [], this._graphicEls = [], this._chunkSize = 1e5, this._chunkCount = 0, this._rawData, this._rawExtent = {}, this._extent = {}, this._approximateExtent = {}, this._dimensionsSummary = function (e) {
                var t = {}, i = t.encode = {}, n = $(), o = [], a = [],
                    r = t.userOutput = {dimensionNames: e.dimensions.slice(), encode: {}};
                D(e.dimensions, function (t) {
                    var s = e.getDimensionInfo(t), l = s.coordDim;
                    if (l) {
                        var d = s.coordDimIndex;
                        Df(i, l)[d] = t, s.isExtraCoord || (n.set(l, 1), function (e) {
                            return !("ordinal" === e || "time" === e)
                        }(s.type) && (o[0] = t), Df(r.encode, l)[d] = s.index), s.defaultTooltip && a.push(t)
                    }
                    _f.each(function (e, t) {
                        var n = Df(i, t), o = s.otherDims[t];
                        null != o && !1 !== o && (n[o] = s.name)
                    })
                });
                var s = [], l = {};
                n.each(function (e, t) {
                    var n = i[t];
                    l[t] = n[0], s = s.concat(n)
                }), t.dataDimsOnCoord = s, t.encodeFirstDimNotExtra = l;
                var d = i.label;
                d && d.length && (o = d.slice());
                var u = i.tooltip;
                return u && u.length ? a = u.slice() : a.length || (a = o.slice()), i.defaultedLabel = o, i.defaultedTooltip = a, t
            }(this), this._invertedIndicesMap = o, this._calculationInfo = {}, this.userOutput = this._dimensionsSummary.userOutput
        }, Kf = Vf.prototype;

        function Gf(e, t, i, n, o) {
            var a = Of[t.type], r = n - 1, s = t.name, l = e[s][r];
            if (l && l.length < i) {
                for (var d = new a(Math.min(o - r * i, i)), u = 0; u < l.length; u++) d[u] = l[u];
                e[s][r] = d
            }
            for (var c = n * i; c < o; c += i) e[s].push(new a(Math.min(o - c, i)))
        }

        function Wf(e) {
            var t = e._invertedIndicesMap;
            D(t, function (i, n) {
                var o = e._dimensionInfos[n].ordinalMeta;
                if (o) {
                    i = t[n] = new Mf(o.categories.length);
                    for (var a = 0; a < i.length; a++) i[a] = -1;
                    for (a = 0; a < e._count; a++) i[e.get(n, a)] = a
                }
            })
        }

        function jf(e, t, i) {
            var n;
            if (null != t) {
                var o = e._chunkSize, a = Math.floor(i / o), r = i % o, s = e.dimensions[t], l = e._storage[s][a];
                if (l) {
                    n = l[r];
                    var d = e._dimensionInfos[s].ordinalMeta;
                    d && d.categories.length && (n = d.categories[n])
                }
            }
            return n
        }

        function Hf(e) {
            return e
        }

        function zf(e) {
            return e < this._count && 0 <= e ? this._indices[e] : -1
        }

        function Xf(e, t) {
            var i = e._idList[t];
            return null == i && (i = jf(e, e._idDimIdx, t)), null == i && (i = "e\0\0" + t), i
        }

        function qf(e) {
            return M(e) || (e = [e]), e
        }

        function Yf(e, t) {
            var i = e.dimensions, n = new Vf(A(i, e.getDimensionInfo, e), e.hostModel);
            Uf(n, e);
            for (var o = n._storage = {}, a = e._storage, r = 0; r < i.length; r++) {
                var s = i[r];
                a[s] && (0 <= b(t, s) ? (o[s] = Jf(a[s]), n._rawExtent[s] = [1 / 0, -1 / 0], n._extent[s] = null) : o[s] = a[s])
            }
            return n
        }

        function Jf(e) {
            for (var t, i, n = new Array(e.length), o = 0; o < e.length; o++) n[o] = (t = e[o], i = void 0, (i = t.constructor) === Array ? t.slice() : new i(t));
            return n
        }

        function Zf(e) {
            e.seriesIndex = this.seriesIndex, e.dataIndex = this.dataIndex, e.dataType = this.dataType
        }

        function Qf(e, t, i) {
            Ud.isInstance(t) || (t = Ud.seriesDataToSource(t)), i = i || {}, e = (e || []).slice();
            for (var n = (i.dimsDef || []).slice(), o = $(), a = $(), r = [], s = function (e, t, i, n) {
                var o = Math.max(e.dimensionsDetectCount || 1, t.length, i.length, n || 0);
                return D(t, function (e) {
                    var t = e.dimsDef;
                    t && (o = Math.max(o, t.length))
                }), o
            }(t, e, n, i.dimCount), l = 0; l < s; l++) {
                var d = n[l] = T({}, R(n[l]) ? n[l] : {name: n[l]}), u = d.name, c = r[l] = new Nf;
                null != u && null == o.get(u) && (c.name = c.displayName = u, o.set(u, l)), null != d.type && (c.type = d.type), null != d.displayName && (c.displayName = d.displayName)
            }
            var h = i.encodeDef;
            !h && i.encodeDefaulter && (h = i.encodeDefaulter(t, s)), (h = $(h)).each(function (e, t) {
                if (1 === (e = Po(e).slice()).length && !L(e[0]) && e[0] < 0) h.set(t, !1); else {
                    var i = h.set(t, []);
                    D(e, function (e, n) {
                        L(e) && (e = o.get(e)), null != e && e < s && (i[n] = e, p(r[e], t, n))
                    })
                }
            });
            var f = 0;

            function p(e, t, i) {
                null != _f.get(t) ? e.otherDims[t] = i : (e.coordDim = t, e.coordDimIndex = i, a.set(t, !0))
            }

            D(e, function (e, t) {
                var i, n, o;
                if (L(e)) i = e, e = {}; else {
                    i = e.name;
                    var a = e.ordinalMeta;
                    e.ordinalMeta = null, (e = m(e)).ordinalMeta = a, n = e.dimsDef, o = e.otherDims, e.name = e.coordDim = e.coordDimIndex = e.dimsDef = e.otherDims = null
                }
                if (!1 !== (s = h.get(i))) {
                    var s;
                    if (!(s = Po(s)).length) for (var l = 0; l < (n && n.length || 1); l++) {
                        for (; f < r.length && null != r[f].coordDim;) f++;
                        f < r.length && s.push(f++)
                    }
                    D(s, function (t, a) {
                        var s = r[t];
                        if (p(w(s, e), i, a), null == s.name && n) {
                            var l = n[a];
                            R(l) || (l = {name: l}), s.name = s.displayName = l.name, s.defaultTooltip = l.defaultTooltip
                        }
                        o && w(s.otherDims, o)
                    })
                }
            });
            var g = i.generateCoord, v = i.generateCoordCount, y = null != v;
            v = g ? v || 1 : 0;
            for (var k, C, b = g || "value", I = 0; I < s; I++) null == (c = r[I] = r[I] || new Nf).coordDim && (c.coordDim = $f(b, a, y), c.coordDimIndex = 0, (!g || v <= 0) && (c.isExtraCoord = !0), v--), null == c.name && (c.name = $f(c.coordDim, o)), null == c.type && (k = t, C = I, c.name, qd(k.data, k.sourceFormat, k.seriesLayoutBy, k.dimensionsDefine, k.startIndex, C) === Vd.Must || c.isExtraCoord && (null != c.otherDims.itemName || null != c.otherDims.seriesName)) && (c.type = "ordinal");
            return r
        }

        function $f(e, t, i) {
            if (i || null != t.get(e)) {
                for (var n = 0; null != t.get(e + n);) n++;
                e += n
            }
            return t.set(e, !0), e
        }

        Kf.type = "list", Kf.hasItemOption = !0, Kf.getDimension = function (e) {
            return "number" != typeof e && (isNaN(e) || this._dimensionInfos.hasOwnProperty(e)) || (e = this.dimensions[e]), e
        }, Kf.getDimensionInfo = function (e) {
            return this._dimensionInfos[this.getDimension(e)]
        }, Kf.getDimensionsOnCoord = function () {
            return this._dimensionsSummary.dataDimsOnCoord.slice()
        }, Kf.mapDimension = function (e, t) {
            var i = this._dimensionsSummary;
            if (null == t) return i.encodeFirstDimNotExtra[e];
            var n = i.encode[e];
            return !0 === t ? (n || []).slice() : n && n[t]
        }, Kf.initData = function (e, t, i) {
            (Ud.isInstance(e) || _(e)) && (e = new Su(e, this.dimensions.length)), this._rawData = e, this._storage = {}, this._indices = null, this._nameList = t || [], this._idList = [], this._nameRepeatCount = {}, i || (this.hasItemOption = !1), this.defaultDimValueGetter = Pu[this._rawData.getSource().sourceFormat], this._dimValueGetter = i = i || this.defaultDimValueGetter, this._dimValueGetterArrayRows = Pu.arrayRows, this._rawExtent = {}, this._initDataFromProvider(0, e.count()), e.pure && (this.hasItemOption = !1)
        }, Kf.getProvider = function () {
            return this._rawData
        }, Kf.appendData = function (e) {
            var t = this._rawData, i = this.count();
            t.appendData(e);
            var n = t.count();
            t.persistent || (n += i), this._initDataFromProvider(i, n)
        }, Kf.appendValues = function (e, t) {
            for (var i = this._chunkSize, n = this._storage, o = this.dimensions, a = o.length, r = this._rawExtent, s = this.count(), l = s + Math.max(e.length, t ? t.length : 0), d = this._chunkCount, u = 0; u < a; u++) r[v = o[u]] || (r[v] = [1 / 0, -1 / 0]), n[v] || (n[v] = []), Gf(n, this._dimensionInfos[v], i, d, l), this._chunkCount = n[v].length;
            for (var c = new Array(a), h = s; h < l; h++) {
                for (var f = h - s, p = Math.floor(h / i), g = h % i, m = 0; m < a; m++) {
                    var v = o[m], y = this._dimValueGetterArrayRows(e[f] || c, v, f, m);
                    n[v][p][g] = y;
                    var T = r[v];
                    y < T[0] && (T[0] = y), y > T[1] && (T[1] = y)
                }
                t && (this._nameList[h] = t[f])
            }
            this._rawCount = this._count = l, this._extent = {}, Wf(this)
        }, Kf._initDataFromProvider = function (e, t) {
            if (!(t <= e)) {
                for (var i, n = this._chunkSize, o = this._rawData, a = this._storage, r = this.dimensions, s = r.length, l = this._dimensionInfos, d = this._nameList, u = this._idList, c = this._rawExtent, h = this._nameRepeatCount = {}, f = this._chunkCount, p = 0; p < s; p++) {
                    c[k = r[p]] || (c[k] = [1 / 0, -1 / 0]);
                    var g = l[k];
                    0 === g.otherDims.itemName && (i = this._nameDimIdx = p), 0 === g.otherDims.itemId && (this._idDimIdx = p), a[k] || (a[k] = []), Gf(a, g, n, f, t), this._chunkCount = a[k].length
                }
                for (var m = new Array(s), v = e; v < t; v++) {
                    m = o.getItem(v, m);
                    for (var y = Math.floor(v / n), T = v % n, w = 0; w < s; w++) {
                        var k, C = a[k = r[w]][y], b = this._dimValueGetter(m, k, v, w);
                        C[T] = b;
                        var I = c[k];
                        b < I[0] && (I[0] = b), b > I[1] && (I[1] = b)
                    }
                    if (!o.pure) {
                        var S = d[v];
                        if (m && null == S) if (null != m.name) d[v] = S = m.name; else if (null != i) {
                            var _ = r[i], D = a[_][y];
                            if (D) {
                                S = D[T];
                                var A = l[_].ordinalMeta;
                                A && A.categories.length && (S = A.categories[S])
                            }
                        }
                        var N = null == m ? null : m.id;
                        null == N && null != S && (h[S] = h[S] || 0, 0 < h[N = S] && (N += "__ec__" + h[S]), h[S]++), null != N && (u[v] = N)
                    }
                }
                !o.persistent && o.clean && o.clean(), this._rawCount = this._count = t, this._extent = {}, Wf(this)
            }
        }, Kf.count = function () {
            return this._count
        }, Kf.getIndices = function () {
            var e = this._indices;
            if (e) {
                var t = e.constructor, i = this._count;
                if (t === Array) {
                    o = new t(i);
                    for (var n = 0; n < i; n++) o[n] = e[n]
                } else o = new t(e.buffer, 0, i)
            } else {
                var o = new (t = Lf(this))(this.count());
                for (n = 0; n < o.length; n++) o[n] = n
            }
            return o
        }, Kf.get = function (e, t) {
            if (!(0 <= t && t < this._count)) return NaN;
            var i = this._storage;
            if (!i[e]) return NaN;
            t = this.getRawIndex(t);
            var n = Math.floor(t / this._chunkSize), o = t % this._chunkSize;
            return i[e][n][o]
        }, Kf.getByRawIndex = function (e, t) {
            if (!(0 <= t && t < this._rawCount)) return NaN;
            var i = this._storage[e];
            if (!i) return NaN;
            var n = Math.floor(t / this._chunkSize), o = t % this._chunkSize;
            return i[n][o]
        }, Kf._getFast = function (e, t) {
            var i = Math.floor(t / this._chunkSize), n = t % this._chunkSize;
            return this._storage[e][i][n]
        }, Kf.getValues = function (e, t) {
            var i = [];
            M(e) || (t = e, e = this.dimensions);
            for (var n = 0, o = e.length; n < o; n++) i.push(this.get(e[n], t));
            return i
        }, Kf.hasValue = function (e) {
            for (var t = this._dimensionsSummary.dataDimsOnCoord, i = 0, n = t.length; i < n; i++) if (isNaN(this.get(t[i], e))) return !1;
            return !0
        }, Kf.getDataExtent = function (e) {
            e = this.getDimension(e);
            var t = this._storage[e], i = [1 / 0, -1 / 0];
            if (!t) return i;
            var n, o = this.count();
            if (!this._indices) return this._rawExtent[e].slice();
            if (n = this._extent[e]) return n.slice();
            for (var a = (n = i)[0], r = n[1], s = 0; s < o; s++) {
                var l = this._getFast(e, this.getRawIndex(s));
                l < a && (a = l), r < l && (r = l)
            }
            return n = [a, r], this._extent[e] = n
        }, Kf.getApproximateExtent = function (e) {
            return e = this.getDimension(e), this._approximateExtent[e] || this.getDataExtent(e)
        }, Kf.setApproximateExtent = function (e, t) {
            t = this.getDimension(t), this._approximateExtent[t] = e.slice()
        }, Kf.getCalculationInfo = function (e) {
            return this._calculationInfo[e]
        }, Kf.setCalculationInfo = function (e, t) {
            xf(e) ? T(this._calculationInfo, e) : this._calculationInfo[e] = t
        }, Kf.getSum = function (e) {
            var t = 0;
            if (this._storage[e]) for (var i = 0, n = this.count(); i < n; i++) {
                var o = this.get(e, i);
                isNaN(o) || (t += o)
            }
            return t
        }, Kf.getMedian = function (e) {
            var t = [];
            this.each(e, function (e, i) {
                isNaN(e) || t.push(e)
            });
            var i = [].concat(t).sort(function (e, t) {
                return e - t
            }), n = this.count();
            return 0 === n ? 0 : n % 2 == 1 ? i[(n - 1) / 2] : (i[n / 2] + i[n / 2 - 1]) / 2
        }, Kf.rawIndexOf = function (e, t) {
            var i = (e && this._invertedIndicesMap[e])[t];
            return null == i || isNaN(i) ? -1 : i
        }, Kf.indexOfName = function (e) {
            for (var t = 0, i = this.count(); t < i; t++) if (this.getName(t) === e) return t;
            return -1
        }, Kf.indexOfRawIndex = function (e) {
            if (e >= this._rawCount || e < 0) return -1;
            if (!this._indices) return e;
            var t = this._indices, i = t[e];
            if (null != i && i < this._count && i === e) return e;
            for (var n = 0, o = this._count - 1; n <= o;) {
                var a = (n + o) / 2 | 0;
                if (t[a] < e) n = 1 + a; else {
                    if (!(t[a] > e)) return a;
                    o = a - 1
                }
            }
            return -1
        }, Kf.indicesOfNearest = function (e, t, i) {
            var n = [];
            if (!this._storage[e]) return n;
            null == i && (i = 1 / 0);
            for (var o = 1 / 0, a = -1, r = 0, s = 0, l = this.count(); s < l; s++) {
                var d = t - this.get(e, s), u = Math.abs(d);
                u <= i && ((u < o || u === o && 0 <= d && a < 0) && (o = u, a = d, r = 0), d === a && (n[r++] = s))
            }
            return n.length = r, n
        }, Kf.getRawIndex = Hf, Kf.getRawDataItem = function (e) {
            if (this._rawData.persistent) return this._rawData.getItem(this.getRawIndex(e));
            for (var t = [], i = 0; i < this.dimensions.length; i++) {
                var n = this.dimensions[i];
                t.push(this.get(n, e))
            }
            return t
        }, Kf.getName = function (e) {
            var t = this.getRawIndex(e);
            return this._nameList[t] || jf(this, this._nameDimIdx, t) || ""
        }, Kf.getId = function (e) {
            return Xf(this, this.getRawIndex(e))
        }, Kf.each = function (e, t, i, n) {
            if (this._count) {
                "function" == typeof e && (n = i, i = t, t = e, e = []), i = i || n || this;
                for (var o = (e = A(qf(e), this.getDimension, this)).length, a = 0; a < this.count(); a++) switch (o) {
                    case 0:
                        t.call(i, a);
                        break;
                    case 1:
                        t.call(i, this.get(e[0], a), a);
                        break;
                    case 2:
                        t.call(i, this.get(e[0], a), this.get(e[1], a), a);
                        break;
                    default:
                        for (var r = 0, s = []; r < o; r++) s[r] = this.get(e[r], a);
                        s[r] = a, t.apply(i, s)
                }
            }
        }, Kf.filterSelf = function (e, t, i, n) {
            if (this._count) {
                "function" == typeof e && (n = i, i = t, t = e, e = []), i = i || n || this, e = A(qf(e), this.getDimension, this);
                for (var o = this.count(), a = new (Lf(this))(o), r = [], s = e.length, l = 0, d = e[0], u = 0; u < o; u++) {
                    var c, h = this.getRawIndex(u);
                    if (0 === s) c = t.call(i, u); else if (1 === s) {
                        var f = this._getFast(d, h);
                        c = t.call(i, f, u)
                    } else {
                        for (var p = 0; p < s; p++) r[p] = this._getFast(d, h);
                        r[p] = u, c = t.apply(i, r)
                    }
                    c && (a[l++] = h)
                }
                return l < o && (this._indices = a), this._count = l, this._extent = {}, this.getRawIndex = this._indices ? zf : Hf, this
            }
        }, Kf.selectRange = function (e) {
            if (this._count) {
                var t = [];
                for (var i in e) e.hasOwnProperty(i) && t.push(i);
                var n = t.length;
                if (n) {
                    var o = this.count(), a = new (Lf(this))(o), r = 0, s = t[0], l = e[s][0], d = e[s][1], u = !1;
                    if (!this._indices) {
                        var c = 0;
                        if (1 === n) {
                            for (var h = this._storage[t[0]], f = 0; f < this._chunkCount; f++) for (var p = h[f], g = Math.min(this._count - f * this._chunkSize, this._chunkSize), m = 0; m < g; m++) (l <= (k = p[m]) && k <= d || isNaN(k)) && (a[r++] = c), c++;
                            u = !0
                        } else if (2 === n) {
                            h = this._storage[s];
                            var v = this._storage[t[1]], y = e[t[1]][0], T = e[t[1]][1];
                            for (f = 0; f < this._chunkCount; f++) {
                                p = h[f];
                                var w = v[f];
                                for (g = Math.min(this._count - f * this._chunkSize, this._chunkSize), m = 0; m < g; m++) {
                                    var k = p[m], C = w[m];
                                    (l <= k && k <= d || isNaN(k)) && (y <= C && C <= T || isNaN(C)) && (a[r++] = c), c++
                                }
                            }
                            u = !0
                        }
                    }
                    if (!u) if (1 === n) for (m = 0; m < o; m++) {
                        var b = this.getRawIndex(m);
                        (l <= (k = this._getFast(s, b)) && k <= d || isNaN(k)) && (a[r++] = b)
                    } else for (m = 0; m < o; m++) {
                        var I = !0;
                        for (b = this.getRawIndex(m), f = 0; f < n; f++) {
                            var S = t[f];
                            ((k = this._getFast(i, b)) < e[S][0] || k > e[S][1]) && (I = !1)
                        }
                        I && (a[r++] = this.getRawIndex(m))
                    }
                    return r < o && (this._indices = a), this._count = r, this._extent = {}, this.getRawIndex = this._indices ? zf : Hf, this
                }
            }
        }, Kf.mapArray = function (e, t, i, n) {
            "function" == typeof e && (n = i, i = t, t = e, e = []), i = i || n || this;
            var o = [];
            return this.each(e, function () {
                o.push(t && t.apply(this, arguments))
            }, i), o
        }, Kf.map = function (e, t, i, n) {
            i = i || n || this;
            var o = Yf(this, e = A(qf(e), this.getDimension, this));
            o._indices = this._indices, o.getRawIndex = o._indices ? zf : Hf;
            for (var a = o._storage, r = [], s = this._chunkSize, l = e.length, d = this.count(), u = [], c = o._rawExtent, h = 0; h < d; h++) {
                for (var f = 0; f < l; f++) u[f] = this.get(e[f], h);
                u[l] = h;
                var p = t && t.apply(i, u);
                if (null != p) {
                    "object" != typeof p && (r[0] = p, p = r);
                    for (var g = this.getRawIndex(h), m = Math.floor(g / s), v = g % s, y = 0; y < p.length; y++) {
                        var T = e[y], w = p[y], k = c[T], C = a[T];
                        C && (C[m][v] = w), w < k[0] && (k[0] = w), w > k[1] && (k[1] = w)
                    }
                }
            }
            return o
        }, Kf.downSample = function (e, t, i, n) {
            for (var o = Yf(this, [e]), a = o._storage, r = [], s = Math.floor(1 / t), l = a[e], d = this.count(), u = this._chunkSize, c = o._rawExtent[e], h = new (Lf(this))(d), f = 0, p = 0; p < d; p += s) {
                d - p < s && (s = d - p, r.length = s);
                for (var g = 0; g < s; g++) {
                    var m = this.getRawIndex(p + g), v = Math.floor(m / u), y = m % u;
                    r[g] = l[v][y]
                }
                var T = i(r), w = this.getRawIndex(Math.min(p + n(r, T) || 0, d - 1)), k = w % u;
                (l[Math.floor(w / u)][k] = T) < c[0] && (c[0] = T), T > c[1] && (c[1] = T), h[f++] = w
            }
            return o._count = f, o._indices = h, o.getRawIndex = zf, o
        }, Kf.getItemModel = function (e) {
            var t = this.hostModel;
            return new bl(this.getRawDataItem(e), t, t && t.ecModel)
        }, Kf.diff = function (e) {
            var t = this;
            return new If(e ? e.getIndices() : [], this.getIndices(), function (t) {
                return Xf(e, t)
            }, function (e) {
                return Xf(t, e)
            })
        }, Kf.getVisual = function (e) {
            var t = this._visual;
            return t && t[e]
        }, Kf.setVisual = function (e, t) {
            if (xf(e)) for (var i in e) e.hasOwnProperty(i) && this.setVisual(i, e[i]); else this._visual = this._visual || {}, this._visual[e] = t
        }, Kf.setLayout = function (e, t) {
            if (xf(e)) for (var i in e) e.hasOwnProperty(i) && this.setLayout(i, e[i]); else this._layout[e] = t
        }, Kf.getLayout = function (e) {
            return this._layout[e]
        }, Kf.getItemLayout = function (e) {
            return this._itemLayouts[e]
        }, Kf.setItemLayout = function (e, t, i) {
            this._itemLayouts[e] = i ? T(this._itemLayouts[e] || {}, t) : t
        }, Kf.clearItemLayouts = function () {
            this._itemLayouts.length = 0
        }, Kf.getItemVisual = function (e, t, i) {
            var n = this._itemVisuals[e], o = n && n[t];
            return null != o || i ? o : this.getVisual(t)
        }, Kf.setItemVisual = function (e, t, i) {
            var n = this._itemVisuals[e] || {}, o = this.hasItemVisual;
            if (this._itemVisuals[e] = n, xf(t)) for (var a in t) t.hasOwnProperty(a) && (n[a] = t[a], o[a] = !0); else n[t] = i, o[t] = !0
        }, Kf.clearAllVisual = function () {
            this._visual = {}, this._itemVisuals = [], this.hasItemVisual = {}
        }, Kf.setItemGraphicEl = function (e, t) {
            var i = this.hostModel;
            t && (t.dataIndex = e, t.dataType = this.dataType, t.seriesIndex = i && i.seriesIndex, "group" === t.type && t.traverse(Zf, t)), this._graphicEls[e] = t
        }, Kf.getItemGraphicEl = function (e) {
            return this._graphicEls[e]
        }, Kf.eachItemGraphicEl = function (e, t) {
            D(this._graphicEls, function (i, n) {
                i && e && e.call(t, i, n)
            })
        }, Kf.cloneShallow = function (e) {
            if (!e) {
                var t = A(this.dimensions, this.getDimensionInfo, this);
                e = new Vf(t, this.hostModel)
            }
            if (e._storage = this._storage, Uf(e, this), this._indices) {
                var i = this._indices.constructor;
                e._indices = new i(this._indices)
            } else e._indices = null;
            return e.getRawIndex = e._indices ? zf : Hf, e
        }, Kf.wrapMethod = function (e, t) {
            var i = this[e];
            "function" == typeof i && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function () {
                var e = i.apply(this, arguments);
                return t.apply(this, [e].concat(H(arguments)))
            })
        }, Kf.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "map"], Kf.CHANGABLE_METHODS = ["filterSelf", "selectRange"];
        var ep = function (e, t) {
            return Qf((t = t || {}).coordDimensions || [], e, {
                dimsDef: t.dimensionsDefine || e.dimensionsDefine,
                encodeDef: t.encodeDefine || e.encodeDefine,
                dimCount: t.dimensionsCount,
                encodeDefaulter: t.encodeDefaulter,
                generateCoord: t.generateCoord,
                generateCoordCount: t.generateCoordCount
            })
        }, tp = {
            cartesian2d: function (e, t, i, n) {
                var o = e.getReferringComponents("xAxis")[0], a = e.getReferringComponents("yAxis")[0];
                t.coordSysDims = ["x", "y"], i.set("x", o), i.set("y", a), ip(o) && (n.set("x", o), t.firstCategoryDimIndex = 0), ip(a) && (n.set("y", a), t.firstCategoryDimIndex, t.firstCategoryDimIndex = 1)
            }, singleAxis: function (e, t, i, n) {
                var o = e.getReferringComponents("singleAxis")[0];
                t.coordSysDims = ["single"], i.set("single", o), ip(o) && (n.set("single", o), t.firstCategoryDimIndex = 0)
            }, polar: function (e, t, i, n) {
                var o = e.getReferringComponents("polar")[0], a = o.findAxisModel("radiusAxis"),
                    r = o.findAxisModel("angleAxis");
                t.coordSysDims = ["radius", "angle"], i.set("radius", a), i.set("angle", r), ip(a) && (n.set("radius", a), t.firstCategoryDimIndex = 0), ip(r) && (n.set("angle", r), null == t.firstCategoryDimIndex && (t.firstCategoryDimIndex = 1))
            }, geo: function (e, t, i, n) {
                t.coordSysDims = ["lng", "lat"]
            }, parallel: function (e, t, i, n) {
                var o = e.ecModel, a = o.getComponent("parallel", e.get("parallelIndex")),
                    r = t.coordSysDims = a.dimensions.slice();
                D(a.parallelAxisIndex, function (e, a) {
                    var s = o.getComponent("parallelAxis", e), l = r[a];
                    i.set(l, s), ip(s) && null == t.firstCategoryDimIndex && (n.set(l, s), t.firstCategoryDimIndex = a)
                })
            }
        };

        function ip(e) {
            return "category" === e.get("type")
        }

        function np(e, t, i) {
            var n, o, a, r, s = (i = i || {}).byIndex, l = i.stackedCoordDimension, d = !(!e || !e.get("stack"));
            if (D(t, function (e, i) {
                L(e) && (t[i] = e = {name: e}), d && !e.isExtraCoord && (s || n || !e.ordinalMeta || (n = e), o || "ordinal" === e.type || "time" === e.type || l && l !== e.coordDim || (o = e))
            }), !o || s || n || (s = !0), o) {
                a = "__\0ecstackresult", r = "__\0ecstackedover", n && (n.createInvertedIndices = !0);
                var u = o.coordDim, c = o.type, h = 0;
                D(t, function (e) {
                    e.coordDim === u && h++
                }), t.push({
                    name: a,
                    coordDim: u,
                    coordDimIndex: h,
                    type: c,
                    isExtraCoord: !0,
                    isCalculationCoord: !0
                }), h++, t.push({
                    name: r,
                    coordDim: r,
                    coordDimIndex: h,
                    type: c,
                    isExtraCoord: !0,
                    isCalculationCoord: !0
                })
            }
            return {
                stackedDimension: o && o.name,
                stackedByDimension: n && n.name,
                isStackedByIndex: s,
                stackedOverDimension: r,
                stackResultDimension: a
            }
        }

        function op(e, t) {
            return !!t && t === e.getCalculationInfo("stackedDimension")
        }

        function ap(e, t) {
            return op(e, t) ? e.getCalculationInfo("stackResultDimension") : t
        }

        function rp(e, t, i) {
            i = i || {}, Ud.isInstance(e) || (e = Ud.seriesDataToSource(e));
            var n, o = t.get("coordinateSystem"), a = iu.get(o), r = function (e) {
                var t = e.get("coordinateSystem"), i = new function (e) {
                    this.coordSysName = e, this.coordSysDims = [], this.axisMap = $(), this.categoryAxisMap = $(), this.firstCategoryDimIndex = null
                }(t), n = tp[t];
                if (n) return n(e, i, i.axisMap, i.categoryAxisMap), i
            }(t);
            r && (n = A(r.coordSysDims, function (e) {
                var t = {name: e}, i = r.axisMap.get(e);
                if (i) {
                    var n = i.get("type");
                    t.type = Af(n)
                }
                return t
            })), n = n || a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"];
            var s, l, d = ep(e, {
                coordDimensions: n,
                generateCoord: i.generateCoord,
                encodeDefaulter: i.useEncodeDefaulter ? P(Hd, n, t) : null
            });
            r && D(d, function (e, t) {
                var i = e.coordDim, n = r.categoryAxisMap.get(i);
                n && (null == s && (s = t), e.ordinalMeta = n.getOrdinalMeta()), null != e.otherDims.itemName && (l = !0)
            }), l || null == s || (d[s].otherDims.itemName = 0);
            var u = np(t, d), c = new Vf(d, t);
            c.setCalculationInfo(u);
            var h = null != s && function (e) {
                if (e.sourceFormat === Ed) {
                    var t = function (e) {
                        for (var t = 0; t < e.length && null == e[t];) t++;
                        return e[t]
                    }(e.data || []);
                    return null != t && !M(Lo(t))
                }
            }(e) ? function (e, t, i, n) {
                return n === s ? i : this.defaultDimValueGetter(e, t, i, n)
            } : null;
            return c.hasItemOption = !1, c.initData(e, null, h), c
        }

        function sp(e) {
            this._setting = e || {}, this._extent = [1 / 0, -1 / 0], this._interval = 0, this.init && this.init.apply(this, arguments)
        }

        function lp(e) {
            this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this._map
        }

        sp.prototype.parse = function (e) {
            return e
        }, sp.prototype.getSetting = function (e) {
            return this._setting[e]
        }, sp.prototype.contain = function (e) {
            var t = this._extent;
            return e >= t[0] && e <= t[1]
        }, sp.prototype.normalize = function (e) {
            var t = this._extent;
            return t[1] === t[0] ? .5 : (e - t[0]) / (t[1] - t[0])
        }, sp.prototype.scale = function (e) {
            var t = this._extent;
            return e * (t[1] - t[0]) + t[0]
        }, sp.prototype.unionExtent = function (e) {
            var t = this._extent;
            e[0] < t[0] && (t[0] = e[0]), e[1] > t[1] && (t[1] = e[1])
        }, sp.prototype.unionExtentFromData = function (e, t) {
            this.unionExtent(e.getApproximateExtent(t))
        }, sp.prototype.getExtent = function () {
            return this._extent.slice()
        }, sp.prototype.setExtent = function (e, t) {
            var i = this._extent;
            isNaN(e) || (i[0] = e), isNaN(t) || (i[1] = t)
        }, sp.prototype.isBlank = function () {
            return this._isBlank
        }, sp.prototype.setBlank = function (e) {
            this._isBlank = e
        }, sp.prototype.getLabel = null, Qo(sp), na(sp, {registerWhenExtend: !0}), lp.createByAxisModel = function (e) {
            var t = e.option, i = t.data, n = i && A(i, cp);
            return new lp({categories: n, needCollect: !n, deduplication: !1 !== t.dedplication})
        };
        var dp = lp.prototype;

        function up(e) {
            return e._map || (e._map = $(e.categories))
        }

        function cp(e) {
            return R(e) && null != e.value ? e.value : e + ""
        }

        dp.getOrdinal = function (e) {
            return up(this).get(e)
        }, dp.parseAndCollect = function (e) {
            var t, i = this._needCollect;
            if ("string" != typeof e && !i) return e;
            if (i && !this._deduplication) return t = this.categories.length, this.categories[t] = e, t;
            var n = up(this);
            return null == (t = n.get(e)) && (i ? (t = this.categories.length, this.categories[t] = e, n.set(e, t)) : t = NaN), t
        };
        var hp = sp.prototype, fp = sp.extend({
            type: "ordinal", init: function (e, t) {
                e && !M(e) || (e = new lp({categories: e})), this._ordinalMeta = e, this._extent = t || [0, e.categories.length - 1]
            }, parse: function (e) {
                return "string" == typeof e ? this._ordinalMeta.getOrdinal(e) : Math.round(e)
            }, contain: function (e) {
                return e = this.parse(e), hp.contain.call(this, e) && null != this._ordinalMeta.categories[e]
            }, normalize: function (e) {
                return hp.normalize.call(this, this.parse(e))
            }, scale: function (e) {
                return Math.round(hp.scale.call(this, e))
            }, getTicks: function () {
                for (var e = [], t = this._extent, i = t[0]; i <= t[1];) e.push(i), i++;
                return e
            }, getLabel: function (e) {
                if (!this.isBlank()) return this._ordinalMeta.categories[e]
            }, count: function () {
                return this._extent[1] - this._extent[0] + 1
            }, unionExtentFromData: function (e, t) {
                this.unionExtent(e.getApproximateExtent(t))
            }, getOrdinalMeta: function () {
                return this._ordinalMeta
            }, niceTicks: te, niceExtent: te
        });
        fp.create = function () {
            return new fp
        };
        var pp = El;

        function gp(e) {
            return Ml(e) + 2
        }

        function mp(e, t, i) {
            e[t] = Math.max(Math.min(e[t], i[1]), i[0])
        }

        function vp(e, t) {
            isFinite(e[0]) || (e[0] = t[0]), isFinite(e[1]) || (e[1] = t[1]), mp(e, 0, t), mp(e, 1, t), e[0] > e[1] && (e[0] = e[1])
        }

        var yp = El, Tp = sp.extend({
            type: "interval", _interval: 0, _intervalPrecision: 2, setExtent: function (e, t) {
                var i = this._extent;
                isNaN(e) || (i[0] = parseFloat(e)), isNaN(t) || (i[1] = parseFloat(t))
            }, unionExtent: function (e) {
                var t = this._extent;
                e[0] < t[0] && (t[0] = e[0]), e[1] > t[1] && (t[1] = e[1]), Tp.prototype.setExtent.call(this, t[0], t[1])
            }, getInterval: function () {
                return this._interval
            }, setInterval: function (e) {
                this._interval = e, this._niceExtent = this._extent.slice(), this._intervalPrecision = gp(e)
            }, getTicks: function (e) {
                var t = this._interval, i = this._extent, n = this._niceExtent, o = this._intervalPrecision, a = [];
                if (!t) return a;
                i[0] < n[0] && (e ? a.push(yp(n[0] - t, o)) : a.push(i[0]));
                for (var r = n[0]; r <= n[1] && (a.push(r), (r = yp(r + t, o)) !== a[a.length - 1]);) if (1e4 < a.length) return [];
                var s = a.length ? a[a.length - 1] : n[1];
                return i[1] > s && (e ? a.push(yp(s + t, o)) : a.push(i[1])), a
            }, getMinorTicks: function (e) {
                for (var t = this.getTicks(!0), i = [], n = this.getExtent(), o = 1; o < t.length; o++) {
                    for (var a = t[o], r = t[o - 1], s = 0, l = [], d = (a - r) / e; s < e - 1;) {
                        var u = El(r + (s + 1) * d);
                        u > n[0] && u < n[1] && l.push(u), s++
                    }
                    i.push(l)
                }
                return i
            }, getLabel: function (e, t) {
                if (null == e) return "";
                var i = t && t.precision;
                return null == i ? i = Ml(e) || 0 : "auto" === i && (i = this._intervalPrecision), ql(e = yp(e, i, !0))
            }, niceTicks: function (e, t, i) {
                e = e || 5;
                var n = this._extent, o = n[1] - n[0];
                if (isFinite(o)) {
                    o < 0 && (o = -o, n.reverse());
                    var a = function (e, t, i, n) {
                        var o = {}, a = e[1] - e[0], r = o.interval = jl(a / t, !0);
                        null != i && r < i && (r = o.interval = i), null != n && n < r && (r = o.interval = n);
                        var s = o.intervalPrecision = gp(r);
                        return vp(o.niceTickExtent = [pp(Math.ceil(e[0] / r) * r, s), pp(Math.floor(e[1] / r) * r, s)], e), o
                    }(n, e, t, i);
                    this._intervalPrecision = a.intervalPrecision, this._interval = a.interval, this._niceExtent = a.niceTickExtent
                }
            }, niceExtent: function (e) {
                var t = this._extent;
                if (t[0] === t[1]) if (0 !== t[0]) {
                    var i = t[0];
                    e.fixMax || (t[1] += i / 2), t[0] -= i / 2
                } else t[1] = 1;
                var n = t[1] - t[0];
                isFinite(n) || (t[0] = 0, t[1] = 1), this.niceTicks(e.splitNumber, e.minInterval, e.maxInterval);
                var o = this._interval;
                e.fixMin || (t[0] = yp(Math.floor(t[0] / o) * o)), e.fixMax || (t[1] = yp(Math.ceil(t[1] / o) * o))
            }
        });
        Tp.create = function () {
            return new Tp
        };
        var wp = "__ec_stack_", kp = "undefined" != typeof Float32Array ? Float32Array : Array;

        function Cp(e) {
            return e.get("stack") || wp + e.seriesIndex
        }

        function bp(e) {
            return e.dim + e.index
        }

        function Ip(e, t) {
            var i = [];
            return t.eachSeriesByType(e, function (e) {
                xp(e) && !Ep(e) && i.push(e)
            }), i
        }

        function Sp(e) {
            var t = function (e) {
                var t = {};
                D(e, function (e) {
                    var i = e.coordinateSystem.getBaseAxis();
                    if ("time" === i.type || "value" === i.type) for (var n = e.getData(), o = i.dim + "_" + i.index, a = n.mapDimension(i.dim), r = 0, s = n.count(); r < s; ++r) {
                        var l = n.get(a, r);
                        t[o] ? t[o].push(l) : t[o] = [l]
                    }
                });
                var i = [];
                for (var n in t) if (t.hasOwnProperty(n)) {
                    var o = t[n];
                    if (o) {
                        o.sort(function (e, t) {
                            return e - t
                        });
                        for (var a = null, r = 1; r < o.length; ++r) {
                            var s = o[r] - o[r - 1];
                            0 < s && (a = null === a ? s : Math.min(a, s))
                        }
                        i[n] = a
                    }
                }
                return i
            }(e), i = [];
            return D(e, function (e) {
                var n, o = e.coordinateSystem.getBaseAxis(), a = o.getExtent();
                if ("category" === o.type) n = o.getBandWidth(); else if ("value" === o.type || "time" === o.type) {
                    var r = o.dim + "_" + o.index, s = t[r], l = Math.abs(a[1] - a[0]), d = o.scale.getExtent(),
                        u = Math.abs(d[1] - d[0]);
                    n = s ? l / u * s : l
                } else {
                    var c = e.getData();
                    n = Math.abs(a[1] - a[0]) / c.count()
                }
                var h = xl(e.get("barWidth"), n), f = xl(e.get("barMaxWidth"), n), p = xl(e.get("barMinWidth") || 1, n),
                    g = e.get("barGap"), m = e.get("barCategoryGap");
                i.push({
                    bandWidth: n,
                    barWidth: h,
                    barMaxWidth: f,
                    barMinWidth: p,
                    barGap: g,
                    barCategoryGap: m,
                    axisKey: bp(o),
                    stackId: Cp(e)
                })
            }), _p(i)
        }

        function _p(e) {
            var t = {};
            D(e, function (e, i) {
                var n = e.axisKey, o = e.bandWidth, a = t[n] || {
                    bandWidth: o,
                    remainedWidth: o,
                    autoWidthCount: 0,
                    categoryGap: "20%",
                    gap: "30%",
                    stacks: {}
                }, r = a.stacks;
                t[n] = a;
                var s = e.stackId;
                r[s] || a.autoWidthCount++, r[s] = r[s] || {width: 0, maxWidth: 0};
                var l = e.barWidth;
                l && !r[s].width && (r[s].width = l, l = Math.min(a.remainedWidth, l), a.remainedWidth -= l);
                var d = e.barMaxWidth;
                d && (r[s].maxWidth = d);
                var u = e.barMinWidth;
                u && (r[s].minWidth = u);
                var c = e.barGap;
                null != c && (a.gap = c);
                var h = e.barCategoryGap;
                null != h && (a.categoryGap = h)
            });
            var i = {};
            return D(t, function (e, t) {
                i[t] = {};
                var n = e.stacks, o = e.bandWidth, a = xl(e.categoryGap, o), r = xl(e.gap, 1), s = e.remainedWidth,
                    l = e.autoWidthCount, d = (s - a) / (l + (l - 1) * r);
                d = Math.max(d, 0), D(n, function (e) {
                    var t = e.maxWidth, i = e.minWidth;
                    if (e.width) n = e.width, t && (n = Math.min(n, t)), i && (n = Math.max(n, i)), e.width = n, s -= n + r * n, l--; else {
                        var n = d;
                        t && t < n && (n = Math.min(t, s)), i && n < i && (n = i), n !== d && (e.width = n, s -= n + r * n, l--)
                    }
                }), d = (s - a) / (l + (l - 1) * r), d = Math.max(d, 0);
                var u, c = 0;
                D(n, function (e, t) {
                    e.width || (e.width = d), c += (u = e).width * (1 + r)
                }), u && (c -= u.width * r);
                var h = -c / 2;
                D(n, function (e, n) {
                    i[t][n] = i[t][n] || {bandWidth: o, offset: h, width: e.width}, h += e.width * (1 + r)
                })
            }), i
        }

        function Dp(e, t, i) {
            if (e && t) {
                var n = e[bp(t)];
                return null != n && null != i && (n = n[Cp(i)]), n
            }
        }

        function Ap(e, t) {
            var i = Ip(e, t), n = Sp(i), o = {};
            D(i, function (e) {
                var t = e.getData(), i = e.coordinateSystem, a = i.getBaseAxis(), r = Cp(e), s = n[bp(a)][r],
                    l = s.offset, d = s.width, u = i.getOtherAxis(a), c = e.get("barMinHeight") || 0;
                o[r] = o[r] || [], t.setLayout({bandWidth: s.bandWidth, offset: l, size: d});
                for (var h = t.mapDimension(u.dim), f = t.mapDimension(a.dim), p = op(t, h), g = u.isHorizontal(), m = Op(0, u), v = 0, y = t.count(); v < y; v++) {
                    var T, w, k, C, b, I = t.get(h, v), S = t.get(f, v), _ = 0 <= I ? "p" : "n", D = m;
                    p && (o[r][S] || (o[r][S] = {
                        p: m,
                        n: m
                    }), D = o[r][S][_]), g ? (T = D, w = (b = i.dataToPoint([I, S]))[1] + l, k = b[0] - m, C = d, Math.abs(k) < c && (k = (k < 0 ? -1 : 1) * c), isNaN(k) || p && (o[r][S][_] += k)) : (T = (b = i.dataToPoint([S, I]))[0] + l, w = D, k = d, C = b[1] - m, Math.abs(C) < c && (C = (C <= 0 ? -1 : 1) * c), isNaN(C) || p && (o[r][S][_] += C)), t.setItemLayout(v, {
                        x: T,
                        y: w,
                        width: k,
                        height: C
                    })
                }
            }, this)
        }

        var Np = {
            seriesType: "bar", plan: uc(), reset: function (e) {
                if (xp(e) && Ep(e)) {
                    var t = e.getData(), i = e.coordinateSystem, n = i.grid.getRect(), o = i.getBaseAxis(),
                        a = i.getOtherAxis(o), r = t.mapDimension(a.dim), s = t.mapDimension(o.dim),
                        l = a.isHorizontal(), d = l ? 0 : 1, u = Dp(Sp([e]), o, e).width;
                    return .5 < u || (u = .5), {
                        progress: function (e, t) {
                            for (var o, c = e.count, h = new kp(2 * c), f = new kp(2 * c), p = new kp(c), g = [], m = [], v = 0, y = 0; null != (o = e.next());) m[d] = t.get(r, o), m[1 - d] = t.get(s, o), g = i.dataToPoint(m, null, g), f[v] = l ? n.x + n.width : g[0], h[v++] = g[0], f[v] = l ? g[1] : n.y + n.height, h[v++] = g[1], p[y++] = o;
                            t.setLayout({
                                largePoints: h,
                                largeDataIndices: p,
                                largeBackgroundPoints: f,
                                barWidth: u,
                                valueAxisStart: Op(0, a),
                                backgroundStart: l ? n.x : n.y,
                                valueAxisHorizontal: l
                            })
                        }
                    }
                }
            }
        };

        function xp(e) {
            return e.coordinateSystem && "cartesian2d" === e.coordinateSystem.type
        }

        function Ep(e) {
            return e.pipelineContext && e.pipelineContext.large
        }

        function Op(e, t) {
            return t.toGlobalCoord(t.dataToCoord("log" === t.type ? 1 : 0))
        }

        var Pp = Tp.prototype, Mp = Math.ceil, Fp = Math.floor, Lp = 864e5, Rp = Tp.extend({
            type: "time", getLabel: function (e) {
                var t = this._stepLvl, i = new Date(e);
                return rd(t[0], i, this.getSetting("useUTC"))
            }, niceExtent: function (e) {
                var t = this._extent;
                if (t[0] === t[1] && (t[0] -= Lp, t[1] += Lp), t[1] === -1 / 0 && t[0] === 1 / 0) {
                    var i = new Date;
                    t[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), t[0] = t[1] - Lp
                }
                this.niceTicks(e.splitNumber, e.minInterval, e.maxInterval);
                var n = this._interval;
                e.fixMin || (t[0] = El(Fp(t[0] / n) * n)), e.fixMax || (t[1] = El(Mp(t[1] / n) * n))
            }, niceTicks: function (e, t, i) {
                e = e || 10;
                var n = this._extent, o = n[1] - n[0], a = o / e;
                null != t && a < t && (a = t), null != i && i < a && (a = i);
                var r = Bp.length, s = function (e, t, i, n) {
                    for (; i < n;) {
                        var o = i + n >>> 1;
                        e[o][1] < t ? i = 1 + o : n = o
                    }
                    return i
                }(Bp, a, 0, r), l = Bp[Math.min(s, r - 1)], d = l[1];
                "year" === l[0] && (d *= jl(o / d / e, !0));
                var u = this.getSetting("useUTC") ? 0 : 60 * new Date(+n[0] || +n[1]).getTimezoneOffset() * 1e3,
                    c = [Math.round(Mp((n[0] - u) / d) * d + u), Math.round(Fp((n[1] - u) / d) * d + u)];
                vp(c, n), this._stepLvl = l, this._interval = d, this._niceExtent = c
            }, parse: function (e) {
                return +Kl(e)
            }
        });
        D(["contain", "normalize"], function (e) {
            Rp.prototype[e] = function (t) {
                return Pp[e].call(this, this.parse(t))
            }
        });
        var Bp = [["hh:mm:ss", 1e3], ["hh:mm:ss", 5e3], ["hh:mm:ss", 1e4], ["hh:mm:ss", 15e3], ["hh:mm:ss", 3e4], ["hh:mm\nMM-dd", 6e4], ["hh:mm\nMM-dd", 3e5], ["hh:mm\nMM-dd", 6e5], ["hh:mm\nMM-dd", 9e5], ["hh:mm\nMM-dd", 18e5], ["hh:mm\nMM-dd", 36e5], ["hh:mm\nMM-dd", 72e5], ["hh:mm\nMM-dd", 216e5], ["hh:mm\nMM-dd", 432e5], ["MM-dd\nyyyy", Lp], ["MM-dd\nyyyy", 2 * Lp], ["MM-dd\nyyyy", 3 * Lp], ["MM-dd\nyyyy", 4 * Lp], ["MM-dd\nyyyy", 5 * Lp], ["MM-dd\nyyyy", 6 * Lp], ["week", 7 * Lp], ["MM-dd\nyyyy", 864e6], ["week", 14 * Lp], ["week", 21 * Lp], ["month", 31 * Lp], ["week", 42 * Lp], ["month", 62 * Lp], ["week", 70 * Lp], ["quarter", 95 * Lp], ["month", 31 * Lp * 4], ["month", 13392e6], ["half-year", 16416e6], ["month", 31 * Lp * 8], ["month", 26784e6], ["year", 380 * Lp]];
        Rp.create = function (e) {
            return new Rp({useUTC: e.ecModel.get("useUTC")})
        };
        var Up = sp.prototype, Vp = Tp.prototype, Kp = Ml, Gp = El, Wp = Math.floor, jp = Math.ceil, Hp = Math.pow,
            zp = Math.log, Xp = sp.extend({
                type: "log", base: 10, $constructor: function () {
                    sp.apply(this, arguments), this._originalScale = new Tp
                }, getTicks: function (e) {
                    var t = this._originalScale, i = this._extent, n = t.getExtent();
                    return A(Vp.getTicks.call(this, e), function (e) {
                        var o = El(Hp(this.base, e));
                        return o = e === i[0] && t.__fixMin ? qp(o, n[0]) : o, o = e === i[1] && t.__fixMax ? qp(o, n[1]) : o
                    }, this)
                }, getMinorTicks: Vp.getMinorTicks, getLabel: Vp.getLabel, scale: function (e) {
                    return e = Up.scale.call(this, e), Hp(this.base, e)
                }, setExtent: function (e, t) {
                    var i = this.base;
                    e = zp(e) / zp(i), t = zp(t) / zp(i), Vp.setExtent.call(this, e, t)
                }, getExtent: function () {
                    var e = this.base, t = Up.getExtent.call(this);
                    t[0] = Hp(e, t[0]), t[1] = Hp(e, t[1]);
                    var i = this._originalScale, n = i.getExtent();
                    return i.__fixMin && (t[0] = qp(t[0], n[0])), i.__fixMax && (t[1] = qp(t[1], n[1])), t
                }, unionExtent: function (e) {
                    this._originalScale.unionExtent(e);
                    var t = this.base;
                    e[0] = zp(e[0]) / zp(t), e[1] = zp(e[1]) / zp(t), Up.unionExtent.call(this, e)
                }, unionExtentFromData: function (e, t) {
                    this.unionExtent(e.getApproximateExtent(t))
                }, niceTicks: function (e) {
                    e = e || 10;
                    var t = this._extent, i = t[1] - t[0];
                    if (!(i == 1 / 0 || i <= 0)) {
                        var n = Gl(i);
                        for (e / i * n <= .5 && (n *= 10); !isNaN(n) && Math.abs(n) < 1 && 0 < Math.abs(n);) n *= 10;
                        var o = [El(jp(t[0] / n) * n), El(Wp(t[1] / n) * n)];
                        this._interval = n, this._niceExtent = o
                    }
                }, niceExtent: function (e) {
                    Vp.niceExtent.call(this, e);
                    var t = this._originalScale;
                    t.__fixMin = e.fixMin, t.__fixMax = e.fixMax
                }
            });

        function qp(e, t) {
            return Gp(e, Kp(t))
        }

        function Yp(e, t) {
            var i, n, o, a = e.type, r = t.getMin(), s = t.getMax(), l = e.getExtent();
            "ordinal" === a ? i = t.getCategories().length : (M(n = t.get("boundaryGap")) || (n = [n || 0, n || 0]), "boolean" == typeof n[0] && (n = [0, 0]), n[0] = xl(n[0], 1), n[1] = xl(n[1], 1), o = l[1] - l[0] || Math.abs(l[0])), "dataMin" === r ? r = l[0] : "function" == typeof r && (r = r({
                min: l[0],
                max: l[1]
            })), "dataMax" === s ? s = l[1] : "function" == typeof s && (s = s({min: l[0], max: l[1]}));
            var d = null != r, u = null != s;
            null == r && (r = "ordinal" === a ? i ? 0 : NaN : l[0] - n[0] * o), null == s && (s = "ordinal" === a ? i ? i - 1 : NaN : l[1] + n[1] * o), null != r && isFinite(r) || (r = NaN), null != s && isFinite(s) || (s = NaN), e.setBlank(K(r) || K(s) || "ordinal" === a && !e.getOrdinalMeta().categories.length), t.getNeedCrossZero() && (0 < r && 0 < s && !d && (r = 0), r < 0 && s < 0 && !u && (s = 0));
            var c = t.ecModel;
            if (c && "time" === a) {
                var h, f = Ip("bar", c);
                if (D(f, function (e) {
                    h |= e.getBaseAxis() === t.axis
                }), h) {
                    var p = Sp(f), g = function (e, t, i, n) {
                        var o = i.axis.getExtent(), a = o[1] - o[0], r = Dp(n, i.axis);
                        if (void 0 === r) return {min: e, max: t};
                        var s = 1 / 0;
                        D(r, function (e) {
                            s = Math.min(e.offset, s)
                        });
                        var l = -1 / 0;
                        D(r, function (e) {
                            l = Math.max(e.offset + e.width, l)
                        }), s = Math.abs(s), l = Math.abs(l);
                        var d = s + l, u = t - e, c = u / (1 - (s + l) / a) - u;
                        return {min: e -= s / d * c, max: t += l / d * c}
                    }(r, s, t, p);
                    r = g.min, s = g.max
                }
            }
            return {extent: [r, s], fixMin: d, fixMax: u}
        }

        function Jp(e, t) {
            var i = Yp(e, t), n = i.extent, o = t.get("splitNumber");
            "log" === e.type && (e.base = t.get("logBase"));
            var a = e.type;
            e.setExtent(n[0], n[1]), e.niceExtent({
                splitNumber: o,
                fixMin: i.fixMin,
                fixMax: i.fixMax,
                minInterval: "interval" === a || "time" === a ? t.get("minInterval") : null,
                maxInterval: "interval" === a || "time" === a ? t.get("maxInterval") : null
            });
            var r = t.get("interval");
            null != r && e.setInterval && e.setInterval(r)
        }

        function Zp(e, t) {
            if (t = t || e.get("type")) switch (t) {
                case"category":
                    return new fp(e.getOrdinalMeta ? e.getOrdinalMeta() : e.getCategories(), [1 / 0, -1 / 0]);
                case"value":
                    return new Tp;
                default:
                    return (sp.getClass(t) || Tp).create(e)
            }
        }

        function Qp(e) {
            var t, i = e.getLabelModel().get("formatter"), n = "category" === e.type ? e.scale.getExtent()[0] : null;
            return "string" == typeof i ? (t = i, i = function (i) {
                return i = e.scale.getLabel(i), t.replace("{value}", null != i ? i : "")
            }) : "function" == typeof i ? function (t, o) {
                return null != n && (o = t - n), i($p(e, t), o)
            } : function (t) {
                return e.scale.getLabel(t)
            }
        }

        function $p(e, t) {
            return "category" === e.type ? e.scale.getLabel(t) : t
        }

        function eg(e) {
            var t = e.get("interval");
            return null == t ? "auto" : t
        }

        function tg(e) {
            return "category" === e.type && 0 === eg(e.getLabelModel())
        }

        D(["contain", "normalize"], function (e) {
            Xp.prototype[e] = function (t) {
                return t = zp(t) / zp(this.base), Up[e].call(this, t)
            }
        }), Xp.create = function () {
            return new Xp
        };
        var ig = {
            getMin: function (e) {
                var t = this.option, i = e || null == t.rangeStart ? t.min : t.rangeStart;
                return this.axis && null != i && "dataMin" !== i && "function" != typeof i && !K(i) && (i = this.axis.scale.parse(i)), i
            }, getMax: function (e) {
                var t = this.option, i = e || null == t.rangeEnd ? t.max : t.rangeEnd;
                return this.axis && null != i && "dataMax" !== i && "function" != typeof i && !K(i) && (i = this.axis.scale.parse(i)), i
            }, getNeedCrossZero: function () {
                var e = this.option;
                return null == e.rangeStart && null == e.rangeEnd && !e.scale
            }, getCoordSysModel: te, setRange: function (e, t) {
                this.option.rangeStart = e, this.option.rangeEnd = t
            }, resetRange: function () {
                this.option.rangeStart = this.option.rangeEnd = null
            }
        }, ng = bs({
            type: "triangle", shape: {cx: 0, cy: 0, width: 0, height: 0}, buildPath: function (e, t) {
                var i = t.cx, n = t.cy, o = t.width / 2, a = t.height / 2;
                e.moveTo(i, n - a), e.lineTo(i + o, n + a), e.lineTo(i - o, n + a), e.closePath()
            }
        }), og = bs({
            type: "diamond", shape: {cx: 0, cy: 0, width: 0, height: 0}, buildPath: function (e, t) {
                var i = t.cx, n = t.cy, o = t.width / 2, a = t.height / 2;
                e.moveTo(i, n - a), e.lineTo(i + o, n), e.lineTo(i, n + a), e.lineTo(i - o, n), e.closePath()
            }
        }), ag = bs({
            type: "pin", shape: {x: 0, y: 0, width: 0, height: 0}, buildPath: function (e, t) {
                var i = t.x, n = t.y, o = t.width / 5 * 3, a = Math.max(o, t.height), r = o / 2, s = r * r / (a - r),
                    l = n - a + r + s, d = Math.asin(s / r), u = Math.cos(d) * r, c = Math.sin(d), h = Math.cos(d),
                    f = .6 * r, p = .7 * r;
                e.moveTo(i - u, l + s), e.arc(i, l, r, Math.PI - d, 2 * Math.PI + d), e.bezierCurveTo(i + u - c * f, l + s + h * f, i, n - p, i, n), e.bezierCurveTo(i, n - p, i - u + c * f, l + s + h * f, i - u, l + s), e.closePath()
            }
        }), rg = bs({
            type: "arrow", shape: {x: 0, y: 0, width: 0, height: 0}, buildPath: function (e, t) {
                var i = t.height, n = t.width, o = t.x, a = t.y, r = n / 3 * 2;
                e.moveTo(o, a), e.lineTo(o + r, a + i), e.lineTo(o, a + i / 4 * 3), e.lineTo(o - r, a + i), e.lineTo(o, a), e.closePath()
            }
        }), sg = {
            line: function (e, t, i, n, o) {
                o.x1 = e, o.y1 = t + n / 2, o.x2 = e + i, o.y2 = t + n / 2
            }, rect: function (e, t, i, n, o) {
                o.x = e, o.y = t, o.width = i, o.height = n
            }, roundRect: function (e, t, i, n, o) {
                o.x = e, o.y = t, o.width = i, o.height = n, o.r = Math.min(i, n) / 4
            }, square: function (e, t, i, n, o) {
                var a = Math.min(i, n);
                o.x = e, o.y = t, o.width = a, o.height = a
            }, circle: function (e, t, i, n, o) {
                o.cx = e + i / 2, o.cy = t + n / 2, o.r = Math.min(i, n) / 2
            }, diamond: function (e, t, i, n, o) {
                o.cx = e + i / 2, o.cy = t + n / 2, o.width = i, o.height = n
            }, pin: function (e, t, i, n, o) {
                o.x = e + i / 2, o.y = t + n / 2, o.width = i, o.height = n
            }, arrow: function (e, t, i, n, o) {
                o.x = e + i / 2, o.y = t + n / 2, o.width = i, o.height = n
            }, triangle: function (e, t, i, n, o) {
                o.cx = e + i / 2, o.cy = t + n / 2, o.width = i, o.height = n
            }
        }, lg = {};
        D({
            line: is,
            rect: es,
            roundRect: es,
            square: es,
            circle: Kr,
            diamond: og,
            pin: ag,
            arrow: rg,
            triangle: ng
        }, function (e, t) {
            lg[t] = new e
        });
        var dg = bs({
            type: "symbol",
            shape: {symbolType: "", x: 0, y: 0, width: 0, height: 0},
            calculateTextPosition: function (e, t, i) {
                var n = pn(e, t, i), o = this.shape;
                return o && "pin" === o.symbolType && "inside" === t.textPosition && (n.y = i.y + .4 * i.height), n
            },
            buildPath: function (e, t, i) {
                var n = t.symbolType;
                if ("none" !== n) {
                    var o = lg[n];
                    o = o || lg[n = "rect"], sg[n](t.x, t.y, t.width, t.height, o.shape), o.buildPath(e, o.shape, i)
                }
            }
        });

        function ug(e, t) {
            if ("image" !== this.type) {
                var i = this.style, n = this.shape;
                n && "line" === n.symbolType ? i.stroke = e : this.__isEmptyBrush ? (i.stroke = e, i.fill = t || "#fff") : (i.fill && (i.fill = e), i.stroke && (i.stroke = e)), this.dirty(!1)
            }
        }

        function cg(e, t, i, n, o, a, r) {
            var s, l = 0 === e.indexOf("empty");
            return l && (e = e.substr(5, 1).toLowerCase() + e.substr(6)), (s = 0 === e.indexOf("image://") ? Ds(e.slice(8), new Di(t, i, n, o), r ? "center" : "cover") : 0 === e.indexOf("path://") ? _s(e.slice(7), {}, new Di(t, i, n, o), r ? "center" : "cover") : new dg({
                shape: {
                    symbolType: e,
                    x: t,
                    y: i,
                    width: n,
                    height: o
                }
            })).__isEmptyBrush = l, s.setColor = ug, s.setColor(a), s
        }

        var hg = {isDimensionStacked: op, enableDataStack: np, getStackedDimension: ap},
            fg = (Object.freeze || Object)({
                createList: function (e) {
                    return rp(e.getSource(), e)
                }, getLayoutRect: md, dataStack: hg, createScale: function (e, t) {
                    var i = t;
                    bl.isInstance(t) || S(i = new bl(t), ig);
                    var n = Zp(i);
                    return n.setExtent(e[0], e[1]), Jp(n, i), n
                }, mixinAxisModelCommonMethods: function (e) {
                    S(e, ig)
                }, completeDimensions: Qf, createDimensions: ep, createSymbol: cg
            }), pg = 1e-8;

        function gg(e, t) {
            return Math.abs(e - t) < pg
        }

        function mg(e, t, i) {
            var n = 0, o = e[0];
            if (!o) return !1;
            for (var a = 1; a < e.length; a++) {
                var r = e[a];
                n += lr(o[0], o[1], r[0], r[1], t, i), o = r
            }
            var s = e[0];
            return gg(o[0], s[0]) && gg(o[1], s[1]) || (n += lr(o[0], o[1], s[0], s[1], t, i)), 0 !== n
        }

        function vg(e, t, i) {
            if (this.name = e, this.geometries = t, i) i = [i[0], i[1]]; else {
                var n = this.getBoundingRect();
                i = [n.x + n.width / 2, n.y + n.height / 2]
            }
            this.center = i
        }

        function yg(e, t, i) {
            for (var n = [], o = t[0], a = t[1], r = 0; r < e.length; r += 2) {
                var s = e.charCodeAt(r) - 64, l = e.charCodeAt(r + 1) - 64;
                s = s >> 1 ^ -(1 & s), l = l >> 1 ^ -(1 & l), o = s += o, a = l += a, n.push([s / i, l / i])
            }
            return n
        }

        function Tg(e, t) {
            return function (e) {
                if (e.UTF8Encoding) {
                    var t = e.UTF8Scale;
                    null == t && (t = 1024);
                    for (var i = e.features, n = 0; n < i.length; n++) for (var o = i[n].geometry, a = o.coordinates, r = o.encodeOffsets, s = 0; s < a.length; s++) {
                        var l = a[s];
                        if ("Polygon" === o.type) a[s] = yg(l, r[s], t); else if ("MultiPolygon" === o.type) for (var d = 0; d < l.length; d++) {
                            var u = l[d];
                            l[d] = yg(u, r[s][d], t)
                        }
                    }
                    e.UTF8Encoding = !1
                }
            }(e), A(x(e.features, function (e) {
                return e.geometry && e.properties && 0 < e.geometry.coordinates.length
            }), function (e) {
                var i = e.properties, n = e.geometry, o = n.coordinates, a = [];
                "Polygon" === n.type && a.push({
                    type: "polygon",
                    exterior: o[0],
                    interiors: o.slice(1)
                }), "MultiPolygon" === n.type && D(o, function (e) {
                    e[0] && a.push({type: "polygon", exterior: e[0], interiors: e.slice(1)})
                });
                var r = new vg(i[t || "name"], a, i.cp);
                return r.properties = i, r
            })
        }

        vg.prototype = {
            constructor: vg, properties: null, getBoundingRect: function () {
                var e = this._rect;
                if (e) return e;
                for (var t = Number.MAX_VALUE, i = [t, t], n = [-t, -t], o = [], a = [], r = this.geometries, s = 0; s < r.length; s++) "polygon" === r[s].type && (La(r[s].exterior, o, a), be(i, i, o), Ie(n, n, a));
                return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0), this._rect = new Di(i[0], i[1], n[0] - i[0], n[1] - i[1])
            }, contain: function (e) {
                var t = this.getBoundingRect(), i = this.geometries;
                if (!t.contain(e[0], e[1])) return !1;
                e:for (var n = 0, o = i.length; n < o; n++) if ("polygon" === i[n].type) {
                    var a = i[n].exterior, r = i[n].interiors;
                    if (mg(a, e[0], e[1])) {
                        for (var s = 0; s < (r ? r.length : 0); s++) if (mg(r[s])) continue e;
                        return !0
                    }
                }
                return !1
            }, transformTo: function (e, t, i, n) {
                var o = this.getBoundingRect(), a = o.width / o.height;
                i ? n = n || i / a : i = a * n;
                for (var r = new Di(e, t, i, n), s = o.calculateTransform(r), l = this.geometries, d = 0; d < l.length; d++) if ("polygon" === l[d].type) {
                    for (var u = l[d].exterior, c = l[d].interiors, h = 0; h < u.length; h++) Ce(u[h], u[h], s);
                    for (var f = 0; f < (c ? c.length : 0); f++) for (h = 0; h < c[f].length; h++) Ce(c[f][h], c[f][h], s)
                }
                (o = this._rect).copy(r), this.center = [o.x + o.width / 2, o.y + o.height / 2]
            }, cloneShallow: function (e) {
                null == e && (e = this.name);
                var t = new vg(e, this.geometries, this.center);
                return t._rect = this._rect, t.transformTo = null, t
            }
        };
        var wg = Go();

        function kg(e, t) {
            var i, n = Cg(e, "labels"), o = eg(t), a = bg(n, o);
            return a || Ig(n, o, {
                labels: F(o) ? _g(e, o) : Sg(e, i = "auto" === o ? function (e) {
                    var t = wg(e).autoInterval;
                    return null != t ? t : wg(e).autoInterval = e.calculateCategoryInterval()
                }(e) : o), labelCategoryInterval: i
            })
        }

        function Cg(e, t) {
            return wg(e)[t] || (wg(e)[t] = [])
        }

        function bg(e, t) {
            for (var i = 0; i < e.length; i++) if (e[i].key === t) return e[i].value
        }

        function Ig(e, t, i) {
            return e.push({key: t, value: i}), i
        }

        function Sg(e, t, i) {
            var n = Qp(e), o = e.scale, a = o.getExtent(), r = e.getLabelModel(), s = [], l = Math.max((t || 0) + 1, 1),
                d = a[0], u = o.count();
            0 !== d && 1 < l && 2 < u / l && (d = Math.round(Math.ceil(d / l) * l));
            var c = tg(e), h = r.get("showMinLabel") || c, f = r.get("showMaxLabel") || c;
            h && d !== a[0] && g(a[0]);
            for (var p = d; p <= a[1]; p += l) g(p);

            function g(e) {
                s.push(i ? e : {formattedLabel: n(e), rawLabel: o.getLabel(e), tickValue: e})
            }

            return f && p - l !== a[1] && g(a[1]), s
        }

        function _g(e, t, i) {
            var n = e.scale, o = Qp(e), a = [];
            return D(n.getTicks(), function (e) {
                var r = n.getLabel(e);
                t(e, r) && a.push(i ? e : {formattedLabel: o(e), rawLabel: r, tickValue: e})
            }), a
        }

        var Dg = [0, 1], Ag = function (e, t, i) {
            this.dim = e, this.scale = t, this._extent = i || [0, 0], this.inverse = !1, this.onBand = !1
        };

        function Ng(e, t) {
            var i = (e[1] - e[0]) / t / 2;
            e[0] += i, e[1] -= i
        }

        Ag.prototype = {
            constructor: Ag, contain: function (e) {
                var t = this._extent, i = Math.min(t[0], t[1]), n = Math.max(t[0], t[1]);
                return i <= e && e <= n
            }, containData: function (e) {
                return this.scale.contain(e)
            }, getExtent: function () {
                return this._extent.slice()
            }, getPixelPrecision: function (e) {
                return Fl(e || this.scale.getExtent(), this._extent)
            }, setExtent: function (e, t) {
                var i = this._extent;
                i[0] = e, i[1] = t
            }, dataToCoord: function (e, t) {
                var i = this._extent, n = this.scale;
                return e = n.normalize(e), this.onBand && "ordinal" === n.type && Ng(i = i.slice(), n.count()), Nl(e, Dg, i, t)
            }, coordToData: function (e, t) {
                var i = this._extent, n = this.scale;
                this.onBand && "ordinal" === n.type && Ng(i = i.slice(), n.count());
                var o = Nl(e, i, Dg, t);
                return this.scale.scale(o)
            }, pointToData: function (e, t) {
            }, getTicksCoords: function (e) {
                var t = (e = e || {}).tickModel || this.getTickModel(), i = A(function (e, t) {
                    return "category" === e.type ? function (e, t) {
                        var i, n, o = Cg(e, "ticks"), a = eg(t), r = bg(o, a);
                        if (r) return r;
                        if (t.get("show") && !e.scale.isBlank() || (i = []), F(a)) i = _g(e, a, !0); else if ("auto" === a) {
                            var s = kg(e, e.getLabelModel());
                            n = s.labelCategoryInterval, i = A(s.labels, function (e) {
                                return e.tickValue
                            })
                        } else i = Sg(e, n = a, !0);
                        return Ig(o, a, {ticks: i, tickCategoryInterval: n})
                    }(e, t) : {ticks: e.scale.getTicks()}
                }(this, t).ticks, function (e) {
                    return {coord: this.dataToCoord(e), tickValue: e}
                }, this);
                return function (e, t, i, n) {
                    var o = t.length;
                    if (e.onBand && !i && o) {
                        var a, r, s = e.getExtent();
                        if (1 === o) t[0].coord = s[0], a = t[1] = {coord: s[0]}; else {
                            var l = t[o - 1].tickValue - t[0].tickValue, d = (t[o - 1].coord - t[0].coord) / l;
                            D(t, function (e) {
                                e.coord -= d / 2
                            });
                            var u = e.scale.getExtent();
                            r = 1 + u[1] - t[o - 1].tickValue, a = {coord: t[o - 1].coord + d * r}, t.push(a)
                        }
                        var c = s[0] > s[1];
                        h(t[0].coord, s[0]) && (n ? t[0].coord = s[0] : t.shift()), n && h(s[0], t[0].coord) && t.unshift({coord: s[0]}), h(s[1], a.coord) && (n ? a.coord = s[1] : t.pop()), n && h(a.coord, s[1]) && t.push({coord: s[1]})
                    }

                    function h(e, t) {
                        return e = El(e), t = El(t), c ? t < e : e < t
                    }
                }(this, i, t.get("alignWithLabel"), e.clamp), i
            }, getMinorTicksCoords: function () {
                if ("ordinal" === this.scale.type) return [];
                var e = this.model.getModel("minorTick").get("splitNumber");
                return 0 < e && e < 100 || (e = 5), A(this.scale.getMinorTicks(e), function (e) {
                    return A(e, function (e) {
                        return {coord: this.dataToCoord(e), tickValue: e}
                    }, this)
                }, this)
            }, getViewLabels: function () {
                return (e = this, "category" === e.type ? function (e) {
                    var t = e.getLabelModel(), i = kg(e, t);
                    return !t.get("show") || e.scale.isBlank() ? {
                        labels: [],
                        labelCategoryInterval: i.labelCategoryInterval
                    } : i
                }(e) : function (e) {
                    var t = e.scale.getTicks(), i = Qp(e);
                    return {
                        labels: A(t, function (t, n) {
                            return {formattedLabel: i(t, n), rawLabel: e.scale.getLabel(t), tickValue: t}
                        })
                    }
                }(e)).labels;
                var e
            }, getLabelModel: function () {
                return this.model.getModel("axisLabel")
            }, getTickModel: function () {
                return this.model.getModel("axisTick")
            }, getBandWidth: function () {
                var e = this._extent, t = this.scale.getExtent(), i = t[1] - t[0] + (this.onBand ? 1 : 0);
                0 === i && (i = 1);
                var n = Math.abs(e[1] - e[0]);
                return Math.abs(n) / i
            }, isHorizontal: null, getRotate: null, calculateCategoryInterval: function () {
                return function (e) {
                    var t = function (e) {
                            var t = e.getLabelModel();
                            return {
                                axisRotate: e.getRotate ? e.getRotate() : e.isHorizontal && !e.isHorizontal() ? 90 : 0,
                                labelRotate: t.get("rotate") || 0,
                                font: t.getFont()
                            }
                        }(e), i = Qp(e), n = (t.axisRotate - t.labelRotate) / 180 * Math.PI, o = e.scale, a = o.getExtent(),
                        r = o.count();
                    if (a[1] - a[0] < 1) return 0;
                    var s = 1;
                    40 < r && (s = Math.max(1, Math.floor(r / 40)));
                    for (var l = a[0], d = e.dataToCoord(l + 1) - e.dataToCoord(l), u = Math.abs(d * Math.cos(n)), c = Math.abs(d * Math.sin(n)), h = 0, f = 0; l <= a[1]; l += s) {
                        var p, g, m = cn(i(l), t.font, "center", "top");
                        p = 1.3 * m.width, g = 1.3 * m.height, h = Math.max(h, p, 7), f = Math.max(f, g, 7)
                    }
                    var v = h / u, y = f / c;
                    isNaN(v) && (v = 1 / 0), isNaN(y) && (y = 1 / 0);
                    var T = Math.max(0, Math.floor(Math.min(v, y))), w = wg(e.model), k = e.getExtent(),
                        C = w.lastAutoInterval, b = w.lastTickCount;
                    return null != C && null != b && Math.abs(C - T) <= 1 && Math.abs(b - r) <= 1 && T < C && w.axisExtend0 === k[0] && w.axisExtend1 === k[1] ? T = C : (w.lastTickCount = r, w.lastAutoInterval = T, w.axisExtend0 = k[0], w.axisExtend1 = k[1]), T
                }(this)
            }
        };
        var xg = Tg, Eg = {};
        D(["map", "each", "filter", "indexOf", "inherits", "reduce", "filter", "bind", "curry", "isArray", "isString", "isObject", "isFunction", "extend", "defaults", "clone", "merge"], function (e) {
            Eg[e] = ie[e]
        });
        var Og = {};

        function Pg(e, t) {
            var i = e.mapDimension("defaultedLabel", !0), n = i.length;
            if (1 === n) return Lu(e, t, i[0]);
            if (n) {
                for (var o = [], a = 0; a < i.length; a++) {
                    var r = Lu(e, t, i[a]);
                    o.push(r)
                }
                return o.join(" ")
            }
        }

        function Mg(e, t, i) {
            Ai.call(this), this.updateData(e, t, i)
        }

        D(["extendShape", "extendPath", "makePath", "makeImage", "mergePath", "resizePath", "createIcon", "setHoverStyle", "setLabelStyle", "setTextStyle", "setText", "getFont", "updateProps", "initProps", "getTransform", "clipPointsByRect", "clipRectByRect", "registerShape", "getShapeClass", "Group", "Image", "Text", "Circle", "Sector", "Ring", "Polygon", "Polyline", "Rect", "Line", "BezierCurve", "Arc", "IncrementalDisplayable", "CompoundPath", "LinearGradient", "RadialGradient", "BoundingRect"], function (e) {
            Og[e] = ml[e]
        }), ec.extend({
            type: "series.line",
            dependencies: ["grid", "polar"],
            getInitialData: function (e, t) {
                return rp(this.getSource(), this, {useEncodeDefaulter: !0})
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "cartesian2d",
                legendHoverLink: !0,
                hoverAnimation: !0,
                clip: !0,
                label: {position: "top"},
                lineStyle: {width: 2, type: "solid"},
                step: !1,
                smooth: !1,
                smoothMonotone: null,
                symbol: "emptyCircle",
                symbolSize: 4,
                symbolRotate: null,
                showSymbol: !0,
                showAllSymbol: "auto",
                connectNulls: !1,
                sampling: "none",
                animationEasing: "linear",
                progressive: 0,
                hoverLayerThreshold: 1 / 0
            }
        });
        var Fg = Mg.prototype, Lg = Mg.getSymbolSize = function (e, t) {
            var i = e.getItemVisual(t, "symbolSize");
            return i instanceof Array ? i.slice() : [+i, +i]
        };

        function Rg(e) {
            return [e[0] / 2, e[1] / 2]
        }

        function Bg(e, t) {
            this.parent.drift(e, t)
        }

        Fg._createSymbol = function (e, t, i, n, o) {
            this.removeAll();
            var a = cg(e, -1, -1, 2, 2, t.getItemVisual(i, "color"), o);
            a.attr({z2: 100, culling: !0, scale: Rg(n)}), a.drift = Bg, this._symbolType = e, this.add(a)
        }, Fg.stopSymbolAnimation = function (e) {
            this.childAt(0).stopAnimation(e)
        }, Fg.getSymbolPath = function () {
            return this.childAt(0)
        }, Fg.getScale = function () {
            return this.childAt(0).scale
        }, Fg.highlight = function () {
            this.childAt(0).trigger("emphasis")
        }, Fg.downplay = function () {
            this.childAt(0).trigger("normal")
        }, Fg.setZ = function (e, t) {
            var i = this.childAt(0);
            i.zlevel = e, i.z = t
        }, Fg.setDraggable = function (e) {
            var t = this.childAt(0);
            t.draggable = e, t.cursor = e ? "move" : t.cursor
        }, Fg.updateData = function (e, t, i) {
            this.silent = !1;
            var n = e.getItemVisual(t, "symbol") || "circle", o = e.hostModel, a = Lg(e, t), r = n !== this._symbolType;
            if (r) {
                var s = e.getItemVisual(t, "symbolKeepAspect");
                this._createSymbol(n, e, t, a, s)
            } else (l = this.childAt(0)).silent = !1, al(l, {scale: Rg(a)}, o, t);
            if (this._updateCommon(e, t, a, i), r) {
                var l = this.childAt(0), d = i && i.fadeIn, u = {scale: l.scale.slice()};
                d && (u.style = {opacity: l.style.opacity}), l.scale = [0, 0], d && (l.style.opacity = 0), rl(l, u, o, t)
            }
            this._seriesModel = o
        };
        var Ug = ["itemStyle"], Vg = ["emphasis", "itemStyle"], Kg = ["label"], Gg = ["emphasis", "label"];

        function Wg(e, t) {
            if (!this.incremental && !this.useHoverLayer) if ("emphasis" === t) {
                var i = this.__symbolOriginalScale, n = i[1] / i[0],
                    o = {scale: [Math.max(1.1 * i[0], i[0] + 3), Math.max(1.1 * i[1], i[1] + 3 * n)]};
                this.animateTo(o, 400, "elasticOut")
            } else "normal" === t && this.animateTo({scale: this.__symbolOriginalScale}, 400, "elasticOut")
        }

        function jg(e) {
            this.group = new Ai, this._symbolCtor = e || Mg
        }

        Fg._updateCommon = function (e, t, i, n) {
            var o = this.childAt(0), a = e.hostModel, r = e.getItemVisual(t, "color");
            "image" !== o.type ? o.useStyle({strokeNoScale: !0}) : o.setStyle({
                opacity: null,
                shadowBlur: null,
                shadowOffsetX: null,
                shadowOffsetY: null,
                shadowColor: null
            });
            var s = n && n.itemStyle, l = n && n.hoverItemStyle, d = n && n.symbolOffset, u = n && n.labelModel,
                c = n && n.hoverLabelModel, h = n && n.hoverAnimation, f = n && n.cursorStyle;
            if (!n || e.hasItemOption) {
                var p = n && n.itemModel ? n.itemModel : e.getItemModel(t);
                s = p.getModel(Ug).getItemStyle(["color"]), l = p.getModel(Vg).getItemStyle(), d = p.getShallow("symbolOffset"), u = p.getModel(Kg), c = p.getModel(Gg), h = p.getShallow("hoverAnimation"), f = p.getShallow("cursor")
            } else l = T({}, l);
            var g = o.style, m = e.getItemVisual(t, "symbolRotate");
            o.attr("rotation", (m || 0) * Math.PI / 180 || 0), d && o.attr("position", [xl(d[0], i[0]), xl(d[1], i[1])]), f && o.attr("cursor", f), o.setColor(r, n && n.symbolInnerColor), o.setStyle(s);
            var v = e.getItemVisual(t, "opacity");
            null != v && (g.opacity = v);
            var y = e.getItemVisual(t, "liftZ"), w = o.__z2Origin;
            null != y ? null == w && (o.__z2Origin = o.z2, o.z2 += y) : null != w && (o.z2 = w, o.__z2Origin = null);
            var k = n && n.useNameLabel;
            Ys(g, l, u, c, {
                labelFetcher: a, labelDataIndex: t, defaultText: function (t, i) {
                    return k ? e.getName(t) : Pg(e, t)
                }, isRectText: !0, autoColor: r
            }), o.__symbolOriginalScale = Rg(i), o.hoverStyle = l, o.highDownOnUpdate = h && a.isAnimationEnabled() ? Wg : null, Hs(o)
        }, Fg.fadeOut = function (e, t) {
            var i = this.childAt(0);
            this.silent = i.silent = !0, t && t.keepLabel || (i.style.text = null), al(i, {
                style: {opacity: 0},
                scale: [0, 0]
            }, this._seriesModel, this.dataIndex, e)
        }, I(Mg, Ai);
        var Hg = jg.prototype;

        function zg(e, t, i, n) {
            return t && !isNaN(t[0]) && !isNaN(t[1]) && !(n.isIgnore && n.isIgnore(i)) && !(n.clipShape && !n.clipShape.contain(t[0], t[1])) && "none" !== e.getItemVisual(i, "symbol")
        }

        function Xg(e) {
            return null == e || R(e) || (e = {isIgnore: e}), e || {}
        }

        function qg(e) {
            var t = e.hostModel;
            return {
                itemStyle: t.getModel("itemStyle").getItemStyle(["color"]),
                hoverItemStyle: t.getModel("emphasis.itemStyle").getItemStyle(),
                symbolRotate: t.get("symbolRotate"),
                symbolOffset: t.get("symbolOffset"),
                hoverAnimation: t.get("hoverAnimation"),
                labelModel: t.getModel("label"),
                hoverLabelModel: t.getModel("emphasis.label"),
                cursorStyle: t.get("cursor")
            }
        }

        function Yg(e, t, i) {
            var n, o = e.getBaseAxis(), a = e.getOtherAxis(o), r = function (e, t) {
                    var i = 0, n = e.scale.getExtent();
                    return "start" === t ? i = n[0] : "end" === t ? i = n[1] : 0 < n[0] ? i = n[0] : n[1] < 0 && (i = n[1]), i
                }(a, i), s = o.dim, l = a.dim, d = t.mapDimension(l), u = t.mapDimension(s),
                c = "x" === l || "radius" === l ? 1 : 0, h = A(e.dimensions, function (e) {
                    return t.mapDimension(e)
                }), f = t.getCalculationInfo("stackResultDimension");
            return (n |= op(t, h[0])) && (h[0] = f), (n |= op(t, h[1])) && (h[1] = f), {
                dataDimsForPoint: h,
                valueStart: r,
                valueAxisDim: l,
                baseAxisDim: s,
                stacked: !!n,
                valueDim: d,
                baseDim: u,
                baseDataOffset: c,
                stackedOverDimension: t.getCalculationInfo("stackedOverDimension")
            }
        }

        function Jg(e, t, i, n) {
            var o = NaN;
            e.stacked && (o = i.get(i.getCalculationInfo("stackedOverDimension"), n)), isNaN(o) && (o = e.valueStart);
            var a = e.baseDataOffset, r = [];
            return r[a] = i.get(e.baseDim, n), r[1 - a] = o, t.dataToPoint(r)
        }

        Hg.updateData = function (e, t) {
            t = Xg(t);
            var i = this.group, n = e.hostModel, o = this._data, a = this._symbolCtor, r = qg(e);
            o || i.removeAll(), e.diff(o).add(function (n) {
                var o = e.getItemLayout(n);
                if (zg(e, o, n, t)) {
                    var s = new a(e, n, r);
                    s.attr("position", o), e.setItemGraphicEl(n, s), i.add(s)
                }
            }).update(function (s, l) {
                var d = o.getItemGraphicEl(l), u = e.getItemLayout(s);
                zg(e, u, s, t) ? (d ? (d.updateData(e, s, r), al(d, {position: u}, n)) : (d = new a(e, s)).attr("position", u), i.add(d), e.setItemGraphicEl(s, d)) : i.remove(d)
            }).remove(function (e) {
                var t = o.getItemGraphicEl(e);
                t && t.fadeOut(function () {
                    i.remove(t)
                })
            }).execute(), this._data = e
        }, Hg.isPersistent = function () {
            return !0
        }, Hg.updateLayout = function () {
            var e = this._data;
            e && e.eachItemGraphicEl(function (t, i) {
                var n = e.getItemLayout(i);
                t.attr("position", n)
            })
        }, Hg.incrementalPrepareUpdate = function (e) {
            this._seriesScope = qg(e), this._data = null, this.group.removeAll()
        }, Hg.incrementalUpdate = function (e, t, i) {
            function n(e) {
                e.isGroup || (e.incremental = e.useHoverLayer = !0)
            }

            i = Xg(i);
            for (var o = e.start; o < e.end; o++) {
                var a = t.getItemLayout(o);
                if (zg(t, a, o, i)) {
                    var r = new this._symbolCtor(t, o, this._seriesScope);
                    r.traverse(n), r.attr("position", a), this.group.add(r), t.setItemGraphicEl(o, r)
                }
            }
        }, Hg.remove = function (e) {
            var t = this.group, i = this._data;
            i && e ? i.eachItemGraphicEl(function (e) {
                e.fadeOut(function () {
                    t.remove(e)
                })
            }) : t.removeAll()
        };
        var Zg = be, Qg = Ie, $g = de, em = ae, tm = [], im = [], nm = [];

        function om(e) {
            return isNaN(e[0]) || isNaN(e[1])
        }

        function am(e, t, i, n, o, a, r, s, l, d) {
            return "none" !== d && d ? function (e, t, i, n, o, a, r, s, l, d, u) {
                for (var c = 0, h = i, f = 0; f < n; f++) {
                    var p = t[h];
                    if (o <= h || h < 0) break;
                    if (om(p)) {
                        if (u) {
                            h += a;
                            continue
                        }
                        break
                    }
                    if (h === i) e[0 < a ? "moveTo" : "lineTo"](p[0], p[1]); else if (0 < l) {
                        var g = t[c], m = "y" === d ? 1 : 0, v = (p[m] - g[m]) * l;
                        em(im, g), im[m] = g[m] + v, em(nm, p), nm[m] = p[m] - v, e.bezierCurveTo(im[0], im[1], nm[0], nm[1], p[0], p[1])
                    } else e.lineTo(p[0], p[1]);
                    c = h, h += a
                }
                return f
            }.apply(this, arguments) : function (e, t, i, n, o, a, r, s, l, d, u) {
                for (var c = 0, h = i, f = 0; f < n; f++) {
                    var p = t[h];
                    if (o <= h || h < 0) break;
                    if (om(p)) {
                        if (u) {
                            h += a;
                            continue
                        }
                        break
                    }
                    if (h === i) e[0 < a ? "moveTo" : "lineTo"](p[0], p[1]), em(im, p); else if (0 < l) {
                        var g = h + a, m = t[g];
                        if (u) for (; m && om(t[g]);) m = t[g += a];
                        var v = .5, y = t[c];
                        if (!(m = t[g]) || om(m)) em(nm, p); else {
                            var T, w;
                            if (om(m) && !u && (m = p), ue(tm, m, y), "x" === d || "y" === d) {
                                var k = "x" === d ? 0 : 1;
                                T = Math.abs(p[k] - y[k]), w = Math.abs(p[k] - m[k])
                            } else T = ye(p, y), w = ye(p, m);
                            $g(nm, p, tm, -l * (1 - (v = w / (w + T))))
                        }
                        Zg(im, im, s), Qg(im, im, r), Zg(nm, nm, s), Qg(nm, nm, r), e.bezierCurveTo(im[0], im[1], nm[0], nm[1], p[0], p[1]), $g(im, p, tm, l * v)
                    } else e.lineTo(p[0], p[1]);
                    c = h, h += a
                }
                return f
            }.apply(this, arguments)
        }

        function rm(e, t) {
            var i = [1 / 0, 1 / 0], n = [-1 / 0, -1 / 0];
            if (t) for (var o = 0; o < e.length; o++) {
                var a = e[o];
                a[0] < i[0] && (i[0] = a[0]), a[1] < i[1] && (i[1] = a[1]), a[0] > n[0] && (n[0] = a[0]), a[1] > n[1] && (n[1] = a[1])
            }
            return {min: t ? i : n, max: t ? n : i}
        }

        var sm = kr.extend({
            type: "ec-polyline",
            shape: {points: [], smooth: 0, smoothConstraint: !0, smoothMonotone: null, connectNulls: !1},
            style: {fill: null, stroke: "#000"},
            brush: Vr(kr.prototype.brush),
            buildPath: function (e, t) {
                var i = t.points, n = 0, o = i.length, a = rm(i, t.smoothConstraint);
                if (t.connectNulls) {
                    for (; 0 < o && om(i[o - 1]); o--) ;
                    for (; n < o && om(i[n]); n++) ;
                }
                for (; n < o;) n += am(e, i, n, o, o, 1, a.min, a.max, t.smooth, t.smoothMonotone, t.connectNulls) + 1
            }
        }), lm = kr.extend({
            type: "ec-polygon",
            shape: {
                points: [],
                stackedOnPoints: [],
                smooth: 0,
                stackedOnSmooth: 0,
                smoothConstraint: !0,
                smoothMonotone: null,
                connectNulls: !1
            },
            brush: Vr(kr.prototype.brush),
            buildPath: function (e, t) {
                var i = t.points, n = t.stackedOnPoints, o = 0, a = i.length, r = t.smoothMonotone,
                    s = rm(i, t.smoothConstraint), l = rm(n, t.smoothConstraint);
                if (t.connectNulls) {
                    for (; 0 < a && om(i[a - 1]); a--) ;
                    for (; o < a && om(i[o]); o++) ;
                }
                for (; o < a;) {
                    var d = am(e, i, o, a, a, 1, s.min, s.max, t.smooth, r, t.connectNulls);
                    am(e, n, o + d - 1, d, a, -1, l.min, l.max, t.stackedOnSmooth, r, t.connectNulls), o += d + 1, e.closePath()
                }
            }
        });

        function dm(e, t, i) {
            var n = e.getArea(), o = e.getBaseAxis().isHorizontal(), a = n.x, r = n.y, s = n.width, l = n.height,
                d = i.get("lineStyle.width") || 2;
            a -= d / 2, r -= d / 2, s += d, l += d, a = Math.floor(a), s = Math.round(s);
            var u = new es({shape: {x: a, y: r, width: s, height: l}});
            return t && (u.shape[o ? "width" : "height"] = 0, rl(u, {shape: {width: s, height: l}}, i)), u
        }

        function um(e, t, i) {
            var n = e.getArea(), o = new Wr({
                shape: {
                    cx: El(e.cx, 1),
                    cy: El(e.cy, 1),
                    r0: El(n.r0, 1),
                    r: El(n.r, 1),
                    startAngle: n.startAngle,
                    endAngle: n.endAngle,
                    clockwise: n.clockwise
                }
            });
            return t && (o.shape.endAngle = n.startAngle, rl(o, {shape: {endAngle: n.endAngle}}, i)), o
        }

        function cm(e, t, i) {
            return e ? "polar" === e.type ? um(e, t, i) : "cartesian2d" === e.type ? dm(e, t, i) : null : null
        }

        function hm(e, t) {
            if (e.length === t.length) {
                for (var i = 0; i < e.length; i++) {
                    var n = e[i], o = t[i];
                    if (n[0] !== o[0] || n[1] !== o[1]) return
                }
                return !0
            }
        }

        function fm(e, t) {
            var i = [], n = [], o = [], a = [];
            return La(e, i, n), La(t, o, a), Math.max(Math.abs(i[0] - o[0]), Math.abs(i[1] - o[1]), Math.abs(n[0] - a[0]), Math.abs(n[1] - a[1]))
        }

        function pm(e) {
            return "number" == typeof e ? e : e ? .5 : 0
        }

        function gm(e, t, i) {
            for (var n = t.getBaseAxis(), o = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], r = 0; r < e.length - 1; r++) {
                var s = e[r + 1], l = e[r];
                a.push(l);
                var d = [];
                switch (i) {
                    case"end":
                        d[o] = s[o], d[1 - o] = l[1 - o], a.push(d);
                        break;
                    case"middle":
                        var u = (l[o] + s[o]) / 2, c = [];
                        d[o] = c[o] = u, d[1 - o] = l[1 - o], c[1 - o] = s[1 - o], a.push(d), a.push(c);
                        break;
                    default:
                        d[o] = l[o], d[1 - o] = s[1 - o], a.push(d)
                }
            }
            return e[r] && a.push(e[r]), a
        }

        function mm(e, t, i) {
            if ("cartesian2d" !== e.type) return um(e, t, i);
            var n = e.getBaseAxis().isHorizontal(), o = dm(e, t, i);
            if (!i.get("clip", !0)) {
                var a = o.shape, r = Math.max(a.width, a.height);
                n ? (a.y -= r, a.height += 2 * r) : (a.x -= r, a.width += 2 * r)
            }
            return o
        }

        function vm(e, t, i) {
            return {
                seriesType: e, performRawSeries: !0, reset: function (e, n, o) {
                    var a = e.getData(), r = e.get("symbol"), s = e.get("symbolSize"), l = e.get("symbolKeepAspect"),
                        d = e.get("symbolRotate"), u = F(r), c = F(s), h = F(d), f = u || c || h, p = !u && r ? r : t,
                        g = c ? null : s;
                    if (a.setVisual({
                        legendSymbol: i || p,
                        symbol: p,
                        symbolSize: g,
                        symbolKeepAspect: l,
                        symbolRotate: d
                    }), !n.isSeriesFiltered(e)) return {
                        dataEach: a.hasItemOption || f ? function (t, i) {
                            if (f) {
                                var n = e.getRawValue(i), o = e.getDataParams(i);
                                u && t.setItemVisual(i, "symbol", r(n, o)), c && t.setItemVisual(i, "symbolSize", s(n, o)), h && t.setItemVisual(i, "symbolRotate", d(n, o))
                            }
                            if (t.hasItemOption) {
                                var a = t.getItemModel(i), l = a.getShallow("symbol", !0),
                                    p = a.getShallow("symbolSize", !0), g = a.getShallow("symbolRotate", !0),
                                    m = a.getShallow("symbolKeepAspect", !0);
                                null != l && t.setItemVisual(i, "symbol", l), null != p && t.setItemVisual(i, "symbolSize", p), null != g && t.setItemVisual(i, "symbolRotate", g), null != m && t.setItemVisual(i, "symbolKeepAspect", m)
                            }
                        } : null
                    }
                }
            }
        }

        function ym(e) {
            return {
                seriesType: e, plan: uc(), reset: function (e) {
                    var t = e.getData(), i = e.coordinateSystem, n = e.pipelineContext.large;
                    if (i) {
                        var o = A(i.dimensions, function (e) {
                            return t.mapDimension(e)
                        }).slice(0, 2), a = o.length, r = t.getCalculationInfo("stackResultDimension");
                        return op(t, o[0]) && (o[0] = r), op(t, o[1]) && (o[1] = r), a && {
                            progress: function (e, t) {
                                for (var r = e.end - e.start, s = n && new Float32Array(r * a), l = e.start, d = 0, u = [], c = []; l < e.end; l++) {
                                    var h;
                                    if (1 === a) {
                                        var f = t.get(o[0], l);
                                        h = !isNaN(f) && i.dataToPoint(f, null, c)
                                    } else {
                                        f = u[0] = t.get(o[0], l);
                                        var p = u[1] = t.get(o[1], l);
                                        h = !isNaN(f) && !isNaN(p) && i.dataToPoint(u, null, c)
                                    }
                                    n ? (s[d++] = h ? h[0] : NaN, s[d++] = h ? h[1] : NaN) : t.setItemLayout(l, h && h.slice() || [NaN, NaN])
                                }
                                n && t.setLayout("symbolPoints", s)
                            }
                        }
                    }
                }
            }
        }

        function Tm(e, t) {
            return Math.round(e.length / 2)
        }

        fc.extend({
            type: "line", init: function () {
                var e = new Ai, t = new jg;
                this.group.add(t.group), this._symbolDraw = t, this._lineGroup = e
            }, render: function (e, t, i) {
                var n = e.coordinateSystem, o = this.group, a = e.getData(), r = e.getModel("lineStyle"),
                    s = e.getModel("areaStyle"), l = a.mapArray(a.getItemLayout), d = "polar" === n.type,
                    u = this._coordSys, c = this._symbolDraw, h = this._polyline, f = this._polygon,
                    p = this._lineGroup, g = e.get("animation"), m = !s.isEmpty(), v = s.get("origin"),
                    y = function (e, t, i) {
                        if (!i.valueDim) return [];
                        for (var n = [], o = 0, a = t.count(); o < a; o++) n.push(Jg(i, e, t, o));
                        return n
                    }(n, a, Yg(n, a, v)), T = e.get("showSymbol"), k = T && !d && function (e, t, i) {
                        var n = e.get("showAllSymbol"), o = "auto" === n;
                        if (!n || o) {
                            var a = i.getAxesByScale("ordinal")[0];
                            if (a && (!o || !function (e, t) {
                                var i = e.getExtent(), n = Math.abs(i[1] - i[0]) / e.scale.count();
                                isNaN(n) && (n = 0);
                                for (var o = t.count(), a = Math.max(1, Math.round(o / 5)), r = 0; r < o; r += a) if (1.5 * Mg.getSymbolSize(t, r)[e.isHorizontal() ? 1 : 0] > n) return !1;
                                return !0
                            }(a, t))) {
                                var r = t.mapDimension(a.dim), s = {};
                                return D(a.getViewLabels(), function (e) {
                                    s[e.tickValue] = 1
                                }), function (e) {
                                    return !s.hasOwnProperty(t.get(r, e))
                                }
                            }
                        }
                    }(e, a, n), C = this._data;
                C && C.eachItemGraphicEl(function (e, t) {
                    e.__temp && (o.remove(e), C.setItemGraphicEl(t, null))
                }), T || c.remove(), o.add(p);
                var b, I = !d && e.get("step");
                n && n.getArea && e.get("clip", !0) && (null != (b = n.getArea()).width ? (b.x -= .1, b.y -= .1, b.width += .2, b.height += .2) : b.r0 && (b.r0 -= .5, b.r1 += .5)), this._clipShapeForSymbol = b, h && u.type === n.type && I === this._step ? (m && !f ? f = this._newPolygon(l, y, n, g) : f && !m && (p.remove(f), f = this._polygon = null), p.setClipPath(mm(n, !1, e)), T && c.updateData(a, {
                    isIgnore: k,
                    clipShape: b
                }), a.eachItemGraphicEl(function (e) {
                    e.stopAnimation(!0)
                }), hm(this._stackedOnPoints, y) && hm(this._points, l) || (g ? this._updateAnimation(a, y, n, i, I, v) : (I && (l = gm(l, n, I), y = gm(y, n, I)), h.setShape({points: l}), f && f.setShape({
                    points: l,
                    stackedOnPoints: y
                })))) : (T && c.updateData(a, {
                    isIgnore: k,
                    clipShape: b
                }), I && (l = gm(l, n, I), y = gm(y, n, I)), h = this._newPolyline(l, n, g), m && (f = this._newPolygon(l, y, n, g)), p.setClipPath(mm(n, !0, e)));
                var S = function (e, t) {
                    var i = e.getVisual("visualMeta");
                    if (i && i.length && e.count() && "cartesian2d" === t.type) {
                        for (var n, o, a = i.length - 1; 0 <= a; a--) {
                            var r = i[a].dimension, s = e.dimensions[r], l = e.getDimensionInfo(s);
                            if ("x" === (n = l && l.coordDim) || "y" === n) {
                                o = i[a];
                                break
                            }
                        }
                        if (o) {
                            var d = t.getAxis(n), u = A(o.stops, function (e) {
                                return {coord: d.toGlobalCoord(d.dataToCoord(e.value)), color: e.color}
                            }), c = u.length, h = o.outerColors.slice();
                            c && u[0].coord > u[c - 1].coord && (u.reverse(), h.reverse());
                            var f = u[0].coord - 10, p = u[c - 1].coord + 10, g = p - f;
                            if (g < .001) return "transparent";
                            D(u, function (e) {
                                e.offset = (e.coord - f) / g
                            }), u.push({
                                offset: c ? u[c - 1].offset : .5,
                                color: h[1] || "transparent"
                            }), u.unshift({offset: c ? u[0].offset : .5, color: h[0] || "transparent"});
                            var m = new ds(0, 0, 0, 0, u, !0);
                            return m[n] = f, m[n + "2"] = p, m
                        }
                    }
                }(a, n) || a.getVisual("color");
                h.useStyle(w(r.getLineStyle(), {fill: "none", stroke: S, lineJoin: "bevel"}));
                var _ = e.get("smooth");
                if (_ = pm(e.get("smooth")), h.setShape({
                    smooth: _,
                    smoothMonotone: e.get("smoothMonotone"),
                    connectNulls: e.get("connectNulls")
                }), f) {
                    var N = a.getCalculationInfo("stackedOnSeries"), x = 0;
                    f.useStyle(w(s.getAreaStyle(), {
                        fill: S,
                        opacity: .7,
                        lineJoin: "bevel"
                    })), N && (x = pm(N.get("smooth"))), f.setShape({
                        smooth: _,
                        stackedOnSmooth: x,
                        smoothMonotone: e.get("smoothMonotone"),
                        connectNulls: e.get("connectNulls")
                    })
                }
                this._data = a, this._coordSys = n, this._stackedOnPoints = y, this._points = l, this._step = I, this._valueOrigin = v
            }, dispose: function () {
            }, highlight: function (e, t, i, n) {
                var o = e.getData(), a = Ko(o, n);
                if (!(a instanceof Array) && null != a && 0 <= a) {
                    var r = o.getItemGraphicEl(a);
                    if (!r) {
                        var s = o.getItemLayout(a);
                        if (!s) return;
                        if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(s[0], s[1])) return;
                        (r = new Mg(o, a)).position = s, r.setZ(e.get("zlevel"), e.get("z")), r.ignore = isNaN(s[0]) || isNaN(s[1]), r.__temp = !0, o.setItemGraphicEl(a, r), r.stopSymbolAnimation(!0), this.group.add(r)
                    }
                    r.highlight()
                } else fc.prototype.highlight.call(this, e, t, i, n)
            }, downplay: function (e, t, i, n) {
                var o = e.getData(), a = Ko(o, n);
                if (null != a && 0 <= a) {
                    var r = o.getItemGraphicEl(a);
                    r && (r.__temp ? (o.setItemGraphicEl(a, null), this.group.remove(r)) : r.downplay())
                } else fc.prototype.downplay.call(this, e, t, i, n)
            }, _newPolyline: function (e) {
                var t = this._polyline;
                return t && this._lineGroup.remove(t), t = new sm({
                    shape: {points: e},
                    silent: !0,
                    z2: 10
                }), this._lineGroup.add(t), this._polyline = t
            }, _newPolygon: function (e, t) {
                var i = this._polygon;
                return i && this._lineGroup.remove(i), i = new lm({
                    shape: {points: e, stackedOnPoints: t},
                    silent: !0
                }), this._lineGroup.add(i), this._polygon = i
            }, _updateAnimation: function (e, t, i, n, o, a) {
                var r = this._polyline, s = this._polygon, l = e.hostModel, d = function (e, t, i, n, o, a, r, s) {
                        for (var l = function (e, t) {
                            var i = [];
                            return t.diff(e).add(function (e) {
                                i.push({cmd: "+", idx: e})
                            }).update(function (e, t) {
                                i.push({cmd: "=", idx: t, idx1: e})
                            }).remove(function (e) {
                                i.push({cmd: "-", idx: e})
                            }).execute(), i
                        }(e, t), d = [], u = [], c = [], h = [], f = [], p = [], g = [], m = Yg(o, t, r), v = Yg(a, e, s), y = 0; y < l.length; y++) {
                            var T = l[y], w = !0;
                            switch (T.cmd) {
                                case"=":
                                    var k = e.getItemLayout(T.idx), C = t.getItemLayout(T.idx1);
                                    (isNaN(k[0]) || isNaN(k[1])) && (k = C.slice()), d.push(k), u.push(C), c.push(i[T.idx]), h.push(n[T.idx1]), g.push(t.getRawIndex(T.idx1));
                                    break;
                                case"+":
                                    var b = T.idx;
                                    d.push(o.dataToPoint([t.get(m.dataDimsForPoint[0], b), t.get(m.dataDimsForPoint[1], b)])), u.push(t.getItemLayout(b).slice()), c.push(Jg(m, o, t, b)), h.push(n[b]), g.push(t.getRawIndex(b));
                                    break;
                                case"-":
                                    b = T.idx;
                                    var I = e.getRawIndex(b);
                                    I !== b ? (d.push(e.getItemLayout(b)), u.push(a.dataToPoint([e.get(v.dataDimsForPoint[0], b), e.get(v.dataDimsForPoint[1], b)])), c.push(i[b]), h.push(Jg(v, a, e, b)), g.push(I)) : w = !1
                            }
                            w && (f.push(T), p.push(p.length))
                        }
                        p.sort(function (e, t) {
                            return g[e] - g[t]
                        });
                        var S = [], _ = [], D = [], A = [], N = [];
                        for (y = 0; y < p.length; y++) b = p[y], S[y] = d[b], _[y] = u[b], D[y] = c[b], A[y] = h[b], N[y] = f[b];
                        return {current: S, next: _, stackedOnCurrent: D, stackedOnNext: A, status: N}
                    }(this._data, e, this._stackedOnPoints, t, this._coordSys, i, this._valueOrigin, a), u = d.current,
                    c = d.stackedOnCurrent, h = d.next, f = d.stackedOnNext;
                if (o && (u = gm(d.current, i, o), c = gm(d.stackedOnCurrent, i, o), h = gm(d.next, i, o), f = gm(d.stackedOnNext, i, o)), 3e3 < fm(u, h) || s && 3e3 < fm(c, f)) return r.setShape({points: h}), void (s && s.setShape({
                    points: h,
                    stackedOnPoints: f
                }));
                r.shape.__points = d.current, r.shape.points = u, al(r, {shape: {points: h}}, l), s && (s.setShape({
                    points: u,
                    stackedOnPoints: c
                }), al(s, {shape: {points: h, stackedOnPoints: f}}, l));
                for (var p = [], g = d.status, m = 0; m < g.length; m++) if ("=" === g[m].cmd) {
                    var v = e.getItemGraphicEl(g[m].idx1);
                    v && p.push({el: v, ptIdx: m})
                }
                r.animators && r.animators.length && r.animators[0].during(function () {
                    for (var e = 0; e < p.length; e++) p[e].el.attr("position", r.shape.__points[p[e].ptIdx])
                })
            }, remove: function (e) {
                var t = this.group, i = this._data;
                this._lineGroup.removeAll(), this._symbolDraw.remove(!0), i && i.eachItemGraphicEl(function (e, n) {
                    e.__temp && (t.remove(e), i.setItemGraphicEl(n, null))
                }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._data = null
            }
        });
        var wm = {
            average: function (e) {
                for (var t = 0, i = 0, n = 0; n < e.length; n++) isNaN(e[n]) || (t += e[n], i++);
                return 0 === i ? NaN : t / i
            }, sum: function (e) {
                for (var t = 0, i = 0; i < e.length; i++) t += e[i] || 0;
                return t
            }, max: function (e) {
                for (var t = -1 / 0, i = 0; i < e.length; i++) e[i] > t && (t = e[i]);
                return isFinite(t) ? t : NaN
            }, min: function (e) {
                for (var t = 1 / 0, i = 0; i < e.length; i++) e[i] < t && (t = e[i]);
                return isFinite(t) ? t : NaN
            }, nearest: function (e) {
                return e[0]
            }
        };

        function km(e) {
            return this._axes[e]
        }

        function Cm(e) {
            this._axes = {}, this._dimList = [], this.name = e || ""
        }

        function bm(e) {
            Cm.call(this, e)
        }

        function Im(e, t, i, n, o) {
            Ag.call(this, e, t, i), this.type = n || "value", this.position = o || "bottom"
        }

        Cm.prototype = {
            constructor: Cm, type: "cartesian", getAxis: function (e) {
                return this._axes[e]
            }, getAxes: function () {
                return A(this._dimList, km, this)
            }, getAxesByScale: function (e) {
                return e = e.toLowerCase(), x(this.getAxes(), function (t) {
                    return t.scale.type === e
                })
            }, addAxis: function (e) {
                var t = e.dim;
                this._axes[t] = e, this._dimList.push(t)
            }, dataToCoord: function (e) {
                return this._dataCoordConvert(e, "dataToCoord")
            }, coordToData: function (e) {
                return this._dataCoordConvert(e, "coordToData")
            }, _dataCoordConvert: function (e, t) {
                for (var i = this._dimList, n = e instanceof Array ? [] : {}, o = 0; o < i.length; o++) {
                    var a = i[o], r = this._axes[a];
                    n[a] = r[t](e[a])
                }
                return n
            }
        }, bm.prototype = {
            constructor: bm, type: "cartesian2d", dimensions: ["x", "y"], getBaseAxis: function () {
                return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x")
            }, containPoint: function (e) {
                var t = this.getAxis("x"), i = this.getAxis("y");
                return t.contain(t.toLocalCoord(e[0])) && i.contain(i.toLocalCoord(e[1]))
            }, containData: function (e) {
                return this.getAxis("x").containData(e[0]) && this.getAxis("y").containData(e[1])
            }, dataToPoint: function (e, t, i) {
                var n = this.getAxis("x"), o = this.getAxis("y");
                return (i = i || [])[0] = n.toGlobalCoord(n.dataToCoord(e[0])), i[1] = o.toGlobalCoord(o.dataToCoord(e[1])), i
            }, clampData: function (e, t) {
                var i = this.getAxis("x").scale, n = this.getAxis("y").scale, o = i.getExtent(), a = n.getExtent(),
                    r = i.parse(e[0]), s = n.parse(e[1]);
                return (t = t || [])[0] = Math.min(Math.max(Math.min(o[0], o[1]), r), Math.max(o[0], o[1])), t[1] = Math.min(Math.max(Math.min(a[0], a[1]), s), Math.max(a[0], a[1])), t
            }, pointToData: function (e, t) {
                var i = this.getAxis("x"), n = this.getAxis("y");
                return (t = t || [])[0] = i.coordToData(i.toLocalCoord(e[0])), t[1] = n.coordToData(n.toLocalCoord(e[1])), t
            }, getOtherAxis: function (e) {
                return this.getAxis("x" === e.dim ? "y" : "x")
            }, getArea: function () {
                var e = this.getAxis("x").getGlobalExtent(), t = this.getAxis("y").getGlobalExtent(),
                    i = Math.min(e[0], e[1]), n = Math.min(t[0], t[1]);
                return new Di(i, n, Math.max(e[0], e[1]) - i, Math.max(t[0], t[1]) - n)
            }
        }, I(bm, Cm), Im.prototype = {
            constructor: Im,
            index: 0,
            getAxesOnZeroOf: null,
            model: null,
            isHorizontal: function () {
                var e = this.position;
                return "top" === e || "bottom" === e
            },
            getGlobalExtent: function (e) {
                var t = this.getExtent();
                return t[0] = this.toGlobalCoord(t[0]), t[1] = this.toGlobalCoord(t[1]), e && t[0] > t[1] && t.reverse(), t
            },
            getOtherAxis: function () {
                this.grid.getOtherAxis()
            },
            pointToData: function (e, t) {
                return this.coordToData(this.toLocalCoord(e["x" === this.dim ? 0 : 1]), t)
            },
            toLocalCoord: null,
            toGlobalCoord: null
        }, I(Im, Ag);
        var Sm = {
            show: !0,
            zlevel: 0,
            z: 0,
            inverse: !1,
            name: "",
            nameLocation: "end",
            nameRotate: null,
            nameTruncate: {maxWidth: null, ellipsis: "...", placeholder: "."},
            nameTextStyle: {},
            nameGap: 15,
            silent: !1,
            triggerEvent: !1,
            tooltip: {show: !1},
            axisPointer: {},
            axisLine: {
                show: !0,
                onZero: !0,
                onZeroAxisIndex: null,
                lineStyle: {color: "#333", width: 1, type: "solid"},
                symbol: ["none", "none"],
                symbolSize: [10, 15]
            },
            axisTick: {show: !0, inside: !1, length: 5, lineStyle: {width: 1}},
            axisLabel: {
                show: !0,
                inside: !1,
                rotate: 0,
                showMinLabel: null,
                showMaxLabel: null,
                margin: 8,
                fontSize: 12
            },
            splitLine: {show: !0, lineStyle: {color: ["#ccc"], width: 1, type: "solid"}},
            splitArea: {show: !1, areaStyle: {color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"]}}
        }, _m = {};

        function Dm(e, t, i, n) {
            D(Am, function (o) {
                t.extend({
                    type: e + "Axis." + o, mergeDefaultAndTheme: function (t, n) {
                        var a = this.layoutMode, r = a ? Td(t) : {};
                        v(t, n.getTheme().get(o + "Axis")), v(t, this.getDefaultOption()), t.type = i(e, t), a && yd(t, r, a)
                    }, optionUpdated: function () {
                        "category" === this.option.type && (this.__ordinalMeta = lp.createByAxisModel(this))
                    }, getCategories: function (e) {
                        var t = this.option;
                        if ("category" === t.type) return e ? t.data : this.__ordinalMeta.categories
                    }, getOrdinalMeta: function () {
                        return this.__ordinalMeta
                    }, defaultOption: y([{}, _m[o + "Axis"], n], !0)
                })
            }), Sd.registerSubTypeDefaulter(e + "Axis", P(i, e))
        }

        _m.categoryAxis = v({
            boundaryGap: !0,
            deduplication: null,
            splitLine: {show: !1},
            axisTick: {alignWithLabel: !1, interval: "auto"},
            axisLabel: {interval: "auto"}
        }, Sm), _m.valueAxis = v({
            boundaryGap: [0, 0],
            splitNumber: 5,
            minorTick: {show: !1, splitNumber: 5, length: 3, lineStyle: {}},
            minorSplitLine: {show: !1, lineStyle: {color: "#eee", width: 1}}
        }, Sm), _m.timeAxis = w({scale: !0, min: "dataMin", max: "dataMax"}, _m.valueAxis), _m.logAxis = w({
            scale: !0,
            logBase: 10
        }, _m.valueAxis);
        var Am = ["value", "category", "time", "log"], Nm = Sd.extend({
            type: "cartesian2dAxis", axis: null, init: function () {
                Nm.superApply(this, "init", arguments), this.resetRange()
            }, mergeOption: function () {
                Nm.superApply(this, "mergeOption", arguments), this.resetRange()
            }, restoreData: function () {
                Nm.superApply(this, "restoreData", arguments), this.resetRange()
            }, getCoordSysModel: function () {
                return this.ecModel.queryComponents({
                    mainType: "grid",
                    index: this.option.gridIndex,
                    id: this.option.gridId
                })[0]
            }
        });

        function xm(e, t) {
            return t.type || (t.data ? "category" : "value")
        }

        v(Nm.prototype, ig);
        var Em = {offset: 0};

        function Om(e, t) {
            return e.getCoordSysModel() === t
        }

        function Pm(e, t, i) {
            this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this._initCartesian(e, t, i), this.model = e
        }

        Dm("x", Nm, xm, Em), Dm("y", Nm, xm, Em), Sd.extend({
            type: "grid",
            dependencies: ["xAxis", "yAxis"],
            layoutMode: "box",
            coordinateSystem: null,
            defaultOption: {
                show: !1,
                zlevel: 0,
                z: 0,
                left: "10%",
                top: 60,
                right: "10%",
                bottom: 60,
                containLabel: !1,
                backgroundColor: "rgba(0,0,0,0)",
                borderWidth: 1,
                borderColor: "#ccc"
            }
        });
        var Mm = Pm.prototype;

        function Fm(e, t, i, n) {
            i.getAxesOnZeroOf = function () {
                return o ? [o] : []
            };
            var o, a = e[t], r = i.model, s = r.get("axisLine.onZero"), l = r.get("axisLine.onZeroAxisIndex");
            if (s) {
                if (null != l) Lm(a[l]) && (o = a[l]); else for (var d in a) if (a.hasOwnProperty(d) && Lm(a[d]) && !n[u(a[d])]) {
                    o = a[d];
                    break
                }
                o && (n[u(o)] = !0)
            }

            function u(e) {
                return e.dim + "_" + e.index
            }
        }

        function Lm(e) {
            return e && "category" !== e.type && "time" !== e.type && function (e) {
                var t = e.scale.getExtent(), i = t[0], n = t[1];
                return !(0 < i && 0 < n || i < 0 && n < 0)
            }(e)
        }

        Mm.type = "grid", Mm.axisPointerEnabled = !0, Mm.getRect = function () {
            return this._rect
        }, Mm.update = function (e, t) {
            var i = this._axesMap;
            this._updateScale(e, this.model), D(i.x, function (e) {
                Jp(e.scale, e.model)
            }), D(i.y, function (e) {
                Jp(e.scale, e.model)
            });
            var n = {};
            D(i.x, function (e) {
                Fm(i, "y", e, n)
            }), D(i.y, function (e) {
                Fm(i, "x", e, n)
            }), this.resize(this.model, t)
        }, Mm.resize = function (e, t, i) {
            var n = md(e.getBoxLayoutParams(), {width: t.getWidth(), height: t.getHeight()});
            this._rect = n;
            var o = this._axesList;

            function a() {
                D(o, function (e) {
                    var t = e.isHorizontal(), i = t ? [0, n.width] : [0, n.height], o = e.inverse ? 1 : 0;
                    e.setExtent(i[o], i[1 - o]), function (e, t) {
                        var i = e.getExtent(), n = i[0] + i[1];
                        e.toGlobalCoord = "x" === e.dim ? function (e) {
                            return e + t
                        } : function (e) {
                            return n - e + t
                        }, e.toLocalCoord = "x" === e.dim ? function (e) {
                            return e - t
                        } : function (e) {
                            return n - e + t
                        }
                    }(e, t ? n.x : n.y)
                })
            }

            a(), !i && e.get("containLabel") && (D(o, function (e) {
                if (!e.model.get("axisLabel.inside")) {
                    var t = function (e) {
                        var t = e.model, i = e.scale;
                        if (t.get("axisLabel.show") && !i.isBlank()) {
                            var n, o, a = "category" === e.type, r = i.getExtent();
                            o = a ? i.count() : (n = i.getTicks()).length;
                            var s, l, d, u, c, h, f, p, g, m = e.getLabelModel(), v = Qp(e), y = 1;
                            40 < o && (y = Math.ceil(o / 40));
                            for (var T = 0; T < o; T += y) {
                                var w = v(n ? n[T] : r[0] + T), k = m.getTextRect(w),
                                    C = (l = k, d = m.get("rotate") || 0, u = d * Math.PI / 180, c = l.plain(), h = c.width, f = c.height, p = h * Math.cos(u) + f * Math.sin(u), g = h * Math.sin(u) + f * Math.cos(u), new Di(c.x, c.y, p, g));
                                s ? s.union(C) : s = C
                            }
                            return s
                        }
                    }(e);
                    if (t) {
                        var i = e.isHorizontal() ? "height" : "width", o = e.model.get("axisLabel.margin");
                        n[i] -= t[i] + o, "top" === e.position ? n.y += t.height + o : "left" === e.position && (n.x += t.width + o)
                    }
                }
            }), a())
        }, Mm.getAxis = function (e, t) {
            var i = this._axesMap[e];
            if (null != i) {
                if (null == t) for (var n in i) if (i.hasOwnProperty(n)) return i[n];
                return i[t]
            }
        }, Mm.getAxes = function () {
            return this._axesList.slice()
        }, Mm.getCartesian = function (e, t) {
            if (null != e && null != t) {
                var i = "x" + e + "y" + t;
                return this._coordsMap[i]
            }
            R(e) && (t = e.yAxisIndex, e = e.xAxisIndex);
            for (var n = 0, o = this._coordsList; n < o.length; n++) if (o[n].getAxis("x").index === e || o[n].getAxis("y").index === t) return o[n]
        }, Mm.getCartesians = function () {
            return this._coordsList.slice()
        }, Mm.convertToPixel = function (e, t, i) {
            var n = this._findConvertTarget(e, t);
            return n.cartesian ? n.cartesian.dataToPoint(i) : n.axis ? n.axis.toGlobalCoord(n.axis.dataToCoord(i)) : null
        }, Mm.convertFromPixel = function (e, t, i) {
            var n = this._findConvertTarget(e, t);
            return n.cartesian ? n.cartesian.pointToData(i) : n.axis ? n.axis.coordToData(n.axis.toLocalCoord(i)) : null
        }, Mm._findConvertTarget = function (e, t) {
            var i, n, o = t.seriesModel, a = t.xAxisModel || o && o.getReferringComponents("xAxis")[0],
                r = t.yAxisModel || o && o.getReferringComponents("yAxis")[0], s = t.gridModel, l = this._coordsList;
            return o ? b(l, i = o.coordinateSystem) < 0 && (i = null) : a && r ? i = this.getCartesian(a.componentIndex, r.componentIndex) : a ? n = this.getAxis("x", a.componentIndex) : r ? n = this.getAxis("y", r.componentIndex) : s && s.coordinateSystem === this && (i = this._coordsList[0]), {
                cartesian: i,
                axis: n
            }
        }, Mm.containPoint = function (e) {
            var t = this._coordsList[0];
            if (t) return t.containPoint(e)
        }, Mm._initCartesian = function (e, t, i) {
            var n = {left: !1, right: !1, top: !1, bottom: !1}, o = {x: {}, y: {}}, a = {x: 0, y: 0};
            if (t.eachComponent("xAxis", r("x"), this), t.eachComponent("yAxis", r("y"), this), !a.x || !a.y) return this._axesMap = {}, void (this._axesList = []);

            function r(t) {
                return function (i, r) {
                    if (Om(i, e)) {
                        var s = i.get("position");
                        "x" === t ? "top" !== s && "bottom" !== s && (s = n.bottom ? "top" : "bottom") : "left" !== s && "right" !== s && (s = n.left ? "right" : "left"), n[s] = !0;
                        var l = new Im(t, Zp(i), [0, 0], i.get("type"), s), d = "category" === l.type;
                        l.onBand = d && i.get("boundaryGap"), l.inverse = i.get("inverse"), (i.axis = l).model = i, l.grid = this, l.index = r, this._axesList.push(l), o[t][r] = l, a[t]++
                    }
                }
            }

            D((this._axesMap = o).x, function (t, i) {
                D(o.y, function (n, o) {
                    var a = "x" + i + "y" + o, r = new bm(a);
                    r.grid = this, r.model = e, this._coordsMap[a] = r, this._coordsList.push(r), r.addAxis(t), r.addAxis(n)
                }, this)
            }, this)
        }, Mm._updateScale = function (e, t) {
            function i(e, t) {
                D(e.mapDimension(t.dim, !0), function (i) {
                    t.scale.unionExtentFromData(e, ap(e, i))
                })
            }

            D(this._axesList, function (e) {
                e.scale.setExtent(1 / 0, -1 / 0)
            }), e.eachSeries(function (e) {
                if (Um(e)) {
                    var n = Bm(e), o = n[0], a = n[1];
                    if (!Om(o, t) || !Om(a, t)) return;
                    var r = this.getCartesian(o.componentIndex, a.componentIndex), s = e.getData(), l = r.getAxis("x"),
                        d = r.getAxis("y");
                    "list" === s.type && (i(s, l), i(s, d))
                }
            }, this)
        }, Mm.getTooltipAxes = function (e) {
            var t = [], i = [];
            return D(this.getCartesians(), function (n) {
                var o = null != e && "auto" !== e ? n.getAxis(e) : n.getBaseAxis(), a = n.getOtherAxis(o);
                b(t, o) < 0 && t.push(o), b(i, a) < 0 && i.push(a)
            }), {baseAxes: t, otherAxes: i}
        };
        var Rm = ["xAxis", "yAxis"];

        function Bm(e) {
            return A(Rm, function (t) {
                return e.getReferringComponents(t)[0]
            })
        }

        function Um(e) {
            return "cartesian2d" === e.get("coordinateSystem")
        }

        function Vm(e, t) {
            this.opt = t, this.axisModel = e, w(t, {
                labelOffset: 0,
                nameDirection: 1,
                tickDirection: 1,
                labelDirection: 1,
                silent: !0
            }), this.group = new Ai;
            var i = new Ai({position: t.position.slice(), rotation: t.rotation});
            i.updateTransform(), this._transform = i.transform, this._dumbGroup = i
        }

        Pm.create = function (e, t) {
            var i = [];
            return e.eachComponent("grid", function (n, o) {
                var a = new Pm(n, e, t);
                a.name = "grid_" + o, a.resize(n, t, !0), n.coordinateSystem = a, i.push(a)
            }), e.eachSeries(function (e) {
                if (Um(e)) {
                    var t = Bm(e), i = t[0], n = t[1], o = i.getCoordSysModel().coordinateSystem;
                    e.coordinateSystem = o.getCartesian(i.componentIndex, n.componentIndex)
                }
            }), i
        }, Pm.dimensions = Pm.prototype.dimensions = bm.prototype.dimensions, iu.register("cartesian2d", Pm);
        var Km = Math.PI;
        Vm.prototype = {
            constructor: Vm, hasBuilder: function (e) {
                return !!Gm[e]
            }, add: function (e) {
                Gm[e].call(this)
            }, getGroup: function () {
                return this.group
            }
        };
        var Gm = {
            axisLine: function () {
                var e = this.opt, t = this.axisModel;
                if (t.get("axisLine.show")) {
                    var i = this.axisModel.axis.getExtent(), n = this._transform, o = [i[0], 0], a = [i[1], 0];
                    n && (Ce(o, o, n), Ce(a, a, n));
                    var r = T({lineCap: "round"}, t.getModel("axisLine.lineStyle").getLineStyle());
                    this.group.add(new is({
                        anid: "line",
                        subPixelOptimize: !0,
                        shape: {x1: o[0], y1: o[1], x2: a[0], y2: a[1]},
                        style: r,
                        strokeContainThreshold: e.strokeContainThreshold || 5,
                        silent: !0,
                        z2: 1
                    }));
                    var s = t.get("axisLine.symbol"), l = t.get("axisLine.symbolSize"),
                        d = t.get("axisLine.symbolOffset") || 0;
                    if ("number" == typeof d && (d = [d, d]), null != s) {
                        "string" == typeof s && (s = [s, s]), "string" != typeof l && "number" != typeof l || (l = [l, l]);
                        var u = l[0], c = l[1];
                        D([{rotate: e.rotation + Math.PI / 2, offset: d[0], r: 0}, {
                            rotate: e.rotation - Math.PI / 2,
                            offset: d[1],
                            r: Math.sqrt((o[0] - a[0]) * (o[0] - a[0]) + (o[1] - a[1]) * (o[1] - a[1]))
                        }], function (t, i) {
                            if ("none" !== s[i] && null != s[i]) {
                                var n = cg(s[i], -u / 2, -c / 2, u, c, r.stroke, !0), a = t.r + t.offset,
                                    l = [o[0] + a * Math.cos(e.rotation), o[1] - a * Math.sin(e.rotation)];
                                n.attr({rotation: t.rotate, position: l, silent: !0, z2: 11}), this.group.add(n)
                            }
                        }, this)
                    }
                }
            }, axisTickLabel: function () {
                var e = this.axisModel, t = this.opt, i = function (e, t, i) {
                    var n = t.axis, o = t.getModel("axisTick");
                    if (o.get("show") && !n.scale.isBlank()) {
                        for (var a = o.getModel("lineStyle"), r = i.tickDirection * o.get("length"), s = Ym(n.getTicksCoords(), e._transform, r, w(a.getLineStyle(), {stroke: t.get("axisLine.lineStyle.color")}), "ticks"), l = 0; l < s.length; l++) e.group.add(s[l]);
                        return s
                    }
                }(this, e, t);
                !function (e, t, i) {
                    if (!tg(e.axis)) {
                        var n = e.get("axisLabel.showMinLabel"), o = e.get("axisLabel.showMaxLabel");
                        i = i || [];
                        var a = (t = t || [])[0], r = t[1], s = t[t.length - 1], l = t[t.length - 2], d = i[0],
                            u = i[1], c = i[i.length - 1], h = i[i.length - 2];
                        !1 === n ? (zm(a), zm(d)) : Xm(a, r) && (n ? (zm(r), zm(u)) : (zm(a), zm(d))), !1 === o ? (zm(s), zm(c)) : Xm(l, s) && (o ? (zm(l), zm(h)) : (zm(s), zm(c)))
                    }
                }(e, function (e, t, i) {
                    var n = t.axis;
                    if (G(i.axisLabelShow, t.get("axisLabel.show")) && !n.scale.isBlank()) {
                        var o = t.getModel("axisLabel"), a = o.get("margin"), r = n.getViewLabels(),
                            s = (G(i.labelRotate, o.get("rotate")) || 0) * Km / 180,
                            l = jm(i.rotation, s, i.labelDirection), d = t.getCategories && t.getCategories(!0), u = [],
                            c = Hm(t), h = t.get("triggerEvent");
                        return D(r, function (r, s) {
                            var f = r.tickValue, p = r.formattedLabel, g = r.rawLabel, m = o;
                            d && d[f] && d[f].textStyle && (m = new bl(d[f].textStyle, o, t.ecModel));
                            var v = m.getTextColor() || t.get("axisLine.lineStyle.color"),
                                y = [n.dataToCoord(f), i.labelOffset + i.labelDirection * a],
                                T = new Ur({anid: "label_" + f, position: y, rotation: l.rotation, silent: c, z2: 10});
                            Zs(T.style, m, {
                                text: p,
                                textAlign: m.getShallow("align", !0) || l.textAlign,
                                textVerticalAlign: m.getShallow("verticalAlign", !0) || m.getShallow("baseline", !0) || l.textVerticalAlign,
                                textFill: "function" == typeof v ? v("category" === n.type ? g : "value" === n.type ? f + "" : f, s) : v
                            }), h && (T.eventData = Wm(t), T.eventData.targetType = "axisLabel", T.eventData.value = g), e._dumbGroup.add(T), T.updateTransform(), u.push(T), e.group.add(T), T.decomposeTransform()
                        }), u
                    }
                }(this, e, t), i), function (e, t, i) {
                    var n = t.axis, o = t.getModel("minorTick");
                    if (o.get("show") && !n.scale.isBlank()) {
                        var a = n.getMinorTicksCoords();
                        if (a.length) for (var r = o.getModel("lineStyle"), s = i.tickDirection * o.get("length"), l = w(r.getLineStyle(), w(t.getModel("axisTick").getLineStyle(), {stroke: t.get("axisLine.lineStyle.color")})), d = 0; d < a.length; d++) for (var u = Ym(a[d], e._transform, s, l, "minorticks_" + d), c = 0; c < u.length; c++) e.group.add(u[c])
                    }
                }(this, e, t)
            }, axisName: function () {
                var e = this.opt, t = this.axisModel, i = G(e.axisName, t.get("name"));
                if (i) {
                    var n, o, a = t.get("nameLocation"), r = e.nameDirection, s = t.getModel("nameTextStyle"),
                        l = t.get("nameGap") || 0, d = this.axisModel.axis.getExtent(), u = d[0] > d[1] ? -1 : 1,
                        c = ["start" === a ? d[0] - u * l : "end" === a ? d[1] + u * l : (d[0] + d[1]) / 2, qm(a) ? e.labelOffset + r * l : 0],
                        h = t.get("nameRotate");
                    null != h && (h = h * Km / 180), qm(a) ? n = jm(e.rotation, null != h ? h : e.rotation, r) : (n = function (e, t, i, n) {
                        var o, a, r = Bl(i - e.rotation), s = n[0] > n[1],
                            l = "start" === t && !s || "start" !== t && s;
                        return o = Ul(r - Km / 2) ? (a = l ? "bottom" : "top", "center") : Ul(r - 1.5 * Km) ? (a = l ? "top" : "bottom", "center") : (a = "middle", r < 1.5 * Km && Km / 2 < r ? l ? "left" : "right" : l ? "right" : "left"), {
                            rotation: r,
                            textAlign: o,
                            textVerticalAlign: a
                        }
                    }(e, a, h || 0, d), null != (o = e.axisNameAvailableWidth) && (o = Math.abs(o / Math.sin(n.rotation)), isFinite(o) || (o = null)));
                    var f = s.getFont(), p = t.get("nameTruncate", !0) || {}, g = p.ellipsis,
                        m = G(e.nameTruncateMaxWidth, p.maxWidth, o),
                        v = null != g && null != m ? ld(i, m, f, g, {minChar: 2, placeholder: p.placeholder}) : i,
                        y = t.get("tooltip", !0), w = t.mainType, k = {componentType: w, name: i, $vars: ["name"]};
                    k[w + "Index"] = t.componentIndex;
                    var C = new Ur({
                        anid: "name",
                        __fullText: i,
                        __truncatedText: v,
                        position: c,
                        rotation: n.rotation,
                        silent: Hm(t),
                        z2: 1,
                        tooltip: y && y.show ? T({
                            content: i, formatter: function () {
                                return i
                            }, formatterParams: k
                        }, y) : null
                    });
                    Zs(C.style, s, {
                        text: v,
                        textFont: f,
                        textFill: s.getTextColor() || t.get("axisLine.lineStyle.color"),
                        textAlign: s.get("align") || n.textAlign,
                        textVerticalAlign: s.get("verticalAlign") || n.textVerticalAlign
                    }), t.get("triggerEvent") && (C.eventData = Wm(t), C.eventData.targetType = "axisName", C.eventData.name = i), this._dumbGroup.add(C), C.updateTransform(), this.group.add(C), C.decomposeTransform()
                }
            }
        }, Wm = Vm.makeAxisEventDataBase = function (e) {
            var t = {componentType: e.mainType, componentIndex: e.componentIndex};
            return t[e.mainType + "Index"] = e.componentIndex, t
        }, jm = Vm.innerTextLayout = function (e, t, i) {
            var n, o = Bl(t - e);
            return {
                rotation: o,
                textAlign: Ul(o) ? (n = 0 < i ? "top" : "bottom", "center") : Ul(o - Km) ? (n = 0 < i ? "bottom" : "top", "center") : (n = "middle", 0 < o && o < Km ? 0 < i ? "right" : "left" : 0 < i ? "left" : "right"),
                textVerticalAlign: n
            }
        }, Hm = Vm.isLabelSilent = function (e) {
            var t = e.get("tooltip");
            return e.get("silent") || !(e.get("triggerEvent") || t && t.show)
        };

        function zm(e) {
            e && (e.ignore = !0)
        }

        function Xm(e, t) {
            var i = e && e.getBoundingRect().clone(), n = t && t.getBoundingRect().clone();
            if (i && n) {
                var o = rt([]);
                return ut(o, o, -e.rotation), i.applyTransform(lt([], o, e.getLocalTransform())), n.applyTransform(lt([], o, t.getLocalTransform())), i.intersect(n)
            }
        }

        function qm(e) {
            return "middle" === e || "center" === e
        }

        function Ym(e, t, i, n, o) {
            for (var a = [], r = [], s = [], l = 0; l < e.length; l++) {
                var d = e[l].coord;
                r[0] = d, s[r[1] = 0] = d, s[1] = i, t && (Ce(r, r, t), Ce(s, s, t));
                var u = new is({
                    anid: o + "_" + e[l].tickValue,
                    subPixelOptimize: !0,
                    shape: {x1: r[0], y1: r[1], x2: s[0], y2: s[1]},
                    style: n,
                    z2: 2,
                    silent: !0
                });
                a.push(u)
            }
            return a
        }

        var Jm = D, Zm = P;

        function Qm(e, t) {
            return "all" === e || M(e) && 0 <= b(e, t) || e === t
        }

        function $m(e) {
            var t = (e.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
            return t && t.axesInfo[tv(e)]
        }

        function ev(e) {
            return !!e.get("handle.show")
        }

        function tv(e) {
            return e.type + "||" + e.id
        }

        var iv = wf({
            type: "axis", _axisPointer: null, axisPointerClass: null, render: function (e, t, i, n) {
                this.axisPointerClass && function (e) {
                    var t = $m(e);
                    if (t) {
                        var i = t.axisPointerModel, n = t.axis.scale, o = i.option, a = i.get("status"),
                            r = i.get("value");
                        null != r && (r = n.parse(r));
                        var s = ev(i);
                        null == a && (o.status = s ? "show" : "hide");
                        var l = n.getExtent().slice();
                        l[0] > l[1] && l.reverse(), (null == r || r > l[1]) && (r = l[1]), r < l[0] && (r = l[0]), o.value = r, s && (o.status = t.axis.scale.isBlank() ? "hide" : "show")
                    }
                }(e), iv.superApply(this, "render", arguments), nv(this, e, 0, i, 0, !0)
            }, updateAxisPointer: function (e, t, i, n, o) {
                nv(this, e, 0, i, 0, !1)
            }, remove: function (e, t) {
                var i = this._axisPointer;
                i && i.remove(t), iv.superApply(this, "remove", arguments)
            }, dispose: function (e, t) {
                ov(this, t), iv.superApply(this, "dispose", arguments)
            }
        });

        function nv(e, t, i, n, o, a) {
            var r = iv.getAxisPointerClass(e.axisPointerClass);
            if (r) {
                var s = function (e) {
                    var t = $m(e);
                    return t && t.axisPointerModel
                }(t);
                s ? (e._axisPointer || (e._axisPointer = new r)).render(t, s, n, a) : ov(e, n)
            }
        }

        function ov(e, t, i) {
            var n = e._axisPointer;
            n && n.dispose(t, i), e._axisPointer = null
        }

        var av = [];

        function rv(e, t, i) {
            i = i || {};
            var n = e.coordinateSystem, o = t.axis, a = {}, r = o.getAxesOnZeroOf()[0], s = o.position,
                l = r ? "onZero" : s, d = o.dim, u = n.getRect(), c = [u.x, u.x + u.width, u.y, u.y + u.height],
                h = {left: 0, right: 1, top: 0, bottom: 1, onZero: 2}, f = t.get("offset") || 0,
                p = "x" === d ? [c[2] - f, c[3] + f] : [c[0] - f, c[1] + f];
            if (r) {
                var g = r.toGlobalCoord(r.dataToCoord(0));
                p[h.onZero] = Math.max(Math.min(g, p[1]), p[0])
            }
            a.position = ["y" === d ? p[h[l]] : c[0], "x" === d ? p[h[l]] : c[3]], a.rotation = Math.PI / 2 * ("x" === d ? 0 : 1), a.labelDirection = a.tickDirection = a.nameDirection = {
                top: -1,
                bottom: 1,
                left: -1,
                right: 1
            }[s], a.labelOffset = r ? p[h[s]] - p[h.onZero] : 0, t.get("axisTick.inside") && (a.tickDirection = -a.tickDirection), G(i.labelInside, t.get("axisLabel.inside")) && (a.labelDirection = -a.labelDirection);
            var m = t.get("axisLabel.rotate");
            return a.labelRotate = "top" === l ? -m : m, a.z2 = 1, a
        }

        function sv(e, t, i, n) {
            var o = i.axis;
            if (!o.scale.isBlank()) {
                var a = i.getModel("splitArea"), r = a.getModel("areaStyle"), s = r.get("color"),
                    l = n.coordinateSystem.getRect(), d = o.getTicksCoords({tickModel: a, clamp: !0});
                if (d.length) {
                    var u = s.length, c = e.__splitAreaColors, h = $(), f = 0;
                    if (c) for (var p = 0; p < d.length; p++) {
                        var g = c.get(d[p].tickValue);
                        if (null != g) {
                            f = (g + (u - 1) * p) % u;
                            break
                        }
                    }
                    var m = o.toGlobalCoord(d[0].coord), v = r.getAreaStyle();
                    for (s = M(s) ? s : [s], p = 1; p < d.length; p++) {
                        var y, T, k, C, b = o.toGlobalCoord(d[p].coord);
                        m = o.isHorizontal() ? (y = m, T = l.y, k = b - y, C = l.height, y + k) : (y = l.x, T = m, k = l.width, T + (C = b - T));
                        var I = d[p - 1].tickValue;
                        null != I && h.set(I, f), t.add(new es({
                            anid: null != I ? "area_" + I : null,
                            shape: {x: y, y: T, width: k, height: C},
                            style: w({fill: s[f]}, v),
                            silent: !0
                        })), f = (f + 1) % u
                    }
                    e.__splitAreaColors = h
                }
            }
        }

        function lv(e) {
            e.__splitAreaColors = null
        }

        iv.registerAxisPointerClass = function (e, t) {
            av[e] = t
        }, iv.getAxisPointerClass = function (e) {
            return e && av[e]
        };
        var dv = ["axisLine", "axisTickLabel", "axisName"], uv = ["splitArea", "splitLine", "minorSplitLine"],
            cv = iv.extend({
                type: "cartesianAxis", axisPointerClass: "CartesianAxisPointer", render: function (e, t, i, n) {
                    this.group.removeAll();
                    var o = this._axisGroup;
                    if (this._axisGroup = new Ai, this.group.add(this._axisGroup), e.get("show")) {
                        var a = e.getCoordSysModel(), r = rv(a, e), s = new Vm(e, r);
                        D(dv, s.add, s), this._axisGroup.add(s.getGroup()), D(uv, function (t) {
                            e.get(t + ".show") && this["_" + t](e, a)
                        }, this), ul(o, this._axisGroup, e), cv.superCall(this, "render", e, t, i, n)
                    }
                }, remove: function () {
                    lv(this)
                }, _splitLine: function (e, t) {
                    var i = e.axis;
                    if (!i.scale.isBlank()) {
                        var n = e.getModel("splitLine"), o = n.getModel("lineStyle"), a = o.get("color");
                        a = M(a) ? a : [a];
                        for (var r = t.coordinateSystem.getRect(), s = i.isHorizontal(), l = 0, d = i.getTicksCoords({tickModel: n}), u = [], c = [], h = o.getLineStyle(), f = 0; f < d.length; f++) {
                            var p = i.toGlobalCoord(d[f].coord);
                            s ? (u[0] = p, u[1] = r.y, c[0] = p, c[1] = r.y + r.height) : (u[0] = r.x, u[1] = p, c[0] = r.x + r.width, c[1] = p);
                            var g = l++ % a.length, m = d[f].tickValue;
                            this._axisGroup.add(new is({
                                anid: null != m ? "line_" + d[f].tickValue : null,
                                subPixelOptimize: !0,
                                shape: {x1: u[0], y1: u[1], x2: c[0], y2: c[1]},
                                style: w({stroke: a[g]}, h),
                                silent: !0
                            }))
                        }
                    }
                }, _minorSplitLine: function (e, t) {
                    var i = e.axis, n = e.getModel("minorSplitLine").getModel("lineStyle"),
                        o = t.coordinateSystem.getRect(), a = i.isHorizontal(), r = i.getMinorTicksCoords();
                    if (r.length) for (var s = [], l = [], d = n.getLineStyle(), u = 0; u < r.length; u++) for (var c = 0; c < r[u].length; c++) {
                        var h = i.toGlobalCoord(r[u][c].coord);
                        a ? (s[0] = h, s[1] = o.y, l[0] = h, l[1] = o.y + o.height) : (s[0] = o.x, s[1] = h, l[0] = o.x + o.width, l[1] = h), this._axisGroup.add(new is({
                            anid: "minor_line_" + r[u][c].tickValue,
                            subPixelOptimize: !0,
                            shape: {x1: s[0], y1: s[1], x2: l[0], y2: l[1]},
                            style: d,
                            silent: !0
                        }))
                    }
                }, _splitArea: function (e, t) {
                    sv(this, this._axisGroup, e, t)
                }
            });
        cv.extend({type: "xAxis"}), cv.extend({type: "yAxis"}), wf({
            type: "grid", render: function (e, t) {
                this.group.removeAll(), e.get("show") && this.group.add(new es({
                    shape: e.coordinateSystem.getRect(),
                    style: w({fill: e.get("backgroundColor")}, e.getItemStyle()),
                    silent: !0,
                    z2: -1
                }))
            }
        }), cf(function (e) {
            e.xAxis && e.yAxis && !e.grid && (e.grid = {})
        }), mf(vm("line", "circle", "line")), gf(ym("line")), hf(bh.PROCESSOR.STATISTIC, {
            seriesType: "line",
            modifyOutputEnd: !0,
            reset: function (e, t, i) {
                var n = e.getData(), o = e.get("sampling"), a = e.coordinateSystem;
                if ("cartesian2d" === a.type && o) {
                    var r, s = a.getBaseAxis(), l = a.getOtherAxis(s), d = s.getExtent(), u = d[1] - d[0],
                        c = Math.round(n.count() / u);
                    1 < c && ("string" == typeof o ? r = wm[o] : "function" == typeof o && (r = o), r && e.setData(n.downSample(n.mapDimension(l.dim), 1 / c, r, Tm)))
                }
            }
        });
        var hv = ec.extend({
            type: "series.__base_bar__",
            getInitialData: function (e, t) {
                return rp(this.getSource(), this, {useEncodeDefaulter: !0})
            },
            getMarkerPosition: function (e) {
                var t = this.coordinateSystem;
                if (t) {
                    var i = t.dataToPoint(t.clampData(e)), n = this.getData(), o = n.getLayout("offset"),
                        a = n.getLayout("size");
                    return i[t.getBaseAxis().isHorizontal() ? 0 : 1] += o + a / 2, i
                }
                return [NaN, NaN]
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "cartesian2d",
                legendHoverLink: !0,
                barMinHeight: 0,
                barMinAngle: 0,
                large: !1,
                largeThreshold: 400,
                progressive: 3e3,
                progressiveChunkMode: "mod",
                itemStyle: {},
                emphasis: {}
            }
        });

        function fv(e, t, i, n, o, a) {
            Ys(e, t, i.getModel("label"), i.getModel("emphasis.label"), {
                labelFetcher: o,
                labelDataIndex: a,
                defaultText: Pg(o.getData(), a),
                isRectText: !0,
                autoColor: n
            }), pv(e), pv(t)
        }

        function pv(e, t) {
            "outside" === e.textPosition && (e.textPosition = t)
        }

        hv.extend({
            type: "series.bar",
            dependencies: ["grid", "polar"],
            brushSelector: "rect",
            getProgressive: function () {
                return !!this.get("large") && this.get("progressive")
            },
            getProgressiveThreshold: function () {
                var e = this.get("progressiveThreshold"), t = this.get("largeThreshold");
                return e < t && (e = t), e
            },
            defaultOption: {
                clip: !0,
                roundCap: !1,
                showBackground: !1,
                backgroundStyle: {
                    color: "rgba(180, 180, 180, 0.2)",
                    borderColor: null,
                    borderWidth: 0,
                    borderType: "solid",
                    borderRadius: 0,
                    shadowBlur: 0,
                    shadowColor: null,
                    shadowOffsetX: 0,
                    shadowOffsetY: 0,
                    opacity: 1
                }
            }
        });
        var gv = oa([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["stroke", "barBorderColor"], ["lineWidth", "barBorderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]),
            mv = {
                getBarItemStyle: function (e) {
                    var t = gv(this, e);
                    if (this.getBorderLineDash) {
                        var i = this.getBorderLineDash();
                        i && (t.lineDash = i)
                    }
                    return t
                }
            }, vv = bs({
                type: "sausage",
                shape: {cx: 0, cy: 0, r0: 0, r: 0, startAngle: 0, endAngle: 2 * Math.PI, clockwise: !0},
                buildPath: function (e, t) {
                    var i = t.cx, n = t.cy, o = Math.max(t.r0 || 0, 0), a = Math.max(t.r, 0), r = .5 * (a - o), s = o + r,
                        l = t.startAngle, d = t.endAngle, u = t.clockwise, c = Math.cos(l), h = Math.sin(l),
                        f = Math.cos(d), p = Math.sin(d);
                    (u ? d - l < 2 * Math.PI : l - d < 2 * Math.PI) && (e.moveTo(c * o + i, h * o + n), e.arc(c * s + i, h * s + n, r, -Math.PI + l, l, !u)), e.arc(i, n, a, l, d, !u), e.moveTo(f * a + i, p * a + n), e.arc(f * s + i, p * s + n, r, d - 2 * Math.PI, d - Math.PI, !u), 0 !== o && (e.arc(i, n, o, d, l, u), e.moveTo(c * o + i, p * o + n)), e.closePath()
                }
            }), yv = ["itemStyle", "barBorderWidth"], Tv = [0, 0];
        T(bl.prototype, mv), Cf({
            type: "bar", render: function (e, t, i) {
                this._updateDrawMode(e);
                var n = e.get("coordinateSystem");
                return "cartesian2d" !== n && "polar" !== n || (this._isLargeDraw ? this._renderLarge(e, t, i) : this._renderNormal(e, t, i)), this.group
            }, incrementalPrepareRender: function (e, t, i) {
                this._clear(), this._updateDrawMode(e)
            }, incrementalRender: function (e, t, i, n) {
                this._incrementalRenderLarge(e, t)
            }, _updateDrawMode: function (e) {
                var t = e.pipelineContext.large;
                (null == this._isLargeDraw || t ^ this._isLargeDraw) && (this._isLargeDraw = t, this._clear())
            }, _renderNormal: function (e, t, i) {
                var n, o = this.group, a = e.getData(), r = this._data, s = e.coordinateSystem, l = s.getBaseAxis();
                "cartesian2d" === s.type ? n = l.isHorizontal() : "polar" === s.type && (n = "angle" === l.dim);
                var d = e.isAnimationEnabled() ? e : null, u = e.get("clip", !0), c = function (e, t) {
                    var i = e.getArea && e.getArea();
                    if ("cartesian2d" === e.type) {
                        var n = e.getBaseAxis();
                        if ("category" !== n.type || !n.onBand) {
                            var o = t.getLayout("bandWidth");
                            n.isHorizontal() ? (i.x -= o, i.width += 2 * o) : (i.y -= o, i.height += 2 * o)
                        }
                    }
                    return i
                }(s, a);
                o.removeClipPath();
                var h = e.get("roundCap", !0), f = e.get("showBackground", !0), p = e.getModel("backgroundStyle"),
                    g = p.get("barBorderRadius") || 0, m = [], v = this._backgroundEls || [];
                a.diff(r).add(function (t) {
                    var i = a.getItemModel(t), r = _v[s.type](a, t, i);
                    if (f) {
                        var l = _v[s.type](a, t), v = function (e, t, i) {
                            return new ("polar" === e.type ? Wr : es)({shape: Ov(t, i, e), silent: !0, z2: 0})
                        }(s, n, l);
                        v.useStyle(p.getBarItemStyle()), "cartesian2d" === s.type && v.setShape("r", g), m[t] = v
                    }
                    if (a.hasValue(t)) {
                        if (u && Cv[s.type](c, r)) return void o.remove(y);
                        var y = bv[s.type](t, r, n, d, !1, h);
                        a.setItemGraphicEl(t, y), o.add(y), Av(y, a, t, i, r, e, n, "polar" === s.type)
                    }
                }).update(function (t, i) {
                    var l = a.getItemModel(t), y = _v[s.type](a, t, l);
                    if (f) {
                        var T = v[i];
                        T.useStyle(p.getBarItemStyle()), "cartesian2d" === s.type && T.setShape("r", g), m[t] = T;
                        var w = _v[s.type](a, t);
                        al(T, {shape: Ov(n, w, s)}, d, t)
                    }
                    var k = r.getItemGraphicEl(i);
                    if (a.hasValue(t)) {
                        if (u && Cv[s.type](c, y)) return void o.remove(k);
                        k ? al(k, {shape: y}, d, t) : k = bv[s.type](t, y, n, d, !0, h), a.setItemGraphicEl(t, k), o.add(k), Av(k, a, t, l, y, e, n, "polar" === s.type)
                    } else o.remove(k)
                }).remove(function (e) {
                    var t = r.getItemGraphicEl(e);
                    "cartesian2d" === s.type ? t && Iv(e, d, t) : t && Sv(e, d, t)
                }).execute();
                var y = this._backgroundGroup || (this._backgroundGroup = new Ai);
                y.removeAll();
                for (var T = 0; T < m.length; ++T) y.add(m[T]);
                o.add(y), this._backgroundEls = m, this._data = a
            }, _renderLarge: function (e, t, i) {
                this._clear(), xv(e, this.group);
                var n = e.get("clip", !0) ? cm(e.coordinateSystem, !1, e) : null;
                n ? this.group.setClipPath(n) : this.group.removeClipPath()
            }, _incrementalRenderLarge: function (e, t) {
                this._removeBackground(), xv(t, this.group, !0)
            }, dispose: te, remove: function (e) {
                this._clear(e)
            }, _clear: function (e) {
                var t = this.group, i = this._data;
                e && e.get("animation") && i && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], i.eachItemGraphicEl(function (t) {
                    "sector" === t.type ? Sv(t.dataIndex, e, t) : Iv(t.dataIndex, e, t)
                })) : t.removeAll(), this._data = null
            }, _removeBackground: function () {
                this.group.remove(this._backgroundGroup), this._backgroundGroup = null
            }
        });
        var wv = Math.max, kv = Math.min, Cv = {
            cartesian2d: function (e, t) {
                var i = t.width < 0 ? -1 : 1, n = t.height < 0 ? -1 : 1;
                i < 0 && (t.x += t.width, t.width = -t.width), n < 0 && (t.y += t.height, t.height = -t.height);
                var o = wv(t.x, e.x), a = kv(t.x + t.width, e.x + e.width), r = wv(t.y, e.y),
                    s = kv(t.y + t.height, e.y + e.height);
                t.x = o, t.y = r, t.width = a - o, t.height = s - r;
                var l = t.width < 0 || t.height < 0;
                return i < 0 && (t.x += t.width, t.width = -t.width), n < 0 && (t.y += t.height, t.height = -t.height), l
            }, polar: function (e) {
                return !1
            }
        }, bv = {
            cartesian2d: function (e, t, i, n, o) {
                var a = new es({shape: T({}, t), z2: 1});
                if (a.name = "item", n) {
                    var r = i ? "height" : "width", s = {};
                    a.shape[r] = 0, s[r] = t[r], ml[o ? "updateProps" : "initProps"](a, {shape: s}, n, e)
                }
                return a
            }, polar: function (e, t, i, n, o, a) {
                var r = t.startAngle < t.endAngle, s = new (!i && a ? vv : Wr)({shape: w({clockwise: r}, t), z2: 1});
                if (s.name = "item", n) {
                    var l = i ? "r" : "endAngle", d = {};
                    s.shape[l] = i ? 0 : t.startAngle, d[l] = t[l], ml[o ? "updateProps" : "initProps"](s, {shape: d}, n, e)
                }
                return s
            }
        };

        function Iv(e, t, i) {
            i.style.text = null, al(i, {shape: {width: 0}}, t, e, function () {
                i.parent && i.parent.remove(i)
            })
        }

        function Sv(e, t, i) {
            i.style.text = null, al(i, {shape: {r: i.shape.r0}}, t, e, function () {
                i.parent && i.parent.remove(i)
            })
        }

        var _v = {
            cartesian2d: function (e, t, i) {
                var n = e.getItemLayout(t), o = i ? function (e, t) {
                    var i = e.get(yv) || 0, n = isNaN(t.width) ? Number.MAX_VALUE : Math.abs(t.width),
                        o = isNaN(t.height) ? Number.MAX_VALUE : Math.abs(t.height);
                    return Math.min(i, n, o)
                }(i, n) : 0, a = 0 < n.width ? 1 : -1, r = 0 < n.height ? 1 : -1;
                return {x: n.x + a * o / 2, y: n.y + r * o / 2, width: n.width - a * o, height: n.height - r * o}
            }, polar: function (e, t, i) {
                var n = e.getItemLayout(t);
                return {cx: n.cx, cy: n.cy, r0: n.r0, r: n.r, startAngle: n.startAngle, endAngle: n.endAngle}
            }
        };

        function Dv(e) {
            return null != e.startAngle && null != e.endAngle && e.startAngle === e.endAngle
        }

        function Av(e, t, i, n, o, a, r, s) {
            var l = t.getItemVisual(i, "color"), d = t.getItemVisual(i, "opacity"), u = t.getVisual("borderColor"),
                c = n.getModel("itemStyle"), h = n.getModel("emphasis.itemStyle").getBarItemStyle();
            s || e.setShape("r", c.get("barBorderRadius") || 0), e.useStyle(w({
                stroke: Dv(o) ? "none" : u,
                fill: Dv(o) ? "none" : l,
                opacity: d
            }, c.getBarItemStyle()));
            var f = n.getShallow("cursor");
            f && e.attr("cursor", f), r ? o.height : o.width, s || fv(e.style, h, n, l, a, i), Dv(o) && (h.fill = h.stroke = "none"), Hs(e, h)
        }

        var Nv = kr.extend({
            type: "largeBar", shape: {points: []}, buildPath: function (e, t) {
                for (var i = t.points, n = this.__startPoint, o = this.__baseDimIdx, a = 0; a < i.length; a += 2) n[o] = i[a + o], e.moveTo(n[0], n[1]), e.lineTo(i[a], i[a + 1])
            }
        });

        function xv(e, t, i) {
            var n = e.getData(), o = [], a = n.getLayout("valueAxisHorizontal") ? 1 : 0;
            o[1 - a] = n.getLayout("valueAxisStart");
            var r = n.getLayout("largeDataIndices"), s = n.getLayout("barWidth"), l = e.getModel("backgroundStyle");
            if (e.get("showBackground", !0)) {
                var d = n.getLayout("largeBackgroundPoints"), u = [];
                u[1 - a] = n.getLayout("backgroundStart");
                var c = new Nv({
                    shape: {points: d},
                    incremental: !!i,
                    __startPoint: u,
                    __baseDimIdx: a,
                    __largeDataIndices: r,
                    __barWidth: s,
                    silent: !0,
                    z2: 0
                });
                !function (e, t, i) {
                    var n = t.get("borderColor") || t.get("color"), o = t.getItemStyle(["color", "borderColor"]);
                    e.useStyle(o), e.style.fill = null, e.style.stroke = n, e.style.lineWidth = i.getLayout("barWidth")
                }(c, l, n), t.add(c)
            }
            var h = new Nv({
                shape: {points: n.getLayout("largePoints")},
                incremental: !!i,
                __startPoint: o,
                __baseDimIdx: a,
                __largeDataIndices: r,
                __barWidth: s
            });
            t.add(h), function (e, t, i) {
                var n = i.getVisual("borderColor") || i.getVisual("color"),
                    o = t.getModel("itemStyle").getItemStyle(["color", "borderColor"]);
                e.useStyle(o), e.style.fill = null, e.style.stroke = n, e.style.lineWidth = i.getLayout("barWidth")
            }(h, e, n), h.seriesIndex = e.seriesIndex, e.get("silent") || (h.on("mousedown", Ev), h.on("mousemove", Ev))
        }

        var Ev = bc(function (e) {
            var t = function (e, t, i) {
                var n = e.__baseDimIdx, o = 1 - n, a = e.shape.points, r = e.__largeDataIndices,
                    s = Math.abs(e.__barWidth / 2), l = e.__startPoint[o];
                Tv[0] = t, Tv[1] = i;
                for (var d = Tv[n], u = Tv[1 - n], c = d - s, h = d + s, f = 0, p = a.length / 2; f < p; f++) {
                    var g = 2 * f, m = a[g + n], v = a[g + o];
                    if (c <= m && m <= h && (l <= v ? l <= u && u <= v : v <= u && u <= l)) return r[f]
                }
                return -1
            }(this, e.offsetX, e.offsetY);
            this.dataIndex = 0 <= t ? t : null
        }, 30, !1);

        function Ov(e, t, i) {
            var n, o = "polar" === i.type;
            return n = o ? i.getArea() : i.grid.getRect(), o ? {
                cx: n.cx,
                cy: n.cy,
                r0: e ? n.r0 : t.r0,
                r: e ? n.r : t.r,
                startAngle: e ? t.startAngle : 0,
                endAngle: e ? t.endAngle : 2 * Math.PI
            } : {x: e ? t.x : n.x, y: e ? n.y : t.y, width: e ? t.width : n.width, height: e ? n.height : t.height}
        }

        function Pv(e, t, i) {
            t = M(t) && {coordDimensions: t} || T({}, t);
            var n = e.getSource(), o = ep(n, t), a = new Vf(o, e);
            return a.initData(n, i), a
        }

        gf(bh.VISUAL.LAYOUT, P(Ap, "bar")), gf(bh.VISUAL.PROGRESSIVE_LAYOUT, Np), mf({
            seriesType: "bar",
            reset: function (e) {
                e.getData().setVisual("legendSymbol", "roundRect")
            }
        });
        var Mv = {
            updateSelectedMap: function (e) {
                this._targetList = M(e) ? e.slice() : [], this._selectTargetMap = N(e || [], function (e, t) {
                    return e.set(t.name, t), e
                }, $())
            }, select: function (e, t) {
                var i = null != t ? this._targetList[t] : this._selectTargetMap.get(e);
                "single" === this.get("selectedMode") && this._selectTargetMap.each(function (e) {
                    e.selected = !1
                }), i && (i.selected = !0)
            }, unSelect: function (e, t) {
                var i = null != t ? this._targetList[t] : this._selectTargetMap.get(e);
                i && (i.selected = !1)
            }, toggleSelected: function (e, t) {
                var i = null != t ? this._targetList[t] : this._selectTargetMap.get(e);
                if (null != i) return this[i.selected ? "unSelect" : "select"](e, t), i.selected
            }, isSelected: function (e, t) {
                var i = null != t ? this._targetList[t] : this._selectTargetMap.get(e);
                return i && i.selected
            }
        };

        function Fv(e, t) {
            this.getAllNames = function () {
                var e = t();
                return e.mapArray(e.getName)
            }, this.containName = function (e) {
                return 0 <= t().indexOfName(e)
            }, this.indexOfName = function (t) {
                return e().indexOfName(t)
            }, this.getItemVisual = function (t, i) {
                return e().getItemVisual(t, i)
            }
        }

        var Lv = kf({
            type: "series.pie",
            init: function (e) {
                Lv.superApply(this, "init", arguments), this.legendVisualProvider = new Fv(O(this.getData, this), O(this.getRawData, this)), this.updateSelectedMap(this._createSelectableList()), this._defaultLabelLine(e)
            },
            mergeOption: function (e) {
                Lv.superCall(this, "mergeOption", e), this.updateSelectedMap(this._createSelectableList())
            },
            getInitialData: function (e, t) {
                return Pv(this, {coordDimensions: ["value"], encodeDefaulter: P(zd, this)})
            },
            _createSelectableList: function () {
                for (var e = this.getRawData(), t = e.mapDimension("value"), i = [], n = 0, o = e.count(); n < o; n++) i.push({
                    name: e.getName(n),
                    value: e.get(t, n),
                    selected: Ru(e, n, "selected")
                });
                return i
            },
            getDataParams: function (e) {
                var t = this.getData(), i = Lv.superCall(this, "getDataParams", e), n = [];
                return t.each(t.mapDimension("value"), function (e) {
                    n.push(e)
                }), i.percent = Ll(n, e, t.hostModel.get("percentPrecision")), i.$vars.push("percent"), i
            },
            _defaultLabelLine: function (e) {
                Mo(e, "labelLine", ["show"]);
                var t = e.labelLine, i = e.emphasis.labelLine;
                t.show = t.show && e.label.show, i.show = i.show && e.emphasis.label.show
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                legendHoverLink: !0,
                hoverAnimation: !0,
                center: ["50%", "50%"],
                radius: [0, "75%"],
                clockwise: !0,
                startAngle: 90,
                minAngle: 0,
                minShowLabelAngle: 0,
                selectedOffset: 10,
                hoverOffset: 10,
                avoidLabelOverlap: !0,
                percentPrecision: 2,
                stillShowZeroSum: !0,
                left: 0,
                top: 0,
                right: 0,
                bottom: 0,
                width: null,
                height: null,
                label: {
                    rotate: !1,
                    show: !0,
                    position: "outer",
                    alignTo: "none",
                    margin: "25%",
                    bleedMargin: 10,
                    distanceToLabelLine: 5
                },
                labelLine: {show: !0, length: 15, length2: 15, smooth: !1, lineStyle: {width: 1, type: "solid"}},
                itemStyle: {borderWidth: 1},
                animationType: "expansion",
                animationTypeUpdate: "transition",
                animationEasing: "cubicOut"
            }
        });

        function Rv(e, t, i, n) {
            var o = t.getData(), a = this.dataIndex, r = o.getName(a), s = t.get("selectedOffset");
            n.dispatchAction({type: "pieToggleSelect", from: e, name: r, seriesId: t.id}), o.each(function (e) {
                Bv(o.getItemGraphicEl(e), o.getItemLayout(e), t.isSelected(o.getName(e)), s, i)
            })
        }

        function Bv(e, t, i, n, o) {
            var a = (t.startAngle + t.endAngle) / 2, r = i ? n : 0, s = [Math.cos(a) * r, Math.sin(a) * r];
            o ? e.animate().when(200, {position: s}).start("bounceOut") : e.attr("position", s)
        }

        function Uv(e, t) {
            Ai.call(this);
            var i = new Wr({z2: 2}), n = new qr, o = new Ur;
            this.add(i), this.add(n), this.add(o), this.updateData(e, t, !0)
        }

        S(Lv, Mv);
        var Vv = Uv.prototype;

        function Kv(e, t) {
            D(t, function (t) {
                t.update = "updateView", ff(t, function (i, n) {
                    var o = {};
                    return n.eachComponent({mainType: "series", subType: e, query: i}, function (e) {
                        e[t.method] && e[t.method](i.name, i.dataIndex);
                        var n = e.getData();
                        n.each(function (t) {
                            var i = n.getName(t);
                            o[i] = e.isSelected(i) || !1
                        })
                    }), {name: i.name, selected: o, seriesId: i.seriesId}
                })
            })
        }

        function Gv(e) {
            return {
                getTargetSeries: function (t) {
                    var i = {}, n = $();
                    return t.eachSeriesByType(e, function (e) {
                        e.__paletteScope = i, n.set(e.uid, e)
                    }), n
                }, reset: function (e, t) {
                    var i = e.getRawData(), n = {}, o = e.getData();
                    o.each(function (e) {
                        var t = o.getRawIndex(e);
                        n[t] = e
                    }), i.each(function (t) {
                        var a, r = n[t], s = null != r && o.getItemVisual(r, "color", !0),
                            l = null != r && o.getItemVisual(r, "borderColor", !0);
                        if (s && l || (a = i.getItemModel(t)), !s) {
                            var d = a.get("itemStyle.color") || e.getColorFromPalette(i.getName(t) || t + "", e.__paletteScope, i.count());
                            null != r && o.setItemVisual(r, "color", d)
                        }
                        if (!l) {
                            var u = a.get("itemStyle.borderColor");
                            null != r && o.setItemVisual(r, "borderColor", u)
                        }
                    })
                }
            }
        }

        Vv.updateData = function (e, t, i) {
            var n = this.childAt(0), o = this.childAt(1), a = this.childAt(2), r = e.hostModel, s = e.getItemModel(t),
                l = e.getItemLayout(t), d = T({}, l);
            d.label = null;
            var u = r.getShallow("animationTypeUpdate");
            i ? (n.setShape(d), "scale" === r.getShallow("animationType") ? (n.shape.r = l.r0, rl(n, {shape: {r: l.r}}, r, t)) : (n.shape.endAngle = l.startAngle, al(n, {shape: {endAngle: l.endAngle}}, r, t))) : "expansion" === u ? n.setShape(d) : al(n, {shape: d}, r, t);
            var c = e.getItemVisual(t, "color");
            n.useStyle(w({
                lineJoin: "bevel",
                fill: c
            }, s.getModel("itemStyle").getItemStyle())), n.hoverStyle = s.getModel("emphasis.itemStyle").getItemStyle();
            var h = s.getShallow("cursor");
            h && n.attr("cursor", h), Bv(this, e.getItemLayout(t), r.isSelected(e.getName(t)), r.get("selectedOffset"), r.get("animation"));
            var f = !i && "transition" === u;
            this._updateLabel(e, t, f), this.highDownOnUpdate = r.get("silent") ? null : function (e, t) {
                var i = r.isAnimationEnabled() && s.get("hoverAnimation");
                "emphasis" === t ? (o.ignore = o.hoverIgnore, a.ignore = a.hoverIgnore, i && (n.stopAnimation(!0), n.animateTo({shape: {r: l.r + r.get("hoverOffset")}}, 300, "elasticOut"))) : (o.ignore = o.normalIgnore, a.ignore = a.normalIgnore, i && (n.stopAnimation(!0), n.animateTo({shape: {r: l.r}}, 300, "elasticOut")))
            }, Hs(this)
        }, Vv._updateLabel = function (e, t, i) {
            var n = this.childAt(1), o = this.childAt(2), a = e.hostModel, r = e.getItemModel(t),
                s = e.getItemLayout(t).label, l = e.getItemVisual(t, "color");
            if (!s || isNaN(s.x) || isNaN(s.y)) o.ignore = o.normalIgnore = o.hoverIgnore = n.ignore = n.normalIgnore = n.hoverIgnore = !0; else {
                var d = {points: s.linePoints || [[s.x, s.y], [s.x, s.y], [s.x, s.y]]}, u = {x: s.x, y: s.y};
                i ? (al(n, {shape: d}, a, t), al(o, {style: u}, a, t)) : (n.attr({shape: d}), o.attr({style: u})), o.attr({
                    rotation: s.rotation,
                    origin: [s.x, s.y],
                    z2: 10
                });
                var c = r.getModel("label"), h = r.getModel("emphasis.label"), f = r.getModel("labelLine"),
                    p = r.getModel("emphasis.labelLine");
                l = e.getItemVisual(t, "color"), Ys(o.style, o.hoverStyle = {}, c, h, {
                    labelFetcher: e.hostModel,
                    labelDataIndex: t,
                    defaultText: s.text,
                    autoColor: l,
                    useInsideStyle: !!s.inside
                }, {
                    textAlign: s.textAlign,
                    textVerticalAlign: s.verticalAlign,
                    opacity: e.getItemVisual(t, "opacity")
                }), o.ignore = o.normalIgnore = !c.get("show"), o.hoverIgnore = !h.get("show"), n.ignore = n.normalIgnore = !f.get("show"), n.hoverIgnore = !p.get("show"), n.setStyle({
                    stroke: l,
                    opacity: e.getItemVisual(t, "opacity")
                }), n.setStyle(f.getModel("lineStyle").getLineStyle()), n.hoverStyle = p.getModel("lineStyle").getLineStyle();
                var g = f.get("smooth");
                g && !0 === g && (g = .4), n.setShape({smooth: g})
            }
        }, I(Uv, Ai), fc.extend({
            type: "pie", init: function () {
                var e = new Ai;
                this._sectorGroup = e
            }, render: function (e, t, i, n) {
                if (!n || n.from !== this.uid) {
                    var o = e.getData(), a = this._data, r = this.group, s = t.get("animation"), l = !a,
                        d = e.get("animationType"), u = e.get("animationTypeUpdate"), c = P(Rv, this.uid, e, s, i),
                        h = e.get("selectedMode");
                    if (o.diff(a).add(function (e) {
                        var t = new Uv(o, e);
                        l && "scale" !== d && t.eachChild(function (e) {
                            e.stopAnimation(!0)
                        }), h && t.on("click", c), o.setItemGraphicEl(e, t), r.add(t)
                    }).update(function (e, t) {
                        var i = a.getItemGraphicEl(t);
                        l || "transition" === u || i.eachChild(function (e) {
                            e.stopAnimation(!0)
                        }), i.updateData(o, e), i.off("click"), h && i.on("click", c), r.add(i), o.setItemGraphicEl(e, i)
                    }).remove(function (e) {
                        var t = a.getItemGraphicEl(e);
                        r.remove(t)
                    }).execute(), s && 0 < o.count() && (l ? "scale" !== d : "transition" !== u)) {
                        for (var f = o.getItemLayout(0), p = 1; isNaN(f.startAngle) && p < o.count(); ++p) f = o.getItemLayout(p);
                        var g = Math.max(i.getWidth(), i.getHeight()) / 2, m = O(r.removeClipPath, r);
                        r.setClipPath(this._createClipPath(f.cx, f.cy, g, f.startAngle, f.clockwise, m, e, l))
                    } else r.removeClipPath();
                    this._data = o
                }
            }, dispose: function () {
            }, _createClipPath: function (e, t, i, n, o, a, r, s) {
                var l = new Wr({shape: {cx: e, cy: t, r0: 0, r: i, startAngle: n, endAngle: n, clockwise: o}});
                return (s ? rl : al)(l, {shape: {endAngle: n + (o ? 1 : -1) * Math.PI * 2}}, r, a), l
            }, containPoint: function (e, t) {
                var i = t.getData().getItemLayout(0);
                if (i) {
                    var n = e[0] - i.cx, o = e[1] - i.cy, a = Math.sqrt(n * n + o * o);
                    return a <= i.r && a >= i.r0
                }
            }
        });
        var Wv = Math.PI / 180;

        function jv(e, t, i, n, o, a, r, s, l, d) {
            function u(t, i, n) {
                for (var o = t; o < i && !(e[o].y + n > l + r); o++) if (e[o].y += n, t < o && o + 1 < i && e[o + 1].y > e[o].y + e[o].height) return void c(o, n / 2);
                c(i - 1, n / 2)
            }

            function c(t, i) {
                for (var n = t; 0 <= n && !(e[n].y - i < l) && (e[n].y -= i, !(0 < n && e[n].y > e[n - 1].y + e[n - 1].height)); n--) ;
            }

            function h(e, t, i, n, o, a) {
                for (var r = t ? Number.MAX_VALUE : 0, s = 0, l = e.length; s < l; s++) if ("none" === e[s].labelAlignTo) {
                    var d = Math.abs(e[s].y - n), u = e[s].len, c = e[s].len2,
                        h = d < o + u ? Math.sqrt((o + u + c) * (o + u + c) - d * d) : Math.abs(e[s].x - i);
                    t && r <= h && (h = r - 10), !t && h <= r && (h = r + 10), e[s].x = i + h * a, r = h
                }
            }

            e.sort(function (e, t) {
                return e.y - t.y
            });
            for (var f, p = 0, g = e.length, m = [], v = [], y = 0; y < g; y++) {
                if ("outer" === e[y].position && "labelLine" === e[y].labelAlignTo) {
                    var T = e[y].x - d;
                    e[y].linePoints[1][0] += T, e[y].x = d
                }
                (f = e[y].y - p) < 0 && u(y, g, -f), p = e[y].y + e[y].height
            }
            for (r - p < 0 && c(g - 1, p - r), y = 0; y < g; y++) e[y].y >= i ? v.push(e[y]) : m.push(e[y]);
            h(m, !1, t, i, n, o), h(v, !0, t, i, n, o)
        }

        function Hv(e) {
            return "center" === e.position
        }

        var zv = 2 * Math.PI, Xv = Math.PI / 180;

        function qv(e) {
            return {
                seriesType: e, reset: function (e, t) {
                    var i = t.findComponents({mainType: "legend"});
                    if (i && i.length) {
                        var n = e.getData();
                        n.filterSelf(function (e) {
                            for (var t = n.getName(e), o = 0; o < i.length; o++) if (!i[o].isSelected(t)) return !1;
                            return !0
                        })
                    }
                }
            }
        }

        Kv("pie", [{type: "pieToggleSelect", event: "pieselectchanged", method: "toggleSelected"}, {
            type: "pieSelect",
            event: "pieselected",
            method: "select"
        }, {
            type: "pieUnSelect",
            event: "pieunselected",
            method: "unSelect"
        }]), mf(Gv("pie")), gf(P(function (e, t, i, n) {
            t.eachSeriesByType(e, function (e) {
                var t = e.getData(), n = t.mapDimension("value"), o = function (e, t) {
                    return md(e.getBoxLayoutParams(), {width: t.getWidth(), height: t.getHeight()})
                }(e, i), a = e.get("center"), r = e.get("radius");
                M(r) || (r = [0, r]), M(a) || (a = [a, a]);
                var s = xl(o.width, i.getWidth()), l = xl(o.height, i.getHeight()), d = Math.min(s, l),
                    u = xl(a[0], s) + o.x, c = xl(a[1], l) + o.y, h = xl(r[0], d / 2), f = xl(r[1], d / 2),
                    p = -e.get("startAngle") * Xv, g = e.get("minAngle") * Xv, m = 0;
                t.each(n, function (e) {
                    isNaN(e) || m++
                });
                var v = t.getSum(n), y = Math.PI / (v || m) * 2, T = e.get("clockwise"), w = e.get("roseType"),
                    k = e.get("stillShowZeroSum"), C = t.getDataExtent(n);
                C[0] = 0;
                var b = zv, I = 0, S = p, _ = T ? 1 : -1;
                if (t.each(n, function (e, i) {
                    var n;
                    if (isNaN(e)) t.setItemLayout(i, {
                        angle: NaN,
                        startAngle: NaN,
                        endAngle: NaN,
                        clockwise: T,
                        cx: u,
                        cy: c,
                        r0: h,
                        r: w ? NaN : f,
                        viewRect: o
                    }); else {
                        (n = "area" !== w ? 0 === v && k ? y : e * y : zv / m) < g ? b -= n = g : I += e;
                        var a = S + _ * n;
                        t.setItemLayout(i, {
                            angle: n,
                            startAngle: S,
                            endAngle: a,
                            clockwise: T,
                            cx: u,
                            cy: c,
                            r0: h,
                            r: w ? Nl(e, C, [h, f]) : f,
                            viewRect: o
                        }), S = a
                    }
                }), b < zv && m) if (b <= .001) {
                    var D = zv / m;
                    t.each(n, function (e, i) {
                        if (!isNaN(e)) {
                            var n = t.getItemLayout(i);
                            n.angle = D, n.startAngle = p + _ * i * D, n.endAngle = p + _ * (i + 1) * D
                        }
                    })
                } else y = b / I, S = p, t.each(n, function (e, i) {
                    if (!isNaN(e)) {
                        var n = t.getItemLayout(i), o = n.angle === g ? g : e * y;
                        n.startAngle = S, n.endAngle = S + _ * o, S += _ * o
                    }
                });
                !function (e, t, i, n, o, a) {
                    var r, s, l = e.getData(), d = [], u = !1, c = (e.get("minShowLabelAngle") || 0) * Wv;
                    l.each(function (n) {
                        var a = l.getItemLayout(n), h = l.getItemModel(n), f = h.getModel("label"),
                            p = f.get("position") || h.get("emphasis.label.position"), g = f.get("distanceToLabelLine"),
                            m = f.get("alignTo"), v = xl(f.get("margin"), i), y = f.get("bleedMargin"), T = f.getFont(),
                            w = h.getModel("labelLine"), k = w.get("length");
                        k = xl(k, i);
                        var C = w.get("length2");
                        if (C = xl(C, i), !(a.angle < c)) {
                            var b, I, S, _, D = (a.startAngle + a.endAngle) / 2, A = Math.cos(D), N = Math.sin(D);
                            r = a.cx, s = a.cy;
                            var x, E = e.getFormattedLabel(n, "normal") || l.getName(n), O = cn(E, T, _, "top"),
                                P = "inside" === p || "inner" === p;
                            if ("center" === p) b = a.cx, I = a.cy, _ = "center"; else {
                                var M = (P ? (a.r + a.r0) / 2 * A : a.r * A) + r,
                                    F = (P ? (a.r + a.r0) / 2 * N : a.r * N) + s;
                                if (b = M + 3 * A, I = F + 3 * N, !P) {
                                    var L = M + A * (k + t - a.r), R = F + N * (k + t - a.r),
                                        B = L + (A < 0 ? -1 : 1) * C;
                                    b = "edge" === m ? A < 0 ? o + v : o + i - v : B + (A < 0 ? -g : g), S = [[M, F], [L, R], [B, I = R]]
                                }
                                _ = P ? "center" : "edge" === m ? 0 < A ? "right" : "left" : 0 < A ? "left" : "right"
                            }
                            var U = f.get("rotate");
                            x = "number" == typeof U ? U * (Math.PI / 180) : U ? A < 0 ? -D + Math.PI : -D : 0, u = !!x, a.label = {
                                x: b,
                                y: I,
                                position: p,
                                height: O.height,
                                len: k,
                                len2: C,
                                linePoints: S,
                                textAlign: _,
                                verticalAlign: "middle",
                                rotation: x,
                                inside: P,
                                labelDistance: g,
                                labelAlignTo: m,
                                labelMargin: v,
                                bleedMargin: y,
                                textRect: O,
                                text: E,
                                font: T
                            }, P || d.push(a.label)
                        }
                    }), !u && e.get("avoidLabelOverlap") && function (e, t, i, n, o, a, r, s) {
                        for (var l = [], d = [], u = Number.MAX_VALUE, c = -Number.MAX_VALUE, h = 0; h < e.length; h++) Hv(e[h]) || (e[h].x < t ? (u = Math.min(u, e[h].x), l.push(e[h])) : (c = Math.max(c, e[h].x), d.push(e[h])));
                        for (jv(d, t, i, n, 1, 0, a, 0, s, c), jv(l, t, i, n, -1, 0, a, 0, s, u), h = 0; h < e.length; h++) {
                            var f = e[h];
                            if (!Hv(f)) {
                                var p = f.linePoints;
                                if (p) {
                                    var g, m = "edge" === f.labelAlignTo, v = f.textRect.width;
                                    (g = m ? f.x < t ? p[2][0] - f.labelDistance - r - f.labelMargin : r + o - f.labelMargin - p[2][0] - f.labelDistance : f.x < t ? f.x - r - f.bleedMargin : r + o - f.x - f.bleedMargin) < f.textRect.width && (f.text = gn(f.text, g, f.font), "edge" === f.labelAlignTo && (v = un(f.text, f.font)));
                                    var y = p[1][0] - p[2][0];
                                    m ? f.x < t ? p[2][0] = r + f.labelMargin + v + f.labelDistance : p[2][0] = r + o - f.labelMargin - v - f.labelDistance : (f.x < t ? p[2][0] = f.x + f.labelDistance : p[2][0] = f.x - f.labelDistance, p[1][0] = p[2][0] + y), p[1][1] = p[2][1] = f.y
                                }
                            }
                        }
                    }(d, r, s, t, i, n, o, a)
                }(e, f, o.width, o.height, o.x, o.y)
            })
        }, "pie")), hf(qv("pie")), ec.extend({
            type: "series.scatter",
            dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"],
            getInitialData: function (e, t) {
                return rp(this.getSource(), this, {useEncodeDefaulter: !0})
            },
            brushSelector: "point",
            getProgressive: function () {
                var e = this.option.progressive;
                return null == e ? this.option.large ? 5e3 : this.get("progressive") : e
            },
            getProgressiveThreshold: function () {
                var e = this.option.progressiveThreshold;
                return null == e ? this.option.large ? 1e4 : this.get("progressiveThreshold") : e
            },
            defaultOption: {
                coordinateSystem: "cartesian2d",
                zlevel: 0,
                z: 2,
                legendHoverLink: !0,
                hoverAnimation: !0,
                symbolSize: 10,
                large: !1,
                largeThreshold: 2e3,
                itemStyle: {opacity: .8},
                clip: !0
            }
        });
        var Yv = bs({
            shape: {points: null}, symbolProxy: null, softClipShape: null, buildPath: function (e, t) {
                var i = t.points, n = t.size, o = this.symbolProxy, a = o.shape;
                if (!((e.getContext ? e.getContext() : e) && n[0] < 4)) for (var r = 0; r < i.length;) {
                    var s = i[r++], l = i[r++];
                    isNaN(s) || isNaN(l) || this.softClipShape && !this.softClipShape.contain(s, l) || (a.x = s - n[0] / 2, a.y = l - n[1] / 2, a.width = n[0], a.height = n[1], o.buildPath(e, a, !0))
                }
            }, afterBrush: function (e) {
                var t = this.shape, i = t.points, n = t.size;
                if (n[0] < 4) {
                    this.setTransform(e);
                    for (var o = 0; o < i.length;) {
                        var a = i[o++], r = i[o++];
                        isNaN(a) || isNaN(r) || this.softClipShape && !this.softClipShape.contain(a, r) || e.fillRect(a - n[0] / 2, r - n[1] / 2, n[0], n[1])
                    }
                    this.restoreTransform(e)
                }
            }, findDataIndex: function (e, t) {
                for (var i = this.shape, n = i.points, o = i.size, a = Math.max(o[0], 4), r = Math.max(o[1], 4), s = n.length / 2 - 1; 0 <= s; s--) {
                    var l = 2 * s, d = n[l] - a / 2, u = n[1 + l] - r / 2;
                    if (d <= e && u <= t && e <= d + a && t <= u + r) return s
                }
                return -1
            }
        });

        function Jv() {
            this.group = new Ai
        }

        var Zv = Jv.prototype;

        function Qv(e, t, i) {
            Ag.call(this, e, t, i), this.type = "value", this.angle = 0, this.name = "", this.model
        }

        function $v(e, t, i) {
            this._model = e, this.dimensions = [], this._indicatorAxes = A(e.getIndicatorModels(), function (e, t) {
                var i = "indicator_" + t, n = new Qv(i, "log" === e.get("axisType") ? new Xp : new Tp);
                return n.name = e.get("name"), (n.model = e).axis = n, this.dimensions.push(i), n
            }, this), this.resize(e, i), this.cx, this.cy, this.r, this.r0, this.startAngle
        }

        Zv.isPersistent = function () {
            return !this._incremental
        }, Zv.updateData = function (e, t) {
            this.group.removeAll();
            var i = new Yv({rectHover: !0, cursor: "default"});
            i.setShape({points: e.getLayout("symbolPoints")}), this._setCommon(i, e, !1, t), this.group.add(i), this._incremental = null
        }, Zv.updateLayout = function (e) {
            if (!this._incremental) {
                var t = e.getLayout("symbolPoints");
                this.group.eachChild(function (e) {
                    if (null != e.startIndex) {
                        var i = 2 * (e.endIndex - e.startIndex), n = 4 * e.startIndex * 2;
                        t = new Float32Array(t.buffer, n, i)
                    }
                    e.setShape("points", t)
                })
            }
        }, Zv.incrementalPrepareUpdate = function (e) {
            this.group.removeAll(), this._clearIncremental(), 2e6 < e.count() ? (this._incremental || (this._incremental = new cs({silent: !0})), this.group.add(this._incremental)) : this._incremental = null
        }, Zv.incrementalUpdate = function (e, t, i) {
            var n;
            this._incremental ? (n = new Yv, this._incremental.addDisplayable(n, !0)) : ((n = new Yv({
                rectHover: !0,
                cursor: "default",
                startIndex: e.start,
                endIndex: e.end
            })).incremental = !0, this.group.add(n)), n.setShape({points: t.getLayout("symbolPoints")}), this._setCommon(n, t, !!this._incremental, i)
        }, Zv._setCommon = function (e, t, i, n) {
            var o = t.hostModel;
            n = n || {};
            var a = t.getVisual("symbolSize");
            e.setShape("size", a instanceof Array ? a : [a, a]), e.softClipShape = n.clipShape || null, e.symbolProxy = cg(t.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor;
            var r = e.shape.size[0] < 4;
            e.useStyle(o.getModel("itemStyle").getItemStyle(r ? ["color", "shadowBlur", "shadowColor"] : ["color"]));
            var s = t.getVisual("color");
            s && e.setColor(s), i || (e.seriesIndex = o.seriesIndex, e.on("mousemove", function (t) {
                e.dataIndex = null;
                var i = e.findDataIndex(t.offsetX, t.offsetY);
                0 <= i && (e.dataIndex = i + (e.startIndex || 0))
            }))
        }, Zv.remove = function () {
            this._clearIncremental(), this._incremental = null, this.group.removeAll()
        }, Zv._clearIncremental = function () {
            var e = this._incremental;
            e && e.clearDisplaybles()
        }, Cf({
            type: "scatter", render: function (e, t, i) {
                var n = e.getData();
                this._updateSymbolDraw(n, e).updateData(n, {clipShape: this._getClipShape(e)}), this._finished = !0
            }, incrementalPrepareRender: function (e, t, i) {
                var n = e.getData();
                this._updateSymbolDraw(n, e).incrementalPrepareUpdate(n), this._finished = !1
            }, incrementalRender: function (e, t, i) {
                this._symbolDraw.incrementalUpdate(e, t.getData(), {clipShape: this._getClipShape(t)}), this._finished = e.end === t.getData().count()
            }, updateTransform: function (e, t, i) {
                var n = e.getData();
                if (this.group.dirty(), !this._finished || 1e4 < n.count() || !this._symbolDraw.isPersistent()) return {update: !0};
                var o = ym().reset(e);
                o.progress && o.progress({start: 0, end: n.count()}, n), this._symbolDraw.updateLayout(n)
            }, _getClipShape: function (e) {
                var t = e.coordinateSystem, i = t && t.getArea && t.getArea();
                return e.get("clip", !0) ? i : null
            }, _updateSymbolDraw: function (e, t) {
                var i = this._symbolDraw, n = t.pipelineContext.large;
                return i && n === this._isLargeDraw || (i && i.remove(), i = this._symbolDraw = n ? new Jv : new jg, this._isLargeDraw = n, this.group.removeAll()), this.group.add(i.group), i
            }, remove: function (e, t) {
                this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null
            }, dispose: function () {
            }
        }), mf(vm("scatter", "circle")), gf(ym("scatter")), I(Qv, Ag), $v.prototype.getIndicatorAxes = function () {
            return this._indicatorAxes
        }, $v.prototype.dataToPoint = function (e, t) {
            var i = this._indicatorAxes[t];
            return this.coordToPoint(i.dataToCoord(e), t)
        }, $v.prototype.coordToPoint = function (e, t) {
            var i = this._indicatorAxes[t].angle;
            return [this.cx + e * Math.cos(i), this.cy - e * Math.sin(i)]
        }, $v.prototype.pointToData = function (e) {
            var t = e[0] - this.cx, i = e[1] - this.cy, n = Math.sqrt(t * t + i * i);
            t /= n, i /= n;
            for (var o, a = Math.atan2(-i, t), r = 1 / 0, s = -1, l = 0; l < this._indicatorAxes.length; l++) {
                var d = this._indicatorAxes[l], u = Math.abs(a - d.angle);
                u < r && (o = d, s = l, r = u)
            }
            return [s, +(o && o.coordToData(n))]
        }, $v.prototype.resize = function (e, t) {
            var i = e.get("center"), n = t.getWidth(), o = t.getHeight(), a = Math.min(n, o) / 2;
            this.cx = xl(i[0], n), this.cy = xl(i[1], o), this.startAngle = e.get("startAngle") * Math.PI / 180;
            var r = e.get("radius");
            "string" != typeof r && "number" != typeof r || (r = [0, r]), this.r0 = xl(r[0], a), this.r = xl(r[1], a), D(this._indicatorAxes, function (e, t) {
                e.setExtent(this.r0, this.r);
                var i = this.startAngle + t * Math.PI * 2 / this._indicatorAxes.length;
                i = Math.atan2(Math.sin(i), Math.cos(i)), e.angle = i
            }, this)
        }, $v.prototype.update = function (e, t) {
            var i = this._indicatorAxes, n = this._model;
            D(i, function (e) {
                e.scale.setExtent(1 / 0, -1 / 0)
            }), e.eachSeriesByType("radar", function (t, o) {
                if ("radar" === t.get("coordinateSystem") && e.getComponent("radar", t.get("radarIndex")) === n) {
                    var a = t.getData();
                    D(i, function (e) {
                        e.scale.unionExtentFromData(a, a.mapDimension(e.dim))
                    })
                }
            }, this);
            var o = n.get("splitNumber");

            function a(e) {
                var t = Math.pow(10, Math.floor(Math.log(e) / Math.LN10)), i = e / t;
                return 2 === i ? i = 5 : i *= 2, i * t
            }

            D(i, function (e, t) {
                var i = Yp(e.scale, e.model).extent;
                Jp(e.scale, e.model);
                var n = e.model, r = e.scale, s = n.getMin(), l = n.getMax(), d = r.getInterval();
                if (null != s && null != l) r.setExtent(+s, +l), r.setInterval((l - s) / o); else if (null != s) for (; c = s + d * o, r.setExtent(+s, c), r.setInterval(d), d = a(d), c < i[1] && isFinite(c) && isFinite(i[1]);) ; else if (null != l) for (; h = l - d * o, r.setExtent(h, +l), r.setInterval(d), d = a(d), h > i[0] && isFinite(h) && isFinite(i[0]);) ; else {
                    var u = r.getTicks().length - 1;
                    o < u && (d = a(d));
                    var c, h = El((c = Math.ceil(i[1] / d) * d) - d * o);
                    r.setExtent(h, c), r.setInterval(d)
                }
            })
        }, $v.dimensions = [], $v.create = function (e, t) {
            var i = [];
            return e.eachComponent("radar", function (n) {
                var o = new $v(n, e, t);
                i.push(o), n.coordinateSystem = o
            }), e.eachSeriesByType("radar", function (e) {
                "radar" === e.get("coordinateSystem") && (e.coordinateSystem = i[e.get("radarIndex") || 0])
            }), i
        }, iu.register("radar", $v);
        var ey = _m.valueAxis;

        function ty(e, t) {
            return w({show: t}, e)
        }

        Tf({
            type: "radar",
            optionUpdated: function () {
                var e = this.get("boundaryGap"), t = this.get("splitNumber"), i = this.get("scale"),
                    n = this.get("axisLine"), o = this.get("axisTick"), a = this.get("axisType"),
                    r = this.get("axisLabel"), s = this.get("name"), l = this.get("name.show"),
                    d = this.get("name.formatter"), u = this.get("nameGap"), c = this.get("triggerEvent"),
                    h = A(this.get("indicator") || [], function (h) {
                        null != h.max && 0 < h.max && !h.min ? h.min = 0 : null != h.min && h.min < 0 && !h.max && (h.max = 0);
                        var f = s;
                        if (null != h.color && (f = w({color: h.color}, s)), h = v(m(h), {
                            boundaryGap: e,
                            splitNumber: t,
                            scale: i,
                            axisLine: n,
                            axisTick: o,
                            axisType: a,
                            axisLabel: r,
                            name: h.text,
                            nameLocation: "end",
                            nameGap: u,
                            nameTextStyle: f,
                            triggerEvent: c
                        }, !1), l || (h.name = ""), "string" == typeof d) {
                            var p = h.name;
                            h.name = d.replace("{value}", null != p ? p : "")
                        } else "function" == typeof d && (h.name = d(h.name, h));
                        var g = T(new bl(h, null, this.ecModel), ig);
                        return g.mainType = "radar", g.componentIndex = this.componentIndex, g
                    }, this);
                this.getIndicatorModels = function () {
                    return h
                }
            },
            defaultOption: {
                zlevel: 0,
                z: 0,
                center: ["50%", "50%"],
                radius: "75%",
                startAngle: 90,
                name: {show: !0},
                boundaryGap: [0, 0],
                splitNumber: 5,
                nameGap: 15,
                scale: !1,
                shape: "polygon",
                axisLine: v({lineStyle: {color: "#bbb"}}, ey.axisLine),
                axisLabel: ty(ey.axisLabel, !1),
                axisTick: ty(ey.axisTick, !1),
                axisType: "interval",
                splitLine: ty(ey.splitLine, !0),
                splitArea: ty(ey.splitArea, !0),
                indicator: []
            }
        });
        var iy = ["axisLine", "axisTickLabel", "axisName"];
        wf({
            type: "radar", render: function (e, t, i) {
                this.group.removeAll(), this._buildAxes(e), this._buildSplitLineAndArea(e)
            }, _buildAxes: function (e) {
                var t = e.coordinateSystem;
                D(A(t.getIndicatorAxes(), function (e) {
                    return new Vm(e.model, {
                        position: [t.cx, t.cy],
                        rotation: e.angle,
                        labelDirection: -1,
                        tickDirection: -1,
                        nameDirection: 1
                    })
                }), function (e) {
                    D(iy, e.add, e), this.group.add(e.getGroup())
                }, this)
            }, _buildSplitLineAndArea: function (e) {
                var t = e.coordinateSystem, i = t.getIndicatorAxes();
                if (i.length) {
                    var n = e.get("shape"), o = e.getModel("splitLine"), a = e.getModel("splitArea"),
                        r = o.getModel("lineStyle"), s = a.getModel("areaStyle"), l = o.get("show"), d = a.get("show"),
                        u = r.get("color"), c = s.get("color");
                    u = M(u) ? u : [u], c = M(c) ? c : [c];
                    var h = [], f = [];
                    if ("circle" === n) for (var p = i[0].getTicksCoords(), g = t.cx, m = t.cy, v = 0; v < p.length; v++) l && h[_(h, u, v)].push(new Kr({
                        shape: {
                            cx: g,
                            cy: m,
                            r: p[v].coord
                        }
                    })), d && v < p.length - 1 && f[_(f, c, v)].push(new jr({
                        shape: {
                            cx: g,
                            cy: m,
                            r0: p[v].coord,
                            r: p[v + 1].coord
                        }
                    })); else {
                        var y, T = A(i, function (e, i) {
                            var n = e.getTicksCoords();
                            return y = null == y ? n.length - 1 : Math.min(n.length - 1, y), A(n, function (e) {
                                return t.coordToPoint(e.coord, i)
                            })
                        }), k = [];
                        for (v = 0; v <= y; v++) {
                            for (var C = [], b = 0; b < i.length; b++) C.push(T[b][v]);
                            C[0] && C.push(C[0].slice()), l && h[_(h, u, v)].push(new qr({shape: {points: C}})), d && k && f[_(f, c, v - 1)].push(new Xr({shape: {points: C.concat(k)}})), k = C.slice().reverse()
                        }
                    }
                    var I = r.getLineStyle(), S = s.getAreaStyle();
                    D(f, function (e, t) {
                        this.group.add(Ns(e, {style: w({stroke: "none", fill: c[t % c.length]}, S), silent: !0}))
                    }, this), D(h, function (e, t) {
                        this.group.add(Ns(e, {style: w({fill: "none", stroke: u[t % u.length]}, I), silent: !0}))
                    }, this)
                }

                function _(e, t, i) {
                    var n = i % t.length;
                    return e[n] = e[n] || [], n
                }
            }
        });
        var ny = ec.extend({
            type: "series.radar",
            dependencies: ["radar"],
            init: function (e) {
                ny.superApply(this, "init", arguments), this.legendVisualProvider = new Fv(O(this.getData, this), O(this.getRawData, this))
            },
            getInitialData: function (e, t) {
                return Pv(this, {generateCoord: "indicator_", generateCoordCount: 1 / 0})
            },
            formatTooltip: function (e) {
                var t = this.getData(), i = this.coordinateSystem.getIndicatorAxes(), n = this.getData().getName(e);
                return $l("" === n ? this.name : n) + "<br/>" + A(i, function (i, n) {
                    var o = t.get(t.mapDimension(i.dim), e);
                    return $l(i.name + " : " + o)
                }).join("<br />")
            },
            getTooltipPosition: function (e) {
                if (null != e) for (var t = this.getData(), i = this.coordinateSystem, n = t.getValues(A(i.dimensions, function (e) {
                    return t.mapDimension(e)
                }), e, !0), o = 0, a = n.length; o < a; o++) if (!isNaN(n[o])) {
                    var r = i.getIndicatorAxes();
                    return i.coordToPoint(r[o].dataToCoord(n[o]), o)
                }
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "radar",
                legendHoverLink: !0,
                radarIndex: 0,
                lineStyle: {width: 2, type: "solid"},
                label: {position: "top"},
                symbol: "emptyCircle",
                symbolSize: 4
            }
        });

        function oy(e) {
            return !isNaN(e[0]) && !isNaN(e[1])
        }

        function ay(e) {
            return [e.cx, e.cy]
        }

        Cf({
            type: "radar", render: function (e, t, i) {
                var n = e.coordinateSystem, o = this.group, a = e.getData(), r = this._data;

                function s(e, t) {
                    var i = e.getItemVisual(t, "symbol") || "circle", n = e.getItemVisual(t, "color");
                    if ("none" !== i) {
                        var o = function (e) {
                            return M(e) || (e = [+e, +e]), e
                        }(e.getItemVisual(t, "symbolSize")), a = cg(i, -1, -1, 2, 2, n);
                        return a.attr({style: {strokeNoScale: !0}, z2: 100, scale: [o[0] / 2, o[1] / 2]}), a
                    }
                }

                function l(t, i, n, o, a, r) {
                    n.removeAll();
                    for (var l = 0; l < i.length - 1; l++) {
                        var d = s(o, a);
                        d && (t[d.__dimIdx = l] ? (d.attr("position", t[l]), ml[r ? "initProps" : "updateProps"](d, {position: i[l]}, e, a)) : d.attr("position", i[l]), n.add(d))
                    }
                }

                function d(e) {
                    return A(e, function (e) {
                        return [n.cx, n.cy]
                    })
                }

                a.diff(r).add(function (t) {
                    var i = a.getItemLayout(t);
                    if (i) {
                        var n = new Xr, o = new qr, r = {shape: {points: i}};
                        n.shape.points = d(i), o.shape.points = d(i), rl(n, r, e, t), rl(o, r, e, t);
                        var s = new Ai, u = new Ai;
                        s.add(o), s.add(n), s.add(u), l(o.shape.points, i, u, a, t, !0), a.setItemGraphicEl(t, s)
                    }
                }).update(function (t, i) {
                    var n = r.getItemGraphicEl(i), o = n.childAt(0), s = n.childAt(1), d = n.childAt(2),
                        u = {shape: {points: a.getItemLayout(t)}};
                    u.shape.points && (l(o.shape.points, u.shape.points, d, a, t, !1), al(o, u, e), al(s, u, e), a.setItemGraphicEl(t, n))
                }).remove(function (e) {
                    o.remove(r.getItemGraphicEl(e))
                }).execute(), a.eachItemGraphicEl(function (e, t) {
                    var i = a.getItemModel(t), n = e.childAt(0), r = e.childAt(1), s = e.childAt(2),
                        l = a.getItemVisual(t, "color");
                    o.add(e), n.useStyle(w(i.getModel("lineStyle").getLineStyle(), {
                        fill: "none",
                        stroke: l
                    })), n.hoverStyle = i.getModel("emphasis.lineStyle").getLineStyle();
                    var d = i.getModel("areaStyle"), u = i.getModel("emphasis.areaStyle"),
                        c = d.isEmpty() && d.parentModel.isEmpty(), h = u.isEmpty() && u.parentModel.isEmpty();
                    h = h && c, r.ignore = c, r.useStyle(w(d.getAreaStyle(), {
                        fill: l,
                        opacity: .7
                    })), r.hoverStyle = u.getAreaStyle();
                    var f = i.getModel("itemStyle").getItemStyle(["color"]),
                        p = i.getModel("emphasis.itemStyle").getItemStyle(), g = i.getModel("label"),
                        v = i.getModel("emphasis.label");
                    s.eachChild(function (e) {
                        e.setStyle(f), e.hoverStyle = m(p);
                        var i = a.get(a.dimensions[e.__dimIdx], t);
                        null != i && !isNaN(i) || (i = ""), Ys(e.style, e.hoverStyle, g, v, {
                            labelFetcher: a.hostModel,
                            labelDataIndex: t,
                            labelDimIndex: e.__dimIdx,
                            defaultText: i,
                            autoColor: l,
                            isRectText: !0
                        })
                    }), e.highDownOnUpdate = function (e, t) {
                        r.attr("ignore", "emphasis" === t ? h : c)
                    }, Hs(e)
                }), this._data = a
            }, remove: function () {
                this.group.removeAll(), this._data = null
            }, dispose: function () {
            }
        }), mf(Gv("radar")), mf(vm("radar", "circle")), gf(function (e) {
            e.eachSeriesByType("radar", function (e) {
                var t = e.getData(), i = [], n = e.coordinateSystem;
                if (n) {
                    var o = n.getIndicatorAxes();
                    D(o, function (e, a) {
                        t.each(t.mapDimension(o[a].dim), function (e, t) {
                            i[t] = i[t] || [];
                            var o = n.dataToPoint(e, a);
                            i[t][a] = oy(o) ? o : ay(n)
                        })
                    }), t.each(function (e) {
                        var o = E(i[e], function (e) {
                            return oy(e)
                        }) || ay(n);
                        i[e].push(o.slice()), t.setItemLayout(e, i[e])
                    })
                }
            })
        }), hf(qv("radar")), cf(function (e) {
            var t = e.polar;
            if (t) {
                M(t) || (t = [t]);
                var i = [];
                D(t, function (t, n) {
                    t.indicator ? (t.type && !t.shape && (t.shape = t.type), e.radar = e.radar || [], M(e.radar) || (e.radar = [e.radar]), e.radar.push(t)) : i.push(t)
                }), e.polar = i
            }
            D(e.series, function (e) {
                e && "radar" === e.type && e.polarIndex && (e.radarIndex = e.polarIndex)
            })
        });
        for (var ry = [126, 25], sy = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, .7], [52, .7], [56, 7.7], [59, .7], [64, .7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]], ly = 0; ly < sy.length; ly++) for (var dy = 0; dy < sy[ly].length; dy++) sy[ly][dy][0] /= 10.5, sy[ly][dy][1] /= -14, sy[ly][dy][0] += ry[0], sy[ly][dy][1] += ry[1];
        var uy = {"南海诸岛": [32, 80], "广东": [0, -10], "香港": [10, 5], "澳门": [-10, 10], "天津": [5, 5]},
            cy = {Russia: [100, 60], "United States": [-99, 38], "United States of America": [-99, 38]}, hy = Go(),
            fy = {
                load: function (e, t, i) {
                    var n = hy(t).parsed;
                    if (n) return n;
                    var o, a = t.specialAreas || {}, r = t.geoJSON;
                    try {
                        o = r ? Tg(r, i) : []
                    } catch (t) {
                        throw new Error("Invalid geoJson format\n" + t.message)
                    }
                    return D(o, function (t) {
                        var i = t.name;
                        !function (e, t) {
                            if ("china" === e) {
                                var i = uy[t.name];
                                if (i) {
                                    var n = t.center;
                                    n[0] += i[0] / 10.5, n[1] += -i[1] / 14
                                }
                            }
                        }(e, t), function (e, t) {
                            if ("world" === e) {
                                var i = cy[t.name];
                                if (i) {
                                    var n = t.center;
                                    n[0] = i[0], n[1] = i[1]
                                }
                            }
                        }(e, t);
                        var n = a[i];
                        n && t.transformTo(n.left, n.top, n.width, n.height)
                    }), hy(t).parsed = {
                        regions: o, boundingRect: function (e) {
                            for (var t, i = 0; i < e.length; i++) {
                                var n = e[i].getBoundingRect();
                                (t = t || n.clone()).union(n)
                            }
                            return t
                        }(o)
                    }
                }
            }, py = Go();

        function gy(e, t) {
            var i, n, o = e.svgXML;
            try {
                X(null != (n = (i = o && function (e, t) {
                    return (new nh).parse(e, {ignoreViewBox: !0, ignoreRootClip: !0})
                }(o) || {}).root))
            } catch (e) {
                throw new Error("Invalid svg format\n" + e.message)
            }
            var a = i.width, r = i.height, s = i.viewBoxRect;
            if (t || (t = null == a || null == r ? n.getBoundingRect() : new Di(0, 0, 0, 0), null != a && (t.width = a), null != r && (t.height = r)), s) {
                var l = ph(s, t.width, t.height), d = n;
                (n = new Ai).add(d), d.scale = l.scale, d.position = l.position
            }
            return n.setClipPath(new es({shape: t.plain()})), {root: n, boundingRect: t}
        }

        var my = {
            geoJSON: fy, svg: {
                load: function (e, t) {
                    var i = py(t).originRoot;
                    if (i) return {root: i, boundingRect: py(t).boundingRect};
                    var n = gy(t);
                    return py(t).originRoot = n.root, py(t).boundingRect = n.boundingRect, n
                }, makeGraphic: function (e, t, i) {
                    var n = py(t), o = n.rootMap || (n.rootMap = $()), a = o.get(i);
                    if (a) return a;
                    var r = n.originRoot, s = n.boundingRect;
                    return a = n.originRootHostKey ? gy(t, s).root : (n.originRootHostKey = i, r), o.set(i, a)
                }, removeGraphic: function (e, t, i) {
                    var n = py(t), o = n.rootMap;
                    o && o.removeKey(i), i === n.originRootHostKey && (n.originRootHostKey = null)
                }
            }
        }, vy = {
            load: function (e, t, i) {
                var n, o = [], a = $(), r = $();
                return D(Ty(e), function (s) {
                    var l = my[s.type].load(e, s, i);
                    D(l.regions, function (e) {
                        var i = e.name;
                        t && t.hasOwnProperty(i) && (e = e.cloneShallow(i = t[i])), o.push(e), a.set(i, e), r.set(i, e.center)
                    });
                    var d = l.boundingRect;
                    d && (n ? n.union(d) : n = d.clone())
                }), {regions: o, regionsMap: a, nameCoordMap: r, boundingRect: n || new Di(0, 0, 0, 0)}
            }, makeGraphic: yy("makeGraphic"), removeGraphic: yy("removeGraphic")
        };

        function yy(e) {
            return function (t, i) {
                var n = Ty(t), o = [];
                return D(n, function (n) {
                    var a = my[n.type][e];
                    a && o.push(a(t, n, i))
                }), o
            }
        }

        function Ty(e) {
            return mh.retrieveMap(e) || []
        }

        S(ec.extend({
            type: "series.map",
            dependencies: ["geo"],
            layoutMode: "box",
            needsDrawMap: !1,
            seriesGroup: [],
            getInitialData: function (e) {
                for (var t = Pv(this, {
                    coordDimensions: ["value"],
                    encodeDefaulter: P(zd, this)
                }), i = t.mapDimension("value"), n = $(), o = [], a = [], r = 0, s = t.count(); r < s; r++) {
                    var l = t.getName(r);
                    n.set(l, !0), o.push({name: l, value: t.get(i, r), selected: Ru(t, r, "selected")})
                }
                return D(vy.load(this.getMapType(), this.option.nameMap, this.option.nameProperty).regions, function (e) {
                    var t = e.name;
                    n.get(t) || (o.push({name: t}), a.push(t))
                }), this.updateSelectedMap(o), t.appendValues([], a), t
            },
            getHostGeoModel: function () {
                var e = this.option.geoIndex;
                return null != e ? this.dependentModels.geo[e] : null
            },
            getMapType: function () {
                return (this.getHostGeoModel() || this).option.map
            },
            getRawValue: function (e) {
                var t = this.getData();
                return t.get(t.mapDimension("value"), e)
            },
            getRegionModel: function (e) {
                var t = this.getData();
                return t.getItemModel(t.indexOfName(e))
            },
            formatTooltip: function (e) {
                for (var t = this.getData(), i = ql(this.getRawValue(e)), n = t.getName(e), o = this.seriesGroup, a = [], r = 0; r < o.length; r++) {
                    var s = o[r].originalData.indexOfName(n), l = t.mapDimension("value");
                    isNaN(o[r].originalData.get(l, s)) || a.push($l(o[r].name))
                }
                return a.join(", ") + "<br />" + $l(n + " : " + i)
            },
            getTooltipPosition: function (e) {
                if (null != e) {
                    var t = this.getData().getName(e), i = this.coordinateSystem, n = i.getRegion(t);
                    return n && i.dataToPoint(n.center)
                }
            },
            setZoom: function (e) {
                this.option.zoom = e
            },
            setCenter: function (e) {
                this.option.center = e
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "geo",
                map: "",
                left: "center",
                top: "center",
                aspectScale: .75,
                showLegendSymbol: !0,
                dataRangeHoverLink: !0,
                boundingCoords: null,
                center: null,
                zoom: 1,
                scaleLimit: null,
                label: {show: !1, color: "#000"},
                itemStyle: {borderWidth: .5, borderColor: "#444", areaColor: "#eee"},
                emphasis: {label: {show: !0, color: "rgb(100,0,0)"}, itemStyle: {areaColor: "rgba(255,215,0,0.8)"}},
                nameProperty: "name"
            }
        }), Mv);
        var wy = "\0_ec_interaction_mutex";

        function ky(e, t) {
            return !!Cy(e)[t]
        }

        function Cy(e) {
            return e[wy] || (e[wy] = {})
        }

        function by(e) {
            this.pointerChecker, this._zr = e, this._opt = {};
            var t = O, i = t(Iy, this), n = t(Sy, this), o = t(_y, this), a = t(Dy, this), r = t(Ay, this);
            Ne.call(this), this.setPointerChecker = function (e) {
                this.pointerChecker = e
            }, this.enable = function (t, s) {
                this.disable(), this._opt = w(m(s) || {}, {
                    zoomOnMouseWheel: !0,
                    moveOnMouseMove: !0,
                    moveOnMouseWheel: !1,
                    preventDefaultMouseMove: !0
                }), null == t && (t = !0), !0 !== t && "move" !== t && "pan" !== t || (e.on("mousedown", i), e.on("mousemove", n), e.on("mouseup", o)), !0 !== t && "scale" !== t && "zoom" !== t || (e.on("mousewheel", a), e.on("pinch", r))
            }, this.disable = function () {
                e.off("mousedown", i), e.off("mousemove", n), e.off("mouseup", o), e.off("mousewheel", a), e.off("pinch", r)
            }, this.dispose = this.disable, this.isDragging = function () {
                return this._dragging
            }, this.isPinching = function () {
                return this._pinching
            }
        }

        function Iy(e) {
            if (!(Xe(e) || e.target && e.target.draggable)) {
                var t = e.offsetX, i = e.offsetY;
                this.pointerChecker && this.pointerChecker(e, t, i) && (this._x = t, this._y = i, this._dragging = !0)
            }
        }

        function Sy(e) {
            if (this._dragging && Ey("moveOnMouseMove", e, this._opt) && "pinch" !== e.gestureEvent && !ky(this._zr, "globalPan")) {
                var t = e.offsetX, i = e.offsetY, n = this._x, o = this._y, a = t - n, r = i - o;
                this._x = t, this._y = i, this._opt.preventDefaultMouseMove && ze(e.event), xy(this, "pan", "moveOnMouseMove", e, {
                    dx: a,
                    dy: r,
                    oldX: n,
                    oldY: o,
                    newX: t,
                    newY: i
                })
            }
        }

        function _y(e) {
            Xe(e) || (this._dragging = !1)
        }

        function Dy(e) {
            var t = Ey("zoomOnMouseWheel", e, this._opt), i = Ey("moveOnMouseWheel", e, this._opt), n = e.wheelDelta,
                o = Math.abs(n), a = e.offsetX, r = e.offsetY;
            if (0 !== n && (t || i)) {
                if (t) {
                    var s = 3 < o ? 1.4 : 1 < o ? 1.2 : 1.1;
                    Ny(this, "zoom", "zoomOnMouseWheel", e, {scale: 0 < n ? s : 1 / s, originX: a, originY: r})
                }
                if (i) {
                    var l = Math.abs(n);
                    Ny(this, "scrollMove", "moveOnMouseWheel", e, {
                        scrollDelta: (0 < n ? 1 : -1) * (3 < l ? .4 : 1 < l ? .15 : .05),
                        originX: a,
                        originY: r
                    })
                }
            }
        }

        function Ay(e) {
            ky(this._zr, "globalPan") || Ny(this, "zoom", null, e, {
                scale: 1 < e.pinchScale ? 1.1 : 1 / 1.1,
                originX: e.pinchX,
                originY: e.pinchY
            })
        }

        function Ny(e, t, i, n, o) {
            e.pointerChecker && e.pointerChecker(n, o.originX, o.originY) && (ze(n.event), xy(e, t, i, n, o))
        }

        function xy(e, t, i, n, o) {
            o.isAvailableBehavior = O(Ey, null, i, n), e.trigger(t, o)
        }

        function Ey(e, t, i) {
            var n = i[e];
            return !e || n && (!L(n) || t.event[n + "Key"])
        }

        function Oy(e, t, i) {
            var n = e.target, o = n.position;
            o[0] += t, o[1] += i, n.dirty()
        }

        function Py(e, t, i, n) {
            var o = e.target, a = e.zoomLimit, r = o.position, s = o.scale, l = e.zoom = e.zoom || 1;
            if (l *= t, a) {
                var d = a.min || 0, u = a.max || 1 / 0;
                l = Math.max(Math.min(u, l), d)
            }
            var c = l / e.zoom;
            e.zoom = l, r[0] -= (i - r[0]) * (c - 1), r[1] -= (n - r[1]) * (c - 1), s[0] *= c, s[1] *= c, o.dirty()
        }

        ff({type: "takeGlobalCursor", event: "globalCursorTaken", update: "update"}, function () {
        }), S(by, Ne);
        var My = {axisPointer: 1, tooltip: 1, brush: 1};

        function Fy(e, t, i) {
            var n = t.getComponentByElement(e.topTarget), o = n && n.coordinateSystem;
            return n && n !== i && !My[n.mainType] && o && o.model !== i
        }

        function Ly(e) {
            var t = e.getItemStyle(), i = e.get("areaColor");
            return null != i && (t.fill = i), t
        }

        function Ry(e, t) {
            t.eachChild(function (t) {
                D(t.__regions, function (i) {
                    t.trigger(e.isSelected(i.name) ? "emphasis" : "normal")
                })
            })
        }

        function By(e, t) {
            var i = new Ai;
            this.uid = Dl("ec_map_draw"), this._controller = new by(e.getZr()), this._controllerHost = {target: t ? i : null}, this.group = i, this._updateGroup = t, this._mouseDownFlag, this._mapName, this._initialized, i.add(this._regionsGroup = new Ai), i.add(this._backgroundGroup = new Ai)
        }

        By.prototype = {
            constructor: By, draw: function (e, t, i, n, o) {
                var a = "geo" === e.mainType, r = e.getData && e.getData();
                a && t.eachComponent({mainType: "series", subType: "map"}, function (t) {
                    r || t.getHostGeoModel() !== e || (r = t.getData())
                });
                var s = e.coordinateSystem;
                this._updateBackground(s);
                var l, d = this._regionsGroup, u = this.group, c = s.getTransformInfo(), h = !d.childAt(0) || o;
                if (h) u.transform = c.roamTransform, u.decomposeTransform(), u.dirty(); else {
                    var f = new vt;
                    f.transform = c.roamTransform, f.decomposeTransform();
                    var p = {scale: f.scale, position: f.position};
                    l = f.scale, al(u, p, e)
                }
                var g = c.rawScale, m = c.rawPosition;
                d.removeAll();
                var v = ["itemStyle"], y = ["emphasis", "itemStyle"], T = ["label"], w = ["emphasis", "label"], k = $();
                D(s.regions, function (t) {
                    var i = k.get(t.name) || k.set(t.name, new Ai),
                        n = new ls({segmentIgnoreThreshold: 1, shape: {paths: []}});
                    i.add(n);
                    var o, s = (M = e.getRegionModel(t.name) || e).getModel(v), c = M.getModel(y), f = Ly(s), p = Ly(c),
                        C = M.getModel(T), b = M.getModel(w);
                    if (r) {
                        o = r.indexOfName(t.name);
                        var I = r.getItemVisual(o, "color", !0);
                        I && (f.fill = I)
                    }

                    function S(e) {
                        return [e[0] * g[0] + m[0], e[1] * g[1] + m[1]]
                    }

                    D(t.geometries, function (e) {
                        if ("polygon" === e.type) {
                            for (var t = [], i = 0; i < e.exterior.length; ++i) t.push(S(e.exterior[i]));
                            for (n.shape.paths.push(new Xr({
                                segmentIgnoreThreshold: 1,
                                shape: {points: t}
                            })), i = 0; i < (e.interiors ? e.interiors.length : 0); ++i) {
                                for (var o = e.interiors[i], a = (t = [], 0); a < o.length; ++a) t.push(S(o[a]));
                                n.shape.paths.push(new Xr({segmentIgnoreThreshold: 1, shape: {points: t}}))
                            }
                        }
                    }), n.setStyle(f), n.style.strokeNoScale = !0, n.culling = !0;
                    var _ = C.get("show"), A = b.get("show"), N = r && isNaN(r.get(r.mapDimension("value"), o)),
                        x = r && r.getItemLayout(o);
                    if (a || N && (_ || A) || x && x.showLabel) {
                        var E, O = a ? t.name : o;
                        (!r || 0 <= o) && (E = e);
                        var P = new Ur({
                            position: S(t.center.slice()),
                            scale: [1 / u.scale[0], 1 / u.scale[1]],
                            z2: 10,
                            silent: !0
                        });
                        Ys(P.style, P.hoverStyle = {}, C, b, {
                            labelFetcher: E,
                            labelDataIndex: O,
                            defaultText: t.name,
                            useInsideStyle: !1
                        }, {
                            textAlign: "center",
                            textVerticalAlign: "middle"
                        }), h || al(P, {scale: [1 / l[0], 1 / l[1]]}, e), i.add(P)
                    }
                    if (r) r.setItemGraphicEl(o, i); else {
                        var M = e.getRegionModel(t.name);
                        n.eventData = {
                            componentType: "geo",
                            componentIndex: e.componentIndex,
                            geoIndex: e.componentIndex,
                            name: t.name,
                            region: M && M.option || {}
                        }
                    }
                    (i.__regions || (i.__regions = [])).push(t), i.highDownSilentOnTouch = !!e.get("selectedMode"), Hs(i, p), d.add(i)
                }), this._updateController(e, t, i), function (e, t, i, n, o) {
                    i.off("click"), i.off("mousedown"), t.get("selectedMode") && (i.on("mousedown", function () {
                        e._mouseDownFlag = !0
                    }), i.on("click", function (a) {
                        if (e._mouseDownFlag) {
                            e._mouseDownFlag = !1;
                            for (var r = a.target; !r.__regions;) r = r.parent;
                            if (r) {
                                var s = {
                                    type: ("geo" === t.mainType ? "geo" : "map") + "ToggleSelect",
                                    batch: A(r.__regions, function (e) {
                                        return {name: e.name, from: o.uid}
                                    })
                                };
                                s[t.mainType + "Id"] = t.id, n.dispatchAction(s), Ry(t, i)
                            }
                        }
                    }))
                }(this, e, d, i, n), Ry(e, d)
            }, remove: function () {
                this._regionsGroup.removeAll(), this._backgroundGroup.removeAll(), this._controller.dispose(), this._mapName && vy.removeGraphic(this._mapName, this.uid), this._mapName = null, this._controllerHost = {}
            }, _updateBackground: function (e) {
                var t = e.map;
                this._mapName !== t && D(vy.makeGraphic(t, this.uid), function (e) {
                    this._backgroundGroup.add(e)
                }, this), this._mapName = t
            }, _updateController: function (e, t, i) {
                var n = e.coordinateSystem, o = this._controller, a = this._controllerHost;
                a.zoomLimit = e.get("scaleLimit"), a.zoom = n.getZoom(), o.enable(e.get("roam") || !1);
                var r = e.mainType;

                function s() {
                    var t = {type: "geoRoam", componentType: r};
                    return t[r + "Id"] = e.id, t
                }

                o.off("pan").on("pan", function (e) {
                    this._mouseDownFlag = !1, Oy(a, e.dx, e.dy), i.dispatchAction(T(s(), {dx: e.dx, dy: e.dy}))
                }, this), o.off("zoom").on("zoom", function (e) {
                    if (this._mouseDownFlag = !1, Py(a, e.scale, e.originX, e.originY), i.dispatchAction(T(s(), {
                        zoom: e.scale,
                        originX: e.originX,
                        originY: e.originY
                    })), this._updateGroup) {
                        var t = this.group.scale;
                        this._regionsGroup.traverse(function (e) {
                            "text" === e.type && e.attr("scale", [1 / t[0], 1 / t[1]])
                        })
                    }
                }, this), o.setPointerChecker(function (t, o, a) {
                    return n.getViewRectAfterRoam().contain(o, a) && !Fy(t, i, e)
                })
            }
        };
        var Uy = "__seriesMapHighDown", Vy = "__seriesMapCallKey";

        function Ky(e) {
            var t = this[Uy];
            t && t.recordVersion === this[Vy] && Gy(t, e)
        }

        function Gy(e, t) {
            var i = e.circle, n = e.labelModel, o = e.hoverLabelModel, a = e.emphasisText, r = e.normalText;
            t ? (i.style.extendFrom(Zs({}, o, {text: o.get("show") ? a : null}, {
                isRectText: !0,
                useInsideStyle: !1
            }, !0)), i.__mapOriginalZ2 = i.z2, i.z2 += ms) : (Zs(i.style, n, {
                text: n.get("show") ? r : null,
                textPosition: n.getShallow("position") || "bottom"
            }, {
                isRectText: !0,
                useInsideStyle: !1
            }), i.dirty(!1), null != i.__mapOriginalZ2 && (i.z2 = i.__mapOriginalZ2, i.__mapOriginalZ2 = null))
        }

        function Wy(e, t, i) {
            var n = e.getZoom(), o = e.getCenter(), a = t.zoom, r = e.dataToPoint(o);
            if (null != t.dx && null != t.dy && (r[0] -= t.dx, r[1] -= t.dy, o = e.pointToData(r), e.setCenter(o)), null != a) {
                if (i) {
                    var s = i.min || 0, l = i.max || 1 / 0;
                    a = Math.max(Math.min(n * a, l), s) / n
                }
                e.scale[0] *= a, e.scale[1] *= a;
                var d = e.position, u = (t.originX - d[0]) * (a - 1), c = (t.originY - d[1]) * (a - 1);
                d[0] -= u, d[1] -= c, e.updateTransform(), o = e.pointToData(r), e.setCenter(o), e.setZoom(a * n)
            }
            return {center: e.getCenter(), zoom: e.getZoom()}
        }

        Cf({
            type: "map", render: function (e, t, i, n) {
                if (!n || "mapToggleSelect" !== n.type || n.from !== this.uid) {
                    var o = this.group;
                    if (o.removeAll(), !e.getHostGeoModel()) {
                        if (n && "geoRoam" === n.type && "series" === n.componentType && n.seriesId === e.id) (a = this._mapDraw) && o.add(a.group); else if (e.needsDrawMap) {
                            var a = this._mapDraw || new By(i, !0);
                            o.add(a.group), a.draw(e, t, i, this, n), this._mapDraw = a
                        } else this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
                        e.get("showLegendSymbol") && t.getComponent("legend") && this._renderSymbols(e, t, i)
                    }
                }
            }, remove: function () {
                this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll()
            }, dispose: function () {
                this._mapDraw && this._mapDraw.remove(), this._mapDraw = null
            }, _renderSymbols: function (e, t, i) {
                var n = e.originalData, o = this.group;
                n.each(n.mapDimension("value"), function (t, i) {
                    if (!isNaN(t)) {
                        var a = n.getItemLayout(i);
                        if (a && a.point) {
                            var r = a.point, s = a.offset, l = new Kr({
                                style: {fill: e.getData().getVisual("color")},
                                shape: {cx: r[0] + 9 * s, cy: r[1], r: 3},
                                silent: !0,
                                z2: 8 + (s ? 0 : ms + 1)
                            });
                            if (!s) {
                                var d = e.mainSeries.getData(), u = n.getName(i), c = d.indexOfName(u),
                                    h = n.getItemModel(i), f = h.getModel("label"), p = h.getModel("emphasis.label"),
                                    g = d.getItemGraphicEl(c), m = W(e.getFormattedLabel(c, "normal"), u),
                                    v = W(e.getFormattedLabel(c, "emphasis"), m), y = g[Uy], w = Math.random();
                                if (!y) {
                                    y = g[Uy] = {};
                                    var k = P(Ky, !0), C = P(Ky, !1);
                                    g.on("mouseover", k).on("mouseout", C).on("emphasis", k).on("normal", C)
                                }
                                T(y, {
                                    recordVersion: g[Vy] = w,
                                    circle: l,
                                    labelModel: f,
                                    hoverLabelModel: p,
                                    emphasisText: v,
                                    normalText: m
                                }), Gy(y, !1)
                            }
                            o.add(l)
                        }
                    }
                })
            }
        }), ff({type: "geoRoam", event: "geoRoam", update: "updateTransform"}, function (e, t) {
            var i = e.componentType || "series";
            t.eachComponent({mainType: i, query: e}, function (t) {
                var n = t.coordinateSystem;
                if ("geo" === n.type) {
                    var o = Wy(n, e, t.get("scaleLimit"));
                    t.setCenter && t.setCenter(o.center), t.setZoom && t.setZoom(o.zoom), "series" === i && D(t.seriesGroup, function (e) {
                        e.setCenter(o.center), e.setZoom(o.zoom)
                    })
                }
            })
        });
        var jy = Ce;

        function Hy() {
            vt.call(this)
        }

        function zy(e) {
            this.name = e, this.zoomLimit, vt.call(this), this._roamTransformable = new Hy, this._rawTransformable = new Hy, this._center, this._zoom
        }

        function Xy(e, t, i, n) {
            var o = i.seriesModel, a = o ? o.coordinateSystem : null;
            return a === this ? a[e](n) : null
        }

        function qy(e, t, i, n) {
            zy.call(this, e), this.map = t;
            var o = vy.load(t, i);
            this._nameCoordMap = o.nameCoordMap, this._regionsMap = o.regionsMap, this._invertLongitute = null == n || n, this.regions = o.regions, this._rect = o.boundingRect
        }

        function Yy(e, t, i, n) {
            var o = i.geoModel, a = i.seriesModel,
                r = o ? o.coordinateSystem : a ? a.coordinateSystem || (a.getReferringComponents("geo")[0] || {}).coordinateSystem : null;
            return r === this ? r[e](n) : null
        }

        function Jy(e, t) {
            var i = e.get("boundingCoords");
            if (null != i) {
                var n = i[0], o = i[1];
                isNaN(n[0]) || isNaN(n[1]) || isNaN(o[0]) || isNaN(o[1]) || this.setBoundingRect(n[0], n[1], o[0] - n[0], o[1] - n[1])
            }
            var a, r = this.getBoundingRect(), s = e.get("layoutCenter"), l = e.get("layoutSize"), d = t.getWidth(),
                u = t.getHeight(), c = r.width / r.height * this.aspectScale, h = !1;
            if (s && l && (s = [xl(s[0], d), xl(s[1], u)], l = xl(l, Math.min(d, u)), isNaN(s[0]) || isNaN(s[1]) || isNaN(l) || (h = !0)), h) {
                var f = {};
                1 < c ? (f.width = l, f.height = l / c) : (f.height = l, f.width = l * c), f.y = s[1] - f.height / 2, f.x = s[0] - f.width / 2
            } else (a = e.getBoxLayoutParams()).aspect = c, f = md(a, {width: d, height: u});
            this.setViewRect(f.x, f.y, f.width, f.height), this.setCenter(e.get("center")), this.setZoom(e.get("zoom"))
        }

        function Zy(e, t) {
            D(t.get("geoCoord"), function (t, i) {
                e.addGeoCoord(i, t)
            })
        }

        S(Hy, vt), zy.prototype = {
            constructor: zy,
            type: "view",
            dimensions: ["x", "y"],
            setBoundingRect: function (e, t, i, n) {
                return this._rect = new Di(e, t, i, n), this._rect
            },
            getBoundingRect: function () {
                return this._rect
            },
            setViewRect: function (e, t, i, n) {
                this.transformTo(e, t, i, n), this._viewRect = new Di(e, t, i, n)
            },
            transformTo: function (e, t, i, n) {
                var o = this.getBoundingRect(), a = this._rawTransformable;
                a.transform = o.calculateTransform(new Di(e, t, i, n)), a.decomposeTransform(), this._updateTransform()
            },
            setCenter: function (e) {
                e && (this._center = e, this._updateCenterAndZoom())
            },
            setZoom: function (e) {
                e = e || 1;
                var t = this.zoomLimit;
                t && (null != t.max && (e = Math.min(t.max, e)), null != t.min && (e = Math.max(t.min, e))), this._zoom = e, this._updateCenterAndZoom()
            },
            getDefaultCenter: function () {
                var e = this.getBoundingRect();
                return [e.x + e.width / 2, e.y + e.height / 2]
            },
            getCenter: function () {
                return this._center || this.getDefaultCenter()
            },
            getZoom: function () {
                return this._zoom || 1
            },
            getRoamTransform: function () {
                return this._roamTransformable.getLocalTransform()
            },
            _updateCenterAndZoom: function () {
                var e = this._rawTransformable.getLocalTransform(), t = this._roamTransformable,
                    i = this.getDefaultCenter(), n = this.getCenter(), o = this.getZoom();
                n = Ce([], n, e), i = Ce([], i, e), t.origin = n, t.position = [i[0] - n[0], i[1] - n[1]], t.scale = [o, o], this._updateTransform()
            },
            _updateTransform: function () {
                var e = this._roamTransformable, t = this._rawTransformable;
                (t.parent = e).updateTransform(), t.updateTransform(), st(this.transform || (this.transform = []), t.transform || at()), this._rawTransform = t.getLocalTransform(), this.invTransform = this.invTransform || [], ht(this.invTransform, this.transform), this.decomposeTransform()
            },
            getTransformInfo: function () {
                var e = this._roamTransformable.transform, t = this._rawTransformable;
                return {roamTransform: e ? H(e) : at(), rawScale: H(t.scale), rawPosition: H(t.position)}
            },
            getViewRect: function () {
                return this._viewRect
            },
            getViewRectAfterRoam: function () {
                var e = this.getBoundingRect().clone();
                return e.applyTransform(this.transform), e
            },
            dataToPoint: function (e, t, i) {
                var n = t ? this._rawTransform : this.transform;
                return i = i || [], n ? jy(i, e, n) : ae(i, e)
            },
            pointToData: function (e) {
                var t = this.invTransform;
                return t ? jy([], e, t) : [e[0], e[1]]
            },
            convertToPixel: P(Xy, "dataToPoint"),
            convertFromPixel: P(Xy, "pointToData"),
            containPoint: function (e) {
                return this.getViewRectAfterRoam().contain(e[0], e[1])
            }
        }, S(zy, vt), qy.prototype = {
            constructor: qy,
            type: "geo",
            dimensions: ["lng", "lat"],
            containCoord: function (e) {
                for (var t = this.regions, i = 0; i < t.length; i++) if (t[i].contain(e)) return !0;
                return !1
            },
            transformTo: function (e, t, i, n) {
                var o = this.getBoundingRect(), a = this._invertLongitute;
                o = o.clone(), a && (o.y = -o.y - o.height);
                var r = this._rawTransformable;
                if (r.transform = o.calculateTransform(new Di(e, t, i, n)), r.decomposeTransform(), a) {
                    var s = r.scale;
                    s[1] = -s[1]
                }
                r.updateTransform(), this._updateTransform()
            },
            getRegion: function (e) {
                return this._regionsMap.get(e)
            },
            getRegionByCoord: function (e) {
                for (var t = this.regions, i = 0; i < t.length; i++) if (t[i].contain(e)) return t[i]
            },
            addGeoCoord: function (e, t) {
                this._nameCoordMap.set(e, t)
            },
            getGeoCoord: function (e) {
                return this._nameCoordMap.get(e)
            },
            getBoundingRect: function () {
                return this._rect
            },
            dataToPoint: function (e, t, i) {
                if ("string" == typeof e && (e = this.getGeoCoord(e)), e) return zy.prototype.dataToPoint.call(this, e, t, i)
            },
            convertToPixel: P(Yy, "dataToPoint"),
            convertFromPixel: P(Yy, "pointToData")
        }, S(qy, zy);
        var Qy = {
            dimensions: qy.prototype.dimensions, create: function (e, t) {
                var i = [];
                e.eachComponent("geo", function (e, n) {
                    var o = e.get("map"), a = e.get("aspectScale"), r = !0, s = mh.retrieveMap(o);
                    s && s[0] && "svg" === s[0].type ? (null == a && (a = 1), r = !1) : null == a && (a = .75);
                    var l = new qy(o + n, o, e.get("nameMap"), r);
                    l.aspectScale = a, l.zoomLimit = e.get("scaleLimit"), i.push(l), Zy(l, e), (e.coordinateSystem = l).model = e, l.resize = Jy, l.resize(e, t)
                }), e.eachSeries(function (e) {
                    if ("geo" === e.get("coordinateSystem")) {
                        var t = e.get("geoIndex") || 0;
                        e.coordinateSystem = i[t]
                    }
                });
                var n = {};
                return e.eachSeriesByType("map", function (e) {
                    if (!e.getHostGeoModel()) {
                        var t = e.getMapType();
                        n[t] = n[t] || [], n[t].push(e)
                    }
                }), D(n, function (e, n) {
                    var o = new qy(n, n, y(A(e, function (e) {
                        return e.get("nameMap")
                    })));
                    o.zoomLimit = G.apply(null, A(e, function (e) {
                        return e.get("scaleLimit")
                    })), i.push(o), o.resize = Jy, o.aspectScale = e[0].get("aspectScale"), o.resize(e[0], t), D(e, function (e) {
                        Zy(e.coordinateSystem = o, e)
                    })
                }), i
            }, getFilledRegions: function (e, t, i) {
                for (var n = (e || []).slice(), o = $(), a = 0; a < n.length; a++) o.set(n[a].name, n[a]);
                return D(vy.load(t, i).regions, function (e) {
                    var t = e.name;
                    o.get(t) || n.push({name: t})
                }), n
            }
        };
        pf("geo", Qy), gf(function (e) {
            var t = {};
            e.eachSeriesByType("map", function (i) {
                var n = i.getMapType();
                if (!i.getHostGeoModel() && !t[n]) {
                    var o = {};
                    D(i.seriesGroup, function (t) {
                        var i = t.coordinateSystem, n = t.originalData;
                        t.get("showLegendSymbol") && e.getComponent("legend") && n.each(n.mapDimension("value"), function (e, t) {
                            var a = n.getName(t), r = i.getRegion(a);
                            if (r && !isNaN(e)) {
                                var s = o[a] || 0, l = i.dataToPoint(r.center);
                                o[a] = s + 1, n.setItemLayout(t, {point: l, offset: s})
                            }
                        })
                    });
                    var a = i.getData();
                    a.each(function (e) {
                        var t = a.getName(e), i = a.getItemLayout(e) || {};
                        i.showLabel = !o[t], a.setItemLayout(e, i)
                    }), t[n] = !0
                }
            })
        }), mf(function (e) {
            e.eachSeriesByType("map", function (e) {
                var t = e.get("color"), i = e.getModel("itemStyle"), n = i.get("areaColor"),
                    o = i.get("color") || t[e.seriesIndex % t.length];
                e.getData().setVisual({areaColor: n, color: o})
            })
        }), hf(bh.PROCESSOR.STATISTIC, function (e) {
            var t = {};
            e.eachSeriesByType("map", function (e) {
                var i = e.getHostGeoModel(), n = i ? "o" + i.id : "i" + e.getMapType();
                (t[n] = t[n] || []).push(e)
            }), D(t, function (e, t) {
                for (var i = function (e, t) {
                    var i = {};
                    return D(e, function (e) {
                        e.each(e.mapDimension("value"), function (t, n) {
                            var o = "ec-" + e.getName(n);
                            i[o] = i[o] || [], isNaN(t) || i[o].push(t)
                        })
                    }), e[0].map(e[0].mapDimension("value"), function (n, o) {
                        for (var a = "ec-" + e[0].getName(o), r = 0, s = 1 / 0, l = -1 / 0, d = i[a].length, u = 0; u < d; u++) s = Math.min(s, i[a][u]), l = Math.max(l, i[a][u]), r += i[a][u];
                        return 0 === d ? NaN : "min" === t ? s : "max" === t ? l : "average" === t ? r / d : r
                    })
                }(A(e, function (e) {
                    return e.getData()
                }), e[0].get("mapValueCalculation")), n = 0; n < e.length; n++) e[n].originalData = e[n].getData();
                for (n = 0; n < e.length; n++) (e[n].seriesGroup = e)[n].needsDrawMap = 0 === n && !e[n].getHostGeoModel(), e[n].setData(i.cloneShallow()), e[n].mainSeries = e[0]
            })
        }), cf(function (e) {
            var t = [];
            D(e.series, function (e) {
                e && "map" === e.type && (t.push(e), e.map = e.map || e.mapType, w(e, e.mapLocation))
            })
        }), Kv("map", [{
            type: "mapToggleSelect",
            event: "mapselectchanged",
            method: "toggleSelected"
        }, {type: "mapSelect", event: "mapselected", method: "select"}, {
            type: "mapUnSelect",
            event: "mapunselected",
            method: "unSelect"
        }]);
        var $y = D, eT = "\0__link_datas", tT = "\0__link_mainData";

        function iT(e) {
            var t = e.mainData, i = e.datas;
            i || (i = {main: t}, e.datasAttr = {main: "data"}), e.datas = e.mainData = null, sT(t, i, e), $y(i, function (i) {
                $y(t.TRANSFERABLE_METHODS, function (t) {
                    i.wrapMethod(t, P(nT, e))
                })
            }), t.wrapMethod("cloneShallow", P(aT, e)), $y(t.CHANGABLE_METHODS, function (i) {
                t.wrapMethod(i, P(oT, e))
            }), X(i[t.dataType] === t)
        }

        function nT(e, t) {
            if (function (e) {
                return e[tT] === e
            }(this)) {
                var i = T({}, this[eT]);
                sT(i[this.dataType] = t, i, e)
            } else lT(t, this.dataType, this[tT], e);
            return t
        }

        function oT(e, t) {
            return e.struct && e.struct.update(this), t
        }

        function aT(e, t) {
            return $y(t[eT], function (i, n) {
                i !== t && lT(i.cloneShallow(), n, t, e)
            }), t
        }

        function rT(e) {
            var t = this[tT];
            return null == e || null == t ? t : t[eT][e]
        }

        function sT(e, t, i) {
            e[eT] = {}, $y(t, function (t, n) {
                lT(t, n, e, i)
            })
        }

        function lT(e, t, i, n) {
            (i[eT][t] = e)[tT] = i, e.dataType = t, n.struct && (e[n.structAttr] = n.struct, n.struct[n.datasAttr[t]] = e), e.getLinkedData = rT
        }

        function dT(e, t) {
            this.name = e || "", this.depth = 0, this.height = 0, this.parentNode = null, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.hostTree = t
        }

        function uT(e, t) {
            this.root, this.data, this._nodes = [], this.hostModel = e, this.levelModels = A(t || [], function (t) {
                return new bl(t, e, e.ecModel)
            })
        }

        function cT(e, t) {
            var i = e.isExpand ? e.children : [], n = e.parentNode.children,
                o = e.hierNode.i ? n[e.hierNode.i - 1] : null;
            if (i.length) {
                !function (e) {
                    for (var t = e.children, i = t.length, n = 0, o = 0; 0 <= --i;) {
                        var a = t[i];
                        a.hierNode.prelim += n, a.hierNode.modifier += n, o += a.hierNode.change, n += a.hierNode.shift + o
                    }
                }(e);
                var a = (i[0].hierNode.prelim + i[i.length - 1].hierNode.prelim) / 2;
                o ? (e.hierNode.prelim = o.hierNode.prelim + t(e, o), e.hierNode.modifier = e.hierNode.prelim - a) : e.hierNode.prelim = a
            } else o && (e.hierNode.prelim = o.hierNode.prelim + t(e, o));
            e.parentNode.hierNode.defaultAncestor = function (e, t, i, n) {
                if (t) {
                    for (var o = e, a = e, r = a.parentNode.children[0], s = t, l = o.hierNode.modifier, d = a.hierNode.modifier, u = r.hierNode.modifier, c = s.hierNode.modifier; s = gT(s), a = mT(a), s && a;) {
                        o = gT(o), r = mT(r), o.hierNode.ancestor = e;
                        var h = s.hierNode.prelim + c - a.hierNode.prelim - d + n(s, a);
                        0 < h && (vT((p = e, g = i, (f = s).hierNode.ancestor.parentNode === p.parentNode ? f.hierNode.ancestor : g), e, h), d += h, l += h), c += s.hierNode.modifier, d += a.hierNode.modifier, l += o.hierNode.modifier, u += r.hierNode.modifier
                    }
                    s && !gT(o) && (o.hierNode.thread = s, o.hierNode.modifier += c - l), a && !mT(r) && (r.hierNode.thread = a, r.hierNode.modifier += d - u, i = e)
                }
                var f, p, g;
                return i
            }(e, o, e.parentNode.hierNode.defaultAncestor || n[0], t)
        }

        function hT(e) {
            var t = e.hierNode.prelim + e.parentNode.hierNode.modifier;
            e.setLayout({x: t}, !0), e.hierNode.modifier += e.parentNode.hierNode.modifier
        }

        function fT(e) {
            return arguments.length ? e : yT
        }

        function pT(e, t) {
            var i = {};
            return e -= Math.PI / 2, i.x = t * Math.cos(e), i.y = t * Math.sin(e), i
        }

        function gT(e) {
            var t = e.children;
            return t.length && e.isExpand ? t[t.length - 1] : e.hierNode.thread
        }

        function mT(e) {
            var t = e.children;
            return t.length && e.isExpand ? t[0] : e.hierNode.thread
        }

        function vT(e, t, i) {
            var n = i / (t.hierNode.i - e.hierNode.i);
            t.hierNode.change -= n, t.hierNode.shift += i, t.hierNode.modifier += i, t.hierNode.prelim += i, e.hierNode.change += n
        }

        function yT(e, t) {
            return e.parentNode === t.parentNode ? 1 : 2
        }

        dT.prototype = {
            constructor: dT, isRemoved: function () {
                return this.dataIndex < 0
            }, eachNode: function (e, t, i) {
                "function" == typeof e && (i = t, t = e, e = null), L(e = e || {}) && (e = {order: e});
                var n, o = e.order || "preorder", a = this[e.attr || "children"];
                "preorder" === o && (n = t.call(i, this));
                for (var r = 0; !n && r < a.length; r++) a[r].eachNode(e, t, i);
                "postorder" === o && t.call(i, this)
            }, updateDepthAndHeight: function (e) {
                var t = 0;
                this.depth = e;
                for (var i = 0; i < this.children.length; i++) {
                    var n = this.children[i];
                    n.updateDepthAndHeight(e + 1), n.height > t && (t = n.height)
                }
                this.height = t + 1
            }, getNodeById: function (e) {
                if (this.getId() === e) return this;
                for (var t = 0, i = this.children, n = i.length; t < n; t++) {
                    var o = i[t].getNodeById(e);
                    if (o) return o
                }
            }, contains: function (e) {
                if (e === this) return !0;
                for (var t = 0, i = this.children, n = i.length; t < n; t++) {
                    var o = i[t].contains(e);
                    if (o) return o
                }
            }, getAncestors: function (e) {
                for (var t = [], i = e ? this : this.parentNode; i;) t.push(i), i = i.parentNode;
                return t.reverse(), t
            }, getValue: function (e) {
                var t = this.hostTree.data;
                return t.get(t.getDimension(e || "value"), this.dataIndex)
            }, setLayout: function (e, t) {
                0 <= this.dataIndex && this.hostTree.data.setItemLayout(this.dataIndex, e, t)
            }, getLayout: function () {
                return this.hostTree.data.getItemLayout(this.dataIndex)
            }, getModel: function (e) {
                if (!(this.dataIndex < 0)) {
                    var t = this.hostTree.data.getItemModel(this.dataIndex), i = this.getLevelModel();
                    return i ? t.getModel(e, i.getModel(e)) : t.getModel(e)
                }
            }, getLevelModel: function () {
                return (this.hostTree.levelModels || [])[this.depth]
            }, setVisual: function (e, t) {
                0 <= this.dataIndex && this.hostTree.data.setItemVisual(this.dataIndex, e, t)
            }, getVisual: function (e, t) {
                return this.hostTree.data.getItemVisual(this.dataIndex, e, t)
            }, getRawIndex: function () {
                return this.hostTree.data.getRawIndex(this.dataIndex)
            }, getId: function () {
                return this.hostTree.data.getId(this.dataIndex)
            }, isAncestorOf: function (e) {
                for (var t = e.parentNode; t;) {
                    if (t === this) return !0;
                    t = t.parentNode
                }
                return !1
            }, isDescendantOf: function (e) {
                return e !== this && e.isAncestorOf(this)
            }
        }, uT.prototype = {
            constructor: uT, type: "tree", eachNode: function (e, t, i) {
                this.root.eachNode(e, t, i)
            }, getNodeByDataIndex: function (e) {
                var t = this.data.getRawIndex(e);
                return this._nodes[t]
            }, getNodeByName: function (e) {
                return this.root.getNodeByName(e)
            }, update: function () {
                for (var e = this.data, t = this._nodes, i = 0, n = t.length; i < n; i++) t[i].dataIndex = -1;
                for (i = 0, n = e.count(); i < n; i++) t[e.getRawIndex(i)].dataIndex = i
            }, clearLayouts: function () {
                this.data.clearItemLayouts()
            }
        }, uT.createTree = function (e, t, i, n) {
            var o = new uT(t, i && i.levels), a = [], r = 1;
            !function e(t, i) {
                var n = t.value;
                r = Math.max(r, M(n) ? n.length : 1), a.push(t);
                var s = new dT(t.name, o);
                i ? function (e, t) {
                    var i = t.children;
                    e.parentNode !== t && (i.push(e), e.parentNode = t)
                }(s, i) : o.root = s, o._nodes.push(s);
                var l = t.children;
                if (l) for (var d = 0; d < l.length; d++) e(l[d], s)
            }(e), o.root.updateDepthAndHeight(0);
            var s = ep(a, {coordDimensions: ["value"], dimensionsCount: r}), l = new Vf(s, t);
            return l.initData(a), n && n(l), iT({mainData: l, struct: o, structAttr: "tree"}), o.update(), o
        }, ec.extend({
            type: "series.tree",
            layoutInfo: null,
            layoutMode: "box",
            getInitialData: function (e) {
                var t = {name: e.name, children: e.data}, i = new bl(e.leaves || {}, this, this.ecModel),
                    n = uT.createTree(t, this, {}, function (e) {
                        e.wrapMethod("getItemModel", function (e, t) {
                            var o = n.getNodeByDataIndex(t);
                            return o.children.length && o.isExpand || (e.parentModel = i), e
                        })
                    }), o = 0;
                n.eachNode("preorder", function (e) {
                    e.depth > o && (o = e.depth)
                });
                var a = e.expandAndCollapse && 0 <= e.initialTreeDepth ? e.initialTreeDepth : o;
                return n.root.eachNode("preorder", function (e) {
                    var t = e.hostTree.data.getRawDataItem(e.dataIndex);
                    e.isExpand = t && null != t.collapsed ? !t.collapsed : e.depth <= a
                }), n.data
            },
            getOrient: function () {
                var e = this.get("orient");
                return "horizontal" === e ? e = "LR" : "vertical" === e && (e = "TB"), e
            },
            setZoom: function (e) {
                this.option.zoom = e
            },
            setCenter: function (e) {
                this.option.center = e
            },
            formatTooltip: function (e) {
                for (var t = this.getData().tree, i = t.root.children[0], n = t.getNodeByDataIndex(e), o = n.getValue(), a = n.name; n && n !== i;) a = n.parentNode.name + "." + a, n = n.parentNode;
                return $l(a + (isNaN(o) || null == o ? "" : " : " + o))
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "view",
                left: "12%",
                top: "12%",
                right: "12%",
                bottom: "12%",
                layout: "orthogonal",
                edgeShape: "curve",
                edgeForkPosition: "50%",
                roam: !1,
                nodeScaleRatio: .4,
                center: null,
                zoom: 1,
                orient: "LR",
                symbol: "emptyCircle",
                symbolSize: 7,
                expandAndCollapse: !0,
                initialTreeDepth: 2,
                lineStyle: {color: "#ccc", width: 1.5, curveness: .5},
                itemStyle: {color: "lightsteelblue", borderColor: "#c23531", borderWidth: 1.5},
                label: {show: !0, color: "#555"},
                leaves: {label: {show: !0}},
                animationEasing: "linear",
                animationDuration: 700,
                animationDurationUpdate: 1e3
            }
        });
        var TT = bs({
            shape: {parentPoint: [], childPoints: [], orient: "", forkPosition: ""},
            style: {stroke: "#000", fill: null},
            buildPath: function (e, t) {
                var i = t.childPoints, n = i.length, o = t.parentPoint, a = i[0], r = i[n - 1];
                if (1 === n) return e.moveTo(o[0], o[1]), void e.lineTo(a[0], a[1]);
                var s = t.orient, l = "TB" === s || "BT" === s ? 0 : 1, d = 1 - l, u = xl(t.forkPosition, 1), c = [];
                c[l] = o[l], c[d] = o[d] + (r[d] - o[d]) * u, e.moveTo(o[0], o[1]), e.lineTo(c[0], c[1]), e.moveTo(a[0], a[1]), c[l] = a[l], e.lineTo(c[0], c[1]), c[l] = r[l], e.lineTo(c[0], c[1]), e.lineTo(r[0], r[1]);
                for (var h = 1; h < n - 1; h++) {
                    var f = i[h];
                    e.moveTo(f[0], f[1]), c[l] = f[l], e.lineTo(c[0], c[1])
                }
            }
        });

        function wT(e, t) {
            var i = e.getItemLayout(t);
            return i && !isNaN(i.x) && !isNaN(i.y) && "none" !== e.getItemVisual(t, "symbol")
        }

        function kT(e, t, i) {
            return i.itemModel = t, i.itemStyle = t.getModel("itemStyle").getItemStyle(), i.hoverItemStyle = t.getModel("emphasis.itemStyle").getItemStyle(), i.lineStyle = t.getModel("lineStyle").getLineStyle(), i.labelModel = t.getModel("label"), i.hoverLabelModel = t.getModel("emphasis.label"), !1 === e.isExpand && 0 !== e.children.length ? i.symbolInnerColor = i.itemStyle.fill : i.symbolInnerColor = "#fff", i
        }

        function CT(e, t, i, n, o, a) {
            var r = !i, s = e.tree.getNodeByDataIndex(t), l = s.getModel(), d = (a = kT(s, l, a), e.tree.root),
                u = s.parentNode === d ? s : s.parentNode || s, c = e.getItemGraphicEl(u.dataIndex), h = u.getLayout(),
                f = c ? {x: c.position[0], y: c.position[1], rawX: c.__radialOldRawX, rawY: c.__radialOldRawY} : h,
                p = s.getLayout();
            r ? (i = new Mg(e, t, a)).attr("position", [f.x, f.y]) : i.updateData(e, t, a), i.__radialOldRawX = i.__radialRawX, i.__radialOldRawY = i.__radialRawY, i.__radialRawX = p.rawX, i.__radialRawY = p.rawY, n.add(i), e.setItemGraphicEl(t, i), al(i, {position: [p.x, p.y]}, o);
            var g = i.getSymbolPath();
            if ("radial" === a.layout) {
                var m, v, y = d.children[0], T = y.getLayout(), k = y.children.length;
                if (p.x === T.x && !0 === s.isExpand) {
                    var C = {};
                    C.x = (y.children[0].getLayout().x + y.children[k - 1].getLayout().x) / 2, C.y = (y.children[0].getLayout().y + y.children[k - 1].getLayout().y) / 2, (m = Math.atan2(C.y - T.y, C.x - T.x)) < 0 && (m = 2 * Math.PI + m), (v = C.x < T.x) && (m -= Math.PI)
                } else (m = Math.atan2(p.y - T.y, p.x - T.x)) < 0 && (m = 2 * Math.PI + m), 0 === s.children.length || 0 !== s.children.length && !1 === s.isExpand ? (v = p.x < T.x) && (m -= Math.PI) : (v = p.x > T.x) || (m -= Math.PI);
                var b = v ? "left" : "right", I = a.labelModel.get("rotate"), S = I * (Math.PI / 180);
                g.setStyle({
                    textPosition: a.labelModel.get("position") || b,
                    textRotation: null == I ? -m : S,
                    textOrigin: "center",
                    verticalAlign: "middle"
                })
            }
            !function (e, t, i, n, o, a, r, s, l) {
                var d = l.edgeShape, u = n.__edge;
                if ("curve" === d) t.parentNode && t.parentNode !== i && al(u = u || (n.__edge = new rs({
                    shape: IT(l, o, o),
                    style: w({opacity: 0, strokeNoScale: !0}, l.lineStyle)
                })), {
                    shape: IT(l, a, r),
                    style: {opacity: 1}
                }, e); else if ("polyline" === d && "orthogonal" === l.layout && t !== i && t.children && 0 !== t.children.length && !0 === t.isExpand) {
                    for (var c = t.children, h = [], f = 0; f < c.length; f++) {
                        var p = c[f].getLayout();
                        h.push([p.x, p.y])
                    }
                    al(u = u || (n.__edge = new TT({
                        shape: {
                            parentPoint: [r.x, r.y],
                            childPoints: [[r.x, r.y]],
                            orient: l.orient,
                            forkPosition: l.edgeForkPosition
                        }, style: w({opacity: 0, strokeNoScale: !0}, l.lineStyle)
                    })), {shape: {parentPoint: [r.x, r.y], childPoints: h}, style: {opacity: 1}}, e)
                }
                s.add(u)
            }(o, s, d, i, f, h, p, n, a)
        }

        function bT(e, t, i, n, o, a) {
            for (var r, s = e.tree.getNodeByDataIndex(t), l = e.tree.root, d = s.getModel(), u = (a = kT(s, d, a), s.parentNode === l ? s : s.parentNode || s), c = a.edgeShape; null == (r = u.getLayout());) u = u.parentNode === l ? u : u.parentNode || u;
            al(i, {position: [r.x + 1, r.y + 1]}, o, function () {
                n.remove(i), e.setItemGraphicEl(t, null)
            }), i.fadeOut(null, {keepLabel: !0});
            var h = e.getItemGraphicEl(u.dataIndex).__edge,
                f = i.__edge || (!1 === u.isExpand || 1 === u.children.length ? h : void 0);
            c = a.edgeShape, f && ("curve" === c ? al(f, {shape: IT(a, r, r), style: {opacity: 0}}, o, function () {
                n.remove(f)
            }) : "polyline" === c && "orthogonal" === a.layout && al(f, {
                shape: {
                    parentPoint: [r.x, r.y],
                    childPoints: [[r.x, r.y]]
                }, style: {opacity: 0}
            }, o, function () {
                n.remove(f)
            }))
        }

        function IT(e, t, i) {
            var n, o, a, r, s, l, d, u, c = e.orient;
            if ("radial" !== e.layout) return s = t.x, d = t.y, l = i.x, u = i.y, "LR" !== c && "RL" !== c || (n = s + (l - s) * e.curvature, o = d, a = l + (s - l) * e.curvature, r = u), "TB" !== c && "BT" !== c || (n = s, o = d + (u - d) * e.curvature, a = l, r = u + (d - u) * e.curvature), {
                x1: s,
                y1: d,
                x2: l,
                y2: u,
                cpx1: n,
                cpy1: o,
                cpx2: a,
                cpy2: r
            };
            s = t.rawX, d = t.rawY, l = i.rawX, u = i.rawY;
            var h = pT(s, d), f = pT(s, d + (u - d) * e.curvature), p = pT(l, u + (d - u) * e.curvature), g = pT(l, u);
            return {x1: h.x, y1: h.y, x2: g.x, y2: g.y, cpx1: f.x, cpy1: f.y, cpx2: p.x, cpy2: p.y}
        }

        function ST(e, t) {
            for (var i, n = [e]; i = n.pop();) if (t(i), i.isExpand) {
                var o = i.children;
                if (o.length) for (var a = o.length - 1; 0 <= a; a--) n.push(o[a])
            }
        }

        function _T(e, t, i) {
            if (e && 0 <= b(t, e.type)) {
                var n = i.getData().tree.root, o = e.targetNode;
                if ("string" == typeof o && (o = n.getNodeById(o)), o && n.contains(o)) return {node: o};
                var a = e.targetNodeId;
                if (null != a && (o = n.getNodeById(a))) return {node: o}
            }
        }

        function DT(e) {
            for (var t = []; e;) (e = e.parentNode) && t.push(e);
            return t.reverse()
        }

        function AT(e, t) {
            return 0 <= b(DT(e), t)
        }

        function NT(e, t) {
            for (var i = []; e;) {
                var n = e.dataIndex;
                i.push({name: e.name, dataIndex: n, value: t.getRawValue(n)}), e = e.parentNode
            }
            return i.reverse(), i
        }

        Cf({
            type: "tree", init: function (e, t) {
                this._oldTree, this._mainGroup = new Ai, this._controller = new by(t.getZr()), this._controllerHost = {target: this.group}, this.group.add(this._mainGroup)
            }, render: function (e, t, i, n) {
                var o = e.getData(), a = e.layoutInfo, r = this._mainGroup, s = e.get("layout");
                "radial" === s ? r.attr("position", [a.x + a.width / 2, a.y + a.height / 2]) : r.attr("position", [a.x, a.y]), this._updateViewCoordSys(e, a, s), this._updateController(e, t, i);
                var l = this._data, d = {
                    expandAndCollapse: e.get("expandAndCollapse"),
                    layout: s,
                    edgeShape: e.get("edgeShape"),
                    edgeForkPosition: e.get("edgeForkPosition"),
                    orient: e.getOrient(),
                    curvature: e.get("lineStyle.curveness"),
                    symbolRotate: e.get("symbolRotate"),
                    symbolOffset: e.get("symbolOffset"),
                    hoverAnimation: e.get("hoverAnimation"),
                    useNameLabel: !0,
                    fadeIn: !0
                };
                o.diff(l).add(function (t) {
                    wT(o, t) && CT(o, t, null, r, e, d)
                }).update(function (t, i) {
                    var n = l.getItemGraphicEl(i);
                    wT(o, t) ? CT(o, t, n, r, e, d) : n && bT(l, i, n, r, e, d)
                }).remove(function (t) {
                    var i = l.getItemGraphicEl(t);
                    i && bT(l, t, i, r, e, d)
                }).execute(), this._nodeScaleRatio = e.get("nodeScaleRatio"), this._updateNodeAndLinkScale(e), !0 === d.expandAndCollapse && o.eachItemGraphicEl(function (t, n) {
                    t.off("click").on("click", function () {
                        i.dispatchAction({type: "treeExpandAndCollapse", seriesId: e.id, dataIndex: n})
                    })
                }), this._data = o
            }, _updateViewCoordSys: function (e) {
                var t = e.getData(), i = [];
                t.each(function (e) {
                    var n = t.getItemLayout(e);
                    !n || isNaN(n.x) || isNaN(n.y) || i.push([+n.x, +n.y])
                });
                var n = [], o = [];
                La(i, n, o);
                var a = this._min, r = this._max;
                o[0] - n[0] == 0 && (n[0] = a ? a[0] : n[0] - 1, o[0] = r ? r[0] : o[0] + 1), o[1] - n[1] == 0 && (n[1] = a ? a[1] : n[1] - 1, o[1] = r ? r[1] : o[1] + 1);
                var s = e.coordinateSystem = new zy;
                s.zoomLimit = e.get("scaleLimit"), s.setBoundingRect(n[0], n[1], o[0] - n[0], o[1] - n[1]), s.setCenter(e.get("center")), s.setZoom(e.get("zoom")), this.group.attr({
                    position: s.position,
                    scale: s.scale
                }), this._viewCoordSys = s, this._min = n, this._max = o
            }, _updateController: function (e, t, i) {
                var n = this._controller, o = this._controllerHost, a = this.group;
                n.setPointerChecker(function (t, n, o) {
                    var r = a.getBoundingRect();
                    return r.applyTransform(a.transform), r.contain(n, o) && !Fy(t, i, e)
                }), n.enable(e.get("roam")), o.zoomLimit = e.get("scaleLimit"), o.zoom = e.coordinateSystem.getZoom(), n.off("pan").off("zoom").on("pan", function (t) {
                    Oy(o, t.dx, t.dy), i.dispatchAction({seriesId: e.id, type: "treeRoam", dx: t.dx, dy: t.dy})
                }, this).on("zoom", function (t) {
                    Py(o, t.scale, t.originX, t.originY), i.dispatchAction({
                        seriesId: e.id,
                        type: "treeRoam",
                        zoom: t.scale,
                        originX: t.originX,
                        originY: t.originY
                    }), this._updateNodeAndLinkScale(e)
                }, this)
            }, _updateNodeAndLinkScale: function (e) {
                var t = e.getData(), i = this._getNodeGlobalScale(e), n = [i, i];
                t.eachItemGraphicEl(function (e, t) {
                    e.attr("scale", n)
                })
            }, _getNodeGlobalScale: function (e) {
                var t = e.coordinateSystem;
                if ("view" !== t.type) return 1;
                var i = this._nodeScaleRatio, n = t.scale, o = n && n[0] || 1;
                return ((t.getZoom() - 1) * i + 1) / o
            }, dispose: function () {
                this._controller && this._controller.dispose(), this._controllerHost = {}
            }, remove: function () {
                this._mainGroup.removeAll(), this._data = null
            }
        }), ff({type: "treeExpandAndCollapse", event: "treeExpandAndCollapse", update: "update"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "tree", query: e}, function (t) {
                var i = e.dataIndex, n = t.getData().tree.getNodeByDataIndex(i);
                n.isExpand = !n.isExpand
            })
        }), ff({type: "treeRoam", event: "treeRoam", update: "none"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "tree", query: e}, function (t) {
                var i = Wy(t.coordinateSystem, e);
                t.setCenter && t.setCenter(i.center), t.setZoom && t.setZoom(i.zoom)
            })
        }), mf(vm("tree", "circle")), gf(function (e, t) {
            e.eachSeriesByType("tree", function (e) {
                !function (e, t) {
                    var i = function (e, t) {
                        return md(e.getBoxLayoutParams(), {width: t.getWidth(), height: t.getHeight()})
                    }(e, t);
                    e.layoutInfo = i;
                    var n = e.get("layout"), o = 0, a = 0, r = null;
                    r = "radial" === n ? (o = 2 * Math.PI, a = Math.min(i.height, i.width) / 2, fT(function (e, t) {
                        return (e.parentNode === t.parentNode ? 1 : 2) / e.depth
                    })) : (o = i.width, a = i.height, fT());
                    var s = e.getData().tree.root, l = s.children[0];
                    if (l) {
                        !function (e) {
                            e.hierNode = {
                                defaultAncestor: null,
                                ancestor: e,
                                prelim: 0,
                                modifier: 0,
                                change: 0,
                                shift: 0,
                                i: 0,
                                thread: null
                            };
                            for (var t, i, n = [e]; t = n.pop();) if (i = t.children, t.isExpand && i.length) for (var o = i.length - 1; 0 <= o; o--) {
                                var a = i[o];
                                a.hierNode = {
                                    defaultAncestor: null,
                                    ancestor: a,
                                    prelim: 0,
                                    modifier: 0,
                                    change: 0,
                                    shift: 0,
                                    i: o,
                                    thread: null
                                }, n.push(a)
                            }
                        }(s), function (e, t, i) {
                            for (var n, o = [e], a = []; n = o.pop();) if (a.push(n), n.isExpand) {
                                var r = n.children;
                                if (r.length) for (var s = 0; s < r.length; s++) o.push(r[s])
                            }
                            for (; n = a.pop();) t(n, i)
                        }(l, cT, r), s.hierNode.modifier = -l.hierNode.prelim, ST(l, hT);
                        var d = l, u = l, c = l;
                        ST(l, function (e) {
                            var t = e.getLayout().x;
                            t < d.getLayout().x && (d = e), t > u.getLayout().x && (u = e), e.depth > c.depth && (c = e)
                        });
                        var h = d === u ? 1 : r(d, u) / 2, f = h - d.getLayout().x, p = 0, g = 0, m = 0, v = 0;
                        if ("radial" === n) p = o / (u.getLayout().x + h + f), g = a / (c.depth - 1 || 1), ST(l, function (e) {
                            m = (e.getLayout().x + f) * p, v = (e.depth - 1) * g;
                            var t = pT(m, v);
                            e.setLayout({x: t.x, y: t.y, rawX: m, rawY: v}, !0)
                        }); else {
                            var y = e.getOrient();
                            "RL" === y || "LR" === y ? (g = a / (u.getLayout().x + h + f), p = o / (c.depth - 1 || 1), ST(l, function (e) {
                                v = (e.getLayout().x + f) * g, m = "LR" === y ? (e.depth - 1) * p : o - (e.depth - 1) * p, e.setLayout({
                                    x: m,
                                    y: v
                                }, !0)
                            })) : "TB" !== y && "BT" !== y || (p = o / (u.getLayout().x + h + f), g = a / (c.depth - 1 || 1), ST(l, function (e) {
                                m = (e.getLayout().x + f) * p, v = "TB" === y ? (e.depth - 1) * g : a - (e.depth - 1) * g, e.setLayout({
                                    x: m,
                                    y: v
                                }, !0)
                            }))
                        }
                    }
                }(e, t)
            })
        }), ec.extend({
            type: "series.treemap",
            layoutMode: "box",
            dependencies: ["grid", "polar"],
            preventUsingHoverLayer: !0,
            _viewRoot: null,
            defaultOption: {
                progressive: 0,
                left: "center",
                top: "middle",
                right: null,
                bottom: null,
                width: "80%",
                height: "80%",
                sort: !0,
                clipWindow: "origin",
                squareRatio: .5 * (1 + Math.sqrt(5)),
                leafDepth: null,
                drillDownIcon: "▶",
                zoomToNodeRatio: .1024,
                roam: !0,
                nodeClick: "zoomToNode",
                animation: !0,
                animationDurationUpdate: 900,
                animationEasing: "quinticInOut",
                breadcrumb: {
                    show: !0,
                    height: 22,
                    left: "center",
                    top: "bottom",
                    emptyItemWidth: 25,
                    itemStyle: {
                        color: "rgba(0,0,0,0.7)",
                        borderColor: "rgba(255,255,255,0.7)",
                        borderWidth: 1,
                        shadowColor: "rgba(150,150,150,1)",
                        shadowBlur: 3,
                        shadowOffsetX: 0,
                        shadowOffsetY: 0,
                        textStyle: {color: "#fff"}
                    },
                    emphasis: {textStyle: {}}
                },
                label: {show: !0, distance: 0, padding: 5, position: "inside", color: "#fff", ellipsis: !0},
                upperLabel: {
                    show: !1,
                    position: [0, "50%"],
                    height: 20,
                    color: "#fff",
                    ellipsis: !0,
                    verticalAlign: "middle"
                },
                itemStyle: {
                    color: null,
                    colorAlpha: null,
                    colorSaturation: null,
                    borderWidth: 0,
                    gapWidth: 0,
                    borderColor: "#fff",
                    borderColorSaturation: null
                },
                emphasis: {
                    upperLabel: {
                        show: !0,
                        position: [0, "50%"],
                        color: "#fff",
                        ellipsis: !0,
                        verticalAlign: "middle"
                    }
                },
                visualDimension: 0,
                visualMin: null,
                visualMax: null,
                color: [],
                colorAlpha: null,
                colorSaturation: null,
                colorMappingBy: "index",
                visibleMin: 10,
                childrenVisibleMin: null,
                levels: []
            },
            getInitialData: function (e, t) {
                var i = {name: e.name, children: e.data};
                !function e(t) {
                    var i = 0;
                    D(t.children, function (t) {
                        e(t);
                        var n = t.value;
                        M(n) && (n = n[0]), i += n
                    });
                    var n = t.value;
                    M(n) && (n = n[0]), null != n && !isNaN(n) || (n = i), n < 0 && (n = 0), M(t.value) ? t.value[0] = n : t.value = n
                }(i);
                var n = e.levels || [], o = A((n = e.levels = function (e, t) {
                    var i, n = t.get("color");
                    if (n) return D(e = e || [], function (e) {
                        var t = new bl(e), n = t.get("color");
                        (t.get("itemStyle.color") || n && "none" !== n) && (i = !0)
                    }), i || ((e[0] || (e[0] = {})).color = n.slice()), e
                }(n, t)) || [], function (e) {
                    return new bl(e, this, t)
                }, this), a = uT.createTree(i, this, null, function (e) {
                    e.wrapMethod("getItemModel", function (e, t) {
                        var i = a.getNodeByDataIndex(t), n = o[i.depth];
                        return n && (e.parentModel = n), e
                    })
                });
                return a.data
            },
            optionUpdated: function () {
                this.resetViewRoot()
            },
            formatTooltip: function (e) {
                var t = this.getData(), i = this.getRawValue(e), n = M(i) ? ql(i[0]) : ql(i);
                return $l(t.getName(e) + ": " + n)
            },
            getDataParams: function (e) {
                var t = ec.prototype.getDataParams.apply(this, arguments),
                    i = this.getData().tree.getNodeByDataIndex(e);
                return t.treePathInfo = NT(i, this), t
            },
            setLayoutInfo: function (e) {
                this.layoutInfo = this.layoutInfo || {}, T(this.layoutInfo, e)
            },
            mapIdToIndex: function (e) {
                var t = this._idIndexMap;
                t || (t = this._idIndexMap = $(), this._idIndexMapCount = 0);
                var i = t.get(e);
                return null == i && t.set(e, i = this._idIndexMapCount++), i
            },
            getViewRoot: function () {
                return this._viewRoot
            },
            resetViewRoot: function (e) {
                e ? this._viewRoot = e : e = this._viewRoot;
                var t = this.getRawData().tree.root;
                e && (e === t || t.contains(e)) || (this._viewRoot = t)
            }
        });
        var xT = 5;

        function ET(e) {
            this.group = new Ai, e.add(this.group)
        }

        function OT(e, t, i, n, o, a) {
            var r = [[o ? e : e - xT, t], [e + i, t], [e + i, t + n], [o ? e : e - xT, t + n]];
            return a || r.splice(2, 0, [e + i + xT, t + n / 2]), o || r.push([e, t + n / 2]), r
        }

        function PT(e) {
            var t = WT(e);
            return t.stroke = t.fill = t.lineWidth = null, t
        }

        ET.prototype = {
            constructor: ET, render: function (e, t, i, n) {
                var o = e.getModel("breadcrumb"), a = this.group;
                if (a.removeAll(), o.get("show") && i) {
                    var r = o.getModel("itemStyle"), s = r.getModel("textStyle"), l = {
                        pos: {
                            left: o.get("left"),
                            right: o.get("right"),
                            top: o.get("top"),
                            bottom: o.get("bottom")
                        },
                        box: {width: t.getWidth(), height: t.getHeight()},
                        emptyItemWidth: o.get("emptyItemWidth"),
                        totalWidth: 0,
                        renderList: []
                    };
                    this._prepare(i, l, s), this._renderContent(e, l, r, s, n), vd(a, l.pos, l.box)
                }
            }, _prepare: function (e, t, i) {
                for (var n = e; n; n = n.parentNode) {
                    var o = n.getModel().get("name"), a = i.getTextRect(o),
                        r = Math.max(a.width + 16, t.emptyItemWidth);
                    t.totalWidth += r + 8, t.renderList.push({node: n, text: o, width: r})
                }
            }, _renderContent: function (e, t, i, n, o) {
                for (var a, r, s = 0, l = t.emptyItemWidth, d = e.get("breadcrumb.height"), u = function (e, t, i) {
                    var n = t.width, o = t.height, a = xl(e.x, n), r = xl(e.y, o), s = xl(e.x2, n), l = xl(e.y2, o);
                    return (isNaN(a) || isNaN(parseFloat(e.x))) && (a = 0), (isNaN(s) || isNaN(parseFloat(e.x2))) && (s = n), (isNaN(r) || isNaN(parseFloat(e.y))) && (r = 0), (isNaN(l) || isNaN(parseFloat(e.y2))) && (l = o), i = Jl(i || 0), {
                        width: Math.max(s - a - i[1] - i[3], 0),
                        height: Math.max(l - r - i[0] - i[2], 0)
                    }
                }(t.pos, t.box), c = t.totalWidth, h = t.renderList, f = h.length - 1; 0 <= f; f--) {
                    var p = h[f], g = p.node, m = p.width, v = p.text;
                    c > u.width && (c -= m - l, m = l, v = null);
                    var y = new Xr({
                        shape: {points: OT(s, 0, m, d, f === h.length - 1, 0 === f)},
                        style: w(i.getItemStyle(), {
                            lineJoin: "bevel",
                            text: v,
                            textFill: n.getTextColor(),
                            textFont: n.getFont()
                        }),
                        z: 10,
                        onclick: P(o, g)
                    });
                    this.group.add(y), a = e, r = g, y.eventData = {
                        componentType: "series",
                        componentSubType: "treemap",
                        componentIndex: a.componentIndex,
                        seriesIndex: a.componentIndex,
                        seriesName: a.name,
                        seriesType: "treemap",
                        selfType: "breadcrumb",
                        nodeData: {dataIndex: r && r.dataIndex, name: r && r.name},
                        treePathInfo: r && NT(r, a)
                    }, s += m + 8
                }
            }, remove: function () {
                this.group.removeAll()
            }
        };
        var MT = O, FT = Ai, LT = es, RT = D, BT = ["label"], UT = ["emphasis", "label"], VT = ["upperLabel"],
            KT = ["emphasis", "upperLabel"], GT = 10,
            WT = oa([["fill", "color"], ["stroke", "strokeColor"], ["lineWidth", "strokeWidth"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]);

        function jT(e, t, i, n, o, a, r, s, l, d) {
            if (r) {
                var u = r.getLayout(), c = e.getData();
                if (c.setItemGraphicEl(r.dataIndex, null), u && u.isInView) {
                    var h = u.width, f = u.height, p = u.borderWidth, g = u.invisible, v = r.getRawIndex(),
                        y = s && s.getRawIndex(), w = r.viewChildren, k = u.upperHeight, C = w && w.length,
                        b = r.getModel("itemStyle"), I = r.getModel("emphasis.itemStyle"), S = O("nodeGroup", FT);
                    if (S) {
                        if (l.add(S), S.attr("position", [u.x || 0, u.y || 0]), S.__tmNodeWidth = h, S.__tmNodeHeight = f, u.isAboveViewRoot) return S;
                        var _ = r.getModel(), D = O("background", LT, d, 1);
                        if (D && function (t, i, n) {
                            if (i.dataIndex = r.dataIndex, i.seriesIndex = e.seriesIndex, i.setShape({
                                x: 0,
                                y: 0,
                                width: h,
                                height: f
                            }), g) N(i); else {
                                i.invisible = !1;
                                var o = r.getVisual("borderColor", !0), a = I.get("borderColor"), s = PT(b);
                                s.fill = o;
                                var l = WT(I);
                                if (l.fill = a, n) {
                                    var d = h - 2 * p;
                                    x(s, l, o, d, k, {x: p, y: 0, width: d, height: k})
                                } else s.text = l.text = null;
                                i.setStyle(s), Us(i, l)
                            }
                            t.add(i)
                        }(S, D, C && u.upperLabelHeight), C) Xs(S) && zs(S, !1), D && (zs(D, !0), c.setItemGraphicEl(r.dataIndex, D)); else {
                            var A = O("content", LT, d, 2);
                            A && function (t, i) {
                                i.dataIndex = r.dataIndex, i.seriesIndex = e.seriesIndex;
                                var n = Math.max(h - 2 * p, 0), o = Math.max(f - 2 * p, 0);
                                if (i.culling = !0, i.setShape({x: p, y: p, width: n, height: o}), g) N(i); else {
                                    i.invisible = !1;
                                    var a = r.getVisual("color", !0), s = PT(b);
                                    s.fill = a;
                                    var l = WT(I);
                                    x(s, l, a, n, o), i.setStyle(s), Us(i, l)
                                }
                                t.add(i)
                            }(S, A), D && Xs(D) && zs(D, !1), zs(S, !0), c.setItemGraphicEl(r.dataIndex, S)
                        }
                        return S
                    }
                }
            }

            function N(e) {
                e.invisible || a.push(e)
            }

            function x(t, i, n, o, a, s) {
                var l = _.get("name"), d = _.getModel(s ? VT : BT), c = _.getModel(s ? KT : UT),
                    h = d.getShallow("show");
                Ys(t, i, d, c, {
                    defaultText: h ? l : null,
                    autoColor: n,
                    isRectText: !0,
                    labelFetcher: e,
                    labelDataIndex: r.dataIndex,
                    labelProp: s ? "upperLabel" : "label"
                }), E(t, s, u), E(i, s, u), s && (t.textRect = m(s)), t.truncate = h && d.get("ellipsis") ? {
                    outerWidth: o,
                    outerHeight: a,
                    minChar: 2
                } : null
            }

            function E(t, i, n) {
                var o = t.text;
                if (!i && n.isLeafRoot && null != o) {
                    var a = e.get("drillDownIcon", !0);
                    t.text = a ? a + " " + o : o
                }
            }

            function O(e, a, s, l) {
                var d = null != y && i[e][y], u = o[e];
                return d ? (i[e][y] = null, function (e, t, i) {
                    (e[v] = {}).old = "nodeGroup" === i ? t.position.slice() : T({}, t.shape)
                }(u, d, e)) : g || ((d = new a({
                    z: function (e, t) {
                        var i = e * GT + t;
                        return (i - 1) / i
                    }(s, l)
                })).__tmDepth = s, function (e, t, i) {
                    var a = e[v] = {}, s = r.parentNode;
                    if (s && (!n || "drillDown" === n.direction)) {
                        var l = 0, d = 0, u = o.background[s.getRawIndex()];
                        !n && u && u.old && (l = u.old.width, d = u.old.height), a.old = "nodeGroup" === i ? [0, d] : {
                            x: l,
                            y: d,
                            width: 0,
                            height: 0
                        }
                    }
                    a.fadein = "nodeGroup" !== i
                }(u, 0, d.__tmStorageName = e)), t[e][v] = d
            }
        }

        Cf({
            type: "treemap", init: function (e, t) {
                this._containerGroup, this._storage = {
                    nodeGroup: [],
                    background: [],
                    content: []
                }, this._oldTree, this._breadcrumb, this._controller, this._state = "ready"
            }, render: function (e, t, i, n) {
                if (!(b(t.findComponents({mainType: "series", subType: "treemap", query: n}), e) < 0)) {
                    this.seriesModel = e, this.api = i, this.ecModel = t;
                    var o = _T(n, ["treemapZoomToNode", "treemapRootToNode"], e), a = n && n.type, r = e.layoutInfo,
                        s = !this._oldTree, l = this._storage, d = "treemapRootToNode" === a && o && l ? {
                            rootNodeGroup: l.nodeGroup[o.node.getRawIndex()],
                            direction: n.direction
                        } : null, u = this._giveContainerGroup(r), c = this._doRender(u, e, d);
                    s || a && "treemapZoomToNode" !== a && "treemapRootToNode" !== a ? c.renderFinally() : this._doAnimation(u, c, e, d), this._resetController(i), this._renderBreadcrumb(e, i, o)
                }
            }, _giveContainerGroup: function (e) {
                var t = this._containerGroup;
                return t || (t = this._containerGroup = new FT, this._initEvents(t), this.group.add(t)), t.attr("position", [e.x, e.y]), t
            }, _doRender: function (e, t, i) {
                var n = t.getData().tree, o = this._oldTree, a = {nodeGroup: [], background: [], content: []},
                    r = {nodeGroup: [], background: [], content: []}, s = this._storage, l = [],
                    d = P(jT, t, r, s, i, a, l);
                !function e(t, i, n, o, a) {
                    function r(e) {
                        return e.getId()
                    }

                    function s(r, s) {
                        var l = null != r ? t[r] : null, u = null != s ? i[s] : null, c = d(l, u, n, a);
                        c && e(l && l.viewChildren || [], u && u.viewChildren || [], c, o, a + 1)
                    }

                    o ? RT(i = t, function (e, t) {
                        e.isRemoved() || s(t, t)
                    }) : new If(i, t, r, r).add(s).update(s).remove(P(s, null)).execute()
                }(n.root ? [n.root] : [], o && o.root ? [o.root] : [], e, n === o || !o, 0);
                var u, c, h = (c = {nodeGroup: [], background: [], content: []}, (u = s) && RT(u, function (e, t) {
                    var i = c[t];
                    RT(e, function (e) {
                        e && (i.push(e), e.__tmWillDelete = 1)
                    })
                }), c);
                return this._oldTree = n, this._storage = r, {
                    lastsForAnimation: a,
                    willDeleteEls: h,
                    renderFinally: function () {
                        RT(h, function (e) {
                            RT(e, function (e) {
                                e.parent && e.parent.remove(e)
                            })
                        }), RT(l, function (e) {
                            e.invisible = !0, e.dirty()
                        })
                    }
                }
            }, _doAnimation: function (e, t, i, n) {
                if (i.get("animation")) {
                    var o = i.get("animationDurationUpdate"), a = i.get("animationEasing"), r = function () {
                        var e, t = [], i = {};
                        return {
                            add: function (e, n, o, a, r) {
                                return L(a) && (r = a, a = 0), !i[e.id] && (i[e.id] = 1, t.push({
                                    el: e,
                                    target: n,
                                    time: o,
                                    delay: a,
                                    easing: r
                                }), !0)
                            }, done: function (t) {
                                return e = t, this
                            }, start: function () {
                                for (var n = t.length, o = 0, a = t.length; o < a; o++) {
                                    var r = t[o];
                                    r.el.animateTo(r.target, r.time, r.delay, r.easing, s)
                                }
                                return this;

                                function s() {
                                    --n || (t.length = 0, i = {}, e && e())
                                }
                            }
                        }
                    }();
                    RT(t.willDeleteEls, function (e, t) {
                        RT(e, function (e, i) {
                            if (!e.invisible) {
                                var s, l = e.parent;
                                if (n && "drillDown" === n.direction) s = l === n.rootNodeGroup ? {
                                    shape: {
                                        x: 0,
                                        y: 0,
                                        width: l.__tmNodeWidth,
                                        height: l.__tmNodeHeight
                                    }, style: {opacity: 0}
                                } : {style: {opacity: 0}}; else {
                                    var d = 0, u = 0;
                                    l.__tmWillDelete || (d = l.__tmNodeWidth / 2, u = l.__tmNodeHeight / 2), s = "nodeGroup" === t ? {
                                        position: [d, u],
                                        style: {opacity: 0}
                                    } : {shape: {x: d, y: u, width: 0, height: 0}, style: {opacity: 0}}
                                }
                                s && r.add(e, s, o, a)
                            }
                        })
                    }), RT(this._storage, function (e, i) {
                        RT(e, function (e, n) {
                            var s = t.lastsForAnimation[i][n], l = {};
                            s && ("nodeGroup" === i ? s.old && (l.position = e.position.slice(), e.attr("position", s.old)) : (s.old && (l.shape = T({}, e.shape), e.setShape(s.old)), s.fadein ? (e.setStyle("opacity", 0), l.style = {opacity: 1}) : 1 !== e.style.opacity && (l.style = {opacity: 1})), r.add(e, l, o, a))
                        })
                    }, this), this._state = "animating", r.done(MT(function () {
                        this._state = "ready", t.renderFinally()
                    }, this)).start()
                }
            }, _resetController: function (e) {
                var t = this._controller;
                t || ((t = this._controller = new by(e.getZr())).enable(this.seriesModel.get("roam")), t.on("pan", MT(this._onPan, this)), t.on("zoom", MT(this._onZoom, this)));
                var i = new Di(0, 0, e.getWidth(), e.getHeight());
                t.setPointerChecker(function (e, t, n) {
                    return i.contain(t, n)
                })
            }, _clearController: function () {
                var e = this._controller;
                e && (e.dispose(), e = null)
            }, _onPan: function (e) {
                if ("animating" !== this._state && (3 < Math.abs(e.dx) || 3 < Math.abs(e.dy))) {
                    var t = this.seriesModel.getData().tree.root;
                    if (!t) return;
                    var i = t.getLayout();
                    if (!i) return;
                    this.api.dispatchAction({
                        type: "treemapMove",
                        from: this.uid,
                        seriesId: this.seriesModel.id,
                        rootRect: {x: i.x + e.dx, y: i.y + e.dy, width: i.width, height: i.height}
                    })
                }
            }, _onZoom: function (e) {
                var t = e.originX, i = e.originY;
                if ("animating" !== this._state) {
                    var n = this.seriesModel.getData().tree.root;
                    if (!n) return;
                    var o = n.getLayout();
                    if (!o) return;
                    var a = new Di(o.x, o.y, o.width, o.height), r = this.seriesModel.layoutInfo;
                    t -= r.x, i -= r.y;
                    var s = at();
                    dt(s, s, [-t, -i]), ct(s, s, [e.scale, e.scale]), dt(s, s, [t, i]), a.applyTransform(s), this.api.dispatchAction({
                        type: "treemapRender",
                        from: this.uid,
                        seriesId: this.seriesModel.id,
                        rootRect: {x: a.x, y: a.y, width: a.width, height: a.height}
                    })
                }
            }, _initEvents: function (e) {
                e.on("click", function (e) {
                    if ("ready" === this._state) {
                        var t = this.seriesModel.get("nodeClick", !0);
                        if (t) {
                            var i = this.findTarget(e.offsetX, e.offsetY);
                            if (i) {
                                var n = i.node;
                                if (n.getLayout().isLeafRoot) this._rootToNode(i); else if ("zoomToNode" === t) this._zoomToNode(i); else if ("link" === t) {
                                    var o = n.hostTree.data.getItemModel(n.dataIndex), a = o.get("link", !0),
                                        r = o.get("target", !0) || "blank";
                                    a && dd(a, r)
                                }
                            }
                        }
                    }
                }, this)
            }, _renderBreadcrumb: function (e, t, i) {
                i = i || (i = null != e.get("leafDepth", !0) ? {node: e.getViewRoot()} : this.findTarget(t.getWidth() / 2, t.getHeight() / 2)) || {node: e.getData().tree.root}, (this._breadcrumb || (this._breadcrumb = new ET(this.group))).render(e, t, i.node, MT(function (t) {
                    "animating" !== this._state && (AT(e.getViewRoot(), t) ? this._rootToNode({node: t}) : this._zoomToNode({node: t}))
                }, this))
            }, remove: function () {
                this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = {
                    nodeGroup: [],
                    background: [],
                    content: []
                }, this._state = "ready", this._breadcrumb && this._breadcrumb.remove()
            }, dispose: function () {
                this._clearController()
            }, _zoomToNode: function (e) {
                this.api.dispatchAction({
                    type: "treemapZoomToNode",
                    from: this.uid,
                    seriesId: this.seriesModel.id,
                    targetNode: e.node
                })
            }, _rootToNode: function (e) {
                this.api.dispatchAction({
                    type: "treemapRootToNode",
                    from: this.uid,
                    seriesId: this.seriesModel.id,
                    targetNode: e.node
                })
            }, findTarget: function (e, t) {
                var i;
                return this.seriesModel.getViewRoot().eachNode({attr: "viewChildren", order: "preorder"}, function (n) {
                    var o = this._storage.background[n.getRawIndex()];
                    if (o) {
                        var a = o.transformCoordToLocal(e, t), r = o.shape;
                        if (!(r.x <= a[0] && a[0] <= r.x + r.width && r.y <= a[1] && a[1] <= r.y + r.height)) return !1;
                        i = {node: n, offsetX: a[0], offsetY: a[1]}
                    }
                }, this), i
            }
        });
        for (var HT = function () {
        }, zT = ["treemapZoomToNode", "treemapRender", "treemapMove"], XT = 0; XT < zT.length; XT++) ff({
            type: zT[XT],
            update: "updateView"
        }, HT);
        ff({type: "treemapRootToNode", update: "updateView"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "treemap", query: e}, function (t, i) {
                var n = _T(e, ["treemapZoomToNode", "treemapRootToNode"], t);
                if (n) {
                    var o = t.getViewRoot();
                    o && (e.direction = AT(o, n.node) ? "rollUp" : "drillDown"), t.resetViewRoot(n.node)
                }
            })
        });
        var qT = D, YT = R, JT = -1, ZT = function (e) {
            var t = e.mappingMethod, i = e.type, n = this.option = m(e);
            this.type = i, this.mappingMethod = t, this._normalizeData = lw[t];
            var o = QT[i];
            this.applyVisual = o.applyVisual, this.getColorMapper = o.getColorMapper, this._doMap = o._doMap[t], "piecewise" === t ? ($T(n), function (e) {
                var t = e.pieceList;
                e.hasSpecialVisual = !1, D(t, function (t, i) {
                    t.originIndex = i, null != t.visual && (e.hasSpecialVisual = !0)
                })
            }(n)) : "category" === t ? n.categories ? function (e) {
                var t = e.categories, i = e.visual, n = e.categoryMap = {};
                if (qT(t, function (e, t) {
                    n[e] = t
                }), !M(i)) {
                    var o = [];
                    R(i) ? qT(i, function (e, t) {
                        var i = n[t];
                        o[null != i ? i : JT] = e
                    }) : o[JT] = i, i = sw(e, o)
                }
                for (var a = t.length - 1; 0 <= a; a--) null == i[a] && (delete n[t[a]], t.pop())
            }(n) : $T(n, !0) : (X("linear" !== t || n.dataExtent), $T(n))
        };
        ZT.prototype = {
            constructor: ZT, mapValueToVisual: function (e) {
                var t = this._normalizeData(e);
                return this._doMap(t, e)
            }, getNormalizer: function () {
                return O(this._normalizeData, this)
            }
        };
        var QT = ZT.visualHandlers = {
            color: {
                applyVisual: iw("color"), getColorMapper: function () {
                    var e = this.option;
                    return O("category" === e.mappingMethod ? function (e, t) {
                        return t || (e = this._normalizeData(e)), nw.call(this, e)
                    } : function (t, i, n) {
                        var o = !!n;
                        return i || (t = this._normalizeData(t)), n = Ht(t, e.parsedVisual, n), o ? n : Zt(n, "rgba")
                    }, this)
                }, _doMap: {
                    linear: function (e) {
                        return Zt(Ht(e, this.option.parsedVisual), "rgba")
                    }, category: nw, piecewise: function (e, t) {
                        var i = rw.call(this, t);
                        return null == i && (i = Zt(Ht(e, this.option.parsedVisual), "rgba")), i
                    }, fixed: ow
                }
            },
            colorHue: ew(function (e, t) {
                return Yt(e, t)
            }),
            colorSaturation: ew(function (e, t) {
                return Yt(e, null, t)
            }),
            colorLightness: ew(function (e, t) {
                return Yt(e, null, null, t)
            }),
            colorAlpha: ew(function (e, t) {
                return Jt(e, t)
            }),
            opacity: {applyVisual: iw("opacity"), _doMap: aw([0, 1])},
            liftZ: {applyVisual: iw("liftZ"), _doMap: {linear: ow, category: ow, piecewise: ow, fixed: ow}},
            symbol: {
                applyVisual: function (e, t, i) {
                    var n = this.mapValueToVisual(e);
                    if (L(n)) i("symbol", n); else if (YT(n)) for (var o in n) n.hasOwnProperty(o) && i(o, n[o])
                }, _doMap: {
                    linear: tw, category: nw, piecewise: function (e, t) {
                        var i = rw.call(this, t);
                        return null == i && (i = tw.call(this, e)), i
                    }, fixed: ow
                }
            },
            symbolSize: {applyVisual: iw("symbolSize"), _doMap: aw([0, 1])}
        };

        function $T(e, t) {
            var i = e.visual, n = [];
            R(i) ? qT(i, function (e) {
                n.push(e)
            }) : null != i && n.push(i), t || 1 !== n.length || {
                color: 1,
                symbol: 1
            }.hasOwnProperty(e.type) || (n[1] = n[0]), sw(e, n)
        }

        function ew(e) {
            return {
                applyVisual: function (t, i, n) {
                    t = this.mapValueToVisual(t), n("color", e(i("color"), t))
                }, _doMap: aw([0, 1])
            }
        }

        function tw(e) {
            var t = this.option.visual;
            return t[Math.round(Nl(e, [0, 1], [0, t.length - 1], !0))] || {}
        }

        function iw(e) {
            return function (t, i, n) {
                n(e, this.mapValueToVisual(t))
            }
        }

        function nw(e) {
            var t = this.option.visual;
            return t[this.option.loop && e !== JT ? e % t.length : e]
        }

        function ow() {
            return this.option.visual[0]
        }

        function aw(e) {
            return {
                linear: function (t) {
                    return Nl(t, e, this.option.visual, !0)
                }, category: nw, piecewise: function (t, i) {
                    var n = rw.call(this, i);
                    return null == n && (n = Nl(t, e, this.option.visual, !0)), n
                }, fixed: ow
            }
        }

        function rw(e) {
            var t = this.option, i = t.pieceList;
            if (t.hasSpecialVisual) {
                var n = i[ZT.findPieceIndex(e, i)];
                if (n && n.visual) return n.visual[this.type]
            }
        }

        function sw(e, t) {
            return e.visual = t, "color" === e.type && (e.parsedVisual = A(t, function (e) {
                return Kt(e)
            })), t
        }

        var lw = {
            linear: function (e) {
                return Nl(e, this.option.dataExtent, [0, 1], !0)
            }, piecewise: function (e) {
                var t = this.option.pieceList, i = ZT.findPieceIndex(e, t, !0);
                if (null != i) return Nl(i, [0, t.length - 1], [0, 1], !0)
            }, category: function (e) {
                var t = this.option.categories ? this.option.categoryMap[e] : e;
                return null == t ? JT : t
            }, fixed: te
        };

        function dw(e, t, i) {
            return e ? t <= i : t < i
        }

        ZT.listVisualTypes = function () {
            var e = [];
            return D(QT, function (t, i) {
                e.push(i)
            }), e
        }, ZT.addVisualHandler = function (e, t) {
            QT[e] = t
        }, ZT.isValidType = function (e) {
            return QT.hasOwnProperty(e)
        }, ZT.eachVisual = function (e, t, i) {
            R(e) ? D(e, t, i) : t.call(i, e)
        }, ZT.mapVisual = function (e, t, i) {
            var n, o = M(e) ? [] : R(e) ? {} : (n = !0, null);
            return ZT.eachVisual(e, function (e, a) {
                var r = t.call(i, e, a);
                n ? o = r : o[a] = r
            }), o
        }, ZT.retrieveVisuals = function (e) {
            var t, i = {};
            return e && qT(QT, function (n, o) {
                e.hasOwnProperty(o) && (i[o] = e[o], t = !0)
            }), t ? i : null
        }, ZT.prepareVisualTypes = function (e) {
            if (YT(e)) {
                var t = [];
                qT(e, function (e, i) {
                    t.push(i)
                }), e = t
            } else {
                if (!M(e)) return [];
                e = e.slice()
            }
            return e.sort(function (e, t) {
                return "color" === t && "color" !== e && 0 === e.indexOf("color") ? 1 : -1
            }), e
        }, ZT.dependsOn = function (e, t) {
            return "color" === t ? !(!e || 0 !== e.indexOf(t)) : e === t
        }, ZT.findPieceIndex = function (e, t, i) {
            for (var n, o = 1 / 0, a = 0, r = t.length; a < r; a++) {
                var s = t[a].value;
                if (null != s) {
                    if (s === e || "string" == typeof s && s === e + "") return a;
                    i && c(s, a)
                }
            }
            for (a = 0, r = t.length; a < r; a++) {
                var l = t[a], d = l.interval, u = l.close;
                if (d) {
                    if (d[0] === -1 / 0) {
                        if (dw(u[1], e, d[1])) return a
                    } else if (d[1] === 1 / 0) {
                        if (dw(u[0], d[0], e)) return a
                    } else if (dw(u[0], d[0], e) && dw(u[1], e, d[1])) return a;
                    i && c(d[0], a), i && c(d[1], a)
                }
            }
            if (i) return e === 1 / 0 ? t.length - 1 : e === -1 / 0 ? 0 : n;

            function c(t, i) {
                var a = Math.abs(t - e);
                a < o && (o = a, n = i)
            }
        };
        var uw = M, cw = "itemStyle", hw = {
            seriesType: "treemap", reset: function (e, t, i, n) {
                var o = e.getData().tree, a = o.root, r = e.getModel(cw);
                a.isRemoved() || function e(t, i, n, o, a, r) {
                    var s = t.getModel(), l = t.getLayout();
                    if (l && !l.invisible && l.isInView) {
                        var d, u, c = t.getModel(cw), h = n[t.depth], f = function (e, t, i, n) {
                            var o = T({}, t);
                            return D(["color", "colorAlpha", "colorSaturation"], function (a) {
                                var r = e.get(a, !0);
                                null == r && i && (r = i[a]), null == r && (r = t[a]), null == r && (r = n.get(a)), null != r && (o[a] = r)
                            }), o
                        }(c, i, h, o), p = c.get("borderColor"), g = c.get("borderColorSaturation");
                        null != g && (d = fw(f), p = null != (u = d) ? Yt(u, null, null, g) : null), t.setVisual("borderColor", p);
                        var m = t.viewChildren;
                        if (m && m.length) {
                            var v = function (e, t, i, n, o, a) {
                                if (a && a.length) {
                                    var r = gw(t, "color") || null != o.color && "none" !== o.color && (gw(t, "colorAlpha") || gw(t, "colorSaturation"));
                                    if (r) {
                                        var s = t.get("visualMin"), l = t.get("visualMax"), d = i.dataExtent.slice();
                                        null != s && s < d[0] && (d[0] = s), null != l && l > d[1] && (d[1] = l);
                                        var u = t.get("colorMappingBy"),
                                            c = {type: r.name, dataExtent: d, visual: r.range};
                                        "color" !== c.type || "index" !== u && "id" !== u ? c.mappingMethod = "linear" : (c.mappingMethod = "category", c.loop = !0);
                                        var h = new ZT(c);
                                        return h.__drColorMappingBy = u, h
                                    }
                                }
                            }(0, s, l, 0, f, m);
                            D(m, function (t, i) {
                                if (t.depth >= a.length || t === a[t.depth]) {
                                    var l = function (e, t, i, n, o, a) {
                                        var r = T({}, t);
                                        if (o) {
                                            var s = o.type, l = "color" === s && o.__drColorMappingBy,
                                                d = "index" === l ? n : "id" === l ? a.mapIdToIndex(i.getId()) : i.getValue(e.get("visualDimension"));
                                            r[s] = o.mapValueToVisual(d)
                                        }
                                        return r
                                    }(s, f, t, i, v, r);
                                    e(t, l, n, o, a, r)
                                }
                            })
                        } else d = fw(f), t.setVisual("color", d)
                    }
                }(a, {}, A(o.levelModels, function (e) {
                    return e ? e.get(cw) : null
                }), r, e.getViewRoot().getAncestors(), e)
            }
        };

        function fw(e) {
            var t = pw(e, "color");
            if (t) {
                var i = pw(e, "colorAlpha"), n = pw(e, "colorSaturation");
                return n && (t = Yt(t, null, null, n)), i && (t = Jt(t, i)), t
            }
        }

        function pw(e, t) {
            var i = e[t];
            if (null != i && "none" !== i) return i
        }

        function gw(e, t) {
            var i = e.get(t);
            return uw(i) && i.length ? {name: t, range: i} : null
        }

        var mw = Math.max, vw = Math.min, yw = G, Tw = D, ww = ["itemStyle", "borderWidth"],
            kw = ["itemStyle", "gapWidth"], Cw = ["upperLabel", "show"], bw = ["upperLabel", "height"], Iw = {
                seriesType: "treemap", reset: function (e, t, i, n) {
                    var o = i.getWidth(), a = i.getHeight(), r = e.option,
                        s = md(e.getBoxLayoutParams(), {width: i.getWidth(), height: i.getHeight()}), l = r.size || [],
                        d = xl(yw(s.width, l[0]), o), u = xl(yw(s.height, l[1]), a), c = n && n.type,
                        h = _T(n, ["treemapZoomToNode", "treemapRootToNode"], e),
                        f = "treemapRender" === c || "treemapMove" === c ? n.rootRect : null, p = e.getViewRoot(),
                        g = DT(p);
                    if ("treemapMove" !== c) {
                        var m = "treemapZoomToNode" === c ? function (e, t, i, n, o) {
                            var a, r = (t || {}).node, s = [n, o];
                            if (!r || r === i) return s;
                            for (var l = n * o, d = l * e.option.zoomToNodeRatio; a = r.parentNode;) {
                                for (var u = 0, c = a.children, h = 0, f = c.length; h < f; h++) u += c[h].getValue();
                                var p = r.getValue();
                                if (0 === p) return s;
                                d *= u / p;
                                var g = a.getModel(), m = g.get(ww), v = Math.max(m, Aw(g));
                                d += 4 * m * m + (3 * m + v) * Math.pow(d, .5), Rl < d && (d = Rl), r = a
                            }
                            d < l && (d = l);
                            var y = Math.pow(d / l, .5);
                            return [n * y, o * y]
                        }(e, h, p, d, u) : f ? [f.width, f.height] : [d, u], v = r.sort;
                        v && "asc" !== v && "desc" !== v && (v = "desc");
                        var y = {squareRatio: r.squareRatio, sort: v, leafDepth: r.leafDepth};
                        p.hostTree.clearLayouts();
                        var w = {x: 0, y: 0, width: m[0], height: m[1], area: m[0] * m[1]};
                        p.setLayout(w), function e(t, i, n, o) {
                            var a, r;
                            if (!t.isRemoved()) {
                                var s = t.getLayout();
                                a = s.width, r = s.height;
                                var l = t.getModel(), d = l.get(ww), u = l.get(kw) / 2, c = Aw(l), h = Math.max(d, c),
                                    f = d - u, p = h - u, l = t.getModel();
                                t.setLayout({
                                    borderWidth: d,
                                    upperHeight: h,
                                    upperLabelHeight: c
                                }, !0), a = mw(a - 2 * f, 0), r = mw(r - f - p, 0);
                                var g = a * r, m = Sw(t, l, g, i, n, o);
                                if (m.length) {
                                    var v = {x: f, y: p, width: a, height: r}, y = vw(a, r), T = 1 / 0, w = [];
                                    w.area = 0;
                                    for (var k = 0, C = m.length; k < C;) {
                                        var b = m[k];
                                        w.push(b), w.area += b.getLayout().area;
                                        var I = _w(w, y, i.squareRatio);
                                        T = I <= T ? (k++, I) : (w.area -= w.pop().getLayout().area, Dw(w, y, v, u, !1), y = vw(v.width, v.height), w.length = w.area = 0, 1 / 0)
                                    }
                                    if (w.length && Dw(w, y, v, u, !0), !n) {
                                        var S = l.get("childrenVisibleMin");
                                        null != S && g < S && (n = !0)
                                    }
                                    for (var k = 0, C = m.length; k < C; k++) e(m[k], i, n, o + 1)
                                }
                            }
                        }(p, y, !1, 0), w = p.getLayout(), Tw(g, function (e, t) {
                            var i = (g[t + 1] || p).getValue();
                            e.setLayout(T({dataExtent: [i, i], borderWidth: 0, upperHeight: 0}, w))
                        })
                    }
                    var k = e.getData().tree.root;
                    k.setLayout(function (e, t, i) {
                        if (t) return {x: t.x, y: t.y};
                        var n = {x: 0, y: 0};
                        if (!i) return n;
                        var o = i.node, a = o.getLayout();
                        if (!a) return n;
                        for (var r = [a.width / 2, a.height / 2], s = o; s;) {
                            var l = s.getLayout();
                            r[0] += l.x, r[1] += l.y, s = s.parentNode
                        }
                        return {x: e.width / 2 - r[0], y: e.height / 2 - r[1]}
                    }(s, f, h), !0), e.setLayoutInfo(s), function e(t, i, n, o, a) {
                        var r = t.getLayout(), s = n[a], l = s && s === t;
                        if (!(s && !l || a === n.length && t !== o)) {
                            t.setLayout({isInView: !0, invisible: !l && !i.intersect(r), isAboveViewRoot: l}, !0);
                            var d = new Di(i.x - r.x, i.y - r.y, i.width, i.height);
                            Tw(t.viewChildren || [], function (t) {
                                e(t, d, n, o, a + 1)
                            })
                        }
                    }(k, new Di(-s.x, -s.y, o, a), g, p, 0)
                }
            };

        function Sw(e, t, i, n, o, a) {
            var r = e.children || [], s = n.sort;
            "asc" !== s && "desc" !== s && (s = null);
            var l = null != n.leafDepth && n.leafDepth <= a;
            if (o && !l) return e.viewChildren = [];
            !function (e, t) {
                t && e.sort(function (e, i) {
                    var n = "asc" === t ? e.getValue() - i.getValue() : i.getValue() - e.getValue();
                    return 0 == n ? "asc" === t ? e.dataIndex - i.dataIndex : i.dataIndex - e.dataIndex : n
                })
            }(r = x(r, function (e) {
                return !e.isRemoved()
            }), s);
            var d = function (e, t, i) {
                for (var n = 0, o = 0, a = t.length; o < a; o++) n += t[o].getValue();
                var r = e.get("visualDimension");
                if (t && t.length) if ("value" === r && i) s = [t[t.length - 1].getValue(), t[0].getValue()], "asc" === i && s.reverse(); else {
                    var s = [1 / 0, -1 / 0];
                    Tw(t, function (e) {
                        var t = e.getValue(r);
                        t < s[0] && (s[0] = t), t > s[1] && (s[1] = t)
                    })
                } else s = [NaN, NaN];
                return {sum: n, dataExtent: s}
            }(t, r, s);
            if (0 === d.sum) return e.viewChildren = [];
            if (d.sum = function (e, t, i, n, o) {
                if (!n) return i;
                for (var a = e.get("visibleMin"), r = o.length, s = r, l = r - 1; 0 <= l; l--) {
                    var d = o["asc" === n ? r - l - 1 : l].getValue();
                    d / i * t < a && (s = l, i -= d)
                }
                return "asc" === n ? o.splice(0, r - s) : o.splice(s, r - s), i
            }(t, i, d.sum, s, r), 0 === d.sum) return e.viewChildren = [];
            for (var u = 0, c = r.length; u < c; u++) {
                var h = r[u].getValue() / d.sum * i;
                r[u].setLayout({area: h})
            }
            return l && (r.length && e.setLayout({isLeafRoot: !0}, !0), r.length = 0), e.viewChildren = r, e.setLayout({dataExtent: d.dataExtent}, !0), r
        }

        function _w(e, t, i) {
            for (var n, o = 0, a = 1 / 0, r = 0, s = e.length; r < s; r++) (n = e[r].getLayout().area) && (n < a && (a = n), o < n && (o = n));
            var l = e.area * e.area, d = t * t * i;
            return l ? mw(d * o / l, l / (d * a)) : 1 / 0
        }

        function Dw(e, t, i, n, o) {
            var a = t === i.width ? 0 : 1, r = 1 - a, s = ["x", "y"], l = ["width", "height"], d = i[s[a]],
                u = t ? e.area / t : 0;
            (o || u > i[l[r]]) && (u = i[l[r]]);
            for (var c = 0, h = e.length; c < h; c++) {
                var f = e[c], p = {}, g = u ? f.getLayout().area / u : 0, m = p[l[r]] = mw(u - 2 * n, 0),
                    v = i[s[a]] + i[l[a]] - d, y = c === h - 1 || v < g ? v : g, T = p[l[a]] = mw(y - 2 * n, 0);
                p[s[r]] = i[s[r]] + vw(n, m / 2), p[s[a]] = d + vw(n, T / 2), d += y, f.setLayout(p, !0)
            }
            i[s[r]] += u, i[l[r]] -= u
        }

        function Aw(e) {
            return e.get(Cw) ? e.get(bw) : 0
        }

        function Nw(e) {
            return "_EC_" + e
        }

        function xw(e) {
            this._directed = e || !1, this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this.data, this.edgeData
        }

        mf(hw), gf(Iw);
        var Ew = xw.prototype;

        function Ow(e, t) {
            this.id = null == e ? "" : e, this.inEdges = [], this.outEdges = [], this.edges = [], this.hostGraph, this.dataIndex = null == t ? -1 : t
        }

        function Pw(e, t, i) {
            this.node1 = e, this.node2 = t, this.dataIndex = null == i ? -1 : i
        }

        function Mw(e, t) {
            return {
                getValue: function (i) {
                    var n = this[e][t];
                    return n.get(n.getDimension(i || "value"), this.dataIndex)
                }, setVisual: function (i, n) {
                    0 <= this.dataIndex && this[e][t].setItemVisual(this.dataIndex, i, n)
                }, getVisual: function (i, n) {
                    return this[e][t].getItemVisual(this.dataIndex, i, n)
                }, setLayout: function (i, n) {
                    0 <= this.dataIndex && this[e][t].setItemLayout(this.dataIndex, i, n)
                }, getLayout: function () {
                    return this[e][t].getItemLayout(this.dataIndex)
                }, getGraphicEl: function () {
                    return this[e][t].getItemGraphicEl(this.dataIndex)
                }, getRawIndex: function () {
                    return this[e][t].getRawIndex(this.dataIndex)
                }
            }
        }

        function Fw(e, t, i, n, o) {
            for (var a = new xw(n), r = 0; r < e.length; r++) a.addNode(G(e[r].id, e[r].name, r), r);
            var s = [], l = [], d = 0;
            for (r = 0; r < t.length; r++) {
                var u = t[r], c = u.source, h = u.target;
                a.addEdge(c, h, d) && (l.push(u), s.push(G(u.id, c + " > " + h)), d++)
            }
            var f, p = i.get("coordinateSystem");
            if ("cartesian2d" === p || "polar" === p) f = rp(e, i); else {
                var g = iu.get(p), m = g && "view" !== g.type && g.dimensions || [];
                b(m, "value") < 0 && m.concat(["value"]);
                var v = ep(e, {coordDimensions: m});
                (f = new Vf(v, i)).initData(e)
            }
            var y = new Vf(["value"], i);
            return y.initData(l, s), o && o(f, y), iT({
                mainData: f,
                struct: a,
                structAttr: "graph",
                datas: {node: f, edge: y},
                datasAttr: {node: "data", edge: "edgeData"}
            }), a.update(), a
        }

        Ew.type = "graph", Ew.isDirected = function () {
            return this._directed
        }, Ew.addNode = function (e, t) {
            e = null == e ? "" + t : "" + e;
            var i = this._nodesMap;
            if (!i[Nw(e)]) {
                var n = new Ow(e, t);
                return (n.hostGraph = this).nodes.push(n), i[Nw(e)] = n
            }
        }, Ew.getNodeByIndex = function (e) {
            var t = this.data.getRawIndex(e);
            return this.nodes[t]
        }, Ew.getNodeById = function (e) {
            return this._nodesMap[Nw(e)]
        }, Ew.addEdge = function (e, t, i) {
            var n = this._nodesMap, o = this._edgesMap;
            if ("number" == typeof e && (e = this.nodes[e]), "number" == typeof t && (t = this.nodes[t]), Ow.isInstance(e) || (e = n[Nw(e)]), Ow.isInstance(t) || (t = n[Nw(t)]), e && t) {
                var a = e.id + "-" + t.id;
                if (!o[a]) {
                    var r = new Pw(e, t, i);
                    return (r.hostGraph = this)._directed && (e.outEdges.push(r), t.inEdges.push(r)), e.edges.push(r), e !== t && t.edges.push(r), this.edges.push(r), o[a] = r
                }
            }
        }, Ew.getEdgeByIndex = function (e) {
            var t = this.edgeData.getRawIndex(e);
            return this.edges[t]
        }, Ew.getEdge = function (e, t) {
            Ow.isInstance(e) && (e = e.id), Ow.isInstance(t) && (t = t.id);
            var i = this._edgesMap;
            return this._directed ? i[e + "-" + t] : i[e + "-" + t] || i[t + "-" + e]
        }, Ew.eachNode = function (e, t) {
            for (var i = this.nodes, n = i.length, o = 0; o < n; o++) 0 <= i[o].dataIndex && e.call(t, i[o], o)
        }, Ew.eachEdge = function (e, t) {
            for (var i = this.edges, n = i.length, o = 0; o < n; o++) 0 <= i[o].dataIndex && 0 <= i[o].node1.dataIndex && 0 <= i[o].node2.dataIndex && e.call(t, i[o], o)
        }, Ew.breadthFirstTraverse = function (e, t, i, n) {
            if (Ow.isInstance(t) || (t = this._nodesMap[Nw(t)]), t) {
                for (var o = "out" === i ? "outEdges" : "in" === i ? "inEdges" : "edges", a = 0; a < this.nodes.length; a++) this.nodes[a].__visited = !1;
                if (!e.call(n, t, null)) for (var r = [t]; r.length;) {
                    var s = r.shift(), l = s[o];
                    for (a = 0; a < l.length; a++) {
                        var d = l[a], u = d.node1 === s ? d.node2 : d.node1;
                        if (!u.__visited) {
                            if (e.call(n, u, s)) return;
                            r.push(u), u.__visited = !0
                        }
                    }
                }
            }
        }, Ew.update = function () {
            for (var e = this.data, t = this.edgeData, i = this.nodes, n = this.edges, o = 0, a = i.length; o < a; o++) i[o].dataIndex = -1;
            for (o = 0, a = e.count(); o < a; o++) i[e.getRawIndex(o)].dataIndex = o;
            for (t.filterSelf(function (e) {
                var i = n[t.getRawIndex(e)];
                return 0 <= i.node1.dataIndex && 0 <= i.node2.dataIndex
            }), o = 0, a = n.length; o < a; o++) n[o].dataIndex = -1;
            for (o = 0, a = t.count(); o < a; o++) n[t.getRawIndex(o)].dataIndex = o
        }, Ew.clone = function () {
            for (var e = new xw(this._directed), t = this.nodes, i = this.edges, n = 0; n < t.length; n++) e.addNode(t[n].id, t[n].dataIndex);
            for (n = 0; n < i.length; n++) {
                var o = i[n];
                e.addEdge(o.node1.id, o.node2.id, o.dataIndex)
            }
            return e
        }, Ow.prototype = {
            constructor: Ow, degree: function () {
                return this.edges.length
            }, inDegree: function () {
                return this.inEdges.length
            }, outDegree: function () {
                return this.outEdges.length
            }, getModel: function (e) {
                if (!(this.dataIndex < 0)) return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)
            }
        }, Pw.prototype.getModel = function (e) {
            if (!(this.dataIndex < 0)) return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)
        }, S(Ow, Mw("hostGraph", "data")), S(Pw, Mw("hostGraph", "edgeData")), xw.Node = Ow, xw.Edge = Pw, ea(Ow), ea(Pw);
        var Lw = kf({
            type: "series.graph",
            init: function (e) {
                Lw.superApply(this, "init", arguments);
                var t = this;

                function i() {
                    return t._categoriesData
                }

                this.legendVisualProvider = new Fv(i, i), this.fillDataTextStyle(e.edges || e.links), this._updateCategoriesData()
            },
            mergeOption: function (e) {
                Lw.superApply(this, "mergeOption", arguments), this.fillDataTextStyle(e.edges || e.links), this._updateCategoriesData()
            },
            mergeDefaultAndTheme: function (e) {
                Lw.superApply(this, "mergeDefaultAndTheme", arguments), Mo(e, ["edgeLabel"], ["show"])
            },
            getInitialData: function (e, t) {
                var i = e.edges || e.links || [], n = e.data || e.nodes || [], o = this;
                if (n && i) return Fw(n, i, this, !0, function (e, i) {
                    e.wrapMethod("getItemModel", function (e) {
                        var t = o._categoriesModels[e.getShallow("category")];
                        return t && (t.parentModel = e.parentModel, e.parentModel = t), e
                    });
                    var n = o.getModel("edgeLabel"), a = new bl({label: n.option}, n.parentModel, t),
                        r = o.getModel("emphasis.edgeLabel"),
                        s = new bl({emphasis: {label: r.option}}, r.parentModel, t);

                    function l(e) {
                        return (e = this.parsePath(e)) && "label" === e[0] ? a : e && "emphasis" === e[0] && "label" === e[1] ? s : this.parentModel
                    }

                    i.wrapMethod("getItemModel", function (e) {
                        return e.customizeGetParent(l), e
                    })
                }).data
            },
            getGraph: function () {
                return this.getData().graph
            },
            getEdgeData: function () {
                return this.getGraph().edgeData
            },
            getCategoriesData: function () {
                return this._categoriesData
            },
            formatTooltip: function (e, t, i) {
                if ("edge" !== i) return Lw.superApply(this, "formatTooltip", arguments);
                var n = this.getData(), o = this.getDataParams(e, i), a = n.graph.getEdgeByIndex(e),
                    r = n.getName(a.node1.dataIndex), s = n.getName(a.node2.dataIndex), l = [];
                return null != r && l.push(r), null != s && l.push(s), l = $l(l.join(" > ")), o.value && (l += " : " + $l(o.value)), l
            },
            _updateCategoriesData: function () {
                var e = A(this.option.categories || [], function (e) {
                    return null != e.value ? e : T({value: 0}, e)
                }), t = new Vf(["value"], this);
                t.initData(e), this._categoriesData = t, this._categoriesModels = t.mapArray(function (e) {
                    return t.getItemModel(e, !0)
                })
            },
            setZoom: function (e) {
                this.option.zoom = e
            },
            setCenter: function (e) {
                this.option.center = e
            },
            isAnimationEnabled: function () {
                return Lw.superCall(this, "isAnimationEnabled") && !("force" === this.get("layout") && this.get("force.layoutAnimation"))
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "view",
                legendHoverLink: !0,
                hoverAnimation: !0,
                layout: null,
                focusNodeAdjacency: !1,
                circular: {rotateLabel: !1},
                force: {
                    initLayout: null,
                    repulsion: [0, 50],
                    gravity: .1,
                    friction: .6,
                    edgeLength: 30,
                    layoutAnimation: !0
                },
                left: "center",
                top: "center",
                symbol: "circle",
                symbolSize: 10,
                edgeSymbol: ["none", "none"],
                edgeSymbolSize: 10,
                edgeLabel: {position: "middle", distance: 5},
                draggable: !1,
                roam: !1,
                center: null,
                zoom: 1,
                nodeScaleRatio: .6,
                label: {show: !1, formatter: "{b}"},
                itemStyle: {},
                lineStyle: {color: "#aaa", width: 1, curveness: 0, opacity: .5},
                emphasis: {label: {show: !0}}
            }
        }), Rw = is.prototype, Bw = rs.prototype;

        function Uw(e) {
            return isNaN(+e.cpx1) || isNaN(+e.cpy1)
        }

        var Vw = bs({
            type: "ec-line",
            style: {stroke: "#000", fill: null},
            shape: {x1: 0, y1: 0, x2: 0, y2: 0, percent: 1, cpx1: null, cpy1: null},
            buildPath: function (e, t) {
                this[Uw(t) ? "_buildPathLine" : "_buildPathCurve"](e, t)
            },
            _buildPathLine: Rw.buildPath,
            _buildPathCurve: Bw.buildPath,
            pointAt: function (e) {
                return this[Uw(this.shape) ? "_pointAtLine" : "_pointAtCurve"](e)
            },
            _pointAtLine: Rw.pointAt,
            _pointAtCurve: Bw.pointAt,
            tangentAt: function (e) {
                var t = this.shape, i = Uw(t) ? [t.x2 - t.x1, t.y2 - t.y1] : this._tangentAtCurve(e);
                return me(i, i)
            },
            _tangentAtCurve: Bw.tangentAt
        }), Kw = ["fromSymbol", "toSymbol"];

        function Gw(e) {
            return "_" + e + "Type"
        }

        function Ww(e, t, i) {
            var n = t.getItemVisual(i, "color"), o = t.getItemVisual(i, e), a = t.getItemVisual(i, e + "Size");
            if (o && "none" !== o) {
                M(a) || (a = [a, a]);
                var r = cg(o, -a[0] / 2, -a[1] / 2, a[0], a[1], n);
                return r.name = e, r
            }
        }

        function jw(e, t) {
            e.x1 = t[0][0], e.y1 = t[0][1], e.x2 = t[1][0], e.y2 = t[1][1], e.percent = 1;
            var i = t[2];
            i ? (e.cpx1 = i[0], e.cpy1 = i[1]) : (e.cpx1 = NaN, e.cpy1 = NaN)
        }

        function Hw(e, t, i) {
            Ai.call(this), this._createLine(e, t, i)
        }

        var zw = Hw.prototype;

        function Xw(e) {
            this._ctor = e || Hw, this.group = new Ai
        }

        zw.beforeUpdate = function () {
            var e = this.childOfName("fromSymbol"), t = this.childOfName("toSymbol"), i = this.childOfName("label");
            if (e || t || !i.ignore) {
                for (var n = 1, o = this.parent; o;) o.scale && (n /= o.scale[0]), o = o.parent;
                var a = this.childOfName("line");
                if (this.__dirty || a.__dirty) {
                    var r = a.shape.percent, s = a.pointAt(0), l = a.pointAt(r), d = ue([], l, s);
                    if (me(d, d), e) {
                        e.attr("position", s);
                        var u = a.tangentAt(0);
                        e.attr("rotation", Math.PI / 2 - Math.atan2(u[1], u[0])), e.attr("scale", [n * r, n * r])
                    }
                    if (t && (t.attr("position", l), u = a.tangentAt(1), t.attr("rotation", -Math.PI / 2 - Math.atan2(u[1], u[0])), t.attr("scale", [n * r, n * r])), !i.ignore) {
                        var c, h, f, p;
                        i.attr("position", l);
                        var g = i.__labelDistance, m = g[0] * n, v = g[1] * n, y = r / 2,
                            T = [(u = a.tangentAt(y))[1], -u[0]], w = a.pointAt(y);
                        0 < T[1] && (T[0] = -T[0], T[1] = -T[1]);
                        var k, C = u[0] < 0 ? -1 : 1;
                        if ("start" !== i.__position && "end" !== i.__position) {
                            var b = -Math.atan2(u[1], u[0]);
                            l[0] < s[0] && (b = Math.PI + b), i.attr("rotation", b)
                        }
                        switch (i.__position) {
                            case"insideStartTop":
                            case"insideMiddleTop":
                            case"insideEndTop":
                            case"middle":
                                k = -v, f = "bottom";
                                break;
                            case"insideStartBottom":
                            case"insideMiddleBottom":
                            case"insideEndBottom":
                                k = v, f = "top";
                                break;
                            default:
                                k = 0, f = "middle"
                        }
                        switch (i.__position) {
                            case"end":
                                c = [d[0] * m + l[0], d[1] * v + l[1]], h = .8 < d[0] ? "left" : d[0] < -.8 ? "right" : "center", f = .8 < d[1] ? "top" : d[1] < -.8 ? "bottom" : "middle";
                                break;
                            case"start":
                                c = [-d[0] * m + s[0], -d[1] * v + s[1]], h = .8 < d[0] ? "right" : d[0] < -.8 ? "left" : "center", f = .8 < d[1] ? "bottom" : d[1] < -.8 ? "top" : "middle";
                                break;
                            case"insideStartTop":
                            case"insideStart":
                            case"insideStartBottom":
                                c = [m * C + s[0], s[1] + k], h = u[0] < 0 ? "right" : "left", p = [-m * C, -k];
                                break;
                            case"insideMiddleTop":
                            case"insideMiddle":
                            case"insideMiddleBottom":
                            case"middle":
                                c = [w[0], w[1] + k], h = "center", p = [0, -k];
                                break;
                            case"insideEndTop":
                            case"insideEnd":
                            case"insideEndBottom":
                                c = [-m * C + l[0], l[1] + k], h = 0 <= u[0] ? "right" : "left", p = [m * C, -k]
                        }
                        i.attr({
                            style: {textVerticalAlign: i.__verticalAlign || f, textAlign: i.__textAlign || h},
                            position: c,
                            scale: [n, n],
                            origin: p
                        })
                    }
                }
            }
        }, zw._createLine = function (e, t, i) {
            var n = e.hostModel, o = function (e) {
                var t = new Vw({name: "line", subPixelOptimize: !0});
                return jw(t.shape, e), t
            }(e.getItemLayout(t));
            o.shape.percent = 0, rl(o, {shape: {percent: 1}}, n, t), this.add(o);
            var a = new Ur({name: "label", lineLabelOriginalOpacity: 1});
            this.add(a), D(Kw, function (i) {
                var n = Ww(i, e, t);
                this.add(n), this[Gw(i)] = e.getItemVisual(t, i)
            }, this), this._updateCommonStl(e, t, i)
        }, zw.updateData = function (e, t, i) {
            var n = e.hostModel, o = this.childOfName("line"), a = e.getItemLayout(t), r = {shape: {}};
            jw(r.shape, a), al(o, r, n, t), D(Kw, function (i) {
                var n = e.getItemVisual(t, i), o = Gw(i);
                if (this[o] !== n) {
                    this.remove(this.childOfName(i));
                    var a = Ww(i, e, t);
                    this.add(a)
                }
                this[o] = n
            }, this), this._updateCommonStl(e, t, i)
        }, zw._updateCommonStl = function (e, t, i) {
            var n = e.hostModel, o = this.childOfName("line"), a = i && i.lineStyle, r = i && i.hoverLineStyle,
                s = i && i.labelModel, l = i && i.hoverLabelModel;
            if (!i || e.hasItemOption) {
                var d = e.getItemModel(t);
                a = d.getModel("lineStyle").getLineStyle(), r = d.getModel("emphasis.lineStyle").getLineStyle(), s = d.getModel("label"), l = d.getModel("emphasis.label")
            }
            var u = e.getItemVisual(t, "color"), c = j(e.getItemVisual(t, "opacity"), a.opacity, 1);
            o.useStyle(w({
                strokeNoScale: !0,
                fill: "none",
                stroke: u,
                opacity: c
            }, a)), o.hoverStyle = r, D(Kw, function (e) {
                var t = this.childOfName(e);
                t && (t.setColor(u), t.setStyle({opacity: c}))
            }, this);
            var h, f, p = s.getShallow("show"), g = l.getShallow("show"), m = this.childOfName("label");
            if ((p || g) && (h = u || "#000", null == (f = n.getFormattedLabel(t, "normal", e.dataType)))) {
                var v = n.getRawValue(t);
                f = null == v ? e.getName(t) : isFinite(v) ? El(v) : v
            }
            var y = p ? f : null, T = g ? W(n.getFormattedLabel(t, "emphasis", e.dataType), f) : null, k = m.style;
            if (null != y || null != T) {
                Zs(m.style, s, {text: y}, {autoColor: h}), m.__textAlign = k.textAlign, m.__verticalAlign = k.textVerticalAlign, m.__position = s.get("position") || "middle";
                var C = s.get("distance");
                M(C) || (C = [C, C]), m.__labelDistance = C
            }
            m.hoverStyle = null != T ? {
                text: T,
                textFill: l.getTextColor(!0),
                fontStyle: l.getShallow("fontStyle"),
                fontWeight: l.getShallow("fontWeight"),
                fontSize: l.getShallow("fontSize"),
                fontFamily: l.getShallow("fontFamily")
            } : {text: null}, m.ignore = !p && !g, Hs(this)
        }, zw.highlight = function () {
            this.trigger("emphasis")
        }, zw.downplay = function () {
            this.trigger("normal")
        }, zw.updateLayout = function (e, t) {
            this.setLinePoints(e.getItemLayout(t))
        }, zw.setLinePoints = function (e) {
            var t = this.childOfName("line");
            jw(t.shape, e), t.dirty()
        }, I(Hw, Ai);
        var qw = Xw.prototype;

        function Yw(e) {
            var t = e.hostModel;
            return {
                lineStyle: t.getModel("lineStyle").getLineStyle(),
                hoverLineStyle: t.getModel("emphasis.lineStyle").getLineStyle(),
                labelModel: t.getModel("label"),
                hoverLabelModel: t.getModel("emphasis.label")
            }
        }

        function Jw(e) {
            return isNaN(e[0]) || isNaN(e[1])
        }

        function Zw(e) {
            return !Jw(e[0]) && !Jw(e[1])
        }

        function Qw(e) {
            var t = e.coordinateSystem;
            if ("view" !== t.type) return 1;
            var i = e.option.nodeScaleRatio, n = t.scale, o = n && n[0] || 1;
            return ((t.getZoom() - 1) * i + 1) / o
        }

        function $w(e) {
            var t = e.getVisual("symbolSize");
            return t instanceof Array && (t = (t[0] + t[1]) / 2), +t
        }

        qw.isPersistent = function () {
            return !0
        }, qw.updateData = function (e) {
            var t = this, i = t.group, n = t._lineData;
            t._lineData = e, n || i.removeAll();
            var o = Yw(e);
            e.diff(n).add(function (i) {
                !function (e, t, i, n) {
                    if (Zw(t.getItemLayout(i))) {
                        var o = new e._ctor(t, i, n);
                        t.setItemGraphicEl(i, o), e.group.add(o)
                    }
                }(t, e, i, o)
            }).update(function (i, a) {
                !function (e, t, i, n, o, a) {
                    var r = t.getItemGraphicEl(n);
                    if (!Zw(i.getItemLayout(o))) return e.group.remove(r);
                    r ? r.updateData(i, o, a) : r = new e._ctor(i, o, a), i.setItemGraphicEl(o, r), e.group.add(r)
                }(t, n, e, a, i, o)
            }).remove(function (e) {
                i.remove(n.getItemGraphicEl(e))
            }).execute()
        }, qw.updateLayout = function () {
            var e = this._lineData;
            e && e.eachItemGraphicEl(function (t, i) {
                t.updateLayout(e, i)
            }, this)
        }, qw.incrementalPrepareUpdate = function (e) {
            this._seriesScope = Yw(e), this._lineData = null, this.group.removeAll()
        }, qw.incrementalUpdate = function (e, t) {
            function i(e) {
                e.isGroup || function (e) {
                    return e.animators && 0 < e.animators.length
                }(e) || (e.incremental = e.useHoverLayer = !0)
            }

            for (var n = e.start; n < e.end; n++) if (Zw(t.getItemLayout(n))) {
                var o = new this._ctor(t, n, this._seriesScope);
                o.traverse(i), this.group.add(o), t.setItemGraphicEl(n, o)
            }
        }, qw.remove = function () {
            this._clearIncremental(), this._incremental = null, this.group.removeAll()
        }, qw._clearIncremental = function () {
            var e = this._incremental;
            e && e.clearDisplaybles()
        };
        var ek = [], tk = [], ik = [], nk = Ia, ok = we, ak = Math.abs;

        function rk(e, t, i) {
            for (var n, o = e[0], a = e[1], r = e[2], s = 1 / 0, l = i * i, d = .1, u = .1; u <= .9; u += .1) ek[0] = nk(o[0], a[0], r[0], u), ek[1] = nk(o[1], a[1], r[1], u), (f = ak(ok(ek, t) - l)) < s && (s = f, n = u);
            for (var c = 0; c < 32; c++) {
                var h = n + d;
                tk[0] = nk(o[0], a[0], r[0], n), tk[1] = nk(o[1], a[1], r[1], n), ik[0] = nk(o[0], a[0], r[0], h), ik[1] = nk(o[1], a[1], r[1], h);
                var f = ok(tk, t) - l;
                if (ak(f) < .01) break;
                var p = ok(ik, t) - l;
                d /= 2, f < 0 ? 0 <= p ? n += d : n -= d : 0 <= p ? n -= d : n += d
            }
            return n
        }

        function sk(e, t) {
            var i = [], n = Da, o = [[], [], []], a = [[], []], r = [];
            t /= 2, e.eachEdge(function (e, s) {
                var l = e.getLayout(), d = e.getVisual("fromSymbol"), u = e.getVisual("toSymbol");
                l.__original || (l.__original = [re(l[0]), re(l[1])], l[2] && l.__original.push(re(l[2])));
                var c = l.__original;
                if (null != l[2]) {
                    if (ae(o[0], c[0]), ae(o[1], c[2]), ae(o[2], c[1]), d && "none" !== d) {
                        var h = $w(e.node1), f = rk(o, c[0], h * t);
                        n(o[0][0], o[1][0], o[2][0], f, i), o[0][0] = i[3], o[1][0] = i[4], n(o[0][1], o[1][1], o[2][1], f, i), o[0][1] = i[3], o[1][1] = i[4]
                    }
                    u && "none" !== u && (h = $w(e.node2), f = rk(o, c[1], h * t), n(o[0][0], o[1][0], o[2][0], f, i), o[1][0] = i[1], o[2][0] = i[2], n(o[0][1], o[1][1], o[2][1], f, i), o[1][1] = i[1], o[2][1] = i[2]), ae(l[0], o[0]), ae(l[1], o[2]), ae(l[2], o[1])
                } else ae(a[0], c[0]), ae(a[1], c[1]), ue(r, a[1], a[0]), me(r, r), d && "none" !== d && (h = $w(e.node1), de(a[0], a[0], r, h * t)), u && "none" !== u && (h = $w(e.node2), de(a[1], a[1], r, -h * t)), ae(l[0], a[0]), ae(l[1], a[1])
            })
        }

        var lk = "__focusNodeAdjacency", dk = "__unfocusNodeAdjacency", uk = ["itemStyle", "opacity"],
            ck = ["lineStyle", "opacity"];

        function hk(e, t) {
            var i = e.getVisual("opacity");
            return null != i ? i : e.getModel().get(t)
        }

        function fk(e, t, i) {
            var n = e.getGraphicEl(), o = hk(e, t);
            null != i && (null == o && (o = 1), o *= i), n.downplay && n.downplay(), n.traverse(function (e) {
                if (!e.isGroup) {
                    var t = e.lineLabelOriginalOpacity;
                    null != t && null == i || (t = o), e.setStyle("opacity", t)
                }
            })
        }

        function pk(e, t) {
            var i = hk(e, t), n = e.getGraphicEl();
            n.traverse(function (e) {
                e.isGroup || e.setStyle("opacity", i)
            }), n.highlight && n.highlight()
        }

        function gk(e) {
            return e instanceof Array || (e = [e, e]), e
        }

        function mk(e) {
            var t = e.coordinateSystem;
            if (!t || "view" === t.type) {
                var i = e.getGraph();
                i.eachNode(function (e) {
                    var t = e.getModel();
                    e.setLayout([+t.get("x"), +t.get("y")])
                }), vk(i)
            }
        }

        function vk(e) {
            e.eachEdge(function (e) {
                var t = e.getModel().get("lineStyle.curveness") || 0, i = re(e.node1.getLayout()),
                    n = re(e.node2.getLayout()), o = [i, n];
                +t && o.push([(i[0] + n[0]) / 2 - (i[1] - n[1]) * t, (i[1] + n[1]) / 2 - (n[0] - i[0]) * t]), e.setLayout(o)
            })
        }

        Cf({
            type: "graph", init: function (e, t) {
                var i = new jg, n = new Xw, o = this.group;
                this._controller = new by(t.getZr()), this._controllerHost = {target: o}, o.add(i.group), o.add(n.group), this._symbolDraw = i, this._lineDraw = n, this._firstRender = !0
            }, render: function (e, t, i) {
                var n = this, o = e.coordinateSystem;
                this._model = e;
                var a = this._symbolDraw, r = this._lineDraw, s = this.group;
                if ("view" === o.type) {
                    var l = {position: o.position, scale: o.scale};
                    this._firstRender ? s.attr(l) : al(s, l, e)
                }
                sk(e.getGraph(), Qw(e));
                var d = e.getData();
                a.updateData(d);
                var u = e.getEdgeData();
                r.updateData(u), this._updateNodeAndLinkScale(), this._updateController(e, t, i), clearTimeout(this._layoutTimeout);
                var c = e.forceLayout, h = e.get("force.layoutAnimation");
                c && this._startForceLayoutIteration(c, h), d.eachItemGraphicEl(function (t, o) {
                    var a = d.getItemModel(o);
                    t.off("drag").off("dragend");
                    var r = a.get("draggable");
                    r && t.on("drag", function () {
                        c && (c.warmUp(), this._layouting || this._startForceLayoutIteration(c, h), c.setFixed(o), d.setItemLayout(o, t.position))
                    }, this).on("dragend", function () {
                        c && c.setUnfixed(o)
                    }, this), t.setDraggable(r && c), t[lk] && t.off("mouseover", t[lk]), t[dk] && t.off("mouseout", t[dk]), a.get("focusNodeAdjacency") && (t.on("mouseover", t[lk] = function () {
                        n._clearTimer(), i.dispatchAction({
                            type: "focusNodeAdjacency",
                            seriesId: e.id,
                            dataIndex: t.dataIndex
                        })
                    }), t.on("mouseout", t[dk] = function () {
                        n._dispatchUnfocus(i)
                    }))
                }, this), d.graph.eachEdge(function (t) {
                    var o = t.getGraphicEl();
                    o[lk] && o.off("mouseover", o[lk]), o[dk] && o.off("mouseout", o[dk]), t.getModel().get("focusNodeAdjacency") && (o.on("mouseover", o[lk] = function () {
                        n._clearTimer(), i.dispatchAction({
                            type: "focusNodeAdjacency",
                            seriesId: e.id,
                            edgeDataIndex: t.dataIndex
                        })
                    }), o.on("mouseout", o[dk] = function () {
                        n._dispatchUnfocus(i)
                    }))
                });
                var f = "circular" === e.get("layout") && e.get("circular.rotateLabel"), p = d.getLayout("cx"),
                    g = d.getLayout("cy");
                d.eachItemGraphicEl(function (e, t) {
                    var i = d.getItemModel(t).get("label.rotate") || 0, n = e.getSymbolPath();
                    if (f) {
                        var o = d.getItemLayout(t), a = Math.atan2(o[1] - g, o[0] - p);
                        a < 0 && (a = 2 * Math.PI + a);
                        var r = o[0] < p;
                        r && (a -= Math.PI);
                        var s = r ? "left" : "right";
                        Js(n, {textRotation: -a, textPosition: s, textOrigin: "center"}, {textPosition: s})
                    } else Js(n, {textRotation: i *= Math.PI / 180})
                }), this._firstRender = !1
            }, dispose: function () {
                this._controller && this._controller.dispose(), this._controllerHost = {}, this._clearTimer()
            }, _dispatchUnfocus: function (e, t) {
                var i = this;
                this._clearTimer(), this._unfocusDelayTimer = setTimeout(function () {
                    i._unfocusDelayTimer = null, e.dispatchAction({type: "unfocusNodeAdjacency", seriesId: i._model.id})
                }, 500)
            }, _clearTimer: function () {
                this._unfocusDelayTimer && (clearTimeout(this._unfocusDelayTimer), this._unfocusDelayTimer = null)
            }, focusNodeAdjacency: function (e, t, i, n) {
                var o = e.getData().graph, a = n.dataIndex, r = n.edgeDataIndex, s = o.getNodeByIndex(a),
                    l = o.getEdgeByIndex(r);
                (s || l) && (o.eachNode(function (e) {
                    fk(e, uk, .1)
                }), o.eachEdge(function (e) {
                    fk(e, ck, .1)
                }), s && (pk(s, uk), D(s.edges, function (e) {
                    e.dataIndex < 0 || (pk(e, ck), pk(e.node1, uk), pk(e.node2, uk))
                })), l && (pk(l, ck), pk(l.node1, uk), pk(l.node2, uk)))
            }, unfocusNodeAdjacency: function (e, t, i, n) {
                var o = e.getData().graph;
                o.eachNode(function (e) {
                    fk(e, uk)
                }), o.eachEdge(function (e) {
                    fk(e, ck)
                })
            }, _startForceLayoutIteration: function (e, t) {
                var i = this;
                !function n() {
                    e.step(function (e) {
                        i.updateLayout(i._model), (i._layouting = !e) && (t ? i._layoutTimeout = setTimeout(n, 16) : n())
                    })
                }()
            }, _updateController: function (e, t, i) {
                var n = this._controller, o = this._controllerHost, a = this.group;
                n.setPointerChecker(function (t, n, o) {
                    var r = a.getBoundingRect();
                    return r.applyTransform(a.transform), r.contain(n, o) && !Fy(t, i, e)
                }), "view" === e.coordinateSystem.type ? (n.enable(e.get("roam")), o.zoomLimit = e.get("scaleLimit"), o.zoom = e.coordinateSystem.getZoom(), n.off("pan").off("zoom").on("pan", function (t) {
                    Oy(o, t.dx, t.dy), i.dispatchAction({seriesId: e.id, type: "graphRoam", dx: t.dx, dy: t.dy})
                }).on("zoom", function (t) {
                    Py(o, t.scale, t.originX, t.originY), i.dispatchAction({
                        seriesId: e.id,
                        type: "graphRoam",
                        zoom: t.scale,
                        originX: t.originX,
                        originY: t.originY
                    }), this._updateNodeAndLinkScale(), sk(e.getGraph(), Qw(e)), this._lineDraw.updateLayout()
                }, this)) : n.disable()
            }, _updateNodeAndLinkScale: function () {
                var e = this._model, t = e.getData(), i = Qw(e), n = [i, i];
                t.eachItemGraphicEl(function (e, t) {
                    e.attr("scale", n)
                })
            }, updateLayout: function (e) {
                sk(e.getGraph(), Qw(e)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout()
            }, remove: function (e, t) {
                this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove()
            }
        }), ff({
            type: "focusNodeAdjacency",
            event: "focusNodeAdjacency",
            update: "series:focusNodeAdjacency"
        }, function () {
        }), ff({
            type: "unfocusNodeAdjacency",
            event: "unfocusNodeAdjacency",
            update: "series:unfocusNodeAdjacency"
        }, function () {
        }), ff({type: "graphRoam", event: "graphRoam", update: "none"}, function (e, t) {
            t.eachComponent({mainType: "series", query: e}, function (t) {
                var i = Wy(t.coordinateSystem, e);
                t.setCenter && t.setCenter(i.center), t.setZoom && t.setZoom(i.zoom)
            })
        });
        var yk = Math.PI, Tk = [];

        function wk(e, t) {
            var i = e.coordinateSystem;
            if (!i || "view" === i.type) {
                var n = i.getBoundingRect(), o = e.getData(), a = o.graph, r = n.width / 2 + n.x,
                    s = n.height / 2 + n.y, l = Math.min(n.width, n.height) / 2, d = o.count();
                o.setLayout({cx: r, cy: s}), d && (kk[t](e, i, a, o, l, r, s, d), a.eachEdge(function (e) {
                    var t, i = e.getModel().get("lineStyle.curveness") || 0, n = re(e.node1.getLayout()),
                        o = re(e.node2.getLayout()), a = (n[0] + o[0]) / 2, l = (n[1] + o[1]) / 2;
                    +i && (t = [r * (i *= 3) + a * (1 - i), s * i + l * (1 - i)]), e.setLayout([n, o, t])
                }))
            }
        }

        var kk = {
            value: function (e, t, i, n, o, a, r, s) {
                var l = 0, d = n.getSum("value"), u = 2 * Math.PI / (d || s);
                i.eachNode(function (e) {
                    var t = e.getValue("value"), i = u * (d ? t : 1) / 2;
                    l += i, e.setLayout([o * Math.cos(l) + a, o * Math.sin(l) + r]), l += i
                })
            }, symbolSize: function (e, t, i, n, o, a, r, s) {
                var l = 0;
                Tk.length = s;
                var d = Qw(e);
                i.eachNode(function (e) {
                    var t = $w(e);
                    isNaN(t) && (t = 2), t < 0 && (t = 0), t *= d;
                    var i = Math.asin(t / 2 / o);
                    isNaN(i) && (i = yk / 2), Tk[e.dataIndex] = i, l += 2 * i
                });
                var u = (2 * yk - l) / s / 2, c = 0;
                i.eachNode(function (e) {
                    var t = u + Tk[e.dataIndex];
                    c += t, e.setLayout([o * Math.cos(c) + a, o * Math.sin(c) + r]), c += t
                })
            }
        }, Ck = de;
        hf(function (e) {
            var t = e.findComponents({mainType: "legend"});
            t && t.length && e.eachSeriesByType("graph", function (e) {
                var i = e.getCategoriesData(), n = e.getGraph().data, o = i.mapArray(i.getName);
                n.filterSelf(function (e) {
                    var i = n.getItemModel(e).getShallow("category");
                    if (null != i) {
                        "number" == typeof i && (i = o[i]);
                        for (var a = 0; a < t.length; a++) if (!t[a].isSelected(i)) return !1
                    }
                    return !0
                })
            }, this)
        }), mf(vm("graph", "circle", null)), mf(function (e) {
            var t = {};
            e.eachSeriesByType("graph", function (e) {
                var i = e.getCategoriesData(), n = e.getData(), o = {};
                i.each(function (n) {
                    var a = i.getName(n);
                    o["ec-" + a] = n;
                    var r = i.getItemModel(n), s = r.get("itemStyle.color") || e.getColorFromPalette(a, t);
                    i.setItemVisual(n, "color", s);
                    for (var l = ["opacity", "symbol", "symbolSize", "symbolKeepAspect"], d = 0; d < l.length; d++) {
                        var u = r.getShallow(l[d], !0);
                        null != u && i.setItemVisual(n, l[d], u)
                    }
                }), i.count() && n.each(function (e) {
                    var t = n.getItemModel(e).getShallow("category");
                    if (null != t) {
                        "string" == typeof t && (t = o["ec-" + t]);
                        for (var a = ["color", "opacity", "symbol", "symbolSize", "symbolKeepAspect"], r = 0; r < a.length; r++) null == n.getItemVisual(e, a[r], !0) && n.setItemVisual(e, a[r], i.getItemVisual(t, a[r]))
                    }
                })
            })
        }), mf(function (e) {
            e.eachSeriesByType("graph", function (e) {
                var t = e.getGraph(), i = e.getEdgeData(), n = gk(e.get("edgeSymbol")), o = gk(e.get("edgeSymbolSize")),
                    a = "lineStyle.color".split("."), r = "lineStyle.opacity".split(".");
                i.setVisual("fromSymbol", n && n[0]), i.setVisual("toSymbol", n && n[1]), i.setVisual("fromSymbolSize", o && o[0]), i.setVisual("toSymbolSize", o && o[1]), i.setVisual("color", e.get(a)), i.setVisual("opacity", e.get(r)), i.each(function (e) {
                    var n = i.getItemModel(e), o = t.getEdgeByIndex(e), s = gk(n.getShallow("symbol", !0)),
                        l = gk(n.getShallow("symbolSize", !0)), d = n.get(a), u = n.get(r);
                    switch (d) {
                        case"source":
                            d = o.node1.getVisual("color");
                            break;
                        case"target":
                            d = o.node2.getVisual("color")
                    }
                    s[0] && o.setVisual("fromSymbol", s[0]), s[1] && o.setVisual("toSymbol", s[1]), l[0] && o.setVisual("fromSymbolSize", l[0]), l[1] && o.setVisual("toSymbolSize", l[1]), o.setVisual("color", d), o.setVisual("opacity", u)
                })
            })
        }), gf(function (e, t) {
            e.eachSeriesByType("graph", function (e) {
                var t = e.get("layout"), i = e.coordinateSystem;
                if (i && "view" !== i.type) {
                    var n = e.getData(), o = [];
                    D(i.dimensions, function (e) {
                        o = o.concat(n.mapDimension(e, !0))
                    });
                    for (var a = 0; a < n.count(); a++) {
                        for (var r = [], s = !1, l = 0; l < o.length; l++) {
                            var d = n.get(o[l], a);
                            isNaN(d) || (s = !0), r.push(d)
                        }
                        s ? n.setItemLayout(a, i.dataToPoint(r)) : n.setItemLayout(a, [NaN, NaN])
                    }
                    vk(n.graph)
                } else t && "none" !== t || mk(e)
            })
        }), gf(bh.VISUAL.POST_CHART_LAYOUT, function (e) {
            e.eachSeriesByType("graph", function (e) {
                "circular" === e.get("layout") && wk(e, "symbolSize")
            })
        }), gf(function (e) {
            e.eachSeriesByType("graph", function (e) {
                if (!(c = e.coordinateSystem) || "view" === c.type) if ("force" === e.get("layout")) {
                    var t = e.preservedPoints || {}, i = e.getGraph(), n = i.data, o = i.edgeData,
                        a = e.getModel("force"), r = a.get("initLayout");
                    e.preservedPoints ? n.each(function (e) {
                        var i = n.getId(e);
                        n.setItemLayout(e, t[i] || [NaN, NaN])
                    }) : r && "none" !== r ? "circular" === r && wk(e, "value") : mk(e);
                    var s = n.getDataExtent("value"), l = o.getDataExtent("value"), d = a.get("repulsion"),
                        u = a.get("edgeLength");
                    M(d) || (d = [d, d]), M(u) || (u = [u, u]), u = [u[1], u[0]];
                    var c, h = n.mapArray("value", function (e, t) {
                        var i = n.getItemLayout(t), o = Nl(e, s, d);
                        return isNaN(o) && (o = (d[0] + d[1]) / 2), {
                            w: o,
                            rep: o,
                            fixed: n.getItemModel(t).get("fixed"),
                            p: !i || isNaN(i[0]) || isNaN(i[1]) ? null : i
                        }
                    }), f = o.mapArray("value", function (e, t) {
                        var n = i.getEdgeByIndex(t), o = Nl(e, l, u);
                        isNaN(o) && (o = (u[0] + u[1]) / 2);
                        var a = n.getModel();
                        return {
                            n1: h[n.node1.dataIndex],
                            n2: h[n.node2.dataIndex],
                            d: o,
                            curveness: a.get("lineStyle.curveness") || 0,
                            ignoreForceLayout: a.get("ignoreForceLayout")
                        }
                    }), p = (c = e.coordinateSystem).getBoundingRect(), g = function (e, t, i) {
                        for (var n = i.rect, o = n.width, a = n.height, r = [n.x + o / 2, n.y + a / 2], s = null == i.gravity ? .1 : i.gravity, l = 0; l < e.length; l++) {
                            var d = e[l];
                            d.p || (d.p = oe(o * (Math.random() - .5) + r[0], a * (Math.random() - .5) + r[1])), d.pp = re(d.p), d.edges = null
                        }
                        var u = null == i.friction ? .6 : i.friction, c = u;
                        return {
                            warmUp: function () {
                                c = .8 * u
                            }, setFixed: function (t) {
                                e[t].fixed = !0
                            }, setUnfixed: function (t) {
                                e[t].fixed = !1
                            }, step: function (i) {
                                for (var n = [], o = e.length, a = 0; a < t.length; a++) {
                                    var l = t[a];
                                    if (!l.ignoreForceLayout) {
                                        var d = l.n1;
                                        ue(n, (p = l.n2).p, d.p);
                                        var u = ce(n) - l.d, h = p.w / (d.w + p.w);
                                        isNaN(h) && (h = 0), me(n, n), d.fixed || Ck(d.p, d.p, n, h * u * c), p.fixed || Ck(p.p, p.p, n, -(1 - h) * u * c)
                                    }
                                }
                                for (a = 0; a < o; a++) (v = e[a]).fixed || (ue(n, r, v.p), Ck(v.p, v.p, n, s * c));
                                for (a = 0; a < o; a++) {
                                    d = e[a];
                                    for (var f = a + 1; f < o; f++) {
                                        var p;
                                        ue(n, (p = e[f]).p, d.p), 0 === (u = ce(n)) && (se(n, Math.random() - .5, Math.random() - .5), u = 1);
                                        var g = (d.rep + p.rep) / u / u;
                                        d.fixed || Ck(d.pp, d.pp, n, g), p.fixed || Ck(p.pp, p.pp, n, -g)
                                    }
                                }
                                var m = [];
                                for (a = 0; a < o; a++) {
                                    var v;
                                    (v = e[a]).fixed || (ue(m, v.p, v.pp), Ck(v.p, v.p, m, c), ae(v.pp, v.p))
                                }
                                c *= .992, i && i(e, t, c < .01)
                            }
                        }
                    }(h, f, {rect: p, gravity: a.get("gravity"), friction: a.get("friction")}), m = g.step;
                    g.step = function (e) {
                        for (var o = 0, a = h.length; o < a; o++) h[o].fixed && ae(h[o].p, i.getNodeByIndex(o).getLayout());
                        m(function (o, a, r) {
                            for (var s = 0, l = o.length; s < l; s++) o[s].fixed || i.getNodeByIndex(s).setLayout(o[s].p), t[n.getId(s)] = o[s].p;
                            for (s = 0, l = a.length; s < l; s++) {
                                var d = a[s], u = i.getEdgeByIndex(s), c = d.n1.p, h = d.n2.p, f = u.getLayout();
                                (f = f ? f.slice() : [])[0] = f[0] || [], f[1] = f[1] || [], ae(f[0], c), ae(f[1], h), +d.curveness && (f[2] = [(c[0] + h[0]) / 2 - (c[1] - h[1]) * d.curveness, (c[1] + h[1]) / 2 - (h[0] - c[0]) * d.curveness]), u.setLayout(f)
                            }
                            e && e(r)
                        })
                    }, e.forceLayout = g, e.preservedPoints = t, g.step()
                } else e.forceLayout = null
            })
        }), pf("graphView", {
            create: function (e, t) {
                var i = [];
                return e.eachSeriesByType("graph", function (e) {
                    var n = e.get("coordinateSystem");
                    if (!n || "view" === n) {
                        var o = e.getData(), a = [], r = [];
                        La(o.mapArray(function (e) {
                            var t = o.getItemModel(e);
                            return [+t.get("x"), +t.get("y")]
                        }), a, r), r[0] - a[0] == 0 && (r[0] += 1, a[0] -= 1), r[1] - a[1] == 0 && (r[1] += 1, a[1] -= 1);
                        var s = (r[0] - a[0]) / (r[1] - a[1]), l = function (e, t, i) {
                            var n = e.getBoxLayoutParams();
                            return n.aspect = i, md(n, {width: t.getWidth(), height: t.getHeight()})
                        }(e, t, s);
                        isNaN(s) && (a = [l.x, l.y], r = [l.x + l.width, l.y + l.height]);
                        var d = r[0] - a[0], u = r[1] - a[1], c = l.width, h = l.height,
                            f = e.coordinateSystem = new zy;
                        f.zoomLimit = e.get("scaleLimit"), f.setBoundingRect(a[0], a[1], d, u), f.setViewRect(l.x, l.y, c, h), f.setCenter(e.get("center")), f.setZoom(e.get("zoom")), i.push(f)
                    }
                }), i
            }
        }), ec.extend({
            type: "series.gauge",
            getInitialData: function (e, t) {
                return Pv(this, ["value"])
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                center: ["50%", "50%"],
                legendHoverLink: !0,
                radius: "75%",
                startAngle: 225,
                endAngle: -45,
                clockwise: !0,
                min: 0,
                max: 100,
                splitNumber: 10,
                axisLine: {show: !0, lineStyle: {color: [[.2, "#91c7ae"], [.8, "#63869e"], [1, "#c23531"]], width: 30}},
                splitLine: {show: !0, length: 30, lineStyle: {color: "#eee", width: 2, type: "solid"}},
                axisTick: {show: !0, splitNumber: 5, length: 8, lineStyle: {color: "#eee", width: 1, type: "solid"}},
                axisLabel: {show: !0, distance: 5, color: "auto"},
                pointer: {show: !0, length: "80%", width: 8},
                itemStyle: {color: "auto"},
                title: {show: !0, offsetCenter: [0, "-40%"], color: "#333", fontSize: 15},
                detail: {
                    show: !0,
                    backgroundColor: "rgba(0,0,0,0)",
                    borderWidth: 0,
                    borderColor: "#ccc",
                    width: 100,
                    height: null,
                    padding: [5, 10],
                    offsetCenter: [0, "40%"],
                    color: "auto",
                    fontSize: 30
                }
            }
        });
        var bk = kr.extend({
            type: "echartsGaugePointer",
            shape: {angle: 0, width: 10, r: 10, x: 0, y: 0},
            buildPath: function (e, t) {
                var i = Math.cos, n = Math.sin, o = t.r, a = t.width, r = t.angle,
                    s = t.x - i(r) * a * (o / 3 <= a ? 1 : 2), l = t.y - n(r) * a * (o / 3 <= a ? 1 : 2);
                r = t.angle - Math.PI / 2, e.moveTo(s, l), e.lineTo(t.x + i(r) * a, t.y + n(r) * a), e.lineTo(t.x + i(t.angle) * o, t.y + n(t.angle) * o), e.lineTo(t.x - i(r) * a, t.y - n(r) * a), e.lineTo(s, l)
            }
        });

        function Ik(e, t) {
            return t && ("string" == typeof t ? e = t.replace("{value}", null != e ? e : "") : "function" == typeof t && (e = t(e))), e
        }

        var Sk = 2 * Math.PI, _k = (fc.extend({
            type: "gauge", render: function (e, t, i) {
                this.group.removeAll();
                var n = e.get("axisLine.lineStyle.color"), o = function (e, t) {
                    var i = e.get("center"), n = t.getWidth(), o = t.getHeight(), a = Math.min(n, o);
                    return {cx: xl(i[0], t.getWidth()), cy: xl(i[1], t.getHeight()), r: xl(e.get("radius"), a / 2)}
                }(e, i);
                this._renderMain(e, t, i, n, o)
            }, dispose: function () {
            }, _renderMain: function (e, t, i, n, o) {
                for (var a = this.group, r = e.getModel("axisLine"), s = r.getModel("lineStyle"), l = e.get("clockwise"), d = -e.get("startAngle") / 180 * Math.PI, u = ((g = -e.get("endAngle") / 180 * Math.PI) - d) % Sk, c = d, h = s.get("width"), f = r.get("show"), p = 0; f && p < n.length; p++) {
                    var g, m = Math.min(Math.max(n[p][0], 0), 1), v = new Wr({
                        shape: {
                            startAngle: c,
                            endAngle: g = d + u * m,
                            cx: o.cx,
                            cy: o.cy,
                            clockwise: l,
                            r0: o.r - h,
                            r: o.r
                        }, silent: !0
                    });
                    v.setStyle({fill: n[p][1]}), v.setStyle(s.getLineStyle(["color", "borderWidth", "borderColor"])), a.add(v), c = g
                }

                function y(e) {
                    if (e <= 0) return n[0][1];
                    for (var t = 0; t < n.length; t++) if (n[t][0] >= e && (0 === t ? 0 : n[t - 1][0]) < e) return n[t][1];
                    return n[t - 1][1]
                }

                if (!l) {
                    var T = d;
                    d = g, g = T
                }
                this._renderTicks(e, t, i, y, o, d, g, l), this._renderPointer(e, t, i, y, o, d, g, l), this._renderTitle(e, t, i, y, o), this._renderDetail(e, t, i, y, o)
            }, _renderTicks: function (e, t, i, n, o, a, r, s) {
                for (var l = this.group, d = o.cx, u = o.cy, c = o.r, h = +e.get("min"), f = +e.get("max"), p = e.getModel("splitLine"), g = e.getModel("axisTick"), m = e.getModel("axisLabel"), v = e.get("splitNumber"), y = g.get("splitNumber"), T = xl(p.get("length"), c), w = xl(g.get("length"), c), k = a, C = (r - a) / v, b = C / y, I = p.getModel("lineStyle").getLineStyle(), S = g.getModel("lineStyle").getLineStyle(), _ = 0; _ <= v; _++) {
                    var D = Math.cos(k), A = Math.sin(k);
                    if (p.get("show")) {
                        var N = new is({
                            shape: {x1: D * c + d, y1: A * c + u, x2: D * (c - T) + d, y2: A * (c - T) + u},
                            style: I,
                            silent: !0
                        });
                        "auto" === I.stroke && N.setStyle({stroke: n(_ / v)}), l.add(N)
                    }
                    if (m.get("show")) {
                        var x = Ik(El(_ / v * (f - h) + h), m.get("formatter")), E = m.get("distance"), O = n(_ / v);
                        l.add(new Ur({
                            style: Zs({}, m, {
                                text: x,
                                x: D * (c - T - E) + d,
                                y: A * (c - T - E) + u,
                                textVerticalAlign: A < -.4 ? "top" : .4 < A ? "bottom" : "middle",
                                textAlign: D < -.4 ? "left" : .4 < D ? "right" : "center"
                            }, {autoColor: O}), silent: !0
                        }))
                    }
                    if (g.get("show") && _ !== v) {
                        for (var P = 0; P <= y; P++) {
                            D = Math.cos(k), A = Math.sin(k);
                            var M = new is({
                                shape: {
                                    x1: D * c + d,
                                    y1: A * c + u,
                                    x2: D * (c - w) + d,
                                    y2: A * (c - w) + u
                                }, silent: !0, style: S
                            });
                            "auto" === S.stroke && M.setStyle({stroke: n((_ + P / y) / v)}), l.add(M), k += b
                        }
                        k -= b
                    } else k += C
                }
            }, _renderPointer: function (e, t, i, n, o, a, r, s) {
                var l = this.group, d = this._data;
                if (e.get("pointer.show")) {
                    var u = [+e.get("min"), +e.get("max")], c = [a, r], h = e.getData(), f = h.mapDimension("value");
                    h.diff(d).add(function (t) {
                        var i = new bk({shape: {angle: a}});
                        rl(i, {shape: {angle: Nl(h.get(f, t), u, c, !0)}}, e), l.add(i), h.setItemGraphicEl(t, i)
                    }).update(function (t, i) {
                        var n = d.getItemGraphicEl(i);
                        al(n, {shape: {angle: Nl(h.get(f, t), u, c, !0)}}, e), l.add(n), h.setItemGraphicEl(t, n)
                    }).remove(function (e) {
                        var t = d.getItemGraphicEl(e);
                        l.remove(t)
                    }).execute(), h.eachItemGraphicEl(function (e, t) {
                        var i = h.getItemModel(t), a = i.getModel("pointer");
                        e.setShape({
                            x: o.cx,
                            y: o.cy,
                            width: xl(a.get("width"), o.r),
                            r: xl(a.get("length"), o.r)
                        }), e.useStyle(i.getModel("itemStyle").getItemStyle()), "auto" === e.style.fill && e.setStyle("fill", n(Nl(h.get(f, t), u, [0, 1], !0))), Hs(e, i.getModel("emphasis.itemStyle").getItemStyle())
                    }), this._data = h
                } else d && d.eachItemGraphicEl(function (e) {
                    l.remove(e)
                })
            }, _renderTitle: function (e, t, i, n, o) {
                var a = e.getData(), r = a.mapDimension("value"), s = e.getModel("title");
                if (s.get("show")) {
                    var l = s.get("offsetCenter"), d = o.cx + xl(l[0], o.r), u = o.cy + xl(l[1], o.r),
                        c = +e.get("min"), h = +e.get("max"), f = n(Nl(e.getData().get(r, 0), [c, h], [0, 1], !0));
                    this.group.add(new Ur({
                        silent: !0,
                        style: Zs({}, s, {
                            x: d,
                            y: u,
                            text: a.getName(0),
                            textAlign: "center",
                            textVerticalAlign: "middle"
                        }, {autoColor: f, forceRich: !0})
                    }))
                }
            }, _renderDetail: function (e, t, i, n, o) {
                var a = e.getModel("detail"), r = +e.get("min"), s = +e.get("max");
                if (a.get("show")) {
                    var l = a.get("offsetCenter"), d = o.cx + xl(l[0], o.r), u = o.cy + xl(l[1], o.r),
                        c = xl(a.get("width"), o.r), h = xl(a.get("height"), o.r), f = e.getData(),
                        p = f.get(f.mapDimension("value"), 0), g = n(Nl(p, [r, s], [0, 1], !0));
                    this.group.add(new Ur({
                        silent: !0,
                        style: Zs({}, a, {
                            x: d,
                            y: u,
                            text: Ik(p, a.get("formatter")),
                            textWidth: isNaN(c) ? null : c,
                            textHeight: isNaN(h) ? null : h,
                            textAlign: "center",
                            textVerticalAlign: "middle"
                        }, {autoColor: g, forceRich: !0})
                    }))
                }
            }
        }), kf({
            type: "series.funnel",
            init: function (e) {
                _k.superApply(this, "init", arguments), this.legendVisualProvider = new Fv(O(this.getData, this), O(this.getRawData, this)), this._defaultLabelLine(e)
            },
            getInitialData: function (e, t) {
                return Pv(this, {coordDimensions: ["value"], encodeDefaulter: P(zd, this)})
            },
            _defaultLabelLine: function (e) {
                Mo(e, "labelLine", ["show"]);
                var t = e.labelLine, i = e.emphasis.labelLine;
                t.show = t.show && e.label.show, i.show = i.show && e.emphasis.label.show
            },
            getDataParams: function (e) {
                var t = this.getData(), i = _k.superCall(this, "getDataParams", e), n = t.mapDimension("value"),
                    o = t.getSum(n);
                return i.percent = o ? +(t.get(n, e) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                legendHoverLink: !0,
                left: 80,
                top: 60,
                right: 80,
                bottom: 60,
                minSize: "0%",
                maxSize: "100%",
                sort: "descending",
                gap: 0,
                funnelAlign: "center",
                label: {show: !0, position: "outer"},
                labelLine: {show: !0, length: 20, lineStyle: {width: 1, type: "solid"}},
                itemStyle: {borderColor: "#fff", borderWidth: 1},
                emphasis: {label: {show: !0}}
            }
        }));

        function Dk(e, t) {
            Ai.call(this);
            var i = new Xr, n = new qr, o = new Ur;
            this.add(i), this.add(n), this.add(o), this.highDownOnUpdate = function (e, t) {
                "emphasis" === t ? (n.ignore = n.hoverIgnore, o.ignore = o.hoverIgnore) : (n.ignore = n.normalIgnore, o.ignore = o.normalIgnore)
            }, this.updateData(e, t, !0)
        }

        var Ak = Dk.prototype, Nk = ["itemStyle", "opacity"];

        function xk(e, t, i, n, o) {
            Ag.call(this, e, t, i), this.type = n || "value", this.axisIndex = o
        }

        function Ek(e, t, i, n, o, a) {
            e = e || 0;
            var r = i[1] - i[0];
            if (null != o && (o = Pk(o, [0, r])), null != a && (a = Math.max(a, null != o ? o : 0)), "all" === n) {
                var s = Math.abs(t[1] - t[0]);
                o = a = Pk(s = Pk(s, [0, r]), [o, a]), n = 0
            }
            t[0] = Pk(t[0], i), t[1] = Pk(t[1], i);
            var l = Ok(t, n);
            t[n] += e;
            var d = o || 0, u = i.slice();
            l.sign < 0 ? u[0] += d : u[1] -= d, t[n] = Pk(t[n], u);
            var c = Ok(t, n);
            return null != o && (c.sign !== l.sign || c.span < o) && (t[1 - n] = t[n] + l.sign * o), c = Ok(t, n), null != a && c.span > a && (t[1 - n] = t[n] + c.sign * a), t
        }

        function Ok(e, t) {
            var i = e[t] - e[1 - t];
            return {span: Math.abs(i), sign: 0 < i ? -1 : i < 0 ? 1 : t ? -1 : 1}
        }

        function Pk(e, t) {
            return Math.min(null != t[1] ? t[1] : 1 / 0, Math.max(null != t[0] ? t[0] : -1 / 0, e))
        }

        Ak.updateData = function (e, t, i) {
            var n = this.childAt(0), o = e.hostModel, a = e.getItemModel(t), r = e.getItemLayout(t),
                s = e.getItemModel(t).get(Nk);
            s = null == s ? 1 : s, n.useStyle({}), i ? (n.setShape({points: r.points}), n.setStyle({opacity: 0}), rl(n, {style: {opacity: s}}, o, t)) : al(n, {
                style: {opacity: s},
                shape: {points: r.points}
            }, o, t);
            var l = a.getModel("itemStyle"), d = e.getItemVisual(t, "color");
            n.setStyle(w({
                lineJoin: "round",
                fill: d
            }, l.getItemStyle(["opacity"]))), n.hoverStyle = l.getModel("emphasis").getItemStyle(), this._updateLabel(e, t), Hs(this)
        }, Ak._updateLabel = function (e, t) {
            var i = this.childAt(1), n = this.childAt(2), o = e.hostModel, a = e.getItemModel(t),
                r = e.getItemLayout(t).label, s = e.getItemVisual(t, "color");
            al(i, {shape: {points: r.linePoints || r.linePoints}}, o, t), al(n, {
                style: {
                    x: r.x,
                    y: r.y
                }
            }, o, t), n.attr({rotation: r.rotation, origin: [r.x, r.y], z2: 10});
            var l = a.getModel("label"), d = a.getModel("emphasis.label"), u = a.getModel("labelLine"),
                c = a.getModel("emphasis.labelLine");
            s = e.getItemVisual(t, "color"), Ys(n.style, n.hoverStyle = {}, l, d, {
                labelFetcher: e.hostModel,
                labelDataIndex: t,
                defaultText: e.getName(t),
                autoColor: s,
                useInsideStyle: !!r.inside
            }, {
                textAlign: r.textAlign,
                textVerticalAlign: r.verticalAlign
            }), n.ignore = n.normalIgnore = !l.get("show"), n.hoverIgnore = !d.get("show"), i.ignore = i.normalIgnore = !u.get("show"), i.hoverIgnore = !c.get("show"), i.setStyle({stroke: s}), i.setStyle(u.getModel("lineStyle").getLineStyle()), i.hoverStyle = c.getModel("lineStyle").getLineStyle()
        }, I(Dk, Ai), fc.extend({
            type: "funnel", render: function (e, t, i) {
                var n = e.getData(), o = this._data, a = this.group;
                n.diff(o).add(function (e) {
                    var t = new Dk(n, e);
                    n.setItemGraphicEl(e, t), a.add(t)
                }).update(function (e, t) {
                    var i = o.getItemGraphicEl(t);
                    i.updateData(n, e), a.add(i), n.setItemGraphicEl(e, i)
                }).remove(function (e) {
                    var t = o.getItemGraphicEl(e);
                    a.remove(t)
                }).execute(), this._data = n
            }, remove: function () {
                this.group.removeAll(), this._data = null
            }, dispose: function () {
            }
        }), mf(Gv("funnel")), gf(function (e, t, i) {
            e.eachSeriesByType("funnel", function (e) {
                var i = e.getData(), n = i.mapDimension("value"), o = e.get("sort"), a = function (e, t) {
                        return md(e.getBoxLayoutParams(), {width: t.getWidth(), height: t.getHeight()})
                    }(e, t), r = function (e, t) {
                        for (var i = e.mapDimension("value"), n = e.mapArray(i, function (e) {
                            return e
                        }), o = [], a = "ascending" === t, r = 0, s = e.count(); r < s; r++) o[r] = r;
                        return "function" == typeof t ? o.sort(t) : "none" !== t && o.sort(function (e, t) {
                            return a ? n[e] - n[t] : n[t] - n[e]
                        }), o
                    }(i, o), s = [xl(e.get("minSize"), a.width), xl(e.get("maxSize"), a.width)], l = i.getDataExtent(n),
                    d = e.get("min"), u = e.get("max");

                function c(e, t) {
                    var o, r = Nl(i.get(n, e) || 0, [d, u], s, !0);
                    switch (h) {
                        case"left":
                            o = a.x;
                            break;
                        case"center":
                            o = a.x + (a.width - r) / 2;
                            break;
                        case"right":
                            o = a.x + a.width - r
                    }
                    return [[o, t], [o + r, t]]
                }

                null == d && (d = Math.min(l[0], 0)), null == u && (u = l[1]);
                var h = e.get("funnelAlign"), f = e.get("gap"), p = (a.height - f * (i.count() - 1)) / i.count(),
                    g = a.y;
                "ascending" === o && (p = -p, f = -f, g += a.height, r = r.reverse());
                for (var m = 0; m < r.length; m++) {
                    var v = r[m], y = r[m + 1], T = i.getItemModel(v).get("itemStyle.height");
                    null == T ? T = p : (T = xl(T, a.height), "ascending" === o && (T = -T));
                    var w = c(v, g), k = c(y, g + T);
                    g += T + f, i.setItemLayout(v, {points: w.concat(k.slice().reverse())})
                }
                !function (e) {
                    e.each(function (t) {
                        var i, n, o, a, r = e.getItemModel(t), s = r.getModel("label").get("position"),
                            l = r.getModel("labelLine"), d = e.getItemLayout(t), u = d.points,
                            c = "inner" === s || "inside" === s || "center" === s || "insideLeft" === s || "insideRight" === s;
                        if (c) i = "insideLeft" === s ? (n = (u[0][0] + u[3][0]) / 2 + 5, o = (u[0][1] + u[3][1]) / 2, "left") : "insideRight" === s ? (n = (u[1][0] + u[2][0]) / 2 - 5, o = (u[1][1] + u[2][1]) / 2, "right") : (n = (u[0][0] + u[1][0] + u[2][0] + u[3][0]) / 4, o = (u[0][1] + u[1][1] + u[2][1] + u[3][1]) / 4, "center"), a = [[n, o], [n, o]]; else {
                            var h, f, p, g = l.get("length");
                            i = "left" === s ? (h = (u[3][0] + u[0][0]) / 2, f = (u[3][1] + u[0][1]) / 2, n = (p = h - g) - 5, "right") : "right" === s ? (h = (u[1][0] + u[2][0]) / 2, f = (u[1][1] + u[2][1]) / 2, n = (p = h + g) + 5, "left") : "rightTop" === s ? (h = u[1][0], f = u[1][1], n = (p = h + g) + 5, "top") : "rightBottom" === s ? (h = u[2][0], f = u[2][1], n = (p = h + g) + 5, "bottom") : "leftTop" === s ? (h = u[0][0], f = u[1][1], n = (p = h - g) - 5, "right") : "leftBottom" === s ? (h = u[3][0], f = u[2][1], n = (p = h - g) - 5, "right") : (h = (u[1][0] + u[2][0]) / 2, f = (u[1][1] + u[2][1]) / 2, n = (p = h + g) + 5, "left"), a = [[h, f], [p, f]], o = f
                        }
                        d.label = {linePoints: a, x: n, y: o, verticalAlign: "middle", textAlign: i, inside: c}
                    })
                }(i)
            })
        }), hf(qv("funnel")), xk.prototype = {
            constructor: xk, model: null, isHorizontal: function () {
                return "horizontal" !== this.coordinateSystem.getModel().get("layout")
            }
        }, I(xk, Ag);
        var Mk = D, Fk = Math.min, Lk = Math.max, Rk = Math.floor, Bk = Math.ceil, Uk = El, Vk = Math.PI;

        function Kk(e, t, i) {
            this._axesMap = $(), this._axesLayout = {}, this.dimensions = e.dimensions, this._rect, this._model = e, this._init(e, t, i)
        }

        function Gk(e, t) {
            return Fk(Lk(e, t[0]), t[1])
        }

        Kk.prototype = {
            type: "parallel", constructor: Kk, _init: function (e, t, i) {
                var n = e.dimensions, o = e.parallelAxisIndex;
                Mk(n, function (e, i) {
                    var n = o[i], a = t.getComponent("parallelAxis", n),
                        r = this._axesMap.set(e, new xk(e, Zp(a), [0, 0], a.get("type"), n)), s = "category" === r.type;
                    r.onBand = s && a.get("boundaryGap"), r.inverse = a.get("inverse"), (a.axis = r).model = a, r.coordinateSystem = a.coordinateSystem = this
                }, this)
            }, update: function (e, t) {
                this._updateAxesFromSeries(this._model, e)
            }, containPoint: function (e) {
                var t = this._makeLayoutInfo(), i = t.axisBase, n = t.layoutBase, o = t.pixelDimIndex, a = e[1 - o],
                    r = e[o];
                return i <= a && a <= i + t.axisLength && n <= r && r <= n + t.layoutLength
            }, getModel: function () {
                return this._model
            }, _updateAxesFromSeries: function (e, t) {
                t.eachSeries(function (i) {
                    if (e.contains(i, t)) {
                        var n = i.getData();
                        Mk(this.dimensions, function (e) {
                            var t = this._axesMap.get(e);
                            t.scale.unionExtentFromData(n, n.mapDimension(e)), Jp(t.scale, t.model)
                        }, this)
                    }
                }, this)
            }, resize: function (e, t) {
                this._rect = md(e.getBoxLayoutParams(), {
                    width: t.getWidth(),
                    height: t.getHeight()
                }), this._layoutAxes()
            }, getRect: function () {
                return this._rect
            }, _makeLayoutInfo: function () {
                var e, t = this._model, i = this._rect, n = ["x", "y"], o = ["width", "height"], a = t.get("layout"),
                    r = "horizontal" === a ? 0 : 1, s = i[o[r]], l = [0, s], d = this.dimensions.length,
                    u = Gk(t.get("axisExpandWidth"), l), c = Gk(t.get("axisExpandCount") || 0, [0, d]),
                    h = t.get("axisExpandable") && 3 < d && c < d && 1 < c && 0 < u && 0 < s,
                    f = t.get("axisExpandWindow");
                f ? (e = Gk(f[1] - f[0], l), f[1] = f[0] + e) : (e = Gk(u * (c - 1), l), (f = [u * (t.get("axisExpandCenter") || Rk(d / 2)) - e / 2])[1] = f[0] + e);
                var p = (s - e) / (d - c);
                p < 3 && (p = 0);
                var g = [Rk(Uk(f[0] / u, 1)) + 1, Bk(Uk(f[1] / u, 1)) - 1], m = p / u * f[0];
                return {
                    layout: a,
                    pixelDimIndex: r,
                    layoutBase: i[n[r]],
                    layoutLength: s,
                    axisBase: i[n[1 - r]],
                    axisLength: i[o[1 - r]],
                    axisExpandable: h,
                    axisExpandWidth: u,
                    axisCollapseWidth: p,
                    axisExpandWindow: f,
                    axisCount: d,
                    winInnerIndices: g,
                    axisExpandWindow0Pos: m
                }
            }, _layoutAxes: function () {
                var e = this._rect, t = this._axesMap, i = this.dimensions, n = this._makeLayoutInfo(), o = n.layout;
                t.each(function (e) {
                    var t = [0, n.axisLength], i = e.inverse ? 1 : 0;
                    e.setExtent(t[i], t[1 - i])
                }), Mk(i, function (t, i) {
                    var a = (n.axisExpandable ? function (e, t) {
                            var i, n, o = t.layoutLength, a = t.axisExpandWidth, r = t.axisCount, s = t.axisCollapseWidth,
                                l = t.winInnerIndices, d = s, u = !1;
                            return e < l[0] ? (i = e * s, n = s) : e <= l[1] ? (i = t.axisExpandWindow0Pos + e * a - t.axisExpandWindow[0], d = a, u = !0) : (i = o - (r - 1 - e) * s, n = s), {
                                position: i,
                                axisNameAvailableWidth: d,
                                axisLabelShow: u,
                                nameTruncateMaxWidth: n
                            }
                        } : function (e, t) {
                            var i = t.layoutLength / (t.axisCount - 1);
                            return {position: i * e, axisNameAvailableWidth: i, axisLabelShow: !0}
                        })(i, n), r = {horizontal: {x: a.position, y: n.axisLength}, vertical: {x: 0, y: a.position}},
                        s = {horizontal: Vk / 2, vertical: 0}, l = [r[o].x + e.x, r[o].y + e.y], d = s[o], u = at();
                    ut(u, u, d), dt(u, u, l), this._axesLayout[t] = {
                        position: l,
                        rotation: d,
                        transform: u,
                        axisNameAvailableWidth: a.axisNameAvailableWidth,
                        axisLabelShow: a.axisLabelShow,
                        nameTruncateMaxWidth: a.nameTruncateMaxWidth,
                        tickDirection: 1,
                        labelDirection: 1
                    }
                }, this)
            }, getAxis: function (e) {
                return this._axesMap.get(e)
            }, dataToPoint: function (e, t) {
                return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e), t)
            }, eachActiveState: function (e, t, i, n) {
                null == i && (i = 0), null == n && (n = e.count());
                var o = this._axesMap, a = this.dimensions, r = [], s = [];
                D(a, function (t) {
                    r.push(e.mapDimension(t)), s.push(o.get(t).model)
                });
                for (var l = this.hasAxisBrushed(), d = i; d < n; d++) {
                    var u;
                    if (l) {
                        u = "active";
                        for (var c = e.getValues(r, d), h = 0, f = a.length; h < f; h++) if ("inactive" === s[h].getActiveState(c[h])) {
                            u = "inactive";
                            break
                        }
                    } else u = "normal";
                    t(u, d)
                }
            }, hasAxisBrushed: function () {
                for (var e = this.dimensions, t = this._axesMap, i = !1, n = 0, o = e.length; n < o; n++) "normal" !== t.get(e[n]).model.getActiveState() && (i = !0);
                return i
            }, axisCoordToPoint: function (e, t) {
                return ll([e, 0], this._axesLayout[t].transform)
            }, getAxisLayout: function (e) {
                return m(this._axesLayout[e])
            }, getSlidedAxisExpandWindow: function (e) {
                var t = this._makeLayoutInfo(), i = t.pixelDimIndex, n = t.axisExpandWindow.slice(), o = n[1] - n[0],
                    a = [0, t.axisExpandWidth * (t.axisCount - 1)];
                if (!this.containPoint(e)) return {behavior: "none", axisExpandWindow: n};
                var r, s = e[i] - t.layoutBase - t.axisExpandWindow0Pos, l = "slide", d = t.axisCollapseWidth,
                    u = this._model.get("axisExpandSlideTriggerArea"), c = null != u[0];
                return d ? (c && d && s < o * u[0] ? (l = "jump", r = s - o * u[2]) : c && d && s > o * (1 - u[0]) ? (l = "jump", r = s - o * (1 - u[2])) : 0 <= (r = s - o * u[1]) && (r = s - o * (1 - u[1])) <= 0 && (r = 0), (r *= t.axisExpandWidth / d) ? Ek(r, n, a, "all") : l = "none") : (o = n[1] - n[0], (n = [Lk(0, a[1] * s / o - o / 2)])[1] = Fk(a[1], n[0] + o), n[0] = n[1] - o), {
                    axisExpandWindow: n,
                    behavior: l
                }
            }
        }, iu.register("parallel", {
            create: function (e, t) {
                var i = [];
                return e.eachComponent("parallel", function (n, o) {
                    var a = new Kk(n, e, t);
                    a.name = "parallel_" + o, a.resize(n, t), (n.coordinateSystem = a).model = n, i.push(a)
                }), e.eachSeries(function (t) {
                    if ("parallel" === t.get("coordinateSystem")) {
                        var i = e.queryComponents({
                            mainType: "parallel",
                            index: t.get("parallelIndex"),
                            id: t.get("parallelId")
                        })[0];
                        t.coordinateSystem = i.coordinateSystem
                    }
                }), i
            }
        });
        var Wk = Sd.extend({
            type: "baseParallelAxis", axis: null, activeIntervals: [], getAreaSelectStyle: function () {
                return oa([["fill", "color"], ["lineWidth", "borderWidth"], ["stroke", "borderColor"], ["width", "width"], ["opacity", "opacity"]])(this.getModel("areaSelectStyle"))
            }, setActiveIntervals: function (e) {
                var t = this.activeIntervals = m(e);
                if (t) for (var i = t.length - 1; 0 <= i; i--) Ol(t[i])
            }, getActiveState: function (e) {
                var t = this.activeIntervals;
                if (!t.length) return "normal";
                if (null == e || isNaN(e)) return "inactive";
                if (1 === t.length) {
                    var i = t[0];
                    if (i[0] <= e && e <= i[1]) return "active"
                } else for (var n = 0, o = t.length; n < o; n++) if (t[n][0] <= e && e <= t[n][1]) return "active";
                return "inactive"
            }
        });
        v(Wk.prototype, ig), Dm("parallel", Wk, function (e, t) {
            return t.type || (t.data ? "category" : "value")
        }, {
            type: "value",
            dim: null,
            areaSelectStyle: {
                width: 20,
                borderWidth: 1,
                borderColor: "rgba(160,197,232)",
                color: "rgba(160,197,232)",
                opacity: .3
            },
            realtime: !0,
            z: 10
        }), Sd.extend({
            type: "parallel",
            dependencies: ["parallelAxis"],
            coordinateSystem: null,
            dimensions: null,
            parallelAxisIndex: null,
            layoutMode: "box",
            defaultOption: {
                zlevel: 0,
                z: 0,
                left: 80,
                top: 60,
                right: 80,
                bottom: 60,
                layout: "horizontal",
                axisExpandable: !1,
                axisExpandCenter: null,
                axisExpandCount: 0,
                axisExpandWidth: 50,
                axisExpandRate: 17,
                axisExpandDebounce: 50,
                axisExpandSlideTriggerArea: [-.15, .05, .4],
                axisExpandTriggerOn: "click",
                parallelAxisDefault: null
            },
            init: function () {
                Sd.prototype.init.apply(this, arguments), this.mergeOption({})
            },
            mergeOption: function (e) {
                var t = this.option;
                e && v(t, e, !0), this._initDimensions()
            },
            contains: function (e, t) {
                var i = e.get("parallelIndex");
                return null != i && t.getComponent("parallel", i) === this
            },
            setAxisExpand: function (e) {
                D(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function (t) {
                    e.hasOwnProperty(t) && (this.option[t] = e[t])
                }, this)
            },
            _initDimensions: function () {
                var e = this.dimensions = [], t = this.parallelAxisIndex = [];
                D(x(this.dependentModels.parallelAxis, function (e) {
                    return (e.get("parallelIndex") || 0) === this.componentIndex
                }, this), function (i) {
                    e.push("dim" + i.get("dim")), t.push(i.componentIndex)
                })
            }
        }), ff({type: "axisAreaSelect", event: "axisAreaSelected"}, function (e, t) {
            t.eachComponent({mainType: "parallelAxis", query: e}, function (t) {
                t.axis.model.setActiveIntervals(e.intervals)
            })
        }), ff("parallelAxisExpand", function (e, t) {
            t.eachComponent({mainType: "parallel", query: e}, function (t) {
                t.setAxisExpand(e)
            })
        });
        var jk = P, Hk = D, zk = A, Xk = Math.min, qk = Math.max, Yk = Math.pow, Jk = 1e4, Zk = 6, Qk = 6,
            $k = "globalPan", eC = {w: [0, 0], e: [0, 1], n: [1, 0], s: [1, 1]},
            tC = {w: "ew", e: "ew", n: "ns", s: "ns", ne: "nesw", sw: "nesw", nw: "nwse", se: "nwse"}, iC = {
                brushStyle: {lineWidth: 2, stroke: "rgba(0,0,0,0.3)", fill: "rgba(0,0,0,0.1)"},
                transformable: !0,
                brushMode: "single",
                removeOnClick: !1
            }, nC = 0;

        function oC(e) {
            Ne.call(this), this._zr = e, this.group = new Ai, this._brushType, this._brushOption, this._panels, this._track = [], this._dragging, this._covers = [], this._creatingCover, this._creatingPanel, this._enableGlobalPan, this._uid = "brushController_" + nC++, this._handlers = {}, Hk(xC, function (e, t) {
                this._handlers[t] = O(e, this)
            }, this)
        }

        function aC(e, t) {
            var i = OC[t.brushType].createCover(e, t);
            return i.__brushOption = t, lC(i, t), e.group.add(i), i
        }

        function rC(e, t) {
            var i = uC(t);
            return i.endCreating && (i.endCreating(e, t), lC(t, t.__brushOption)), t
        }

        function sC(e, t) {
            var i = t.__brushOption;
            uC(t).updateCoverShape(e, t, i.range, i)
        }

        function lC(e, t) {
            var i = t.z;
            null == i && (i = Jk), e.traverse(function (e) {
                e.z = i, e.z2 = i
            })
        }

        function dC(e, t) {
            uC(t).updateCommon(e, t), sC(e, t)
        }

        function uC(e) {
            return OC[e.__brushOption.brushType]
        }

        function cC(e, t, i) {
            var n, o = e._panels;
            if (!o) return !0;
            var a = e._transform;
            return Hk(o, function (e) {
                e.isTargetByCursor(t, i, a) && (n = e)
            }), n
        }

        function hC(e, t) {
            var i = e._panels;
            if (!i) return !0;
            var n = t.__brushOption.panelId;
            return null == n || i[n]
        }

        function fC(e) {
            var t = e._covers, i = t.length;
            return Hk(t, function (t) {
                e.group.remove(t)
            }, e), t.length = 0, !!i
        }

        function pC(e, t) {
            var i = zk(e._covers, function (e) {
                var t = e.__brushOption, i = m(t.range);
                return {brushType: t.brushType, panelId: t.panelId, range: i}
            });
            e.trigger("brush", i, {isEnd: !!t.isEnd, removeOnClick: !!t.removeOnClick})
        }

        function gC(e) {
            var t = e.length - 1;
            return t < 0 && (t = 0), [e[0], e[t]]
        }

        function mC(e, t, i, n) {
            var o = new Ai;
            return o.add(new es({
                name: "main",
                style: wC(i),
                silent: !0,
                draggable: !0,
                cursor: "move",
                drift: jk(e, t, o, "nswe"),
                ondragend: jk(pC, t, {isEnd: !0})
            })), Hk(n, function (i) {
                o.add(new es({
                    name: i,
                    style: {opacity: 0},
                    draggable: !0,
                    silent: !0,
                    invisible: !0,
                    drift: jk(e, t, o, i),
                    ondragend: jk(pC, t, {isEnd: !0})
                }))
            }), o
        }

        function vC(e, t, i, n) {
            var o = n.brushStyle.lineWidth || 0, a = qk(o, Qk), r = i[0][0], s = i[1][0], l = r - o / 2, d = s - o / 2,
                u = i[0][1], c = i[1][1], h = u - a + o / 2, f = c - a + o / 2, p = u - r, g = c - s, m = p + o,
                v = g + o;
            TC(e, t, "main", r, s, p, g), n.transformable && (TC(e, t, "w", l, d, a, v), TC(e, t, "e", h, d, a, v), TC(e, t, "n", l, d, m, a), TC(e, t, "s", l, f, m, a), TC(e, t, "nw", l, d, a, a), TC(e, t, "ne", h, d, a, a), TC(e, t, "sw", l, f, a, a), TC(e, t, "se", h, f, a, a))
        }

        function yC(e, t) {
            var i = t.__brushOption, n = i.transformable, o = t.childAt(0);
            o.useStyle(wC(i)), o.attr({
                silent: !n,
                cursor: n ? "move" : "default"
            }), Hk(["w", "e", "n", "s", "se", "sw", "ne", "nw"], function (i) {
                var o = t.childOfName(i), a = function e(t, i) {
                    if (1 < i.length) {
                        i = i.split("");
                        var n = [e(t, i[0]), e(t, i[1])];
                        return "e" !== n[0] && "w" !== n[0] || n.reverse(), n.join("")
                    }
                    var n = dl({w: "left", e: "right", n: "top", s: "bottom"}[i], sl(t.group));
                    return {left: "w", right: "e", top: "n", bottom: "s"}[n]
                }(e, i);
                o && o.attr({silent: !n, invisible: !n, cursor: n ? tC[a] + "-resize" : null})
            })
        }

        function TC(e, t, i, n, o, a, r) {
            var s = t.childOfName(i);
            s && s.setShape(function (e) {
                var t = Xk(e[0][0], e[1][0]), i = Xk(e[0][1], e[1][1]), n = qk(e[0][0], e[1][0]),
                    o = qk(e[0][1], e[1][1]);
                return {x: t, y: i, width: n - t, height: o - i}
            }(SC(e, t, [[n, o], [n + a, o + r]])))
        }

        function wC(e) {
            return w({strokeNoScale: !0}, e.brushStyle)
        }

        function kC(e, t, i, n) {
            var o = [Xk(e, i), Xk(t, n)], a = [qk(e, i), qk(t, n)];
            return [[o[0], a[0]], [o[1], a[1]]]
        }

        function CC(e, t, i, n, o, a, r, s) {
            var l = n.__brushOption, d = e(l.range), u = IC(i, a, r);
            Hk(o.split(""), function (e) {
                var t = eC[e];
                d[t[0]][t[1]] += u[t[0]]
            }), l.range = t(kC(d[0][0], d[1][0], d[0][1], d[1][1])), dC(i, n), pC(i, {isEnd: !1})
        }

        function bC(e, t, i, n, o) {
            var a = t.__brushOption.range, r = IC(e, i, n);
            Hk(a, function (e) {
                e[0] += r[0], e[1] += r[1]
            }), dC(e, t), pC(e, {isEnd: !1})
        }

        function IC(e, t, i) {
            var n = e.group, o = n.transformCoordToLocal(t, i), a = n.transformCoordToLocal(0, 0);
            return [o[0] - a[0], o[1] - a[1]]
        }

        function SC(e, t, i) {
            var n = hC(e, t);
            return n && !0 !== n ? n.clipPath(i, e._transform) : m(i)
        }

        function _C(e) {
            var t = e.event;
            t.preventDefault && t.preventDefault()
        }

        function DC(e, t, i) {
            return e.childOfName("main").contain(t, i)
        }

        function AC(e, t, i, n) {
            var o, a = e._creatingCover, r = e._creatingPanel, s = e._brushOption;
            if (e._track.push(i.slice()), function (e) {
                var t = e._track;
                if (!t.length) return !1;
                var i = t[t.length - 1], n = t[0], o = i[0] - n[0], a = i[1] - n[1], r = Yk(o * o + a * a, .5);
                return Zk < r
            }(e) || a) {
                if (r && !a) {
                    "single" === s.brushMode && fC(e);
                    var l = m(s);
                    l.brushType = NC(l.brushType, r), l.panelId = !0 === r ? null : r.panelId, a = e._creatingCover = aC(e, l), e._covers.push(a)
                }
                if (a) {
                    var d = OC[NC(e._brushType, r)];
                    a.__brushOption.range = d.getCreatingRange(SC(e, a, e._track)), n && (rC(e, a), d.updateCommon(e, a)), sC(e, a), o = {isEnd: n}
                }
            } else n && "single" === s.brushMode && s.removeOnClick && cC(e, t, i) && fC(e) && (o = {
                isEnd: n,
                removeOnClick: !0
            });
            return o
        }

        function NC(e, t) {
            return "auto" === e ? t.defaultBrushType : e
        }

        oC.prototype = {
            constructor: oC, enableBrush: function (e) {
                return this._brushType && function (e) {
                    var t = e._zr;
                    (function (e, t, i) {
                        var n = Cy(e);
                        n[t] === i && (n[t] = null)
                    })(t, $k, e._uid), function (e, t) {
                        Hk(t, function (t, i) {
                            e.off(i, t)
                        })
                    }(t, e._handlers), e._brushType = e._brushOption = null
                }(this), e.brushType && function (e, t) {
                    var i = e._zr;
                    e._enableGlobalPan || function (e, t, i) {
                        Cy(e).globalPan = i
                    }(i, 0, e._uid), function (e, t) {
                        Hk(t, function (t, i) {
                            e.on(i, t)
                        })
                    }(i, e._handlers), e._brushType = t.brushType, e._brushOption = v(m(iC), t, !0)
                }(this, e), this
            }, setPanels: function (e) {
                if (e && e.length) {
                    var t = this._panels = {};
                    D(e, function (e) {
                        t[e.panelId] = m(e)
                    })
                } else this._panels = null;
                return this
            }, mount: function (e) {
                e = e || {}, this._enableGlobalPan = e.enableGlobalPan;
                var t = this.group;
                return this._zr.add(t), t.attr({
                    position: e.position || [0, 0],
                    rotation: e.rotation || 0,
                    scale: e.scale || [1, 1]
                }), this._transform = t.getLocalTransform(), this
            }, eachCover: function (e, t) {
                Hk(this._covers, e, t)
            }, updateCovers: function (e) {
                e = A(e, function (e) {
                    return v(m(iC), e, !0)
                });
                var t = "\0-brush-index-", i = this._covers, n = this._covers = [], o = this, a = this._creatingCover;
                return new If(i, e, function (e, t) {
                    return r(e.__brushOption, t)
                }, r).add(s).update(s).remove(function (e) {
                    i[e] !== a && o.group.remove(i[e])
                }).execute(), this;

                function r(e, i) {
                    return (null != e.id ? e.id : t + i) + "-" + e.brushType
                }

                function s(t, r) {
                    var s = e[t];
                    if (null != r && i[r] === a) n[t] = i[r]; else {
                        var l = n[t] = null != r ? (i[r].__brushOption = s, i[r]) : rC(o, aC(o, s));
                        dC(o, l)
                    }
                }
            }, unmount: function () {
                return this.enableBrush(!1), fC(this), this._zr.remove(this.group), this
            }, dispose: function () {
                this.unmount(), this.off()
            }
        }, S(oC, Ne);
        var xC = {
            mousedown: function (e) {
                if (this._dragging) EC(this, e); else if (!e.target || !e.target.draggable) {
                    _C(e);
                    var t = this.group.transformCoordToLocal(e.offsetX, e.offsetY);
                    this._creatingCover = null, (this._creatingPanel = cC(this, e, t)) && (this._dragging = !0, this._track = [t.slice()])
                }
            }, mousemove: function (e) {
                var t = e.offsetX, i = e.offsetY, n = this.group.transformCoordToLocal(t, i);
                if (function (e, t, i) {
                    if (e._brushType && !function (e, t, i) {
                        var n = e._zr;
                        return t < 0 || t > n.getWidth() || i > n.getHeight()
                    }(e, t)) {
                        var n = e._zr, o = e._covers, a = cC(e, t, i);
                        if (!e._dragging) for (var r = 0; r < o.length; r++) {
                            var s = o[r].__brushOption;
                            if (a && (!0 === a || s.panelId === a.panelId) && OC[s.brushType].contain(o[r], i[0], i[1])) return
                        }
                        a && n.setCursorStyle("crosshair")
                    }
                }(this, e, n), this._dragging) {
                    _C(e);
                    var o = AC(this, e, n, !1);
                    o && pC(this, o)
                }
            }, mouseup: function (e) {
                EC(this, e)
            }
        };

        function EC(e, t) {
            if (e._dragging) {
                _C(t);
                var i = t.offsetX, n = t.offsetY, o = e.group.transformCoordToLocal(i, n), a = AC(e, t, o, !0);
                e._dragging = !1, e._track = [], e._creatingCover = null, a && pC(e, a)
            }
        }

        var OC = {
            lineX: PC(0), lineY: PC(1), rect: {
                createCover: function (e, t) {
                    return mC(jk(CC, function (e) {
                        return e
                    }, function (e) {
                        return e
                    }), e, t, ["w", "e", "n", "s", "se", "sw", "ne", "nw"])
                }, getCreatingRange: function (e) {
                    var t = gC(e);
                    return kC(t[1][0], t[1][1], t[0][0], t[0][1])
                }, updateCoverShape: function (e, t, i, n) {
                    vC(e, t, i, n)
                }, updateCommon: yC, contain: DC
            }, polygon: {
                createCover: function (e, t) {
                    var i = new Ai;
                    return i.add(new qr({name: "main", style: wC(t), silent: !0})), i
                }, getCreatingRange: function (e) {
                    return e
                }, endCreating: function (e, t) {
                    t.remove(t.childAt(0)), t.add(new Xr({
                        name: "main",
                        draggable: !0,
                        drift: jk(bC, e, t),
                        ondragend: jk(pC, e, {isEnd: !0})
                    }))
                }, updateCoverShape: function (e, t, i, n) {
                    t.childAt(0).setShape({points: SC(e, t, i)})
                }, updateCommon: yC, contain: DC
            }
        };

        function PC(e) {
            return {
                createCover: function (t, i) {
                    return mC(jk(CC, function (t) {
                        var i = [t, [0, 100]];
                        return e && i.reverse(), i
                    }, function (t) {
                        return t[e]
                    }), t, i, [["w", "e"], ["n", "s"]][e])
                }, getCreatingRange: function (t) {
                    var i = gC(t);
                    return [Xk(i[0][e], i[1][e]), qk(i[0][e], i[1][e])]
                }, updateCoverShape: function (t, i, n, o) {
                    var a, r = hC(t, i);
                    if (!0 !== r && r.getLinearBrushOtherExtent) a = r.getLinearBrushOtherExtent(e, t._transform); else {
                        var s = t._zr;
                        a = [0, [s.getWidth(), s.getHeight()][1 - e]]
                    }
                    var l = [n, a];
                    e && l.reverse(), vC(t, i, l, o)
                }, updateCommon: yC, contain: DC
            }
        }

        function MC(e) {
            return e = RC(e), function (t, i) {
                return cl(t, e)
            }
        }

        function FC(e, t) {
            return e = RC(e), function (i) {
                var n = null != t ? t : i, o = n ? e.width : e.height, a = n ? e.x : e.y;
                return [a, a + (o || 0)]
            }
        }

        function LC(e, t, i) {
            return e = RC(e), function (n, o, a) {
                return e.contain(o[0], o[1]) && !Fy(n, t, i)
            }
        }

        function RC(e) {
            return Di.create(e)
        }

        var BC = ["axisLine", "axisTickLabel", "axisName"], UC = wf({
            type: "parallelAxis", init: function (e, t) {
                UC.superApply(this, "init", arguments), (this._brushController = new oC(t.getZr())).on("brush", O(this._onBrush, this))
            }, render: function (e, t, i, n) {
                if (!function (e, t, i) {
                    return i && "axisAreaSelect" === i.type && t.findComponents({
                        mainType: "parallelAxis",
                        query: i
                    })[0] === e
                }(e, t, n)) {
                    this.axisModel = e, this.api = i, this.group.removeAll();
                    var o = this._axisGroup;
                    if (this._axisGroup = new Ai, this.group.add(this._axisGroup), e.get("show")) {
                        var a = function (e, t) {
                                return t.getComponent("parallel", e.get("parallelIndex"))
                            }(e, t), r = a.coordinateSystem, s = e.getAreaSelectStyle(), l = s.width, d = e.axis.dim,
                            u = T({strokeContainThreshold: l}, r.getAxisLayout(d)), c = new Vm(e, u);
                        D(BC, c.add, c), this._axisGroup.add(c.getGroup()), this._refreshBrushController(u, s, e, a, l, i);
                        var h = n && !1 === n.animation ? null : e;
                        ul(o, this._axisGroup, h)
                    }
                }
            }, _refreshBrushController: function (e, t, i, n, o, a) {
                var r = i.axis.getExtent(), s = r[1] - r[0], l = Math.min(30, .1 * Math.abs(s)),
                    d = Di.create({x: r[0], y: -o / 2, width: s, height: o});
                d.x -= l, d.width += 2 * l, this._brushController.mount({
                    enableGlobalPan: !0,
                    rotation: e.rotation,
                    position: e.position
                }).setPanels([{
                    panelId: "pl",
                    clipPath: MC(d),
                    isTargetByCursor: LC(d, a, n),
                    getLinearBrushOtherExtent: FC(d, 0)
                }]).enableBrush({brushType: "lineX", brushStyle: t, removeOnClick: !0}).updateCovers(function (e) {
                    var t = e.axis;
                    return A(e.activeIntervals, function (e) {
                        return {
                            brushType: "lineX",
                            panelId: "pl",
                            range: [t.dataToCoord(e[0], !0), t.dataToCoord(e[1], !0)]
                        }
                    })
                }(i))
            }, _onBrush: function (e, t) {
                var i = this.axisModel, n = i.axis, o = A(e, function (e) {
                    return [n.coordToData(e.range[0], !0), n.coordToData(e.range[1], !0)]
                });
                !i.option.realtime !== t.isEnd && !t.removeOnClick || this.api.dispatchAction({
                    type: "axisAreaSelect",
                    parallelAxisId: i.id,
                    intervals: o
                })
            }, dispose: function () {
                this._brushController.dispose()
            }
        });
        wf({
            type: "parallel", render: function (e, t, i) {
                this._model = e, this._api = i, this._handlers || (this._handlers = {}, D(VC, function (e, t) {
                    i.getZr().on(t, this._handlers[t] = O(e, this))
                }, this)), Ic(this, "_throttledDispatchExpand", e.get("axisExpandRate"), "fixRate")
            }, dispose: function (e, t) {
                D(this._handlers, function (e, i) {
                    t.getZr().off(i, e)
                }), this._handlers = null
            }, _throttledDispatchExpand: function (e) {
                this._dispatchExpand(e)
            }, _dispatchExpand: function (e) {
                e && this._api.dispatchAction(T({type: "parallelAxisExpand"}, e))
            }
        });
        var VC = {
            mousedown: function (e) {
                KC(this, "click") && (this._mouseDownPoint = [e.offsetX, e.offsetY])
            }, mouseup: function (e) {
                var t = this._mouseDownPoint;
                if (KC(this, "click") && t) {
                    var i = [e.offsetX, e.offsetY];
                    if (5 < Math.pow(t[0] - i[0], 2) + Math.pow(t[1] - i[1], 2)) return;
                    var n = this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]);
                    "none" !== n.behavior && this._dispatchExpand({axisExpandWindow: n.axisExpandWindow})
                }
                this._mouseDownPoint = null
            }, mousemove: function (e) {
                if (!this._mouseDownPoint && KC(this, "mousemove")) {
                    var t = this._model, i = t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]),
                        n = i.behavior;
                    "jump" === n && this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")), this._throttledDispatchExpand("none" === n ? null : {
                        axisExpandWindow: i.axisExpandWindow,
                        animation: "jump" === n && null
                    })
                }
            }
        };

        function KC(e, t) {
            var i = e._model;
            return i.get("axisExpandable") && i.get("axisExpandTriggerOn") === t
        }

        function GC(e, t, i, n) {
            for (var o, a = [], r = 0; r < i.length; r++) {
                var s = i[r], l = e.get(e.mapDimension(s), t);
                o = l, ("category" === n.getAxis(s).type ? null == o : null == o || isNaN(o)) || a.push(n.dataToPoint(l, s))
            }
            return a
        }

        function WC(e, t, i, n, o) {
            var a = GC(e, i, n, o), r = new qr({shape: {points: a}, silent: !0, z2: 10});
            return t.add(r), e.setItemGraphicEl(i, r), r
        }

        function jC(e) {
            var t = e.get("smooth", !0);
            return !0 === t && (t = .3), {lineStyle: e.getModel("lineStyle").getLineStyle(), smooth: null != t ? t : .3}
        }

        function HC(e, t, i, n) {
            var o = n.lineStyle;
            t.hasItemOption && (o = t.getItemModel(i).getModel("lineStyle").getLineStyle()), e.useStyle(o);
            var a = e.style;
            a.fill = null, a.stroke = t.getItemVisual(i, "color"), a.opacity = t.getItemVisual(i, "opacity"), n.smooth && (e.shape.smooth = n.smooth)
        }

        cf(function (e) {
            var t;
            !function (e) {
                if (!e.parallel) {
                    var t = !1;
                    D(e.series, function (e) {
                        e && "parallel" === e.type && (t = !0)
                    }), t && (e.parallel = [{}])
                }
            }(e), D(Po((t = e).parallelAxis), function (e) {
                if (R(e)) {
                    var i = e.parallelIndex || 0, n = Po(t.parallel)[i];
                    n && n.parallelAxisDefault && v(e, n.parallelAxisDefault, !1)
                }
            })
        }), ec.extend({
            type: "series.parallel",
            dependencies: ["parallel"],
            visualColorAccessPath: "lineStyle.color",
            getInitialData: function (e, t) {
                var i = this.getSource();
                return function (e, t) {
                    if (!e.encodeDefine) {
                        var i = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
                        if (i) {
                            var n = e.encodeDefine = $();
                            D(i.dimensions, function (e) {
                                var t = function (e) {
                                    return +e.replace("dim", "")
                                }(e);
                                n.set(e, t)
                            })
                        }
                    }
                }(i, this), rp(i, this)
            },
            getRawIndicesByActiveState: function (e) {
                var t = this.coordinateSystem, i = this.getData(), n = [];
                return t.eachActiveState(i, function (t, o) {
                    e === t && n.push(i.getRawIndex(o))
                }), n
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "parallel",
                parallelIndex: 0,
                label: {show: !1},
                inactiveOpacity: .05,
                activeOpacity: 1,
                lineStyle: {width: 1, opacity: .45, type: "solid"},
                emphasis: {label: {show: !1}},
                progressive: 500,
                smooth: !1,
                animationEasing: "linear"
            }
        }), fc.extend({
            type: "parallel", init: function () {
                this._dataGroup = new Ai, this.group.add(this._dataGroup), this._data, this._initialized
            }, render: function (e, t, i, n) {
                var o = this._dataGroup, a = e.getData(), r = this._data, s = e.coordinateSystem, l = s.dimensions,
                    d = jC(e);
                if (a.diff(r).add(function (e) {
                    HC(WC(a, o, e, l, s), a, e, d)
                }).update(function (t, i) {
                    var o = r.getItemGraphicEl(i), u = GC(a, t, l, s);
                    a.setItemGraphicEl(t, o);
                    var c = n && !1 === n.animation ? null : e;
                    al(o, {shape: {points: u}}, c, t), HC(o, a, t, d)
                }).remove(function (e) {
                    var t = r.getItemGraphicEl(e);
                    o.remove(t)
                }).execute(), !this._initialized) {
                    this._initialized = !0;
                    var u = function (e, t, i) {
                        var n = e.model, o = e.getRect(),
                            a = new es({shape: {x: o.x, y: o.y, width: o.width, height: o.height}}),
                            r = "horizontal" === n.get("layout") ? "width" : "height";
                        return a.setShape(r, 0), rl(a, {shape: {width: o.width, height: o.height}}, t, i), a
                    }(s, e, function () {
                        setTimeout(function () {
                            o.removeClipPath()
                        })
                    });
                    o.setClipPath(u)
                }
                this._data = a
            }, incrementalPrepareRender: function (e, t, i) {
                this._initialized = !0, this._data = null, this._dataGroup.removeAll()
            }, incrementalRender: function (e, t, i) {
                for (var n = t.getData(), o = t.coordinateSystem, a = o.dimensions, r = jC(t), s = e.start; s < e.end; s++) {
                    var l = WC(n, this._dataGroup, s, a, o);
                    l.incremental = !0, HC(l, n, s, r)
                }
            }, dispose: function () {
            }, remove: function () {
                this._dataGroup && this._dataGroup.removeAll(), this._data = null
            }
        });
        var zC = ["lineStyle", "normal", "opacity"];
        mf({
            seriesType: "parallel", reset: function (e, t, i) {
                var n = e.getModel("itemStyle"), o = e.getModel("lineStyle"), a = t.get("color"),
                    r = o.get("color") || n.get("color") || a[e.seriesIndex % a.length], s = e.get("inactiveOpacity"),
                    l = e.get("activeOpacity"), d = e.getModel("lineStyle").getLineStyle(), u = e.coordinateSystem,
                    c = e.getData(), h = {normal: d.opacity, active: l, inactive: s};
                return c.setVisual("color", r), {
                    progress: function (e, t) {
                        u.eachActiveState(t, function (e, i) {
                            var n = h[e];
                            if ("normal" === e && t.hasItemOption) {
                                var o = t.getItemModel(i).get(zC, !0);
                                null != o && (n = o)
                            }
                            t.setItemVisual(i, "opacity", n)
                        }, e.start, e.end)
                    }
                }
            }
        });
        var XC = ec.extend({
                type: "series.sankey",
                layoutInfo: null,
                levelModels: null,
                getInitialData: function (e, t) {
                    for (var i = e.edges || e.links, n = e.data || e.nodes, o = e.levels, a = this.levelModels = {}, r = 0; r < o.length; r++) null != o[r].depth && 0 <= o[r].depth && (a[o[r].depth] = new bl(o[r], this, t));
                    if (n && i) return Fw(n, i, this, !0, function (e, t) {
                        e.wrapMethod("getItemModel", function (e, t) {
                            return e.customizeGetParent(function (e) {
                                var i = this.parentModel, n = i.getData().getItemLayout(t).depth;
                                return i.levelModels[n] || this.parentModel
                            }), e
                        }), t.wrapMethod("getItemModel", function (e, t) {
                            return e.customizeGetParent(function (e) {
                                var i = this.parentModel, n = i.getGraph().getEdgeByIndex(t).node1.getLayout().depth;
                                return i.levelModels[n] || this.parentModel
                            }), e
                        })
                    }).data
                },
                setNodePosition: function (e, t) {
                    var i = this.option.data[e];
                    i.localX = t[0], i.localY = t[1]
                },
                getGraph: function () {
                    return this.getData().graph
                },
                getEdgeData: function () {
                    return this.getGraph().edgeData
                },
                formatTooltip: function (e, t, i) {
                    if ("edge" === i) {
                        var n = this.getDataParams(e, i), o = n.data, a = o.source + " -- " + o.target;
                        return n.value && (a += " : " + n.value), $l(a)
                    }
                    if ("node" !== i) return XC.superCall(this, "formatTooltip", e, t);
                    var r = this.getGraph().getNodeByIndex(e).getLayout().value, s = this.getDataParams(e, i).data.name;
                    return r && (a = s + " : " + r), $l(a)
                },
                optionUpdated: function () {
                    var e = this.option;
                    !0 === e.focusNodeAdjacency && (e.focusNodeAdjacency = "allEdges")
                },
                getDataParams: function (e, t) {
                    var i = XC.superCall(this, "getDataParams", e, t);
                    if (null == i.value && "node" === t) {
                        var n = this.getGraph().getNodeByIndex(e).getLayout().value;
                        i.value = n
                    }
                    return i
                },
                defaultOption: {
                    zlevel: 0,
                    z: 2,
                    coordinateSystem: "view",
                    layout: null,
                    left: "5%",
                    top: "5%",
                    right: "20%",
                    bottom: "5%",
                    orient: "horizontal",
                    nodeWidth: 20,
                    nodeGap: 8,
                    draggable: !0,
                    focusNodeAdjacency: !1,
                    layoutIterations: 32,
                    label: {show: !0, position: "right", color: "#000", fontSize: 12},
                    levels: [],
                    nodeAlign: "justify",
                    itemStyle: {borderWidth: 1, borderColor: "#333"},
                    lineStyle: {color: "#314656", opacity: .2, curveness: .5},
                    emphasis: {label: {show: !0}, lineStyle: {opacity: .5}},
                    animationEasing: "linear",
                    animationDuration: 1e3
                }
            }), qC = ["itemStyle", "opacity"], YC = ["emphasis", "itemStyle", "opacity"], JC = ["lineStyle", "opacity"],
            ZC = ["emphasis", "lineStyle", "opacity"];

        function QC(e, t) {
            return e.getVisual("opacity") || e.getModel().get(t)
        }

        function $C(e, t, i) {
            var n = e.getGraphicEl(), o = QC(e, t);
            null != i && (null == o && (o = 1), o *= i), n.downplay && n.downplay(), n.traverse(function (e) {
                "group" !== e.type && e.setStyle("opacity", o)
            })
        }

        function eb(e, t) {
            var i = QC(e, t), n = e.getGraphicEl();
            n.traverse(function (e) {
                "group" !== e.type && e.setStyle("opacity", i)
            }), n.highlight && n.highlight()
        }

        var tb = bs({
            shape: {x1: 0, y1: 0, x2: 0, y2: 0, cpx1: 0, cpy1: 0, cpx2: 0, cpy2: 0, extent: 0, orient: ""},
            buildPath: function (e, t) {
                var i = t.extent;
                e.moveTo(t.x1, t.y1), e.bezierCurveTo(t.cpx1, t.cpy1, t.cpx2, t.cpy2, t.x2, t.y2), "vertical" === t.orient ? (e.lineTo(t.x2 + i, t.y2), e.bezierCurveTo(t.cpx2 + i, t.cpy2, t.cpx1 + i, t.cpy1, t.x1 + i, t.y1)) : (e.lineTo(t.x2, t.y2 + i), e.bezierCurveTo(t.cpx2, t.cpy2 + i, t.cpx1, t.cpy1 + i, t.x1, t.y1 + i)), e.closePath()
            },
            highlight: function () {
                this.trigger("emphasis")
            },
            downplay: function () {
                this.trigger("normal")
            }
        });

        function ib(e) {
            var t = e.hostGraph.data.getRawDataItem(e.dataIndex);
            return null != t.depth && 0 <= t.depth
        }

        function nb(e, t, i, n, o) {
            var a = "vertical" === o ? "x" : "y";
            D(e, function (e) {
                var r, s, l;
                e.sort(function (e, t) {
                    return e.getLayout()[a] - t.getLayout()[a]
                });
                for (var d = 0, u = e.length, c = "vertical" === o ? "dx" : "dy", h = 0; h < u; h++) 0 < (l = d - (s = e[h]).getLayout()[a]) && (r = s.getLayout()[a] + l, "vertical" === o ? s.setLayout({x: r}, !0) : s.setLayout({y: r}, !0)), d = s.getLayout()[a] + s.getLayout()[c] + t;
                if (0 < (l = d - t - ("vertical" === o ? n : i))) for (r = s.getLayout()[a] - l, "vertical" === o ? s.setLayout({x: r}, !0) : s.setLayout({y: r}, !0), d = r, h = u - 2; 0 <= h; --h) 0 < (l = (s = e[h]).getLayout()[a] + s.getLayout()[c] + t - d) && (r = s.getLayout()[a] - l, "vertical" === o ? s.setLayout({x: r}, !0) : s.setLayout({y: r}, !0)), d = s.getLayout()[a]
            })
        }

        function ob(e, t, i) {
            D(e.slice().reverse(), function (e) {
                D(e, function (e) {
                    if (e.outEdges.length) {
                        var n = cb(e.outEdges, ab, i) / cb(e.outEdges, ub, i);
                        if (isNaN(n)) {
                            var o = e.outEdges.length;
                            n = o ? cb(e.outEdges, rb, i) / o : 0
                        }
                        if ("vertical" === i) {
                            var a = e.getLayout().x + (n - db(e, i)) * t;
                            e.setLayout({x: a}, !0)
                        } else {
                            var r = e.getLayout().y + (n - db(e, i)) * t;
                            e.setLayout({y: r}, !0)
                        }
                    }
                })
            })
        }

        function ab(e, t) {
            return db(e.node2, t) * e.getValue()
        }

        function rb(e, t) {
            return db(e.node2, t)
        }

        function sb(e, t) {
            return db(e.node1, t) * e.getValue()
        }

        function lb(e, t) {
            return db(e.node1, t)
        }

        function db(e, t) {
            return "vertical" === t ? e.getLayout().x + e.getLayout().dx / 2 : e.getLayout().y + e.getLayout().dy / 2
        }

        function ub(e) {
            return e.getValue()
        }

        function cb(e, t, i) {
            for (var n = 0, o = e.length, a = -1; ++a < o;) {
                var r = +t.call(e, e[a], i);
                isNaN(r) || (n += r)
            }
            return n
        }

        function hb(e, t, i) {
            D(e, function (e) {
                D(e, function (e) {
                    if (e.inEdges.length) {
                        var n = cb(e.inEdges, sb, i) / cb(e.inEdges, ub, i);
                        if (isNaN(n)) {
                            var o = e.inEdges.length;
                            n = o ? cb(e.inEdges, lb, i) / o : 0
                        }
                        if ("vertical" === i) {
                            var a = e.getLayout().x + (n - db(e, i)) * t;
                            e.setLayout({x: a}, !0)
                        } else {
                            var r = e.getLayout().y + (n - db(e, i)) * t;
                            e.setLayout({y: r}, !0)
                        }
                    }
                })
            })
        }

        Cf({
            type: "sankey", _model: null, _focusAdjacencyDisabled: !1, render: function (e, t, i) {
                var n = this, o = e.getGraph(), a = this.group, r = e.layoutInfo, s = r.width, l = r.height,
                    d = e.getData(), u = e.getData("edge"), c = e.get("orient");
                this._model = e, a.removeAll(), a.attr("position", [r.x, r.y]), o.eachEdge(function (t) {
                    var i = new tb;
                    i.dataIndex = t.dataIndex, i.seriesIndex = e.seriesIndex, i.dataType = "edge";
                    var n, o, r, d, h, f, p, g, m = t.getModel("lineStyle"), v = m.get("curveness"),
                        y = t.node1.getLayout(), T = t.node1.getModel(), w = T.get("localX"), k = T.get("localY"),
                        C = t.node2.getLayout(), b = t.node2.getModel(), I = b.get("localX"), S = b.get("localY"),
                        _ = t.getLayout();
                    switch (i.shape.extent = Math.max(1, _.dy), g = "vertical" === (i.shape.orient = c) ? (n = (null != w ? w * s : y.x) + _.sy, o = (null != k ? k * l : y.y) + y.dy, r = (null != I ? I * s : C.x) + _.ty, h = n, f = o * (1 - v) + (d = null != S ? S * l : C.y) * v, p = r, o * v + d * (1 - v)) : (n = (null != w ? w * s : y.x) + y.dx, o = (null != k ? k * l : y.y) + _.sy, h = n * (1 - v) + (r = null != I ? I * s : C.x) * v, f = o, p = n * v + r * (1 - v), d = (null != S ? S * l : C.y) + _.ty), i.setShape({
                        x1: n,
                        y1: o,
                        x2: r,
                        y2: d,
                        cpx1: h,
                        cpy1: f,
                        cpx2: p,
                        cpy2: g
                    }), i.setStyle(m.getItemStyle()), i.style.fill) {
                        case"source":
                            i.style.fill = t.node1.getVisual("color");
                            break;
                        case"target":
                            i.style.fill = t.node2.getVisual("color")
                    }
                    Hs(i, t.getModel("emphasis.lineStyle").getItemStyle()), a.add(i), u.setItemGraphicEl(t.dataIndex, i)
                }), o.eachNode(function (t) {
                    var i = t.getLayout(), n = t.getModel(), o = n.get("localX"), r = n.get("localY"),
                        u = n.getModel("label"), c = n.getModel("emphasis.label"), h = new es({
                            shape: {
                                x: null != o ? o * s : i.x,
                                y: null != r ? r * l : i.y,
                                width: i.dx,
                                height: i.dy
                            }, style: n.getModel("itemStyle").getItemStyle()
                        }), f = t.getModel("emphasis.itemStyle").getItemStyle();
                    Ys(h.style, f, u, c, {
                        labelFetcher: e,
                        labelDataIndex: t.dataIndex,
                        defaultText: t.id,
                        isRectText: !0
                    }), h.setStyle("fill", t.getVisual("color")), Hs(h, f), a.add(h), d.setItemGraphicEl(t.dataIndex, h), h.dataType = "node"
                }), d.eachItemGraphicEl(function (t, o) {
                    var a = d.getItemModel(o);
                    a.get("draggable") && (t.drift = function (t, a) {
                        n._focusAdjacencyDisabled = !0, this.shape.x += t, this.shape.y += a, this.dirty(), i.dispatchAction({
                            type: "dragNode",
                            seriesId: e.id,
                            dataIndex: d.getRawIndex(o),
                            localX: this.shape.x / s,
                            localY: this.shape.y / l
                        })
                    }, t.ondragend = function () {
                        n._focusAdjacencyDisabled = !1
                    }, t.draggable = !0, t.cursor = "move"), t.highlight = function () {
                        this.trigger("emphasis")
                    }, t.downplay = function () {
                        this.trigger("normal")
                    }, t.focusNodeAdjHandler && t.off("mouseover", t.focusNodeAdjHandler), t.unfocusNodeAdjHandler && t.off("mouseout", t.unfocusNodeAdjHandler), a.get("focusNodeAdjacency") && (t.on("mouseover", t.focusNodeAdjHandler = function () {
                        n._focusAdjacencyDisabled || (n._clearTimer(), i.dispatchAction({
                            type: "focusNodeAdjacency",
                            seriesId: e.id,
                            dataIndex: t.dataIndex
                        }))
                    }), t.on("mouseout", t.unfocusNodeAdjHandler = function () {
                        n._focusAdjacencyDisabled || n._dispatchUnfocus(i)
                    }))
                }), u.eachItemGraphicEl(function (t, o) {
                    var a = u.getItemModel(o);
                    t.focusNodeAdjHandler && t.off("mouseover", t.focusNodeAdjHandler), t.unfocusNodeAdjHandler && t.off("mouseout", t.unfocusNodeAdjHandler), a.get("focusNodeAdjacency") && (t.on("mouseover", t.focusNodeAdjHandler = function () {
                        n._focusAdjacencyDisabled || (n._clearTimer(), i.dispatchAction({
                            type: "focusNodeAdjacency",
                            seriesId: e.id,
                            edgeDataIndex: t.dataIndex
                        }))
                    }), t.on("mouseout", t.unfocusNodeAdjHandler = function () {
                        n._focusAdjacencyDisabled || n._dispatchUnfocus(i)
                    }))
                }), !this._data && e.get("animation") && a.setClipPath(function (e, t, i) {
                    var n = new es({shape: {x: e.x - 10, y: e.y - 10, width: 0, height: e.height + 20}});
                    return rl(n, {shape: {width: e.width + 20}}, t, function () {
                        a.removeClipPath()
                    }), n
                }(a.getBoundingRect(), e)), this._data = e.getData()
            }, dispose: function () {
                this._clearTimer()
            }, _dispatchUnfocus: function (e) {
                var t = this;
                this._clearTimer(), this._unfocusDelayTimer = setTimeout(function () {
                    t._unfocusDelayTimer = null, e.dispatchAction({type: "unfocusNodeAdjacency", seriesId: t._model.id})
                }, 500)
            }, _clearTimer: function () {
                this._unfocusDelayTimer && (clearTimeout(this._unfocusDelayTimer), this._unfocusDelayTimer = null)
            }, focusNodeAdjacency: function (e, t, i, n) {
                var o = e.getData(), a = o.graph, r = n.dataIndex, s = o.getItemModel(r), l = n.edgeDataIndex;
                if (null != r || null != l) {
                    var d = a.getNodeByIndex(r), u = a.getEdgeByIndex(l);
                    if (a.eachNode(function (e) {
                        $C(e, qC, .1)
                    }), a.eachEdge(function (e) {
                        $C(e, JC, .1)
                    }), d) {
                        eb(d, YC);
                        var c = s.get("focusNodeAdjacency");
                        "outEdges" === c ? D(d.outEdges, function (e) {
                            e.dataIndex < 0 || (eb(e, ZC), eb(e.node2, YC))
                        }) : "inEdges" === c ? D(d.inEdges, function (e) {
                            e.dataIndex < 0 || (eb(e, ZC), eb(e.node1, YC))
                        }) : "allEdges" === c && D(d.edges, function (e) {
                            e.dataIndex < 0 || (eb(e, ZC), e.node1 !== d && eb(e.node1, YC), e.node2 !== d && eb(e.node2, YC))
                        })
                    }
                    u && (eb(u, ZC), eb(u.node1, YC), eb(u.node2, YC))
                }
            }, unfocusNodeAdjacency: function (e, t, i, n) {
                var o = e.getGraph();
                o.eachNode(function (e) {
                    $C(e, qC)
                }), o.eachEdge(function (e) {
                    $C(e, JC)
                })
            }
        }), ff({type: "dragNode", event: "dragnode", update: "update"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "sankey", query: e}, function (t) {
                t.setNodePosition(e.dataIndex, [e.localX, e.localY])
            })
        }), gf(function (e, t, i) {
            e.eachSeriesByType("sankey", function (e) {
                var i = e.get("nodeWidth"), n = e.get("nodeGap"), o = function (e, t) {
                    return md(e.getBoxLayoutParams(), {width: t.getWidth(), height: t.getHeight()})
                }(e, t), a = (e.layoutInfo = o).width, r = o.height, s = e.getGraph(), l = s.nodes, d = s.edges;
                !function (e) {
                    D(e, function (e) {
                        var t = cb(e.outEdges, ub), i = cb(e.inEdges, ub), n = e.getValue() || 0, o = Math.max(t, i, n);
                        e.setLayout({value: o}, !0)
                    })
                }(l), function (e, t, i, n, o, a, r, s, l) {
                    (function (e, t, i, n, o, a, r) {
                        for (var s = [], l = [], d = [], u = [], c = 0, h = 0; h < t.length; h++) s[h] = 1;
                        for (h = 0; h < e.length; h++) l[h] = e[h].inEdges.length, 0 === l[h] && d.push(e[h]);
                        for (var f = -1; d.length;) {
                            for (var p = 0; p < d.length; p++) {
                                var g = d[p], m = g.hostGraph.data.getRawDataItem(g.dataIndex),
                                    v = null != m.depth && 0 <= m.depth;
                                v && m.depth > f && (f = m.depth), g.setLayout({depth: v ? m.depth : c}, !0), "vertical" === a ? g.setLayout({dy: i}, !0) : g.setLayout({dx: i}, !0);
                                for (var y = 0; y < g.outEdges.length; y++) {
                                    var T = g.outEdges[y], w = t.indexOf(T);
                                    s[w] = 0;
                                    var k = T.node2, C = e.indexOf(k);
                                    0 == --l[C] && u.indexOf(k) < 0 && u.push(k)
                                }
                            }
                            ++c, d = u, u = []
                        }
                        for (h = 0; h < s.length; h++) if (1 === s[h]) throw new Error("Sankey is a DAG, the original data has cycle!");
                        var b = c - 1 < f ? f : c - 1;
                        r && "left" !== r && function (e, t, i, n) {
                            if ("right" === t) {
                                for (var o = [], a = e, r = 0; a.length;) {
                                    for (var s = 0; s < a.length; s++) {
                                        var l = a[s];
                                        l.setLayout({skNodeHeight: r}, !0);
                                        for (var d = 0; d < l.inEdges.length; d++) {
                                            var u = l.inEdges[d];
                                            o.indexOf(u.node1) < 0 && o.push(u.node1)
                                        }
                                    }
                                    a = o, o = [], ++r
                                }
                                D(e, function (e) {
                                    ib(e) || e.setLayout({depth: Math.max(0, n - e.getLayout().skNodeHeight)}, !0)
                                })
                            } else "justify" === t && function (e, t) {
                                D(e, function (e) {
                                    ib(e) || e.outEdges.length || e.setLayout({depth: t}, !0)
                                })
                            }(e, n)
                        }(e, r, 0, b), function (e, t, i) {
                            D(e, function (e) {
                                var n = e.getLayout().depth * t;
                                "vertical" === i ? e.setLayout({y: n}, !0) : e.setLayout({x: n}, !0)
                            })
                        }(e, "vertical" === a ? (o - i) / b : (n - i) / b, a)
                    })(e, t, i, o, a, s, l), function (e, t, i, n, o, a, r) {
                        var s = function (e, t) {
                            var i = [], n = "x", o = qo(e, function (e) {
                                return e.getLayout()[n]
                            });
                            return o.keys.sort(function (e, t) {
                                return e - t
                            }), D(o.keys, function (e) {
                                i.push(o.buckets.get(e))
                            }), i
                        }(e);
                        (function (e, t, i, n, o, a) {
                            var r = 1 / 0;
                            D(e, function (e) {
                                var t = e.length, s = 0;
                                D(e, function (e) {
                                    s += e.getLayout().value
                                });
                                var l = "vertical" === a ? (n - (t - 1) * o) / s : (i - (t - 1) * o) / s;
                                l < r && (r = l)
                            }), D(e, function (e) {
                                D(e, function (e, t) {
                                    var i = e.getLayout().value * r;
                                    "vertical" === a ? (e.setLayout({x: t}, !0), e.setLayout({dx: i}, !0)) : (e.setLayout({y: t}, !0), e.setLayout({dy: i}, !0))
                                })
                            }), D(t, function (e) {
                                var t = +e.getValue() * r;
                                e.setLayout({dy: t}, !0)
                            })
                        })(s, t, i, n, o, r), nb(s, o, i, n, r);
                        for (var l = 1; 0 < a; a--) ob(s, l *= .99, r), nb(s, o, i, n, r), hb(s, l, r), nb(s, o, i, n, r)
                    }(e, t, a, o, n, r, s), function (e, t) {
                        var i = "y";
                        D(e, function (e) {
                            e.outEdges.sort(function (e, t) {
                                return e.node2.getLayout()[i] - t.node2.getLayout()[i]
                            }), e.inEdges.sort(function (e, t) {
                                return e.node1.getLayout()[i] - t.node1.getLayout()[i]
                            })
                        }), D(e, function (e) {
                            var t = 0, i = 0;
                            D(e.outEdges, function (e) {
                                e.setLayout({sy: t}, !0), t += e.getLayout().dy
                            }), D(e.inEdges, function (e) {
                                e.setLayout({ty: i}, !0), i += e.getLayout().dy
                            })
                        })
                    }(e)
                }(l, d, i, n, a, r, 0 !== x(l, function (e) {
                    return 0 === e.getLayout().value
                }).length ? 0 : e.get("layoutIterations"), e.get("orient"), e.get("nodeAlign"))
            })
        }), mf(function (e, t) {
            e.eachSeriesByType("sankey", function (e) {
                var t = e.getGraph().nodes;
                if (t.length) {
                    var i = 1 / 0, n = -1 / 0;
                    D(t, function (e) {
                        var t = e.getLayout().value;
                        t < i && (i = t), n < t && (n = t)
                    }), D(t, function (t) {
                        var o = new ZT({
                            type: "color",
                            mappingMethod: "linear",
                            dataExtent: [i, n],
                            visual: e.get("color")
                        }).mapValueToVisual(t.getLayout().value), a = t.getModel().get("itemStyle.color");
                        null != a ? t.setVisual("color", a) : t.setVisual("color", o)
                    })
                }
            })
        });
        var fb = {
            _baseAxisDim: null, getInitialData: function (e, t) {
                var i, n, o = t.getComponent("xAxis", this.get("xAxisIndex")),
                    a = t.getComponent("yAxis", this.get("yAxisIndex")), r = o.get("type"), s = a.get("type");
                "category" === r ? (e.layout = "horizontal", i = o.getOrdinalMeta(), n = !0) : "category" === s ? (e.layout = "vertical", i = a.getOrdinalMeta(), n = !0) : e.layout = e.layout || "horizontal";
                var l = ["x", "y"], d = "horizontal" === e.layout ? 0 : 1, u = this._baseAxisDim = l[d], c = l[1 - d],
                    h = [o, a], f = h[d].get("type"), p = h[1 - d].get("type"), g = e.data;
                if (g && n) {
                    var m = [];
                    D(g, function (e, t) {
                        var i;
                        e.value && M(e.value) ? (i = e.value.slice(), e.value.unshift(t)) : M(e) ? (i = e.slice(), e.unshift(t)) : i = e, m.push(i)
                    }), e.data = m
                }
                var v = this.defaultValueDimensions, y = [{
                    name: u,
                    type: Af(f),
                    ordinalMeta: i,
                    otherDims: {tooltip: !1, itemName: 0},
                    dimsDef: ["base"]
                }, {name: c, type: Af(p), dimsDef: v.slice()}];
                return Pv(this, {coordDimensions: y, dimensionsCount: v.length + 1, encodeDefaulter: P(Hd, y, this)})
            }, getBaseAxis: function () {
                var e = this._baseAxisDim;
                return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis
            }
        };
        S(ec.extend({
            type: "series.boxplot",
            dependencies: ["xAxis", "yAxis", "grid"],
            defaultValueDimensions: [{name: "min", defaultTooltip: !0}, {
                name: "Q1",
                defaultTooltip: !0
            }, {name: "median", defaultTooltip: !0}, {name: "Q3", defaultTooltip: !0}, {
                name: "max",
                defaultTooltip: !0
            }],
            dimensions: null,
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "cartesian2d",
                legendHoverLink: !0,
                hoverAnimation: !0,
                layout: null,
                boxWidth: [7, 50],
                itemStyle: {color: "#fff", borderWidth: 1},
                emphasis: {
                    itemStyle: {
                        borderWidth: 2,
                        shadowBlur: 5,
                        shadowOffsetX: 2,
                        shadowOffsetY: 2,
                        shadowColor: "rgba(0,0,0,0.4)"
                    }
                },
                animationEasing: "elasticOut",
                animationDuration: 800
            }
        }), fb, !0);
        var pb = ["itemStyle"], gb = ["emphasis", "itemStyle"], mb = (fc.extend({
            type: "boxplot", render: function (e, t, i) {
                var n = e.getData(), o = this.group, a = this._data;
                this._data || o.removeAll();
                var r = "horizontal" === e.get("layout") ? 1 : 0;
                n.diff(a).add(function (e) {
                    if (n.hasValue(e)) {
                        var t = vb(n.getItemLayout(e), n, e, r, !0);
                        n.setItemGraphicEl(e, t), o.add(t)
                    }
                }).update(function (e, t) {
                    var i = a.getItemGraphicEl(t);
                    if (n.hasValue(e)) {
                        var s = n.getItemLayout(e);
                        i ? yb(s, i, n, e) : i = vb(s, n, e, r), o.add(i), n.setItemGraphicEl(e, i)
                    } else o.remove(i)
                }).remove(function (e) {
                    var t = a.getItemGraphicEl(e);
                    t && o.remove(t)
                }).execute(), this._data = n
            }, remove: function (e) {
                var t = this.group, i = this._data;
                this._data = null, i && i.eachItemGraphicEl(function (e) {
                    e && t.remove(e)
                })
            }, dispose: te
        }), kr.extend({
            type: "boxplotBoxPath", shape: {}, buildPath: function (e, t) {
                var i = t.points, n = 0;
                for (e.moveTo(i[n][0], i[n][1]), n++; n < 4; n++) e.lineTo(i[n][0], i[n][1]);
                for (e.closePath(); n < i.length; n++) e.moveTo(i[n][0], i[n][1]), n++, e.lineTo(i[n][0], i[n][1])
            }
        }));

        function vb(e, t, i, n, o) {
            var a = e.ends, r = new mb({
                shape: {
                    points: o ? function (e, t, i) {
                        return A(e, function (e) {
                            return (e = e.slice())[t] = i.initBaseline, e
                        })
                    }(a, n, e) : a
                }
            });
            return yb(e, r, t, i, o), r
        }

        function yb(e, t, i, n, o) {
            var a = i.hostModel;
            (0, ml[o ? "initProps" : "updateProps"])(t, {shape: {points: e.ends}}, a, n);
            var r = i.getItemModel(n), s = r.getModel(pb), l = i.getItemVisual(n, "color"),
                d = s.getItemStyle(["borderColor"]);
            d.stroke = l, d.strokeNoScale = !0, t.useStyle(d), t.z2 = 100, Hs(t, r.getModel(gb).getItemStyle())
        }

        var Tb = ["itemStyle", "borderColor"], wb = D;
        mf(function (e, t) {
            var i = e.get("color");
            e.eachRawSeriesByType("boxplot", function (t) {
                var n = i[t.seriesIndex % i.length], o = t.getData();
                o.setVisual({
                    legendSymbol: "roundRect",
                    color: t.get(Tb) || n
                }), e.isSeriesFiltered(t) || o.each(function (e) {
                    var t = o.getItemModel(e);
                    o.setItemVisual(e, {color: t.get(Tb, !0)})
                })
            })
        }), gf(function (e) {
            var t = function (e) {
                var t = [], i = [];
                return e.eachSeriesByType("boxplot", function (e) {
                    var n = e.getBaseAxis(), o = b(i, n);
                    o < 0 && (o = i.length, i[o] = n, t[o] = {axis: n, seriesModels: []}), t[o].seriesModels.push(e)
                }), t
            }(e);
            wb(t, function (e) {
                var t = e.seriesModels;
                t.length && (function (e) {
                    var t, i, n = e.axis, o = e.seriesModels, a = o.length, r = e.boxWidthList = [],
                        s = e.boxOffsetList = [], l = [];
                    if ("category" === n.type) i = n.getBandWidth(); else {
                        var d = 0;
                        wb(o, function (e) {
                            d = Math.max(d, e.getData().count())
                        }), t = n.getExtent(), Math.abs(t[1] - t[0])
                    }
                    wb(o, function (e) {
                        var t = e.get("boxWidth");
                        M(t) || (t = [t, t]), l.push([xl(t[0], i) || 0, xl(t[1], i) || 0])
                    });
                    var u = .8 * i - 2, c = u / a * .3, h = (u - c * (a - 1)) / a, f = h / 2 - u / 2;
                    wb(o, function (e, t) {
                        s.push(f), f += c + h, r.push(Math.min(Math.max(h, l[t][0]), l[t][1]))
                    })
                }(e), wb(t, function (t, i) {
                    !function (e, t, i) {
                        var n = e.coordinateSystem, o = e.getData(), a = i / 2,
                            r = "horizontal" === e.get("layout") ? 0 : 1, s = 1 - r, l = ["x", "y"],
                            d = o.mapDimension(l[r]), u = o.mapDimension(l[s], !0);
                        if (!(null == d || u.length < 5)) for (var c = 0; c < o.count(); c++) {
                            var h = o.get(d, c), f = T(h, u[2], c), p = T(h, u[0], c), g = T(h, u[1], c),
                                m = T(h, u[3], c), v = T(h, u[4], c), y = [];
                            w(y, g, 0), w(y, m, 1), y.push(p, g, v, m), k(y, p), k(y, v), k(y, f), o.setItemLayout(c, {
                                initBaseline: f[s],
                                ends: y
                            })
                        }

                        function T(e, i, a) {
                            var l, d = o.get(i, a), u = [];
                            return u[r] = e, u[s] = d, isNaN(e) || isNaN(d) ? l = [NaN, NaN] : (l = n.dataToPoint(u))[r] += t, l
                        }

                        function w(e, t, i) {
                            var n = t.slice(), o = t.slice();
                            n[r] += a, o[r] -= a, i ? e.push(n, o) : e.push(o, n)
                        }

                        function k(e, t) {
                            var i = t.slice(), n = t.slice();
                            i[r] -= a, n[r] += a, e.push(i, n)
                        }
                    }(t, e.boxOffsetList[i], e.boxWidthList[i])
                }))
            })
        }), S(ec.extend({
            type: "series.candlestick",
            dependencies: ["xAxis", "yAxis", "grid"],
            defaultValueDimensions: [{name: "open", defaultTooltip: !0}, {
                name: "close",
                defaultTooltip: !0
            }, {name: "lowest", defaultTooltip: !0}, {name: "highest", defaultTooltip: !0}],
            dimensions: null,
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "cartesian2d",
                legendHoverLink: !0,
                hoverAnimation: !0,
                layout: null,
                clip: !0,
                itemStyle: {
                    color: "#c23531",
                    color0: "#314656",
                    borderWidth: 1,
                    borderColor: "#c23531",
                    borderColor0: "#314656"
                },
                emphasis: {itemStyle: {borderWidth: 2}},
                barMaxWidth: null,
                barMinWidth: null,
                barWidth: null,
                large: !0,
                largeThreshold: 600,
                progressive: 3e3,
                progressiveThreshold: 1e4,
                progressiveChunkMode: "mod",
                animationUpdate: !1,
                animationEasing: "linear",
                animationDuration: 300
            },
            getShadowDim: function () {
                return "open"
            },
            brushSelector: function (e, t, i) {
                var n = t.getItemLayout(e);
                return n && i.rect(n.brushRect)
            }
        }), fb, !0);
        var kb = ["itemStyle"], Cb = ["emphasis", "itemStyle"], bb = ["color", "color0", "borderColor", "borderColor0"],
            Ib = (fc.extend({
                type: "candlestick", render: function (e, t, i) {
                    this.group.removeClipPath(), this._updateDrawMode(e), this._isLargeDraw ? this._renderLarge(e) : this._renderNormal(e)
                }, incrementalPrepareRender: function (e, t, i) {
                    this._clear(), this._updateDrawMode(e)
                }, incrementalRender: function (e, t, i, n) {
                    this._isLargeDraw ? this._incrementalRenderLarge(e, t) : this._incrementalRenderNormal(e, t)
                }, _updateDrawMode: function (e) {
                    var t = e.pipelineContext.large;
                    (null == this._isLargeDraw || t ^ this._isLargeDraw) && (this._isLargeDraw = t, this._clear())
                }, _renderNormal: function (e) {
                    var t = e.getData(), i = this._data, n = this.group, o = t.getLayout("isSimpleBox"),
                        a = e.get("clip", !0), r = e.coordinateSystem, s = r.getArea && r.getArea();
                    this._data || n.removeAll(), t.diff(i).add(function (i) {
                        if (t.hasValue(i)) {
                            var r, l = t.getItemLayout(i);
                            if (a && _b(s, l)) return;
                            rl(r = Sb(l, 0, !0), {shape: {points: l.ends}}, e, i), Db(r, t, i, o), n.add(r), t.setItemGraphicEl(i, r)
                        }
                    }).update(function (r, l) {
                        var d = i.getItemGraphicEl(l);
                        if (t.hasValue(r)) {
                            var u = t.getItemLayout(r);
                            a && _b(s, u) ? n.remove(d) : (d ? al(d, {shape: {points: u.ends}}, e, r) : d = Sb(u), Db(d, t, r, o), n.add(d), t.setItemGraphicEl(r, d))
                        } else n.remove(d)
                    }).remove(function (e) {
                        var t = i.getItemGraphicEl(e);
                        t && n.remove(t)
                    }).execute(), this._data = t
                }, _renderLarge: function (e) {
                    this._clear(), Nb(e, this.group);
                    var t = e.get("clip", !0) ? cm(e.coordinateSystem, !1, e) : null;
                    t ? this.group.setClipPath(t) : this.group.removeClipPath()
                }, _incrementalRenderNormal: function (e, t) {
                    for (var i, n = t.getData(), o = n.getLayout("isSimpleBox"); null != (i = e.next());) {
                        var a;
                        Db(a = Sb(n.getItemLayout(i)), n, i, o), a.incremental = !0, this.group.add(a)
                    }
                }, _incrementalRenderLarge: function (e, t) {
                    Nb(t, this.group, !0)
                }, remove: function (e) {
                    this._clear()
                }, _clear: function () {
                    this.group.removeAll(), this._data = null
                }, dispose: te
            }), kr.extend({
                type: "normalCandlestickBox", shape: {}, buildPath: function (e, t) {
                    var i = t.points;
                    this.__simpleBox ? (e.moveTo(i[4][0], i[4][1]), e.lineTo(i[6][0], i[6][1])) : (e.moveTo(i[0][0], i[0][1]), e.lineTo(i[1][0], i[1][1]), e.lineTo(i[2][0], i[2][1]), e.lineTo(i[3][0], i[3][1]), e.closePath(), e.moveTo(i[4][0], i[4][1]), e.lineTo(i[5][0], i[5][1]), e.moveTo(i[6][0], i[6][1]), e.lineTo(i[7][0], i[7][1]))
                }
            }));

        function Sb(e, t, i) {
            var n = e.ends;
            return new Ib({
                shape: {
                    points: i ? function (e, t) {
                        return A(e, function (e) {
                            return (e = e.slice())[1] = t.initBaseline, e
                        })
                    }(n, e) : n
                }, z2: 100
            })
        }

        function _b(e, t) {
            for (var i = !0, n = 0; n < t.ends.length; n++) if (e.contain(t.ends[n][0], t.ends[n][1])) {
                i = !1;
                break
            }
            return i
        }

        function Db(e, t, i, n) {
            var o = t.getItemModel(i), a = o.getModel(kb), r = t.getItemVisual(i, "color"),
                s = t.getItemVisual(i, "borderColor") || r, l = a.getItemStyle(bb);
            e.useStyle(l), e.style.strokeNoScale = !0, e.style.fill = r, e.style.stroke = s, e.__simpleBox = n, Hs(e, o.getModel(Cb).getItemStyle())
        }

        var Ab = kr.extend({
            type: "largeCandlestickBox", shape: {}, buildPath: function (e, t) {
                for (var i = t.points, n = 0; n < i.length;) if (this.__sign === i[n++]) {
                    var o = i[n++];
                    e.moveTo(o, i[n++]), e.lineTo(o, i[n++])
                } else n += 3
            }
        });

        function Nb(e, t, i) {
            var n = e.getData(), o = n.getLayout("largePoints"), a = new Ab({shape: {points: o}, __sign: 1});
            t.add(a);
            var r = new Ab({shape: {points: o}, __sign: -1});
            t.add(r), xb(1, a, e, n), xb(-1, r, e, n), i && (a.incremental = !0, r.incremental = !0)
        }

        function xb(e, t, i, n) {
            var o = 0 < e ? "P" : "N", a = n.getVisual("borderColor" + o) || n.getVisual("color" + o),
                r = i.getModel(kb).getItemStyle(bb);
            t.useStyle(r), t.style.fill = null, t.style.stroke = a
        }

        var Eb = ["itemStyle", "borderColor"], Ob = ["itemStyle", "borderColor0"], Pb = ["itemStyle", "color"],
            Mb = ["itemStyle", "color0"], Fb = {
                seriesType: "candlestick", plan: uc(), performRawSeries: !0, reset: function (e, t) {
                    if (e.getData().setVisual({
                        legendSymbol: "roundRect",
                        colorP: i(1, e),
                        colorN: i(-1, e),
                        borderColorP: n(1, e),
                        borderColorN: n(-1, e)
                    }), !t.isSeriesFiltered(e)) return !e.pipelineContext.large && {
                        progress: function (e, t) {
                            for (var o; null != (o = e.next());) {
                                var a = t.getItemModel(o), r = t.getItemLayout(o).sign;
                                t.setItemVisual(o, {color: i(r, a), borderColor: n(r, a)})
                            }
                        }
                    };

                    function i(e, t) {
                        return t.get(0 < e ? Pb : Mb)
                    }

                    function n(e, t) {
                        return t.get(0 < e ? Eb : Ob)
                    }
                }
            }, Lb = "undefined" != typeof Float32Array ? Float32Array : Array, Rb = {
                seriesType: "candlestick", plan: uc(), reset: function (e) {
                    var t = e.coordinateSystem, i = e.getData(), n = function (e, t) {
                            var i, n = e.getBaseAxis(),
                                o = "category" === n.type ? n.getBandWidth() : (i = n.getExtent(), Math.abs(i[1] - i[0]) / t.count()),
                                a = xl(W(e.get("barMaxWidth"), o), o), r = xl(W(e.get("barMinWidth"), 1), o),
                                s = e.get("barWidth");
                            return null != s ? xl(s, o) : Math.max(Math.min(o / 2, a), r)
                        }(e, i), o = ["x", "y"], a = i.mapDimension(o[0]), r = i.mapDimension(o[1], !0), s = r[0], l = r[1],
                        d = r[2], u = r[3];
                    if (i.setLayout({candleWidth: n, isSimpleBox: n <= 1.3}), !(null == a || r.length < 4)) return {
                        progress: e.pipelineContext.large ? function (e, i) {
                            for (var n, o, r = new Lb(4 * e.count), c = 0, h = [], f = []; null != (o = e.next());) {
                                var p = i.get(a, o), g = i.get(s, o), m = i.get(l, o), v = i.get(d, o), y = i.get(u, o);
                                isNaN(p) || isNaN(v) || isNaN(y) ? (r[c++] = NaN, c += 3) : (r[c++] = Bb(i, o, g, m, l), h[0] = p, h[1] = v, n = t.dataToPoint(h, null, f), r[c++] = n ? n[0] : NaN, r[c++] = n ? n[1] : NaN, h[1] = y, n = t.dataToPoint(h, null, f), r[c++] = n ? n[1] : NaN)
                            }
                            i.setLayout("largePoints", r)
                        } : function (e, i) {
                            for (var o; null != (o = e.next());) {
                                var r = i.get(a, o), c = i.get(s, o), h = i.get(l, o), f = i.get(d, o), p = i.get(u, o),
                                    g = Math.min(c, h), m = Math.max(c, h), v = C(g, r), y = C(m, r), T = C(f, r),
                                    w = C(p, r), k = [];
                                b(k, y, 0), b(k, v, 1), k.push(S(w), S(y), S(T), S(v)), i.setItemLayout(o, {
                                    sign: Bb(i, o, c, h, l),
                                    initBaseline: h < c ? y[1] : v[1],
                                    ends: k,
                                    brushRect: I(f, p, r)
                                })
                            }

                            function C(e, i) {
                                var n = [];
                                return n[0] = i, n[1] = e, isNaN(i) || isNaN(e) ? [NaN, NaN] : t.dataToPoint(n)
                            }

                            function b(e, t, i) {
                                var o = t.slice(), a = t.slice();
                                o[0] = Es(o[0] + n / 2, 1, !1), a[0] = Es(a[0] - n / 2, 1, !0), i ? e.push(o, a) : e.push(a, o)
                            }

                            function I(e, t, i) {
                                var o = C(e, i), a = C(t, i);
                                return o[0] -= n / 2, a[0] -= n / 2, {x: o[0], y: o[1], width: n, height: a[1] - o[1]}
                            }

                            function S(e) {
                                return e[0] = Es(e[0], 1), e
                            }
                        }
                    }
                }
            };

        function Bb(e, t, i, n, o) {
            return n < i ? -1 : i < n ? 1 : 0 < t ? e.get(o, t - 1) <= n ? 1 : -1 : 1
        }

        function Ub(e, t) {
            var i = t.rippleEffectColor || t.color;
            e.eachChild(function (e) {
                e.attr({
                    z: t.z,
                    zlevel: t.zlevel,
                    style: {stroke: "stroke" === t.brushType ? i : null, fill: "fill" === t.brushType ? i : null}
                })
            })
        }

        function Vb(e, t) {
            Ai.call(this);
            var i = new Mg(e, t), n = new Ai;
            this.add(i), this.add(n), n.beforeUpdate = function () {
                this.attr(i.getScale())
            }, this.updateData(e, t)
        }

        cf(function (e) {
            e && M(e.series) && D(e.series, function (e) {
                R(e) && "k" === e.type && (e.type = "candlestick")
            })
        }), mf(Fb), gf(Rb), ec.extend({
            type: "series.effectScatter",
            dependencies: ["grid", "polar"],
            getInitialData: function (e, t) {
                return rp(this.getSource(), this, {useEncodeDefaulter: !0})
            },
            brushSelector: "point",
            defaultOption: {
                coordinateSystem: "cartesian2d",
                zlevel: 0,
                z: 2,
                legendHoverLink: !0,
                effectType: "ripple",
                progressive: 0,
                showEffectOn: "render",
                rippleEffect: {period: 4, scale: 2.5, brushType: "fill"},
                symbolSize: 10
            }
        });
        var Kb = Vb.prototype;
        Kb.stopEffectAnimation = function () {
            this.childAt(1).removeAll()
        }, Kb.startEffectAnimation = function (e) {
            for (var t = e.symbolType, i = e.color, n = this.childAt(1), o = 0; o < 3; o++) {
                var a = cg(t, -1, -1, 2, 2, i);
                a.attr({style: {strokeNoScale: !0}, z2: 99, silent: !0, scale: [.5, .5]});
                var r = -o / 3 * e.period + e.effectOffset;
                a.animate("", !0).when(e.period, {scale: [e.rippleScale / 2, e.rippleScale / 2]}).delay(r).start(), a.animateStyle(!0).when(e.period, {opacity: 0}).delay(r).start(), n.add(a)
            }
            Ub(n, e)
        }, Kb.updateEffectAnimation = function (e) {
            for (var t = this._effectCfg, i = this.childAt(1), n = ["symbolType", "period", "rippleScale"], o = 0; o < n.length; o++) {
                var a = n[o];
                if (t[a] !== e[a]) return this.stopEffectAnimation(), void this.startEffectAnimation(e)
            }
            Ub(i, e)
        }, Kb.highlight = function () {
            this.trigger("emphasis")
        }, Kb.downplay = function () {
            this.trigger("normal")
        }, Kb.updateData = function (e, t) {
            var i = e.hostModel;
            this.childAt(0).updateData(e, t);
            var n = this.childAt(1), o = e.getItemModel(t), a = e.getItemVisual(t, "symbol"), r = function (e) {
                return M(e) || (e = [+e, +e]), e
            }(e.getItemVisual(t, "symbolSize")), s = e.getItemVisual(t, "color");
            n.attr("scale", r), n.traverse(function (e) {
                e.attr({fill: s})
            });
            var l = o.getShallow("symbolOffset");
            if (l) {
                var d = n.position;
                d[0] = xl(l[0], r[0]), d[1] = xl(l[1], r[1])
            }
            var u = e.getItemVisual(t, "symbolRotate");
            n.rotation = (u || 0) * Math.PI / 180 || 0;
            var c = {};
            if (c.showEffectOn = i.get("showEffectOn"), c.rippleScale = o.get("rippleEffect.scale"), c.brushType = o.get("rippleEffect.brushType"), c.period = 1e3 * o.get("rippleEffect.period"), c.effectOffset = t / e.count(), c.z = o.getShallow("z") || 0, c.zlevel = o.getShallow("zlevel") || 0, c.symbolType = a, c.color = s, c.rippleEffectColor = o.get("rippleEffect.color"), this.off("mouseover").off("mouseout").off("emphasis").off("normal"), "render" === c.showEffectOn) this._effectCfg ? this.updateEffectAnimation(c) : this.startEffectAnimation(c), this._effectCfg = c; else {
                this._effectCfg = null, this.stopEffectAnimation();
                var h = this.childAt(0), f = function () {
                    h.highlight(), "render" !== c.showEffectOn && this.startEffectAnimation(c)
                }, p = function () {
                    h.downplay(), "render" !== c.showEffectOn && this.stopEffectAnimation()
                };
                this.on("mouseover", f, this).on("mouseout", p, this).on("emphasis", f, this).on("normal", p, this)
            }
            this._effectCfg = c
        }, Kb.fadeOut = function (e) {
            this.off("mouseover").off("mouseout").off("emphasis").off("normal"), e && e()
        }, I(Vb, Ai), Cf({
            type: "effectScatter", init: function () {
                this._symbolDraw = new jg(Vb)
            }, render: function (e, t, i) {
                var n = e.getData(), o = this._symbolDraw;
                o.updateData(n), this.group.add(o.group)
            }, updateTransform: function (e, t, i) {
                var n = e.getData();
                this.group.dirty();
                var o = ym().reset(e);
                o.progress && o.progress({start: 0, end: n.count()}, n), this._symbolDraw.updateLayout(n)
            }, _updateGroupTransform: function (e) {
                var t = e.coordinateSystem;
                t && t.getRoamTransform && (this.group.transform = ft(t.getRoamTransform()), this.group.decomposeTransform())
            }, remove: function (e, t) {
                this._symbolDraw && this._symbolDraw.remove(t)
            }, dispose: function () {
            }
        }), mf(vm("effectScatter", "circle")), gf(ym("effectScatter"));
        var Gb = "undefined" == typeof Uint32Array ? Array : Uint32Array,
            Wb = "undefined" == typeof Float64Array ? Array : Float64Array;

        function jb(e) {
            var t = e.data;
            t && t[0] && t[0][0] && t[0][0].coord && (e.data = A(t, function (e) {
                var t = {coords: [e[0].coord, e[1].coord]};
                return e[0].name && (t.fromName = e[0].name), e[1].name && (t.toName = e[1].name), y([t, e[0], e[1]])
            }))
        }

        var Hb = ec.extend({
            type: "series.lines",
            dependencies: ["grid", "polar"],
            visualColorAccessPath: "lineStyle.color",
            init: function (e) {
                e.data = e.data || [], jb(e);
                var t = this._processFlatCoordsArray(e.data);
                this._flatCoords = t.flatCoords, this._flatCoordsOffset = t.flatCoordsOffset, t.flatCoords && (e.data = new Float32Array(t.count)), Hb.superApply(this, "init", arguments)
            },
            mergeOption: function (e) {
                if (e.data = e.data || [], jb(e), e.data) {
                    var t = this._processFlatCoordsArray(e.data);
                    this._flatCoords = t.flatCoords, this._flatCoordsOffset = t.flatCoordsOffset, t.flatCoords && (e.data = new Float32Array(t.count))
                }
                Hb.superApply(this, "mergeOption", arguments)
            },
            appendData: function (e) {
                var t = this._processFlatCoordsArray(e.data);
                t.flatCoords && (this._flatCoords ? (this._flatCoords = ee(this._flatCoords, t.flatCoords), this._flatCoordsOffset = ee(this._flatCoordsOffset, t.flatCoordsOffset)) : (this._flatCoords = t.flatCoords, this._flatCoordsOffset = t.flatCoordsOffset), e.data = new Float32Array(t.count)), this.getRawData().appendData(e.data)
            },
            _getCoordsFromItemModel: function (e) {
                var t = this.getData().getItemModel(e);
                return t.option instanceof Array ? t.option : t.getShallow("coords")
            },
            getLineCoordsCount: function (e) {
                return this._flatCoordsOffset ? this._flatCoordsOffset[2 * e + 1] : this._getCoordsFromItemModel(e).length
            },
            getLineCoords: function (e, t) {
                if (this._flatCoordsOffset) {
                    for (var i = this._flatCoordsOffset[2 * e], n = this._flatCoordsOffset[2 * e + 1], o = 0; o < n; o++) t[o] = t[o] || [], t[o][0] = this._flatCoords[i + 2 * o], t[o][1] = this._flatCoords[i + 2 * o + 1];
                    return n
                }
                var a = this._getCoordsFromItemModel(e);
                for (o = 0; o < a.length; o++) t[o] = t[o] || [], t[o][0] = a[o][0], t[o][1] = a[o][1];
                return a.length
            },
            _processFlatCoordsArray: function (e) {
                var t = 0;
                if (this._flatCoords && (t = this._flatCoords.length), "number" != typeof e[0]) return {
                    flatCoordsOffset: null,
                    flatCoords: null,
                    count: e.length
                };
                for (var i = e.length, n = new Gb(i), o = new Wb(i), a = 0, r = 0, s = 0, l = 0; l < i;) {
                    s++;
                    var d = e[l++];
                    n[r++] = a + t, n[r++] = d;
                    for (var u = 0; u < d; u++) {
                        var c = e[l++], h = e[l++];
                        o[a++] = c, o[a++] = h
                    }
                }
                return {flatCoordsOffset: new Uint32Array(n.buffer, 0, r), flatCoords: o, count: s}
            },
            getInitialData: function (e, t) {
                var i = new Vf(["value"], this);
                return i.hasItemOption = !1, i.initData(e.data, [], function (e, t, n, o) {
                    if (e instanceof Array) return NaN;
                    i.hasItemOption = !0;
                    var a = e.value;
                    return null != a ? a instanceof Array ? a[o] : a : void 0
                }), i
            },
            formatTooltip: function (e) {
                var t = this.getData().getItemModel(e), i = t.get("name");
                if (i) return i;
                var n = t.get("fromName"), o = t.get("toName"), a = [];
                return null != n && a.push(n), null != o && a.push(o), $l(a.join(" > "))
            },
            preventIncremental: function () {
                return !!this.get("effect.show")
            },
            getProgressive: function () {
                var e = this.option.progressive;
                return null == e ? this.option.large ? 1e4 : this.get("progressive") : e
            },
            getProgressiveThreshold: function () {
                var e = this.option.progressiveThreshold;
                return null == e ? this.option.large ? 2e4 : this.get("progressiveThreshold") : e
            },
            defaultOption: {
                coordinateSystem: "geo",
                zlevel: 0,
                z: 2,
                legendHoverLink: !0,
                hoverAnimation: !0,
                xAxisIndex: 0,
                yAxisIndex: 0,
                symbol: ["none", "none"],
                symbolSize: [10, 10],
                geoIndex: 0,
                effect: {
                    show: !1,
                    period: 4,
                    constantSpeed: 0,
                    symbol: "circle",
                    symbolSize: 3,
                    loop: !0,
                    trailLength: .2
                },
                large: !1,
                largeThreshold: 2e3,
                polyline: !1,
                clip: !0,
                label: {show: !1, position: "end"},
                lineStyle: {opacity: .5}
            }
        });

        function zb(e, t, i) {
            Ai.call(this), this.add(this.createLine(e, t, i)), this._updateEffectSymbol(e, t)
        }

        var Xb = zb.prototype;

        function qb(e, t, i) {
            Ai.call(this), this._createPolyline(e, t, i)
        }

        Xb.createLine = function (e, t, i) {
            return new Hw(e, t, i)
        }, Xb._updateEffectSymbol = function (e, t) {
            var i = e.getItemModel(t).getModel("effect"), n = i.get("symbolSize"), o = i.get("symbol");
            M(n) || (n = [n, n]);
            var a = i.get("color") || e.getItemVisual(t, "color"), r = this.childAt(1);
            this._symbolType !== o && (this.remove(r), (r = cg(o, -.5, -.5, 1, 1, a)).z2 = 100, r.culling = !0, this.add(r)), r && (r.setStyle("shadowColor", a), r.setStyle(i.getItemStyle(["color"])), r.attr("scale", n), r.setColor(a), r.attr("scale", n), this._symbolType = o, this._symbolScale = n, this._updateEffectAnimation(e, i, t))
        }, Xb._updateEffectAnimation = function (e, t, i) {
            var n = this.childAt(1);
            if (n) {
                var o = this, a = e.getItemLayout(i), r = 1e3 * t.get("period"), s = t.get("loop"),
                    l = t.get("constantSpeed"), d = G(t.get("delay"), function (t) {
                        return t / e.count() * r / 3
                    }), u = "function" == typeof d;
                if (n.ignore = !0, this.updateAnimationPoints(n, a), 0 < l && (r = this.getLineLength(n) / l * 1e3), r !== this._period || s !== this._loop) {
                    n.stopAnimation();
                    var c = d;
                    u && (c = d(i)), 0 < n.__t && (c = -r * n.__t), n.__t = 0;
                    var h = n.animate("", s).when(r, {__t: 1}).delay(c).during(function () {
                        o.updateSymbolPosition(n)
                    });
                    s || h.done(function () {
                        o.remove(n)
                    }), h.start()
                }
                this._period = r, this._loop = s
            }
        }, Xb.getLineLength = function (e) {
            return ye(e.__p1, e.__cp1) + ye(e.__cp1, e.__p2)
        }, Xb.updateAnimationPoints = function (e, t) {
            e.__p1 = t[0], e.__p2 = t[1], e.__cp1 = t[2] || [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2]
        }, Xb.updateData = function (e, t, i) {
            this.childAt(0).updateData(e, t, i), this._updateEffectSymbol(e, t)
        }, Xb.updateSymbolPosition = function (e) {
            var t = e.__p1, i = e.__p2, n = e.__cp1, o = e.__t, a = e.position, r = [a[0], a[1]], s = Ia, l = Sa;
            a[0] = s(t[0], n[0], i[0], o), a[1] = s(t[1], n[1], i[1], o);
            var d = l(t[0], n[0], i[0], o), u = l(t[1], n[1], i[1], o);
            if (e.rotation = -Math.atan2(u, d) - Math.PI / 2, "line" === this._symbolType || "rect" === this._symbolType || "roundRect" === this._symbolType) if (void 0 !== e.__lastT && e.__lastT < e.__t) {
                var c = 1.05 * ye(r, a);
                e.attr("scale", [e.scale[0], c]), 1 === o && (a[0] = r[0] + (a[0] - r[0]) / 2, a[1] = r[1] + (a[1] - r[1]) / 2)
            } else 1 === e.__lastT ? (c = 2 * ye(t, a), e.attr("scale", [e.scale[0], c])) : e.attr("scale", this._symbolScale);
            e.__lastT = e.__t, e.ignore = !1
        }, Xb.updateLayout = function (e, t) {
            this.childAt(0).updateLayout(e, t);
            var i = e.getItemModel(t).getModel("effect");
            this._updateEffectAnimation(e, i, t)
        }, I(zb, Ai);
        var Yb = qb.prototype;

        function Jb(e, t, i) {
            zb.call(this, e, t, i), this._lastFrame = 0, this._lastFramePercent = 0
        }

        Yb._createPolyline = function (e, t, i) {
            var n = e.getItemLayout(t), o = new qr({shape: {points: n}});
            this.add(o), this._updateCommonStl(e, t, i)
        }, Yb.updateData = function (e, t, i) {
            var n = e.hostModel;
            al(this.childAt(0), {shape: {points: e.getItemLayout(t)}}, n, t), this._updateCommonStl(e, t, i)
        }, Yb._updateCommonStl = function (e, t, i) {
            var n = this.childAt(0), o = e.getItemModel(t), a = e.getItemVisual(t, "color"), r = i && i.lineStyle,
                s = i && i.hoverLineStyle;
            i && !e.hasItemOption || (r = o.getModel("lineStyle").getLineStyle(), s = o.getModel("emphasis.lineStyle").getLineStyle()), n.useStyle(w({
                strokeNoScale: !0,
                fill: "none",
                stroke: a
            }, r)), n.hoverStyle = s, Hs(this)
        }, Yb.updateLayout = function (e, t) {
            this.childAt(0).setShape("points", e.getItemLayout(t))
        }, I(qb, Ai);
        var Zb = Jb.prototype;
        Zb.createLine = function (e, t, i) {
            return new qb(e, t, i)
        }, Zb.updateAnimationPoints = function (e, t) {
            this._points = t;
            for (var i = [0], n = 0, o = 1; o < t.length; o++) {
                var a = t[o - 1], r = t[o];
                n += ye(a, r), i.push(n)
            }
            if (0 !== n) {
                for (o = 0; o < i.length; o++) i[o] /= n;
                this._offsets = i, this._length = n
            }
        }, Zb.getLineLength = function (e) {
            return this._length
        }, Zb.updateSymbolPosition = function (e) {
            var t = e.__t, i = this._points, n = this._offsets, o = i.length;
            if (n) {
                var a = this._lastFrame;
                if (t < this._lastFramePercent) {
                    for (r = Math.min(a + 1, o - 1); 0 <= r && !(n[r] <= t); r--) ;
                    r = Math.min(r, o - 2)
                } else {
                    for (var r = a; r < o && !(n[r] > t); r++) ;
                    r = Math.min(r - 1, o - 2)
                }
                ke(e.position, i[r], i[r + 1], (t - n[r]) / (n[r + 1] - n[r]));
                var s = i[r + 1][0] - i[r][0], l = i[r + 1][1] - i[r][1];
                e.rotation = -Math.atan2(l, s) - Math.PI / 2, this._lastFrame = r, this._lastFramePercent = t, e.ignore = !1
            }
        }, I(Jb, zb);
        var Qb = bs({
            shape: {polyline: !1, curveness: 0, segs: []}, buildPath: function (e, t) {
                var i = t.segs, n = t.curveness;
                if (t.polyline) for (var o = 0; o < i.length;) {
                    var a = i[o++];
                    if (0 < a) {
                        e.moveTo(i[o++], i[o++]);
                        for (var r = 1; r < a; r++) e.lineTo(i[o++], i[o++])
                    }
                } else for (o = 0; o < i.length;) {
                    var s = i[o++], l = i[o++], d = i[o++], u = i[o++];
                    if (e.moveTo(s, l), 0 < n) {
                        var c = (s + d) / 2 - (l - u) * n, h = (l + u) / 2 - (d - s) * n;
                        e.quadraticCurveTo(c, h, d, u)
                    } else e.lineTo(d, u)
                }
            }, findDataIndex: function (e, t) {
                var i = this.shape, n = i.segs, o = i.curveness;
                if (i.polyline) for (var a = 0, r = 0; r < n.length;) {
                    var s = n[r++];
                    if (0 < s) for (var l = n[r++], d = n[r++], u = 1; u < s; u++) if (tr(l, d, c = n[r++], h = n[r++])) return a;
                    a++
                } else for (a = 0, r = 0; r < n.length;) {
                    l = n[r++], d = n[r++];
                    var c = n[r++], h = n[r++];
                    if (0 < o) {
                        if (nr(l, d, (l + c) / 2 - (d - h) * o, (d + h) / 2 - (c - l) * o, c, h)) return a
                    } else if (tr(l, d, c, h)) return a;
                    a++
                }
                return -1
            }
        });

        function $b() {
            this.group = new Ai
        }

        var eI = $b.prototype;
        eI.isPersistent = function () {
            return !this._incremental
        }, eI.updateData = function (e) {
            this.group.removeAll();
            var t = new Qb({rectHover: !0, cursor: "default"});
            t.setShape({segs: e.getLayout("linesPoints")}), this._setCommon(t, e), this.group.add(t), this._incremental = null
        }, eI.incrementalPrepareUpdate = function (e) {
            this.group.removeAll(), this._clearIncremental(), 5e5 < e.count() ? (this._incremental || (this._incremental = new cs({silent: !0})), this.group.add(this._incremental)) : this._incremental = null
        }, eI.incrementalUpdate = function (e, t) {
            var i = new Qb;
            i.setShape({segs: t.getLayout("linesPoints")}), this._setCommon(i, t, !!this._incremental), this._incremental ? this._incremental.addDisplayable(i, !0) : (i.rectHover = !0, i.cursor = "default", i.__startIndex = e.start, this.group.add(i))
        }, eI.remove = function () {
            this._clearIncremental(), this._incremental = null, this.group.removeAll()
        }, eI._setCommon = function (e, t, i) {
            var n = t.hostModel;
            e.setShape({
                polyline: n.get("polyline"),
                curveness: n.get("lineStyle.curveness")
            }), e.useStyle(n.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0;
            var o = t.getVisual("color");
            o && e.setStyle("stroke", o), e.setStyle("fill"), i || (e.seriesIndex = n.seriesIndex, e.on("mousemove", function (t) {
                e.dataIndex = null;
                var i = e.findDataIndex(t.offsetX, t.offsetY);
                0 < i && (e.dataIndex = i + e.__startIndex)
            }))
        }, eI._clearIncremental = function () {
            var e = this._incremental;
            e && e.clearDisplaybles()
        };
        var tI = {
            seriesType: "lines", plan: uc(), reset: function (e) {
                var t = e.coordinateSystem, i = e.get("polyline"), n = e.pipelineContext.large;
                return {
                    progress: function (o, a) {
                        var r = [];
                        if (n) {
                            var s, l = o.end - o.start;
                            if (i) {
                                for (var d = 0, u = o.start; u < o.end; u++) d += e.getLineCoordsCount(u);
                                s = new Float32Array(l + 2 * d)
                            } else s = new Float32Array(4 * l);
                            var c = 0, h = [];
                            for (u = o.start; u < o.end; u++) {
                                var f = e.getLineCoords(u, r);
                                i && (s[c++] = f);
                                for (var p = 0; p < f; p++) h = t.dataToPoint(r[p], !1, h), s[c++] = h[0], s[c++] = h[1]
                            }
                            a.setLayout("linesPoints", s)
                        } else for (u = o.start; u < o.end; u++) {
                            var g = a.getItemModel(u), m = (f = e.getLineCoords(u, r), []);
                            if (i) for (var v = 0; v < f; v++) m.push(t.dataToPoint(r[v])); else {
                                m[0] = t.dataToPoint(r[0]), m[1] = t.dataToPoint(r[1]);
                                var y = g.get("lineStyle.curveness");
                                +y && (m[2] = [(m[0][0] + m[1][0]) / 2 - (m[0][1] - m[1][1]) * y, (m[0][1] + m[1][1]) / 2 - (m[1][0] - m[0][0]) * y])
                            }
                            a.setItemLayout(u, m)
                        }
                    }
                }
            }
        };

        function iI(e) {
            return e instanceof Array || (e = [e, e]), e
        }

        Cf({
            type: "lines", init: function () {
            }, render: function (e, t, i) {
                var n = e.getData(), o = this._updateLineDraw(n, e), a = e.get("zlevel"),
                    r = e.get("effect.trailLength"), s = i.getZr(), l = "svg" === s.painter.getType();
                l || s.painter.getLayer(a).clear(!0), null == this._lastZlevel || l || s.configLayer(this._lastZlevel, {motionBlur: !1}), this._showEffect(e) && r && (l || s.configLayer(a, {
                    motionBlur: !0,
                    lastFrameAlpha: Math.max(Math.min(r / 10 + .9, 1), 0)
                })), o.updateData(n);
                var d = e.get("clip", !0) && cm(e.coordinateSystem, !1, e);
                d ? this.group.setClipPath(d) : this.group.removeClipPath(), this._lastZlevel = a, this._finished = !0
            }, incrementalPrepareRender: function (e, t, i) {
                var n = e.getData();
                this._updateLineDraw(n, e).incrementalPrepareUpdate(n), this._clearLayer(i), this._finished = !1
            }, incrementalRender: function (e, t, i) {
                this._lineDraw.incrementalUpdate(e, t.getData()), this._finished = e.end === t.getData().count()
            }, updateTransform: function (e, t, i) {
                var n = e.getData(), o = e.pipelineContext;
                if (!this._finished || o.large || o.progressiveRender) return {update: !0};
                var a = tI.reset(e);
                a.progress && a.progress({
                    start: 0,
                    end: n.count()
                }, n), this._lineDraw.updateLayout(), this._clearLayer(i)
            }, _updateLineDraw: function (e, t) {
                var i = this._lineDraw, n = this._showEffect(t), o = !!t.get("polyline"), a = t.pipelineContext.large;
                return i && n === this._hasEffet && o === this._isPolyline && a === this._isLargeDraw || (i && i.remove(), i = this._lineDraw = a ? new $b : new Xw(o ? n ? Jb : qb : n ? zb : Hw), this._hasEffet = n, this._isPolyline = o, this._isLargeDraw = a, this.group.removeAll()), this.group.add(i.group), i
            }, _showEffect: function (e) {
                return !!e.get("effect.show")
            }, _clearLayer: function (e) {
                var t = e.getZr();
                "svg" === t.painter.getType() || null == this._lastZlevel || t.painter.getLayer(this._lastZlevel).clear(!0)
            }, remove: function (e, t) {
                this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(t)
            }, dispose: function () {
            }
        });
        var nI = "lineStyle.opacity".split("."), oI = {
            seriesType: "lines", reset: function (e, t, i) {
                var n = iI(e.get("symbol")), o = iI(e.get("symbolSize")), a = e.getData();
                return a.setVisual("fromSymbol", n && n[0]), a.setVisual("toSymbol", n && n[1]), a.setVisual("fromSymbolSize", o && o[0]), a.setVisual("toSymbolSize", o && o[1]), a.setVisual("opacity", e.get(nI)), {
                    dataEach: a.hasItemOption ? function (e, t) {
                        var i = e.getItemModel(t), n = iI(i.getShallow("symbol", !0)),
                            o = iI(i.getShallow("symbolSize", !0)), a = i.get(nI);
                        n[0] && e.setItemVisual(t, "fromSymbol", n[0]), n[1] && e.setItemVisual(t, "toSymbol", n[1]), o[0] && e.setItemVisual(t, "fromSymbolSize", o[0]), o[1] && e.setItemVisual(t, "toSymbolSize", o[1]), e.setItemVisual(t, "opacity", a)
                    } : null
                }
            }
        };

        function aI() {
            var e = k();
            this.canvas = e, this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {}
        }

        gf(tI), mf(oI), ec.extend({
            type: "series.heatmap",
            getInitialData: function (e, t) {
                return rp(this.getSource(), this, {generateCoord: "value"})
            },
            preventIncremental: function () {
                var e = iu.get(this.get("coordinateSystem"));
                if (e && e.dimensions) return "lng" === e.dimensions[0] && "lat" === e.dimensions[1]
            },
            defaultOption: {
                coordinateSystem: "cartesian2d",
                zlevel: 0,
                z: 2,
                geoIndex: 0,
                blurSize: 30,
                pointSize: 20,
                maxOpacity: 1,
                minOpacity: 0
            }
        }), aI.prototype = {
            update: function (e, t, i, n, o, a) {
                var r = this._getBrush(), s = this._getGradient(e, o, "inRange"),
                    l = this._getGradient(e, o, "outOfRange"), d = this.pointSize + this.blurSize, u = this.canvas,
                    c = u.getContext("2d"), h = e.length;
                u.width = t, u.height = i;
                for (var f = 0; f < h; ++f) {
                    var p = e[f], g = p[0], m = p[1], v = n(p[2]);
                    c.globalAlpha = v, c.drawImage(r, g - d, m - d)
                }
                if (!u.width || !u.height) return u;
                for (var y = c.getImageData(0, 0, u.width, u.height), T = y.data, w = 0, k = T.length, C = this.minOpacity, b = this.maxOpacity - C; w < k;) {
                    v = T[w + 3] / 256;
                    var I = 4 * Math.floor(255 * v);
                    if (0 < v) {
                        var S = a(v) ? s : l;
                        0 < v && (v = v * b + C), T[w++] = S[I], T[w++] = S[1 + I], T[w++] = S[2 + I], T[w++] = S[3 + I] * v * 256
                    } else w += 4
                }
                return c.putImageData(y, 0, 0), u
            }, _getBrush: function () {
                var e = this._brushCanvas || (this._brushCanvas = k()), t = this.pointSize + this.blurSize, i = 2 * t;
                e.width = i, e.height = i;
                var n = e.getContext("2d");
                return n.clearRect(0, 0, i, i), n.shadowOffsetX = i, n.shadowBlur = this.blurSize, n.shadowColor = "#000", n.beginPath(), n.arc(-t, t, this.pointSize, 0, 2 * Math.PI, !0), n.closePath(), n.fill(), e
            }, _getGradient: function (e, t, i) {
                for (var n = this._gradientPixels, o = n[i] || (n[i] = new Uint8ClampedArray(1024)), a = [0, 0, 0, 0], r = 0, s = 0; s < 256; s++) t[i](s / 255, !0, a), o[r++] = a[0], o[r++] = a[1], o[r++] = a[2], o[r++] = a[3];
                return o
            }
        }, Cf({
            type: "heatmap", render: function (e, t, i) {
                var n;
                t.eachComponent("visualMap", function (t) {
                    t.eachTargetSeries(function (i) {
                        i === e && (n = t)
                    })
                }), this.group.removeAll(), this._incrementalDisplayable = null;
                var o = e.coordinateSystem;
                "cartesian2d" === o.type || "calendar" === o.type ? this._renderOnCartesianAndCalendar(e, i, 0, e.getData().count()) : function (e) {
                    var t = e.dimensions;
                    return "lng" === t[0] && "lat" === t[1]
                }(o) && this._renderOnGeo(o, e, n, i)
            }, incrementalPrepareRender: function (e, t, i) {
                this.group.removeAll()
            }, incrementalRender: function (e, t, i, n) {
                t.coordinateSystem && this._renderOnCartesianAndCalendar(t, n, e.start, e.end, !0)
            }, _renderOnCartesianAndCalendar: function (e, t, i, n, o) {
                var a, r, s = e.coordinateSystem;
                if ("cartesian2d" === s.type) {
                    var l = s.getAxis("x"), d = s.getAxis("y");
                    a = l.getBandWidth(), r = d.getBandWidth()
                }
                for (var u = this.group, c = e.getData(), h = "emphasis.itemStyle", f = "emphasis.label", p = e.getModel("itemStyle").getItemStyle(["color"]), g = e.getModel(h).getItemStyle(), m = e.getModel("label"), v = e.getModel(f), y = s.type, w = "cartesian2d" === y ? [c.mapDimension("x"), c.mapDimension("y"), c.mapDimension("value")] : [c.mapDimension("time"), c.mapDimension("value")], k = i; k < n; k++) {
                    var C;
                    if ("cartesian2d" === y) {
                        if (isNaN(c.get(w[2], k))) continue;
                        var b = s.dataToPoint([c.get(w[0], k), c.get(w[1], k)]);
                        C = new es({
                            shape: {
                                x: Math.floor(Math.round(b[0]) - a / 2),
                                y: Math.floor(Math.round(b[1]) - r / 2),
                                width: Math.ceil(a),
                                height: Math.ceil(r)
                            }, style: {fill: c.getItemVisual(k, "color"), opacity: c.getItemVisual(k, "opacity")}
                        })
                    } else {
                        if (isNaN(c.get(w[1], k))) continue;
                        C = new es({
                            z2: 1,
                            shape: s.dataToRect([c.get(w[0], k)]).contentShape,
                            style: {fill: c.getItemVisual(k, "color"), opacity: c.getItemVisual(k, "opacity")}
                        })
                    }
                    var I = c.getItemModel(k);
                    c.hasItemOption && (p = I.getModel("itemStyle").getItemStyle(["color"]), g = I.getModel(h).getItemStyle(), m = I.getModel("label"), v = I.getModel(f));
                    var S = e.getRawValue(k), _ = "-";
                    S && null != S[2] && (_ = S[2]), Ys(p, g, m, v, {
                        labelFetcher: e,
                        labelDataIndex: k,
                        defaultText: _,
                        isRectText: !0
                    }), C.setStyle(p), Hs(C, c.hasItemOption ? g : T({}, g)), (C.incremental = o) && (C.useHoverLayer = !0), u.add(C), c.setItemGraphicEl(k, C)
                }
            }, _renderOnGeo: function (e, t, i, n) {
                var o = i.targetVisuals.inRange, a = i.targetVisuals.outOfRange, r = t.getData(),
                    s = this._hmLayer || this._hmLayer || new aI;
                s.blurSize = t.get("blurSize"), s.pointSize = t.get("pointSize"), s.minOpacity = t.get("minOpacity"), s.maxOpacity = t.get("maxOpacity");
                var l = e.getViewRect().clone(), d = e.getRoamTransform();
                l.applyTransform(d);
                var u = Math.max(l.x, 0), c = Math.max(l.y, 0), h = Math.min(l.width + l.x, n.getWidth()),
                    f = Math.min(l.height + l.y, n.getHeight()), p = h - u, g = f - c,
                    m = [r.mapDimension("lng"), r.mapDimension("lat"), r.mapDimension("value")],
                    v = r.mapArray(m, function (t, i, n) {
                        var o = e.dataToPoint([t, i]);
                        return o[0] -= u, o[1] -= c, o.push(n), o
                    }), y = i.getExtent(), T = "visualMap.continuous" === i.type ? function (e, t) {
                        var i = e[1] - e[0];
                        return t = [(t[0] - e[0]) / i, (t[1] - e[0]) / i], function (e) {
                            return e >= t[0] && e <= t[1]
                        }
                    }(y, i.option.range) : function (e, t, i) {
                        var n = e[1] - e[0], o = (t = A(t, function (t) {
                            return {interval: [(t.interval[0] - e[0]) / n, (t.interval[1] - e[0]) / n]}
                        })).length, a = 0;
                        return function (e) {
                            for (var n = a; n < o; n++) if ((r = t[n].interval)[0] <= e && e <= r[1]) {
                                a = n;
                                break
                            }
                            if (n === o) for (n = a - 1; 0 <= n; n--) {
                                var r;
                                if ((r = t[n].interval)[0] <= e && e <= r[1]) {
                                    a = n;
                                    break
                                }
                            }
                            return 0 <= n && n < o && i[n]
                        }
                    }(y, i.getPieceList(), i.option.selected);
                s.update(v, p, g, o.color.getNormalizer(), {
                    inRange: o.color.getColorMapper(),
                    outOfRange: a.color.getColorMapper()
                }, T);
                var w = new Yn({style: {width: p, height: g, x: u, y: c, image: s.canvas}, silent: !0});
                this.group.add(w)
            }, dispose: function () {
            }
        });
        var rI = hv.extend({
            type: "series.pictorialBar",
            dependencies: ["grid"],
            defaultOption: {
                symbol: "circle",
                symbolSize: null,
                symbolRotate: null,
                symbolPosition: null,
                symbolOffset: null,
                symbolMargin: null,
                symbolRepeat: !1,
                symbolRepeatDirection: "end",
                symbolClip: !1,
                symbolBoundingData: null,
                symbolPatternSize: 400,
                barGap: "-100%",
                progressive: 0,
                hoverAnimation: !1
            },
            getInitialData: function (e) {
                return e.stack = null, rI.superApply(this, "getInitialData", arguments)
            }
        }), sI = ["itemStyle", "borderWidth"], lI = [{xy: "x", wh: "width", index: 0, posDesc: ["left", "right"]}, {
            xy: "y",
            wh: "height",
            index: 1,
            posDesc: ["top", "bottom"]
        }], dI = new Kr;

        function uI(e, t, i, n) {
            var o = e.getItemLayout(t), a = i.get("symbolRepeat"), r = i.get("symbolClip"),
                s = i.get("symbolPosition") || "start", l = (i.get("symbolRotate") || 0) * Math.PI / 180 || 0,
                d = i.get("symbolPatternSize") || 2, u = i.isAnimationEnabled(), c = {
                    dataIndex: t,
                    layout: o,
                    itemModel: i,
                    symbolType: e.getItemVisual(t, "symbol") || "circle",
                    color: e.getItemVisual(t, "color"),
                    symbolClip: r,
                    symbolRepeat: a,
                    symbolRepeatDirection: i.get("symbolRepeatDirection"),
                    symbolPatternSize: d,
                    rotation: l,
                    animationModel: u ? i : null,
                    hoverAnimation: u && i.get("hoverAnimation"),
                    z2: i.getShallow("z", !0) || 0
                };
            !function (e, t, i, n, o) {
                var a, r = n.valueDim, s = e.get("symbolBoundingData"),
                    l = n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()), d = l.toGlobalCoord(l.dataToCoord(0)),
                    u = 1 - +(i[r.wh] <= 0);
                if (M(s)) {
                    var c = [cI(l, s[0]) - d, cI(l, s[1]) - d];
                    c[1] < c[0] && c.reverse(), a = c[u]
                } else a = null != s ? cI(l, s) - d : t ? n.coordSysExtent[r.index][u] - d : i[r.wh];
                o.boundingLength = a, t && (o.repeatCutLength = i[r.wh]), o.pxSign = 0 < a ? 1 : a < 0 ? -1 : 0
            }(i, a, o, n, c), function (e, t, i, n, o, a, r, s, l, d) {
                var u = l.valueDim, c = l.categoryDim, h = Math.abs(i[c.wh]), f = e.getItemVisual(t, "symbolSize");
                (f = M(f) ? f.slice() : (null == f && (f = "100%"), [f, f]))[c.index] = xl(f[c.index], h), f[u.index] = xl(f[u.index], n ? h : Math.abs(a)), d.symbolSize = f, (d.symbolScale = [f[0] / s, f[1] / s])[u.index] *= (l.isHorizontal ? -1 : 1) * r
            }(e, t, o, a, 0, c.boundingLength, c.pxSign, d, n, c), function (e, t, i, n, o) {
                var a = e.get(sI) || 0;
                a && (dI.attr({
                    scale: t.slice(),
                    rotation: i
                }), dI.updateTransform(), a /= dI.getLineScale(), a *= t[n.valueDim.index]), o.valueLineWidth = a
            }(i, c.symbolScale, l, n, c);
            var h = c.symbolSize, f = i.get("symbolOffset");
            return M(f) && (f = [xl(f[0], h[0]), xl(f[1], h[1])]), function (e, t, i, n, o, a, r, s, l, d, u, c) {
                var h = u.categoryDim, f = u.valueDim, p = c.pxSign, g = Math.max(t[f.index] + s, 0), m = g;
                if (n) {
                    var v = Math.abs(l), y = G(e.get("symbolMargin"), "15%") + "", w = !1;
                    y.lastIndexOf("!") === y.length - 1 && (w = !0, y = y.slice(0, y.length - 1)), y = xl(y, t[f.index]);
                    var k = Math.max(g + 2 * y, 0), C = w ? 0 : 2 * y, b = zl(n), I = b ? n : DI((v + C) / k);
                    k = g + 2 * (y = (v - I * g) / 2 / (w ? I : I - 1)), C = w ? 0 : 2 * y, b || "fixed" === n || (I = d ? DI((Math.abs(d) + C) / k) : 0), m = I * k - C, c.repeatTimes = I, c.symbolMargin = y
                }
                var S = p * (m / 2), _ = c.pathPosition = [];
                _[h.index] = i[h.wh] / 2, _[f.index] = "start" === r ? S : "end" === r ? l - S : l / 2, a && (_[0] += a[0], _[1] += a[1]);
                var D = c.bundlePosition = [];
                D[h.index] = i[h.xy], D[f.index] = i[f.xy];
                var A = c.barRectShape = T({}, i);
                A[f.wh] = p * Math.max(Math.abs(i[f.wh]), Math.abs(_[f.index] + S)), A[h.wh] = i[h.wh];
                var N = c.clipShape = {};
                N[h.xy] = -i[h.xy], N[h.wh] = u.ecSize[h.wh], N[f.xy] = 0, N[f.wh] = i[f.wh]
            }(i, h, o, a, 0, f, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, n, c), c
        }

        function cI(e, t) {
            return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))
        }

        function hI(e) {
            var t = e.symbolPatternSize, i = cg(e.symbolType, -t / 2, -t / 2, t, t, e.color);
            return i.attr({culling: !0}), "image" !== i.type && i.setStyle({strokeNoScale: !0}), i
        }

        function fI(e, t, i, n) {
            var o = e.__pictorialBundle, a = i.symbolSize, r = i.valueLineWidth, s = i.pathPosition, l = t.valueDim,
                d = i.repeatTimes || 0, u = 0, c = a[t.valueDim.index] + r + 2 * i.symbolMargin;
            for (II(e, function (e) {
                e.__pictorialAnimationIndex = u, e.__pictorialRepeatTimes = d, u < d ? SI(e, null, p(u), i, n) : SI(e, null, {scale: [0, 0]}, i, n, function () {
                    o.remove(e)
                }), wI(e, i), u++
            }); u < d; u++) {
                var h = hI(i);
                h.__pictorialAnimationIndex = u, h.__pictorialRepeatTimes = d, o.add(h);
                var f = p(u);
                SI(h, {position: f.position, scale: [0, 0]}, {
                    scale: f.scale,
                    rotation: f.rotation
                }, i, n), h.on("mouseover", g).on("mouseout", m), wI(h, i)
            }

            function p(e) {
                var t = s.slice(), n = i.pxSign, o = e;
                return ("start" === i.symbolRepeatDirection ? 0 < n : n < 0) && (o = d - 1 - e), t[l.index] = c * (o - d / 2 + .5) + s[l.index], {
                    position: t,
                    scale: i.symbolScale.slice(),
                    rotation: i.rotation
                }
            }

            function g() {
                II(e, function (e) {
                    e.trigger("emphasis")
                })
            }

            function m() {
                II(e, function (e) {
                    e.trigger("normal")
                })
            }
        }

        function pI(e, t, i, n) {
            var o = e.__pictorialBundle, a = e.__pictorialMainPath;
            a ? SI(a, null, {
                position: i.pathPosition.slice(),
                scale: i.symbolScale.slice(),
                rotation: i.rotation
            }, i, n) : (a = e.__pictorialMainPath = hI(i), o.add(a), SI(a, {
                position: i.pathPosition.slice(),
                scale: [0, 0],
                rotation: i.rotation
            }, {scale: i.symbolScale.slice()}, i, n), a.on("mouseover", function () {
                this.trigger("emphasis")
            }).on("mouseout", function () {
                this.trigger("normal")
            })), wI(a, i)
        }

        function gI(e, t, i) {
            var n = T({}, t.barRectShape), o = e.__pictorialBarRect;
            o ? SI(o, null, {shape: n}, t, i) : (o = e.__pictorialBarRect = new es({
                z2: 2,
                shape: n,
                silent: !0,
                style: {stroke: "transparent", fill: "transparent", lineWidth: 0}
            }), e.add(o))
        }

        function mI(e, t, i, n) {
            if (i.symbolClip) {
                var o = e.__pictorialClipPath, a = T({}, i.clipShape), r = t.valueDim, s = i.animationModel,
                    l = i.dataIndex;
                if (o) al(o, {shape: a}, s, l); else {
                    a[r.wh] = 0, o = new es({shape: a}), e.__pictorialBundle.setClipPath(o), e.__pictorialClipPath = o;
                    var d = {};
                    d[r.wh] = i.clipShape[r.wh], ml[n ? "updateProps" : "initProps"](o, {shape: d}, s, l)
                }
            }
        }

        function vI(e, t) {
            var i = e.getItemModel(t);
            return i.getAnimationDelayParams = yI, i.isAnimationEnabled = TI, i
        }

        function yI(e) {
            return {index: e.__pictorialAnimationIndex, count: e.__pictorialRepeatTimes}
        }

        function TI() {
            return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation")
        }

        function wI(e, t) {
            e.off("emphasis").off("normal");
            var i = t.symbolScale.slice();
            t.hoverAnimation && e.on("emphasis", function () {
                this.animateTo({scale: [1.1 * i[0], 1.1 * i[1]]}, 400, "elasticOut")
            }).on("normal", function () {
                this.animateTo({scale: i.slice()}, 400, "elasticOut")
            })
        }

        function kI(e, t, i, n) {
            var o = new Ai, a = new Ai;
            return o.add(a), (o.__pictorialBundle = a).attr("position", i.bundlePosition.slice()), i.symbolRepeat ? fI(o, t, i) : pI(o, 0, i), gI(o, i, n), mI(o, t, i, n), o.__pictorialShapeStr = bI(e, i), o.__pictorialSymbolMeta = i, o
        }

        function CI(e, t, i, n) {
            var o = n.__pictorialBarRect;
            o && (o.style.text = null);
            var a = [];
            II(n, function (e) {
                a.push(e)
            }), n.__pictorialMainPath && a.push(n.__pictorialMainPath), n.__pictorialClipPath && (i = null), D(a, function (e) {
                al(e, {scale: [0, 0]}, i, t, function () {
                    n.parent && n.parent.remove(n)
                })
            }), e.setItemGraphicEl(t, null)
        }

        function bI(e, t) {
            return [e.getItemVisual(t.dataIndex, "symbol") || "none", !!t.symbolRepeat, !!t.symbolClip].join(":")
        }

        function II(e, t, i) {
            D(e.__pictorialBundle.children(), function (n) {
                n !== e.__pictorialBarRect && t.call(i, n)
            })
        }

        function SI(e, t, i, n, o, a) {
            t && e.attr(t), n.symbolClip && !o ? i && e.attr(i) : i && ml[o ? "updateProps" : "initProps"](e, i, n.animationModel, n.dataIndex, a)
        }

        function _I(e, t, i) {
            var n = i.color, o = i.dataIndex, a = i.itemModel, r = a.getModel("itemStyle").getItemStyle(["color"]),
                s = a.getModel("emphasis.itemStyle").getItemStyle(), l = a.getShallow("cursor");
            II(e, function (e) {
                e.setColor(n), e.setStyle(w({
                    fill: n,
                    opacity: i.opacity
                }, r)), Hs(e, s), l && (e.cursor = l), e.z2 = i.z2
            });
            var d = {}, u = (t.valueDim.posDesc[+(0 < i.boundingLength)], e.__pictorialBarRect);
            fv(u.style, d, a, n, t.seriesModel, o), Hs(u, d)
        }

        function DI(e) {
            var t = Math.round(e);
            return Math.abs(e - t) < 1e-4 ? t : Math.ceil(e)
        }

        function AI(e, t, i, n, o) {
            Ag.call(this, e, t, i), this.type = n || "value", this.position = o || "bottom", this.orient = null
        }

        function NI(e, t, i) {
            this.dimension = "single", this.dimensions = ["single"], this._axis = null, this._rect, this._init(e, t, i), this.model = e
        }

        function xI(e, t) {
            t = t || {};
            var i = e.coordinateSystem, n = e.axis, o = {}, a = n.position, r = n.orient, s = i.getRect(),
                l = [s.x, s.x + s.width, s.y, s.y + s.height],
                d = {horizontal: {top: l[2], bottom: l[3]}, vertical: {left: l[0], right: l[1]}};
            o.position = ["vertical" === r ? d.vertical[a] : l[0], "horizontal" === r ? d.horizontal[a] : l[3]], o.rotation = Math.PI / 2 * {
                horizontal: 0,
                vertical: 1
            }[r], o.labelDirection = o.tickDirection = o.nameDirection = {
                top: -1,
                bottom: 1,
                right: 1,
                left: -1
            }[a], e.get("axisTick.inside") && (o.tickDirection = -o.tickDirection), G(t.labelInside, e.get("axisLabel.inside")) && (o.labelDirection = -o.labelDirection);
            var u = t.rotate;
            return null == u && (u = e.get("axisLabel.rotate")), o.labelRotation = "top" === a ? -u : u, o.z2 = 1, o
        }

        Cf({
            type: "pictorialBar", render: function (e, t, i) {
                var n = this.group, o = e.getData(), a = this._data, r = e.coordinateSystem,
                    s = !!r.getBaseAxis().isHorizontal(), l = r.grid.getRect(), d = {
                        ecSize: {width: i.getWidth(), height: i.getHeight()},
                        seriesModel: e,
                        coordSys: r,
                        coordSysExtent: [[l.x, l.x + l.width], [l.y, l.y + l.height]],
                        isHorizontal: s,
                        valueDim: lI[+s],
                        categoryDim: lI[1 - s]
                    };
                return o.diff(a).add(function (e) {
                    if (o.hasValue(e)) {
                        var t = vI(o, e), i = uI(o, e, t, d), a = kI(o, d, i);
                        o.setItemGraphicEl(e, a), n.add(a), _I(a, d, i)
                    }
                }).update(function (e, t) {
                    var i = a.getItemGraphicEl(t);
                    if (o.hasValue(e)) {
                        var r = vI(o, e), s = uI(o, e, r, d), l = bI(o, s);
                        i && l !== i.__pictorialShapeStr && (n.remove(i), o.setItemGraphicEl(e, null), i = null), i ? function (e, t, i) {
                            var n = i.animationModel, o = i.dataIndex;
                            al(e.__pictorialBundle, {position: i.bundlePosition.slice()}, n, o), i.symbolRepeat ? fI(e, t, i, !0) : pI(e, 0, i, !0), gI(e, i, !0), mI(e, t, i, !0)
                        }(i, d, s) : i = kI(o, d, s, !0), o.setItemGraphicEl(e, i), i.__pictorialSymbolMeta = s, n.add(i), _I(i, d, s)
                    } else n.remove(i)
                }).remove(function (e) {
                    var t = a.getItemGraphicEl(e);
                    t && CI(a, e, t.__pictorialSymbolMeta.animationModel, t)
                }).execute(), this._data = o, this.group
            }, dispose: te, remove: function (e, t) {
                var i = this.group, n = this._data;
                e.get("animation") ? n && n.eachItemGraphicEl(function (t) {
                    CI(n, t.dataIndex, e, t)
                }) : i.removeAll()
            }
        }), gf(P(Ap, "pictorialBar")), mf(vm("pictorialBar", "roundRect")), AI.prototype = {
            constructor: AI,
            model: null,
            isHorizontal: function () {
                var e = this.position;
                return "top" === e || "bottom" === e
            },
            pointToData: function (e, t) {
                return this.coordinateSystem.pointToData(e, t)[0]
            },
            toGlobalCoord: null,
            toLocalCoord: null
        }, I(AI, Ag), iu.register("single", {
            create: function (e, t) {
                var i = [];
                return e.eachComponent("singleAxis", function (n, o) {
                    var a = new NI(n, e, t);
                    a.name = "single_" + o, a.resize(n, t), n.coordinateSystem = a, i.push(a)
                }), e.eachSeries(function (t) {
                    if ("singleAxis" === t.get("coordinateSystem")) {
                        var i = e.queryComponents({
                            mainType: "singleAxis",
                            index: t.get("singleAxisIndex"),
                            id: t.get("singleAxisId")
                        })[0];
                        t.coordinateSystem = i && i.coordinateSystem
                    }
                }), i
            }, dimensions: (NI.prototype = {
                type: "singleAxis", axisPointerEnabled: !0, constructor: NI, _init: function (e, t, i) {
                    var n = this.dimension, o = new AI(n, Zp(e), [0, 0], e.get("type"), e.get("position")),
                        a = "category" === o.type;
                    o.onBand = a && e.get("boundaryGap"), o.inverse = e.get("inverse"), o.orient = e.get("orient"), (e.axis = o).model = e, (o.coordinateSystem = this)._axis = o
                }, update: function (e, t) {
                    e.eachSeries(function (e) {
                        if (e.coordinateSystem === this) {
                            var t = e.getData();
                            D(t.mapDimension(this.dimension, !0), function (e) {
                                this._axis.scale.unionExtentFromData(t, e)
                            }, this), Jp(this._axis.scale, this._axis.model)
                        }
                    }, this)
                }, resize: function (e, t) {
                    this._rect = md({
                        left: e.get("left"),
                        top: e.get("top"),
                        right: e.get("right"),
                        bottom: e.get("bottom"),
                        width: e.get("width"),
                        height: e.get("height")
                    }, {width: t.getWidth(), height: t.getHeight()}), this._adjustAxis()
                }, getRect: function () {
                    return this._rect
                }, _adjustAxis: function () {
                    var e = this._rect, t = this._axis, i = t.isHorizontal(), n = i ? [0, e.width] : [0, e.height],
                        o = t.reverse ? 1 : 0;
                    t.setExtent(n[o], n[1 - o]), this._updateAxisTransform(t, i ? e.x : e.y)
                }, _updateAxisTransform: function (e, t) {
                    var i = e.getExtent(), n = i[0] + i[1], o = e.isHorizontal();
                    e.toGlobalCoord = o ? function (e) {
                        return e + t
                    } : function (e) {
                        return n - e + t
                    }, e.toLocalCoord = o ? function (e) {
                        return e - t
                    } : function (e) {
                        return n - e + t
                    }
                }, getAxis: function () {
                    return this._axis
                }, getBaseAxis: function () {
                    return this._axis
                }, getAxes: function () {
                    return [this._axis]
                }, getTooltipAxes: function () {
                    return {baseAxes: [this.getAxis()]}
                }, containPoint: function (e) {
                    var t = this.getRect(), i = this.getAxis();
                    return "horizontal" === i.orient ? i.contain(i.toLocalCoord(e[0])) && e[1] >= t.y && e[1] <= t.y + t.height : i.contain(i.toLocalCoord(e[1])) && e[0] >= t.y && e[0] <= t.y + t.height
                }, pointToData: function (e) {
                    var t = this.getAxis();
                    return [t.coordToData(t.toLocalCoord(e["horizontal" === t.orient ? 0 : 1]))]
                }, dataToPoint: function (e) {
                    var t = this.getAxis(), i = this.getRect(), n = [], o = "horizontal" === t.orient ? 0 : 1;
                    return e instanceof Array && (e = e[0]), n[o] = t.toGlobalCoord(t.dataToCoord(+e)), n[1 - o] = 0 == o ? i.y + i.height / 2 : i.x + i.width / 2, n
                }
            }).dimensions
        });
        var EI = ["axisLine", "axisTickLabel", "axisName"], OI = ["splitArea", "splitLine"], PI = iv.extend({
            type: "singleAxis", axisPointerClass: "SingleAxisPointer", render: function (e, t, i, n) {
                var o = this.group;
                o.removeAll();
                var a = this._axisGroup;
                this._axisGroup = new Ai;
                var r = xI(e), s = new Vm(e, r);
                D(EI, s.add, s), o.add(this._axisGroup), o.add(s.getGroup()), D(OI, function (t) {
                    e.get(t + ".show") && this["_" + t](e)
                }, this), ul(a, this._axisGroup, e), PI.superCall(this, "render", e, t, i, n)
            }, remove: function () {
                lv(this)
            }, _splitLine: function (e) {
                var t = e.axis;
                if (!t.scale.isBlank()) {
                    var i = e.getModel("splitLine"), n = i.getModel("lineStyle"), o = n.get("width"),
                        a = n.get("color");
                    a = a instanceof Array ? a : [a];
                    for (var r = e.coordinateSystem.getRect(), s = t.isHorizontal(), l = [], d = 0, u = t.getTicksCoords({tickModel: i}), c = [], h = [], f = 0; f < u.length; ++f) {
                        var p = t.toGlobalCoord(u[f].coord);
                        s ? (c[0] = p, c[1] = r.y, h[0] = p, h[1] = r.y + r.height) : (c[0] = r.x, c[1] = p, h[0] = r.x + r.width, h[1] = p);
                        var g = d++ % a.length;
                        l[g] = l[g] || [], l[g].push(new is({
                            subPixelOptimize: !0,
                            shape: {x1: c[0], y1: c[1], x2: h[0], y2: h[1]},
                            style: {lineWidth: o},
                            silent: !0
                        }))
                    }
                    for (f = 0; f < l.length; ++f) this.group.add(Ns(l[f], {
                        style: {
                            stroke: a[f % a.length],
                            lineDash: n.getLineDash(o),
                            lineWidth: o
                        }, silent: !0
                    }))
                }
            }, _splitArea: function (e) {
                sv(this, this._axisGroup, e, e)
            }
        }), MI = Sd.extend({
            type: "singleAxis",
            layoutMode: "box",
            axis: null,
            coordinateSystem: null,
            getCoordSysModel: function () {
                return this
            }
        });

        function FI(e, t) {
            var i, n = [], o = e.seriesIndex;
            if (null == o || !(i = t.getSeriesByIndex(o))) return {point: []};
            var a = i.getData(), r = Ko(a, e);
            if (null == r || r < 0 || M(r)) return {point: []};
            var s = a.getItemGraphicEl(r), l = i.coordinateSystem;
            if (i.getTooltipPosition) n = i.getTooltipPosition(r) || []; else if (l && l.dataToPoint) n = l.dataToPoint(a.getValues(A(l.dimensions, function (e) {
                return a.mapDimension(e)
            }), r, !0)) || []; else if (s) {
                var d = s.getBoundingRect().clone();
                d.applyTransform(s.transform), n = [d.x + d.width / 2, d.y + d.height / 2]
            }
            return {point: n, el: s}
        }

        v(MI.prototype, ig), Dm("single", MI, function (e, t) {
            return t.type || (t.data ? "category" : "value")
        }, {
            left: "5%",
            top: "5%",
            right: "5%",
            bottom: "5%",
            type: "value",
            position: "bottom",
            orient: "horizontal",
            axisLine: {show: !0, lineStyle: {width: 1, type: "solid"}},
            tooltip: {show: !0},
            axisTick: {show: !0, length: 6, lineStyle: {width: 1}},
            axisLabel: {show: !0, interval: "auto"},
            splitLine: {show: !0, lineStyle: {type: "dashed", opacity: .2}}
        });
        var LI = D, RI = P, BI = Go();

        function UI(e, t, i, n, o) {
            var a = e.axis;
            if (!a.scale.isBlank() && a.containData(t)) if (e.involveSeries) {
                var r = function (e, t) {
                    var i = t.axis, n = i.dim, o = e, a = [], r = Number.MAX_VALUE, s = -1;
                    return LI(t.seriesModels, function (t, l) {
                        var d, u, c = t.getData().mapDimension(n, !0);
                        if (t.getAxisTooltipData) {
                            var h = t.getAxisTooltipData(c, e, i);
                            u = h.dataIndices, d = h.nestestValue
                        } else {
                            if (!(u = t.getData().indicesOfNearest(c[0], e, "category" === i.type ? .5 : null)).length) return;
                            d = t.getData().get(c[0], u[0])
                        }
                        if (null != d && isFinite(d)) {
                            var f = e - d, p = Math.abs(f);
                            p <= r && ((p < r || 0 <= f && s < 0) && (r = p, s = f, o = d, a.length = 0), LI(u, function (e) {
                                a.push({
                                    seriesIndex: t.seriesIndex,
                                    dataIndexInside: e,
                                    dataIndex: t.getData().getRawIndex(e)
                                })
                            }))
                        }
                    }), {payloadBatch: a, snapToValue: o}
                }(t, e), s = r.payloadBatch, l = r.snapToValue;
                s[0] && null == o.seriesIndex && T(o, s[0]), !n && e.snap && a.containData(l) && null != l && (t = l), i.showPointer(e, t, s, o), i.showTooltip(e, r, l)
            } else i.showPointer(e, t)
        }

        function VI(e, t, i, n) {
            e[t.key] = {value: i, payloadBatch: n}
        }

        function KI(e, t, i, n) {
            var o = i.payloadBatch, a = t.axis, r = a.model, s = t.axisPointerModel;
            if (t.triggerTooltip && o.length) {
                var l = t.coordSys.model, d = tv(l), u = e.map[d];
                u || (u = e.map[d] = {
                    coordSysId: l.id,
                    coordSysIndex: l.componentIndex,
                    coordSysType: l.type,
                    coordSysMainType: l.mainType,
                    dataByAxis: []
                }, e.list.push(u)), u.dataByAxis.push({
                    axisDim: a.dim,
                    axisIndex: r.componentIndex,
                    axisType: r.type,
                    axisId: r.id,
                    value: n,
                    valueLabelOpt: {precision: s.get("label.precision"), formatter: s.get("label.formatter")},
                    seriesDataIndices: o.slice()
                })
            }
        }

        function GI(e) {
            var t = e.axis.model, i = {}, n = i.axisDim = e.axis.dim;
            return i.axisIndex = i[n + "AxisIndex"] = t.componentIndex, i.axisName = i[n + "AxisName"] = t.name, i.axisId = i[n + "AxisId"] = t.id, i
        }

        function WI(e) {
            return !e || null == e[0] || isNaN(e[0]) || null == e[1] || isNaN(e[1])
        }

        Tf({
            type: "axisPointer",
            coordSysAxesInfo: null,
            defaultOption: {
                show: "auto",
                triggerOn: null,
                zlevel: 0,
                z: 50,
                type: "line",
                snap: !1,
                triggerTooltip: !0,
                value: null,
                status: null,
                link: [],
                animation: null,
                animationDurationUpdate: 200,
                lineStyle: {color: "#aaa", width: 1, type: "solid"},
                shadowStyle: {color: "rgba(150,150,150,0.3)"},
                label: {
                    show: !0,
                    formatter: null,
                    precision: "auto",
                    margin: 3,
                    color: "#fff",
                    padding: [5, 7, 5, 7],
                    backgroundColor: "auto",
                    borderColor: null,
                    borderWidth: 0,
                    shadowBlur: 3,
                    shadowColor: "#aaa"
                },
                handle: {
                    show: !1,
                    icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
                    size: 45,
                    margin: 50,
                    color: "#333",
                    shadowBlur: 3,
                    shadowColor: "#aaa",
                    shadowOffsetX: 0,
                    shadowOffsetY: 2,
                    throttle: 40
                }
            }
        });
        var jI = Go(), HI = D;

        function zI(e, t, i) {
            if (!o.node) {
                var n = t.getZr();
                jI(n).records || (jI(n).records = {}), function (e, t) {
                    function i(i, n) {
                        e.on(i, function (i) {
                            var o = function (e) {
                                var t = {showTip: [], hideTip: []}, i = function (n) {
                                    var o = t[n.type];
                                    o ? o.push(n) : (n.dispatchAction = i, e.dispatchAction(n))
                                };
                                return {dispatchAction: i, pendings: t}
                            }(t);
                            HI(jI(e).records, function (e) {
                                e && n(e, i, o.dispatchAction)
                            }), function (e, t) {
                                var i, n = e.showTip.length, o = e.hideTip.length;
                                n ? i = e.showTip[n - 1] : o && (i = e.hideTip[o - 1]), i && (i.dispatchAction = null, t.dispatchAction(i))
                            }(o.pendings, t)
                        })
                    }

                    jI(e).initialized || (jI(e).initialized = !0, i("click", P(qI, "click")), i("mousemove", P(qI, "mousemove")), i("globalout", XI))
                }(n, t), (jI(n).records[e] || (jI(n).records[e] = {})).handler = i
            }
        }

        function XI(e, t, i) {
            e.handler("leave", null, i)
        }

        function qI(e, t, i, n) {
            t.handler(e, i, n)
        }

        function YI(e, t) {
            if (!o.node) {
                var i = t.getZr();
                (jI(i).records || {})[e] && (jI(i).records[e] = null)
            }
        }

        var JI = wf({
            type: "axisPointer", render: function (e, t, i) {
                var n = t.getComponent("tooltip"),
                    o = e.get("triggerOn") || n && n.get("triggerOn") || "mousemove|click";
                zI("axisPointer", i, function (e, t, i) {
                    "none" !== o && ("leave" === e || 0 <= o.indexOf(e)) && i({
                        type: "updateAxisPointer",
                        currTrigger: e,
                        x: t && t.offsetX,
                        y: t && t.offsetY
                    })
                })
            }, remove: function (e, t) {
                YI(t.getZr(), "axisPointer"), JI.superApply(this._model, "remove", arguments)
            }, dispose: function (e, t) {
                YI("axisPointer", t), JI.superApply(this._model, "dispose", arguments)
            }
        }), ZI = Go(), QI = m, $I = O;

        function eS() {
        }

        function tS(e, t, i, n) {
            !function e(t, i) {
                if (R(t) && R(i)) {
                    var n = !0;
                    return D(i, function (i, o) {
                        n = n && e(t[o], i)
                    }), !!n
                }
                return t === i
            }(ZI(i).lastProp, n) && (ZI(i).lastProp = n, t ? al(i, n, e) : (i.stopAnimation(), i.attr(n)))
        }

        function iS(e, t) {
            e[t.get("label.show") ? "show" : "hide"]()
        }

        function nS(e) {
            return {position: e.position.slice(), rotation: e.rotation || 0}
        }

        function oS(e, t, i) {
            var n = t.get("z"), o = t.get("zlevel");
            e && e.traverse(function (e) {
                "group" !== e.type && (null != n && (e.z = n), null != o && (e.zlevel = o), e.silent = i)
            })
        }

        function aS(e) {
            var t, i = e.get("type"), n = e.getModel(i + "Style");
            return "line" === i ? (t = n.getLineStyle()).fill = null : "shadow" === i && ((t = n.getAreaStyle()).stroke = null), t
        }

        function rS(e, t, i, n, o) {
            var a = sS(i.get("value"), t.axis, t.ecModel, i.get("seriesDataIndices"), {
                    precision: i.get("label.precision"),
                    formatter: i.get("label.formatter")
                }), r = i.getModel("label"), s = Jl(r.get("padding") || 0), l = r.getFont(), d = cn(a, l), u = o.position,
                c = d.width + s[1] + s[3], h = d.height + s[0] + s[2], f = o.align;
            "right" === f && (u[0] -= c), "center" === f && (u[0] -= c / 2);
            var p = o.verticalAlign;
            "bottom" === p && (u[1] -= h), "middle" === p && (u[1] -= h / 2), function (e, t, i, n) {
                var o = n.getWidth(), a = n.getHeight();
                e[0] = Math.min(e[0] + t, o) - t, e[1] = Math.min(e[1] + i, a) - i, e[0] = Math.max(e[0], 0), e[1] = Math.max(e[1], 0)
            }(u, c, h, n);
            var g = r.get("backgroundColor");
            g && "auto" !== g || (g = t.get("axisLine.lineStyle.color")), e.label = {
                shape: {
                    x: 0,
                    y: 0,
                    width: c,
                    height: h,
                    r: r.get("borderRadius")
                },
                position: u.slice(),
                style: {
                    text: a,
                    textFont: l,
                    textFill: r.getTextColor(),
                    textPosition: "inside",
                    textPadding: s,
                    fill: g,
                    stroke: r.get("borderColor") || "transparent",
                    lineWidth: r.get("borderWidth") || 0,
                    shadowBlur: r.get("shadowBlur"),
                    shadowColor: r.get("shadowColor"),
                    shadowOffsetX: r.get("shadowOffsetX"),
                    shadowOffsetY: r.get("shadowOffsetY")
                },
                z2: 10
            }
        }

        function sS(e, t, i, n, o) {
            e = t.scale.parse(e);
            var a = t.scale.getLabel(e, {precision: o.precision}), r = o.formatter;
            if (r) {
                var s = {value: $p(t, e), axisDimension: t.dim, axisIndex: t.index, seriesData: []};
                D(n, function (e) {
                    var t = i.getSeriesByIndex(e.seriesIndex), n = e.dataIndexInside, o = t && t.getDataParams(n);
                    o && s.seriesData.push(o)
                }), L(r) ? a = r.replace("{value}", a) : F(r) && (a = r(s))
            }
            return a
        }

        function lS(e, t, i) {
            var n = at();
            return ut(n, n, i.rotation), dt(n, n, i.position), ll([e.dataToCoord(t), (i.labelOffset || 0) + (i.labelDirection || 1) * (i.labelMargin || 0)], n)
        }

        function dS(e, t, i, n, o, a) {
            var r = Vm.innerTextLayout(i.rotation, 0, i.labelDirection);
            i.labelMargin = o.get("label.margin"), rS(t, n, o, a, {
                position: lS(n.axis, e, i),
                align: r.textAlign,
                verticalAlign: r.textVerticalAlign
            })
        }

        function uS(e, t, i) {
            return {x1: e[i = i || 0], y1: e[1 - i], x2: t[i], y2: t[1 - i]}
        }

        function cS(e, t, i) {
            return {x: e[i = i || 0], y: e[1 - i], width: t[i], height: t[1 - i]}
        }

        function hS(e, t, i, n, o, a) {
            return {cx: e, cy: t, r0: i, r: n, startAngle: o, endAngle: a, clockwise: !0}
        }

        Qo((eS.prototype = {
            _group: null,
            _lastGraphicKey: null,
            _handle: null,
            _dragging: !1,
            _lastValue: null,
            _lastStatus: null,
            _payloadInfo: null,
            animationThreshold: 15,
            render: function (e, t, i, n) {
                var o = t.get("value"), a = t.get("status");
                if (this._axisModel = e, this._axisPointerModel = t, this._api = i, n || this._lastValue !== o || this._lastStatus !== a) {
                    this._lastValue = o, this._lastStatus = a;
                    var r = this._group, s = this._handle;
                    if (!a || "hide" === a) return r && r.hide(), void (s && s.hide());
                    r && r.show(), s && s.show();
                    var l = {};
                    this.makeElOption(l, o, e, t, i);
                    var d = l.graphicKey;
                    d !== this._lastGraphicKey && this.clear(i), this._lastGraphicKey = d;
                    var u = this._moveAnimation = this.determineAnimation(e, t);
                    if (r) {
                        var c = P(tS, t, u);
                        this.updatePointerEl(r, l, c, t), this.updateLabelEl(r, l, c, t)
                    } else r = this._group = new Ai, this.createPointerEl(r, l, e, t), this.createLabelEl(r, l, e, t), i.getZr().add(r);
                    oS(r, t, !0), this._renderHandle(o)
                }
            },
            remove: function (e) {
                this.clear(e)
            },
            dispose: function (e) {
                this.clear(e)
            },
            determineAnimation: function (e, t) {
                var i = t.get("animation"), n = e.axis, o = "category" === n.type, a = t.get("snap");
                if (!a && !o) return !1;
                if ("auto" !== i && null != i) return !0 === i;
                var r = this.animationThreshold;
                if (o && n.getBandWidth() > r) return !0;
                if (a) {
                    var s = $m(e).seriesDataCount, l = n.getExtent();
                    return Math.abs(l[0] - l[1]) / s > r
                }
                return !1
            },
            makeElOption: function (e, t, i, n, o) {
            },
            createPointerEl: function (e, t, i, n) {
                var o = t.pointer;
                if (o) {
                    var a = ZI(e).pointerEl = new ml[o.type](QI(t.pointer));
                    e.add(a)
                }
            },
            createLabelEl: function (e, t, i, n) {
                if (t.label) {
                    var o = ZI(e).labelEl = new es(QI(t.label));
                    e.add(o), iS(o, n)
                }
            },
            updatePointerEl: function (e, t, i) {
                var n = ZI(e).pointerEl;
                n && t.pointer && (n.setStyle(t.pointer.style), i(n, {shape: t.pointer.shape}))
            },
            updateLabelEl: function (e, t, i, n) {
                var o = ZI(e).labelEl;
                o && (o.setStyle(t.label.style), i(o, {shape: t.label.shape, position: t.label.position}), iS(o, n))
            },
            _renderHandle: function (e) {
                if (!this._dragging && this.updateHandleTransform) {
                    var t, i = this._axisPointerModel, n = this._api.getZr(), o = this._handle,
                        a = i.getModel("handle"), r = i.get("status");
                    if (!a.get("show") || !r || "hide" === r) return o && n.remove(o), void (this._handle = null);
                    this._handle || (t = !0, o = this._handle = hl(a.get("icon"), {
                        cursor: "move",
                        draggable: !0,
                        onmousemove: function (e) {
                            ze(e.event)
                        },
                        onmousedown: $I(this._onHandleDragMove, this, 0, 0),
                        drift: $I(this._onHandleDragMove, this),
                        ondragend: $I(this._onHandleDragEnd, this)
                    }), n.add(o)), oS(o, i, !1), o.setStyle(a.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
                    var s = a.get("size");
                    M(s) || (s = [s, s]), o.attr("scale", [s[0] / 2, s[1] / 2]), Ic(this, "_doDispatchAxisPointer", a.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, t)
                }
            },
            _moveHandleToValue: function (e, t) {
                tS(this._axisPointerModel, !t && this._moveAnimation, this._handle, nS(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)))
            },
            _onHandleDragMove: function (e, t) {
                var i = this._handle;
                if (i) {
                    this._dragging = !0;
                    var n = this.updateHandleTransform(nS(i), [e, t], this._axisModel, this._axisPointerModel);
                    this._payloadInfo = n, i.stopAnimation(), i.attr(nS(n)), ZI(i).lastProp = null, this._doDispatchAxisPointer()
                }
            },
            _doDispatchAxisPointer: function () {
                if (this._handle) {
                    var e = this._payloadInfo, t = this._axisModel;
                    this._api.dispatchAction({
                        type: "updateAxisPointer",
                        x: e.cursorPoint[0],
                        y: e.cursorPoint[1],
                        tooltipOption: e.tooltipOption,
                        axesInfo: [{axisDim: t.axis.dim, axisIndex: t.componentIndex}]
                    })
                }
            },
            _onHandleDragEnd: function (e) {
                if (this._dragging = !1, this._handle) {
                    var t = this._axisPointerModel.get("value");
                    this._moveHandleToValue(t), this._api.dispatchAction({type: "hideTip"})
                }
            },
            getHandleTransform: null,
            updateHandleTransform: null,
            clear: function (e) {
                this._lastValue = null, this._lastStatus = null;
                var t = e.getZr(), i = this._group, n = this._handle;
                t && i && (this._lastGraphicKey = null, i && t.remove(i), n && t.remove(n), this._group = null, this._handle = null, this._payloadInfo = null)
            },
            doClear: function () {
            },
            buildLabel: function (e, t, i) {
                return {x: e[i = i || 0], y: e[1 - i], width: t[i], height: t[1 - i]}
            }
        }).constructor = eS);
        var fS = eS.extend({
            makeElOption: function (e, t, i, n, o) {
                var a = i.axis, r = a.grid, s = n.get("type"), l = pS(r, a).getOtherAxis(a).getGlobalExtent(),
                    d = a.toGlobalCoord(a.dataToCoord(t, !0));
                if (s && "none" !== s) {
                    var u = aS(n), c = gS[s](a, d, l);
                    c.style = u, e.graphicKey = c.type, e.pointer = c
                }
                dS(t, e, rv(r.model, i), i, n, o)
            }, getHandleTransform: function (e, t, i) {
                var n = rv(t.axis.grid.model, t, {labelInside: !1});
                return n.labelMargin = i.get("handle.margin"), {
                    position: lS(t.axis, e, n),
                    rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
                }
            }, updateHandleTransform: function (e, t, i, n) {
                var o = i.axis, a = o.grid, r = o.getGlobalExtent(!0), s = pS(a, o).getOtherAxis(o).getGlobalExtent(),
                    l = "x" === o.dim ? 0 : 1, d = e.position;
                d[l] += t[l], d[l] = Math.min(r[1], d[l]), d[l] = Math.max(r[0], d[l]);
                var u = (s[1] + s[0]) / 2, c = [u, u];
                return c[l] = d[l], {
                    position: d,
                    rotation: e.rotation,
                    cursorPoint: c,
                    tooltipOption: [{verticalAlign: "middle"}, {align: "center"}][l]
                }
            }
        });

        function pS(e, t) {
            var i = {};
            return i[t.dim + "AxisIndex"] = t.index, e.getCartesian(i)
        }

        var gS = {
            line: function (e, t, i) {
                return {type: "Line", subPixelOptimize: !0, shape: uS([t, i[0]], [t, i[1]], mS(e))}
            }, shadow: function (e, t, i) {
                var n = Math.max(1, e.getBandWidth()), o = i[1] - i[0];
                return {type: "Rect", shape: cS([t - n / 2, i[0]], [n, o], mS(e))}
            }
        };

        function mS(e) {
            return "x" === e.dim ? 0 : 1
        }

        iv.registerAxisPointerClass("CartesianAxisPointer", fS), cf(function (e) {
            if (e) {
                e.axisPointer && 0 !== e.axisPointer.length || (e.axisPointer = {});
                var t = e.axisPointer.link;
                t && !M(t) && (e.axisPointer.link = [t])
            }
        }), hf(bh.PROCESSOR.STATISTIC, function (e, t) {
            e.getComponent("axisPointer").coordSysAxesInfo = function (e, t) {
                var i = {axesInfo: {}, seriesInvolved: !1, coordSysAxesInfo: {}, coordSysMap: {}};
                return function (e, t, i) {
                    var n = t.getComponent("tooltip"), o = t.getComponent("axisPointer"), a = o.get("link", !0) || [],
                        r = [];
                    Jm(i.getCoordinateSystems(), function (i) {
                        if (i.axisPointerEnabled) {
                            var s = tv(i.model), l = e.coordSysAxesInfo[s] = {},
                                d = (e.coordSysMap[s] = i).model.getModel("tooltip", n);
                            if (Jm(i.getAxes(), Zm(f, !1, null)), i.getTooltipAxes && n && d.get("show")) {
                                var u = "axis" === d.get("trigger"), c = "cross" === d.get("axisPointer.type"),
                                    h = i.getTooltipAxes(d.get("axisPointer.axis"));
                                (u || c) && Jm(h.baseAxes, Zm(f, !c || "cross", u)), c && Jm(h.otherAxes, Zm(f, "cross", !1))
                            }
                        }

                        function f(n, s, u) {
                            var c = u.model.getModel("axisPointer", o), h = c.get("show");
                            if (h && ("auto" !== h || n || ev(c))) {
                                null == s && (s = c.get("triggerTooltip"));
                                var f = (c = n ? function (e, t, i, n, o, a) {
                                        var r = t.getModel("axisPointer"), s = {};
                                        Jm(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], function (e) {
                                            s[e] = m(r.get(e))
                                        }), s.snap = "category" !== e.type && !!a, "cross" === r.get("type") && (s.type = "line");
                                        var l = s.label || (s.label = {});
                                        if (null == l.show && (l.show = !1), "cross" === o) {
                                            var d = r.get("label.show");
                                            if (l.show = null == d || d, !a) {
                                                var u = s.lineStyle = r.get("crossStyle");
                                                u && w(l, u.textStyle)
                                            }
                                        }
                                        return e.model.getModel("axisPointer", new bl(s, i, n))
                                    }(u, d, o, t, n, s) : c).get("snap"), p = tv(u.model),
                                    g = s || f || "category" === u.type, v = e.axesInfo[p] = {
                                        key: p,
                                        axis: u,
                                        coordSys: i,
                                        axisPointerModel: c,
                                        triggerTooltip: s,
                                        involveSeries: g,
                                        snap: f,
                                        useHandle: ev(c),
                                        seriesModels: []
                                    };
                                l[p] = v, e.seriesInvolved |= g;
                                var y = function (e, t) {
                                    for (var i = t.model, n = t.dim, o = 0; o < e.length; o++) {
                                        var a = e[o] || {};
                                        if (Qm(a[n + "AxisId"], i.id) || Qm(a[n + "AxisIndex"], i.componentIndex) || Qm(a[n + "AxisName"], i.name)) return o
                                    }
                                }(a, u);
                                if (null != y) {
                                    var T = r[y] || (r[y] = {axesInfo: {}});
                                    T.axesInfo[p] = v, T.mapper = a[y].mapper, v.linkGroup = T
                                }
                            }
                        }
                    })
                }(i, e, t), i.seriesInvolved && function (e, t) {
                    t.eachSeries(function (t) {
                        var i = t.coordinateSystem, n = t.get("tooltip.trigger", !0), o = t.get("tooltip.show", !0);
                        i && "none" !== n && !1 !== n && "item" !== n && !1 !== o && !1 !== t.get("axisPointer.show", !0) && Jm(e.coordSysAxesInfo[tv(i.model)], function (e) {
                            var n = e.axis;
                            i.getAxis(n.dim) === n && (e.seriesModels.push(t), null == e.seriesDataCount && (e.seriesDataCount = 0), e.seriesDataCount += t.getData().count())
                        })
                    }, this)
                }(i, e), i
            }(e, t)
        }), ff({
            type: "updateAxisPointer",
            event: "updateAxisPointer",
            update: ":updateAxisPointer"
        }, function (e, t, i) {
            var n = e.currTrigger, o = [e.x, e.y], a = e, r = e.dispatchAction || O(i.dispatchAction, i),
                s = t.getComponent("axisPointer").coordSysAxesInfo;
            if (s) {
                WI(o) && (o = FI({seriesIndex: a.seriesIndex, dataIndex: a.dataIndex}, t).point);
                var l = WI(o), d = a.axesInfo, u = s.axesInfo, c = "leave" === n || WI(o), h = {}, f = {},
                    p = {list: [], map: {}}, g = {showPointer: RI(VI, f), showTooltip: RI(KI, p)};
                LI(s.coordSysMap, function (e, t) {
                    var i = l || e.containPoint(o);
                    LI(s.coordSysAxesInfo[t], function (e, t) {
                        var n = e.axis, a = function (e, t) {
                            for (var i = 0; i < (e || []).length; i++) {
                                var n = e[i];
                                if (t.axis.dim === n.axisDim && t.axis.model.componentIndex === n.axisIndex) return n
                            }
                        }(d, e);
                        if (!c && i && (!d || a)) {
                            var r = a && a.value;
                            null != r || l || (r = n.pointToData(o)), null != r && UI(e, r, g, !1, h)
                        }
                    })
                });
                var m = {};
                return LI(u, function (e, t) {
                    var i = e.linkGroup;
                    i && !f[t] && LI(i.axesInfo, function (t, n) {
                        var o = f[n];
                        if (t !== e && o) {
                            var a = o.value;
                            i.mapper && (a = e.axis.scale.parse(i.mapper(a, GI(t), GI(e)))), m[e.key] = a
                        }
                    })
                }), LI(m, function (e, t) {
                    UI(u[t], e, g, !0, h)
                }), function (e, t, i) {
                    var n = i.axesInfo = [];
                    LI(t, function (t, i) {
                        var o = t.axisPointerModel.option, a = e[i];
                        a ? (t.useHandle || (o.status = "show"), o.value = a.value, o.seriesDataIndices = (a.payloadBatch || []).slice()) : t.useHandle || (o.status = "hide"), "show" === o.status && n.push({
                            axisDim: t.axis.dim,
                            axisIndex: t.axis.model.componentIndex,
                            value: o.value
                        })
                    })
                }(f, u, h), function (e, t, i, n) {
                    if (WI(t) || !e.list.length) return n({type: "hideTip"});
                    var o = ((e.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
                    n({
                        type: "showTip",
                        escapeConnect: !0,
                        x: t[0],
                        y: t[1],
                        tooltipOption: i.tooltipOption,
                        position: i.position,
                        dataIndexInside: o.dataIndexInside,
                        dataIndex: o.dataIndex,
                        seriesIndex: o.seriesIndex,
                        dataByCoordSys: e.list
                    })
                }(p, o, e, r), function (e, t, i) {
                    var n = i.getZr(), o = "axisPointerLastHighlights", a = BI(n)[o] || {}, r = BI(n)[o] = {};
                    LI(e, function (e, t) {
                        var i = e.axisPointerModel.option;
                        "show" === i.status && LI(i.seriesDataIndices, function (e) {
                            var t = e.seriesIndex + " | " + e.dataIndex;
                            r[t] = e
                        })
                    });
                    var s = [], l = [];
                    D(a, function (e, t) {
                        r[t] || l.push(e)
                    }), D(r, function (e, t) {
                        a[t] || s.push(e)
                    }), l.length && i.dispatchAction({
                        type: "downplay",
                        escapeConnect: !0,
                        batch: l
                    }), s.length && i.dispatchAction({type: "highlight", escapeConnect: !0, batch: s})
                }(u, 0, i), h
            }
        });
        var vS = ["x", "y"], yS = ["width", "height"], TS = eS.extend({
            makeElOption: function (e, t, i, n, o) {
                var a = i.axis, r = a.coordinateSystem, s = CS(r, 1 - kS(a)), l = r.dataToPoint(t)[0],
                    d = n.get("type");
                if (d && "none" !== d) {
                    var u = aS(n), c = wS[d](a, l, s);
                    c.style = u, e.graphicKey = c.type, e.pointer = c
                }
                dS(t, e, xI(i), i, n, o)
            }, getHandleTransform: function (e, t, i) {
                var n = xI(t, {labelInside: !1});
                return n.labelMargin = i.get("handle.margin"), {
                    position: lS(t.axis, e, n),
                    rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
                }
            }, updateHandleTransform: function (e, t, i, n) {
                var o = i.axis, a = o.coordinateSystem, r = kS(o), s = CS(a, r), l = e.position;
                l[r] += t[r], l[r] = Math.min(s[1], l[r]), l[r] = Math.max(s[0], l[r]);
                var d = CS(a, 1 - r), u = (d[1] + d[0]) / 2, c = [u, u];
                return c[r] = l[r], {
                    position: l,
                    rotation: e.rotation,
                    cursorPoint: c,
                    tooltipOption: {verticalAlign: "middle"}
                }
            }
        }), wS = {
            line: function (e, t, i) {
                return {type: "Line", subPixelOptimize: !0, shape: uS([t, i[0]], [t, i[1]], kS(e))}
            }, shadow: function (e, t, i) {
                var n = e.getBandWidth(), o = i[1] - i[0];
                return {type: "Rect", shape: cS([t - n / 2, i[0]], [n, o], kS(e))}
            }
        };

        function kS(e) {
            return e.isHorizontal() ? 0 : 1
        }

        function CS(e, t) {
            var i = e.getRect();
            return [i[vS[t]], i[vS[t]] + i[yS[t]]]
        }

        iv.registerAxisPointerClass("SingleAxisPointer", TS), wf({type: "single"});
        var bS = ec.extend({
            type: "series.themeRiver",
            dependencies: ["singleAxis"],
            nameMap: null,
            init: function (e) {
                bS.superApply(this, "init", arguments), this.legendVisualProvider = new Fv(O(this.getData, this), O(this.getRawData, this))
            },
            fixData: function (e) {
                var t = e.length, i = qo(e, function (e) {
                    return e[2]
                }), n = [];
                i.buckets.each(function (e, t) {
                    n.push({name: t, dataList: e})
                });
                for (var o = n.length, a = -1, r = -1, s = 0; s < o; ++s) {
                    var l = n[s].dataList.length;
                    a < l && (a = l, r = s)
                }
                for (var d = 0; d < o; ++d) if (d !== r) for (var u = n[d].name, c = 0; c < a; ++c) {
                    for (var h = n[r].dataList[c][0], f = n[d].dataList.length, p = -1, g = 0; g < f; ++g) if (n[d].dataList[g][0] === h) {
                        p = g;
                        break
                    }
                    -1 === p && (e[t] = [], e[t][0] = h, e[t][1] = 0, e[t][2] = u, t++)
                }
                return e
            },
            getInitialData: function (e, t) {
                for (var i = t.queryComponents({
                    mainType: "singleAxis",
                    index: this.get("singleAxisIndex"),
                    id: this.get("singleAxisId")
                })[0].get("type"), n = x(e.data, function (e) {
                    return void 0 !== e[2]
                }), o = this.fixData(n || []), a = [], r = this.nameMap = $(), s = 0, l = 0; l < o.length; ++l) a.push(o[l][2]), r.get(o[l][2]) || (r.set(o[l][2], s), s++);
                var d = ep(o, {
                    coordDimensions: ["single"],
                    dimensionsDefine: [{name: "time", type: Af(i)}, {name: "value", type: "float"}, {
                        name: "name",
                        type: "ordinal"
                    }],
                    encodeDefine: {single: 0, value: 1, itemName: 2}
                }), u = new Vf(d, this);
                return u.initData(o), u
            },
            getLayerSeries: function () {
                for (var e = this.getData(), t = e.count(), i = [], n = 0; n < t; ++n) i[n] = n;
                var o = e.mapDimension("single"), a = qo(i, function (t) {
                    return e.get("name", t)
                }), r = [];
                return a.buckets.each(function (t, i) {
                    t.sort(function (t, i) {
                        return e.get(o, t) - e.get(o, i)
                    }), r.push({name: i, indices: t})
                }), r
            },
            getAxisTooltipData: function (e, t, i) {
                M(e) || (e = e ? [e] : []);
                for (var n, o = this.getData(), a = this.getLayerSeries(), r = [], s = a.length, l = 0; l < s; ++l) {
                    for (var d = Number.MAX_VALUE, u = -1, c = a[l].indices.length, h = 0; h < c; ++h) {
                        var f = o.get(e[0], a[l].indices[h]), p = Math.abs(f - t);
                        p <= d && (n = f, d = p, u = a[l].indices[h])
                    }
                    r.push(u)
                }
                return {dataIndices: r, nestestValue: n}
            },
            formatTooltip: function (e) {
                var t = this.getData(), i = t.getName(e), n = t.get(t.mapDimension("value"), e);
                return !isNaN(n) && null != n || (n = "-"), $l(i + " : " + n)
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                coordinateSystem: "singleAxis",
                boundaryGap: ["10%", "10%"],
                singleAxisIndex: 0,
                animationEasing: "linear",
                label: {margin: 4, show: !0, position: "left", color: "#000", fontSize: 11},
                emphasis: {label: {show: !0}}
            }
        });

        function IS(e, t, i) {
            if (e.count()) for (var n, o = t.coordinateSystem, a = t.getLayerSeries(), r = e.mapDimension("single"), s = e.mapDimension("value"), l = A(a, function (t) {
                return A(t.indices, function (t) {
                    var i = o.dataToPoint(e.get(r, t));
                    return i[1] = e.get(s, t), i
                })
            }), d = function (e) {
                for (var t = e.length, i = e[0].length, n = [], o = [], a = 0, r = {}, s = 0; s < i; ++s) {
                    for (var l = 0, d = 0; l < t; ++l) d += e[l][s][1];
                    a < d && (a = d), n.push(d)
                }
                for (var u = 0; u < i; ++u) o[u] = (a - n[u]) / 2;
                for (var c = a = 0; c < i; ++c) {
                    var h = n[c] + o[c];
                    a < h && (a = h)
                }
                return r.y0 = o, r.max = a, r
            }(l), u = d.y0, c = i / d.max, h = a.length, f = a[0].indices.length, p = 0; p < f; ++p) {
                n = u[p] * c, e.setItemLayout(a[0].indices[p], {
                    layerIndex: 0,
                    x: l[0][p][0],
                    y0: n,
                    y: l[0][p][1] * c
                });
                for (var g = 1; g < h; ++g) n += l[g - 1][p][1] * c, e.setItemLayout(a[g].indices[p], {
                    layerIndex: g,
                    x: l[g][p][0],
                    y0: n,
                    y: l[g][p][1] * c
                })
            }
        }

        Cf({
            type: "themeRiver", init: function () {
                this._layers = []
            }, render: function (e, t, i) {
                var n = e.getData(), o = this.group, a = e.getLayerSeries(), r = n.getLayout("layoutInfo"), s = r.rect,
                    l = r.boundaryGap;

                function d(e) {
                    return e.name
                }

                o.attr("position", [0, s.y + l[0]]);
                var u = new If(this._layersSeries || [], a, d, d), c = {};

                function h(t, i, r) {
                    var s = this._layers;
                    if ("remove" !== t) {
                        for (var l, d, u, h = [], f = [], p = a[i].indices, g = 0; g < p.length; g++) {
                            var m = n.getItemLayout(p[g]), v = m.x, y = m.y0, w = m.y;
                            h.push([v, y]), f.push([v, y + w]), l = n.getItemVisual(p[g], "color")
                        }
                        var k = n.getItemLayout(p[0]), C = n.getItemModel(p[g - 1]), b = C.getModel("label"),
                            I = b.get("margin");
                        if ("add" === t) {
                            var S = c[i] = new Ai;
                            d = new lm({
                                shape: {
                                    points: h,
                                    stackedOnPoints: f,
                                    smooth: .4,
                                    stackedOnSmooth: .4,
                                    smoothConstraint: !1
                                }, z2: 0
                            }), u = new Ur({
                                style: {
                                    x: k.x - I,
                                    y: k.y0 + k.y / 2
                                }
                            }), S.add(d), S.add(u), o.add(S), d.setClipPath(function (e, t, i) {
                                var n = new es({shape: {x: e.x - 10, y: e.y - 10, width: 0, height: e.height + 20}});
                                return rl(n, {shape: {width: e.width + 20, height: e.height + 20}}, t, function () {
                                    d.removeClipPath()
                                }), n
                            }(d.getBoundingRect(), e))
                        } else S = s[r], d = S.childAt(0), u = S.childAt(1), o.add(S), c[i] = S, al(d, {
                            shape: {
                                points: h,
                                stackedOnPoints: f
                            }
                        }, e), al(u, {style: {x: k.x - I, y: k.y0 + k.y / 2}}, e);
                        var _ = C.getModel("emphasis.itemStyle"), D = C.getModel("itemStyle");
                        Zs(u.style, b, {
                            text: b.get("show") ? e.getFormattedLabel(p[g - 1], "normal") || n.getName(p[g - 1]) : null,
                            textVerticalAlign: "middle"
                        }), d.setStyle(T({fill: l}, D.getItemStyle(["color"]))), Hs(d, _.getItemStyle())
                    } else o.remove(s[i])
                }

                u.add(O(h, this, "add")).update(O(h, this, "update")).remove(O(h, this, "remove")).execute(), this._layersSeries = a, this._layers = c
            }, dispose: function () {
            }
        }), gf(function (e, t) {
            e.eachSeriesByType("themeRiver", function (e) {
                var t = e.getData(), i = e.coordinateSystem, n = {}, o = i.getRect();
                n.rect = o;
                var a = e.get("boundaryGap"), r = i.getAxis();
                n.boundaryGap = a, "horizontal" === r.orient ? (a[0] = xl(a[0], o.height), a[1] = xl(a[1], o.height), IS(t, e, o.height - a[0] - a[1])) : (a[0] = xl(a[0], o.width), a[1] = xl(a[1], o.width), IS(t, e, o.width - a[0] - a[1])), t.setLayout("layoutInfo", n)
            })
        }), mf(function (e) {
            e.eachSeriesByType("themeRiver", function (e) {
                var t = e.getData(), i = e.getRawData(), n = e.get("color"), o = $();
                t.each(function (e) {
                    o.set(t.getRawIndex(e), e)
                }), i.each(function (a) {
                    var r = i.getName(a), s = n[(e.nameMap.get(r) - 1) % n.length];
                    i.setItemVisual(a, "color", s);
                    var l = o.get(a);
                    null != l && t.setItemVisual(l, "color", s)
                })
            })
        }), hf(qv("themeRiver")), ec.extend({
            type: "series.sunburst",
            _viewRoot: null,
            getInitialData: function (e, t) {
                var i = {name: e.name, children: e.data};
                !function e(t) {
                    var i = 0;
                    D(t.children, function (t) {
                        e(t);
                        var n = t.value;
                        M(n) && (n = n[0]), i += n
                    });
                    var n = t.value;
                    M(n) && (n = n[0]), null != n && !isNaN(n) || (n = i), n < 0 && (n = 0), M(t.value) ? t.value[0] = n : t.value = n
                }(i);
                var n = e.levels || [], o = {};
                return o.levels = n, uT.createTree(i, this, o).data
            },
            optionUpdated: function () {
                this.resetViewRoot()
            },
            getDataParams: function (e) {
                var t = ec.prototype.getDataParams.apply(this, arguments),
                    i = this.getData().tree.getNodeByDataIndex(e);
                return t.treePathInfo = NT(i, this), t
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                center: ["50%", "50%"],
                radius: [0, "75%"],
                clockwise: !0,
                startAngle: 90,
                minAngle: 0,
                percentPrecision: 2,
                stillShowZeroSum: !0,
                highlightPolicy: "descendant",
                nodeClick: "rootToNode",
                renderLabelForZeroData: !1,
                label: {
                    rotate: "radial",
                    show: !0,
                    opacity: 1,
                    align: "center",
                    position: "inside",
                    distance: 5,
                    silent: !0
                },
                itemStyle: {
                    borderWidth: 1,
                    borderColor: "white",
                    borderType: "solid",
                    shadowBlur: 0,
                    shadowColor: "rgba(0, 0, 0, 0.2)",
                    shadowOffsetX: 0,
                    shadowOffsetY: 0,
                    opacity: 1
                },
                highlight: {itemStyle: {opacity: 1}},
                downplay: {itemStyle: {opacity: .5}, label: {opacity: .6}},
                animationType: "expansion",
                animationDuration: 1e3,
                animationDurationUpdate: 500,
                animationEasing: "cubicOut",
                data: [],
                levels: [],
                sort: "desc"
            },
            getViewRoot: function () {
                return this._viewRoot
            },
            resetViewRoot: function (e) {
                e ? this._viewRoot = e : e = this._viewRoot;
                var t = this.getRawData().tree.root;
                e && (e === t || t.contains(e)) || (this._viewRoot = t)
            }
        });
        var SS = 2, _S = 4;

        function DS(e, t, i) {
            Ai.call(this);
            var n = new Wr({z2: SS});
            n.seriesIndex = t.seriesIndex;
            var o = new Ur({z2: _S, silent: e.getModel("label").get("silent")});

            function a() {
                o.ignore = o.hoverIgnore
            }

            function r() {
                o.ignore = o.normalIgnore
            }

            this.add(n), this.add(o), this.updateData(!0, e, "normal", t, i), this.on("emphasis", a).on("normal", r).on("mouseover", a).on("mouseout", r)
        }

        var AS = DS.prototype;
        AS.updateData = function (e, t, i, n, o) {
            (this.node = t).piece = this, n = n || this._seriesModel, o = o || this._ecModel;
            var a = this.childAt(0);
            a.dataIndex = t.dataIndex;
            var r = t.getModel(), s = t.getLayout(), l = T({}, s);
            l.label = null;
            var d = function (e, t, i) {
                var n = e.getVisual("color"), o = e.getVisual("visualMeta");
                o && 0 !== o.length || (n = null);
                var a = e.getModel("itemStyle").get("color");
                if (a) return a;
                if (n) return n;
                if (0 === e.depth) return i.option.color[0];
                var r = i.option.color.length;
                return a = i.option.color[function (e) {
                    for (var t = e; 1 < t.depth;) t = t.parentNode;
                    return b(e.getAncestors()[0].children, t)
                }(e) % r]
            }(t, 0, o);
            !function (e, t, i) {
                t.getData().setItemVisual(e.dataIndex, "color", i)
            }(t, n, d);
            var u, c = r.getModel("itemStyle").getItemStyle();
            u = w({
                lineJoin: "bevel",
                fill: (u = "normal" === i ? c : v(r.getModel(i + ".itemStyle").getItemStyle(), c)).fill || d
            }, u), e ? (a.setShape(l), a.shape.r = s.r0, al(a, {shape: {r: s.r}}, n, t.dataIndex), a.useStyle(u)) : "object" == typeof u.fill && u.fill.type || "object" == typeof a.style.fill && a.style.fill.type ? (al(a, {shape: l}, n), a.useStyle(u)) : al(a, {
                shape: l,
                style: u
            }, n), this._updateLabel(n, d, i);
            var h = r.getShallow("cursor");
            if (h && a.attr("cursor", h), e) {
                var f = n.getShallow("highlightPolicy");
                this._initEvents(a, t, n, f)
            }
            this._seriesModel = n || this._seriesModel, this._ecModel = o || this._ecModel, Hs(this)
        }, AS.onEmphasis = function (e) {
            var t = this;
            this.node.hostTree.root.eachNode(function (i) {
                i.piece && (t.node === i ? i.piece.updateData(!1, i, "emphasis") : function (e, t, i) {
                    return "none" !== i && ("self" === i ? e === t : "ancestor" === i ? e === t || e.isAncestorOf(t) : e === t || e.isDescendantOf(t))
                }(i, t.node, e) ? i.piece.childAt(0).trigger("highlight") : "none" !== e && i.piece.childAt(0).trigger("downplay"))
            })
        }, AS.onNormal = function () {
            this.node.hostTree.root.eachNode(function (e) {
                e.piece && e.piece.updateData(!1, e, "normal")
            })
        }, AS.onHighlight = function () {
            this.updateData(!1, this.node, "highlight")
        }, AS.onDownplay = function () {
            this.updateData(!1, this.node, "downplay")
        }, AS._updateLabel = function (e, t, i) {
            var n = this.node.getModel(), o = n.getModel("label"),
                a = "normal" === i || "emphasis" === i ? o : n.getModel(i + ".label"), r = n.getModel("emphasis.label"),
                s = G(e.getFormattedLabel(this.node.dataIndex, i, null, null, "label"), this.node.name);
            !1 === b("show") && (s = "");
            var l = this.node.getLayout(), d = a.get("minAngle");
            null == d && (d = o.get("minAngle")), d = d / 180 * Math.PI;
            var u = l.endAngle - l.startAngle;
            null != d && Math.abs(u) < d && (s = "");
            var c = this.childAt(1);
            Ys(c.style, c.hoverStyle || {}, o, r, {
                defaultText: a.getShallow("show") ? s : null,
                autoColor: t,
                useInsideStyle: !0
            });
            var h, f = (l.startAngle + l.endAngle) / 2, p = Math.cos(f), g = Math.sin(f), m = b("position"),
                v = b("distance") || 0, y = b("align");
            "outside" === m ? (h = l.r + v, y = f > Math.PI / 2 ? "right" : "left") : y && "center" !== y ? "left" === y ? (h = l.r0 + v, f > Math.PI / 2 && (y = "right")) : "right" === y && (h = l.r - v, f > Math.PI / 2 && (y = "left")) : (h = (l.r + l.r0) / 2, y = "center"), c.attr("style", {
                text: s,
                textAlign: y,
                textVerticalAlign: b("verticalAlign") || "middle",
                opacity: b("opacity")
            });
            var T = h * p + l.cx, w = h * g + l.cy;
            c.attr("position", [T, w]);
            var k = b("rotate"), C = 0;

            function b(e) {
                var t = a.get(e);
                return null == t ? o.get(e) : t
            }

            "radial" === k ? (C = -f) < -Math.PI / 2 && (C += Math.PI) : "tangential" === k ? (C = Math.PI / 2 - f) > Math.PI / 2 ? C -= Math.PI : C < -Math.PI / 2 && (C += Math.PI) : "number" == typeof k && (C = k * Math.PI / 180), c.attr("rotation", C)
        }, AS._initEvents = function (e, t, i, n) {
            function o() {
                r.onEmphasis(n)
            }

            function a() {
                r.onNormal()
            }

            e.off("mouseover").off("mouseout").off("emphasis").off("normal");
            var r = this;
            i.isAnimationEnabled() && e.on("mouseover", o).on("mouseout", a).on("emphasis", o).on("normal", a).on("downplay", function () {
                r.onDownplay()
            }).on("highlight", function () {
                r.onHighlight()
            })
        }, I(DS, Ai), fc.extend({
            type: "sunburst", init: function () {
            }, render: function (e, t, i, n) {
                var o = this;
                this.seriesModel = e, this.api = i, this.ecModel = t;
                var a = e.getData(), r = a.tree.root, s = e.getViewRoot(), l = this.group,
                    d = e.get("renderLabelForZeroData"), u = [];
                s.eachNode(function (e) {
                    u.push(e)
                });
                var c = this._oldChildren || [];
                if (function (i, n) {
                    function o(e) {
                        return e.getId()
                    }

                    function s(o, s) {
                        !function (i, n) {
                            if (d || !i || i.getValue() || (i = null), i !== r && n !== r) if (n && n.piece) i ? (n.piece.updateData(!1, i, "normal", e, t), a.setItemGraphicEl(i.dataIndex, n.piece)) : function (e) {
                                e && e.piece && (l.remove(e.piece), e.piece = null)
                            }(n); else if (i) {
                                var o = new DS(i, e, t);
                                l.add(o), a.setItemGraphicEl(i.dataIndex, o)
                            }
                        }(null == o ? null : i[o], null == s ? null : n[s])
                    }

                    0 === i.length && 0 === n.length || new If(n, i, o, o).add(s).update(s).remove(P(s, null)).execute()
                }(u, c), function (i, n) {
                    if (0 < n.depth) {
                        o.virtualPiece ? o.virtualPiece.updateData(!1, i, "normal", e, t) : (o.virtualPiece = new DS(i, e, t), l.add(o.virtualPiece)), n.piece._onclickEvent && n.piece.off("click", n.piece._onclickEvent);
                        var a = function (e) {
                            o._rootToNode(n.parentNode)
                        };
                        n.piece._onclickEvent = a, o.virtualPiece.on("click", a)
                    } else o.virtualPiece && (l.remove(o.virtualPiece), o.virtualPiece = null)
                }(r, s), n && n.highlight && n.highlight.piece) {
                    var h = e.getShallow("highlightPolicy");
                    n.highlight.piece.onEmphasis(h)
                } else if (n && n.unhighlight) {
                    var f = this.virtualPiece;
                    !f && r.children.length && (f = r.children[0].piece), f && f.onNormal()
                }
                this._initEvents(), this._oldChildren = u
            }, dispose: function () {
            }, _initEvents: function () {
                function e(e) {
                    var i = !1;
                    t.seriesModel.getViewRoot().eachNode(function (n) {
                        if (!i && n.piece && n.piece.childAt(0) === e.target) {
                            var o = n.getModel().get("nodeClick");
                            if ("rootToNode" === o) t._rootToNode(n); else if ("link" === o) {
                                var a = n.getModel(), r = a.get("link");
                                r && dd(r, a.get("target", !0) || "_blank")
                            }
                            i = !0
                        }
                    })
                }

                var t = this;
                this.group._onclickEvent && this.group.off("click", this.group._onclickEvent), this.group.on("click", e), this.group._onclickEvent = e
            }, _rootToNode: function (e) {
                e !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
                    type: "sunburstRootToNode",
                    from: this.uid,
                    seriesId: this.seriesModel.id,
                    targetNode: e
                })
            }, containPoint: function (e, t) {
                var i = t.getData().getItemLayout(0);
                if (i) {
                    var n = e[0] - i.cx, o = e[1] - i.cy, a = Math.sqrt(n * n + o * o);
                    return a <= i.r && a >= i.r0
                }
            }
        });
        var NS = "sunburstRootToNode";
        ff({type: NS, update: "updateView"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "sunburst", query: e}, function (t, i) {
                var n = _T(e, [NS], t);
                if (n) {
                    var o = t.getViewRoot();
                    o && (e.direction = AT(o, n.node) ? "rollUp" : "drillDown"), t.resetViewRoot(n.node)
                }
            })
        });
        var xS = "sunburstHighlight";
        ff({type: xS, update: "updateView"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "sunburst", query: e}, function (t, i) {
                var n = _T(e, [xS], t);
                n && (e.highlight = n.node)
            })
        }), ff({type: "sunburstUnhighlight", update: "updateView"}, function (e, t) {
            t.eachComponent({mainType: "series", subType: "sunburst", query: e}, function (t, i) {
                e.unhighlight = !0
            })
        });
        var ES = Math.PI / 180;

        function OS(e, t) {
            return t = t || [0, 0], A(["x", "y"], function (i, n) {
                var o = this.getAxis(i), a = t[n], r = e[n] / 2;
                return "category" === o.type ? o.getBandWidth() : Math.abs(o.dataToCoord(a - r) - o.dataToCoord(a + r))
            }, this)
        }

        function PS(e, t) {
            return t = t || [0, 0], A([0, 1], function (i) {
                var n = t[i], o = e[i] / 2, a = [], r = [];
                return a[i] = n - o, r[i] = n + o, a[1 - i] = r[1 - i] = t[1 - i], Math.abs(this.dataToPoint(a)[i] - this.dataToPoint(r)[i])
            }, this)
        }

        function MS(e, t) {
            var i = this.getAxis(), n = t instanceof Array ? t[0] : t, o = (e instanceof Array ? e[0] : e) / 2;
            return "category" === i.type ? i.getBandWidth() : Math.abs(i.dataToCoord(n - o) - i.dataToCoord(n + o))
        }

        function FS(e, t) {
            return A(["Radius", "Angle"], function (i, n) {
                var o = this["get" + i + "Axis"](), a = t[n], r = e[n] / 2, s = "dataTo" + i,
                    l = "category" === o.type ? o.getBandWidth() : Math.abs(o[s](a - r) - o[s](a + r));
                return "Angle" === i && (l = l * Math.PI / 180), l
            }, this)
        }

        mf(P(Gv, "sunburst")), gf(P(function (e, t, i, n) {
            t.eachSeriesByType(e, function (e) {
                var t = e.get("center"), n = e.get("radius");
                M(n) || (n = [0, n]), M(t) || (t = [t, t]);
                var o = i.getWidth(), a = i.getHeight(), r = Math.min(o, a), s = xl(t[0], o), l = xl(t[1], a),
                    d = xl(n[0], r / 2), u = xl(n[1], r / 2), c = -e.get("startAngle") * ES, h = e.get("minAngle") * ES,
                    f = e.getData().tree.root, p = e.getViewRoot(), g = p.depth, m = e.get("sort");
                null != m && function e(t, i) {
                    var n = t.children || [];
                    t.children = function (e, t) {
                        if ("function" == typeof t) return e.sort(t);
                        var i = "asc" === t;
                        return e.sort(function (e, t) {
                            var n = (e.getValue() - t.getValue()) * (i ? 1 : -1);
                            return 0 == n ? (e.dataIndex - t.dataIndex) * (i ? -1 : 1) : n
                        })
                    }(n, i), n.length && D(t.children, function (t) {
                        e(t, i)
                    })
                }(p, m);
                var v = 0;
                D(p.children, function (e) {
                    isNaN(e.getValue()) || v++
                });
                var y = p.getValue(), T = Math.PI / (y || v) * 2, w = 0 < p.depth, k = p.height - (w ? -1 : 1),
                    C = (u - d) / (k || 1), b = e.get("clockwise"), I = e.get("stillShowZeroSum"), S = b ? 1 : -1,
                    _ = function (e, t) {
                        if (e) {
                            var i = t;
                            if (e !== f) {
                                var n = e.getValue(), o = 0 === y && I ? T : n * T;
                                o < h && (o = h), i = t + S * o;
                                var a = e.depth - g - (w ? -1 : 1), u = d + C * a, c = d + C * (1 + a),
                                    p = e.getModel();
                                null != p.get("r0") && (u = xl(p.get("r0"), r / 2)), null != p.get("r") && (c = xl(p.get("r"), r / 2)), e.setLayout({
                                    angle: o,
                                    startAngle: t,
                                    endAngle: i,
                                    clockwise: b,
                                    cx: s,
                                    cy: l,
                                    r0: u,
                                    r: c
                                })
                            }
                            if (e.children && e.children.length) {
                                var m = 0;
                                D(e.children, function (e) {
                                    m += _(e, t + m)
                                })
                            }
                            return i - t
                        }
                    };
                if (w) {
                    var A = d, N = d + C, x = 2 * Math.PI;
                    f.setLayout({angle: x, startAngle: c, endAngle: c + x, clockwise: b, cx: s, cy: l, r0: A, r: N})
                }
                _(p, c)
            })
        }, "sunburst")), hf(P(qv, "sunburst"));
        var LS = vs, RS = ["itemStyle"], BS = ["emphasis", "itemStyle"], US = ["label"], VS = ["emphasis", "label"],
            KS = "e\0\0", GS = {
                cartesian2d: function (e) {
                    var t = e.grid.getRect();
                    return {
                        coordSys: {type: "cartesian2d", x: t.x, y: t.y, width: t.width, height: t.height},
                        api: {
                            coord: function (t) {
                                return e.dataToPoint(t)
                            }, size: O(OS, e)
                        }
                    }
                }, geo: function (e) {
                    var t = e.getBoundingRect();
                    return {
                        coordSys: {type: "geo", x: t.x, y: t.y, width: t.width, height: t.height, zoom: e.getZoom()},
                        api: {
                            coord: function (t) {
                                return e.dataToPoint(t)
                            }, size: O(PS, e)
                        }
                    }
                }, singleAxis: function (e) {
                    var t = e.getRect();
                    return {
                        coordSys: {type: "singleAxis", x: t.x, y: t.y, width: t.width, height: t.height},
                        api: {
                            coord: function (t) {
                                return e.dataToPoint(t)
                            }, size: O(MS, e)
                        }
                    }
                }, polar: function (e) {
                    var t = e.getRadiusAxis(), i = e.getAngleAxis(), n = t.getExtent();
                    return n[0] > n[1] && n.reverse(), {
                        coordSys: {type: "polar", cx: e.cx, cy: e.cy, r: n[1], r0: n[0]},
                        api: {
                            coord: O(function (n) {
                                var o = t.dataToRadius(n[0]), a = i.dataToAngle(n[1]), r = e.coordToPoint([o, a]);
                                return r.push(o, a * Math.PI / 180), r
                            }), size: O(FS, e)
                        }
                    }
                }, calendar: function (e) {
                    var t = e.getRect(), i = e.getRangeInfo();
                    return {
                        coordSys: {
                            type: "calendar",
                            x: t.x,
                            y: t.y,
                            width: t.width,
                            height: t.height,
                            cellWidth: e.getCellWidth(),
                            cellHeight: e.getCellHeight(),
                            rangeInfo: {start: i.start, end: i.end, weeks: i.weeks, dayCount: i.allDay}
                        }, api: {
                            coord: function (t, i) {
                                return e.dataToPoint(t, i)
                            }
                        }
                    }
                }
            };

        function WS(e, t, i, n, o) {
            null == i[e] || o || (t[e] = i[e], i[e] = n[e])
        }

        function jS(e, t, i, n) {
            var o = e.get("renderItem"), a = e.coordinateSystem, r = {};
            a && (r = a.prepareCustoms ? a.prepareCustoms() : GS[a.type](a));
            var s, l, d, u, c, h = w({
                getWidth: n.getWidth,
                getHeight: n.getHeight,
                getZr: n.getZr,
                getDevicePixelRatio: n.getDevicePixelRatio,
                value: function (e, i) {
                    return null == i && (i = s), t.get(t.getDimension(e || 0), i)
                },
                style: function (i, n) {
                    null == n && (n = s), g(n);
                    var o = l.getModel(RS).getItemStyle();
                    null != c && (o.fill = c);
                    var a = t.getItemVisual(n, "opacity");
                    null != a && (o.opacity = a);
                    var r = i ? YS(i, d) : d;
                    return Zs(o, r, null, {
                        autoColor: c,
                        isRectText: !0
                    }), o.text = r.getShallow("show") ? W(e.getFormattedLabel(n, "normal"), Pg(t, n)) : null, i && JS(o, i), o
                },
                styleEmphasis: function (i, n) {
                    null == n && (n = s), g(n);
                    var o = l.getModel(BS).getItemStyle(), a = i ? YS(i, u) : u;
                    return Zs(o, a, null, {isRectText: !0}, !0), o.text = a.getShallow("show") ? j(e.getFormattedLabel(n, "emphasis"), e.getFormattedLabel(n, "normal"), Pg(t, n)) : null, i && JS(o, i), o
                },
                visual: function (e, i) {
                    return null == i && (i = s), t.getItemVisual(i, e)
                },
                barLayout: function (e) {
                    if (a.getBaseAxis) return function (e) {
                        var t = [], i = e.axis;
                        if ("category" === i.type) {
                            for (var n = i.getBandWidth(), o = 0; o < e.count; o++) t.push(w({
                                bandWidth: n,
                                axisKey: "axis0",
                                stackId: wp + o
                            }, e));
                            var a = _p(t), r = [];
                            for (o = 0; o < e.count; o++) {
                                var s = a.axis0[wp + o];
                                s.offsetCenter = s.offset + s.width / 2, r.push(s)
                            }
                            return r
                        }
                    }(w({axis: a.getBaseAxis()}, e))
                },
                currentSeriesIndices: function () {
                    return i.getCurrentSeriesIndices()
                },
                font: function (e) {
                    return nl(e, i)
                }
            }, r.api || {}), f = {
                context: {},
                seriesId: e.id,
                seriesName: e.name,
                seriesIndex: e.seriesIndex,
                coordSys: r.coordSys,
                dataInsideLength: t.count(),
                encode: function (e) {
                    var t = {};
                    return D(e.dimensions, function (i, n) {
                        var o = e.getDimensionInfo(i);
                        if (!o.isExtraCoord) {
                            var a = o.coordDim;
                            (t[a] = t[a] || [])[o.coordDimIndex] = n
                        }
                    }), t
                }(e.getData())
            }, p = !0;
            return function (e, i) {
                return s = e, p = !0, o && o(w({
                    dataIndexInside: e,
                    dataIndex: t.getRawIndex(e),
                    actionType: i ? i.type : null
                }, f), h)
            };

            function g(e) {
                null == e && (e = s), p && (l = t.getItemModel(e), d = l.getModel(US), u = l.getModel(VS), c = t.getItemVisual(e, "color"), p = !1)
            }
        }

        function HS(e, t, i, n, o, a) {
            return (e = zS(e, t, i, n, o, a, !0)) && a.setItemGraphicEl(t, e), e
        }

        function zS(e, t, i, n, o, a, r) {
            var s = !i, l = (i = i || {}).type, d = i.shape, u = i.style;
            if (e && (s || null != l && l !== e.__customGraphicType || "path" === l && function (e) {
                return e && (e.hasOwnProperty("pathData") || e.hasOwnProperty("d"))
            }(d) && QS(d) !== e.__customPathData || "image" === l && $S(u, "image") && u.image !== e.__customImagePath || "text" === l && $S(d, "text") && u.text !== e.__customText) && (o.remove(e), e = null), !s) {
                var c = !e;
                return function (e, t, i, n, o, a, r) {
                    var s = {}, l = i.style || {};
                    if (i.shape && (s.shape = m(i.shape)), i.position && (s.position = i.position.slice()), i.scale && (s.scale = i.scale.slice()), i.origin && (s.origin = i.origin.slice()), i.rotation && (s.rotation = i.rotation), "image" === e.type && i.style) {
                        var d = s.style = {};
                        D(["x", "y", "width", "height"], function (t) {
                            WS(t, d, l, e.style, a)
                        })
                    }
                    if ("text" === e.type && i.style && (d = s.style = {}, D(["x", "y"], function (t) {
                        WS(t, d, l, e.style, a)
                    }), !l.hasOwnProperty("textFill") && l.fill && (l.textFill = l.fill), !l.hasOwnProperty("textStroke") && l.stroke && (l.textStroke = l.stroke)), "group" !== e.type && (e.useStyle(l), a)) {
                        e.style.opacity = 0;
                        var u = l.opacity;
                        null == u && (u = 1), rl(e, {style: {opacity: u}}, n, t)
                    }
                    a ? e.attr(s) : al(e, s, n, t), i.hasOwnProperty("z2") && e.attr("z2", i.z2 || 0), i.hasOwnProperty("silent") && e.attr("silent", i.silent), i.hasOwnProperty("invisible") && e.attr("invisible", i.invisible), i.hasOwnProperty("ignore") && e.attr("ignore", i.ignore), i.hasOwnProperty("info") && e.attr("info", i.info);
                    var c = i.styleEmphasis;
                    Us(e, c), r && zs(e, !1 !== c)
                }(e = e || function (e) {
                    var t, i = e.type;
                    if ("path" === i) {
                        var n = e.shape, o = null != n.width && null != n.height ? {
                            x: n.x || 0,
                            y: n.y || 0,
                            width: n.width,
                            height: n.height
                        } : null, a = QS(n);
                        (t = _s(a, null, o, n.layout || "center")).__customPathData = a
                    } else if ("image" === i) (t = new Yn({})).__customImagePath = e.style.image; else if ("text" === i) (t = new Ur({})).__customText = e.style.text; else if ("group" === i) t = new Ai; else {
                        if ("compoundPath" === i) throw new Error('"compoundPath" is not supported yet.');
                        t = new (Ss(i))
                    }
                    return t.__customGraphicType = i, t.name = e.name, t
                }(i), t, i, n, 0, c, r), "group" === l && function (e, t, i, n, o) {
                    var a = i.children, r = a ? a.length : 0, s = i.$mergeChildren,
                        l = "byName" === s || i.diffChildrenByName, d = !1 === s;
                    if (r || l || d) {
                        if (l) return function (e) {
                            new If(e.oldChildren, e.newChildren, XS, XS, e).add(qS).update(qS).remove(ZS).execute()
                        }({
                            oldChildren: e.children() || [],
                            newChildren: a || [],
                            dataIndex: t,
                            animatableModel: n,
                            group: e,
                            data: o
                        });
                        d && e.removeAll();
                        for (var u = 0; u < r; u++) a[u] && zS(e.childAt(u), t, a[u], n, e, o)
                    }
                }(e, t, i, n, a), o.add(e), e
            }
        }

        function XS(e, t) {
            var i = e && e.name;
            return null != i ? i : KS + t
        }

        function qS(e, t) {
            var i = this.context, n = null != e ? i.newChildren[e] : null;
            zS(null != t ? i.oldChildren[t] : null, i.dataIndex, n, i.animatableModel, i.group, i.data)
        }

        function YS(e, t) {
            var i = new bl({}, t);
            return D(LS, function (t, n) {
                e.hasOwnProperty(t) && (i.option[n] = e[t])
            }), i
        }

        function JS(e, t) {
            for (var i in t) !t.hasOwnProperty(i) && LS.hasOwnProperty(i) || (e[i] = t[i])
        }

        function ZS(e) {
            var t = this.context, i = t.oldChildren[e];
            i && t.group.remove(i)
        }

        function QS(e) {
            return e && (e.pathData || e.d)
        }

        function $S(e, t) {
            return e && e.hasOwnProperty(t)
        }

        function e_(e) {
            return e.get("stack") || "__ec_stack_" + e.seriesIndex
        }

        function t_(e, t) {
            return t.dim + e.model.componentIndex
        }

        function i_(e, t) {
            Ag.call(this, "radius", e, t), this.type = "category"
        }

        ec.extend({
            type: "series.custom",
            dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"],
            defaultOption: {
                coordinateSystem: "cartesian2d",
                zlevel: 0,
                z: 2,
                legendHoverLink: !0,
                useTransform: !0,
                clip: !1
            },
            getInitialData: function (e, t) {
                return rp(this.getSource(), this)
            },
            getDataParams: function (e, t, i) {
                var n = ec.prototype.getDataParams.apply(this, arguments);
                return i && (n.info = i.info), n
            }
        }), fc.extend({
            type: "custom", _data: null, render: function (e, t, i, n) {
                var o = this._data, a = e.getData(), r = this.group, s = jS(e, a, t, i);
                a.diff(o).add(function (t) {
                    HS(null, t, s(t, n), e, r, a)
                }).update(function (t, i) {
                    HS(o.getItemGraphicEl(i), t, s(t, n), e, r, a)
                }).remove(function (e) {
                    var t = o.getItemGraphicEl(e);
                    t && r.remove(t)
                }).execute();
                var l = e.get("clip", !0) ? cm(e.coordinateSystem, !1, e) : null;
                l ? r.setClipPath(l) : r.removeClipPath(), this._data = a
            }, incrementalPrepareRender: function (e, t, i) {
                this.group.removeAll(), this._data = null
            }, incrementalRender: function (e, t, i, n, o) {
                var a = t.getData(), r = jS(t, a, i, n);

                function s(e) {
                    e.isGroup || (e.incremental = !0, e.useHoverLayer = !0)
                }

                for (var l = e.start; l < e.end; l++) HS(null, l, r(l, o), t, this.group, a).traverse(s)
            }, dispose: te, filterForExposedEvent: function (e, t, i, n) {
                var o = t.element;
                if (null == o || i.name === o) return !0;
                for (; (i = i.parent) && i !== this.group;) if (i.name === o) return !0;
                return !1
            }
        }), i_.prototype = {
            constructor: i_, pointToData: function (e, t) {
                return this.polar.pointToData(e, t)["radius" === this.dim ? 0 : 1]
            }, dataToRadius: Ag.prototype.dataToCoord, radiusToData: Ag.prototype.coordToData
        }, I(i_, Ag);
        var n_ = Go();

        function o_(e, t) {
            t = t || [0, 360], Ag.call(this, "angle", e, t), this.type = "category"
        }

        function a_(e) {
            this.name = e || "", this.cx = 0, this.cy = 0, this._radiusAxis = new i_, this._angleAxis = new o_, this._radiusAxis.polar = this._angleAxis.polar = this
        }

        o_.prototype = {
            constructor: o_,
            pointToData: function (e, t) {
                return this.polar.pointToData(e, t)["radius" === this.dim ? 0 : 1]
            },
            dataToAngle: Ag.prototype.dataToCoord,
            angleToData: Ag.prototype.coordToData,
            calculateCategoryInterval: function () {
                var e = this.getLabelModel(), t = this.scale, i = t.getExtent(), n = t.count();
                if (i[1] - i[0] < 1) return 0;
                var o = i[0], a = this.dataToCoord(o + 1) - this.dataToCoord(o), r = Math.abs(a),
                    s = cn(o, e.getFont(), "center", "top"), l = Math.max(s.height, 7) / r;
                isNaN(l) && (l = 1 / 0);
                var d = Math.max(0, Math.floor(l)), u = n_(this.model), c = u.lastAutoInterval, h = u.lastTickCount;
                return null != c && null != h && Math.abs(c - d) <= 1 && Math.abs(h - n) <= 1 && d < c ? d = c : (u.lastTickCount = n, u.lastAutoInterval = d), d
            }
        }, I(o_, Ag), a_.prototype = {
            type: "polar",
            axisPointerEnabled: !0,
            constructor: a_,
            dimensions: ["radius", "angle"],
            model: null,
            containPoint: function (e) {
                var t = this.pointToCoord(e);
                return this._radiusAxis.contain(t[0]) && this._angleAxis.contain(t[1])
            },
            containData: function (e) {
                return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1])
            },
            getAxis: function (e) {
                return this["_" + e + "Axis"]
            },
            getAxes: function () {
                return [this._radiusAxis, this._angleAxis]
            },
            getAxesByScale: function (e) {
                var t = [], i = this._angleAxis, n = this._radiusAxis;
                return i.scale.type === e && t.push(i), n.scale.type === e && t.push(n), t
            },
            getAngleAxis: function () {
                return this._angleAxis
            },
            getRadiusAxis: function () {
                return this._radiusAxis
            },
            getOtherAxis: function (e) {
                var t = this._angleAxis;
                return e === t ? this._radiusAxis : t
            },
            getBaseAxis: function () {
                return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis()
            },
            getTooltipAxes: function (e) {
                var t = null != e && "auto" !== e ? this.getAxis(e) : this.getBaseAxis();
                return {baseAxes: [t], otherAxes: [this.getOtherAxis(t)]}
            },
            dataToPoint: function (e, t) {
                return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], t), this._angleAxis.dataToAngle(e[1], t)])
            },
            pointToData: function (e, t) {
                var i = this.pointToCoord(e);
                return [this._radiusAxis.radiusToData(i[0], t), this._angleAxis.angleToData(i[1], t)]
            },
            pointToCoord: function (e) {
                var t = e[0] - this.cx, i = e[1] - this.cy, n = this.getAngleAxis(), o = n.getExtent(),
                    a = Math.min(o[0], o[1]), r = Math.max(o[0], o[1]);
                n.inverse ? a = r - 360 : r = a + 360;
                var s = Math.sqrt(t * t + i * i);
                t /= s, i /= s;
                for (var l = Math.atan2(-i, t) / Math.PI * 180, d = l < a ? 1 : -1; l < a || r < l;) l += 360 * d;
                return [s, l]
            },
            coordToPoint: function (e) {
                var t = e[0], i = e[1] / 180 * Math.PI;
                return [Math.cos(i) * t + this.cx, -Math.sin(i) * t + this.cy]
            },
            getArea: function () {
                var e = this.getAngleAxis(), t = this.getRadiusAxis().getExtent().slice();
                t[0] > t[1] && t.reverse();
                var i = e.getExtent(), n = Math.PI / 180;
                return {
                    cx: this.cx,
                    cy: this.cy,
                    r0: t[0],
                    r: t[1],
                    startAngle: -i[0] * n,
                    endAngle: -i[1] * n,
                    clockwise: e.inverse,
                    contain: function (e, t) {
                        var i = e - this.cx, n = t - this.cy, o = i * i + n * n, a = this.r, r = this.r0;
                        return o <= a * a && r * r <= o
                    }
                }
            }
        };
        var r_ = Sd.extend({
            type: "polarAxis", axis: null, getCoordSysModel: function () {
                return this.ecModel.queryComponents({
                    mainType: "polar",
                    index: this.option.polarIndex,
                    id: this.option.polarId
                })[0]
            }
        });

        function s_(e, t) {
            return t.type || (t.data ? "category" : "value")
        }

        function l_(e, t) {
            var i = this, n = i.getAngleAxis(), o = i.getRadiusAxis();
            if (n.scale.setExtent(1 / 0, -1 / 0), o.scale.setExtent(1 / 0, -1 / 0), e.eachSeries(function (e) {
                if (e.coordinateSystem === i) {
                    var t = e.getData();
                    D(t.mapDimension("radius", !0), function (e) {
                        o.scale.unionExtentFromData(t, ap(t, e))
                    }), D(t.mapDimension("angle", !0), function (e) {
                        n.scale.unionExtentFromData(t, ap(t, e))
                    })
                }
            }), Jp(n.scale, n.model), Jp(o.scale, o.model), "category" === n.type && !n.onBand) {
                var a = n.getExtent(), r = 360 / n.scale.count();
                n.inverse ? a[1] += r : a[1] -= r, n.setExtent(a[0], a[1])
            }
        }

        function d_(e, t) {
            if (e.type = t.get("type"), e.scale = Zp(t), e.onBand = t.get("boundaryGap") && "category" === e.type, e.inverse = t.get("inverse"), "angleAxis" === t.mainType) {
                e.inverse ^= t.get("clockwise");
                var i = t.get("startAngle");
                e.setExtent(i, i + (e.inverse ? -360 : 360))
            }
            (t.axis = e).model = t
        }

        v(r_.prototype, ig), Dm("angle", r_, s_, {
            startAngle: 90,
            clockwise: !0,
            splitNumber: 12,
            axisLabel: {rotate: !1}
        }), Dm("radius", r_, s_, {splitNumber: 5}), Tf({
            type: "polar",
            dependencies: ["polarAxis", "angleAxis"],
            coordinateSystem: null,
            findAxisModel: function (e) {
                var t;
                return this.ecModel.eachComponent(e, function (e) {
                    e.getCoordSysModel() === this && (t = e)
                }, this), t
            },
            defaultOption: {zlevel: 0, z: 0, center: ["50%", "50%"], radius: "80%"}
        }), iu.register("polar", {
            dimensions: a_.prototype.dimensions, create: function (e, t) {
                var i = [];
                return e.eachComponent("polar", function (e, n) {
                    var o = new a_(n);
                    o.update = l_;
                    var a = o.getRadiusAxis(), r = o.getAngleAxis(), s = e.findAxisModel("radiusAxis"),
                        l = e.findAxisModel("angleAxis");
                    d_(a, s), d_(r, l), function (e, t, i) {
                        var n = t.get("center"), o = i.getWidth(), a = i.getHeight();
                        e.cx = xl(n[0], o), e.cy = xl(n[1], a);
                        var r = e.getRadiusAxis(), s = Math.min(o, a) / 2, l = t.get("radius");
                        null == l ? l = [0, "100%"] : M(l) || (l = [0, l]), l = [xl(l[0], s), xl(l[1], s)], r.inverse ? r.setExtent(l[1], l[0]) : r.setExtent(l[0], l[1])
                    }(o, e, t), i.push(o), (e.coordinateSystem = o).model = e
                }), e.eachSeries(function (t) {
                    if ("polar" === t.get("coordinateSystem")) {
                        var i = e.queryComponents({
                            mainType: "polar",
                            index: t.get("polarIndex"),
                            id: t.get("polarId")
                        })[0];
                        t.coordinateSystem = i.coordinateSystem
                    }
                }), i
            }
        });
        var u_ = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];

        function c_(e, t, i) {
            t[1] > t[0] && (t = t.slice().reverse());
            var n = e.coordToPoint([t[0], i]), o = e.coordToPoint([t[1], i]);
            return {x1: n[0], y1: n[1], x2: o[0], y2: o[1]}
        }

        function h_(e) {
            return e.getRadiusAxis().inverse ? 0 : 1
        }

        function f_(e) {
            var t = e[0], i = e[e.length - 1];
            t && i && Math.abs(Math.abs(t.coord - i.coord) - 360) < 1e-4 && e.pop()
        }

        iv.extend({
            type: "angleAxis", axisPointerClass: "PolarAxisPointer", render: function (e, t) {
                if (this.group.removeAll(), e.get("show")) {
                    var i = e.axis, n = i.polar, o = n.getRadiusAxis().getExtent(), a = i.getTicksCoords(),
                        r = i.getMinorTicksCoords(), s = A(i.getViewLabels(), function (e) {
                            return (e = m(e)).coord = i.dataToCoord(e.tickValue), e
                        });
                    f_(s), f_(a), D(u_, function (t) {
                        !e.get(t + ".show") || i.scale.isBlank() && "axisLine" !== t || this["_" + t](e, n, a, r, o, s)
                    }, this)
                }
            }, _axisLine: function (e, t, i, n, o) {
                var a, r = e.getModel("axisLine.lineStyle"), s = h_(t), l = s ? 0 : 1;
                (a = 0 === o[l] ? new Kr({
                    shape: {cx: t.cx, cy: t.cy, r: o[s]},
                    style: r.getLineStyle(),
                    z2: 1,
                    silent: !0
                }) : new jr({
                    shape: {cx: t.cx, cy: t.cy, r: o[s], r0: o[l]},
                    style: r.getLineStyle(),
                    z2: 1,
                    silent: !0
                })).style.fill = null, this.group.add(a)
            }, _axisTick: function (e, t, i, n, o) {
                var a = e.getModel("axisTick"), r = (a.get("inside") ? -1 : 1) * a.get("length"), s = o[h_(t)],
                    l = A(i, function (e) {
                        return new is({shape: c_(t, [s, s + r], e.coord)})
                    });
                this.group.add(Ns(l, {style: w(a.getModel("lineStyle").getLineStyle(), {stroke: e.get("axisLine.lineStyle.color")})}))
            }, _minorTick: function (e, t, i, n, o) {
                if (n.length) {
                    for (var a = e.getModel("axisTick"), r = e.getModel("minorTick"), s = (a.get("inside") ? -1 : 1) * r.get("length"), l = o[h_(t)], d = [], u = 0; u < n.length; u++) for (var c = 0; c < n[u].length; c++) d.push(new is({shape: c_(t, [l, l + s], n[u][c].coord)}));
                    this.group.add(Ns(d, {style: w(r.getModel("lineStyle").getLineStyle(), w(a.getLineStyle(), {stroke: e.get("axisLine.lineStyle.color")}))}))
                }
            }, _axisLabel: function (e, t, i, n, o, a) {
                var r = e.getCategories(!0), s = e.getModel("axisLabel"), l = s.get("margin"),
                    d = e.get("triggerEvent");
                D(a, function (i, n) {
                    var a = s, u = i.tickValue, c = o[h_(t)], h = t.coordToPoint([c + l, i.coord]), f = t.cx, p = t.cy,
                        g = Math.abs(h[0] - f) / c < .3 ? "center" : h[0] > f ? "left" : "right",
                        m = Math.abs(h[1] - p) / c < .3 ? "middle" : h[1] > p ? "top" : "bottom";
                    r && r[u] && r[u].textStyle && (a = new bl(r[u].textStyle, s, s.ecModel));
                    var v = new Ur({silent: Vm.isLabelSilent(e)});
                    this.group.add(v), Zs(v.style, a, {
                        x: h[0],
                        y: h[1],
                        textFill: a.getTextColor() || e.get("axisLine.lineStyle.color"),
                        text: i.formattedLabel,
                        textAlign: g,
                        textVerticalAlign: m
                    }), d && (v.eventData = Vm.makeAxisEventDataBase(e), v.eventData.targetType = "axisLabel", v.eventData.value = i.rawLabel)
                }, this)
            }, _splitLine: function (e, t, i, n, o) {
                var a = e.getModel("splitLine").getModel("lineStyle"), r = a.get("color"), s = 0;
                r = r instanceof Array ? r : [r];
                for (var l = [], d = 0; d < i.length; d++) {
                    var u = s++ % r.length;
                    l[u] = l[u] || [], l[u].push(new is({shape: c_(t, o, i[d].coord)}))
                }
                for (d = 0; d < l.length; d++) this.group.add(Ns(l[d], {
                    style: w({stroke: r[d % r.length]}, a.getLineStyle()),
                    silent: !0,
                    z: e.get("z")
                }))
            }, _minorSplitLine: function (e, t, i, n, o) {
                if (n.length) {
                    for (var a = e.getModel("minorSplitLine").getModel("lineStyle"), r = [], s = 0; s < n.length; s++) for (var l = 0; l < n[s].length; l++) r.push(new is({shape: c_(t, o, n[s][l].coord)}));
                    this.group.add(Ns(r, {style: a.getLineStyle(), silent: !0, z: e.get("z")}))
                }
            }, _splitArea: function (e, t, i, n, o) {
                if (i.length) {
                    var a = e.getModel("splitArea").getModel("areaStyle"), r = a.get("color"), s = 0;
                    r = r instanceof Array ? r : [r];
                    for (var l = [], d = Math.PI / 180, u = -i[0].coord * d, c = Math.min(o[0], o[1]), h = Math.max(o[0], o[1]), f = e.get("clockwise"), p = 1; p < i.length; p++) {
                        var g = s++ % r.length;
                        l[g] = l[g] || [], l[g].push(new Wr({
                            shape: {
                                cx: t.cx,
                                cy: t.cy,
                                r0: c,
                                r: h,
                                startAngle: u,
                                endAngle: -i[p].coord * d,
                                clockwise: f
                            }, silent: !0
                        })), u = -i[p].coord * d
                    }
                    for (p = 0; p < l.length; p++) this.group.add(Ns(l[p], {
                        style: w({fill: r[p % r.length]}, a.getAreaStyle()),
                        silent: !0
                    }))
                }
            }
        });
        var p_ = ["axisLine", "axisTickLabel", "axisName"], g_ = ["splitLine", "splitArea", "minorSplitLine"];
        iv.extend({
            type: "radiusAxis", axisPointerClass: "PolarAxisPointer", render: function (e, t) {
                if (this.group.removeAll(), e.get("show")) {
                    var i = e.axis, n = i.polar, o = n.getAngleAxis(), a = i.getTicksCoords(),
                        r = i.getMinorTicksCoords(), s = o.getExtent()[0], l = i.getExtent(), d = function (e, t, i) {
                            return {
                                position: [e.cx, e.cy],
                                rotation: i / 180 * Math.PI,
                                labelDirection: -1,
                                tickDirection: -1,
                                nameDirection: 1,
                                labelRotate: t.getModel("axisLabel").get("rotate"),
                                z2: 1
                            }
                        }(n, e, s), u = new Vm(e, d);
                    D(p_, u.add, u), this.group.add(u.getGroup()), D(g_, function (t) {
                        e.get(t + ".show") && !i.scale.isBlank() && this["_" + t](e, n, s, l, a, r)
                    }, this)
                }
            }, _splitLine: function (e, t, i, n, o) {
                var a = e.getModel("splitLine").getModel("lineStyle"), r = a.get("color"), s = 0;
                r = r instanceof Array ? r : [r];
                for (var l = [], d = 0; d < o.length; d++) {
                    var u = s++ % r.length;
                    l[u] = l[u] || [], l[u].push(new Kr({shape: {cx: t.cx, cy: t.cy, r: o[d].coord}}))
                }
                for (d = 0; d < l.length; d++) this.group.add(Ns(l[d], {
                    style: w({
                        stroke: r[d % r.length],
                        fill: null
                    }, a.getLineStyle()), silent: !0
                }))
            }, _minorSplitLine: function (e, t, i, n, o, a) {
                if (a.length) {
                    for (var r = e.getModel("minorSplitLine").getModel("lineStyle"), s = [], l = 0; l < a.length; l++) for (var d = 0; d < a[l].length; d++) s.push(new Kr({
                        shape: {
                            cx: t.cx,
                            cy: t.cy,
                            r: a[l][d].coord
                        }
                    }));
                    this.group.add(Ns(s, {style: w({fill: null}, r.getLineStyle()), silent: !0}))
                }
            }, _splitArea: function (e, t, i, n, o) {
                if (o.length) {
                    var a = e.getModel("splitArea").getModel("areaStyle"), r = a.get("color"), s = 0;
                    r = r instanceof Array ? r : [r];
                    for (var l = [], d = o[0].coord, u = 1; u < o.length; u++) {
                        var c = s++ % r.length;
                        l[c] = l[c] || [], l[c].push(new Wr({
                            shape: {
                                cx: t.cx,
                                cy: t.cy,
                                r0: d,
                                r: o[u].coord,
                                startAngle: 0,
                                endAngle: 2 * Math.PI
                            }, silent: !0
                        })), d = o[u].coord
                    }
                    for (u = 0; u < l.length; u++) this.group.add(Ns(l[u], {
                        style: w({fill: r[u % r.length]}, a.getAreaStyle()),
                        silent: !0
                    }))
                }
            }
        });
        var m_ = eS.extend({
            makeElOption: function (e, t, i, n, o) {
                var a = i.axis;
                "angle" === a.dim && (this.animationThreshold = Math.PI / 18);
                var r, s = a.polar, l = s.getOtherAxis(a).getExtent();
                r = a["dataTo" + sd(a.dim)](t);
                var d = n.get("type");
                if (d && "none" !== d) {
                    var u = aS(n), c = v_[d](a, s, r, l, u);
                    c.style = u, e.graphicKey = c.type, e.pointer = c
                }
                var h = n.get("label.margin");
                rS(e, i, n, o, function (e, t, i, n, o) {
                    var a = t.axis, r = a.dataToCoord(e), s = n.getAngleAxis().getExtent()[0];
                    s = s / 180 * Math.PI;
                    var l, d, u, c = n.getRadiusAxis().getExtent();
                    if ("radius" === a.dim) {
                        var h = at();
                        ut(h, h, s), dt(h, h, [n.cx, n.cy]), l = ll([r, -o], h);
                        var f = t.getModel("axisLabel").get("rotate") || 0,
                            p = Vm.innerTextLayout(s, f * Math.PI / 180, -1);
                        d = p.textAlign, u = p.textVerticalAlign
                    } else {
                        var g = c[1];
                        l = n.coordToPoint([g + o, r]);
                        var m = n.cx, v = n.cy;
                        d = Math.abs(l[0] - m) / g < .3 ? "center" : l[0] > m ? "left" : "right", u = Math.abs(l[1] - v) / g < .3 ? "middle" : l[1] > v ? "top" : "bottom"
                    }
                    return {position: l, align: d, verticalAlign: u}
                }(t, i, 0, s, h))
            }
        }), v_ = {
            line: function (e, t, i, n, o) {
                return "angle" === e.dim ? {
                    type: "Line",
                    shape: uS(t.coordToPoint([n[0], i]), t.coordToPoint([n[1], i]))
                } : {type: "Circle", shape: {cx: t.cx, cy: t.cy, r: i}}
            }, shadow: function (e, t, i, n, o) {
                var a = Math.max(1, e.getBandWidth()), r = Math.PI / 180;
                return "angle" === e.dim ? {
                    type: "Sector",
                    shape: hS(t.cx, t.cy, n[0], n[1], (-i - a / 2) * r, (a / 2 - i) * r)
                } : {type: "Sector", shape: hS(t.cx, t.cy, i - a / 2, i + a / 2, 0, 2 * Math.PI)}
            }
        };

        function y_(e, t) {
            t.update = "updateView", ff(t, function (t, i) {
                var n = {};
                return i.eachComponent({mainType: "geo", query: t}, function (i) {
                    i[e](t.name), D(i.coordinateSystem.regions, function (e) {
                        n[e.name] = i.isSelected(e.name) || !1
                    })
                }), {selected: n, name: t.name}
            })
        }

        function T_(e, t, i) {
            this._model = e
        }

        function w_(e, t, i, n) {
            var o = i.calendarModel, a = i.seriesModel, r = o ? o.coordinateSystem : a ? a.coordinateSystem : null;
            return r === this ? r[e](n) : null
        }

        iv.registerAxisPointerClass("PolarAxisPointer", m_), gf(P(function (e, t, i) {
            var n = {}, o = function (e) {
                var t = {};
                D(e, function (e, i) {
                    var n = e.getData(), o = e.coordinateSystem, a = o.getBaseAxis(), r = t_(o, a), s = a.getExtent(),
                        l = "category" === a.type ? a.getBandWidth() : Math.abs(s[1] - s[0]) / n.count(), d = t[r] || {
                            bandWidth: l,
                            remainedWidth: l,
                            autoWidthCount: 0,
                            categoryGap: "20%",
                            gap: "30%",
                            stacks: {}
                        }, u = d.stacks;
                    t[r] = d;
                    var c = e_(e);
                    u[c] || d.autoWidthCount++, u[c] = u[c] || {width: 0, maxWidth: 0};
                    var h = xl(e.get("barWidth"), l), f = xl(e.get("barMaxWidth"), l), p = e.get("barGap"),
                        g = e.get("barCategoryGap");
                    h && !u[c].width && (h = Math.min(d.remainedWidth, h), u[c].width = h, d.remainedWidth -= h), f && (u[c].maxWidth = f), null != p && (d.gap = p), null != g && (d.categoryGap = g)
                });
                var i = {};
                return D(t, function (e, t) {
                    i[t] = {};
                    var n = e.stacks, o = e.bandWidth, a = xl(e.categoryGap, o), r = xl(e.gap, 1), s = e.remainedWidth,
                        l = e.autoWidthCount, d = (s - a) / (l + (l - 1) * r);
                    d = Math.max(d, 0), D(n, function (e, t) {
                        var i = e.maxWidth;
                        i && i < d && (i = Math.min(i, s), e.width && (i = Math.min(i, e.width)), s -= i, e.width = i, l--)
                    }), d = (s - a) / (l + (l - 1) * r), d = Math.max(d, 0);
                    var u, c = 0;
                    D(n, function (e, t) {
                        e.width || (e.width = d), c += (u = e).width * (1 + r)
                    }), u && (c -= u.width * r);
                    var h = -c / 2;
                    D(n, function (e, n) {
                        i[t][n] = i[t][n] || {offset: h, width: e.width}, h += e.width * (1 + r)
                    })
                }), i
            }(x(t.getSeriesByType(e), function (e) {
                return !t.isSeriesFiltered(e) && e.coordinateSystem && "polar" === e.coordinateSystem.type
            }));
            t.eachSeriesByType(e, function (e) {
                if ("polar" === e.coordinateSystem.type) {
                    var t = e.getData(), i = e.coordinateSystem, a = i.getBaseAxis(), r = t_(i, a), s = e_(e),
                        l = o[r][s], d = l.offset, u = l.width, c = i.getOtherAxis(a), h = e.coordinateSystem.cx,
                        f = e.coordinateSystem.cy, p = e.get("barMinHeight") || 0, g = e.get("barMinAngle") || 0;
                    n[s] = n[s] || [];
                    for (var m = t.mapDimension(c.dim), v = t.mapDimension(a.dim), y = op(t, m), T = "radius" !== a.dim || !e.get("roundCap", !0), w = c.getExtent()[0], k = 0, C = t.count(); k < C; k++) {
                        var b, I, S, _, D = t.get(m, k), A = t.get(v, k), N = 0 <= D ? "p" : "n", x = w;
                        if (y && (n[s][A] || (n[s][A] = {p: w, n: w}), x = n[s][A][N]), "radius" === c.dim) {
                            var E = c.dataToRadius(D) - w, O = a.dataToAngle(A);
                            Math.abs(E) < p && (E = (E < 0 ? -1 : 1) * p), I = (b = x) + E, _ = (S = O - d) - u, y && (n[s][A][N] = I)
                        } else {
                            var P = c.dataToAngle(D, T) - w, M = a.dataToRadius(A);
                            Math.abs(P) < g && (P = (P < 0 ? -1 : 1) * g), I = (b = M + d) + u, _ = (S = x) + P, y && (n[s][A][N] = _)
                        }
                        t.setItemLayout(k, {
                            cx: h,
                            cy: f,
                            r0: b,
                            r: I,
                            startAngle: -S * Math.PI / 180,
                            endAngle: -_ * Math.PI / 180
                        })
                    }
                }
            }, this)
        }, "bar")), wf({type: "polar"}), S(Sd.extend({
            type: "geo",
            coordinateSystem: null,
            layoutMode: "box",
            init: function (e) {
                Sd.prototype.init.apply(this, arguments), Mo(e, "label", ["show"])
            },
            optionUpdated: function () {
                var e = this.option, t = this;
                e.regions = Qy.getFilledRegions(e.regions, e.map, e.nameMap), this._optionModelMap = N(e.regions || [], function (e, i) {
                    return i.name && e.set(i.name, new bl(i, t)), e
                }, $()), this.updateSelectedMap(e.regions)
            },
            defaultOption: {
                zlevel: 0,
                z: 0,
                show: !0,
                left: "center",
                top: "center",
                aspectScale: null,
                silent: !1,
                map: "",
                boundingCoords: null,
                center: null,
                zoom: 1,
                scaleLimit: null,
                label: {show: !1, color: "#000"},
                itemStyle: {borderWidth: .5, borderColor: "#444", color: "#eee"},
                emphasis: {label: {show: !0, color: "rgb(100,0,0)"}, itemStyle: {color: "rgba(255,215,0,0.8)"}},
                regions: []
            },
            getRegionModel: function (e) {
                return this._optionModelMap.get(e) || new bl(null, this, this.ecModel)
            },
            getFormattedLabel: function (e, t) {
                var i = this.getRegionModel(e).get("label" + ("normal" === t ? "." : t + ".") + "formatter"),
                    n = {name: e};
                return "function" == typeof i ? (n.status = t, i(n)) : "string" == typeof i ? i.replace("{a}", null != e ? e : "") : void 0
            },
            setZoom: function (e) {
                this.option.zoom = e
            },
            setCenter: function (e) {
                this.option.center = e
            }
        }), Mv), wf({
            type: "geo", init: function (e, t) {
                var i = new By(t, !0);
                this._mapDraw = i, this.group.add(i.group)
            }, render: function (e, t, i, n) {
                if (!n || "geoToggleSelect" !== n.type || n.from !== this.uid) {
                    var o = this._mapDraw;
                    e.get("show") ? o.draw(e, t, i, this, n) : this._mapDraw.group.removeAll(), this.group.silent = e.get("silent")
                }
            }, dispose: function () {
                this._mapDraw && this._mapDraw.remove()
            }
        }), y_("toggleSelected", {type: "geoToggleSelect", event: "geoselectchanged"}), y_("select", {
            type: "geoSelect",
            event: "geoselected"
        }), y_("unSelect", {type: "geoUnSelect", event: "geounselected"}), T_.prototype = {
            constructor: T_,
            type: "calendar",
            dimensions: ["time", "value"],
            getDimensionsInfo: function () {
                return [{name: "time", type: "time"}, "value"]
            },
            getRangeInfo: function () {
                return this._rangeInfo
            },
            getModel: function () {
                return this._model
            },
            getRect: function () {
                return this._rect
            },
            getCellWidth: function () {
                return this._sw
            },
            getCellHeight: function () {
                return this._sh
            },
            getOrient: function () {
                return this._orient
            },
            getFirstDayOfWeek: function () {
                return this._firstDayOfWeek
            },
            getDateInfo: function (e) {
                var t = (e = Kl(e)).getFullYear(), i = e.getMonth() + 1;
                i = i < 10 ? "0" + i : i;
                var n = e.getDate();
                n = n < 10 ? "0" + n : n;
                var o = e.getDay();
                return {
                    y: t,
                    m: i,
                    d: n,
                    day: o = Math.abs((o + 7 - this.getFirstDayOfWeek()) % 7),
                    time: e.getTime(),
                    formatedDate: t + "-" + i + "-" + n,
                    date: e
                }
            },
            getNextNDay: function (e, t) {
                return 0 === (t = t || 0) || (e = new Date(this.getDateInfo(e).time)).setDate(e.getDate() + t), this.getDateInfo(e)
            },
            update: function (e, t) {
                this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption());
                var i = this._rangeInfo.weeks || 1, n = ["width", "height"], o = this._model.get("cellSize").slice(),
                    a = this._model.getBoxLayoutParams(), r = "horizontal" === this._orient ? [i, 7] : [7, i];
                D([0, 1], function (e) {
                    d(o, e) && (a[n[e]] = o[e] * r[e])
                });
                var s = {width: t.getWidth(), height: t.getHeight()}, l = this._rect = md(a, s);

                function d(e, t) {
                    return null != e[t] && "auto" !== e[t]
                }

                D([0, 1], function (e) {
                    d(o, e) || (o[e] = l[n[e]] / r[e])
                }), this._sw = o[0], this._sh = o[1]
            },
            dataToPoint: function (e, t) {
                M(e) && (e = e[0]), null == t && (t = !0);
                var i = this.getDateInfo(e), n = this._rangeInfo, o = i.formatedDate;
                if (t && !(i.time >= n.start.time && i.time < n.end.time + 864e5)) return [NaN, NaN];
                var a = i.day, r = this._getRangeInfo([n.start.time, o]).nthWeek;
                return "vertical" === this._orient ? [this._rect.x + a * this._sw + this._sw / 2, this._rect.y + r * this._sh + this._sh / 2] : [this._rect.x + r * this._sw + this._sw / 2, this._rect.y + a * this._sh + this._sh / 2]
            },
            pointToData: function (e) {
                var t = this.pointToDate(e);
                return t && t.time
            },
            dataToRect: function (e, t) {
                var i = this.dataToPoint(e, t);
                return {
                    contentShape: {
                        x: i[0] - (this._sw - this._lineWidth) / 2,
                        y: i[1] - (this._sh - this._lineWidth) / 2,
                        width: this._sw - this._lineWidth,
                        height: this._sh - this._lineWidth
                    },
                    center: i,
                    tl: [i[0] - this._sw / 2, i[1] - this._sh / 2],
                    tr: [i[0] + this._sw / 2, i[1] - this._sh / 2],
                    br: [i[0] + this._sw / 2, i[1] + this._sh / 2],
                    bl: [i[0] - this._sw / 2, i[1] + this._sh / 2]
                }
            },
            pointToDate: function (e) {
                var t = Math.floor((e[0] - this._rect.x) / this._sw) + 1,
                    i = Math.floor((e[1] - this._rect.y) / this._sh) + 1, n = this._rangeInfo.range;
                return "vertical" === this._orient ? this._getDateByWeeksAndDay(i, t - 1, n) : this._getDateByWeeksAndDay(t, i - 1, n)
            },
            convertToPixel: P(w_, "dataToPoint"),
            convertFromPixel: P(w_, "pointToData"),
            _initRangeOption: function () {
                var e = this._model.get("range"), t = e;
                if (M(t) && 1 === t.length && (t = t[0]), /^\d{4}$/.test(t) && (e = [t + "-01-01", t + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(t)) {
                    var i = this.getDateInfo(t), n = i.date;
                    n.setMonth(n.getMonth() + 1);
                    var o = this.getNextNDay(n, -1);
                    e = [i.formatedDate, o.formatedDate]
                }
                /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t) && (e = [t, t]);
                var a = this._getRangeInfo(e);
                return a.start.time > a.end.time && e.reverse(), e
            },
            _getRangeInfo: function (e) {
                var t;
                (e = [this.getDateInfo(e[0]), this.getDateInfo(e[1])])[0].time > e[1].time && (t = !0, e.reverse());
                var i = Math.floor(e[1].time / 864e5) - Math.floor(e[0].time / 864e5) + 1, n = new Date(e[0].time),
                    o = n.getDate(), a = e[1].date.getDate();
                n.setDate(o + i - 1);
                var r = n.getDate();
                if (r !== a) for (var s = 0 < n.getTime() - e[1].time ? 1 : -1; (r = n.getDate()) !== a && 0 < (n.getTime() - e[1].time) * s;) i -= s, n.setDate(r - s);
                var l = Math.floor((i + e[0].day + 6) / 7), d = t ? 1 - l : l - 1;
                return t && e.reverse(), {
                    range: [e[0].formatedDate, e[1].formatedDate],
                    start: e[0],
                    end: e[1],
                    allDay: i,
                    weeks: l,
                    nthWeek: d,
                    fweek: e[0].day,
                    lweek: e[1].day
                }
            },
            _getDateByWeeksAndDay: function (e, t, i) {
                var n = this._getRangeInfo(i);
                if (e > n.weeks || 0 === e && t < n.fweek || e === n.weeks && t > n.lweek) return !1;
                var o = 7 * (e - 1) - n.fweek + t, a = new Date(n.start.time);
                return a.setDate(n.start.d + o), this.getDateInfo(a)
            }
        }, T_.dimensions = T_.prototype.dimensions, T_.getDimensionsInfo = T_.prototype.getDimensionsInfo, T_.create = function (e, t) {
            var i = [];
            return e.eachComponent("calendar", function (n) {
                var o = new T_(n, e, t);
                i.push(o), n.coordinateSystem = o
            }), e.eachSeries(function (e) {
                "calendar" === e.get("coordinateSystem") && (e.coordinateSystem = i[e.get("calendarIndex") || 0])
            }), i
        }, iu.register("calendar", T_);
        var k_ = Sd.extend({
            type: "calendar",
            coordinateSystem: null,
            defaultOption: {
                zlevel: 0,
                z: 2,
                left: 80,
                top: 60,
                cellSize: 20,
                orient: "horizontal",
                splitLine: {show: !0, lineStyle: {color: "#000", width: 1, type: "solid"}},
                itemStyle: {color: "#fff", borderWidth: 1, borderColor: "#ccc"},
                dayLabel: {show: !0, firstDay: 0, position: "start", margin: "50%", nameMap: "en", color: "#000"},
                monthLabel: {
                    show: !0,
                    position: "start",
                    margin: 5,
                    align: "center",
                    nameMap: "en",
                    formatter: null,
                    color: "#000"
                },
                yearLabel: {
                    show: !0,
                    position: null,
                    margin: 30,
                    formatter: null,
                    color: "#ccc",
                    fontFamily: "sans-serif",
                    fontWeight: "bolder",
                    fontSize: 20
                }
            },
            init: function (e, t, i, n) {
                var o = Td(e);
                k_.superApply(this, "init", arguments), C_(e, o)
            },
            mergeOption: function (e, t) {
                k_.superApply(this, "mergeOption", arguments), C_(this.option, e)
            }
        });

        function C_(e, t) {
            var i = e.cellSize;
            M(i) ? 1 === i.length && (i[1] = i[0]) : i = e.cellSize = [i, i];
            var n = A([0, 1], function (e) {
                return function (e, t) {
                    return null != e[fd[t][0]] || null != e[fd[t][1]] && null != e[fd[t][2]]
                }(t, e) && (i[e] = "auto"), null != i[e] && "auto" !== i[e]
            });
            yd(e, t, {type: "box", ignoreSize: n})
        }

        var b_ = {
            EN: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
            CN: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]
        }, I_ = {EN: ["S", "M", "T", "W", "T", "F", "S"], CN: ["日", "一", "二", "三", "四", "五", "六"]};
        wf({
            type: "calendar",
            _tlpoints: null,
            _blpoints: null,
            _firstDayOfMonth: null,
            _firstDayPoints: null,
            render: function (e, t, i) {
                var n = this.group;
                n.removeAll();
                var o = e.coordinateSystem, a = o.getRangeInfo(), r = o.getOrient();
                this._renderDayRect(e, a, n), this._renderLines(e, a, r, n), this._renderYearText(e, a, r, n), this._renderMonthText(e, r, n), this._renderWeekText(e, a, r, n)
            },
            _renderDayRect: function (e, t, i) {
                for (var n = e.coordinateSystem, o = e.getModel("itemStyle").getItemStyle(), a = n.getCellWidth(), r = n.getCellHeight(), s = t.start.time; s <= t.end.time; s = n.getNextNDay(s, 1).time) {
                    var l = n.dataToRect([s], !1).tl,
                        d = new es({shape: {x: l[0], y: l[1], width: a, height: r}, cursor: "default", style: o});
                    i.add(d)
                }
            },
            _renderLines: function (e, t, i, n) {
                var o = this, a = e.coordinateSystem, r = e.getModel("splitLine.lineStyle").getLineStyle(),
                    s = e.get("splitLine.show"), l = r.lineWidth;
                this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
                for (var d = t.start, u = 0; d.time <= t.end.time; u++) {
                    h(d.formatedDate), 0 === u && (d = a.getDateInfo(t.start.y + "-" + t.start.m));
                    var c = d.date;
                    c.setMonth(c.getMonth() + 1), d = a.getDateInfo(c)
                }

                function h(t) {
                    o._firstDayOfMonth.push(a.getDateInfo(t)), o._firstDayPoints.push(a.dataToRect([t], !1).tl);
                    var l = o._getLinePointsOfOneWeek(e, t, i);
                    o._tlpoints.push(l[0]), o._blpoints.push(l[l.length - 1]), s && o._drawSplitline(l, r, n)
                }

                h(a.getNextNDay(t.end.time, 1).formatedDate), s && this._drawSplitline(o._getEdgesPoints(o._tlpoints, l, i), r, n), s && this._drawSplitline(o._getEdgesPoints(o._blpoints, l, i), r, n)
            },
            _getEdgesPoints: function (e, t, i) {
                var n = [e[0].slice(), e[e.length - 1].slice()], o = "horizontal" === i ? 0 : 1;
                return n[0][o] = n[0][o] - t / 2, n[1][o] = n[1][o] + t / 2, n
            },
            _drawSplitline: function (e, t, i) {
                var n = new qr({z2: 20, shape: {points: e}, style: t});
                i.add(n)
            },
            _getLinePointsOfOneWeek: function (e, t, i) {
                var n = e.coordinateSystem;
                t = n.getDateInfo(t);
                for (var o = [], a = 0; a < 7; a++) {
                    var r = n.getNextNDay(t.time, a), s = n.dataToRect([r.time], !1);
                    o[2 * r.day] = s.tl, o[2 * r.day + 1] = s["horizontal" === i ? "bl" : "tr"]
                }
                return o
            },
            _formatterLabel: function (e, t) {
                return "string" == typeof e && e ? nd(e, t) : "function" == typeof e ? e(t) : t.nameMap
            },
            _yearTextPositionControl: function (e, t, i, n, o) {
                t = t.slice();
                var a = ["center", "bottom"];
                "bottom" === n ? (t[1] += o, a = ["center", "top"]) : "left" === n ? t[0] -= o : "right" === n ? (t[0] += o, a = ["center", "top"]) : t[1] -= o;
                var r = 0;
                return "left" !== n && "right" !== n || (r = Math.PI / 2), {
                    rotation: r,
                    position: t,
                    style: {textAlign: a[0], textVerticalAlign: a[1]}
                }
            },
            _renderYearText: function (e, t, i, n) {
                var o = e.getModel("yearLabel");
                if (o.get("show")) {
                    var a = o.get("margin"), r = o.get("position");
                    r = r || ("horizontal" !== i ? "top" : "left");
                    var s = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], l = (s[0][0] + s[1][0]) / 2,
                        d = (s[0][1] + s[1][1]) / 2, u = "horizontal" === i ? 0 : 1,
                        c = {top: [l, s[u][1]], bottom: [l, s[1 - u][1]], left: [s[1 - u][0], d], right: [s[u][0], d]},
                        h = t.start.y;
                    +t.end.y > +t.start.y && (h = h + "-" + t.end.y);
                    var f = o.get("formatter"), p = {start: t.start.y, end: t.end.y, nameMap: h},
                        g = this._formatterLabel(f, p), m = new Ur({z2: 30});
                    Zs(m.style, o, {text: g}), m.attr(this._yearTextPositionControl(m, c[r], i, r, a)), n.add(m)
                }
            },
            _monthTextPositionControl: function (e, t, i, n, o) {
                var a = "left", r = "top", s = e[0], l = e[1];
                return "horizontal" === i ? (l += o, t && (a = "center"), "start" === n && (r = "bottom")) : (s += o, t && (r = "middle"), "start" === n && (a = "right")), {
                    x: s,
                    y: l,
                    textAlign: a,
                    textVerticalAlign: r
                }
            },
            _renderMonthText: function (e, t, i) {
                var n = e.getModel("monthLabel");
                if (n.get("show")) {
                    var o = n.get("nameMap"), a = n.get("margin"), r = n.get("position"), s = n.get("align"),
                        l = [this._tlpoints, this._blpoints];
                    L(o) && (o = b_[o.toUpperCase()] || []);
                    var d = "start" === r ? 0 : 1, u = "horizontal" === t ? 0 : 1;
                    a = "start" === r ? -a : a;
                    for (var c = "center" === s, h = 0; h < l[d].length - 1; h++) {
                        var f = l[d][h].slice(), p = this._firstDayOfMonth[h];
                        if (c) {
                            var g = this._firstDayPoints[h];
                            f[u] = (g[u] + l[0][h + 1][u]) / 2
                        }
                        var m = n.get("formatter"), v = o[+p.m - 1],
                            y = {yyyy: p.y, yy: (p.y + "").slice(2), MM: p.m, M: +p.m, nameMap: v},
                            w = this._formatterLabel(m, y), k = new Ur({z2: 30});
                        T(Zs(k.style, n, {text: w}), this._monthTextPositionControl(f, c, t, r, a)), i.add(k)
                    }
                }
            },
            _weekTextPositionControl: function (e, t, i, n, o) {
                var a = "center", r = "middle", s = e[0], l = e[1], d = "start" === i;
                return "horizontal" === t ? (s = s + n + (d ? 1 : -1) * o[0] / 2, a = d ? "right" : "left") : (l = l + n + (d ? 1 : -1) * o[1] / 2, r = d ? "bottom" : "top"), {
                    x: s,
                    y: l,
                    textAlign: a,
                    textVerticalAlign: r
                }
            },
            _renderWeekText: function (e, t, i, n) {
                var o = e.getModel("dayLabel");
                if (o.get("show")) {
                    var a = e.coordinateSystem, r = o.get("position"), s = o.get("nameMap"), l = o.get("margin"),
                        d = a.getFirstDayOfWeek();
                    L(s) && (s = I_[s.toUpperCase()] || []);
                    var u = a.getNextNDay(t.end.time, 7 - t.lweek).time, c = [a.getCellWidth(), a.getCellHeight()];
                    l = xl(l, c["horizontal" === i ? 0 : 1]), "start" === r && (u = a.getNextNDay(t.start.time, -(7 + t.fweek)).time, l = -l);
                    for (var h = 0; h < 7; h++) {
                        var f, p = a.getNextNDay(u, h), g = a.dataToRect([p.time], !1).center;
                        f = Math.abs((h + d) % 7);
                        var m = new Ur({z2: 30});
                        T(Zs(m.style, o, {text: s[f]}), this._weekTextPositionControl(g, i, r, l, c)), n.add(m)
                    }
                }
            }
        });
        var S_ = {path: null, compoundPath: null, group: Ai, image: Yn, text: Ur};
        cf(function (e) {
            var t = e.graphic;
            M(t) ? t[0] && t[0].elements ? e.graphic = [e.graphic[0]] : e.graphic = [{elements: t}] : t && !t.elements && (e.graphic = [{elements: [t]}])
        });
        var __ = Tf({
            type: "graphic",
            defaultOption: {elements: [], parentId: null},
            _elOptionsToUpdate: null,
            mergeOption: function (e) {
                var t = this.option.elements;
                this.option.elements = null, __.superApply(this, "mergeOption", arguments), this.option.elements = t
            },
            optionUpdated: function (e, t) {
                var i = this.option, n = (t ? i : e).elements, o = i.elements = t ? [] : i.elements, a = [];
                this._flatten(n, a);
                var r = Ro(o, a);
                Bo(r);
                var s = this._elOptionsToUpdate = [];
                D(r, function (e, t) {
                    var i = e.option;
                    i && (s.push(i), function (e, t) {
                        var i = e.exist;
                        if (t.id = e.keyInfo.id, !t.type && i && (t.type = i.type), null == t.parentId) {
                            var n = t.parentOption;
                            n ? t.parentId = n.id : i && (t.parentId = i.parentId)
                        }
                        t.parentOption = null
                    }(e, i), function (e, t, i) {
                        var n = T({}, i), o = e[t], a = i.$action || "merge";
                        "merge" === a ? o ? (v(o, n, !0), yd(o, n, {ignoreSize: !0}), wd(i, o)) : e[t] = n : "replace" === a ? e[t] = n : "remove" === a && o && (e[t] = null)
                    }(o, t, i), function (e, t) {
                        e && (e.hv = t.hv = [N_(t, ["left", "right"]), N_(t, ["top", "bottom"])], "group" === e.type && (null == e.width && (e.width = t.width = 0), null == e.height && (e.height = t.height = 0)))
                    }(o[t], i))
                }, this);
                for (var l = o.length - 1; 0 <= l; l--) null == o[l] ? o.splice(l, 1) : delete o[l].$action
            },
            _flatten: function (e, t, i) {
                D(e, function (e) {
                    if (e) {
                        i && (e.parentOption = i), t.push(e);
                        var n = e.children;
                        "group" === e.type && n && this._flatten(n, t, e), delete e.children
                    }
                }, this)
            },
            useElOptionsToUpdate: function () {
                var e = this._elOptionsToUpdate;
                return this._elOptionsToUpdate = null, e
            }
        });

        function D_(e, t, i, n) {
            var o = i.type, a = new (S_.hasOwnProperty(o) ? S_[o] : Ss(o))(i);
            t.add(a), n.set(e, a), a.__ecGraphicId = e
        }

        function A_(e, t) {
            var i = e && e.parent;
            i && ("group" === e.type && e.traverse(function (e) {
                A_(e, t)
            }), t.removeKey(e.__ecGraphicId), i.remove(e))
        }

        function N_(e, t) {
            var i;
            return D(t, function (t) {
                null != e[t] && "auto" !== e[t] && (i = !0)
            }), i
        }

        wf({
            type: "graphic", init: function (e, t) {
                this._elMap = $(), this._lastGraphicModel
            }, render: function (e, t, i) {
                e !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = e, this._updateElements(e), this._relocate(e, i)
            }, _updateElements: function (e) {
                var t = e.useElOptionsToUpdate();
                if (t) {
                    var i = this._elMap, n = this.group;
                    D(t, function (t) {
                        var o = t.$action, a = t.id, r = i.get(a), s = t.parentId, l = null != s ? i.get(s) : n,
                            d = t.style;
                        "text" === t.type && d && (t.hv && t.hv[1] && (d.textVerticalAlign = d.textBaseline = null), !d.hasOwnProperty("textFill") && d.fill && (d.textFill = d.fill), !d.hasOwnProperty("textStroke") && d.stroke && (d.textStroke = d.stroke));
                        var u = function (e) {
                            return e = T({}, e), D(["id", "parentId", "$action", "hv", "bounding"].concat(hd), function (t) {
                                delete e[t]
                            }), e
                        }(t);
                        o && "merge" !== o ? "replace" === o ? (A_(r, i), D_(a, l, u, i)) : "remove" === o && A_(r, i) : r ? r.attr(u) : D_(a, l, u, i);
                        var c = i.get(a);
                        c && (c.__ecGraphicWidthOption = t.width, c.__ecGraphicHeightOption = t.height, function (e, t) {
                            var i = e.eventData;
                            e.silent || e.ignore || i || (i = e.eventData = {
                                componentType: "graphic",
                                componentIndex: t.componentIndex,
                                name: e.name
                            }), i && (i.info = e.info)
                        }(c, e))
                    })
                }
            }, _relocate: function (e, t) {
                for (var i = e.option.elements, n = this.group, o = this._elMap, a = t.getWidth(), r = t.getHeight(), s = 0; s < i.length; s++) {
                    var l = i[s];
                    if ((u = o.get(l.id)) && u.isGroup) {
                        var d = (c = u.parent) === n;
                        u.__ecGraphicWidth = xl(u.__ecGraphicWidthOption, d ? a : c.__ecGraphicWidth) || 0, u.__ecGraphicHeight = xl(u.__ecGraphicHeightOption, d ? r : c.__ecGraphicHeight) || 0
                    }
                }
                for (s = i.length - 1; 0 <= s; s--) {
                    var u, c;
                    l = i[s], (u = o.get(l.id)) && vd(u, l, (c = u.parent) === n ? {
                        width: a,
                        height: r
                    } : {width: c.__ecGraphicWidth, height: c.__ecGraphicHeight}, null, {
                        hv: l.hv,
                        boundingMode: l.bounding
                    })
                }
            }, _clear: function () {
                var e = this._elMap;
                e.each(function (t) {
                    A_(t, e)
                }), this._elMap = $()
            }, dispose: function () {
                this._clear()
            }
        });
        var x_ = {};

        function E_(e, t) {
            x_[e] = t
        }

        function O_(e) {
            return x_[e]
        }

        var P_ = Tf({
            type: "toolbox",
            layoutMode: {type: "box", ignoreSize: !0},
            optionUpdated: function () {
                P_.superApply(this, "optionUpdated", arguments), D(this.option.feature, function (e, t) {
                    var i = O_(t);
                    i && v(e, i.defaultOption)
                })
            },
            defaultOption: {
                show: !0,
                z: 6,
                zlevel: 0,
                orient: "horizontal",
                left: "right",
                top: "top",
                backgroundColor: "transparent",
                borderColor: "#ccc",
                borderRadius: 0,
                borderWidth: 0,
                padding: 5,
                itemSize: 15,
                itemGap: 8,
                showTitle: !0,
                iconStyle: {borderColor: "#666", color: "none"},
                emphasis: {iconStyle: {borderColor: "#3E98C5"}},
                tooltip: {show: !1}
            }
        });

        function M_(e, t) {
            var i = Jl(t.get("padding")), n = t.getItemStyle(["color", "opacity"]);
            return n.fill = t.get("backgroundColor"), e = new es({
                shape: {
                    x: e.x - i[3],
                    y: e.y - i[0],
                    width: e.width + i[1] + i[3],
                    height: e.height + i[0] + i[2],
                    r: t.get("borderRadius")
                }, style: n, silent: !0, z2: -1
            })
        }

        wf({
            type: "toolbox", render: function (e, t, i, n) {
                var o = this.group;
                if (o.removeAll(), e.get("show")) {
                    var a = +e.get("itemSize"), r = e.get("feature") || {}, s = this._features || (this._features = {}),
                        l = [];
                    D(r, function (e, t) {
                        l.push(t)
                    }), new If(this._featureNames || [], l).add(d).update(d).remove(P(d, null)).execute(), this._featureNames = l, function (e, t, i) {
                        var n = t.getBoxLayoutParams(), o = t.get("padding"),
                            a = {width: i.getWidth(), height: i.getHeight()}, r = md(n, a, o);
                        gd(t.get("orient"), e, t.get("itemGap"), r.width, r.height), vd(e, n, a, o)
                    }(o, e, i), o.add(M_(o.getBoundingRect(), e)), o.eachChild(function (e) {
                        var t = e.__title, n = e.hoverStyle;
                        if (n && t) {
                            var r = cn(t, bn(n)), s = e.position[0] + o.position[0], l = !1;
                            e.position[1] + o.position[1] + a + r.height > i.getHeight() && (n.textPosition = "top", l = !0);
                            var d = l ? -5 - r.height : a + 8;
                            s + r.width / 2 > i.getWidth() ? (n.textPosition = ["100%", d], n.textAlign = "right") : s - r.width / 2 < 0 && (n.textPosition = [0, d], n.textAlign = "left")
                        }
                    })
                }

                function d(d, u) {
                    var c, h = l[d], f = l[u], p = r[h], g = new bl(p, e, e.ecModel);
                    if (n && null != n.newTitle && n.featureName === h && (p.title = n.newTitle), h && !f) {
                        if (function (e) {
                            return 0 === e.indexOf("my")
                        }(h)) c = {model: g, onclick: g.option.onclick, featureName: h}; else {
                            var m = O_(h);
                            if (!m) return;
                            c = new m(g, t, i)
                        }
                        s[h] = c
                    } else {
                        if (!(c = s[f])) return;
                        c.model = g, c.ecModel = t, c.api = i
                    }
                    h || !f ? g.get("show") && !c.unusable ? (function (n, r, s) {
                        var l = n.getModel("iconStyle"), d = n.getModel("emphasis.iconStyle"),
                            u = r.getIcons ? r.getIcons() : n.get("icon"), c = n.get("title") || {};
                        if ("string" == typeof u) {
                            var h = u, f = c;
                            c = {}, (u = {})[s] = h, c[s] = f
                        }
                        var p = n.iconPaths = {};
                        D(u, function (s, u) {
                            var h = hl(s, {}, {x: -a / 2, y: -a / 2, width: a, height: a});
                            h.setStyle(l.getItemStyle()), h.hoverStyle = d.getItemStyle(), h.setStyle({
                                text: c[u],
                                textAlign: d.get("textAlign"),
                                textBorderRadius: d.get("textBorderRadius"),
                                textPadding: d.get("textPadding"),
                                textFill: null
                            });
                            var f = e.getModel("tooltip");
                            f && f.get("show") && h.attr("tooltip", T({
                                content: c[u],
                                formatter: f.get("formatter", !0) || function () {
                                    return c[u]
                                },
                                formatterParams: {
                                    componentType: "toolbox",
                                    name: u,
                                    title: c[u],
                                    $vars: ["name", "title"]
                                },
                                position: f.get("position", !0) || "bottom"
                            }, f.option)), Hs(h), e.get("showTitle") && (h.__title = c[u], h.on("mouseover", function () {
                                var t = d.getItemStyle(),
                                    i = "vertical" === e.get("orient") ? null == e.get("right") ? "right" : "left" : null == e.get("bottom") ? "bottom" : "top";
                                h.setStyle({
                                    textFill: d.get("textFill") || t.fill || t.stroke || "#000",
                                    textBackgroundColor: d.get("textBackgroundColor"),
                                    textPosition: d.get("textPosition") || i
                                })
                            }).on("mouseout", function () {
                                h.setStyle({textFill: null, textBackgroundColor: null})
                            })), h.trigger(n.get("iconStatus." + u) || "normal"), o.add(h), h.on("click", O(r.onclick, r, t, i, u)), p[u] = h
                        })
                    }(g, c, h), g.setIconStatus = function (e, t) {
                        var i = this.option, n = this.iconPaths;
                        i.iconStatus = i.iconStatus || {}, i.iconStatus[e] = t, n[e] && n[e].trigger(t)
                    }, c.render && c.render(g, t, i, n)) : c.remove && c.remove(t, i) : c.dispose && c.dispose(t, i)
                }
            }, updateView: function (e, t, i, n) {
                D(this._features, function (e) {
                    e.updateView && e.updateView(e.model, t, i, n)
                })
            }, remove: function (e, t) {
                D(this._features, function (i) {
                    i.remove && i.remove(e, t)
                }), this.group.removeAll()
            }, dispose: function (e, t) {
                D(this._features, function (i) {
                    i.dispose && i.dispose(e, t)
                })
            }
        });
        var F_ = Dc.toolbox.saveAsImage;

        function L_(e) {
            this.model = e
        }

        L_.defaultOption = {
            show: !0,
            icon: "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",
            title: F_.title,
            type: "png",
            connectedBackgroundColor: "#fff",
            name: "",
            excludeComponents: ["toolbox"],
            pixelRatio: 1,
            lang: F_.lang.slice()
        }, L_.prototype.unusable = !o.canvasSupported, L_.prototype.onclick = function (e, t) {
            var i = this.model, n = i.get("name") || e.get("title.0.text") || "echarts",
                a = "svg" === t.getZr().painter.getType() ? "svg" : i.get("type", !0) || "png",
                r = t.getConnectedDataURL({
                    type: a,
                    backgroundColor: i.get("backgroundColor", !0) || e.get("backgroundColor") || "#fff",
                    connectedBackgroundColor: i.get("connectedBackgroundColor"),
                    excludeComponents: i.get("excludeComponents"),
                    pixelRatio: i.get("pixelRatio")
                });
            if ("function" != typeof MouseEvent || o.browser.ie || o.browser.edge) if (window.navigator.msSaveOrOpenBlob) {
                for (var s = atob(r.split(",")[1]), l = s.length, d = new Uint8Array(l); l--;) d[l] = s.charCodeAt(l);
                var u = new Blob([d]);
                window.navigator.msSaveOrOpenBlob(u, n + "." + a)
            } else {
                var c = i.get("lang"),
                    h = '<body style="margin:0;"><img src="' + r + '" style="max-width:100%;" title="' + (c && c[0] || "") + '" /></body>';
                window.open().document.write(h)
            } else {
                var f = document.createElement("a");
                f.download = n + "." + a, f.target = "_blank", f.href = r;
                var p = new MouseEvent("click", {view: window, bubbles: !0, cancelable: !1});
                f.dispatchEvent(p)
            }
        }, E_("saveAsImage", L_);
        var R_ = Dc.toolbox.magicType, B_ = "__ec_magicType_stack__";

        function U_(e) {
            this.model = e
        }

        U_.defaultOption = {
            show: !0,
            type: [],
            icon: {
                line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
                bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
                stack: "M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"
            },
            title: m(R_.title),
            option: {},
            seriesIndex: {}
        };
        var V_ = U_.prototype;
        V_.getIcons = function () {
            var e = this.model, t = e.get("icon"), i = {};
            return D(e.get("type"), function (e) {
                t[e] && (i[e] = t[e])
            }), i
        };
        var K_ = {
            line: function (e, t, i, n) {
                if ("bar" === e) return v({
                    id: t,
                    type: "line",
                    data: i.get("data"),
                    stack: i.get("stack"),
                    markPoint: i.get("markPoint"),
                    markLine: i.get("markLine")
                }, n.get("option.line") || {}, !0)
            }, bar: function (e, t, i, n) {
                if ("line" === e) return v({
                    id: t,
                    type: "bar",
                    data: i.get("data"),
                    stack: i.get("stack"),
                    markPoint: i.get("markPoint"),
                    markLine: i.get("markLine")
                }, n.get("option.bar") || {}, !0)
            }, stack: function (e, t, i, n) {
                var o = i.get("stack") === B_;
                if ("line" === e || "bar" === e) return n.setIconStatus("stack", o ? "normal" : "emphasis"), v({
                    id: t,
                    stack: o ? "" : B_
                }, n.get("option.stack") || {}, !0)
            }
        }, G_ = [["line", "bar"], ["stack"]];
        V_.onclick = function (e, t, i) {
            var n = this.model, o = n.get("seriesIndex." + i);
            if (K_[i]) {
                var a, r = {series: []};
                D(G_, function (e) {
                    0 <= b(e, i) && D(e, function (e) {
                        n.setIconStatus(e, "normal")
                    })
                }), n.setIconStatus(i, "emphasis"), e.eachComponent({
                    mainType: "series",
                    query: null == o ? null : {seriesIndex: o}
                }, function (t) {
                    var o = t.subType, a = t.id, s = K_[i](o, a, t, n);
                    s && (w(s, t.option), r.series.push(s));
                    var l = t.coordinateSystem;
                    if (l && "cartesian2d" === l.type && ("line" === i || "bar" === i)) {
                        var d = l.getAxesByScale("ordinal")[0];
                        if (d) {
                            var u = d.dim + "Axis", c = e.queryComponents({
                                mainType: u,
                                index: t.get(name + "Index"),
                                id: t.get(name + "Id")
                            })[0].componentIndex;
                            r[u] = r[u] || [];
                            for (var h = 0; h <= c; h++) r[u][c] = r[u][c] || {};
                            r[u][c].boundaryGap = "bar" === i
                        }
                    }
                }), "stack" === i && (a = r.series && r.series[0] && r.series[0].stack === B_ ? v({stack: R_.title.tiled}, R_.title) : m(R_.title)), t.dispatchAction({
                    type: "changeMagicType",
                    currentType: i,
                    newOption: r,
                    newTitle: a,
                    featureName: "magicType"
                })
            }
        }, ff({type: "changeMagicType", event: "magicTypeChanged", update: "prepareAndUpdate"}, function (e, t) {
            t.mergeOption(e.newOption)
        }), E_("magicType", U_);
        var W_ = Dc.toolbox.dataView, j_ = new Array(60).join("-"), H_ = "\t";

        function z_(e) {
            return e.replace(/^\s\s*/, "").replace(/\s\s*$/, "")
        }

        var X_ = new RegExp("[" + H_ + "]+", "g");

        function q_(e) {
            this._dom = null, this.model = e
        }

        q_.defaultOption = {
            show: !0,
            readOnly: !1,
            optionToContent: null,
            contentToOption: null,
            icon: "M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",
            title: m(W_.title),
            lang: m(W_.lang),
            backgroundColor: "#fff",
            textColor: "#000",
            textareaColor: "#fff",
            textareaBorderColor: "#333",
            buttonColor: "#c23531",
            buttonTextColor: "#fff"
        }, q_.prototype.onclick = function (e, t) {
            var i = t.getDom(), n = this.model;
            this._dom && i.removeChild(this._dom);
            var o = document.createElement("div");
            o.style.cssText = "position:absolute;left:5px;top:5px;bottom:5px;right:5px;", o.style.backgroundColor = n.get("backgroundColor") || "#fff";
            var a = document.createElement("h4"), r = n.get("lang") || [];
            a.innerHTML = r[0] || n.get("title"), a.style.cssText = "margin: 10px 20px;", a.style.color = n.get("textColor");
            var s = document.createElement("div"), l = document.createElement("textarea");
            s.style.cssText = "display:block;width:100%;overflow:auto;";
            var d = n.get("optionToContent"), u = n.get("contentToOption"), c = function (e) {
                var t = function (e) {
                    var t = {}, i = [], n = [];
                    return e.eachRawSeries(function (e) {
                        var o = e.coordinateSystem;
                        if (!o || "cartesian2d" !== o.type && "polar" !== o.type) i.push(e); else {
                            var a = o.getBaseAxis();
                            if ("category" === a.type) {
                                var r = a.dim + "_" + a.index;
                                t[r] || (t[r] = {
                                    categoryAxis: a,
                                    valueAxis: o.getOtherAxis(a),
                                    series: []
                                }, n.push({axisDim: a.dim, axisIndex: a.index})), t[r].series.push(e)
                            } else i.push(e)
                        }
                    }), {seriesGroupByCategoryAxis: t, other: i, meta: n}
                }(e);
                return {
                    value: x([function (e) {
                        var t = [];
                        return D(e, function (e, i) {
                            var n = e.categoryAxis, o = e.valueAxis.dim, a = [" "].concat(A(e.series, function (e) {
                                return e.name
                            })), r = [n.model.getCategories()];
                            D(e.series, function (e) {
                                r.push(e.getRawData().mapArray(o, function (e) {
                                    return e
                                }))
                            });
                            for (var s = [a.join(H_)], l = 0; l < r[0].length; l++) {
                                for (var d = [], u = 0; u < r.length; u++) d.push(r[u][l]);
                                s.push(d.join(H_))
                            }
                            t.push(s.join("\n"))
                        }), t.join("\n\n" + j_ + "\n\n")
                    }(t.seriesGroupByCategoryAxis), function (e) {
                        return A(e, function (e) {
                            var t = e.getRawData(), i = [e.name], n = [];
                            return t.each(t.dimensions, function () {
                                for (var e = arguments.length, o = arguments[e - 1], a = t.getName(o), r = 0; r < e - 1; r++) n[r] = arguments[r];
                                i.push((a ? a + H_ : "") + n.join(H_))
                            }), i.join("\n")
                        }).join("\n\n" + j_ + "\n\n")
                    }(t.other)], function (e) {
                        return e.replace(/[\n\t\s]/g, "")
                    }).join("\n\n" + j_ + "\n\n"), meta: t.meta
                }
            }(e);
            if ("function" == typeof d) {
                var h = d(t.getOption());
                "string" == typeof h ? s.innerHTML = h : V(h) && s.appendChild(h)
            } else s.appendChild(l), l.readOnly = n.get("readOnly"), l.style.cssText = "width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;", l.style.color = n.get("textColor"), l.style.borderColor = n.get("textareaBorderColor"), l.style.backgroundColor = n.get("textareaColor"), l.value = c.value;
            var f = c.meta, p = document.createElement("div");
            p.style.cssText = "position:absolute;bottom:0;left:0;right:0;";
            var g = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",
                m = document.createElement("div"), v = document.createElement("div");
            g += ";background-color:" + n.get("buttonColor"), g += ";color:" + n.get("buttonTextColor");
            var y = this;

            function T() {
                i.removeChild(o), y._dom = null
            }

            He(m, "click", T), He(v, "click", function () {
                var e;
                try {
                    e = "function" == typeof u ? u(s, t.getOption()) : function (e, t) {
                        var i = {series: []};
                        return D(e.split(new RegExp("\n*" + j_ + "\n*", "g")), function (e, n) {
                            if (function (e) {
                                if (0 <= e.slice(0, e.indexOf("\n")).indexOf(H_)) return !0
                            }(e)) {
                                var o = function (e) {
                                    for (var t = e.split(/\n+/g), i = [], n = A(z_(t.shift()).split(X_), function (e) {
                                        return {name: e, data: []}
                                    }), o = 0; o < t.length; o++) {
                                        var a = z_(t[o]).split(X_);
                                        i.push(a.shift());
                                        for (var r = 0; r < a.length; r++) n[r] && (n[r].data[o] = a[r])
                                    }
                                    return {series: n, categories: i}
                                }(e), a = t[n], r = a.axisDim + "Axis";
                                a && (i[r] = i[r] || [], i[r][a.axisIndex] = {data: o.categories}, i.series = i.series.concat(o.series))
                            } else o = function (e) {
                                for (var t = e.split(/\n+/g), i = z_(t.shift()), n = [], o = 0; o < t.length; o++) {
                                    var a, r = z_(t[o]).split(X_), s = "", l = !1;
                                    a = isNaN(r[0]) ? (l = !0, s = r[0], r = r.slice(1), n[o] = {
                                        name: s,
                                        value: []
                                    }, n[o].value) : n[o] = [];
                                    for (var d = 0; d < r.length; d++) a.push(+r[d]);
                                    1 === a.length && (l ? n[o].value = a[0] : n[o] = a[0])
                                }
                                return {name: i, data: n}
                            }(e), i.series.push(o)
                        }), i
                    }(l.value, f)
                } catch (e) {
                    throw T(), new Error("Data view format error " + e)
                }
                e && t.dispatchAction({type: "changeDataView", newOption: e}), T()
            }), m.innerHTML = r[1], v.innerHTML = r[2], v.style.cssText = g, m.style.cssText = g, n.get("readOnly") || p.appendChild(v), p.appendChild(m), o.appendChild(a), o.appendChild(s), o.appendChild(p), s.style.height = i.clientHeight - 80 + "px", i.appendChild(o), this._dom = o
        }, q_.prototype.remove = function (e, t) {
            this._dom && t.getDom().removeChild(this._dom)
        }, q_.prototype.dispose = function (e, t) {
            this.remove(e, t)
        }, E_("dataView", q_), ff({
            type: "changeDataView",
            event: "dataViewChanged",
            update: "prepareAndUpdate"
        }, function (e, t) {
            var i = [];
            D(e.newOption.series, function (e) {
                var n = t.getSeriesByName(e.name)[0];
                if (n) {
                    var o = n.get("data");
                    i.push({
                        name: e.name, data: function (e, t) {
                            return A(e, function (e, i) {
                                var n = t && t[i];
                                return R(n) && !M(n) ? (R(e) && !M(e) && (e = e.value), w({value: e}, n)) : e
                            })
                        }(e.data, o)
                    })
                } else i.push(T({type: "scatter"}, e))
            }), t.mergeOption(w({series: i}, e.newOption))
        });
        var Y_ = D, J_ = b, Z_ = P, Q_ = ["dataToPoint", "pointToData"],
            $_ = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"];

        function eD(e, t, i) {
            var n = this._targetInfoList = [], o = {}, a = nD(t, e);
            Y_(oD, function (e, t) {
                i && i.include && !(0 <= J_(i.include, t)) || e(a, n, o)
            })
        }

        var tD = eD.prototype;

        function iD(e) {
            return e[0] > e[1] && e.reverse(), e
        }

        function nD(e, t) {
            return jo(e, t, {includeMainTypes: $_})
        }

        tD.setOutputRanges = function (e, t) {
            this.matchOutputRanges(e, t, function (e, t, i) {
                if ((e.coordRanges || (e.coordRanges = [])).push(t), !e.coordRange) {
                    e.coordRange = t;
                    var n = sD[e.brushType](0, i, t);
                    e.__rangeOffset = {offset: dD[e.brushType](n.values, e.range, [1, 1]), xyMinMax: n.xyMinMax}
                }
            })
        }, tD.matchOutputRanges = function (e, t, i) {
            Y_(e, function (e) {
                var n = this.findTargetInfo(e, t);
                n && !0 !== n && D(n.coordSyses, function (n) {
                    var o = sD[e.brushType](1, n, e.range);
                    i(e, o.values, n, t)
                })
            }, this)
        }, tD.setInputRanges = function (e, t) {
            Y_(e, function (e) {
                var i = this.findTargetInfo(e, t);
                if (e.range = e.range || [], i && !0 !== i) {
                    e.panelId = i.panelId;
                    var n = sD[e.brushType](0, i.coordSys, e.coordRange), o = e.__rangeOffset;
                    e.range = o ? dD[e.brushType](n.values, o.offset, function (e, t) {
                        var i = cD(e), n = cD(t), o = [i[0] / n[0], i[1] / n[1]];
                        return isNaN(o[0]) && (o[0] = 1), isNaN(o[1]) && (o[1] = 1), o
                    }(n.xyMinMax, o.xyMinMax)) : n.values
                }
            }, this)
        }, tD.makePanelOpts = function (e, t) {
            return A(this._targetInfoList, function (i) {
                var n = i.getPanelRect();
                return {
                    panelId: i.panelId,
                    defaultBrushType: t && t(i),
                    clipPath: MC(n),
                    isTargetByCursor: LC(n, e, i.coordSysModel),
                    getLinearBrushOtherExtent: FC(n)
                }
            })
        }, tD.controlSeries = function (e, t, i) {
            var n = this.findTargetInfo(e, i);
            return !0 === n || n && 0 <= J_(n.coordSyses, t.coordinateSystem)
        }, tD.findTargetInfo = function (e, t) {
            for (var i = this._targetInfoList, n = nD(t, e), o = 0; o < i.length; o++) {
                var a = i[o], r = e.panelId;
                if (r) {
                    if (a.panelId === r) return a
                } else for (o = 0; o < aD.length; o++) if (aD[o](n, a)) return a
            }
            return !0
        };
        var oD = {
            grid: function (e, t) {
                var i = e.xAxisModels, n = e.yAxisModels, o = e.gridModels, a = $(), r = {}, s = {};
                (i || n || o) && (Y_(i, function (e) {
                    var t = e.axis.grid.model;
                    a.set(t.id, t), r[t.id] = !0
                }), Y_(n, function (e) {
                    var t = e.axis.grid.model;
                    a.set(t.id, t), s[t.id] = !0
                }), Y_(o, function (e) {
                    a.set(e.id, e), r[e.id] = !0, s[e.id] = !0
                }), a.each(function (e) {
                    var o = e.coordinateSystem, a = [];
                    Y_(o.getCartesians(), function (e, t) {
                        (0 <= J_(i, e.getAxis("x").model) || 0 <= J_(n, e.getAxis("y").model)) && a.push(e)
                    }), t.push({
                        panelId: "grid--" + e.id,
                        gridModel: e,
                        coordSysModel: e,
                        coordSys: a[0],
                        coordSyses: a,
                        getPanelRect: rD.grid,
                        xAxisDeclared: r[e.id],
                        yAxisDeclared: s[e.id]
                    })
                }))
            }, geo: function (e, t) {
                Y_(e.geoModels, function (e) {
                    var i = e.coordinateSystem;
                    t.push({
                        panelId: "geo--" + e.id,
                        geoModel: e,
                        coordSysModel: e,
                        coordSys: i,
                        coordSyses: [i],
                        getPanelRect: rD.geo
                    })
                })
            }
        }, aD = [function (e, t) {
            var i = e.xAxisModel, n = e.yAxisModel, o = e.gridModel;
            return !o && i && (o = i.axis.grid.model), !o && n && (o = n.axis.grid.model), o && o === t.gridModel
        }, function (e, t) {
            var i = e.geoModel;
            return i && i === t.geoModel
        }], rD = {
            grid: function () {
                return this.coordSys.grid.getRect().clone()
            }, geo: function () {
                var e = this.coordSys, t = e.getBoundingRect().clone();
                return t.applyTransform(sl(e)), t
            }
        }, sD = {
            lineX: Z_(lD, 0), lineY: Z_(lD, 1), rect: function (e, t, i) {
                var n = t[Q_[e]]([i[0][0], i[1][0]]), o = t[Q_[e]]([i[0][1], i[1][1]]),
                    a = [iD([n[0], o[0]]), iD([n[1], o[1]])];
                return {values: a, xyMinMax: a}
            }, polygon: function (e, t, i) {
                var n = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
                return {
                    values: A(i, function (i) {
                        var o = t[Q_[e]](i);
                        return n[0][0] = Math.min(n[0][0], o[0]), n[1][0] = Math.min(n[1][0], o[1]), n[0][1] = Math.max(n[0][1], o[0]), n[1][1] = Math.max(n[1][1], o[1]), o
                    }), xyMinMax: n
                }
            }
        };

        function lD(e, t, i, n) {
            var o = i.getAxis(["x", "y"][e]), a = iD(A([0, 1], function (e) {
                return t ? o.coordToData(o.toLocalCoord(n[e])) : o.toGlobalCoord(o.dataToCoord(n[e]))
            })), r = [];
            return r[e] = a, r[1 - e] = [NaN, NaN], {values: a, xyMinMax: r}
        }

        var dD = {
            lineX: Z_(uD, 0), lineY: Z_(uD, 1), rect: function (e, t, i) {
                return [[e[0][0] - i[0] * t[0][0], e[0][1] - i[0] * t[0][1]], [e[1][0] - i[1] * t[1][0], e[1][1] - i[1] * t[1][1]]]
            }, polygon: function (e, t, i) {
                return A(e, function (e, n) {
                    return [e[0] - i[0] * t[n][0], e[1] - i[1] * t[n][1]]
                })
            }
        };

        function uD(e, t, i, n) {
            return [t[0] - n[e] * i[0], t[1] - n[e] * i[1]]
        }

        function cD(e) {
            return e ? [e[0][1] - e[0][0], e[1][1] - e[1][0]] : [NaN, NaN]
        }

        var hD = D, fD = "\0_ec_hist_store";

        function pD(e) {
            var t = e[fD];
            return t = t || (e[fD] = [{}])
        }

        Sd.registerSubTypeDefaulter("dataZoom", function () {
            return "slider"
        });
        var gD, mD, vD, yD, TD = ["cartesian2d", "polar", "singleAxis"],
            wD = (mD = ["axisIndex", "axis", "index", "id"], vD = A(gD = (gD = ["x", "y", "z", "radius", "angle", "single"]).slice(), sd), yD = A(mD = (mD || []).slice(), sd), function (e, t) {
                D(gD, function (i, n) {
                    for (var o = {name: i, capital: vD[n]}, a = 0; a < mD.length; a++) o[mD[a]] = i + yD[a];
                    e.call(t, o)
                })
            });

        function kD(e, t, i, n) {
            this._dimName = e, this._axisIndex = t, this._valueWindow, this._percentWindow, this._dataExtent, this._minMaxSpan, this.ecModel = n, this._dataZoomModel = i
        }

        var CD = D, bD = Ol;

        function ID(e, t) {
            var i = e.getAxisModel(), n = e._percentWindow, o = e._valueWindow;
            if (n) {
                var a = Fl(o, [0, 500]);
                a = Math.min(a, 20);
                var r = t || 0 === n[0] && 100 === n[1];
                i.setRange(r ? null : +o[0].toFixed(a), r ? null : +o[1].toFixed(a))
            }
        }

        kD.prototype = {
            constructor: kD, hostedBy: function (e) {
                return this._dataZoomModel === e
            }, getDataValueWindow: function () {
                return this._valueWindow.slice()
            }, getDataPercentWindow: function () {
                return this._percentWindow.slice()
            }, getTargetSeriesModels: function () {
                var e = [], t = this.ecModel;
                return t.eachSeries(function (i) {
                    if (function (e) {
                        return 0 <= b(TD, e)
                    }(i.get("coordinateSystem"))) {
                        var n = this._dimName, o = t.queryComponents({
                            mainType: n + "Axis",
                            index: i.get(n + "AxisIndex"),
                            id: i.get(n + "AxisId")
                        })[0];
                        this._axisIndex === (o && o.componentIndex) && e.push(i)
                    }
                }, this), e
            }, getAxisModel: function () {
                return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex)
            }, getOtherAxisModel: function () {
                var e, t, i, n = this._dimName, o = this.ecModel, a = this.getAxisModel();
                return e = "x" === n || "y" === n ? (t = "gridIndex", "x" === n ? "y" : "x") : (t = "polarIndex", "angle" === n ? "radius" : "angle"), o.eachComponent(e + "Axis", function (e) {
                    (e.get(t) || 0) === (a.get(t) || 0) && (i = e)
                }), i
            }, getMinMaxSpan: function () {
                return m(this._minMaxSpan)
            }, calculateDataWindow: function (e) {
                var t, i = this._dataExtent, n = this.getAxisModel().axis.scale,
                    o = this._dataZoomModel.getRangePropMode(), a = [0, 100], r = [], s = [];
                CD(["start", "end"], function (l, d) {
                    var u = e[l], c = e[l + "Value"];
                    "percent" === o[d] ? (null == u && (u = a[d]), c = n.parse(Nl(u, a, i))) : (t = !0, u = Nl(c = null == c ? i[d] : n.parse(c), i, a)), s[d] = c, r[d] = u
                }), bD(s), bD(r);
                var l = this._minMaxSpan;

                function d(e, t, i, o, a) {
                    var r = a ? "Span" : "ValueSpan";
                    Ek(0, e, i, "all", l["min" + r], l["max" + r]);
                    for (var s = 0; s < 2; s++) t[s] = Nl(e[s], i, o, !0), a && (t[s] = n.parse(t[s]))
                }

                return t ? d(s, r, i, a, !1) : d(r, s, a, i, !0), {valueWindow: s, percentWindow: r}
            }, reset: function (e) {
                if (e === this._dataZoomModel) {
                    var t = this.getTargetSeriesModels();
                    this._dataExtent = function (e, t, i) {
                        var n = [1 / 0, -1 / 0];
                        return CD(i, function (e) {
                            var i = e.getData();
                            i && CD(i.mapDimension(t, !0), function (e) {
                                var t = i.getApproximateExtent(e);
                                t[0] < n[0] && (n[0] = t[0]), t[1] > n[1] && (n[1] = t[1])
                            })
                        }), n[1] < n[0] && (n = [NaN, NaN]), function (e, t) {
                            var i = e.getAxisModel(), n = i.getMin(!0), o = "category" === i.get("type"),
                                a = o && i.getCategories().length;
                            null != n && "dataMin" !== n && "function" != typeof n ? t[0] = n : o && (t[0] = 0 < a ? 0 : NaN);
                            var r = i.getMax(!0);
                            null != r && "dataMax" !== r && "function" != typeof r ? t[1] = r : o && (t[1] = 0 < a ? a - 1 : NaN), i.get("scale", !0) || (0 < t[0] && (t[0] = 0), t[1] < 0 && (t[1] = 0))
                        }(e, n), n
                    }(this, this._dimName, t), o = (n = this)._minMaxSpan = {}, a = n._dataZoomModel, r = n._dataExtent, CD(["min", "max"], function (e) {
                        var t = a.get(e + "Span"), i = a.get(e + "ValueSpan");
                        null != i && (i = n.getAxisModel().axis.scale.parse(i)), null != i ? t = Nl(r[0] + i, r, [0, 100], !0) : null != t && (i = Nl(t, [0, 100], r, !0) - r[0]), o[e + "Span"] = t, o[e + "ValueSpan"] = i
                    });
                    var i = this.calculateDataWindow(e.settledOption);
                    this._valueWindow = i.valueWindow, this._percentWindow = i.percentWindow, ID(this)
                }
                var n, o, a, r
            }, restore: function (e) {
                e === this._dataZoomModel && (this._valueWindow = this._percentWindow = null, ID(this, !0))
            }, filterData: function (e, t) {
                if (e === this._dataZoomModel) {
                    var i = this._dimName, n = this.getTargetSeriesModels(), o = e.get("filterMode"),
                        a = this._valueWindow;
                    "none" !== o && CD(n, function (e) {
                        var t = e.getData(), n = t.mapDimension(i, !0);
                        n.length && ("weakFilter" === o ? t.filterSelf(function (e) {
                            for (var i, o, r, s = 0; s < n.length; s++) {
                                var l = t.get(n[s], e), d = !isNaN(l), u = l < a[0], c = l > a[1];
                                if (d && !u && !c) return !0;
                                d && (r = !0), u && (i = !0), c && (o = !0)
                            }
                            return r && i && o
                        }) : CD(n, function (i) {
                            if ("empty" === o) e.setData(t = t.map(i, function (e) {
                                return function (e) {
                                    return e >= a[0] && e <= a[1]
                                }(e) ? e : NaN
                            })); else {
                                var n = {};
                                n[i] = a, t.selectRange(n)
                            }
                        }), CD(n, function (e) {
                            t.setApproximateExtent(a, e)
                        }))
                    })
                }
            }
        };
        var SD = D, _D = wD, DD = Tf({
            type: "dataZoom",
            dependencies: ["xAxis", "yAxis", "zAxis", "radiusAxis", "angleAxis", "singleAxis", "series"],
            defaultOption: {
                zlevel: 0,
                z: 4,
                orient: null,
                xAxisIndex: null,
                yAxisIndex: null,
                filterMode: "filter",
                throttle: null,
                start: 0,
                end: 100,
                startValue: null,
                endValue: null,
                minSpan: null,
                maxSpan: null,
                minValueSpan: null,
                maxValueSpan: null,
                rangeMode: null
            },
            init: function (e, t, i) {
                this._dataIntervalByAxis = {}, this._dataInfo = {}, this._axisProxies = {}, this.textStyleModel, this._autoThrottle = !0, this._rangePropMode = ["percent", "percent"];
                var n = AD(e);
                this.settledOption = n, this.mergeDefaultAndTheme(e, i), this.doInit(n)
            },
            mergeOption: function (e) {
                var t = AD(e);
                v(this.option, e, !0), v(this.settledOption, t, !0), this.doInit(t)
            },
            doInit: function (e) {
                var t = this.option;
                o.canvasSupported || (t.realtime = !1), this._setDefaultThrottle(e), ND(this, e);
                var i = this.settledOption;
                SD([["start", "startValue"], ["end", "endValue"]], function (e, n) {
                    "value" === this._rangePropMode[n] && (t[e[0]] = i[e[0]] = null)
                }, this), this.textStyleModel = this.getModel("textStyle"), this._resetTarget(), this._giveAxisProxies()
            },
            _giveAxisProxies: function () {
                var e = this._axisProxies;
                this.eachTargetAxis(function (t, i, n, o) {
                    var a = this.dependentModels[t.axis][i],
                        r = a.__dzAxisProxy || (a.__dzAxisProxy = new kD(t.name, i, this, o));
                    e[t.name + "_" + i] = r
                }, this)
            },
            _resetTarget: function () {
                var e = this.option, t = this._judgeAutoMode();
                _D(function (t) {
                    var i = t.axisIndex;
                    e[i] = Po(e[i])
                }, this), "axisIndex" === t ? this._autoSetAxisIndex() : "orient" === t && this._autoSetOrient()
            },
            _judgeAutoMode: function () {
                var e = this.option, t = !1;
                _D(function (i) {
                    null != e[i.axisIndex] && (t = !0)
                }, this);
                var i = e.orient;
                return null == i && t ? "orient" : t ? void 0 : (null == i && (e.orient = "horizontal"), "axisIndex")
            },
            _autoSetAxisIndex: function () {
                var e = !0, t = this.get("orient", !0), i = this.option, n = this.dependentModels;
                if (e) {
                    var o = "vertical" === t ? "y" : "x";
                    n[o + "Axis"].length ? (i[o + "AxisIndex"] = [0], e = !1) : SD(n.singleAxis, function (n) {
                        e && n.get("orient", !0) === t && (i.singleAxisIndex = [n.componentIndex], e = !1)
                    })
                }
                e && _D(function (t) {
                    if (e) {
                        var n = [], o = this.dependentModels[t.axis];
                        if (o.length && !n.length) for (var a = 0, r = o.length; a < r; a++) "category" === o[a].get("type") && n.push(a);
                        (i[t.axisIndex] = n).length && (e = !1)
                    }
                }, this), e && this.ecModel.eachSeries(function (e) {
                    this._isSeriesHasAllAxesTypeOf(e, "value") && _D(function (t) {
                        var n = i[t.axisIndex], o = e.get(t.axisIndex), a = e.get(t.axisId);
                        b(n, o = e.ecModel.queryComponents({
                            mainType: t.axis,
                            index: o,
                            id: a
                        })[0].componentIndex) < 0 && n.push(o)
                    })
                }, this)
            },
            _autoSetOrient: function () {
                var e;
                this.eachTargetAxis(function (t) {
                    e = e || t.name
                }, this), this.option.orient = "y" === e ? "vertical" : "horizontal"
            },
            _isSeriesHasAllAxesTypeOf: function (e, t) {
                var i = !0;
                return _D(function (n) {
                    var o = e.get(n.axisIndex), a = this.dependentModels[n.axis][o];
                    a && a.get("type") === t || (i = !1)
                }, this), i
            },
            _setDefaultThrottle: function (e) {
                if (e.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
                    var t = this.ecModel.option;
                    this.option.throttle = t.animation && 0 < t.animationDurationUpdate ? 100 : 20
                }
            },
            getFirstTargetAxisModel: function () {
                var e;
                return _D(function (t) {
                    if (null == e) {
                        var i = this.get(t.axisIndex);
                        i.length && (e = this.dependentModels[t.axis][i[0]])
                    }
                }, this), e
            },
            eachTargetAxis: function (e, t) {
                var i = this.ecModel;
                _D(function (n) {
                    SD(this.get(n.axisIndex), function (o) {
                        e.call(t, n, o, this, i)
                    }, this)
                }, this)
            },
            getAxisProxy: function (e, t) {
                return this._axisProxies[e + "_" + t]
            },
            getAxisModel: function (e, t) {
                var i = this.getAxisProxy(e, t);
                return i && i.getAxisModel()
            },
            setRawRange: function (e) {
                var t = this.option, i = this.settledOption;
                SD([["start", "startValue"], ["end", "endValue"]], function (n) {
                    null == e[n[0]] && null == e[n[1]] || (t[n[0]] = i[n[0]] = e[n[0]], t[n[1]] = i[n[1]] = e[n[1]])
                }, this), ND(this, e)
            },
            setCalculatedRange: function (e) {
                var t = this.option;
                SD(["start", "startValue", "end", "endValue"], function (i) {
                    t[i] = e[i]
                })
            },
            getPercentRange: function () {
                var e = this.findRepresentativeAxisProxy();
                if (e) return e.getDataPercentWindow()
            },
            getValueRange: function (e, t) {
                if (null != e || null != t) return this.getAxisProxy(e, t).getDataValueWindow();
                var i = this.findRepresentativeAxisProxy();
                return i ? i.getDataValueWindow() : void 0
            },
            findRepresentativeAxisProxy: function (e) {
                if (e) return e.__dzAxisProxy;
                var t = this._axisProxies;
                for (var i in t) if (t.hasOwnProperty(i) && t[i].hostedBy(this)) return t[i];
                for (var i in t) if (t.hasOwnProperty(i) && !t[i].hostedBy(this)) return t[i]
            },
            getRangePropMode: function () {
                return this._rangePropMode.slice()
            }
        });

        function AD(e) {
            var t = {};
            return SD(["start", "end", "startValue", "endValue", "throttle"], function (i) {
                e.hasOwnProperty(i) && (t[i] = e[i])
            }), t
        }

        function ND(e, t) {
            var i = e._rangePropMode, n = e.get("rangeMode");
            SD([["start", "startValue"], ["end", "endValue"]], function (e, o) {
                var a = null != t[e[0]], r = null != t[e[1]];
                a && !r ? i[o] = "percent" : !a && r ? i[o] = "value" : n ? i[o] = n[o] : a && (i[o] = "percent")
            })
        }

        var xD = lc.extend({
            type: "dataZoom", render: function (e, t, i, n) {
                this.dataZoomModel = e, this.ecModel = t, this.api = i
            }, getTargetCoordInfo: function () {
                var e = this.dataZoomModel, t = this.ecModel, i = {};
                return e.eachTargetAxis(function (e, n) {
                    var o = t.getComponent(e.axis, n);
                    if (o) {
                        var a = o.getCoordSysModel();
                        a && function (e, t, i, n) {
                            for (var o, a = 0; a < i.length; a++) if (i[a].model === e) {
                                o = i[a];
                                break
                            }
                            o || i.push(o = {model: e, axisModels: [], coordIndex: n}), o.axisModels.push(t)
                        }(a, o, i[a.mainType] || (i[a.mainType] = []), a.componentIndex)
                    }
                }, this), i
            }
        });
        DD.extend({type: "dataZoom.select"}), xD.extend({type: "dataZoom.select"}), hf({
            getTargetSeries: function (e) {
                var t = $();
                return e.eachComponent("dataZoom", function (e) {
                    e.eachTargetAxis(function (e, i, n) {
                        D(n.getAxisProxy(e.name, i).getTargetSeriesModels(), function (e) {
                            t.set(e.uid, e)
                        })
                    })
                }), t
            }, modifyOutputEnd: !0, overallReset: function (e, t) {
                e.eachComponent("dataZoom", function (e) {
                    e.eachTargetAxis(function (e, i, n) {
                        n.getAxisProxy(e.name, i).reset(n, t)
                    }), e.eachTargetAxis(function (e, i, n) {
                        n.getAxisProxy(e.name, i).filterData(n, t)
                    })
                }), e.eachComponent("dataZoom", function (e) {
                    var t = e.findRepresentativeAxisProxy(), i = t.getDataPercentWindow(), n = t.getDataValueWindow();
                    e.setCalculatedRange({start: i[0], end: i[1], startValue: n[0], endValue: n[1]})
                })
            }
        }), ff("dataZoom", function (e, t) {
            var i = function (e, t, i) {
                return function (o) {
                    var a, r = {nodes: [], records: {}};
                    if (t(function (e) {
                        r.records[e.name] = {}
                    }), !o) return r;
                    for (n(o, r); a = !1, e(s), a;) ;

                    function s(e) {
                        !function (e, t) {
                            return 0 <= b(t.nodes, e)
                        }(e, r) && function (e, n) {
                            var o = !1;
                            return t(function (t) {
                                D(i(e, t) || [], function (e) {
                                    n.records[t.name][e] && (o = !0)
                                })
                            }), o
                        }(e, r) && (n(e, r), a = !0)
                    }

                    return r
                };

                function n(e, n) {
                    n.nodes.push(e), t(function (t) {
                        D(i(e, t) || [], function (e) {
                            n.records[t.name][e] = !0
                        })
                    })
                }
            }(O(t.eachComponent, t, "dataZoom"), wD, function (e, t) {
                return e.get(t.axisIndex)
            }), n = [];
            t.eachComponent({mainType: "dataZoom", query: e}, function (e, t) {
                n.push.apply(n, i(e).nodes)
            }), D(n, function (t, i) {
                t.setRawRange({start: e.start, end: e.end, startValue: e.startValue, endValue: e.endValue})
            })
        });
        var ED = Dc.toolbox.dataZoom, OD = D;

        function PD(e, t, i) {
            (this._brushController = new oC(i.getZr())).on("brush", O(this._onBrush, this)).mount(), this._isZoomActive
        }

        PD.defaultOption = {
            show: !0,
            filterMode: "filter",
            icon: {
                zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
                back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
            },
            title: m(ED.title)
        };
        var MD = PD.prototype;
        MD.render = function (e, t, i, n) {
            this.model = e, this.ecModel = t, this.api = i, function (e, t, i, n, o) {
                var a = i._isZoomActive;
                n && "takeGlobalCursor" === n.type && (a = "dataZoomSelect" === n.key && n.dataZoomSelectActive), i._isZoomActive = a, e.setIconStatus("zoom", a ? "emphasis" : "normal");
                var r = new eD(LD(e.option), t, {include: ["grid"]});
                i._brushController.setPanels(r.makePanelOpts(o, function (e) {
                    return e.xAxisDeclared && !e.yAxisDeclared ? "lineX" : !e.xAxisDeclared && e.yAxisDeclared ? "lineY" : "rect"
                })).enableBrush(!!a && {brushType: "auto", brushStyle: {lineWidth: 0, fill: "rgba(0,0,0,0.2)"}})
            }(e, t, this, n, i), function (e, t) {
                e.setIconStatus("back", 1 < function (e) {
                    return pD(e).length
                }(t) ? "emphasis" : "normal")
            }(e, t)
        }, MD.onclick = function (e, t, i) {
            FD[i].call(this)
        }, MD.remove = function (e, t) {
            this._brushController.unmount()
        }, MD.dispose = function (e, t) {
            this._brushController.dispose()
        };
        var FD = {
            zoom: function () {
                var e = !this._isZoomActive;
                this.api.dispatchAction({type: "takeGlobalCursor", key: "dataZoomSelect", dataZoomSelectActive: e})
            }, back: function () {
                this._dispatchZoomAction(function (e) {
                    var t = pD(e), i = t[t.length - 1];
                    1 < t.length && t.pop();
                    var n = {};
                    return hD(i, function (e, i) {
                        for (var o = t.length - 1; 0 <= o; o--) if (e = t[o][i]) {
                            n[i] = e;
                            break
                        }
                    }), n
                }(this.ecModel))
            }
        };

        function LD(e) {
            var t = {};
            return D(["xAxisIndex", "yAxisIndex"], function (i) {
                t[i] = e[i], null == t[i] && (t[i] = "all"), !1 !== t[i] && "none" !== t[i] || (t[i] = [])
            }), t
        }

        MD._onBrush = function (e, t) {
            if (t.isEnd && e.length) {
                var i = {}, n = this.ecModel;
                this._brushController.updateCovers([]), new eD(LD(this.model.option), n, {include: ["grid"]}).matchOutputRanges(e, n, function (e, t, i) {
                    if ("cartesian2d" === i.type) {
                        var n = e.brushType;
                        "rect" === n ? (o("x", i, t[0]), o("y", i, t[1])) : o({lineX: "x", lineY: "y"}[n], i, t)
                    }
                }), function (e, t) {
                    var i = pD(e);
                    hD(t, function (t, n) {
                        for (var o = i.length - 1; 0 <= o && !i[o][n]; o--) ;
                        if (o < 0) {
                            var a = e.queryComponents({mainType: "dataZoom", subType: "select", id: n})[0];
                            if (a) {
                                var r = a.getPercentRange();
                                i[0][n] = {dataZoomId: n, start: r[0], end: r[1]}
                            }
                        }
                    }), i.push(t)
                }(n, i), this._dispatchZoomAction(i)
            }

            function o(e, t, o) {
                var a = t.getAxis(e), r = a.model, s = function (e, t, i) {
                    var n;
                    return i.eachComponent({mainType: "dataZoom", subType: "select"}, function (i) {
                        i.getAxisModel(e, t.componentIndex) && (n = i)
                    }), n
                }(e, r, n), l = s.findRepresentativeAxisProxy(r).getMinMaxSpan();
                null == l.minValueSpan && null == l.maxValueSpan || (o = Ek(0, o.slice(), a.scale.getExtent(), 0, l.minValueSpan, l.maxValueSpan)), s && (i[s.id] = {
                    dataZoomId: s.id,
                    startValue: o[0],
                    endValue: o[1]
                })
            }
        }, MD._dispatchZoomAction = function (e) {
            var t = [];
            OD(e, function (e, i) {
                t.push(m(e))
            }), t.length && this.api.dispatchAction({type: "dataZoom", from: this.uid, batch: t})
        }, E_("dataZoom", PD), cf(function (e) {
            if (e) {
                var t = e.dataZoom || (e.dataZoom = []);
                M(t) || (e.dataZoom = t = [t]);
                var i = e.toolbox;
                if (i && (M(i) && (i = i[0]), i && i.feature)) {
                    var n = i.feature.dataZoom;
                    o("xAxis", n), o("yAxis", n)
                }
            }

            function o(i, n) {
                if (n) {
                    var o = i + "Index", a = n[o];
                    null == a || "all" === a || M(a) || (a = !1 === a || "none" === a ? [] : [a]), M(r = e[i]) || (r = r ? [r] : []), OD(r, function (e, r) {
                        if (null == a || "all" === a || -1 !== b(a, r)) {
                            var s = {
                                type: "select",
                                $fromToolbox: !0,
                                filterMode: n.filterMode || "filter",
                                id: "\0_ec_\0toolbox-dataZoom_" + i + r
                            };
                            s[o] = r, t.push(s)
                        }
                    })
                }
                var r
            }
        });
        var RD = Dc.toolbox.restore;

        function BD(e) {
            this.model = e
        }

        BD.defaultOption = {
            show: !0,
            icon: "M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",
            title: RD.title
        }, BD.prototype.onclick = function (e, t, i) {
            !function (e) {
                e[fD] = null
            }(e), t.dispatchAction({type: "restore", from: this.uid})
        }, E_("restore", BD), ff({type: "restore", event: "restore", update: "prepareAndUpdate"}, function (e, t) {
            t.resetOption("recreate")
        }), Tf({
            type: "tooltip",
            dependencies: ["axisPointer"],
            defaultOption: {
                zlevel: 0,
                z: 60,
                show: !0,
                showContent: !0,
                trigger: "item",
                triggerOn: "mousemove|click",
                alwaysShowContent: !1,
                displayMode: "single",
                renderMode: "auto",
                confine: !1,
                showDelay: 0,
                hideDelay: 100,
                transitionDuration: .4,
                enterable: !1,
                backgroundColor: "rgba(50,50,50,0.7)",
                borderColor: "#333",
                borderRadius: 4,
                borderWidth: 0,
                padding: 5,
                extraCssText: "",
                axisPointer: {
                    type: "line",
                    axis: "auto",
                    animation: "auto",
                    animationDurationUpdate: 200,
                    animationEasingUpdate: "exponentialOut",
                    crossStyle: {color: "#999", width: 1, type: "dashed", textStyle: {}}
                },
                textStyle: {color: "#fff", fontSize: 14}
            }
        });
        var UD = D, VD = Yl, KD = ["", "-webkit-", "-moz-", "-o-"];

        function GD(e, t, i, n, o) {
            var a = t && t.painter;
            if (i) {
                var r = a && a.getViewportRoot();
                r && function (e, t, i, n, o) {
                    Le(Fe, t, n, o, !0) && Le(e, i, Fe[0], Fe[1])
                }(e, r, document.body, n, o)
            } else {
                e[0] = n, e[1] = o;
                var s = a && a.getViewportRootOffset();
                s && (e[0] += s.offsetLeft, e[1] += s.offsetTop)
            }
        }

        function WD(e, t, i) {
            if (o.wxa) return null;
            var n = document.createElement("div");
            n.domBelongToZr = !0, this.el = n;
            var a = this._zr = t.getZr(), r = this._appendToBody = i && i.appendToBody;
            this._styleCoord = [0, 0], GD(this._styleCoord, a, r, t.getWidth() / 2, t.getHeight() / 2), r ? document.body.appendChild(n) : e.appendChild(n), this._container = e, this._show = !1, this._hideTimeout;
            var s = this;
            n.onmouseenter = function () {
                s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0
            }, n.onmousemove = function (e) {
                if (e = e || window.event, !s._enterable) {
                    var t = a.handler;
                    je(a.painter.getViewportRoot(), e, !0), t.dispatch("mousemove", e)
                }
            }, n.onmouseleave = function () {
                s._enterable && s._show && s.hideLater(s._hideDelay), s._inContent = !1
            }
        }

        function jD(e) {
            this._zr = e.getZr(), this._show = !1, this._hideTimeout
        }

        WD.prototype = {
            constructor: WD, _enterable: !0, update: function () {
                var e = this._container, t = e.currentStyle || document.defaultView.getComputedStyle(e), i = e.style;
                "absolute" !== i.position && "absolute" !== t.position && (i.position = "relative")
            }, show: function (e) {
                clearTimeout(this._hideTimeout);
                var t = this.el, i = this._styleCoord;
                t.style.cssText = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + function (e) {
                    var t = [], i = e.get("transitionDuration"), n = e.get("backgroundColor"),
                        a = e.getModel("textStyle"), r = e.get("padding");
                    return i && t.push(function (e) {
                        var t = "cubic-bezier(0.23, 1, 0.32, 1)", i = "left " + e + "s " + t + ",top " + e + "s " + t;
                        return A(KD, function (e) {
                            return e + "transition:" + i
                        }).join(";")
                    }(i)), n && (o.canvasSupported ? t.push("background-Color:" + n) : (t.push("background-Color:#" + jt(n)), t.push("filter:alpha(opacity=70)"))), UD(["width", "color", "radius"], function (i) {
                        var n = "border-" + i, o = VD(n), a = e.get(o);
                        null != a && t.push(n + ":" + a + ("color" === i ? "" : "px"))
                    }), t.push(function (e) {
                        var t = [], i = e.get("fontSize"), n = e.getTextColor();
                        return n && t.push("color:" + n), t.push("font:" + e.getFont()), i && t.push("line-height:" + Math.round(3 * i / 2) + "px"), UD(["decoration", "align"], function (i) {
                            var n = e.get(i);
                            n && t.push("text-" + i + ":" + n)
                        }), t.join(";")
                    }(a)), null != r && t.push("padding:" + Jl(r).join("px ") + "px"), t.join(";") + ";"
                }(e) + ";left:" + i[0] + "px;top:" + i[1] + "px;" + (e.get("extraCssText") || ""), t.style.display = t.innerHTML ? "block" : "none", t.style.pointerEvents = this._enterable ? "auto" : "none", this._show = !0
            }, setContent: function (e) {
                this.el.innerHTML = null == e ? "" : e
            }, setEnterable: function (e) {
                this._enterable = e
            }, getSize: function () {
                var e = this.el;
                return [e.clientWidth, e.clientHeight]
            }, moveTo: function (e, t) {
                var i = this._styleCoord;
                GD(i, this._zr, this._appendToBody, e, t);
                var n = this.el.style;
                n.left = i[0] + "px", n.top = i[1] + "px"
            }, hide: function () {
                this.el.style.display = "none", this._show = !1
            }, hideLater: function (e) {
                !this._show || this._inContent && this._enterable || (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(O(this.hide, this), e)) : this.hide())
            }, isShow: function () {
                return this._show
            }, dispose: function () {
                this.el.parentNode.removeChild(this.el)
            }, getOuterSize: function () {
                var e = this.el.clientWidth, t = this.el.clientHeight;
                if (document.defaultView && document.defaultView.getComputedStyle) {
                    var i = document.defaultView.getComputedStyle(this.el);
                    i && (e += parseInt(i.borderLeftWidth, 10) + parseInt(i.borderRightWidth, 10), t += parseInt(i.borderTopWidth, 10) + parseInt(i.borderBottomWidth, 10))
                }
                return {width: e, height: t}
            }
        }, jD.prototype = {
            constructor: jD, _enterable: !0, update: function () {
            }, show: function (e) {
                this._hideTimeout && clearTimeout(this._hideTimeout), this.el.attr("show", !0), this._show = !0
            }, setContent: function (e, t, i) {
                this.el && this._zr.remove(this.el);
                for (var n = {}, o = e, a = "{marker", r = o.indexOf(a); 0 <= r;) {
                    var s = o.indexOf("|}"), l = o.substr(r + a.length, s - r - a.length);
                    -1 < l.indexOf("sub") ? n["marker" + l] = {
                        textWidth: 4,
                        textHeight: 4,
                        textBorderRadius: 2,
                        textBackgroundColor: t[l],
                        textOffset: [3, 0]
                    } : n["marker" + l] = {
                        textWidth: 10,
                        textHeight: 10,
                        textBorderRadius: 5,
                        textBackgroundColor: t[l]
                    }, r = (o = o.substr(s + 1)).indexOf("{marker")
                }
                this.el = new Ur({
                    style: {
                        rich: n,
                        text: e,
                        textLineHeight: 20,
                        textBackgroundColor: i.get("backgroundColor"),
                        textBorderRadius: i.get("borderRadius"),
                        textFill: i.get("textStyle.color"),
                        textPadding: i.get("padding")
                    }, z: i.get("z")
                }), this._zr.add(this.el);
                var d = this;
                this.el.on("mouseover", function () {
                    d._enterable && (clearTimeout(d._hideTimeout), d._show = !0), d._inContent = !0
                }), this.el.on("mouseout", function () {
                    d._enterable && d._show && d.hideLater(d._hideDelay), d._inContent = !1
                })
            }, setEnterable: function (e) {
                this._enterable = e
            }, getSize: function () {
                var e = this.el.getBoundingRect();
                return [e.width, e.height]
            }, moveTo: function (e, t) {
                this.el && this.el.attr("position", [e, t])
            }, hide: function () {
                this.el && this.el.hide(), this._show = !1
            }, hideLater: function (e) {
                !this._show || this._inContent && this._enterable || (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(O(this.hide, this), e)) : this.hide())
            }, isShow: function () {
                return this._show
            }, getOuterSize: function () {
                var e = this.getSize();
                return {width: e[0], height: e[1]}
            }
        };
        var HD = O, zD = D, XD = xl, qD = new es({shape: {x: -1, y: -1, width: 2, height: 2}});

        function YD(e) {
            for (var t = e.pop(); e.length;) {
                var i = e.pop();
                i && (bl.isInstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = {formatter: i}), t = new bl(i, t, t.ecModel))
            }
            return t
        }

        function JD(e, t) {
            return e.dispatchAction || O(t.dispatchAction, t)
        }

        function ZD(e) {
            return "center" === e || "middle" === e
        }

        wf({
            type: "tooltip", init: function (e, t) {
                if (!o.node) {
                    var i, n = e.getComponent("tooltip"), a = n.get("renderMode");
                    this._renderMode = Xo(a), "html" === this._renderMode ? (i = new WD(t.getDom(), t, {appendToBody: n.get("appendToBody", !0)}), this._newLine = "<br/>") : (i = new jD(t), this._newLine = "\n"), this._tooltipContent = i
                }
            }, render: function (e, t, i) {
                if (!o.node) {
                    this.group.removeAll(), this._tooltipModel = e, this._ecModel = t, this._api = i, this._lastDataByCoordSys = null, this._alwaysShowContent = e.get("alwaysShowContent");
                    var n = this._tooltipContent;
                    n.update(), n.setEnterable(e.get("enterable")), this._initGlobalListener(), this._keepShow()
                }
            }, _initGlobalListener: function () {
                var e = this._tooltipModel.get("triggerOn");
                zI("itemTooltip", this._api, HD(function (t, i, n) {
                    "none" !== e && (0 <= e.indexOf(t) ? this._tryShow(i, n) : "leave" === t && this._hide(n))
                }, this))
            }, _keepShow: function () {
                var e = this._tooltipModel, t = this._ecModel, i = this._api;
                if (null != this._lastX && null != this._lastY && "none" !== e.get("triggerOn")) {
                    var n = this;
                    clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function () {
                        i.isDisposed() || n.manuallyShowTip(e, t, i, {x: n._lastX, y: n._lastY})
                    })
                }
            }, manuallyShowTip: function (e, t, i, n) {
                if (n.from !== this.uid && !o.node) {
                    var a = JD(n, i);
                    this._ticket = "";
                    var r = n.dataByCoordSys;
                    if (n.tooltip && null != n.x && null != n.y) {
                        var s = qD;
                        s.position = [n.x, n.y], s.update(), s.tooltip = n.tooltip, this._tryShow({
                            offsetX: n.x,
                            offsetY: n.y,
                            target: s
                        }, a)
                    } else if (r) this._tryShow({
                        offsetX: n.x,
                        offsetY: n.y,
                        position: n.position,
                        dataByCoordSys: n.dataByCoordSys,
                        tooltipOption: n.tooltipOption
                    }, a); else if (null != n.seriesIndex) {
                        if (this._manuallyAxisShowTip(e, t, i, n)) return;
                        var l = FI(n, t), d = l.point[0], u = l.point[1];
                        null != d && null != u && this._tryShow({
                            offsetX: d,
                            offsetY: u,
                            position: n.position,
                            target: l.el
                        }, a)
                    } else null != n.x && null != n.y && (i.dispatchAction({
                        type: "updateAxisPointer",
                        x: n.x,
                        y: n.y
                    }), this._tryShow({
                        offsetX: n.x,
                        offsetY: n.y,
                        position: n.position,
                        target: i.getZr().findHover(n.x, n.y).target
                    }, a))
                }
            }, manuallyHideTip: function (e, t, i, n) {
                var o = this._tooltipContent;
                !this._alwaysShowContent && this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = null, n.from !== this.uid && this._hide(JD(n, i))
            }, _manuallyAxisShowTip: function (e, t, i, n) {
                var o = n.seriesIndex, a = n.dataIndex, r = t.getComponent("axisPointer").coordSysAxesInfo;
                if (null != o && null != a && null != r) {
                    var s = t.getSeriesByIndex(o);
                    if (s && "axis" === (e = YD([s.getData().getItemModel(a), s, (s.coordinateSystem || {}).model, e])).get("trigger")) return i.dispatchAction({
                        type: "updateAxisPointer",
                        seriesIndex: o,
                        dataIndex: a,
                        position: n.position
                    }), !0
                }
            }, _tryShow: function (e, t) {
                var i = e.target;
                if (this._tooltipModel) {
                    this._lastX = e.offsetX, this._lastY = e.offsetY;
                    var n = e.dataByCoordSys;
                    n && n.length ? this._showAxisTooltip(n, e) : i && null != i.dataIndex ? (this._lastDataByCoordSys = null, this._showSeriesItemTooltip(e, i, t)) : i && i.tooltip ? (this._lastDataByCoordSys = null, this._showComponentItemTooltip(e, i, t)) : (this._lastDataByCoordSys = null, this._hide(t))
                }
            }, _showOrMove: function (e, t) {
                var i = e.get("showDelay");
                t = O(t, this), clearTimeout(this._showTimout), 0 < i ? this._showTimout = setTimeout(t, i) : t()
            }, _showAxisTooltip: function (e, t) {
                var i = this._ecModel, n = this._tooltipModel, o = [t.offsetX, t.offsetY], a = [], r = [],
                    s = YD([t.tooltipOption, n]), l = this._renderMode, d = this._newLine, u = {};
                zD(e, function (e) {
                    zD(e.dataByAxis, function (e) {
                        var t = i.getComponent(e.axisDim + "Axis", e.axisIndex), n = e.value, o = [];
                        if (t && null != n) {
                            var s = sS(n, t.axis, i, e.seriesDataIndices, e.valueLabelOpt);
                            D(e.seriesDataIndices, function (a) {
                                var d = i.getSeriesByIndex(a.seriesIndex), c = a.dataIndexInside,
                                    h = d && d.getDataParams(c);
                                if (h.axisDim = e.axisDim, h.axisIndex = e.axisIndex, h.axisType = e.axisType, h.axisId = e.axisId, h.axisValue = $p(t.axis, n), h.axisValueLabel = s, h) {
                                    r.push(h);
                                    var f, p = d.formatTooltip(c, !0, null, l);
                                    if (R(p)) {
                                        f = p.html;
                                        var g = p.markers;
                                        v(u, g)
                                    } else f = p;
                                    o.push(f)
                                }
                            });
                            var c = s;
                            "html" !== l ? a.push(o.join(d)) : a.push((c ? $l(c) + d : "") + o.join(d))
                        }
                    })
                }, this), a.reverse(), a = a.join(this._newLine + this._newLine);
                var c = t.position;
                this._showOrMove(s, function () {
                    this._updateContentNotChangedOnAxis(e) ? this._updatePosition(s, c, o[0], o[1], this._tooltipContent, r) : this._showTooltipContent(s, a, r, Math.random(), o[0], o[1], c, void 0, u)
                })
            }, _showSeriesItemTooltip: function (e, t, i) {
                var n = this._ecModel, o = t.seriesIndex, a = n.getSeriesByIndex(o), r = t.dataModel || a,
                    s = t.dataIndex, l = t.dataType, d = r.getData(l),
                    u = YD([d.getItemModel(s), r, a && (a.coordinateSystem || {}).model, this._tooltipModel]),
                    c = u.get("trigger");
                if (null == c || "item" === c) {
                    var h, f, p = r.getDataParams(s, l), g = r.formatTooltip(s, !1, l, this._renderMode);
                    f = R(g) ? (h = g.html, g.markers) : (h = g, null);
                    var m = "item_" + r.name + "_" + s;
                    this._showOrMove(u, function () {
                        this._showTooltipContent(u, h, p, m, e.offsetX, e.offsetY, e.position, e.target, f)
                    }), i({
                        type: "showTip",
                        dataIndexInside: s,
                        dataIndex: d.getRawIndex(s),
                        seriesIndex: o,
                        from: this.uid
                    })
                }
            }, _showComponentItemTooltip: function (e, t, i) {
                var n = t.tooltip;
                "string" == typeof n && (n = {content: n, formatter: n});
                var o = new bl(n, this._tooltipModel, this._ecModel), a = o.get("content"), r = Math.random();
                this._showOrMove(o, function () {
                    this._showTooltipContent(o, a, o.get("formatterParams") || {}, r, e.offsetX, e.offsetY, e.position, t)
                }), i({type: "showTip", from: this.uid})
            }, _showTooltipContent: function (e, t, i, n, o, a, r, s, l) {
                if (this._ticket = "", e.get("showContent") && e.get("show")) {
                    var d = this._tooltipContent, u = e.get("formatter");
                    r = r || e.get("position");
                    var c = t;
                    if (u && "string" == typeof u) c = id(u, i, !0); else if ("function" == typeof u) {
                        var h = HD(function (t, n) {
                            t === this._ticket && (d.setContent(n, l, e), this._updatePosition(e, r, o, a, d, i, s))
                        }, this);
                        this._ticket = n, c = u(i, n, h)
                    }
                    d.setContent(c, l, e), d.show(e), this._updatePosition(e, r, o, a, d, i, s)
                }
            }, _updatePosition: function (e, t, i, n, o, a, r) {
                var s = this._api.getWidth(), l = this._api.getHeight();
                t = t || e.get("position");
                var d = o.getSize(), u = e.get("align"), c = e.get("verticalAlign"),
                    h = r && r.getBoundingRect().clone();
                if (r && h.applyTransform(r.transform), "function" == typeof t && (t = t([i, n], a, o.el, h, {
                    viewSize: [s, l],
                    contentSize: d.slice()
                })), M(t)) i = XD(t[0], s), n = XD(t[1], l); else if (R(t)) {
                    t.width = d[0], t.height = d[1];
                    var f = md(t, {width: s, height: l});
                    i = f.x, n = f.y, c = u = null
                } else if ("string" == typeof t && r) i = (p = function (e, t, i) {
                    var n = i[0], o = i[1], a = 0, r = 0, s = t.width, l = t.height;
                    switch (e) {
                        case"inside":
                            a = t.x + s / 2 - n / 2, r = t.y + l / 2 - o / 2;
                            break;
                        case"top":
                            a = t.x + s / 2 - n / 2, r = t.y - o - 5;
                            break;
                        case"bottom":
                            a = t.x + s / 2 - n / 2, r = t.y + l + 5;
                            break;
                        case"left":
                            a = t.x - n - 5, r = t.y + l / 2 - o / 2;
                            break;
                        case"right":
                            a = t.x + s + 5, r = t.y + l / 2 - o / 2
                    }
                    return [a, r]
                }(t, h, d))[0], n = p[1]; else {
                    var p;
                    i = (p = function (e, t, i, n, o, a, r) {
                        var s = i.getOuterSize(), l = s.width, d = s.height;
                        return null != a && (n < e + l + a ? e -= l + a : e += a), null != r && (o < t + d + r ? t -= d + r : t += r), [e, t]
                    }(i, n, o, s, l, u ? null : 20, c ? null : 20))[0], n = p[1]
                }
                u && (i -= ZD(u) ? d[0] / 2 : "right" === u ? d[0] : 0), c && (n -= ZD(c) ? d[1] / 2 : "bottom" === c ? d[1] : 0), e.get("confine") && (i = (p = function (e, t, i, n, o) {
                    var a = i.getOuterSize(), r = a.width, s = a.height;
                    return e = Math.min(e + r, n) - r, t = Math.min(t + s, o) - s, e = Math.max(e, 0), t = Math.max(t, 0), [e, t]
                }(i, n, o, s, l))[0], n = p[1]), o.moveTo(i, n)
            }, _updateContentNotChangedOnAxis: function (e) {
                var t = this._lastDataByCoordSys, i = !!t && t.length === e.length;
                return i && zD(t, function (t, n) {
                    var o = t.dataByAxis || {}, a = (e[n] || {}).dataByAxis || [];
                    (i &= o.length === a.length) && zD(o, function (e, t) {
                        var n = a[t] || {}, o = e.seriesDataIndices || [], r = n.seriesDataIndices || [];
                        (i &= e.value === n.value && e.axisType === n.axisType && e.axisId === n.axisId && o.length === r.length) && zD(o, function (e, t) {
                            var n = r[t];
                            i &= e.seriesIndex === n.seriesIndex && e.dataIndex === n.dataIndex
                        })
                    })
                }), this._lastDataByCoordSys = e, !!i
            }, _hide: function (e) {
                this._lastDataByCoordSys = null, e({type: "hideTip", from: this.uid})
            }, dispose: function (e, t) {
                o.node || (this._tooltipContent.dispose(), YI("itemTooltip", t))
            }
        }), ff({type: "showTip", event: "showTip", update: "tooltip:manuallyShowTip"}, function () {
        }), ff({type: "hideTip", event: "hideTip", update: "tooltip:manuallyHideTip"}, function () {
        });
        var QD = ["rect", "polygon", "keep", "clear"], $D = D;

        function eA(e) {
            if (e) for (var t in e) if (e.hasOwnProperty(t)) return !0
        }

        function tA(e, t, i) {
            var n = {};
            return $D(t, function (t) {
                var o = n[t] = function () {
                    function e() {
                    }

                    return e.prototype.__hidden = e.prototype, new e
                }();
                $D(e[t], function (e, n) {
                    if (ZT.isValidType(n)) {
                        var a = {type: n, visual: e};
                        i && i(a, t), o[n] = new ZT(a), "opacity" === n && ((a = m(a)).type = "colorAlpha", o.__hidden.__alphaForOpacity = new ZT(a))
                    }
                })
            }), n
        }

        function iA(e, t, i) {
            var n;
            D(i, function (e) {
                t.hasOwnProperty(e) && eA(t[e]) && (n = !0)
            }), n && D(i, function (i) {
                t.hasOwnProperty(i) && eA(t[i]) ? e[i] = m(t[i]) : delete e[i]
            })
        }

        var nA = {
            lineX: oA(0), lineY: oA(1), rect: {
                point: function (e, t, i) {
                    return e && i.boundingRect.contain(e[0], e[1])
                }, rect: function (e, t, i) {
                    return e && i.boundingRect.intersect(e)
                }
            }, polygon: {
                point: function (e, t, i) {
                    return e && i.boundingRect.contain(e[0], e[1]) && mg(i.range, e[0], e[1])
                }, rect: function (e, t, i) {
                    var n = i.range;
                    if (!e || n.length <= 1) return !1;
                    var o = e.x, a = e.y, r = e.width, s = e.height, l = n[0];
                    return !!(mg(n, o, a) || mg(n, o + r, a) || mg(n, o, a + s) || mg(n, o + r, a + s) || Di.create(e).contain(l[0], l[1]) || fl(o, a, o + r, a, n) || fl(o, a, o, a + s, n) || fl(o + r, a, o + r, a + s, n) || fl(o, a + s, o + r, a + s, n)) || void 0
                }
            }
        };

        function oA(e) {
            var t = ["x", "y"], i = ["width", "height"];
            return {
                point: function (t, i, n) {
                    if (t) {
                        var o = n.range;
                        return aA(t[e], o)
                    }
                }, rect: function (n, o, a) {
                    if (n) {
                        var r = a.range, s = [n[t[e]], n[t[e]] + n[i[e]]];
                        return s[1] < s[0] && s.reverse(), aA(s[0], r) || aA(s[1], r) || aA(r[0], s) || aA(r[1], s)
                    }
                }
            }
        }

        function aA(e, t) {
            return t[0] <= e && e <= t[1]
        }

        var rA = ["inBrush", "outOfBrush"], sA = "__ecBrushSelect", lA = "__ecInBrushSelectEvent", dA = bh.VISUAL.BRUSH;

        function uA(e) {
            e.eachComponent({mainType: "brush"}, function (t) {
                (t.brushTargetManager = new eD(t.option, e)).setInputRanges(t.areas, e)
            })
        }

        function cA(e, t) {
            if (!e.isDisposed()) {
                var i = e.getZr();
                i[lA] = !0, e.dispatchAction({type: "brushSelect", batch: t}), i[lA] = !1
            }
        }

        function hA(e, t, i, n) {
            for (var o = 0, a = t.length; o < a; o++) {
                var r = t[o];
                if (e[r.brushType](n, i, r.selectors, r)) return !0
            }
        }

        function fA(e) {
            var t = e.brushSelector;
            if (L(t)) {
                var i = [];
                return D(nA, function (e, n) {
                    i[n] = function (i, n, o, a) {
                        var r = n.getItemLayout(i);
                        return e[t](r, o, a)
                    }
                }), i
            }
            if (F(t)) {
                var n = {};
                return D(nA, function (e, i) {
                    n[i] = t
                }), n
            }
            return t
        }

        gf(dA, function (e, t, i) {
            e.eachComponent({mainType: "brush"}, function (e) {
                i && "takeGlobalCursor" === i.type && e.setBrushOption("brush" === i.key ? i.brushOption : {brushType: !1})
            }), uA(e)
        }), mf(dA, function (e, t, i) {
            var n, o, a = [];
            e.eachComponent({mainType: "brush"}, function (t, i) {
                var r = {brushId: t.id, brushIndex: i, brushName: t.name, areas: m(t.areas), selected: []};
                a.push(r);
                var s = t.option, l = s.brushLink, d = [], u = [], c = [], h = 0;
                i || (n = s.throttleType, o = s.throttleDelay);
                var f = A(t.areas, function (e) {
                    return t = w({boundingRect: pA[e.brushType](e)}, e), i = t.selectors = {}, D(nA[t.brushType], function (e, n) {
                        i[n] = function (n) {
                            return e(n, i, t)
                        }
                    }), t;
                    var t, i
                }), p = tA(t.option, rA, function (e) {
                    e.mappingMethod = "fixed"
                });

                function g(e) {
                    return "all" === l || d[e]
                }

                function v(e) {
                    return !!e.length
                }

                M(l) && D(l, function (e) {
                    d[e] = 1
                }), e.eachSeries(function (i, n) {
                    var o = c[n] = [];
                    "parallel" === i.subType ? function (e, t) {
                        var i = e.coordinateSystem;
                        h |= i.hasAxisBrushed(), g(t) && i.eachActiveState(e.getData(), function (e, t) {
                            "active" === e && (u[t] = 1)
                        })
                    }(i, n) : function (i, n, o) {
                        var a = fA(i);
                        if (a && !function (e, t) {
                            var i = e.option.seriesIndex;
                            return null != i && "all" !== i && (M(i) ? b(i, t) < 0 : t !== i)
                        }(t, n) && (D(f, function (n) {
                            a[n.brushType] && t.brushTargetManager.controlSeries(n, i, e) && o.push(n), h |= v(o)
                        }), g(n) && v(o))) {
                            var r = i.getData();
                            r.each(function (e) {
                                hA(a, o, r, e) && (u[e] = 1)
                            })
                        }
                    }(i, n, o)
                }), e.eachSeries(function (e, t) {
                    var i = {seriesId: e.id, seriesIndex: t, seriesName: e.name, dataIndex: []};
                    r.selected.push(i);
                    var n = fA(e), o = c[t], a = e.getData(), s = g(t) ? function (e) {
                        return u[e] ? (i.dataIndex.push(a.getRawIndex(e)), "inBrush") : "outOfBrush"
                    } : function (e) {
                        return hA(n, o, a, e) ? (i.dataIndex.push(a.getRawIndex(e)), "inBrush") : "outOfBrush"
                    };
                    (g(t) ? h : v(o)) && function (e, t, i, n, o, a) {
                        var r, s = {};

                        function l(e) {
                            return i.getItemVisual(r, e)
                        }

                        function d(e, t) {
                            i.setItemVisual(r, e, t)
                        }

                        function u(e, u) {
                            r = null == a ? e : u;
                            var c = i.getRawDataItem(r);
                            if (!c || !1 !== c.visualMap) for (var h = n.call(o, e), f = t[h], p = s[h], g = 0, m = p.length; g < m; g++) {
                                var v = p[g];
                                f[v] && f[v].applyVisual(e, l, d)
                            }
                        }

                        D(e, function (e) {
                            var i = ZT.prepareVisualTypes(t[e]);
                            s[e] = i
                        }), null == a ? i.each(u) : i.each([a], u)
                    }(rA, p, a, s)
                })
            }), function (e, t, i, n, o) {
                if (o) {
                    var a = e.getZr();
                    a[lA] || (a[sA] || (a[sA] = cA), Ic(a, sA, i, t)(e, n))
                }
            }(t, n, o, a, i)
        });
        var pA = {
            lineX: te, lineY: te, rect: function (e) {
                return gA(e.range)
            }, polygon: function (e) {
                for (var t, i = e.range, n = 0, o = i.length; n < o; n++) {
                    t = t || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
                    var a = i[n];
                    a[0] < t[0][0] && (t[0][0] = a[0]), a[0] > t[0][1] && (t[0][1] = a[0]), a[1] < t[1][0] && (t[1][0] = a[1]), a[1] > t[1][1] && (t[1][1] = a[1])
                }
                return t && gA(t)
            }
        };

        function gA(e) {
            return new Di(e[0][0], e[1][0], e[0][1] - e[0][0], e[1][1] - e[1][0])
        }

        var mA = ["#ddd"];

        function vA(e, t) {
            return v({
                brushType: e.brushType,
                brushMode: e.brushMode,
                transformable: e.transformable,
                brushStyle: new bl(e.brushStyle).getItemStyle(),
                removeOnClick: e.removeOnClick,
                z: e.z
            }, t, !0)
        }

        function yA(e, t, i, n) {
            n && n.$from === e.id || this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())
        }

        Tf({
            type: "brush",
            dependencies: ["geo", "grid", "xAxis", "yAxis", "parallel", "series"],
            defaultOption: {
                toolbox: null,
                brushLink: null,
                seriesIndex: "all",
                geoIndex: null,
                xAxisIndex: null,
                yAxisIndex: null,
                brushType: "rect",
                brushMode: "single",
                transformable: !0,
                brushStyle: {borderWidth: 1, color: "rgba(120,140,180,0.3)", borderColor: "rgba(120,140,180,0.8)"},
                throttleType: "fixRate",
                throttleDelay: 0,
                removeOnClick: !0,
                z: 1e4
            },
            areas: [],
            brushType: null,
            brushOption: {},
            coordInfoList: [],
            optionUpdated: function (e, t) {
                var i = this.option;
                t || iA(i, e, ["inBrush", "outOfBrush"]);
                var n = i.inBrush = i.inBrush || {};
                i.outOfBrush = i.outOfBrush || {color: mA}, n.hasOwnProperty("liftZ") || (n.liftZ = 5)
            },
            setAreas: function (e) {
                e && (this.areas = A(e, function (e) {
                    return vA(this.option, e)
                }, this))
            },
            setBrushOption: function (e) {
                this.brushOption = vA(this.option, e), this.brushType = this.brushOption.brushType
            }
        }), wf({
            type: "brush", init: function (e, t) {
                this.ecModel = e, this.api = t, this.model, (this._brushController = new oC(t.getZr())).on("brush", O(this._onBrush, this)).mount()
            }, render: function (e) {
                return this.model = e, yA.apply(this, arguments)
            }, updateTransform: function (e, t) {
                return uA(t), yA.apply(this, arguments)
            }, updateView: yA, dispose: function () {
                this._brushController.dispose()
            }, _onBrush: function (e, t) {
                var i = this.model.id;
                this.model.brushTargetManager.setOutputRanges(e, this.ecModel), t.isEnd && !t.removeOnClick || this.api.dispatchAction({
                    type: "brush",
                    brushId: i,
                    areas: m(e),
                    $from: i
                }), t.isEnd && this.api.dispatchAction({type: "brushEnd", brushId: i, areas: m(e), $from: i})
            }
        }), ff({type: "brush", event: "brush"}, function (e, t) {
            t.eachComponent({mainType: "brush", query: e}, function (t) {
                t.setAreas(e.areas)
            })
        }), ff({type: "brushSelect", event: "brushSelected", update: "none"}, function () {
        }), ff({type: "brushEnd", event: "brushEnd", update: "none"}, function () {
        });
        var TA = Dc.toolbox.brush;

        function wA(e, t, i) {
            this.model = e, this.ecModel = t, this.api = i, this._brushType, this._brushMode
        }

        wA.defaultOption = {
            show: !0, type: ["rect", "polygon", "lineX", "lineY", "keep", "clear"], icon: {
                rect: "M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",
                polygon: "M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",
                lineX: "M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",
                lineY: "M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",
                keep: "M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",
                clear: "M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"
            }, title: m(TA.title)
        };
        var kA = wA.prototype;

        function CA(e) {
            var t = e.itemStyle || (e.itemStyle = {}), i = t.emphasis || (t.emphasis = {}),
                n = e.label || e.label || {}, o = n.normal || (n.normal = {}), a = {normal: 1, emphasis: 1};
            D(n, function (e, t) {
                a[t] || bA(o, t) || (o[t] = e)
            }), i.label && !bA(n, "emphasis") && (n.emphasis = i.label, delete i.label)
        }

        function bA(e, t) {
            return e.hasOwnProperty(t)
        }

        kA.render = kA.updateView = function (e, t, i) {
            var n, o, a;
            t.eachComponent({mainType: "brush"}, function (e) {
                n = e.brushType, o = e.brushOption.brushMode || "single", a |= e.areas.length
            }), this._brushType = n, this._brushMode = o, D(e.get("type", !0), function (t) {
                e.setIconStatus(t, ("keep" === t ? "multiple" === o : "clear" === t ? a : t === n) ? "emphasis" : "normal")
            })
        }, kA.getIcons = function () {
            var e = this.model, t = e.get("icon", !0), i = {};
            return D(e.get("type", !0), function (e) {
                t[e] && (i[e] = t[e])
            }), i
        }, kA.onclick = function (e, t, i) {
            var n = this._brushType, o = this._brushMode;
            "clear" === i ? (t.dispatchAction({type: "axisAreaSelect", intervals: []}), t.dispatchAction({
                type: "brush",
                command: "clear",
                areas: []
            })) : t.dispatchAction({
                type: "takeGlobalCursor",
                key: "brush",
                brushOption: {
                    brushType: "keep" === i ? n : n !== i && i,
                    brushMode: "keep" === i ? "multiple" === o ? "single" : "multiple" : o
                }
            })
        }, E_("brush", wA), cf(function (e, t) {
            var i = e && e.brush;
            if (M(i) || (i = i ? [i] : []), i.length) {
                var n = [];
                D(i, function (e) {
                    var t = e.hasOwnProperty("toolbox") ? e.toolbox : [];
                    t instanceof Array && (n = n.concat(t))
                });
                var o = e && e.toolbox;
                M(o) && (o = o[0]), o || (o = {feature: {}}, e.toolbox = [o]);
                var a = o.feature || (o.feature = {}), r = a.brush || (a.brush = {}), s = r.type || (r.type = []);
                s.push.apply(s, n), function (e) {
                    var t = {};
                    D(e, function (e) {
                        t[e] = 1
                    }), e.length = 0, D(t, function (t, i) {
                        e.push(i)
                    })
                }(s), t && !s.length && s.push.apply(s, QD)
            }
        }), Tf({
            type: "title",
            layoutMode: {type: "box", ignoreSize: !0},
            defaultOption: {
                zlevel: 0,
                z: 6,
                show: !0,
                text: "",
                target: "blank",
                subtext: "",
                subtarget: "blank",
                left: 0,
                top: 0,
                backgroundColor: "rgba(0,0,0,0)",
                borderColor: "#ccc",
                borderWidth: 0,
                padding: 5,
                itemGap: 10,
                textStyle: {fontSize: 18, fontWeight: "bolder", color: "#333"},
                subtextStyle: {color: "#aaa"}
            }
        }), wf({
            type: "title", render: function (e, t, i) {
                if (this.group.removeAll(), e.get("show")) {
                    var n = this.group, o = e.getModel("textStyle"), a = e.getModel("subtextStyle"),
                        r = e.get("textAlign"), s = W(e.get("textBaseline"), e.get("textVerticalAlign")), l = new Ur({
                            style: Zs({}, o, {
                                text: e.get("text"),
                                textFill: o.getTextColor()
                            }, {disableBox: !0}), z2: 10
                        }), d = l.getBoundingRect(), u = e.get("subtext"), c = new Ur({
                            style: Zs({}, a, {
                                text: u,
                                textFill: a.getTextColor(),
                                y: d.height + e.get("itemGap"),
                                textVerticalAlign: "top"
                            }, {disableBox: !0}), z2: 10
                        }), h = e.get("link"), f = e.get("sublink"), p = e.get("triggerEvent", !0);
                    l.silent = !h && !p, c.silent = !f && !p, h && l.on("click", function () {
                        dd(h, "_" + e.get("target"))
                    }), f && c.on("click", function () {
                        dd(h, "_" + e.get("subtarget"))
                    }), l.eventData = c.eventData = p ? {
                        componentType: "title",
                        componentIndex: e.componentIndex
                    } : null, n.add(l), u && n.add(c);
                    var g = n.getBoundingRect(), m = e.getBoxLayoutParams();
                    m.width = g.width, m.height = g.height;
                    var v = md(m, {width: i.getWidth(), height: i.getHeight()}, e.get("padding"));
                    r || ("middle" === (r = e.get("left") || e.get("right")) && (r = "center"), "right" === r ? v.x += v.width : "center" === r && (v.x += v.width / 2)), s || ("center" === (s = e.get("top") || e.get("bottom")) && (s = "middle"), "bottom" === s ? v.y += v.height : "middle" === s && (v.y += v.height / 2), s = s || "top"), n.attr("position", [v.x, v.y]);
                    var y = {textAlign: r, textVerticalAlign: s};
                    l.setStyle(y), c.setStyle(y), g = n.getBoundingRect();
                    var T = v.margin, w = e.getItemStyle(["color", "opacity"]);
                    w.fill = e.get("backgroundColor");
                    var k = new es({
                        shape: {
                            x: g.x - T[3],
                            y: g.y - T[0],
                            width: g.width + T[1] + T[3],
                            height: g.height + T[0] + T[2],
                            r: e.get("borderRadius")
                        }, style: w, subPixelOptimize: !0, silent: !0
                    });
                    n.add(k)
                }
            }
        }), Sd.registerSubTypeDefaulter("timeline", function () {
            return "slider"
        }), ff({type: "timelineChange", event: "timelineChanged", update: "prepareAndUpdate"}, function (e, t) {
            var i = t.getComponent("timeline");
            return i && null != e.currentIndex && (i.setCurrentIndex(e.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.setPlayState(!1)), t.resetOption("timeline"), w({currentIndex: i.option.currentIndex}, e)
        }), ff({type: "timelinePlayChange", event: "timelinePlayChanged", update: "update"}, function (e, t) {
            var i = t.getComponent("timeline");
            i && null != e.playState && i.setPlayState(e.playState)
        });
        var IA = Sd.extend({
            type: "timeline",
            layoutMode: "box",
            defaultOption: {
                zlevel: 0,
                z: 4,
                show: !0,
                axisType: "time",
                realtime: !0,
                left: "20%",
                top: null,
                right: "20%",
                bottom: 0,
                width: null,
                height: 40,
                padding: 5,
                controlPosition: "left",
                autoPlay: !1,
                rewind: !1,
                loop: !0,
                playInterval: 2e3,
                currentIndex: 0,
                itemStyle: {},
                label: {color: "#000"},
                data: []
            },
            init: function (e, t, i) {
                this._data, this._names, this.mergeDefaultAndTheme(e, i), this._initData()
            },
            mergeOption: function (e) {
                IA.superApply(this, "mergeOption", arguments), this._initData()
            },
            setCurrentIndex: function (e) {
                null == e && (e = this.option.currentIndex);
                var t = this._data.count();
                this.option.loop ? e = (e % t + t) % t : (t <= e && (e = t - 1), e < 0 && (e = 0)), this.option.currentIndex = e
            },
            getCurrentIndex: function () {
                return this.option.currentIndex
            },
            isIndexMax: function () {
                return this.getCurrentIndex() >= this._data.count() - 1
            },
            setPlayState: function (e) {
                this.option.autoPlay = !!e
            },
            getPlayState: function () {
                return !!this.option.autoPlay
            },
            _initData: function () {
                var e = this.option, t = e.data || [], i = e.axisType, n = this._names = [];
                if ("category" === i) {
                    var o = [];
                    D(t, function (e, t) {
                        var i, a = Lo(e);
                        R(e) ? (i = m(e)).value = t : i = t, o.push(i), L(a) || null != a && !isNaN(a) || (a = ""), n.push(a + "")
                    }), t = o
                }
                var a = {category: "ordinal", time: "time"}[i] || "number";
                (this._data = new Vf([{name: "value", type: a}], this)).initData(t, n)
            },
            getData: function () {
                return this._data
            },
            getCategories: function () {
                if ("category" === this.get("axisType")) return this._names.slice()
            }
        });

        function SA(e, t, i, n) {
            Ag.call(this, e, t, i), this.type = n || "value", this.model = null
        }

        S(IA.extend({
            type: "timeline.slider", defaultOption: {
                backgroundColor: "rgba(0,0,0,0)",
                borderColor: "#ccc",
                borderWidth: 0,
                orient: "horizontal",
                inverse: !1,
                tooltip: {trigger: "item"},
                symbol: "emptyCircle",
                symbolSize: 10,
                lineStyle: {show: !0, width: 2, color: "#304654"},
                label: {position: "auto", show: !0, interval: "auto", rotate: 0, color: "#304654"},
                itemStyle: {color: "#304654", borderWidth: 1},
                checkpointStyle: {
                    symbol: "circle",
                    symbolSize: 13,
                    color: "#c23531",
                    borderWidth: 5,
                    borderColor: "rgba(194,53,49, 0.5)",
                    animation: !0,
                    animationDuration: 300,
                    animationEasing: "quinticInOut"
                },
                controlStyle: {
                    show: !0,
                    showPlayBtn: !0,
                    showPrevBtn: !0,
                    showNextBtn: !0,
                    itemSize: 22,
                    itemGap: 12,
                    position: "left",
                    playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",
                    stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",
                    nextIcon: "path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",
                    prevIcon: "path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",
                    color: "#304654",
                    borderColor: "#304654",
                    borderWidth: 1
                },
                emphasis: {
                    label: {show: !0, color: "#c23531"},
                    itemStyle: {color: "#c23531"},
                    controlStyle: {color: "#c23531", borderColor: "#c23531", borderWidth: 2}
                },
                data: []
            }
        }), Uu);
        var _A = lc.extend({type: "timeline"});
        SA.prototype = {
            constructor: SA, getLabelModel: function () {
                return this.model.getModel("label")
            }, isHorizontal: function () {
                return "horizontal" === this.model.get("orient")
            }
        }, I(SA, Ag);
        var DA = O, AA = D, NA = Math.PI;

        function xA(e, t, i, n, o, a) {
            var r = t.get("color");
            o ? (o.setColor(r), i.add(o), a && a.onUpdate(o)) : ((o = cg(e.get("symbol"), -1, -1, 2, 2, r)).setStyle("strokeNoScale", !0), i.add(o), a && a.onCreate(o));
            var s = t.getItemStyle(["color", "symbol", "symbolSize"]);
            o.setStyle(s), n = v({rectHover: !0, z2: 100}, n, !0);
            var l = e.get("symbolSize");
            (l = l instanceof Array ? l.slice() : [+l, +l])[0] /= 2, l[1] /= 2, n.scale = l;
            var d = e.get("symbolOffset");
            if (d) {
                var u = n.position = n.position || [0, 0];
                u[0] += xl(d[0], l[0]), u[1] += xl(d[1], l[1])
            }
            var c = e.get("symbolRotate");
            return n.rotation = (c || 0) * Math.PI / 180 || 0, o.attr(n), o.updateTransform(), o
        }

        function EA(e, t, i, n, o) {
            if (!e.dragging) {
                var a = n.getModel("checkpointStyle"), r = i.dataToCoord(n.getData().get(["value"], t));
                o || !a.get("animation", !0) ? e.attr({position: [r, 0]}) : (e.stopAnimation(!0), e.animateTo({position: [r, 0]}, a.get("animationDuration", !0), a.get("animationEasing", !0)))
            }
        }

        _A.extend({
            type: "timeline.slider", init: function (e, t) {
                this.api = t, this._axis, this._viewRect, this._timer, this._currentPointer, this._mainGroup, this._labelGroup
            }, render: function (e, t, i, n) {
                if (this.model = e, this.api = i, this.ecModel = t, this.group.removeAll(), e.get("show", !0)) {
                    var o = this._layout(e, i), a = this._createGroup("mainGroup"), r = this._createGroup("labelGroup"),
                        s = this._axis = this._createAxis(o, e);
                    e.formatTooltip = function (e) {
                        return $l(s.scale.getLabel(e))
                    }, AA(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function (t) {
                        this["_render" + t](o, a, s, e)
                    }, this), this._renderAxisLabel(o, r, s, e), this._position(o, e)
                }
                this._doPlayStop()
            }, remove: function () {
                this._clearTimer(), this.group.removeAll()
            }, dispose: function () {
                this._clearTimer()
            }, _layout: function (e, t) {
                var i = e.get("label.position"), n = e.get("orient"), o = function (e, t) {
                    return md(e.getBoxLayoutParams(), {width: t.getWidth(), height: t.getHeight()}, e.get("padding"))
                }(e, t);
                null == i || "auto" === i ? i = "horizontal" === n ? o.y + o.height / 2 < t.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < t.getWidth() / 2 ? "+" : "-" : isNaN(i) && (i = {
                    horizontal: {
                        top: "-",
                        bottom: "+"
                    }, vertical: {left: "-", right: "+"}
                }[n][i]);
                var a, r, s, l, d = {horizontal: "center", vertical: 0 <= i || "+" === i ? "left" : "right"},
                    u = {horizontal: 0 <= i || "+" === i ? "top" : "bottom", vertical: "middle"},
                    c = {horizontal: 0, vertical: NA / 2}, h = "vertical" === n ? o.height : o.width,
                    f = e.getModel("controlStyle"), p = f.get("show", !0), g = p ? f.get("itemSize") : 0,
                    m = p ? f.get("itemGap") : 0, v = g + m, y = e.get("label.rotate") || 0;
                y = y * NA / 180;
                var T = f.get("position", !0), w = p && f.get("showPlayBtn", !0), k = p && f.get("showPrevBtn", !0),
                    C = p && f.get("showNextBtn", !0), b = 0, I = h;
                return "left" === T || "bottom" === T ? (w && (a = [0, 0], b += v), k && (r = [b, 0], b += v)) : (w && (a = [I - g, 0], I -= v), k && (r = [0, 0], b += v)), C && (s = [I - g, 0], I -= v), l = [b, I], e.get("inverse") && l.reverse(), {
                    viewRect: o,
                    mainLength: h,
                    orient: n,
                    rotation: c[n],
                    labelRotation: y,
                    labelPosOpt: i,
                    labelAlign: e.get("label.align") || d[n],
                    labelBaseline: e.get("label.verticalAlign") || e.get("label.baseline") || u[n],
                    playPosition: a,
                    prevBtnPosition: r,
                    nextBtnPosition: s,
                    axisExtent: l,
                    controlSize: g,
                    controlGap: m
                }
            }, _position: function (e, t) {
                var i = this._mainGroup, n = this._labelGroup, o = e.viewRect;
                if ("vertical" === e.orient) {
                    var a = at(), r = o.x, s = o.y + o.height;
                    dt(a, a, [-r, -s]), ut(a, a, -NA / 2), dt(a, a, [r, s]), (o = o.clone()).applyTransform(a)
                }
                var l = m(o), d = m(i.getBoundingRect()), u = m(n.getBoundingRect()), c = i.position, h = n.position;
                h[0] = c[0] = l[0][0];
                var f, p = e.labelPosOpt;

                function g(e) {
                    var t = e.position;
                    e.origin = [l[0][0] - t[0], l[1][0] - t[1]]
                }

                function m(e) {
                    return [[e.x, e.x + e.width], [e.y, e.y + e.height]]
                }

                function v(e, t, i, n, o) {
                    e[n] += i[n][o] - t[n][o]
                }

                isNaN(p) ? (v(c, d, l, 1, f = "+" === p ? 0 : 1), v(h, u, l, 1, 1 - f)) : (v(c, d, l, 1, f = 0 <= p ? 0 : 1), h[1] = c[1] + p), i.attr("position", c), n.attr("position", h), i.rotation = n.rotation = e.rotation, g(i), g(n)
            }, _createAxis: function (e, t) {
                var i = t.getData(), n = t.get("axisType"), o = Zp(t, n);
                o.getTicks = function () {
                    return i.mapArray(["value"], function (e) {
                        return e
                    })
                };
                var a = i.getDataExtent("value");
                o.setExtent(a[0], a[1]), o.niceTicks();
                var r = new SA("value", o, e.axisExtent, n);
                return r.model = t, r
            }, _createGroup: function (e) {
                var t = this["_" + e] = new Ai;
                return this.group.add(t), t
            }, _renderAxisLine: function (e, t, i, n) {
                var o = i.getExtent();
                n.get("lineStyle.show") && t.add(new is({
                    shape: {x1: o[0], y1: 0, x2: o[1], y2: 0},
                    style: T({lineCap: "round"}, n.getModel("lineStyle").getLineStyle()),
                    silent: !0,
                    z2: 1
                }))
            }, _renderAxisTick: function (e, t, i, n) {
                var o = n.getData(), a = i.scale.getTicks();
                AA(a, function (e) {
                    var a = i.dataToCoord(e), r = o.getItemModel(e), s = r.getModel("itemStyle"),
                        l = r.getModel("emphasis.itemStyle"),
                        d = {position: [a, 0], onclick: DA(this._changeTimeline, this, e)}, u = xA(r, s, t, d);
                    Hs(u, l.getItemStyle()), r.get("tooltip") ? (u.dataIndex = e, u.dataModel = n) : u.dataIndex = u.dataModel = null
                }, this)
            }, _renderAxisLabel: function (e, t, i, n) {
                if (i.getLabelModel().get("show")) {
                    var o = n.getData(), a = i.getViewLabels();
                    AA(a, function (n) {
                        var a = n.tickValue, r = o.getItemModel(a), s = r.getModel("label"),
                            l = r.getModel("emphasis.label"), d = i.dataToCoord(n.tickValue), u = new Ur({
                                position: [d, 0],
                                rotation: e.labelRotation - e.rotation,
                                onclick: DA(this._changeTimeline, this, a),
                                silent: !1
                            });
                        Zs(u.style, s, {
                            text: n.formattedLabel,
                            textAlign: e.labelAlign,
                            textVerticalAlign: e.labelBaseline
                        }), t.add(u), Hs(u, Zs({}, l))
                    }, this)
                }
            }, _renderControl: function (e, t, i, n) {
                var o = e.controlSize, a = e.rotation, r = n.getModel("controlStyle").getItemStyle(),
                    s = n.getModel("emphasis.controlStyle").getItemStyle(), l = [0, -o / 2, o, o], d = n.getPlayState(),
                    u = n.get("inverse", !0);

                function c(e, i, d, u) {
                    if (e) {
                        var c = function (e, t, i, n) {
                            return _s(e.get(t).replace(/^path:\/\//, ""), m(n || {}), new Di(i[0], i[1], i[2], i[3]), "center")
                        }(n, i, l, {
                            position: e,
                            origin: [o / 2, 0],
                            rotation: u ? -a : 0,
                            rectHover: !0,
                            style: r,
                            onclick: d
                        });
                        t.add(c), Hs(c, s)
                    }
                }

                c(e.nextBtnPosition, "controlStyle.nextIcon", DA(this._changeTimeline, this, u ? "-" : "+")), c(e.prevBtnPosition, "controlStyle.prevIcon", DA(this._changeTimeline, this, u ? "+" : "-")), c(e.playPosition, "controlStyle." + (d ? "stopIcon" : "playIcon"), DA(this._handlePlayClick, this, !d), !0)
            }, _renderCurrentPointer: function (e, t, i, n) {
                var o = n.getData(), a = n.getCurrentIndex(), r = o.getItemModel(a).getModel("checkpointStyle"),
                    s = this, l = {
                        onCreate: function (e) {
                            e.draggable = !0, e.drift = DA(s._handlePointerDrag, s), e.ondragend = DA(s._handlePointerDragend, s), EA(e, a, i, n, !0)
                        }, onUpdate: function (e) {
                            EA(e, a, i, n)
                        }
                    };
                this._currentPointer = xA(r, r, this._mainGroup, {}, this._currentPointer, l)
            }, _handlePlayClick: function (e) {
                this._clearTimer(), this.api.dispatchAction({type: "timelinePlayChange", playState: e, from: this.uid})
            }, _handlePointerDrag: function (e, t, i) {
                this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY])
            }, _handlePointerDragend: function (e) {
                this._pointerChangeTimeline([e.offsetX, e.offsetY], !0)
            }, _pointerChangeTimeline: function (e, t) {
                var i = this._toAxisCoord(e)[0], n = Ol(this._axis.getExtent().slice());
                i > n[1] && (i = n[1]), i < n[0] && (i = n[0]), this._currentPointer.position[0] = i, this._currentPointer.dirty();
                var o = this._findNearestTick(i), a = this.model;
                (t || o !== a.getCurrentIndex() && a.get("realtime")) && this._changeTimeline(o)
            }, _doPlayStop: function () {
                this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(DA(function () {
                    var e = this.model;
                    this._changeTimeline(e.getCurrentIndex() + (e.get("rewind", !0) ? -1 : 1))
                }, this), this.model.get("playInterval")))
            }, _toAxisCoord: function (e) {
                return ll(e, this._mainGroup.getLocalTransform(), !0)
            }, _findNearestTick: function (e) {
                var t, i = this.model.getData(), n = 1 / 0, o = this._axis;
                return i.each(["value"], function (i, a) {
                    var r = o.dataToCoord(i), s = Math.abs(r - e);
                    s < n && (n = s, t = a)
                }), t
            }, _clearTimer: function () {
                this._timer && (clearTimeout(this._timer), this._timer = null)
            }, _changeTimeline: function (e) {
                var t = this.model.getCurrentIndex();
                "+" === e ? e = t + 1 : "-" === e && (e = t - 1), this.api.dispatchAction({
                    type: "timelineChange",
                    currentIndex: e,
                    from: this.uid
                })
            }
        }), cf(function (e) {
            var t = e && e.timeline;
            M(t) || (t = t ? [t] : []), D(t, function (e) {
                e && function (e) {
                    var t = e.type, i = {number: "value", time: "time"};
                    if (i[t] && (e.axisType = i[t], delete e.type), CA(e), bA(e, "controlPosition")) {
                        var n = e.controlStyle || (e.controlStyle = {});
                        bA(n, "position") || (n.position = e.controlPosition), "none" !== n.position || bA(n, "show") || (n.show = !1, delete n.position), delete e.controlPosition
                    }
                    D(e.data || [], function (e) {
                        R(e) && !M(e) && (!bA(e, "value") && bA(e, "name") && (e.value = e.name), CA(e))
                    })
                }(e)
            })
        });
        var OA = ql, PA = $l;

        function MA(e) {
            Mo(e, "label", ["show"])
        }

        var FA = Tf({
            type: "marker", dependencies: ["series", "grid", "polar", "geo"], init: function (e, t, i) {
                this.mergeDefaultAndTheme(e, i), this._mergeOption(e, i, !1, !0)
            }, isAnimationEnabled: function () {
                if (o.node) return !1;
                var e = this.__hostSeries;
                return this.getShallow("animation") && e && e.isAnimationEnabled()
            }, mergeOption: function (e, t) {
                this._mergeOption(e, t, !1, !1)
            }, _mergeOption: function (e, t, i, n) {
                var o = this.constructor, a = this.mainType + "Model";
                i || t.eachSeries(function (e) {
                    var i = e.get(this.mainType, !0), r = e[a];
                    i && i.data ? (r ? r._mergeOption(i, t, !0) : (n && MA(i), D(i.data, function (e) {
                        e instanceof Array ? (MA(e[0]), MA(e[1])) : MA(e)
                    }), T(r = new o(i, this, t), {
                        mainType: this.mainType,
                        seriesIndex: e.seriesIndex,
                        name: e.name,
                        createdBySelf: !0
                    }), r.__hostSeries = e), e[a] = r) : e[a] = null
                }, this)
            }, formatTooltip: function (e) {
                var t = this.getData(), i = this.getRawValue(e), n = M(i) ? A(i, OA).join(", ") : OA(i),
                    o = t.getName(e), a = PA(this.name);
                return null == i && !o || (a += "<br />"), o && (a += PA(o), null != i && (a += " : ")), null != i && (a += PA(n)), a
            }, getData: function () {
                return this._data
            }, setData: function (e) {
                this._data = e
            }
        });
        S(FA, Uu), FA.extend({
            type: "markPoint",
            defaultOption: {
                zlevel: 0,
                z: 5,
                symbol: "pin",
                symbolSize: 50,
                tooltip: {trigger: "item"},
                label: {show: !0, position: "inside"},
                itemStyle: {borderWidth: 2},
                emphasis: {label: {show: !0}}
            }
        });
        var LA = b;

        function RA(e, t, i, n, o, a) {
            var r = [], s = op(t, n) ? t.getCalculationInfo("stackResultDimension") : n, l = jA(t, s, e),
                d = t.indicesOfNearest(s, l)[0];
            r[o] = t.get(i, d), r[a] = t.get(s, d);
            var u = t.get(n, d), c = Pl(t.get(n, d));
            return 0 <= (c = Math.min(c, 20)) && (r[a] = +r[a].toFixed(c)), [r, u]
        }

        var BA = P, UA = {min: BA(RA, "min"), max: BA(RA, "max"), average: BA(RA, "average")};

        function VA(e, t) {
            var i = e.getData(), n = e.coordinateSystem;
            if (t && !function (e) {
                return !isNaN(parseFloat(e.x)) && !isNaN(parseFloat(e.y))
            }(t) && !M(t.coord) && n) {
                var o = n.dimensions, a = KA(t, i, n, e);
                if ((t = m(t)).type && UA[t.type] && a.baseAxis && a.valueAxis) {
                    var r = LA(o, a.baseAxis.dim), s = LA(o, a.valueAxis.dim),
                        l = UA[t.type](i, a.baseDataDim, a.valueDataDim, r, s);
                    t.coord = l[0], t.value = l[1]
                } else {
                    for (var d = [null != t.xAxis ? t.xAxis : t.radiusAxis, null != t.yAxis ? t.yAxis : t.angleAxis], u = 0; u < 2; u++) UA[d[u]] && (d[u] = jA(i, i.mapDimension(o[u]), d[u]));
                    t.coord = d
                }
            }
            return t
        }

        function KA(e, t, i, n) {
            var o = {};
            return null != e.valueIndex || null != e.valueDim ? (o.valueDataDim = null != e.valueIndex ? t.getDimension(e.valueIndex) : e.valueDim, o.valueAxis = i.getAxis(function (e, t) {
                var i = e.getData(), n = i.dimensions;
                t = i.getDimension(t);
                for (var o = 0; o < n.length; o++) {
                    var a = i.getDimensionInfo(n[o]);
                    if (a.name === t) return a.coordDim
                }
            }(n, o.valueDataDim)), o.baseAxis = i.getOtherAxis(o.valueAxis), o.baseDataDim = t.mapDimension(o.baseAxis.dim)) : (o.baseAxis = n.getBaseAxis(), o.valueAxis = i.getOtherAxis(o.baseAxis), o.baseDataDim = t.mapDimension(o.baseAxis.dim), o.valueDataDim = t.mapDimension(o.valueAxis.dim)), o
        }

        function GA(e, t) {
            return !(e && e.containData && t.coord && !function (e) {
                return !(isNaN(parseFloat(e.x)) && isNaN(parseFloat(e.y)))
            }(t)) || e.containData(t.coord)
        }

        function WA(e, t, i, n) {
            return n < 2 ? e.coord && e.coord[n] : e.value
        }

        function jA(e, t, i) {
            if ("average" !== i) return "median" === i ? e.getMedian(t) : e.getDataExtent(t, !0)["max" === i ? 1 : 0];
            var n = 0, o = 0;
            return e.each(t, function (e, t) {
                isNaN(e) || (n += e, o++)
            }), n / o
        }

        var HA = wf({
            type: "marker", init: function () {
                this.markerGroupMap = $()
            }, render: function (e, t, i) {
                var n = this.markerGroupMap;
                n.each(function (e) {
                    e.__keep = !1
                });
                var o = this.type + "Model";
                t.eachSeries(function (e) {
                    var n = e[o];
                    n && this.renderSeries(e, n, t, i)
                }, this), n.each(function (e) {
                    e.__keep || this.group.remove(e.group)
                }, this)
            }, renderSeries: function () {
            }
        });

        function zA(e, t, i) {
            var n = t.coordinateSystem;
            e.each(function (o) {
                var a, r = e.getItemModel(o), s = xl(r.get("x"), i.getWidth()), l = xl(r.get("y"), i.getHeight());
                if (isNaN(s) || isNaN(l)) {
                    if (t.getMarkerPosition) a = t.getMarkerPosition(e.getValues(e.dimensions, o)); else if (n) {
                        var d = e.get(n.dimensions[0], o), u = e.get(n.dimensions[1], o);
                        a = n.dataToPoint([d, u])
                    }
                } else a = [s, l];
                isNaN(s) || (a[0] = s), isNaN(l) || (a[1] = l), e.setItemLayout(o, a)
            })
        }

        function XA(e, t, i, n) {
            var o = e.getData(), a = n.type;
            if (!M(n) && ("min" === a || "max" === a || "average" === a || "median" === a || null != n.xAxis || null != n.yAxis)) {
                var r, s;
                if (null != n.yAxis || null != n.xAxis) r = t.getAxis(null != n.yAxis ? "y" : "x"), s = G(n.yAxis, n.xAxis); else {
                    var l = KA(n, o, t, e);
                    r = l.valueAxis, s = jA(o, ap(o, l.valueDataDim), a)
                }
                var d = "x" === r.dim ? 0 : 1, u = 1 - d, c = m(n), h = {};
                c.type = null, c.coord = [], h.coord = [], c.coord[u] = -1 / 0, h.coord[u] = 1 / 0;
                var f = i.get("precision");
                0 <= f && "number" == typeof s && (s = +s.toFixed(Math.min(f, 20))), c.coord[d] = h.coord[d] = s, n = [c, h, {
                    type: a,
                    valueIndex: n.valueIndex,
                    value: s
                }]
            }
            return (n = [VA(e, n[0]), VA(e, n[1]), T({}, n[2])])[2].type = n[2].type || "", v(n[2], n[0]), v(n[2], n[1]), n
        }

        function qA(e) {
            return !isNaN(e) && !isFinite(e)
        }

        function YA(e, t, i, n) {
            var o = 1 - e, a = n.dimensions[e];
            return qA(t[o]) && qA(i[o]) && t[e] === i[e] && n.getAxis(a).containData(t[e])
        }

        function JA(e, t) {
            if ("cartesian2d" === e.type) {
                var i = t[0].coord, n = t[1].coord;
                if (i && n && (YA(1, i, n, e) || YA(0, i, n, e))) return !0
            }
            return GA(e, t[0]) && GA(e, t[1])
        }

        function ZA(e, t, i, n, o) {
            var a, r = n.coordinateSystem, s = e.getItemModel(t), l = xl(s.get("x"), o.getWidth()),
                d = xl(s.get("y"), o.getHeight());
            if (isNaN(l) || isNaN(d)) {
                if (n.getMarkerPosition) a = n.getMarkerPosition(e.getValues(e.dimensions, t)); else {
                    var u = r.dimensions, c = e.get(u[0], t), h = e.get(u[1], t);
                    a = r.dataToPoint([c, h])
                }
                if ("cartesian2d" === r.type) {
                    var f = r.getAxis("x"), p = r.getAxis("y");
                    u = r.dimensions, qA(e.get(u[0], t)) ? a[0] = f.toGlobalCoord(f.getExtent()[i ? 0 : 1]) : qA(e.get(u[1], t)) && (a[1] = p.toGlobalCoord(p.getExtent()[i ? 0 : 1]))
                }
                isNaN(l) || (a[0] = l), isNaN(d) || (a[1] = d)
            } else a = [l, d];
            e.setItemLayout(t, a)
        }

        function QA(e, t, i, n) {
            var o = VA(e, n[0]), a = VA(e, n[1]), r = G, s = o.coord, l = a.coord;
            s[0] = r(s[0], -1 / 0), s[1] = r(s[1], -1 / 0), l[0] = r(l[0], 1 / 0), l[1] = r(l[1], 1 / 0);
            var d = y([{}, o, a]);
            return d.coord = [o.coord, a.coord], d.x0 = o.x, d.y0 = o.y, d.x1 = a.x, d.y1 = a.y, d
        }

        function $A(e) {
            return !isNaN(e) && !isFinite(e)
        }

        function eN(e, t, i) {
            var n = 1 - e;
            return $A(t[n]) && $A(i[n])
        }

        function tN(e, t) {
            var i = t.coord[0], n = t.coord[1];
            return !("cartesian2d" !== e.type || !i || !n || !eN(1, i, n) && !eN(0, i, n)) || GA(e, {
                coord: i,
                x: t.x0,
                y: t.y0
            }) || GA(e, {coord: n, x: t.x1, y: t.y1})
        }

        function iN(e, t, i, n, o) {
            var a, r = n.coordinateSystem, s = e.getItemModel(t), l = xl(s.get(i[0]), o.getWidth()),
                d = xl(s.get(i[1]), o.getHeight());
            if (isNaN(l) || isNaN(d)) {
                if (n.getMarkerPosition) a = n.getMarkerPosition(e.getValues(i, t)); else {
                    var u = [f = e.get(i[0], t), p = e.get(i[1], t)];
                    r.clampData && r.clampData(u, u), a = r.dataToPoint(u, !0)
                }
                if ("cartesian2d" === r.type) {
                    var c = r.getAxis("x"), h = r.getAxis("y"), f = e.get(i[0], t), p = e.get(i[1], t);
                    $A(f) ? a[0] = c.toGlobalCoord(c.getExtent()["x0" === i[0] ? 0 : 1]) : $A(p) && (a[1] = h.toGlobalCoord(h.getExtent()["y0" === i[1] ? 0 : 1]))
                }
                isNaN(l) || (a[0] = l), isNaN(d) || (a[1] = d)
            } else a = [l, d];
            return a
        }

        HA.extend({
            type: "markPoint", updateTransform: function (e, t, i) {
                t.eachSeries(function (e) {
                    var t = e.markPointModel;
                    t && (zA(t.getData(), e, i), this.markerGroupMap.get(e.id).updateLayout(t))
                }, this)
            }, renderSeries: function (e, t, i, n) {
                var o = e.coordinateSystem, a = e.id, r = e.getData(), s = this.markerGroupMap,
                    l = s.get(a) || s.set(a, new jg), d = function (e, t, i) {
                        var n;
                        n = e ? A(e && e.dimensions, function (e) {
                            return w({name: e}, t.getData().getDimensionInfo(t.getData().mapDimension(e)) || {})
                        }) : [{name: "value", type: "float"}];
                        var o = new Vf(n, i), a = A(i.get("data"), P(VA, t));
                        return e && (a = x(a, P(GA, e))), o.initData(a, null, e ? WA : function (e) {
                            return e.value
                        }), o
                    }(o, e, t);
                t.setData(d), zA(t.getData(), e, n), d.each(function (e) {
                    var i = d.getItemModel(e), n = i.getShallow("symbol"), o = i.getShallow("symbolSize"), a = F(n),
                        s = F(o);
                    if (a || s) {
                        var l = t.getRawValue(e), u = t.getDataParams(e);
                        a && (n = n(l, u)), s && (o = o(l, u))
                    }
                    d.setItemVisual(e, {
                        symbol: n,
                        symbolSize: o,
                        color: i.get("itemStyle.color") || r.getVisual("color")
                    })
                }), l.updateData(d), this.group.add(l.group), d.eachItemGraphicEl(function (e) {
                    e.traverse(function (e) {
                        e.dataModel = t
                    })
                }), l.__keep = !0, l.group.silent = t.get("silent") || e.get("silent")
            }
        }), cf(function (e) {
            e.markPoint = e.markPoint || {}
        }), FA.extend({
            type: "markLine",
            defaultOption: {
                zlevel: 0,
                z: 5,
                symbol: ["circle", "arrow"],
                symbolSize: [8, 16],
                precision: 2,
                tooltip: {trigger: "item"},
                label: {show: !0, position: "end", distance: 5},
                lineStyle: {type: "dashed"},
                emphasis: {label: {show: !0}, lineStyle: {width: 3}},
                animationEasing: "linear"
            }
        }), HA.extend({
            type: "markLine", updateTransform: function (e, t, i) {
                t.eachSeries(function (e) {
                    var t = e.markLineModel;
                    if (t) {
                        var n = t.getData(), o = t.__from, a = t.__to;
                        o.each(function (t) {
                            ZA(o, t, !0, e, i), ZA(a, t, !1, e, i)
                        }), n.each(function (e) {
                            n.setItemLayout(e, [o.getItemLayout(e), a.getItemLayout(e)])
                        }), this.markerGroupMap.get(e.id).updateLayout()
                    }
                }, this)
            }, renderSeries: function (e, t, i, n) {
                var o = e.coordinateSystem, a = e.id, r = e.getData(), s = this.markerGroupMap,
                    l = s.get(a) || s.set(a, new Xw);
                this.group.add(l.group);
                var d = function (e, t, i) {
                    var n;
                    n = e ? A(e && e.dimensions, function (e) {
                        return w({name: e}, t.getData().getDimensionInfo(t.getData().mapDimension(e)) || {})
                    }) : [{name: "value", type: "float"}];
                    var o = new Vf(n, i), a = new Vf(n, i), r = new Vf([], i), s = A(i.get("data"), P(XA, t, e, i));
                    e && (s = x(s, P(JA, e)));
                    var l = e ? WA : function (e) {
                        return e.value
                    };
                    return o.initData(A(s, function (e) {
                        return e[0]
                    }), null, l), a.initData(A(s, function (e) {
                        return e[1]
                    }), null, l), r.initData(A(s, function (e) {
                        return e[2]
                    })), r.hasItemOption = !0, {from: o, to: a, line: r}
                }(o, e, t), u = d.from, c = d.to, h = d.line;
                t.__from = u, t.__to = c, t.setData(h);
                var f = t.get("symbol"), p = t.get("symbolSize");

                function g(t, i, o) {
                    var a = t.getItemModel(i);
                    ZA(t, i, o, e, n), t.setItemVisual(i, {
                        symbolSize: a.get("symbolSize") || p[o ? 0 : 1],
                        symbol: a.get("symbol", !0) || f[o ? 0 : 1],
                        color: a.get("itemStyle.color") || r.getVisual("color")
                    })
                }

                M(f) || (f = [f, f]), "number" == typeof p && (p = [p, p]), d.from.each(function (e) {
                    g(u, e, !0), g(c, e, !1)
                }), h.each(function (e) {
                    var t = h.getItemModel(e).get("lineStyle.color");
                    h.setItemVisual(e, {color: t || u.getItemVisual(e, "color")}), h.setItemLayout(e, [u.getItemLayout(e), c.getItemLayout(e)]), h.setItemVisual(e, {
                        fromSymbolSize: u.getItemVisual(e, "symbolSize"),
                        fromSymbol: u.getItemVisual(e, "symbol"),
                        toSymbolSize: c.getItemVisual(e, "symbolSize"),
                        toSymbol: c.getItemVisual(e, "symbol")
                    })
                }), l.updateData(h), d.line.eachItemGraphicEl(function (e, i) {
                    e.traverse(function (e) {
                        e.dataModel = t
                    })
                }), l.__keep = !0, l.group.silent = t.get("silent") || e.get("silent")
            }
        }), cf(function (e) {
            e.markLine = e.markLine || {}
        }), FA.extend({
            type: "markArea",
            defaultOption: {
                zlevel: 0,
                z: 1,
                tooltip: {trigger: "item"},
                animation: !1,
                label: {show: !0, position: "top"},
                itemStyle: {borderWidth: 0},
                emphasis: {label: {show: !0, position: "top"}}
            }
        });
        var nN = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]];
        HA.extend({
            type: "markArea", updateTransform: function (e, t, i) {
                t.eachSeries(function (e) {
                    var t = e.markAreaModel;
                    if (t) {
                        var n = t.getData();
                        n.each(function (t) {
                            var o = A(nN, function (o) {
                                return iN(n, t, o, e, i)
                            });
                            n.setItemLayout(t, o), n.getItemGraphicEl(t).setShape("points", o)
                        })
                    }
                }, this)
            }, renderSeries: function (e, t, i, n) {
                var o = e.coordinateSystem, a = e.id, r = e.getData(), s = this.markerGroupMap,
                    l = s.get(a) || s.set(a, {group: new Ai});
                this.group.add(l.group), l.__keep = !0;
                var d = function (e, t, i) {
                    var n, o;
                    o = e ? (n = A(e && e.dimensions, function (e) {
                        var i = t.getData();
                        return w({name: e}, i.getDimensionInfo(i.mapDimension(e)) || {})
                    }), new Vf(A(["x0", "y0", "x1", "y1"], function (e, t) {
                        return {name: e, type: n[t % 2].type}
                    }), i)) : new Vf(n = [{name: "value", type: "float"}], i);
                    var a = A(i.get("data"), P(QA, t, e, i));
                    e && (a = x(a, P(tN, e)));
                    var r = e ? function (e, t, i, n) {
                        return e.coord[Math.floor(n / 2)][n % 2]
                    } : function (e) {
                        return e.value
                    };
                    return o.initData(a, null, r), o.hasItemOption = !0, o
                }(o, e, t);
                t.setData(d), d.each(function (t) {
                    d.setItemLayout(t, A(nN, function (i) {
                        return iN(d, t, i, e, n)
                    })), d.setItemVisual(t, {color: r.getVisual("color")})
                }), d.diff(l.__data).add(function (e) {
                    var t = new Xr({shape: {points: d.getItemLayout(e)}});
                    d.setItemGraphicEl(e, t), l.group.add(t)
                }).update(function (e, i) {
                    var n = l.__data.getItemGraphicEl(i);
                    al(n, {shape: {points: d.getItemLayout(e)}}, t, e), l.group.add(n), d.setItemGraphicEl(e, n)
                }).remove(function (e) {
                    var t = l.__data.getItemGraphicEl(e);
                    l.group.remove(t)
                }).execute(), d.eachItemGraphicEl(function (e, i) {
                    var n = d.getItemModel(i), o = n.getModel("label"), a = n.getModel("emphasis.label"),
                        r = d.getItemVisual(i, "color");
                    e.useStyle(w(n.getModel("itemStyle").getItemStyle(), {
                        fill: Jt(r, .4),
                        stroke: r
                    })), e.hoverStyle = n.getModel("emphasis.itemStyle").getItemStyle(), Ys(e.style, e.hoverStyle, o, a, {
                        labelFetcher: t,
                        labelDataIndex: i,
                        defaultText: d.getName(i) || "",
                        isRectText: !0,
                        autoColor: r
                    }), Hs(e, {}), e.dataModel = t
                }), l.__data = d, l.group.silent = t.get("silent") || e.get("silent")
            }
        }), cf(function (e) {
            e.markArea = e.markArea || {}
        });
        var oN = Dc.legend.selector,
            aN = {all: {type: "all", title: m(oN.all)}, inverse: {type: "inverse", title: m(oN.inverse)}}, rN = Tf({
                type: "legend.plain",
                dependencies: ["series"],
                layoutMode: {type: "box", ignoreSize: !0},
                init: function (e, t, i) {
                    this.mergeDefaultAndTheme(e, i), e.selected = e.selected || {}, this._updateSelector(e)
                },
                mergeOption: function (e) {
                    rN.superCall(this, "mergeOption", e), this._updateSelector(e)
                },
                _updateSelector: function (e) {
                    var t = e.selector;
                    !0 === t && (t = e.selector = ["all", "inverse"]), M(t) && D(t, function (e, i) {
                        L(e) && (e = {type: e}), t[i] = v(e, aN[e.type])
                    })
                },
                optionUpdated: function () {
                    this._updateData(this.ecModel);
                    var e = this._data;
                    if (e[0] && "single" === this.get("selectedMode")) {
                        for (var t = !1, i = 0; i < e.length; i++) {
                            var n = e[i].get("name");
                            if (this.isSelected(n)) {
                                this.select(n), t = !0;
                                break
                            }
                        }
                        t || this.select(e[0].get("name"))
                    }
                },
                _updateData: function (e) {
                    var t = [], i = [];
                    e.eachRawSeries(function (n) {
                        var o, a = n.name;
                        if (i.push(a), n.legendVisualProvider) {
                            var r = n.legendVisualProvider.getAllNames();
                            e.isSeriesFiltered(n) || (i = i.concat(r)), r.length ? t = t.concat(r) : o = !0
                        } else o = !0;
                        o && Uo(n) && t.push(n.name)
                    }), this._availableNames = i;
                    var n = A(this.get("data") || t, function (e) {
                        return "string" != typeof e && "number" != typeof e || (e = {name: e}), new bl(e, this, this.ecModel)
                    }, this);
                    this._data = n
                },
                getData: function () {
                    return this._data
                },
                select: function (e) {
                    var t = this.option.selected;
                    "single" === this.get("selectedMode") && D(this._data, function (e) {
                        t[e.get("name")] = !1
                    }), t[e] = !0
                },
                unSelect: function (e) {
                    "single" !== this.get("selectedMode") && (this.option.selected[e] = !1)
                },
                toggleSelected: function (e) {
                    var t = this.option.selected;
                    t.hasOwnProperty(e) || (t[e] = !0), this[t[e] ? "unSelect" : "select"](e)
                },
                allSelect: function () {
                    var e = this._data, t = this.option.selected;
                    D(e, function (e) {
                        t[e.get("name", !0)] = !0
                    })
                },
                inverseSelect: function () {
                    var e = this._data, t = this.option.selected;
                    D(e, function (e) {
                        var i = e.get("name", !0);
                        t.hasOwnProperty(i) || (t[i] = !0), t[i] = !t[i]
                    })
                },
                isSelected: function (e) {
                    var t = this.option.selected;
                    return !(t.hasOwnProperty(e) && !t[e]) && 0 <= b(this._availableNames, e)
                },
                getOrient: function () {
                    return "vertical" === this.get("orient") ? {index: 1, name: "vertical"} : {index: 0, name: "horizontal"}
                },
                defaultOption: {
                    zlevel: 0,
                    z: 4,
                    show: !0,
                    orient: "horizontal",
                    left: "center",
                    top: 0,
                    align: "auto",
                    backgroundColor: "rgba(0,0,0,0)",
                    borderColor: "#ccc",
                    borderRadius: 0,
                    borderWidth: 0,
                    padding: 5,
                    itemGap: 10,
                    itemWidth: 25,
                    itemHeight: 14,
                    inactiveColor: "#ccc",
                    inactiveBorderColor: "#ccc",
                    itemStyle: {borderWidth: 0},
                    textStyle: {color: "#333"},
                    selectedMode: !0,
                    selector: !1,
                    selectorLabel: {
                        show: !0,
                        borderRadius: 10,
                        padding: [3, 5, 3, 5],
                        fontSize: 12,
                        fontFamily: " sans-serif",
                        color: "#666",
                        borderWidth: 1,
                        borderColor: "#666"
                    },
                    emphasis: {selectorLabel: {show: !0, color: "#eee", backgroundColor: "#666"}},
                    selectorPosition: "auto",
                    selectorItemGap: 7,
                    selectorButtonGap: 10,
                    tooltip: {show: !1}
                }
            });

        function sN(e, t, i) {
            var n, o = {}, a = "toggleSelected" === e;
            return i.eachComponent("legend", function (i) {
                a && null != n ? i[n ? "select" : "unSelect"](t.name) : "allSelect" === e || "inverseSelect" === e ? i[e]() : (i[e](t.name), n = i.isSelected(t.name)), D(i.getData(), function (e) {
                    var t = e.get("name");
                    if ("\n" !== t && "" !== t) {
                        var n = i.isSelected(t);
                        o.hasOwnProperty(t) ? o[t] = o[t] && n : o[t] = n
                    }
                })
            }), "allSelect" === e || "inverseSelect" === e ? {selected: o} : {name: t.name, selected: o}
        }

        ff("legendToggleSelect", "legendselectchanged", P(sN, "toggleSelected")), ff("legendAllSelect", "legendselectall", P(sN, "allSelect")), ff("legendInverseSelect", "legendinverseselect", P(sN, "inverseSelect")), ff("legendSelect", "legendselected", P(sN, "select")), ff("legendUnSelect", "legendunselected", P(sN, "unSelect"));
        var lN = P, dN = D, uN = Ai, cN = wf({
            type: "legend.plain", newlineDisabled: !1, init: function () {
                this.group.add(this._contentGroup = new uN), this._backgroundEl, this.group.add(this._selectorGroup = new uN), this._isFirstRender = !0
            }, getContentGroup: function () {
                return this._contentGroup
            }, getSelectorGroup: function () {
                return this._selectorGroup
            }, render: function (e, t, i) {
                var n = this._isFirstRender;
                if (this._isFirstRender = !1, this.resetInner(), e.get("show", !0)) {
                    var o = e.get("align"), a = e.get("orient");
                    o && "auto" !== o || (o = "right" === e.get("left") && "vertical" === a ? "right" : "left");
                    var r = e.get("selector", !0), s = e.get("selectorPosition", !0);
                    !r || s && "auto" !== s || (s = "horizontal" === a ? "end" : "start"), this.renderInner(o, e, t, i, r, a, s);
                    var l = e.getBoxLayoutParams(), d = {width: i.getWidth(), height: i.getHeight()},
                        u = e.get("padding"), c = md(l, d, u), h = this.layoutInner(e, o, c, n, r, s),
                        f = md(w({width: h.width, height: h.height}, l), d, u);
                    this.group.attr("position", [f.x - h.x, f.y - h.y]), this.group.add(this._backgroundEl = M_(h, e))
                }
            }, resetInner: function () {
                this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll()
            }, renderInner: function (e, t, i, n, o, a, r) {
                var s = this.getContentGroup(), l = $(), d = t.get("selectedMode"), u = [];
                i.eachRawSeries(function (e) {
                    e.get("legendHoverLink") || u.push(e.id)
                }), dN(t.getData(), function (o, a) {
                    var r = o.get("name");
                    if (this.newlineDisabled || "" !== r && "\n" !== r) {
                        var c = i.getSeriesByName(r)[0];
                        if (!l.get(r)) if (c) {
                            var h = c.getData(), f = h.getVisual("color"), p = h.getVisual("borderColor");
                            "function" == typeof f && (f = f(c.getDataParams(0))), "function" == typeof p && (p = p(c.getDataParams(0)));
                            var g = h.getVisual("legendSymbol") || "roundRect", m = h.getVisual("symbol");
                            this._createItem(r, a, o, t, g, m, e, f, p, d).on("click", lN(fN, r, null, n, u)).on("mouseover", lN(pN, c.name, null, n, u)).on("mouseout", lN(gN, c.name, null, n, u)), l.set(r, !0)
                        } else i.eachRawSeries(function (i) {
                            if (!l.get(r) && i.legendVisualProvider) {
                                var s = i.legendVisualProvider;
                                if (!s.containName(r)) return;
                                var c = s.indexOfName(r), h = s.getItemVisual(c, "color"),
                                    f = s.getItemVisual(c, "borderColor");
                                this._createItem(r, a, o, t, "roundRect", null, e, h, f, d).on("click", lN(fN, null, r, n, u)).on("mouseover", lN(pN, null, r, n, u)).on("mouseout", lN(gN, null, r, n, u)), l.set(r, !0)
                            }
                        }, this)
                    } else s.add(new uN({newline: !0}))
                }, this), o && this._createSelector(o, t, n, a, r)
            }, _createSelector: function (e, t, i, n, o) {
                var a = this.getSelectorGroup();
                dN(e, function (e) {
                    !function (e) {
                        var n = e.type, o = new Ur({
                            style: {x: 0, y: 0, align: "center", verticalAlign: "middle"},
                            onclick: function () {
                                i.dispatchAction({type: "all" === n ? "legendAllSelect" : "legendInverseSelect"})
                            }
                        });
                        a.add(o);
                        var r = t.getModel("selectorLabel"), s = t.getModel("emphasis.selectorLabel");
                        Ys(o.style, o.hoverStyle = {}, r, s, {defaultText: e.title, isRectText: !1}), Hs(o)
                    }(e)
                })
            }, _createItem: function (e, t, i, n, o, a, r, s, l, d) {
                var u = n.get("itemWidth"), c = n.get("itemHeight"), h = n.get("inactiveColor"),
                    f = n.get("inactiveBorderColor"), p = n.get("symbolKeepAspect"), g = n.getModel("itemStyle"),
                    m = n.isSelected(e), v = new uN, y = i.getModel("textStyle"), w = i.get("icon"),
                    k = i.getModel("tooltip"), C = k.parentModel,
                    b = cg(o = w || o, 0, 0, u, c, m ? s : h, null == p || p);
                if (v.add(hN(b, o, g, l, f, m)), !w && a && (a !== o || "none" === a)) {
                    var I = .8 * c;
                    "none" === a && (a = "circle");
                    var S = cg(a, (u - I) / 2, (c - I) / 2, I, I, m ? s : h, null == p || p);
                    v.add(hN(S, a, g, l, f, m))
                }
                var _ = "left" === r ? u + 5 : -5, D = r, A = n.get("formatter"), N = e;
                "string" == typeof A && A ? N = A.replace("{name}", null != e ? e : "") : "function" == typeof A && (N = A(e)), v.add(new Ur({
                    style: Zs({}, y, {
                        text: N,
                        x: _,
                        y: c / 2,
                        textFill: m ? y.getTextColor() : h,
                        textAlign: D,
                        textVerticalAlign: "middle"
                    })
                }));
                var x = new es({
                    shape: v.getBoundingRect(),
                    invisible: !0,
                    tooltip: k.get("show") ? T({
                        content: e,
                        formatter: C.get("formatter", !0) || function () {
                            return e
                        },
                        formatterParams: {
                            componentType: "legend",
                            legendIndex: n.componentIndex,
                            name: e,
                            $vars: ["name"]
                        }
                    }, k.option) : null
                });
                return v.add(x), v.eachChild(function (e) {
                    e.silent = !0
                }), x.silent = !d, this.getContentGroup().add(v), Hs(v), v.__legendDataIndex = t, v
            }, layoutInner: function (e, t, i, n, o, a) {
                var r = this.getContentGroup(), s = this.getSelectorGroup();
                gd(e.get("orient"), r, e.get("itemGap"), i.width, i.height);
                var l = r.getBoundingRect(), d = [-l.x, -l.y];
                if (o) {
                    gd("horizontal", s, e.get("selectorItemGap", !0));
                    var u = s.getBoundingRect(), c = [-u.x, -u.y], h = e.get("selectorButtonGap", !0),
                        f = e.getOrient().index, p = 0 === f ? "width" : "height", g = 0 === f ? "height" : "width",
                        m = 0 === f ? "y" : "x";
                    "end" === a ? c[f] += l[p] + h : d[f] += u[p] + h, c[1 - f] += l[g] / 2 - u[g] / 2, s.attr("position", c), r.attr("position", d);
                    var v = {x: 0, y: 0};
                    return v[p] = l[p] + h + u[p], v[g] = Math.max(l[g], u[g]), v[m] = Math.min(0, u[m] + c[1 - f]), v
                }
                return r.attr("position", d), this.group.getBoundingRect()
            }, remove: function () {
                this.getContentGroup().removeAll(), this._isFirstRender = !0
            }
        });

        function hN(e, t, i, n, o, a) {
            var r;
            return "line" !== t && t.indexOf("empty") < 0 ? (r = i.getItemStyle(), e.style.stroke = n, a || (r.stroke = o)) : r = i.getItemStyle(["borderWidth", "borderColor"]), e.setStyle(r)
        }

        function fN(e, t, i, n) {
            gN(e, t, i, n), i.dispatchAction({type: "legendToggleSelect", name: null != e ? e : t}), pN(e, t, i, n)
        }

        function pN(e, t, i, n) {
            var o = i.getZr().storage.getDisplayList()[0];
            o && o.useHoverLayer || i.dispatchAction({type: "highlight", seriesName: e, name: t, excludeSeriesId: n})
        }

        function gN(e, t, i, n) {
            var o = i.getZr().storage.getDisplayList()[0];
            o && o.useHoverLayer || i.dispatchAction({type: "downplay", seriesName: e, name: t, excludeSeriesId: n})
        }

        hf(bh.PROCESSOR.SERIES_FILTER, function (e) {
            var t = e.findComponents({mainType: "legend"});
            t && t.length && e.filterSeries(function (e) {
                for (var i = 0; i < t.length; i++) if (!t[i].isSelected(e.name)) return !1;
                return !0
            })
        }), Sd.registerSubTypeDefaulter("legend", function () {
            return "plain"
        });
        var mN = rN.extend({
            type: "legend.scroll",
            setScrollDataIndex: function (e) {
                this.option.scrollDataIndex = e
            },
            defaultOption: {
                scrollDataIndex: 0,
                pageButtonItemGap: 5,
                pageButtonGap: null,
                pageButtonPosition: "end",
                pageFormatter: "{current}/{total}",
                pageIcons: {
                    horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
                    vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
                },
                pageIconColor: "#2f4554",
                pageIconInactiveColor: "#aaa",
                pageIconSize: 15,
                pageTextStyle: {color: "#333"},
                animationDurationUpdate: 800
            },
            init: function (e, t, i, n) {
                var o = Td(e);
                mN.superCall(this, "init", e, t, i, n), vN(this, e, o)
            },
            mergeOption: function (e, t) {
                mN.superCall(this, "mergeOption", e, t), vN(this, this.option, e)
            }
        });

        function vN(e, t, i) {
            var n = [1, 1];
            n[e.getOrient().index] = 0, yd(t, i, {type: "box", ignoreSize: n})
        }

        var yN = Ai, TN = ["width", "height"], wN = ["x", "y"], kN = cN.extend({
            type: "legend.scroll", newlineDisabled: !0, init: function () {
                kN.superCall(this, "init"), this._currentIndex = 0, this.group.add(this._containerGroup = new yN), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new yN), this._showController
            }, resetInner: function () {
                kN.superCall(this, "resetInner"), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null
            }, renderInner: function (e, t, i, n, o, a, r) {
                var s = this;
                kN.superCall(this, "renderInner", e, t, i, n, o, a, r);
                var l = this._controllerGroup, d = t.get("pageIconSize", !0);
                M(d) || (d = [d, d]), c("pagePrev", 0);
                var u = t.getModel("pageTextStyle");

                function c(e, i) {
                    var o = e + "DataIndex",
                        a = hl(t.get("pageIcons", !0)[t.getOrient().name][i], {onclick: O(s._pageGo, s, o, t, n)}, {
                            x: -d[0] / 2,
                            y: -d[1] / 2,
                            width: d[0],
                            height: d[1]
                        });
                    a.name = e, l.add(a)
                }

                l.add(new Ur({
                    name: "pageText",
                    style: {
                        textFill: u.getTextColor(),
                        font: u.getFont(),
                        textVerticalAlign: "middle",
                        textAlign: "center"
                    },
                    silent: !0
                })), c("pageNext", 1)
            }, layoutInner: function (e, t, i, n, o, a) {
                var r = this.getSelectorGroup(), s = e.getOrient().index, l = TN[s], d = wN[s], u = TN[1 - s],
                    c = wN[1 - s];
                o && gd("horizontal", r, e.get("selectorItemGap", !0));
                var h = e.get("selectorButtonGap", !0), f = r.getBoundingRect(), p = [-f.x, -f.y], g = m(i);
                o && (g[l] = i[l] - f[l] - h);
                var v = this._layoutContentAndController(e, n, g, s, l, u, c);
                if (o) {
                    if ("end" === a) p[s] += v[l] + h; else {
                        var y = f[l] + h;
                        p[s] -= y, v[d] -= y
                    }
                    v[l] += f[l] + h, p[1 - s] += v[c] + v[u] / 2 - f[u] / 2, v[u] = Math.max(v[u], f[u]), v[c] = Math.min(v[c], f[c] + p[1 - s]), r.attr("position", p)
                }
                return v
            }, _layoutContentAndController: function (e, t, i, n, o, a, r) {
                var s = this.getContentGroup(), l = this._containerGroup, d = this._controllerGroup;
                gd(e.get("orient"), s, e.get("itemGap"), n ? i.width : null, n ? null : i.height), gd("horizontal", d, e.get("pageButtonItemGap", !0));
                var u = s.getBoundingRect(), c = d.getBoundingRect(), h = this._showController = u[o] > i[o],
                    f = [-u.x, -u.y];
                t || (f[n] = s.position[n]);
                var p = [0, 0], g = [-c.x, -c.y], m = W(e.get("pageButtonGap", !0), e.get("itemGap", !0));
                h && ("end" === e.get("pageButtonPosition", !0) ? g[n] += i[o] - c[o] : p[n] += c[o] + m), g[1 - n] += u[a] / 2 - c[a] / 2, s.attr("position", f), l.attr("position", p), d.attr("position", g);
                var v = {x: 0, y: 0};
                if (v[o] = h ? i[o] : u[o], v[a] = Math.max(u[a], c[a]), v[r] = Math.min(0, c[r] + g[1 - n]), l.__rectSize = i[o], h) {
                    var y = {x: 0, y: 0};
                    y[o] = Math.max(i[o] - c[o] - m, 0), y[a] = v[a], l.setClipPath(new es({shape: y})), l.__rectSize = y[o]
                } else d.eachChild(function (e) {
                    e.attr({invisible: !0, silent: !0})
                });
                var T = this._getPageInfo(e);
                return null != T.pageIndex && al(s, {position: T.contentPosition}, h && e), this._updatePageInfoView(e, T), v
            }, _pageGo: function (e, t, i) {
                var n = this._getPageInfo(t)[e];
                null != n && i.dispatchAction({type: "legendScroll", scrollDataIndex: n, legendId: t.id})
            }, _updatePageInfoView: function (e, t) {
                var i = this._controllerGroup;
                D(["pagePrev", "pageNext"], function (n) {
                    var o = null != t[n + "DataIndex"], a = i.childOfName(n);
                    a && (a.setStyle("fill", o ? e.get("pageIconColor", !0) : e.get("pageIconInactiveColor", !0)), a.cursor = o ? "pointer" : "default")
                });
                var n = i.childOfName("pageText"), o = e.get("pageFormatter"), a = t.pageIndex,
                    r = null != a ? a + 1 : 0, s = t.pageCount;
                n && o && n.setStyle("text", L(o) ? o.replace("{current}", r).replace("{total}", s) : o({
                    current: r,
                    total: s
                }))
            }, _getPageInfo: function (e) {
                var t = e.get("scrollDataIndex", !0), i = this.getContentGroup(), n = this._containerGroup.__rectSize,
                    o = e.getOrient().index, a = TN[o], r = wN[o], s = this._findTargetItemIndex(t), l = i.children(),
                    d = l[s], u = l.length, c = u ? 1 : 0, h = {
                        contentPosition: i.position.slice(),
                        pageCount: c,
                        pageIndex: c - 1,
                        pagePrevDataIndex: null,
                        pageNextDataIndex: null
                    };
                if (!d) return h;
                var f = y(d);
                h.contentPosition[o] = -f.s;
                for (var p = s + 1, g = f, m = f, v = null; p <= u; ++p) (!(v = y(l[p])) && m.e > g.s + n || v && !T(v, g.s)) && (g = m.i > g.i ? m : v) && (null == h.pageNextDataIndex && (h.pageNextDataIndex = g.i), ++h.pageCount), m = v;
                for (p = s - 1, g = f, m = f, v = null; -1 <= p; --p) (v = y(l[p])) && T(m, v.s) || !(g.i < m.i) || (m = g, null == h.pagePrevDataIndex && (h.pagePrevDataIndex = g.i), ++h.pageCount, ++h.pageIndex), g = v;
                return h;

                function y(e) {
                    if (e) {
                        var t = e.getBoundingRect(), i = t[r] + e.position[o];
                        return {s: i, e: i + t[a], i: e.__legendDataIndex}
                    }
                }

                function T(e, t) {
                    return e.e >= t && e.s <= t + n
                }
            }, _findTargetItemIndex: function (e) {
                return this._showController ? (this.getContentGroup().eachChild(function (n, o) {
                    var a = n.__legendDataIndex;
                    null == i && null != a && (i = o), a === e && (t = o)
                }), null != t ? t : i) : 0;
                var t, i
            }
        });
        ff("legendScroll", "legendscroll", function (e, t) {
            var i = e.scrollDataIndex;
            null != i && t.eachComponent({mainType: "legend", subType: "scroll", query: e}, function (e) {
                e.setScrollDataIndex(i)
            })
        }), DD.extend({
            type: "dataZoom.slider",
            layoutMode: "box",
            defaultOption: {
                show: !0,
                right: "ph",
                top: "ph",
                width: "ph",
                height: "ph",
                left: null,
                bottom: null,
                backgroundColor: "rgba(47,69,84,0)",
                dataBackground: {
                    lineStyle: {color: "#2f4554", width: .5, opacity: .3},
                    areaStyle: {color: "rgba(47,69,84,0.3)", opacity: .3}
                },
                borderColor: "#ddd",
                fillerColor: "rgba(167,183,204,0.4)",
                handleIcon: "M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",
                handleSize: "100%",
                handleStyle: {color: "#a7b7cc"},
                labelPrecision: null,
                labelFormatter: null,
                showDetail: !0,
                showDataShadow: "auto",
                realtime: !0,
                zoomLock: !1,
                textStyle: {color: "#333"}
            }
        });
        var CN = es, bN = Nl, IN = Ol, SN = O, _N = D, DN = "horizontal", AN = "vertical",
            NN = ["line", "bar", "candlestick", "scatter"], xN = xD.extend({
                type: "dataZoom.slider", init: function (e, t) {
                    this._displayables = {}, this._orient, this._range, this._handleEnds, this._size, this._handleWidth, this._handleHeight, this._location, this._dragging, this._dataShadowInfo, this.api = t
                }, render: function (e, t, i, n) {
                    xN.superApply(this, "render", arguments), Ic(this, "_dispatchZoomAction", this.dataZoomModel.get("throttle"), "fixRate"), this._orient = e.get("orient"), !1 !== this.dataZoomModel.get("show") ? (n && "dataZoom" === n.type && n.from === this.uid || this._buildView(), this._updateView()) : this.group.removeAll()
                }, remove: function () {
                    xN.superApply(this, "remove", arguments), Sc(this, "_dispatchZoomAction")
                }, dispose: function () {
                    xN.superApply(this, "dispose", arguments), Sc(this, "_dispatchZoomAction")
                }, _buildView: function () {
                    var e = this.group;
                    e.removeAll(), this._resetLocation(), this._resetInterval();
                    var t = this._displayables.barGroup = new Ai;
                    this._renderBackground(), this._renderHandle(), this._renderDataShadow(), e.add(t), this._positionGroup()
                }, _resetLocation: function () {
                    var e = this.dataZoomModel, t = this.api, i = this._findCoordRect(),
                        n = {width: t.getWidth(), height: t.getHeight()}, o = this._orient === DN ? {
                            right: n.width - i.x - i.width,
                            top: n.height - 30 - 7,
                            width: i.width,
                            height: 30
                        } : {right: 7, top: i.y, width: 30, height: i.height}, a = Td(e.option);
                    D(["right", "top", "width", "height"], function (e) {
                        "ph" === a[e] && (a[e] = o[e])
                    });
                    var r = md(a, n, e.padding);
                    this._location = {
                        x: r.x,
                        y: r.y
                    }, this._size = [r.width, r.height], this._orient === AN && this._size.reverse()
                }, _positionGroup: function () {
                    var e = this.group, t = this._location, i = this._orient,
                        n = this.dataZoomModel.getFirstTargetAxisModel(), o = n && n.get("inverse"),
                        a = this._displayables.barGroup, r = (this._dataShadowInfo || {}).otherAxisInverse;
                    a.attr(i !== DN || o ? i === DN && o ? {scale: r ? [-1, 1] : [-1, -1]} : i !== AN || o ? {
                        scale: r ? [-1, -1] : [-1, 1],
                        rotation: Math.PI / 2
                    } : {scale: r ? [1, -1] : [1, 1], rotation: Math.PI / 2} : {scale: r ? [1, 1] : [1, -1]});
                    var s = e.getBoundingRect([a]);
                    e.attr("position", [t.x - s.x, t.y - s.y])
                }, _getViewExtent: function () {
                    return [0, this._size[0]]
                }, _renderBackground: function () {
                    var e = this.dataZoomModel, t = this._size, i = this._displayables.barGroup;
                    i.add(new CN({
                        silent: !0,
                        shape: {x: 0, y: 0, width: t[0], height: t[1]},
                        style: {fill: e.get("backgroundColor")},
                        z2: -40
                    })), i.add(new CN({
                        shape: {x: 0, y: 0, width: t[0], height: t[1]},
                        style: {fill: "transparent"},
                        z2: 0,
                        onclick: O(this._onClickPanelClick, this)
                    }))
                }, _renderDataShadow: function () {
                    var e = this._dataShadowInfo = this._prepareDataShadowInfo();
                    if (e) {
                        var t = this._size, i = e.series, n = i.getRawData(),
                            o = i.getShadowDim ? i.getShadowDim() : e.otherDim;
                        if (null != o) {
                            var a = n.getDataExtent(o), r = .3 * (a[1] - a[0]);
                            a = [a[0] - r, a[1] + r];
                            var s, l = [0, t[1]], d = [0, t[0]], u = [[t[0], 0], [0, 0]], c = [],
                                h = d[1] / (n.count() - 1), f = 0, p = Math.round(n.count() / t[0]);
                            n.each([o], function (e, t) {
                                if (0 < p && t % p) f += h; else {
                                    var i = null == e || isNaN(e) || "" === e, n = i ? 0 : bN(e, a, l, !0);
                                    i && !s && t ? (u.push([u[u.length - 1][0], 0]), c.push([c[c.length - 1][0], 0])) : !i && s && (u.push([f, 0]), c.push([f, 0])), u.push([f, n]), c.push([f, n]), f += h, s = i
                                }
                            });
                            var g = this.dataZoomModel;
                            this._displayables.barGroup.add(new Xr({
                                shape: {points: u},
                                style: w({fill: g.get("dataBackgroundColor")}, g.getModel("dataBackground.areaStyle").getAreaStyle()),
                                silent: !0,
                                z2: -20
                            })), this._displayables.barGroup.add(new qr({
                                shape: {points: c},
                                style: g.getModel("dataBackground.lineStyle").getLineStyle(),
                                silent: !0,
                                z2: -19
                            }))
                        }
                    }
                }, _prepareDataShadowInfo: function () {
                    var e = this.dataZoomModel, t = e.get("showDataShadow");
                    if (!1 !== t) {
                        var i, n = this.ecModel;
                        return e.eachTargetAxis(function (o, a) {
                            D(e.getAxisProxy(o.name, a).getTargetSeriesModels(), function (e) {
                                if (!(i || !0 !== t && b(NN, e.get("type")) < 0)) {
                                    var r, s = n.getComponent(o.axis, a).axis, l = function (e) {
                                        return {x: "y", y: "x", radius: "angle", angle: "radius"}[e]
                                    }(o.name), d = e.coordinateSystem;
                                    null != l && d.getOtherAxis && (r = d.getOtherAxis(s).inverse), l = e.getData().mapDimension(l), i = {
                                        thisAxis: s,
                                        series: e,
                                        thisDim: o.name,
                                        otherDim: l,
                                        otherAxisInverse: r
                                    }
                                }
                            }, this)
                        }, this), i
                    }
                }, _renderHandle: function () {
                    var e = this._displayables, t = e.handles = [], i = e.handleLabels = [],
                        n = this._displayables.barGroup, o = this._size, a = this.dataZoomModel;
                    n.add(e.filler = new CN({
                        draggable: !0,
                        cursor: EN(this._orient),
                        drift: SN(this._onDragMove, this, "all"),
                        ondragstart: SN(this._showDataInfo, this, !0),
                        ondragend: SN(this._onDragEnd, this),
                        onmouseover: SN(this._showDataInfo, this, !0),
                        onmouseout: SN(this._showDataInfo, this, !1),
                        style: {fill: a.get("fillerColor"), textPosition: "inside"}
                    })), n.add(new CN({
                        silent: !0,
                        subPixelOptimize: !0,
                        shape: {x: 0, y: 0, width: o[0], height: o[1]},
                        style: {
                            stroke: a.get("dataBackgroundColor") || a.get("borderColor"),
                            lineWidth: 1,
                            fill: "rgba(0,0,0,0)"
                        }
                    })), _N([0, 1], function (e) {
                        var o = hl(a.get("handleIcon"), {
                            cursor: EN(this._orient),
                            draggable: !0,
                            drift: SN(this._onDragMove, this, e),
                            ondragend: SN(this._onDragEnd, this),
                            onmouseover: SN(this._showDataInfo, this, !0),
                            onmouseout: SN(this._showDataInfo, this, !1)
                        }, {x: -1, y: 0, width: 2, height: 2}), r = o.getBoundingRect();
                        this._handleHeight = xl(a.get("handleSize"), this._size[1]), this._handleWidth = r.width / r.height * this._handleHeight, o.setStyle(a.getModel("handleStyle").getItemStyle());
                        var s = a.get("handleColor");
                        null != s && (o.style.fill = s), n.add(t[e] = o);
                        var l = a.textStyleModel;
                        this.group.add(i[e] = new Ur({
                            silent: !0,
                            invisible: !0,
                            style: {
                                x: 0,
                                y: 0,
                                text: "",
                                textVerticalAlign: "middle",
                                textAlign: "center",
                                textFill: l.getTextColor(),
                                textFont: l.getFont()
                            },
                            z2: 10
                        }))
                    }, this)
                }, _resetInterval: function () {
                    var e = this._range = this.dataZoomModel.getPercentRange(), t = this._getViewExtent();
                    this._handleEnds = [bN(e[0], [0, 100], t, !0), bN(e[1], [0, 100], t, !0)]
                }, _updateInterval: function (e, t) {
                    var i = this.dataZoomModel, n = this._handleEnds, o = this._getViewExtent(),
                        a = i.findRepresentativeAxisProxy().getMinMaxSpan(), r = [0, 100];
                    Ek(t, n, o, i.get("zoomLock") ? "all" : e, null != a.minSpan ? bN(a.minSpan, r, o, !0) : null, null != a.maxSpan ? bN(a.maxSpan, r, o, !0) : null);
                    var s = this._range, l = this._range = IN([bN(n[0], o, r, !0), bN(n[1], o, r, !0)]);
                    return !s || s[0] !== l[0] || s[1] !== l[1]
                }, _updateView: function (e) {
                    var t = this._displayables, i = this._handleEnds, n = IN(i.slice()), o = this._size;
                    _N([0, 1], function (e) {
                        var n = t.handles[e], a = this._handleHeight;
                        n.attr({scale: [a / 2, a / 2], position: [i[e], o[1] / 2 - a / 2]})
                    }, this), t.filler.setShape({x: n[0], y: 0, width: n[1] - n[0], height: o[1]}), this._updateDataInfo(e)
                }, _updateDataInfo: function (e) {
                    var t = this.dataZoomModel, i = this._displayables, n = i.handleLabels, o = this._orient, a = ["", ""];
                    if (t.get("showDetail")) {
                        var r = t.findRepresentativeAxisProxy();
                        if (r) {
                            var s = r.getAxisModel().axis, l = this._range, d = e ? r.calculateDataWindow({
                                start: l[0],
                                end: l[1]
                            }).valueWindow : r.getDataValueWindow();
                            a = [this._formatLabel(d[0], s), this._formatLabel(d[1], s)]
                        }
                    }
                    var u = IN(this._handleEnds.slice());

                    function c(e) {
                        var t = sl(i.handles[e].parent, this.group), r = dl(0 === e ? "right" : "left", t),
                            s = this._handleWidth / 2 + 5, l = ll([u[e] + (0 === e ? -s : s), this._size[1] / 2], t);
                        n[e].setStyle({
                            x: l[0],
                            y: l[1],
                            textVerticalAlign: o === DN ? "middle" : r,
                            textAlign: o === DN ? r : "center",
                            text: a[e]
                        })
                    }

                    c.call(this, 0), c.call(this, 1)
                }, _formatLabel: function (e, t) {
                    var i = this.dataZoomModel, n = i.get("labelFormatter"), o = i.get("labelPrecision");
                    null != o && "auto" !== o || (o = t.getPixelPrecision());
                    var a = null == e || isNaN(e) ? "" : "category" === t.type || "time" === t.type ? t.scale.getLabel(Math.round(e)) : e.toFixed(Math.min(o, 20));
                    return F(n) ? n(e, a) : L(n) ? n.replace("{value}", a) : a
                }, _showDataInfo: function (e) {
                    e = this._dragging || e;
                    var t = this._displayables.handleLabels;
                    t[0].attr("invisible", !e), t[1].attr("invisible", !e)
                }, _onDragMove: function (e, t, i, n) {
                    this._dragging = !0, ze(n.event);
                    var o = ll([t, i], this._displayables.barGroup.getLocalTransform(), !0),
                        a = this._updateInterval(e, o[0]), r = this.dataZoomModel.get("realtime");
                    this._updateView(!r), a && r && this._dispatchZoomAction()
                }, _onDragEnd: function () {
                    this._dragging = !1, this._showDataInfo(!1), this.dataZoomModel.get("realtime") || this._dispatchZoomAction()
                }, _onClickPanelClick: function (e) {
                    var t = this._size, i = this._displayables.barGroup.transformCoordToLocal(e.offsetX, e.offsetY);
                    if (!(i[0] < 0 || i[0] > t[0] || i[1] < 0 || i[1] > t[1])) {
                        var n = this._handleEnds, o = (n[0] + n[1]) / 2, a = this._updateInterval("all", i[0] - o);
                        this._updateView(), a && this._dispatchZoomAction()
                    }
                }, _dispatchZoomAction: function () {
                    var e = this._range;
                    this.api.dispatchAction({
                        type: "dataZoom",
                        from: this.uid,
                        dataZoomId: this.dataZoomModel.id,
                        start: e[0],
                        end: e[1]
                    })
                }, _findCoordRect: function () {
                    var e;
                    if (_N(this.getTargetCoordInfo(), function (t) {
                        if (!e && t.length) {
                            var i = t[0].model.coordinateSystem;
                            e = i.getRect && i.getRect()
                        }
                    }), !e) {
                        var t = this.api.getWidth(), i = this.api.getHeight();
                        e = {x: .2 * t, y: .2 * i, width: .6 * t, height: .6 * i}
                    }
                    return e
                }
            });

        function EN(e) {
            return "vertical" === e ? "ns-resize" : "ew-resize"
        }

        DD.extend({
            type: "dataZoom.inside",
            defaultOption: {
                disabled: !1,
                zoomLock: !1,
                zoomOnMouseWheel: !0,
                moveOnMouseMove: !0,
                moveOnMouseWheel: !1,
                preventDefaultMouseMove: !0
            }
        });
        var ON = "\0_ec_dataZoom_roams";

        function PN(e) {
            return e.type + "\0_" + e.id
        }

        function MN(e) {
            var t = e.getZr();
            return t[ON] || (t[ON] = {})
        }

        function FN(e) {
            D(e, function (t, i) {
                t.count || (t.controller.dispose(), delete e[i])
            })
        }

        function LN(e, t) {
            e.dispatchAction({type: "dataZoom", batch: t})
        }

        var RN = O, BN = xD.extend({
            type: "dataZoom.inside", init: function (e, t) {
                this._range
            }, render: function (e, t, i, n) {
                BN.superApply(this, "render", arguments), this._range = e.getPercentRange(), D(this.getTargetCoordInfo(), function (t, n) {
                    var o = A(t, function (e) {
                        return PN(e.model)
                    });
                    D(t, function (t) {
                        var a = t.model, r = {};
                        D(["pan", "zoom", "scrollMove"], function (e) {
                            r[e] = RN(UN[e], this, t, n)
                        }, this), function (e, t) {
                            var i = MN(e), n = t.dataZoomId, o = t.coordId;
                            D(i, function (e, i) {
                                var a = e.dataZoomInfos;
                                a[n] && b(t.allCoordIds, o) < 0 && (delete a[n], e.count--)
                            }), FN(i);
                            var a = i[o];
                            a || ((a = i[o] = {coordId: o, dataZoomInfos: {}, count: 0}).controller = function (e, t) {
                                var i = new by(e.getZr());
                                return D(["pan", "zoom", "scrollMove"], function (e) {
                                    i.on(e, function (i) {
                                        var n = [];
                                        D(t.dataZoomInfos, function (o) {
                                            if (i.isAvailableBehavior(o.dataZoomModel.option)) {
                                                var a = (o.getRange || {})[e], r = a && a(t.controller, i);
                                                !o.dataZoomModel.get("disabled", !0) && r && n.push({
                                                    dataZoomId: o.dataZoomId,
                                                    start: r[0],
                                                    end: r[1]
                                                })
                                            }
                                        }), n.length && t.dispatchAction(n)
                                    })
                                }), i
                            }(e, a), a.dispatchAction = P(LN, e)), a.dataZoomInfos[n] || a.count++, a.dataZoomInfos[n] = t;
                            var r = function (e) {
                                var t, i = {type_true: 2, type_move: 1, type_false: 0, type_undefined: -1}, n = !0;
                                return D(e, function (e) {
                                    var o = e.dataZoomModel,
                                        a = !o.get("disabled", !0) && (!o.get("zoomLock", !0) || "move");
                                    i["type_" + t] < i["type_" + a] && (t = a), n &= o.get("preventDefaultMouseMove", !0)
                                }), {
                                    controlType: t,
                                    opt: {
                                        zoomOnMouseWheel: !0,
                                        moveOnMouseMove: !0,
                                        moveOnMouseWheel: !0,
                                        preventDefaultMouseMove: !!n
                                    }
                                }
                            }(a.dataZoomInfos);
                            a.controller.enable(r.controlType, r.opt), a.controller.setPointerChecker(t.containsPoint), Ic(a, "dispatchAction", t.dataZoomModel.get("throttle", !0), "fixRate")
                        }(i, {
                            coordId: PN(a), allCoordIds: o, containsPoint: function (e, t, i) {
                                return a.coordinateSystem.containPoint([t, i])
                            }, dataZoomId: e.id, dataZoomModel: e, getRange: r
                        })
                    }, this)
                }, this)
            }, dispose: function () {
                var e, t, i;
                e = this.api, t = this.dataZoomModel.id, D(i = MN(e), function (e) {
                    e.controller.dispose();
                    var i = e.dataZoomInfos;
                    i[t] && (delete i[t], e.count--)
                }), FN(i), BN.superApply(this, "dispose", arguments), this._range = null
            }
        }), UN = {
            zoom: function (e, t, i, n) {
                var o = this._range, a = o.slice(), r = e.axisModels[0];
                if (r) {
                    var s = GN[t](null, [n.originX, n.originY], r, i, e),
                        l = (0 < s.signal ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (a[1] - a[0]) + a[0],
                        d = Math.max(1 / n.scale, 0);
                    a[0] = (a[0] - l) * d + l, a[1] = (a[1] - l) * d + l;
                    var u = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
                    return Ek(0, a, [0, 100], 0, u.minSpan, u.maxSpan), this._range = a, o[0] !== a[0] || o[1] !== a[1] ? a : void 0
                }
            }, pan: VN(function (e, t, i, n, o, a) {
                var r = GN[n]([a.oldX, a.oldY], [a.newX, a.newY], t, o, i);
                return r.signal * (e[1] - e[0]) * r.pixel / r.pixelLength
            }), scrollMove: VN(function (e, t, i, n, o, a) {
                return GN[n]([0, 0], [a.scrollDelta, a.scrollDelta], t, o, i).signal * (e[1] - e[0]) * a.scrollDelta
            })
        };

        function VN(e) {
            return function (t, i, n, o) {
                var a = this._range, r = a.slice(), s = t.axisModels[0];
                if (s) {
                    var l = e(r, s, t, i, n, o);
                    return Ek(l, r, [0, 100], "all"), this._range = r, a[0] !== r[0] || a[1] !== r[1] ? r : void 0
                }
            }
        }

        function KN(e) {
            var t = e && e.visualMap;
            M(t) || (t = t ? [t] : []), WN(t, function (e) {
                if (e) {
                    jN(e, "splitList") && !jN(e, "pieces") && (e.pieces = e.splitList, delete e.splitList);
                    var t = e.pieces;
                    t && M(t) && WN(t, function (e) {
                        R(e) && (jN(e, "start") && !jN(e, "min") && (e.min = e.start), jN(e, "end") && !jN(e, "max") && (e.max = e.end))
                    })
                }
            })
        }

        var GN = {
            grid: function (e, t, i, n, o) {
                var a = i.axis, r = {}, s = o.model.coordinateSystem.getRect();
                return e = e || [0, 0], "x" === a.dim ? (r.pixel = t[0] - e[0], r.pixelLength = s.width, r.pixelStart = s.x, r.signal = a.inverse ? 1 : -1) : (r.pixel = t[1] - e[1], r.pixelLength = s.height, r.pixelStart = s.y, r.signal = a.inverse ? -1 : 1), r
            }, polar: function (e, t, i, n, o) {
                var a = i.axis, r = {}, s = o.model.coordinateSystem, l = s.getRadiusAxis().getExtent(),
                    d = s.getAngleAxis().getExtent();
                return e = e ? s.pointToCoord(e) : [0, 0], t = s.pointToCoord(t), "radiusAxis" === i.mainType ? (r.pixel = t[0] - e[0], r.pixelLength = l[1] - l[0], r.pixelStart = l[0], r.signal = a.inverse ? 1 : -1) : (r.pixel = t[1] - e[1], r.pixelLength = d[1] - d[0], r.pixelStart = d[0], r.signal = a.inverse ? -1 : 1), r
            }, singleAxis: function (e, t, i, n, o) {
                var a = i.axis, r = o.model.coordinateSystem.getRect(), s = {};
                return e = e || [0, 0], "horizontal" === a.orient ? (s.pixel = t[0] - e[0], s.pixelLength = r.width, s.pixelStart = r.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = t[1] - e[1], s.pixelLength = r.height, s.pixelStart = r.y, s.signal = a.inverse ? -1 : 1), s
            }
        }, WN = D;

        function jN(e, t) {
            return e && e.hasOwnProperty && e.hasOwnProperty(t)
        }

        Sd.registerSubTypeDefaulter("visualMap", function (e) {
            return e.categories || (e.pieces ? 0 < e.pieces.length : 0 < e.splitNumber) && !e.calculable ? "piecewise" : "continuous"
        });
        var HN = bh.VISUAL.COMPONENT;

        function zN(e, t, i, n) {
            for (var o = t.targetVisuals[n], a = ZT.prepareVisualTypes(o), r = {color: e.getData().getVisual("color")}, s = 0, l = a.length; s < l; s++) {
                var d = a[s], u = o["opacity" === d ? "__alphaForOpacity" : d];
                u && u.applyVisual(i, c, h)
            }
            return r.color;

            function c(e) {
                return r[e]
            }

            function h(e, t) {
                r[e] = t
            }
        }

        mf(HN, {
            createOnAllSeries: !0, reset: function (e, t) {
                var i = [];
                return t.eachComponent("visualMap", function (t) {
                    var n = e.pipelineContext;
                    !t.isTargetSeries(e) || n && n.large || i.push(function (e, t, i, n) {
                        var o = {};
                        return D(e, function (e) {
                            var i = ZT.prepareVisualTypes(t[e]);
                            o[e] = i
                        }), {
                            progress: function (e, a) {
                                function r(e) {
                                    return a.getItemVisual(l, e)
                                }

                                function s(e, t) {
                                    a.setItemVisual(l, e, t)
                                }

                                var l;
                                for (null != n && (n = a.getDimension(n)); null != (l = e.next());) {
                                    var d = a.getRawDataItem(l);
                                    if (!d || !1 !== d.visualMap) for (var u = null != n ? a.get(n, l, !0) : l, c = i(u), h = t[c], f = o[c], p = 0, g = f.length; p < g; p++) {
                                        var m = f[p];
                                        h[m] && h[m].applyVisual(u, r, s)
                                    }
                                }
                            }
                        }
                    }(t.stateList, t.targetVisuals, O(t.getValueState, t), t.getDataDimension(e.getData())))
                }), i
            }
        }), mf(HN, {
            createOnAllSeries: !0, reset: function (e, t) {
                var i = e.getData(), n = [];
                t.eachComponent("visualMap", function (t) {
                    if (t.isTargetSeries(e)) {
                        var o = t.getVisualMeta(O(zN, null, e, t)) || {stops: [], outerColors: []},
                            a = t.getDataDimension(i), r = i.getDimensionInfo(a);
                        null != r && (o.dimension = r.index, n.push(o))
                    }
                }), e.getData().setVisual("visualMeta", n)
            }
        });
        var XN = function (e, t, i) {
            var n = m((qN[e] || {})[t]);
            return i && M(n) ? n[n.length - 1] : n
        }, qN = {
            color: {active: ["#006edd", "#e0ffff"], inactive: ["rgba(0,0,0,0)"]},
            colorHue: {active: [0, 360], inactive: [0, 0]},
            colorSaturation: {active: [.3, 1], inactive: [0, 0]},
            colorLightness: {active: [.9, .5], inactive: [0, 0]},
            colorAlpha: {active: [.3, 1], inactive: [0, 0]},
            opacity: {active: [.3, 1], inactive: [0, 0]},
            symbol: {active: ["circle", "roundRect", "diamond"], inactive: ["none"]},
            symbolSize: {active: [10, 50], inactive: [0, 0]}
        }, YN = ZT.mapVisual, JN = ZT.eachVisual, ZN = M, QN = D, $N = Ol, ex = Nl, tx = Tf({
            type: "visualMap",
            dependencies: ["series"],
            stateList: ["inRange", "outOfRange"],
            replacableOptionKeys: ["inRange", "outOfRange", "target", "controller", "color"],
            dataBound: [-1 / 0, 1 / 0],
            layoutMode: {type: "box", ignoreSize: !0},
            defaultOption: {
                show: !0,
                zlevel: 0,
                z: 4,
                seriesIndex: "all",
                min: 0,
                max: 200,
                dimension: null,
                inRange: null,
                outOfRange: null,
                left: 0,
                right: null,
                top: null,
                bottom: 0,
                itemWidth: null,
                itemHeight: null,
                inverse: !1,
                orient: "vertical",
                backgroundColor: "rgba(0,0,0,0)",
                borderColor: "#ccc",
                contentColor: "#5793f3",
                inactiveColor: "#aaa",
                borderWidth: 0,
                padding: 5,
                textGap: 10,
                precision: 0,
                color: null,
                formatter: null,
                text: null,
                textStyle: {color: "#333"}
            },
            init: function (e, t, i) {
                this._dataExtent, this.targetVisuals = {}, this.controllerVisuals = {}, this.textStyleModel, this.itemSize, this.mergeDefaultAndTheme(e, i)
            },
            optionUpdated: function (e, t) {
                var i = this.option;
                o.canvasSupported || (i.realtime = !1), t || iA(i, e, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption()
            },
            resetVisual: function (e) {
                var t = this.stateList;
                e = O(e, this), this.controllerVisuals = tA(this.option.controller, t, e), this.targetVisuals = tA(this.option.target, t, e)
            },
            getTargetSeriesIndices: function () {
                var e = this.option.seriesIndex, t = [];
                return null == e || "all" === e ? this.ecModel.eachSeries(function (e, i) {
                    t.push(i)
                }) : t = Po(e), t
            },
            eachTargetSeries: function (e, t) {
                D(this.getTargetSeriesIndices(), function (i) {
                    e.call(t, this.ecModel.getSeriesByIndex(i))
                }, this)
            },
            isTargetSeries: function (e) {
                var t = !1;
                return this.eachTargetSeries(function (i) {
                    i === e && (t = !0)
                }), t
            },
            formatValueText: function (e, t, i) {
                var n, o, a = this.option, r = a.precision, s = this.dataBound, l = a.formatter;
                return i = i || ["<", ">"], M(e) && (e = e.slice(), n = !0), o = t ? e : n ? [d(e[0]), d(e[1])] : d(e), L(l) ? l.replace("{value}", n ? o[0] : o).replace("{value2}", n ? o[1] : o) : F(l) ? n ? l(e[0], e[1]) : l(e) : n ? e[0] === s[0] ? i[0] + " " + o[1] : e[1] === s[1] ? i[1] + " " + o[0] : o[0] + " - " + o[1] : o;

                function d(e) {
                    return e === s[0] ? "min" : e === s[1] ? "max" : (+e).toFixed(Math.min(r, 20))
                }
            },
            resetExtent: function () {
                var e = this.option, t = $N([e.min, e.max]);
                this._dataExtent = t
            },
            getDataDimension: function (e) {
                var t = this.option.dimension, i = e.dimensions;
                if (null != t || i.length) {
                    if (null != t) return e.getDimension(t);
                    for (var n = e.dimensions, o = n.length - 1; 0 <= o; o--) {
                        var a = n[o];
                        if (!e.getDimensionInfo(a).isCalculationCoord) return a
                    }
                }
            },
            getExtent: function () {
                return this._dataExtent.slice()
            },
            completeVisualOption: function () {
                var e = this.ecModel, t = this.option, i = {inRange: t.inRange, outOfRange: t.outOfRange},
                    n = t.target || (t.target = {}), o = t.controller || (t.controller = {});
                v(n, i), v(o, i);
                var a = this.isCategory();

                function r(i) {
                    ZN(t.color) && !i.inRange && (i.inRange = {color: t.color.slice().reverse()}), i.inRange = i.inRange || {color: e.get("gradientColor")}, QN(this.stateList, function (e) {
                        var t = i[e];
                        if (L(t)) {
                            var n = XN(t, "active", a);
                            n ? (i[e] = {}, i[e][t] = n) : delete i[e]
                        }
                    }, this)
                }

                r.call(this, n), r.call(this, o), function (e, t, i) {
                    var n = e[t], o = e[i];
                    n && !o && (o = e[i] = {}, QN(n, function (e, t) {
                        if (ZT.isValidType(t)) {
                            var i = XN(t, "inactive", a);
                            null != i && (o[t] = i, "color" !== t || o.hasOwnProperty("opacity") || o.hasOwnProperty("colorAlpha") || (o.opacity = [0, 0]))
                        }
                    }))
                }.call(this, n, "inRange", "outOfRange"), function (e) {
                    var t = (e.inRange || {}).symbol || (e.outOfRange || {}).symbol,
                        i = (e.inRange || {}).symbolSize || (e.outOfRange || {}).symbolSize,
                        n = this.get("inactiveColor");
                    QN(this.stateList, function (o) {
                        var r = this.itemSize, s = e[o];
                        null == (s = s || (e[o] = {color: a ? n : [n]})).symbol && (s.symbol = t && m(t) || (a ? "roundRect" : ["roundRect"])), null == s.symbolSize && (s.symbolSize = i && m(i) || (a ? r[0] : [r[0], r[0]])), s.symbol = YN(s.symbol, function (e) {
                            return "none" === e || "square" === e ? "roundRect" : e
                        });
                        var l = s.symbolSize;
                        if (null != l) {
                            var d = -1 / 0;
                            JN(l, function (e) {
                                d < e && (d = e)
                            }), s.symbolSize = YN(l, function (e) {
                                return ex(e, [0, d], [0, r[0]], !0)
                            })
                        }
                    }, this)
                }.call(this, o)
            },
            resetItemSize: function () {
                this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))]
            },
            isCategory: function () {
                return !!this.option.categories
            },
            setSelected: te,
            getValueState: te,
            getVisualMeta: te
        }), ix = [20, 140], nx = tx.extend({
            type: "visualMap.continuous",
            defaultOption: {
                align: "auto",
                calculable: !1,
                range: null,
                realtime: !0,
                itemHeight: null,
                itemWidth: null,
                hoverLink: !0,
                hoverLinkDataSize: null,
                hoverLinkOnHandle: null
            },
            optionUpdated: function (e, t) {
                nx.superApply(this, "optionUpdated", arguments), this.resetExtent(), this.resetVisual(function (e) {
                    e.mappingMethod = "linear", e.dataExtent = this.getExtent()
                }), this._resetRange()
            },
            resetItemSize: function () {
                nx.superApply(this, "resetItemSize", arguments);
                var e = this.itemSize;
                "horizontal" === this._orient && e.reverse(), null != e[0] && !isNaN(e[0]) || (e[0] = ix[0]), null != e[1] && !isNaN(e[1]) || (e[1] = ix[1])
            },
            _resetRange: function () {
                var e = this.getExtent(), t = this.option.range;
                !t || t.auto ? (e.auto = 1, this.option.range = e) : M(t) && (t[0] > t[1] && t.reverse(), t[0] = Math.max(t[0], e[0]), t[1] = Math.min(t[1], e[1]))
            },
            completeVisualOption: function () {
                tx.prototype.completeVisualOption.apply(this, arguments), D(this.stateList, function (e) {
                    var t = this.option.controller[e].symbolSize;
                    t && t[0] !== t[1] && (t[0] = 0)
                }, this)
            },
            setSelected: function (e) {
                this.option.range = e.slice(), this._resetRange()
            },
            getSelected: function () {
                var e = this.getExtent(), t = Ol((this.get("range") || []).slice());
                return t[0] > e[1] && (t[0] = e[1]), t[1] > e[1] && (t[1] = e[1]), t[0] < e[0] && (t[0] = e[0]), t[1] < e[0] && (t[1] = e[0]), t
            },
            getValueState: function (e) {
                var t = this.option.range, i = this.getExtent();
                return (t[0] <= i[0] || t[0] <= e) && (t[1] >= i[1] || e <= t[1]) ? "inRange" : "outOfRange"
            },
            findTargetDataIndices: function (e) {
                var t = [];
                return this.eachTargetSeries(function (i) {
                    var n = [], o = i.getData();
                    o.each(this.getDataDimension(o), function (t, i) {
                        e[0] <= t && t <= e[1] && n.push(i)
                    }, this), t.push({seriesId: i.id, dataIndex: n})
                }, this), t
            },
            getVisualMeta: function (e) {
                var t = ox(0, 0, this.getExtent()), i = ox(0, 0, this.option.range.slice()), n = [];

                function o(t, i) {
                    n.push({value: t, color: e(t, i)})
                }

                for (var a = 0, r = 0, s = i.length, l = t.length; r < l && (!i.length || t[r] <= i[0]); r++) t[r] < i[a] && o(t[r], "outOfRange");
                for (var d = 1; a < s; a++, d = 0) d && n.length && o(i[a], "outOfRange"), o(i[a], "inRange");
                for (d = 1; r < l; r++) (!i.length || i[i.length - 1] < t[r]) && (d && (n.length && o(n[n.length - 1].value, "outOfRange"), d = 0), o(t[r], "outOfRange"));
                var u = n.length;
                return {stops: n, outerColors: [u ? n[0].color : "transparent", u ? n[u - 1].color : "transparent"]}
            }
        });

        function ox(e, t, i) {
            if (i[0] === i[1]) return i.slice();
            for (var n = (i[1] - i[0]) / 200, o = i[0], a = [], r = 0; r <= 200 && o < i[1]; r++) a.push(o), o += n;
            return a.push(i[1]), a
        }

        var ax = wf({
            type: "visualMap", autoPositionValues: {left: 1, right: 1, top: 1, bottom: 1}, init: function (e, t) {
                this.ecModel = e, this.api = t, this.visualMapModel
            }, render: function (e, t, i, n) {
                !1 !== (this.visualMapModel = e).get("show") ? this.doRender.apply(this, arguments) : this.group.removeAll()
            }, renderBackground: function (e) {
                var t = this.visualMapModel, i = Jl(t.get("padding") || 0), n = e.getBoundingRect();
                e.add(new es({
                    z2: -1,
                    silent: !0,
                    shape: {x: n.x - i[3], y: n.y - i[0], width: n.width + i[3] + i[1], height: n.height + i[0] + i[2]},
                    style: {
                        fill: t.get("backgroundColor"),
                        stroke: t.get("borderColor"),
                        lineWidth: t.get("borderWidth")
                    }
                }))
            }, getControllerVisual: function (e, t, i) {
                var n = (i = i || {}).forceState, o = this.visualMapModel, a = {};
                if ("symbol" === t && (a.symbol = o.get("itemSymbol")), "color" === t) {
                    var r = o.get("contentColor");
                    a.color = r
                }

                function s(e) {
                    return a[e]
                }

                function l(e, t) {
                    a[e] = t
                }

                var d = o.controllerVisuals[n || o.getValueState(e)];
                return D(ZT.prepareVisualTypes(d), function (n) {
                    var o = d[n];
                    i.convertOpacityToAlpha && "opacity" === n && (n = "colorAlpha", o = d.__alphaForOpacity), ZT.dependsOn(n, t) && o && o.applyVisual(e, s, l)
                }), a[t]
            }, positionGroup: function (e) {
                var t = this.visualMapModel, i = this.api;
                vd(e, t.getBoxLayoutParams(), {width: i.getWidth(), height: i.getHeight()})
            }, doRender: te
        });

        function rx(e, t, i) {
            var n = e.option, o = n.align;
            if (null != o && "auto" !== o) return o;
            for (var a = {
                width: t.getWidth(),
                height: t.getHeight()
            }, r = "horizontal" === n.orient ? 1 : 0, s = [["left", "right", "width"], ["top", "bottom", "height"]], l = s[r], d = [0, null, 10], u = {}, c = 0; c < 3; c++) u[s[1 - r][c]] = d[c], u[l[c]] = 2 === c ? i[0] : n[l[c]];
            var h = [["x", "width", 3], ["y", "height", 0]][r], f = md(u, a, n.padding);
            return l[(f.margin[h[2]] || 0) + f[h[0]] + .5 * f[h[1]] < .5 * a[h[1]] ? 0 : 1]
        }

        function sx(e, t) {
            return D(e || [], function (e) {
                null != e.dataIndex && (e.dataIndexInside = e.dataIndex, e.dataIndex = null), e.highlightKey = "visualMap" + (t ? t.componentIndex : "")
            }), e
        }

        var lx = Nl, dx = D, ux = Math.min, cx = Math.max, hx = ax.extend({
            type: "visualMap.continuous", init: function () {
                hx.superApply(this, "init", arguments), this._shapes = {}, this._dataInterval = [], this._handleEnds = [], this._orient, this._useHandle, this._hoverLinkDataIndices = [], this._dragging, this._hovering
            }, doRender: function (e, t, i, n) {
                n && "selectDataRange" === n.type && n.from === this.uid || this._buildView()
            }, _buildView: function () {
                this.group.removeAll();
                var e = this.visualMapModel, t = this.group;
                this._orient = e.get("orient"), this._useHandle = e.get("calculable"), this._resetInterval(), this._renderBar(t);
                var i = e.get("text");
                this._renderEndsText(t, i, 0), this._renderEndsText(t, i, 1), this._updateView(!0), this.renderBackground(t), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(t)
            }, _renderEndsText: function (e, t, i) {
                if (t) {
                    var n = t[1 - i];
                    n = null != n ? n + "" : "";
                    var o = this.visualMapModel, a = o.get("textGap"), r = o.itemSize, s = this._shapes.barGroup,
                        l = this._applyTransform([r[0] / 2, 0 === i ? -a : r[1] + a], s),
                        d = this._applyTransform(0 === i ? "bottom" : "top", s), u = this._orient,
                        c = this.visualMapModel.textStyleModel;
                    this.group.add(new Ur({
                        style: {
                            x: l[0],
                            y: l[1],
                            textVerticalAlign: "horizontal" === u ? "middle" : d,
                            textAlign: "horizontal" === u ? d : "center",
                            text: n,
                            textFont: c.getFont(),
                            textFill: c.getTextColor()
                        }
                    }))
                }
            }, _renderBar: function (e) {
                var t = this.visualMapModel, i = this._shapes, n = t.itemSize, o = this._orient, a = this._useHandle,
                    r = rx(t, this.api, n), s = i.barGroup = this._createBarGroup(r);
                s.add(i.outOfRange = fx()), s.add(i.inRange = fx(null, a ? gx(this._orient) : null, O(this._dragHandle, this, "all", !1), O(this._dragHandle, this, "all", !0)));
                var l = t.textStyleModel.getTextRect("国"), d = cx(l.width, l.height);
                a && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(s, 0, n, d, o, r), this._createHandle(s, 1, n, d, o, r)), this._createIndicator(s, n, d, o), e.add(s)
            }, _createHandle: function (e, t, i, n, o) {
                var a = O(this._dragHandle, this, t, !1), r = O(this._dragHandle, this, t, !0), s = fx(function (e, t) {
                    return 0 === e ? [[0, 0], [t, 0], [t, -t]] : [[0, 0], [t, 0], [t, t]]
                }(t, n), gx(this._orient), a, r);
                s.position[0] = i[0], e.add(s);
                var l = this.visualMapModel.textStyleModel, d = new Ur({
                    draggable: !0,
                    drift: a,
                    onmousemove: function (e) {
                        ze(e.event)
                    },
                    ondragend: r,
                    style: {x: 0, y: 0, text: "", textFont: l.getFont(), textFill: l.getTextColor()}
                });
                this.group.add(d);
                var u = ["horizontal" === o ? n / 2 : 1.5 * n, "horizontal" === o ? 0 === t ? -1.5 * n : 1.5 * n : 0 === t ? -n / 2 : n / 2],
                    c = this._shapes;
                c.handleThumbs[t] = s, c.handleLabelPoints[t] = u, c.handleLabels[t] = d
            }, _createIndicator: function (e, t, i, n) {
                var o = fx([[0, 0]], "move");
                o.position[0] = t[0], o.attr({invisible: !0, silent: !0}), e.add(o);
                var a = this.visualMapModel.textStyleModel, r = new Ur({
                    silent: !0,
                    invisible: !0,
                    style: {x: 0, y: 0, text: "", textFont: a.getFont(), textFill: a.getTextColor()}
                });
                this.group.add(r);
                var s = ["horizontal" === n ? i / 2 : 9, 0], l = this._shapes;
                l.indicator = o, l.indicatorLabel = r, l.indicatorLabelPoint = s
            }, _dragHandle: function (e, t, i, n) {
                if (this._useHandle) {
                    if (this._dragging = !t, !t) {
                        var o = this._applyTransform([i, n], this._shapes.barGroup, !0);
                        this._updateInterval(e, o[1]), this._updateView()
                    }
                    t === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
                        type: "selectDataRange",
                        from: this.uid,
                        visualMapId: this.visualMapModel.id,
                        selected: this._dataInterval.slice()
                    }), t ? this._hovering || this._clearHoverLinkToSeries() : px(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[e], !1)
                }
            }, _resetInterval: function () {
                var e = this.visualMapModel, t = this._dataInterval = e.getSelected(), i = e.getExtent(),
                    n = [0, e.itemSize[1]];
                this._handleEnds = [lx(t[0], i, n, !0), lx(t[1], i, n, !0)]
            }, _updateInterval: function (e, t) {
                t = t || 0;
                var i = this.visualMapModel, n = this._handleEnds, o = [0, i.itemSize[1]];
                Ek(t, n, o, e, 0);
                var a = i.getExtent();
                this._dataInterval = [lx(n[0], o, a, !0), lx(n[1], o, a, !0)]
            }, _updateView: function (e) {
                var t = this.visualMapModel, i = t.getExtent(), n = this._shapes, o = [0, t.itemSize[1]],
                    a = e ? o : this._handleEnds, r = this._createBarVisual(this._dataInterval, i, a, "inRange"),
                    s = this._createBarVisual(i, i, o, "outOfRange");
                n.inRange.setStyle({
                    fill: r.barColor,
                    opacity: r.opacity
                }).setShape("points", r.barPoints), n.outOfRange.setStyle({
                    fill: s.barColor,
                    opacity: s.opacity
                }).setShape("points", s.barPoints), this._updateHandle(a, r)
            }, _createBarVisual: function (e, t, i, n) {
                var o = {forceState: n, convertOpacityToAlpha: !0}, a = this._makeColorGradient(e, o),
                    r = [this.getControllerVisual(e[0], "symbolSize", o), this.getControllerVisual(e[1], "symbolSize", o)],
                    s = this._createBarPoints(i, r);
                return {
                    barColor: new ds(0, 0, 0, 1, a),
                    barPoints: s,
                    handlesColor: [a[0].color, a[a.length - 1].color]
                }
            }, _makeColorGradient: function (e, t) {
                var i = [], n = (e[1] - e[0]) / 100;
                i.push({color: this.getControllerVisual(e[0], "color", t), offset: 0});
                for (var o = 1; o < 100; o++) {
                    var a = e[0] + n * o;
                    if (a > e[1]) break;
                    i.push({color: this.getControllerVisual(a, "color", t), offset: o / 100})
                }
                return i.push({color: this.getControllerVisual(e[1], "color", t), offset: 1}), i
            }, _createBarPoints: function (e, t) {
                var i = this.visualMapModel.itemSize;
                return [[i[0] - t[0], e[0]], [i[0], e[0]], [i[0], e[1]], [i[0] - t[1], e[1]]]
            }, _createBarGroup: function (e) {
                var t = this._orient, i = this.visualMapModel.get("inverse");
                return new Ai("horizontal" !== t || i ? "horizontal" === t && i ? {
                    scale: "bottom" === e ? [-1, 1] : [1, 1],
                    rotation: -Math.PI / 2
                } : "vertical" !== t || i ? {scale: "left" === e ? [1, 1] : [-1, 1]} : {scale: "left" === e ? [1, -1] : [-1, -1]} : {
                    scale: "bottom" === e ? [1, 1] : [-1, 1],
                    rotation: Math.PI / 2
                })
            }, _updateHandle: function (e, t) {
                if (this._useHandle) {
                    var i = this._shapes, n = this.visualMapModel, o = i.handleThumbs, a = i.handleLabels;
                    dx([0, 1], function (r) {
                        var s = o[r];
                        s.setStyle("fill", t.handlesColor[r]), s.position[1] = e[r];
                        var l = ll(i.handleLabelPoints[r], sl(s, this.group));
                        a[r].setStyle({
                            x: l[0],
                            y: l[1],
                            text: n.formatValueText(this._dataInterval[r]),
                            textVerticalAlign: "middle",
                            textAlign: this._applyTransform("horizontal" === this._orient ? 0 === r ? "bottom" : "top" : "left", i.barGroup)
                        })
                    }, this)
                }
            }, _showIndicator: function (e, t, i, n) {
                var o = this.visualMapModel, a = o.getExtent(), r = o.itemSize, s = [0, r[1]], l = lx(e, a, s, !0),
                    d = this._shapes, u = d.indicator;
                if (u) {
                    u.position[1] = l, u.attr("invisible", !1), u.setShape("points", function (e, t, i, n) {
                        return e ? [[0, -ux(t, cx(i, 0))], [6, 0], [0, ux(t, cx(n - i, 0))]] : [[0, 0], [5, -5], [5, 5]]
                    }(!!i, n, l, r[1]));
                    var c = this.getControllerVisual(e, "color", {convertOpacityToAlpha: !0});
                    u.setStyle("fill", c);
                    var h = ll(d.indicatorLabelPoint, sl(u, this.group)), f = d.indicatorLabel;
                    f.attr("invisible", !1);
                    var p = this._applyTransform("left", d.barGroup), g = this._orient;
                    f.setStyle({
                        text: (i || "") + o.formatValueText(t),
                        textVerticalAlign: "horizontal" === g ? p : "middle",
                        textAlign: "horizontal" === g ? "center" : p,
                        x: h[0],
                        y: h[1]
                    })
                }
            }, _enableHoverLinkToSeries: function () {
                var e = this;
                this._shapes.barGroup.on("mousemove", function (t) {
                    if (e._hovering = !0, !e._dragging) {
                        var i = e.visualMapModel.itemSize,
                            n = e._applyTransform([t.offsetX, t.offsetY], e._shapes.barGroup, !0, !0);
                        n[1] = ux(cx(0, n[1]), i[1]), e._doHoverLinkToSeries(n[1], 0 <= n[0] && n[0] <= i[0])
                    }
                }).on("mouseout", function () {
                    e._hovering = !1, e._dragging || e._clearHoverLinkToSeries()
                })
            }, _enableHoverLinkFromSeries: function () {
                var e = this.api.getZr();
                this.visualMapModel.option.hoverLink ? (e.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), e.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries()
            }, _doHoverLinkToSeries: function (e, t) {
                var i = this.visualMapModel, n = i.itemSize;
                if (i.option.hoverLink) {
                    var o = [0, n[1]], a = i.getExtent();
                    e = ux(cx(o[0], e), o[1]);
                    var r = function (e, t, i) {
                        var n = 6, o = e.get("hoverLinkDataSize");
                        return o && (n = lx(o, t, i, !0) / 2), n
                    }(i, a, o), s = [e - r, e + r], l = lx(e, o, a, !0), d = [lx(s[0], o, a, !0), lx(s[1], o, a, !0)];
                    s[0] < o[0] && (d[0] = -1 / 0), o[1] < s[1] && (d[1] = 1 / 0), t && (d[0] === -1 / 0 ? this._showIndicator(l, d[1], "< ", r) : d[1] === 1 / 0 ? this._showIndicator(l, d[0], "> ", r) : this._showIndicator(l, l, "≈ ", r));
                    this._hoverLinkDataIndices;
                    var u = [];
                    (t || px(i)) && (u = this._hoverLinkDataIndices = i.findTargetDataIndices(d));
                    var c = function (e, t) {
                        var i = {}, n = {};
                        return o([], i), o(t || [], n, i), [a(i), a(n)];

                        function o(e, t, i) {
                            for (var n = 0, o = e.length; n < o; n++) for (var a = e[n].seriesId, r = Po(e[n].dataIndex), s = i && i[a], l = 0, d = r.length; l < d; l++) {
                                var u = r[l];
                                s && s[u] ? s[u] = null : (t[a] || (t[a] = {}))[u] = 1
                            }
                        }

                        function a(e, t) {
                            var i = [];
                            for (var n in e) if (e.hasOwnProperty(n) && null != e[n]) if (t) i.push(+n); else {
                                var o = a(e[n], !0);
                                o.length && i.push({seriesId: n, dataIndex: o})
                            }
                            return i
                        }
                    }(0, u);
                    this._dispatchHighDown("downplay", sx(c[0], i)), this._dispatchHighDown("highlight", sx(c[1], i))
                }
            }, _hoverLinkFromSeriesMouseOver: function (e) {
                var t = e.target, i = this.visualMapModel;
                if (t && null != t.dataIndex) {
                    var n = this.ecModel.getSeriesByIndex(t.seriesIndex);
                    if (i.isTargetSeries(n)) {
                        var o = n.getData(t.dataType), a = o.get(i.getDataDimension(o), t.dataIndex, !0);
                        isNaN(a) || this._showIndicator(a, a)
                    }
                }
            }, _hideIndicator: function () {
                var e = this._shapes;
                e.indicator && e.indicator.attr("invisible", !0), e.indicatorLabel && e.indicatorLabel.attr("invisible", !0)
            }, _clearHoverLinkToSeries: function () {
                this._hideIndicator();
                var e = this._hoverLinkDataIndices;
                this._dispatchHighDown("downplay", sx(e, this.visualMapModel)), e.length = 0
            }, _clearHoverLinkFromSeries: function () {
                this._hideIndicator();
                var e = this.api.getZr();
                e.off("mouseover", this._hoverLinkFromSeriesMouseOver), e.off("mouseout", this._hideIndicator)
            }, _applyTransform: function (e, t, i, n) {
                var o = sl(t, n ? null : this.group);
                return ml[M(e) ? "applyTransform" : "transformDirection"](e, o, i)
            }, _dispatchHighDown: function (e, t) {
                t && t.length && this.api.dispatchAction({type: e, batch: t})
            }, dispose: function () {
                this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries()
            }, remove: function () {
                this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries()
            }
        });

        function fx(e, t, i, n) {
            return new Xr({
                shape: {points: e}, draggable: !!i, cursor: t, drift: i, onmousemove: function (e) {
                    ze(e.event)
                }, ondragend: n
            })
        }

        function px(e) {
            var t = e.get("hoverLinkOnHandle");
            return !!(null == t ? e.get("realtime") : t)
        }

        function gx(e) {
            return "vertical" === e ? "ns-resize" : "ew-resize"
        }

        ff({type: "selectDataRange", event: "dataRangeSelected", update: "update"}, function (e, t) {
            t.eachComponent({mainType: "visualMap", query: e}, function (t) {
                t.setSelected(e.selected)
            })
        }), cf(KN);
        var mx = tx.extend({
            type: "visualMap.piecewise",
            defaultOption: {
                selected: null,
                minOpen: !1,
                maxOpen: !1,
                align: "auto",
                itemWidth: 20,
                itemHeight: 14,
                itemSymbol: "roundRect",
                pieceList: null,
                categories: null,
                splitNumber: 5,
                selectedMode: "multiple",
                itemGap: 10,
                hoverLink: !0,
                showLabel: null
            },
            optionUpdated: function (e, t) {
                mx.superApply(this, "optionUpdated", arguments), this._pieceList = [], this.resetExtent();
                var i = this._mode = this._determineMode();
                vx[this._mode].call(this), this._resetSelected(e, t);
                var n = this.option.categories;
                this.resetVisual(function (e, t) {
                    "categories" === i ? (e.mappingMethod = "category", e.categories = m(n)) : (e.dataExtent = this.getExtent(), e.mappingMethod = "piecewise", e.pieceList = A(this._pieceList, function (e) {
                        return e = m(e), "inRange" !== t && (e.visual = null), e
                    }))
                })
            },
            completeVisualOption: function () {
                var e = this.option, t = {}, i = ZT.listVisualTypes(), n = this.isCategory();

                function o(e, t, i) {
                    return e && e[t] && (R(e[t]) ? e[t].hasOwnProperty(i) : e[t] === i)
                }

                D(e.pieces, function (e) {
                    D(i, function (i) {
                        e.hasOwnProperty(i) && (t[i] = 1)
                    })
                }), D(t, function (t, i) {
                    var a = 0;
                    D(this.stateList, function (t) {
                        a |= o(e, t, i) || o(e.target, t, i)
                    }, this), a || D(this.stateList, function (t) {
                        (e[t] || (e[t] = {}))[i] = XN(i, "inRange" === t ? "active" : "inactive", n)
                    })
                }, this), tx.prototype.completeVisualOption.apply(this, arguments)
            },
            _resetSelected: function (e, t) {
                var i = this.option, n = this._pieceList, o = (t ? i : e).selected || {};
                if (i.selected = o, D(n, function (e, t) {
                    var i = this.getSelectedMapKey(e);
                    o.hasOwnProperty(i) || (o[i] = !0)
                }, this), "single" === i.selectedMode) {
                    var a = !1;
                    D(n, function (e, t) {
                        var i = this.getSelectedMapKey(e);
                        o[i] && (a ? o[i] = !1 : a = !0)
                    }, this)
                }
            },
            getSelectedMapKey: function (e) {
                return "categories" === this._mode ? e.value + "" : e.index + ""
            },
            getPieceList: function () {
                return this._pieceList
            },
            _determineMode: function () {
                var e = this.option;
                return e.pieces && 0 < e.pieces.length ? "pieces" : this.option.categories ? "categories" : "splitNumber"
            },
            setSelected: function (e) {
                this.option.selected = m(e)
            },
            getValueState: function (e) {
                var t = ZT.findPieceIndex(e, this._pieceList);
                return null != t && this.option.selected[this.getSelectedMapKey(this._pieceList[t])] ? "inRange" : "outOfRange"
            },
            findTargetDataIndices: function (e) {
                var t = [];
                return this.eachTargetSeries(function (i) {
                    var n = [], o = i.getData();
                    o.each(this.getDataDimension(o), function (t, i) {
                        ZT.findPieceIndex(t, this._pieceList) === e && n.push(i)
                    }, this), t.push({seriesId: i.id, dataIndex: n})
                }, this), t
            },
            getRepresentValue: function (e) {
                var t;
                if (this.isCategory()) t = e.value; else if (null != e.value) t = e.value; else {
                    var i = e.interval || [];
                    t = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2
                }
                return t
            },
            getVisualMeta: function (e) {
                if (!this.isCategory()) {
                    var t = [], i = [], n = this, o = this._pieceList.slice();
                    if (o.length) {
                        var a = o[0].interval[0];
                        a !== -1 / 0 && o.unshift({interval: [-1 / 0, a]}), (a = o[o.length - 1].interval[1]) !== 1 / 0 && o.push({interval: [a, 1 / 0]})
                    } else o.push({interval: [-1 / 0, 1 / 0]});
                    var r = -1 / 0;
                    return D(o, function (e) {
                        var t = e.interval;
                        t && (t[0] > r && s([r, t[0]], "outOfRange"), s(t.slice()), r = t[1])
                    }, this), {stops: t, outerColors: i}
                }

                function s(o, a) {
                    var r = n.getRepresentValue({interval: o});
                    a = a || n.getValueState(r);
                    var s = e(r, a);
                    o[0] === -1 / 0 ? i[0] = s : o[1] === 1 / 0 ? i[1] = s : t.push({
                        value: o[0],
                        color: s
                    }, {value: o[1], color: s})
                }
            }
        }), vx = {
            splitNumber: function () {
                var e = this.option, t = this._pieceList, i = Math.min(e.precision, 20), n = this.getExtent(),
                    o = e.splitNumber;
                o = Math.max(parseInt(o, 10), 1), e.splitNumber = o;
                for (var a = (n[1] - n[0]) / o; +a.toFixed(i) !== a && i < 5;) i++;
                e.precision = i, a = +a.toFixed(i), e.minOpen && t.push({interval: [-1 / 0, n[0]], close: [0, 0]});
                for (var r = 0, s = n[0]; r < o; s += a, r++) {
                    var l = r === o - 1 ? n[1] : s + a;
                    t.push({interval: [s, l], close: [1, 1]})
                }
                e.maxOpen && t.push({interval: [n[1], 1 / 0], close: [0, 0]}), Hl(t), D(t, function (e, t) {
                    e.index = t, e.text = this.formatValueText(e.interval)
                }, this)
            }, categories: function () {
                var e = this.option;
                D(e.categories, function (e) {
                    this._pieceList.push({text: this.formatValueText(e, !0), value: e})
                }, this), yx(e, this._pieceList)
            }, pieces: function () {
                var e = this.option, t = this._pieceList;
                D(e.pieces, function (e, i) {
                    R(e) || (e = {value: e});
                    var n = {text: "", index: i};
                    if (null != e.label && (n.text = e.label), e.hasOwnProperty("value")) {
                        var o = n.value = e.value;
                        n.interval = [o, o], n.close = [1, 1]
                    } else {
                        for (var a = n.interval = [], r = n.close = [0, 0], s = [1, 0, 1], l = [-1 / 0, 1 / 0], d = [], u = 0; u < 2; u++) {
                            for (var c = [["gte", "gt", "min"], ["lte", "lt", "max"]][u], h = 0; h < 3 && null == a[u]; h++) a[u] = e[c[h]], r[u] = s[h], d[u] = 2 === h;
                            null == a[u] && (a[u] = l[u])
                        }
                        d[0] && a[1] === 1 / 0 && (r[0] = 0), d[1] && a[0] === -1 / 0 && (r[1] = 0), a[0] === a[1] && r[0] && r[1] && (n.value = a[0])
                    }
                    n.visual = ZT.retrieveVisuals(e), t.push(n)
                }, this), yx(e, t), Hl(t), D(t, function (e) {
                    var t = e.close, i = [["<", "≤"][t[1]], [">", "≥"][t[0]]];
                    e.text = e.text || this.formatValueText(null != e.value ? e.value : e.interval, !1, i)
                }, this)
            }
        };

        function yx(e, t) {
            var i = e.inverse;
            ("vertical" === e.orient ? !i : i) && t.reverse()
        }

        ax.extend({
            type: "visualMap.piecewise", doRender: function () {
                var e = this.group;
                e.removeAll();
                var t = this.visualMapModel, i = t.get("textGap"), n = t.textStyleModel, o = n.getFont(),
                    a = n.getTextColor(), r = this._getItemAlign(), s = t.itemSize, l = this._getViewData(),
                    d = l.endsText, u = G(t.get("showLabel", !0), !d);
                d && this._renderEndsText(e, d[0], s, u, r), D(l.viewPieceList, function (n) {
                    var l = n.piece, d = new Ai;
                    d.onclick = O(this._onItemClick, this, l), this._enableHoverLink(d, n.indexInModelPieceList);
                    var c = t.getRepresentValue(l);
                    if (this._createItemSymbol(d, c, [0, 0, s[0], s[1]]), u) {
                        var h = this.visualMapModel.getValueState(c);
                        d.add(new Ur({
                            style: {
                                x: "right" === r ? -i : s[0] + i,
                                y: s[1] / 2,
                                text: l.text,
                                textVerticalAlign: "middle",
                                textAlign: r,
                                textFont: o,
                                textFill: a,
                                opacity: "outOfRange" === h ? .5 : 1
                            }
                        }))
                    }
                    e.add(d)
                }, this), d && this._renderEndsText(e, d[1], s, u, r), gd(t.get("orient"), e, t.get("itemGap")), this.renderBackground(e), this.positionGroup(e)
            }, _enableHoverLink: function (e, t) {
                function i(e) {
                    var i = this.visualMapModel;
                    i.option.hoverLink && this.api.dispatchAction({type: e, batch: sx(i.findTargetDataIndices(t), i)})
                }

                e.on("mouseover", O(i, this, "highlight")).on("mouseout", O(i, this, "downplay"))
            }, _getItemAlign: function () {
                var e = this.visualMapModel, t = e.option;
                if ("vertical" === t.orient) return rx(e, this.api, e.itemSize);
                var i = t.align;
                return i && "auto" !== i || (i = "left"), i
            }, _renderEndsText: function (e, t, i, n, o) {
                if (t) {
                    var a = new Ai, r = this.visualMapModel.textStyleModel;
                    a.add(new Ur({
                        style: {
                            x: n ? "right" === o ? i[0] : 0 : i[0] / 2,
                            y: i[1] / 2,
                            textVerticalAlign: "middle",
                            textAlign: n ? o : "center",
                            text: t,
                            textFont: r.getFont(),
                            textFill: r.getTextColor()
                        }
                    })), e.add(a)
                }
            }, _getViewData: function () {
                var e = this.visualMapModel, t = A(e.getPieceList(), function (e, t) {
                    return {piece: e, indexInModelPieceList: t}
                }), i = e.get("text"), n = e.get("orient"), o = e.get("inverse");
                return ("horizontal" === n ? o : !o) ? t.reverse() : i = i && i.slice().reverse(), {
                    viewPieceList: t,
                    endsText: i
                }
            }, _createItemSymbol: function (e, t, i) {
                e.add(cg(this.getControllerVisual(t, "symbol"), i[0], i[1], i[2], i[3], this.getControllerVisual(t, "color")))
            }, _onItemClick: function (e) {
                var t = this.visualMapModel, i = t.option, n = m(i.selected), o = t.getSelectedMapKey(e);
                "single" === i.selectedMode ? (n[o] = !0, D(n, function (e, t) {
                    n[t] = t === o
                })) : n[o] = !n[o], this.api.dispatchAction({
                    type: "selectDataRange",
                    from: this.uid,
                    visualMapId: this.visualMapModel.id,
                    selected: n
                })
            }
        }), cf(KN);
        var Tx, kx = "urn:schemas-microsoft-com:vml", Cx = "undefined" == typeof window ? null : window, bx = !1,
            Ix = Cx && Cx.document;

        function Sx(e) {
            return Tx(e)
        }

        if (Ix && !o.canvasSupported) try {
            Ix.namespaces.zrvml || Ix.namespaces.add("zrvml", kx), Tx = function (e) {
                return Ix.createElement("<zrvml:" + e + ' class="zrvml">')
            }
        } catch (e) {
            Tx = function (e) {
                return Ix.createElement("<" + e + ' xmlns="' + kx + '" class="zrvml">')
            }
        }
        var _x, Dx = er.CMD, Ax = Math.round, Nx = Math.sqrt, xx = Math.abs, Ex = Math.cos, Ox = Math.sin,
            Px = Math.max;
        if (!o.canvasSupported) {
            var Mx = ",", Fx = "progid:DXImageTransform.Microsoft", Lx = 21600, Rx = Lx / 2, Bx = function (e) {
                e.style.cssText = "position:absolute;left:0;top:0;width:1px;height:1px;", e.coordsize = Lx + "," + Lx, e.coordorigin = "0,0"
            }, Ux = function (e, t, i) {
                return "rgb(" + [e, t, i].join(",") + ")"
            }, Vx = function (e, t) {
                t && e && t.parentNode !== e && e.appendChild(t)
            }, Kx = function (e, t) {
                t && e && t.parentNode === e && e.removeChild(t)
            }, Gx = function (e, t, i) {
                return 1e5 * (parseFloat(e) || 0) + 1e3 * (parseFloat(t) || 0) + i
            }, Wx = Wn, jx = function (e, t, i) {
                var n = Kt(t);
                i = +i, isNaN(i) && (i = 1), n && (e.color = Ux(n[0], n[1], n[2]), e.opacity = i * n[3])
            }, Hx = function (e, t, i, n) {
                var o = "fill" === t, a = e.getElementsByTagName(t)[0];
                null != i[t] && "none" !== i[t] && (o || !o && i.lineWidth) ? (e[o ? "filled" : "stroked"] = "true", i[t] instanceof as && Kx(e, a), a = a || Sx(t), o ? function (e, t, i) {
                    var n, o, a = t.fill;
                    if (null != a) if (a instanceof as) {
                        var r, s = 0, l = [0, 0], d = 0, u = 1, c = i.getBoundingRect(), h = c.width, f = c.height;
                        if ("linear" === a.type) {
                            r = "gradient";
                            var p = i.transform, g = [a.x * h, a.y * f], m = [a.x2 * h, a.y2 * f];
                            p && (Ce(g, g, p), Ce(m, m, p));
                            var v = m[0] - g[0], y = m[1] - g[1];
                            (s = 180 * Math.atan2(v, y) / Math.PI) < 0 && (s += 360), s < 1e-6 && (s = 0)
                        } else {
                            r = "gradientradial", g = [a.x * h, a.y * f], p = i.transform;
                            var T = i.scale, w = h, k = f;
                            l = [(g[0] - c.x) / w, (g[1] - c.y) / k], p && Ce(g, g, p), w /= T[0] * Lx, k /= T[1] * Lx;
                            var C = Px(w, k);
                            d = 0 / C, u = 2 * a.r / C - d
                        }
                        var b = a.colorStops.slice();
                        b.sort(function (e, t) {
                            return e.offset - t.offset
                        });
                        for (var I = b.length, S = [], _ = [], D = 0; D < I; D++) {
                            var A = b[D], N = (n = A.color, o = Kt(n), [Ux(o[0], o[1], o[2]), o[3]]);
                            _.push(A.offset * u + d + " " + N[0]), 0 !== D && D !== I - 1 || S.push(N)
                        }
                        if (2 <= I) {
                            var x = S[0][0], E = S[1][0], O = S[0][1] * t.opacity, P = S[1][1] * t.opacity;
                            e.type = r, e.method = "none", e.focus = "100%", e.angle = s, e.color = x, e.color2 = E, e.colors = _.join(","), e.opacity = P, e.opacity2 = O
                        }
                        "radial" === r && (e.focusposition = l.join(","))
                    } else jx(e, a, t.opacity)
                }(a, i, n) : function (e, t) {
                    t.lineDash && (e.dashstyle = t.lineDash.join(" ")), null == t.stroke || t.stroke instanceof as || jx(e, t.stroke, t.opacity)
                }(a, i), Vx(e, a)) : (e[o ? "filled" : "stroked"] = "false", Kx(e, a))
            }, zx = [[], [], []];
            kr.prototype.brushVML = function (e) {
                var t = this.style, i = this._vmlEl;
                i || (i = Sx("shape"), Bx(i), this._vmlEl = i), Hx(i, "fill", t, this), Hx(i, "stroke", t, this);
                var n = this.transform, o = null != n, a = i.getElementsByTagName("stroke")[0];
                if (a) {
                    var r = t.lineWidth;
                    if (o && !t.strokeNoScale) {
                        var s = n[0] * n[3] - n[1] * n[2];
                        r *= Nx(xx(s))
                    }
                    a.weight = r + "px"
                }
                var l = this.path || (this.path = new er);
                this.__dirtyPath && (l.beginPath(), l.subPixelOptimize = !1, this.buildPath(l, this.shape), l.toStatic(), this.__dirtyPath = !1), i.path = function (e, t) {
                    var i, n, o, a, r, s, l = Dx.M, d = Dx.C, u = Dx.L, c = Dx.A, h = Dx.Q, f = [], p = e.data,
                        g = e.len();
                    for (a = 0; a < g;) {
                        switch (n = "", i = 0, o = p[a++]) {
                            case l:
                                n = " m ", i = 1, r = p[a++], s = p[a++], zx[0][0] = r, zx[0][1] = s;
                                break;
                            case u:
                                n = " l ", i = 1, r = p[a++], s = p[a++], zx[0][0] = r, zx[0][1] = s;
                                break;
                            case h:
                            case d:
                                n = " c ", i = 3;
                                var m, v, y = p[a++], T = p[a++], w = p[a++], k = p[a++];
                                o === h ? (w = ((m = w) + 2 * y) / 3, k = ((v = k) + 2 * T) / 3, y = (r + 2 * y) / 3, T = (s + 2 * T) / 3) : (m = p[a++], v = p[a++]), zx[0][0] = y, zx[0][1] = T, zx[1][0] = w, zx[1][1] = k, r = zx[2][0] = m, s = zx[2][1] = v;
                                break;
                            case c:
                                var C = 0, b = 0, I = 1, S = 1, _ = 0;
                                t && (C = t[4], b = t[5], I = Nx(t[0] * t[0] + t[1] * t[1]), S = Nx(t[2] * t[2] + t[3] * t[3]), _ = Math.atan2(-t[1] / S, t[0] / I));
                                var D = p[a++], A = p[a++], N = p[a++], x = p[a++], E = p[a++] + _, O = p[a++] + E + _;
                                a++;
                                var P = p[a++], M = D + Ex(E) * N, F = A + Ox(E) * x,
                                    L = (y = D + Ex(O) * N, T = A + Ox(O) * x, P ? " wa " : " at ");
                                Math.abs(M - y) < 1e-4 && (.01 < Math.abs(O - E) ? P && (M += .0125) : Math.abs(F - A) < 1e-4 ? P && M < D || !P && D < M ? T -= .0125 : T += .0125 : P && F < A || !P && A < F ? y += .0125 : y -= .0125), f.push(L, Ax(((D - N) * I + C) * Lx - Rx), Mx, Ax(((A - x) * S + b) * Lx - Rx), Mx, Ax(((D + N) * I + C) * Lx - Rx), Mx, Ax(((A + x) * S + b) * Lx - Rx), Mx, Ax((M * I + C) * Lx - Rx), Mx, Ax((F * S + b) * Lx - Rx), Mx, Ax((y * I + C) * Lx - Rx), Mx, Ax((T * S + b) * Lx - Rx)), r = y, s = T;
                                break;
                            case Dx.R:
                                var R = zx[0], B = zx[1];
                                R[0] = p[a++], R[1] = p[a++], B[0] = R[0] + p[a++], B[1] = R[1] + p[a++], t && (Ce(R, R, t), Ce(B, B, t)), R[0] = Ax(R[0] * Lx - Rx), B[0] = Ax(B[0] * Lx - Rx), R[1] = Ax(R[1] * Lx - Rx), B[1] = Ax(B[1] * Lx - Rx), f.push(" m ", R[0], Mx, R[1], " l ", B[0], Mx, R[1], " l ", B[0], Mx, B[1], " l ", R[0], Mx, B[1]);
                                break;
                            case Dx.Z:
                                f.push(" x ")
                        }
                        if (0 < i) {
                            f.push(n);
                            for (var U = 0; U < i; U++) {
                                var V = zx[U];
                                t && Ce(V, V, t), f.push(Ax(V[0] * Lx - Rx), Mx, Ax(V[1] * Lx - Rx), U < i - 1 ? Mx : "")
                            }
                        }
                    }
                    return f.join("")
                }(l, this.transform), i.style.zIndex = Gx(this.zlevel, this.z, this.z2), Vx(e, i), null != t.text ? this.drawRectText(e, this.getBoundingRect()) : this.removeRectText(e)
            }, kr.prototype.onRemove = function (e) {
                Kx(e, this._vmlEl), this.removeRectText(e)
            }, kr.prototype.onAdd = function (e) {
                Vx(e, this._vmlEl), this.appendRectText(e)
            }, Yn.prototype.brushVML = function (e) {
                var t, i, n = this.style, o = n.image;
                if (function (e) {
                    return "object" == typeof e && e.tagName && "IMG" === e.tagName.toUpperCase()
                }(o)) {
                    var a = o.src;
                    if (a === this._imageSrc) t = this._imageWidth, i = this._imageHeight; else {
                        var r = o.runtimeStyle, s = r.width, l = r.height;
                        r.width = "auto", r.height = "auto", t = o.width, i = o.height, r.width = s, r.height = l, this._imageSrc = a, this._imageWidth = t, this._imageHeight = i
                    }
                    o = a
                } else o === this._imageSrc && (t = this._imageWidth, i = this._imageHeight);
                if (o) {
                    var d = n.x || 0, u = n.y || 0, c = n.width, h = n.height, f = n.sWidth, p = n.sHeight,
                        g = n.sx || 0, m = n.sy || 0, v = f && p, y = this._vmlEl;
                    y || (y = Ix.createElement("div"), Bx(y), this._vmlEl = y);
                    var T, w = y.style, k = !1, C = 1, b = 1;
                    if (this.transform && (T = this.transform, C = Nx(T[0] * T[0] + T[1] * T[1]), b = Nx(T[2] * T[2] + T[3] * T[3]), k = T[1] || T[2]), k) {
                        var I = [d, u], S = [d + c, u], _ = [d, u + h], D = [d + c, u + h];
                        Ce(I, I, T), Ce(S, S, T), Ce(_, _, T), Ce(D, D, T);
                        var A = Px(I[0], S[0], _[0], D[0]), N = Px(I[1], S[1], _[1], D[1]), x = [];
                        x.push("M11=", T[0] / C, Mx, "M12=", T[2] / b, Mx, "M21=", T[1] / C, Mx, "M22=", T[3] / b, Mx, "Dx=", Ax(d * C + T[4]), Mx, "Dy=", Ax(u * b + T[5])), w.padding = "0 " + Ax(A) + "px " + Ax(N) + "px 0", w.filter = Fx + ".Matrix(" + x.join("") + ", SizingMethod=clip)"
                    } else T && (d = d * C + T[4], u = u * b + T[5]), w.filter = "", w.left = Ax(d) + "px", w.top = Ax(u) + "px";
                    var E = this._imageEl, O = this._cropEl;
                    E || (E = Ix.createElement("div"), this._imageEl = E);
                    var P = E.style;
                    if (v) {
                        if (t && i) P.width = Ax(C * t * c / f) + "px", P.height = Ax(b * i * h / p) + "px"; else {
                            var M = new Image, F = this;
                            M.onload = function () {
                                M.onload = null, t = M.width, i = M.height, P.width = Ax(C * t * c / f) + "px", P.height = Ax(b * i * h / p) + "px", F._imageWidth = t, F._imageHeight = i, F._imageSrc = o
                            }, M.src = o
                        }
                        O || ((O = Ix.createElement("div")).style.overflow = "hidden", this._cropEl = O);
                        var L = O.style;
                        L.width = Ax((c + g * c / f) * C), L.height = Ax((h + m * h / p) * b), L.filter = Fx + ".Matrix(Dx=" + -g * c / f * C + ",Dy=" + -m * h / p * b + ")", O.parentNode || y.appendChild(O), E.parentNode !== O && O.appendChild(E)
                    } else P.width = Ax(C * c) + "px", P.height = Ax(b * h) + "px", y.appendChild(E), O && O.parentNode && (y.removeChild(O), this._cropEl = null);
                    var R = "", B = n.opacity;
                    B < 1 && (R += ".Alpha(opacity=" + Ax(100 * B) + ") "), R += Fx + ".AlphaImageLoader(src=" + o + ", SizingMethod=scale)", P.filter = R, y.style.zIndex = Gx(this.zlevel, this.z, this.z2), Vx(e, y), null != n.text && this.drawRectText(e, this.getBoundingRect())
                }
            }, Yn.prototype.onRemove = function (e) {
                Kx(e, this._vmlEl), this._vmlEl = null, this._cropEl = null, this._imageEl = null, this.removeRectText(e)
            }, Yn.prototype.onAdd = function (e) {
                Vx(e, this._vmlEl), this.appendRectText(e)
            };
            var Xx, qx = "normal", Yx = {}, Jx = 0, Zx = document.createElement("div");
            _x = function (e, t) {
                var i = Ix;
                Xx || ((Xx = i.createElement("div")).style.cssText = "position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;", Ix.body.appendChild(Xx));
                try {
                    Xx.style.font = t
                } catch (e) {
                }
                return Xx.innerHTML = "", Xx.appendChild(i.createTextNode(e)), {width: Xx.offsetWidth}
            }, dn.measureText = _x;
            for (var Qx = new Di, $x = function (e, t, i, n) {
                var o = this.style;
                this.__dirty && En(o);
                var a = o.text;
                if (null != a && (a += ""), a) {
                    if (o.rich) {
                        var r = kn(a, o);
                        a = [];
                        for (var s = 0; s < r.lines.length; s++) {
                            for (var l = r.lines[s].tokens, d = [], u = 0; u < l.length; u++) d.push(l[u].text);
                            a.push(d.join(""))
                        }
                        a = a.join("\n")
                    }
                    var c, h, f = o.textAlign, p = o.textVerticalAlign, g = function (e) {
                        var t = Yx[e];
                        if (!t) {
                            100 < Jx && (Jx = 0, Yx = {});
                            var i, n = Zx.style;
                            try {
                                n.font = e, i = n.fontFamily.split(",")[0]
                            } catch (e) {
                            }
                            t = {
                                style: n.fontStyle || qx,
                                variant: n.fontVariant || qx,
                                weight: n.fontWeight || qx,
                                size: 0 | parseFloat(n.fontSize || 12),
                                family: i || "Microsoft YaHei"
                            }, Yx[e] = t, Jx++
                        }
                        return t
                    }(o.font), m = g.style + " " + g.variant + " " + g.weight + " " + g.size + 'px "' + g.family + '"';
                    i = i || cn(a, m, f, p, o.textPadding, o.textLineHeight);
                    var v = this.transform;
                    if (v && !n && (Qx.copy(t), Qx.applyTransform(v), t = Qx), n) c = t.x, h = t.y; else {
                        var y = o.textPosition;
                        if (y instanceof Array) c = t.x + Wx(y[0], t.width), h = t.y + Wx(y[1], t.height), f = f || "left"; else {
                            var T = this.calculateTextPosition ? this.calculateTextPosition({}, o, t) : pn({}, o, t);
                            c = T.x, h = T.y, f = f || T.textAlign, p = p || T.textVerticalAlign
                        }
                    }
                    c = hn(c, i.width, f), h = fn(h, i.height, p), h += i.height / 2;
                    var w, k, C, b = Sx, I = this._textVmlEl;
                    I ? k = (w = (C = I.firstChild).nextSibling).nextSibling : (I = b("line"), w = b("path"), k = b("textpath"), C = b("skew"), k.style["v-text-align"] = "left", Bx(I), w.textpathok = !0, k.on = !0, I.from = "0 0", I.to = "1000 0.05", Vx(I, C), Vx(I, w), Vx(I, k), this._textVmlEl = I);
                    var S = [c, h], _ = I.style;
                    v && n ? (Ce(S, S, v), C.on = !0, C.matrix = v[0].toFixed(3) + Mx + v[2].toFixed(3) + Mx + v[1].toFixed(3) + Mx + v[3].toFixed(3) + ",0,0", C.offset = (Ax(S[0]) || 0) + "," + (Ax(S[1]) || 0), C.origin = "0 0", _.left = "0px", _.top = "0px") : (C.on = !1, _.left = Ax(c) + "px", _.top = Ax(h) + "px"), k.string = function (e) {
                        return String(e).replace(/&/g, "&amp;").replace(/"/g, "&quot;")
                    }(a);
                    try {
                        k.style.font = m
                    } catch (e) {
                    }
                    Hx(I, "fill", {fill: o.textFill, opacity: o.opacity}, this), Hx(I, "stroke", {
                        stroke: o.textStroke,
                        opacity: o.opacity,
                        lineDash: o.lineDash || null
                    }, this), I.style.zIndex = Gx(this.zlevel, this.z, this.z2), Vx(e, I)
                }
            }, eE = function (e) {
                Kx(e, this._textVmlEl), this._textVmlEl = null
            }, tE = function (e) {
                Vx(e, this._textVmlEl)
            }, iE = [zn, qn, Yn, kr, Ur], nE = 0; nE < iE.length; nE++) {
                var oE = iE[nE].prototype;
                oE.drawRectText = $x, oE.removeRectText = eE, oE.appendRectText = tE
            }
            Ur.prototype.brushVML = function (e) {
                var t = this.style;
                null != t.text ? this.drawRectText(e, {
                    x: t.x || 0,
                    y: t.y || 0,
                    width: 0,
                    height: 0
                }, this.getBoundingRect(), !0) : this.removeRectText(e)
            }, Ur.prototype.onRemove = function (e) {
                this.removeRectText(e)
            }, Ur.prototype.onAdd = function (e) {
                this.appendRectText(e)
            }
        }

        function aE(e) {
            return parseInt(e, 10)
        }

        function rE(e, t) {
            !function () {
                if (!bx && Ix) {
                    bx = !0;
                    var e = Ix.styleSheets;
                    e.length < 31 ? Ix.createStyleSheet().addRule(".zrvml", "behavior:url(#default#VML)") : e[0].addRule(".zrvml", "behavior:url(#default#VML)")
                }
            }(), this.root = e, this.storage = t;
            var i = document.createElement("div"), n = document.createElement("div");
            i.style.cssText = "display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;", n.style.cssText = "position:absolute;left:0;top:0;", e.appendChild(i), this._vmlRoot = n, this._vmlViewport = i, this.resize();
            var o = t.delFromStorage, a = t.addToStorage;
            t.delFromStorage = function (e) {
                o.call(t, e), e && e.onRemove && e.onRemove(n)
            }, t.addToStorage = function (e) {
                e.onAdd && e.onAdd(n), a.call(t, e)
            }, this._firstPaint = !0
        }

        function sE(e) {
            return document.createElementNS("http://www.w3.org/2000/svg", e)
        }

        rE.prototype = {
            constructor: rE, getType: function () {
                return "vml"
            }, getViewportRoot: function () {
                return this._vmlViewport
            }, getViewportRootOffset: function () {
                var e = this.getViewportRoot();
                if (e) return {offsetLeft: e.offsetLeft || 0, offsetTop: e.offsetTop || 0}
            }, refresh: function () {
                var e = this.storage.getDisplayList(!0, !0);
                this._paintList(e)
            }, _paintList: function (e) {
                for (var t = this._vmlRoot, i = 0; i < e.length; i++) {
                    var n = e[i];
                    n.invisible || n.ignore ? (n.__alreadyNotVisible || n.onRemove(t), n.__alreadyNotVisible = !0) : (n.__alreadyNotVisible && n.onAdd(t), n.__alreadyNotVisible = !1, n.__dirty && (n.beforeBrush && n.beforeBrush(), (n.brushVML || n.brush).call(n, t), n.afterBrush && n.afterBrush())), n.__dirty = !1
                }
                this._firstPaint && (this._vmlViewport.appendChild(t), this._firstPaint = !1)
            }, resize: function (e, t) {
                if (e = null == e ? this._getWidth() : e, t = null == t ? this._getHeight() : t, this._width !== e || this._height !== t) {
                    this._width = e, this._height = t;
                    var i = this._vmlViewport.style;
                    i.width = e + "px", i.height = t + "px"
                }
            }, dispose: function () {
                this.root.innerHTML = "", this._vmlRoot = this._vmlViewport = this.storage = null
            }, getWidth: function () {
                return this._width
            }, getHeight: function () {
                return this._height
            }, clear: function () {
                this._vmlViewport && this.root.removeChild(this._vmlViewport)
            }, _getWidth: function () {
                var e = this.root, t = e.currentStyle;
                return (e.clientWidth || aE(t.width)) - aE(t.paddingLeft) - aE(t.paddingRight) | 0
            }, _getHeight: function () {
                var e = this.root, t = e.currentStyle;
                return (e.clientHeight || aE(t.height)) - aE(t.paddingTop) - aE(t.paddingBottom) | 0
            }
        }, D(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function (e) {
            rE.prototype[e] = function (e) {
                return function () {
                    mi('In IE8.0 VML mode painter not support method "' + e + '"')
                }
            }(e)
        }), _o("vml", rE);
        var lE = er.CMD, dE = Array.prototype.join, uE = "none", cE = Math.round, hE = Math.sin, fE = Math.cos,
            pE = Math.PI, gE = 2 * Math.PI, mE = 180 / pE, vE = 1e-4;

        function yE(e) {
            return cE(1e4 * e) / 1e4
        }

        function TE(e) {
            return e < vE && -vE < e
        }

        function wE(e, t) {
            t && kE(e, "transform", "matrix(" + dE.call(t, ",") + ")")
        }

        function kE(e, t, i) {
            i && ("linear" === i.type || "radial" === i.type) || e.setAttribute(t, i)
        }

        function CE(e, t, i, n) {
            if (function (e, t) {
                var i = t ? e.textFill : e.fill;
                return null != i && i !== uE
            }(t, i)) {
                var o = i ? t.textFill : t.fill;
                kE(e, "fill", o = "transparent" === o ? uE : o), kE(e, "fill-opacity", null != t.fillOpacity ? t.fillOpacity * t.opacity : t.opacity)
            } else kE(e, "fill", uE);
            if (function (e, t) {
                var i = t ? e.textStroke : e.stroke;
                return null != i && i !== uE
            }(t, i)) {
                var a = i ? t.textStroke : t.stroke;
                kE(e, "stroke", a = "transparent" === a ? uE : a), kE(e, "stroke-width", (i ? t.textStrokeWidth : t.lineWidth) / (!i && t.strokeNoScale ? n.getLineScale() : 1)), kE(e, "paint-order", i ? "stroke" : "fill"), kE(e, "stroke-opacity", null != t.strokeOpacity ? t.strokeOpacity : t.opacity), t.lineDash ? (kE(e, "stroke-dasharray", t.lineDash.join(",")), kE(e, "stroke-dashoffset", cE(t.lineDashOffset || 0))) : kE(e, "stroke-dasharray", ""), t.lineCap && kE(e, "stroke-linecap", t.lineCap), t.lineJoin && kE(e, "stroke-linejoin", t.lineJoin), t.miterLimit && kE(e, "stroke-miterlimit", t.miterLimit)
            } else kE(e, "stroke", uE)
        }

        var bE = {
                brush: function (e) {
                    var t = e.style, i = e.__svgEl;
                    i || (i = sE("path"), e.__svgEl = i), e.path || e.createPathProxy();
                    var n = e.path;
                    if (e.__dirtyPath) {
                        n.beginPath(), n.subPixelOptimize = !1, e.buildPath(n, e.shape), e.__dirtyPath = !1;
                        var o = function (e) {
                            for (var t = [], i = e.data, n = e.len(), o = 0; o < n;) {
                                var a = "", r = 0;
                                switch (i[o++]) {
                                    case lE.M:
                                        a = "M", r = 2;
                                        break;
                                    case lE.L:
                                        a = "L", r = 2;
                                        break;
                                    case lE.Q:
                                        a = "Q", r = 4;
                                        break;
                                    case lE.C:
                                        a = "C", r = 6;
                                        break;
                                    case lE.A:
                                        var s = i[o++], l = i[o++], d = i[o++], u = i[o++], c = i[o++], h = i[o++],
                                            f = i[o++], p = i[o++], g = Math.abs(h),
                                            m = TE(g - gE) || (p ? gE <= h : gE <= -h), v = 0 < h ? h % gE : h % gE + gE,
                                            y = !1;
                                        y = !!m || !TE(g) && pE <= v == !!p;
                                        var T = yE(s + d * fE(c)), w = yE(l + u * hE(c));
                                        m && (h = p ? gE - 1e-4 : 1e-4 - gE, y = !0, 9 === o && t.push("M", T, w));
                                        var k = yE(s + d * fE(c + h)), C = yE(l + u * hE(c + h));
                                        t.push("A", yE(d), yE(u), cE(f * mE), +y, +p, k, C);
                                        break;
                                    case lE.Z:
                                        a = "Z";
                                        break;
                                    case lE.R:
                                        k = yE(i[o++]), C = yE(i[o++]);
                                        var b = yE(i[o++]), I = yE(i[o++]);
                                        t.push("M", k, C, "L", k + b, C, "L", k + b, C + I, "L", k, C + I, "L", k, C)
                                }
                                a && t.push(a);
                                for (var S = 0; S < r; S++) t.push(yE(i[o++]))
                            }
                            return t.join(" ")
                        }(n);
                        o.indexOf("NaN") < 0 && kE(i, "d", o)
                    }
                    CE(i, t, !1, e), wE(i, e.transform), null != t.text ? xE(e, e.getBoundingRect()) : OE(e)
                }
            }, IE = {
                brush: function (e) {
                    var t = e.style, i = t.image;
                    if (i instanceof HTMLImageElement && (i = i.src), i) {
                        var n = t.x || 0, o = t.y || 0, a = t.width, r = t.height, s = e.__svgEl;
                        s || (s = sE("image"), e.__svgEl = s), i !== e.__imageSrc && (function (e, t, i) {
                            e.setAttributeNS("http://www.w3.org/1999/xlink", "href", i)
                        }(s, 0, i), e.__imageSrc = i), kE(s, "width", a), kE(s, "height", r), kE(s, "x", n), kE(s, "y", o), wE(s, e.transform), null != t.text ? xE(e, e.getBoundingRect()) : OE(e)
                    }
                }
            }, SE = {}, _E = new Di, DE = {}, AE = [],
            NE = {left: "start", right: "end", center: "middle", middle: "middle"}, xE = function (e, t) {
                var i = e.style, n = e.transform, o = e instanceof Ur || i.transformText;
                e.__dirty && En(i);
                var a = i.text;
                if (null != a && (a += ""), Hn(a, i)) {
                    null == a && (a = ""), !o && n && (_E.copy(t), _E.applyTransform(n), t = _E);
                    var r = e.__textSvgEl;
                    r || (r = sE("text"), e.__textSvgEl = r);
                    var s = r.style, l = i.font || ln, d = r.__computedFont;
                    l !== r.__styleFont && (s.font = r.__styleFont = l, d = r.__computedFont = s.font);
                    var u = i.textPadding, c = i.textLineHeight, h = e.__textCotentBlock;
                    h && !e.__dirtyText || (h = e.__textCotentBlock = wn(a, d, u, c, i.truncate));
                    var f = h.outerHeight, p = h.lineHeight;
                    Un(DE, e, i, t);
                    var g = DE.baseX, m = DE.baseY, v = DE.textAlign || "left", y = DE.textVerticalAlign;
                    !function (e, t, i, n, o, a, r) {
                        rt(AE), t && i && st(AE, i);
                        var s = n.textRotation;
                        if (o && s) {
                            var l = n.textOrigin;
                            "center" === l ? (a = o.width / 2 + o.x, r = o.height / 2 + o.y) : l && (a = l[0] + o.x, r = l[1] + o.y), AE[4] -= a, AE[5] -= r, ut(AE, AE, s), AE[4] += a, AE[5] += r
                        }
                        wE(e, AE)
                    }(r, o, n, i, t, g, m);
                    var T = g, w = fn(m, f, y);
                    u && (T = function (e, t, i) {
                        return "right" === t ? e - i[1] : "center" === t ? e + i[3] / 2 - i[1] / 2 : e + i[3]
                    }(g, v, u), w += u[0]), w += p / 2, CE(r, i, !0, e);
                    var k = h.canCacheByTextString, C = e.__tspanList || (e.__tspanList = []), b = C.length;
                    if (k && e.__canCacheByTextString && e.__text === a) {
                        if (e.__dirtyText && b) for (var I = 0; I < b; ++I) EE(C[I], v, T, w + I * p)
                    } else {
                        e.__text = a, e.__canCacheByTextString = k;
                        var S = h.lines, _ = S.length;
                        for (I = 0; I < _; I++) {
                            var D = C[I], A = S[I];
                            D ? D.__zrText !== A && (D.innerHTML = "", D.appendChild(document.createTextNode(A))) : (D = C[I] = sE("tspan"), r.appendChild(D), D.appendChild(document.createTextNode(A))), EE(D, v, T, w + I * p)
                        }
                        if (_ < b) {
                            for (; I < b; I++) r.removeChild(C[I]);
                            C.length = _
                        }
                    }
                }
            };

        function EE(e, t, i, n) {
            kE(e, "dominant-baseline", "middle"), kE(e, "text-anchor", NE[t]), kE(e, "x", i), kE(e, "y", n)
        }

        function OE(e) {
            e && e.__textSvgEl && (e.__textSvgEl.parentNode && e.__textSvgEl.parentNode.removeChild(e.__textSvgEl), e.__textSvgEl = null, e.__tspanList = [], e.__text = null)
        }

        function PE() {
        }

        function ME(e, t) {
            for (var i = 0, n = t.length, o = 0, a = 0; i < n; i++) {
                var r = t[i];
                if (r.removed) {
                    for (s = [], l = a; l < a + r.count; l++) s.push(l);
                    r.indices = s, a += r.count
                } else {
                    for (var s = [], l = o; l < o + r.count; l++) s.push(l);
                    r.indices = s, o += r.count, r.added || (a += r.count)
                }
            }
            return t
        }

        SE.drawRectText = xE, SE.brush = function (e) {
            null != e.style.text ? xE(e, !1) : OE(e)
        }, PE.prototype = {
            diff: function (e, t, i) {
                i = i || function (e, t) {
                    return e === t
                }, this.equals = i;
                var n = this;
                e = e.slice();
                var o = (t = t.slice()).length, a = e.length, r = 1, s = o + a, l = [{newPos: -1, components: []}],
                    d = this.extractCommon(l[0], t, e, 0);
                if (l[0].newPos + 1 >= o && a <= d + 1) {
                    for (var u = [], c = 0; c < t.length; c++) u.push(c);
                    return [{indices: u, count: t.length}]
                }

                function h() {
                    for (var i = -1 * r; i <= r; i += 2) {
                        var s, d = l[i - 1], u = l[i + 1], c = (u ? u.newPos : 0) - i;
                        d && (l[i - 1] = void 0);
                        var h = d && d.newPos + 1 < o, f = u && 0 <= c && c < a;
                        if (h || f) {
                            if (!h || f && d.newPos < u.newPos ? (s = {
                                newPos: (p = u).newPos,
                                components: p.components.slice(0)
                            }, n.pushComponent(s.components, void 0, !0)) : ((s = d).newPos++, n.pushComponent(s.components, !0, void 0)), c = n.extractCommon(s, t, e, i), s.newPos + 1 >= o && a <= c + 1) return ME(0, s.components);
                            l[i] = s
                        } else l[i] = void 0
                    }
                    var p;
                    r++
                }

                for (; r <= s;) {
                    var f = h();
                    if (f) return f
                }
            }, pushComponent: function (e, t, i) {
                var n = e[e.length - 1];
                n && n.added === t && n.removed === i ? e[e.length - 1] = {
                    count: n.count + 1,
                    added: t,
                    removed: i
                } : e.push({count: 1, added: t, removed: i})
            }, extractCommon: function (e, t, i, n) {
                for (var o = t.length, a = i.length, r = e.newPos, s = r - n, l = 0; r + 1 < o && s + 1 < a && this.equals(t[r + 1], i[s + 1]);) r++, s++, l++;
                return l && e.components.push({count: l}), e.newPos = r, s
            }, tokenize: function (e) {
                return e.slice()
            }, join: function (e) {
                return e.slice()
            }
        };
        var FE = new PE;

        function LE(e, t, i, n, o) {
            this._zrId = e, this._svgRoot = t, this._tagNames = "string" == typeof i ? [i] : i, this._markLabel = n, this._domName = o || "_dom", this.nextId = 0
        }

        function RE(e, t) {
            LE.call(this, e, t, ["linearGradient", "radialGradient"], "__gradient_in_use__")
        }

        function BE(e, t) {
            LE.call(this, e, t, "clipPath", "__clippath_in_use__")
        }

        function UE(e, t) {
            LE.call(this, e, t, ["filter"], "__filter_in_use__", "_shadowDom")
        }

        function VE(e) {
            return e && (e.shadowBlur || e.shadowOffsetX || e.shadowOffsetY || e.textShadowBlur || e.textShadowOffsetX || e.textShadowOffsetY)
        }

        function KE(e) {
            return parseInt(e, 10)
        }

        function GE(e, t) {
            return t && e && t.parentNode !== e
        }

        function WE(e, t, i) {
            if (GE(e, t) && i) {
                var n = i.nextSibling;
                n ? e.insertBefore(t, n) : e.appendChild(t)
            }
        }

        function jE(e, t) {
            if (GE(e, t)) {
                var i = e.firstChild;
                i ? e.insertBefore(t, i) : e.appendChild(t)
            }
        }

        function HE(e, t) {
            t && e && t.parentNode === e && e.removeChild(t)
        }

        function zE(e) {
            return e.__textSvgEl
        }

        function XE(e) {
            return e.__svgEl
        }

        function qE(e, t, i, n) {
            this.root = e, this.storage = t, this._opts = i = T({}, i || {});
            var o = sE("svg");
            o.setAttribute("xmlns", "http://www.w3.org/2000/svg"), o.setAttribute("version", "1.1"), o.setAttribute("baseProfile", "full"), o.style.cssText = "user-select:none;position:absolute;left:0;top:0;";
            var a = sE("g");
            o.appendChild(a);
            var r = sE("g");
            o.appendChild(r), this.gradientManager = new RE(n, r), this.clipPathManager = new BE(n, r), this.shadowManager = new UE(n, r);
            var s = document.createElement("div");
            s.style.cssText = "overflow:hidden;position:relative", this._svgDom = o, this._svgRoot = r, this._backgroundRoot = a, this._viewport = s, e.appendChild(s), s.appendChild(o), this.resize(i.width, i.height), this._visibleList = []
        }

        LE.prototype.createElement = sE, LE.prototype.getDefs = function (e) {
            var t = this._svgRoot, i = this._svgRoot.getElementsByTagName("defs");
            return 0 === i.length ? e ? ((i = t.insertBefore(this.createElement("defs"), t.firstChild)).contains || (i.contains = function (e) {
                var t = i.children;
                if (!t) return !1;
                for (var n = t.length - 1; 0 <= n; --n) if (t[n] === e) return !0;
                return !1
            }), i) : null : i[0]
        }, LE.prototype.update = function (e, t) {
            if (e) {
                var i = this.getDefs(!1);
                if (e[this._domName] && i.contains(e[this._domName])) "function" == typeof t && t(e); else {
                    var n = this.add(e);
                    n && (e[this._domName] = n)
                }
            }
        }, LE.prototype.addDom = function (e) {
            this.getDefs(!0).appendChild(e)
        }, LE.prototype.removeDom = function (e) {
            var t = this.getDefs(!1);
            t && e[this._domName] && (t.removeChild(e[this._domName]), e[this._domName] = null)
        }, LE.prototype.getDoms = function () {
            var e = this.getDefs(!1);
            if (!e) return [];
            var t = [];
            return D(this._tagNames, function (i) {
                var n = e.getElementsByTagName(i);
                t = t.concat([].slice.call(n))
            }), t
        }, LE.prototype.markAllUnused = function () {
            var e = this.getDoms(), t = this;
            D(e, function (e) {
                e[t._markLabel] = "0"
            })
        }, LE.prototype.markUsed = function (e) {
            e && (e[this._markLabel] = "1")
        }, LE.prototype.removeUnused = function () {
            var e = this.getDefs(!1);
            if (e) {
                var t = this.getDoms(), i = this;
                D(t, function (t) {
                    "1" !== t[i._markLabel] && e.removeChild(t)
                })
            }
        }, LE.prototype.getSvgProxy = function (e) {
            return e instanceof kr ? bE : e instanceof Yn ? IE : e instanceof Ur ? SE : bE
        }, LE.prototype.getTextSvgElement = function (e) {
            return e.__textSvgEl
        }, LE.prototype.getSvgElement = function (e) {
            return e.__svgEl
        }, I(RE, LE), RE.prototype.addWithoutUpdate = function (e, t) {
            if (t && t.style) {
                var i = this;
                D(["fill", "stroke"], function (n) {
                    if (t.style[n] && ("linear" === t.style[n].type || "radial" === t.style[n].type)) {
                        var o, a = t.style[n], r = i.getDefs(!0);
                        a._dom ? (o = a._dom, r.contains(a._dom) || i.addDom(o)) : o = i.add(a), i.markUsed(t);
                        var s = o.getAttribute("id");
                        e.setAttribute(n, "url(#" + s + ")")
                    }
                })
            }
        }, RE.prototype.add = function (e) {
            var t;
            if ("linear" === e.type) t = this.createElement("linearGradient"); else {
                if ("radial" !== e.type) return mi("Illegal gradient type."), null;
                t = this.createElement("radialGradient")
            }
            return e.id = e.id || this.nextId++, t.setAttribute("id", "zr" + this._zrId + "-gradient-" + e.id), this.updateDom(e, t), this.addDom(t), t
        }, RE.prototype.update = function (e) {
            var t = this;
            LE.prototype.update.call(this, e, function () {
                var i = e.type, n = e._dom.tagName;
                "linear" === i && "linearGradient" === n || "radial" === i && "radialGradient" === n ? t.updateDom(e, e._dom) : (t.removeDom(e), t.add(e))
            })
        }, RE.prototype.updateDom = function (e, t) {
            if ("linear" === e.type) t.setAttribute("x1", e.x), t.setAttribute("y1", e.y), t.setAttribute("x2", e.x2), t.setAttribute("y2", e.y2); else {
                if ("radial" !== e.type) return void mi("Illegal gradient type.");
                t.setAttribute("cx", e.x), t.setAttribute("cy", e.y), t.setAttribute("r", e.r)
            }
            e.global ? t.setAttribute("gradientUnits", "userSpaceOnUse") : t.setAttribute("gradientUnits", "objectBoundingBox"), t.innerHTML = "";
            for (var i = e.colorStops, n = 0, o = i.length; n < o; ++n) {
                var a = this.createElement("stop");
                a.setAttribute("offset", 100 * i[n].offset + "%");
                var r = i[n].color;
                if (r.indexOf(!1)) {
                    var s = Kt(r)[3], l = jt(r);
                    a.setAttribute("stop-color", "#" + l), a.setAttribute("stop-opacity", s)
                } else a.setAttribute("stop-color", i[n].color);
                t.appendChild(a)
            }
            e._dom = t
        }, RE.prototype.markUsed = function (e) {
            if (e.style) {
                var t = e.style.fill;
                t && t._dom && LE.prototype.markUsed.call(this, t._dom), (t = e.style.stroke) && t._dom && LE.prototype.markUsed.call(this, t._dom)
            }
        }, I(BE, LE), BE.prototype.update = function (e) {
            var t = this.getSvgElement(e);
            t && this.updateDom(t, e.__clipPaths, !1);
            var i = this.getTextSvgElement(e);
            i && this.updateDom(i, e.__clipPaths, !0), this.markUsed(e)
        }, BE.prototype.updateDom = function (e, t, i) {
            if (t && 0 < t.length) {
                var n, o, a = this.getDefs(!0), r = t[0], s = i ? "_textDom" : "_dom";
                r[s] ? (o = r[s].getAttribute("id"), n = r[s], a.contains(n) || a.appendChild(n)) : (o = "zr" + this._zrId + "-clip-" + this.nextId, ++this.nextId, (n = this.createElement("clipPath")).setAttribute("id", o), a.appendChild(n), r[s] = n);
                var l = this.getSvgProxy(r);
                if (r.transform && r.parent.invTransform && !i) {
                    var d = Array.prototype.slice.call(r.transform);
                    lt(r.transform, r.parent.invTransform, r.transform), l.brush(r), r.transform = d
                } else l.brush(r);
                var u = this.getSvgElement(r);
                n.innerHTML = "", n.appendChild(u.cloneNode()), e.setAttribute("clip-path", "url(#" + o + ")"), 1 < t.length && this.updateDom(n, t.slice(1), i)
            } else e && e.setAttribute("clip-path", "none")
        }, BE.prototype.markUsed = function (e) {
            var t = this;
            e.__clipPaths && D(e.__clipPaths, function (e) {
                e._dom && LE.prototype.markUsed.call(t, e._dom), e._textDom && LE.prototype.markUsed.call(t, e._textDom)
            })
        }, I(UE, LE), UE.prototype.addWithoutUpdate = function (e, t) {
            if (t && VE(t.style)) {
                var i;
                t._shadowDom ? (i = t._shadowDom, this.getDefs(!0).contains(t._shadowDom) || this.addDom(i)) : i = this.add(t), this.markUsed(t);
                var n = i.getAttribute("id");
                e.style.filter = "url(#" + n + ")"
            }
        }, UE.prototype.add = function (e) {
            var t = this.createElement("filter");
            return e._shadowDomId = e._shadowDomId || this.nextId++, t.setAttribute("id", "zr" + this._zrId + "-shadow-" + e._shadowDomId), this.updateDom(e, t), this.addDom(t), t
        }, UE.prototype.update = function (e, t) {
            if (VE(t.style)) {
                var i = this;
                LE.prototype.update.call(this, t, function () {
                    i.updateDom(t, t._shadowDom)
                })
            } else this.remove(e, t)
        }, UE.prototype.remove = function (e, t) {
            null != t._shadowDomId && (this.removeDom(e), e.style.filter = "")
        }, UE.prototype.updateDom = function (e, t) {
            var i = t.getElementsByTagName("feDropShadow");
            i = 0 === i.length ? this.createElement("feDropShadow") : i[0];
            var n, o, a, r, s = e.style, l = e.scale && e.scale[0] || 1, d = e.scale && e.scale[1] || 1;
            if (s.shadowBlur || s.shadowOffsetX || s.shadowOffsetY) n = s.shadowOffsetX || 0, o = s.shadowOffsetY || 0, a = s.shadowBlur, r = s.shadowColor; else {
                if (!s.textShadowBlur) return void this.removeDom(t, s);
                n = s.textShadowOffsetX || 0, o = s.textShadowOffsetY || 0, a = s.textShadowBlur, r = s.textShadowColor
            }
            i.setAttribute("dx", n / l), i.setAttribute("dy", o / d), i.setAttribute("flood-color", r);
            var u = a / 2 / l + " " + a / 2 / d;
            i.setAttribute("stdDeviation", u), t.setAttribute("x", "-100%"), t.setAttribute("y", "-100%"), t.setAttribute("width", Math.ceil(a / 2 * 200) + "%"), t.setAttribute("height", Math.ceil(a / 2 * 200) + "%"), t.appendChild(i), e._shadowDom = t
        }, UE.prototype.markUsed = function (e) {
            e._shadowDom && LE.prototype.markUsed.call(this, e._shadowDom)
        }, qE.prototype = {
            constructor: qE, getType: function () {
                return "svg"
            }, getViewportRoot: function () {
                return this._viewport
            }, getSvgDom: function () {
                return this._svgDom
            }, getSvgRoot: function () {
                return this._svgRoot
            }, getViewportRootOffset: function () {
                var e = this.getViewportRoot();
                if (e) return {offsetLeft: e.offsetLeft || 0, offsetTop: e.offsetTop || 0}
            }, refresh: function () {
                var e = this.storage.getDisplayList(!0);
                this._paintList(e)
            }, setBackgroundColor: function (e) {
                this._backgroundRoot && this._backgroundNode && this._backgroundRoot.removeChild(this._backgroundNode);
                var t = sE("rect");
                t.setAttribute("width", this.getWidth()), t.setAttribute("height", this.getHeight()), t.setAttribute("x", 0), t.setAttribute("y", 0), t.setAttribute("id", 0), t.style.fill = e, this._backgroundRoot.appendChild(t), this._backgroundNode = t
            }, _paintList: function (e) {
                this.gradientManager.markAllUnused(), this.clipPathManager.markAllUnused(), this.shadowManager.markAllUnused();
                var t, i, n = this._svgRoot, o = this._visibleList, a = e.length, r = [];
                for (t = 0; t < a; t++) {
                    var s = e[t], l = (i = s) instanceof kr ? bE : i instanceof Yn ? IE : i instanceof Ur ? SE : bE,
                        d = XE(s) || zE(s);
                    s.invisible || (s.__dirty && (l && l.brush(s), this.clipPathManager.update(s), s.style && (this.gradientManager.update(s.style.fill), this.gradientManager.update(s.style.stroke), this.shadowManager.update(d, s)), s.__dirty = !1), r.push(s))
                }
                var u, c = function (e, t, i) {
                    return FE.diff(e, t, void 0)
                }(o, r);
                for (t = 0; t < c.length; t++) if ((p = c[t]).removed) for (var h = 0; h < p.count; h++) {
                    d = XE(s = o[p.indices[h]]);
                    var f = zE(s);
                    HE(n, d), HE(n, f)
                }
                for (t = 0; t < c.length; t++) {
                    var p;
                    if ((p = c[t]).added) for (h = 0; h < p.count; h++) d = XE(s = r[p.indices[h]]), f = zE(s), u ? WE(n, d, u) : jE(n, d), d ? WE(n, f, d) : u ? WE(n, f, u) : jE(n, f), WE(n, f, d), u = f || d || u, this.gradientManager.addWithoutUpdate(d || f, s), this.shadowManager.addWithoutUpdate(d || f, s), this.clipPathManager.markUsed(s); else if (!p.removed) for (h = 0; h < p.count; h++) d = XE(s = r[p.indices[h]]), f = zE(s), d = XE(s), f = zE(s), this.gradientManager.markUsed(s), this.gradientManager.addWithoutUpdate(d || f, s), this.shadowManager.markUsed(s), this.shadowManager.addWithoutUpdate(d || f, s), this.clipPathManager.markUsed(s), f && WE(n, f, d), u = d || f || u
                }
                this.gradientManager.removeUnused(), this.clipPathManager.removeUnused(), this.shadowManager.removeUnused(), this._visibleList = r
            }, _getDefs: function (e) {
                var t, i = this._svgDom;
                return 0 !== (t = i.getElementsByTagName("defs")).length ? t[0] : e ? ((t = i.insertBefore(sE("defs"), i.firstChild)).contains || (t.contains = function (e) {
                    var i = t.children;
                    if (!i) return !1;
                    for (var n = i.length - 1; 0 <= n; --n) if (i[n] === e) return !0;
                    return !1
                }), t) : null
            }, resize: function (e, t) {
                var i = this._viewport;
                i.style.display = "none";
                var n = this._opts;
                if (null != e && (n.width = e), null != t && (n.height = t), e = this._getSize(0), t = this._getSize(1), i.style.display = "", this._width !== e || this._height !== t) {
                    this._width = e, this._height = t;
                    var o = i.style;
                    o.width = e + "px", o.height = t + "px";
                    var a = this._svgDom;
                    a.setAttribute("width", e), a.setAttribute("height", t)
                }
                this._backgroundNode && (this._backgroundNode.setAttribute("width", e), this._backgroundNode.setAttribute("height", t))
            }, getWidth: function () {
                return this._width
            }, getHeight: function () {
                return this._height
            }, _getSize: function (e) {
                var t = this._opts, i = ["width", "height"][e], n = ["clientWidth", "clientHeight"][e],
                    o = ["paddingLeft", "paddingTop"][e], a = ["paddingRight", "paddingBottom"][e];
                if (null != t[i] && "auto" !== t[i]) return parseFloat(t[i]);
                var r = this.root, s = document.defaultView.getComputedStyle(r);
                return (r[n] || KE(s[i]) || KE(r.style[i])) - (KE(s[o]) || 0) - (KE(s[a]) || 0) | 0
            }, dispose: function () {
                this.root.innerHTML = "", this._svgRoot = this._backgroundRoot = this._svgDom = this._backgroundNode = this._viewport = this.storage = null
            }, clear: function () {
                this._viewport && this.root.removeChild(this._viewport)
            }, toDataURL: function () {
                return this.refresh(), "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(this._svgDom.outerHTML.replace(/></g, ">\n\r<"))
            }
        }, D(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "pathToImage"], function (e) {
            qE.prototype[e] = function (e) {
                return function () {
                    mi('In SVG mode painter not support method "' + e + '"')
                }
            }(e)
        }), _o("svg", qE), e.version = "4.8.0", e.dependencies = {zrender: "4.3.1"}, e.PRIORITY = bh, e.init = function (e, t, i) {
            var n = df(e);
            if (n) return n;
            var o = new Nh(e, t, i);
            return o.id = "ec_" + of++, tf[o.id] = o, zo(e, rf, o.id), function (e) {
                var t = "__connectUpdateStatus";

                function i(e, i) {
                    for (var n = 0; n < e.length; n++) e[n][t] = i
                }

                Th(qh, function (n, o) {
                    e._messageCenter.on(o, function (n) {
                        if (nf[e.group] && 0 !== e[t]) {
                            if (n && n.escapeConnect) return;
                            var o = e.makeActionFromEvent(n), a = [];
                            Th(tf, function (t) {
                                t !== e && t.group === e.group && a.push(t)
                            }), i(a, 0), Th(a, function (e) {
                                1 !== e[t] && e.dispatchAction(o)
                            }), i(a, 2)
                        }
                    })
                })
            }(o), o
        }, e.connect = function (e) {
            if (M(e)) {
                var t = e;
                e = null, Th(t, function (t) {
                    null != t.group && (e = t.group)
                }), e = e || "g_" + af++, Th(t, function (t) {
                    t.group = e
                })
            }
            return nf[e] = !0, e
        }, e.disConnect = sf, e.disconnect = lf, e.dispose = function (e) {
            "string" == typeof e ? e = tf[e] : e instanceof Nh || (e = df(e)), e instanceof Nh && !e.isDisposed() && e.dispose()
        }, e.getInstanceByDom = df, e.getInstanceById = function (e) {
            return tf[e]
        }, e.registerTheme = uf, e.registerPreprocessor = cf, e.registerProcessor = hf, e.registerPostUpdate = function (e) {
            Zh.push(e)
        }, e.registerAction = ff, e.registerCoordinateSystem = pf, e.getCoordinateSystemDimensions = function (e) {
            var t = iu.get(e);
            if (t) return t.getDimensionsInfo ? t.getDimensionsInfo() : t.dimensions.slice()
        }, e.registerLayout = gf, e.registerVisual = mf, e.registerLoading = yf, e.extendComponentModel = Tf, e.extendComponentView = wf, e.extendSeriesModel = kf, e.extendChartView = Cf, e.setCanvasCreator = function (e) {
            g("createCanvas", e)
        }, e.registerMap = function (e, t, i) {
            mh.registerMap(e, t, i)
        }, e.getMap = function (e) {
            var t = mh.retrieveMap(e);
            return t && t[0] && {geoJson: t[0].geoJSON, specialAreas: t[0].specialAreas}
        }, e.dataTool = {}, e.zrender = Ao, e.number = Xl, e.format = ud, e.throttle = bc, e.helper = fg, e.matrix = pt, e.vector = Se, e.color = Qt, e.parseGeoJSON = Tg, e.parseGeoJson = xg, e.util = Eg, e.graphic = Og, e.List = Vf, e.Model = bl, e.Axis = Ag, e.env = o
    }(t)
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(257);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\tabs\\task-chart-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(481), o = i(259);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(845);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "68373646", null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\tabs\\TaskChart.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    t.BSpline = class {
        constructor({points: e = [], degree: t = 4, tessellation: i = 10}) {
            e.length >= 2 ? this.points = [this.getExtendPoint(e[0], e[1]), ...e, this.getExtendPoint(e[e.length - 1], e[e.length - 2])] : this.points = e, this.degree = t, this.tessellation = i, this.curvePoints = [], this.knotVector = [], this.uniformRender()
        }

        getExtendPoint(e, t) {
            return {x: t.x - 2 * (t.x - e.x), y: t.y - 2 * (t.y - e.y)}
        }

        uniformRender() {
            if (this.createKnots(), this.points.length < 2) return;
            let e = 1 / this.tessellation;
            for (let t = this.knotVector[this.degree]; t < this.knotVector[this.knotVector.length - this.degree - 1]; t += e) {
                let e = this.deBoor(t);
                this.curvePoints.push(e)
            }
            let t = this.deBoor(this.knotVector[this.knotVector.length - this.degree - 1]);
            this.curvePoints.push(t)
        }

        createKnots() {
            if (this.knotVector = [], this.points.length >= 2) {
                let e = this.degree + this.points.length + 1, t = 1 / (e - 1);
                for (let i = 0; i < e; i++) this.knotVector.push(i * t)
            }
        }

        deBoor(e) {
            let t = 0, i = 0;
            for (let n = 0; n < this.points.length; n++) {
                let o = this.basisFunction(n, this.degree, e);
                o > 0 && (t += this.points[n].x * o, i += this.points[n].y * o)
            }
            return [t, i]
        }

        basisFunction(e, t, i) {
            if (0 === t) return this.knotVector[e] <= i && i < this.knotVector[e + 1] ? 1 : 0;
            let n = (i - this.knotVector[e]) / (this.knotVector[e + t] - this.knotVector[e]),
                o = (this.knotVector[e + t + 1] - i) / (this.knotVector[e + t + 1] - this.knotVector[e + 1]);
            return n * this.basisFunction(e, t - 1, i) + o * this.basisFunction(e + 1, t - 1, i)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = i(1024);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(462), o = i(261);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\XlHeader.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(463), o = i(263);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\XlDetail.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(265);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\FileList-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(476), o = i(267);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(850);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "93d3b760", null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\FileList.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1026);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(269);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\multi-chosen-tasks-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(477), o = i(271);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\multi-chosen-tasks.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(482), o = i(273);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\multi-chosen-item.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(275);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\comment-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(478), o = i(277);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\Comment.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(279);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\commentAvatar-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(488), o = i(281);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\commentAvatar.vue", t.default = s.exports
}, function (e, t, i) {
    var n = i(569), o = i(572), a = i(861);

    function r(e, t) {
        return new a(t).process(e)
    }

    for (var s in(t = e.exports = r).filterXSS = r, t.FilterXSS = a, n) t[s] = n[s];
    for (var s in o) t[s] = o[s];
    "undefined" != typeof window && (window.filterXSS = e.exports), "undefined" != typeof self && "undefined" != typeof DedicatedWorkerGlobalScope && self instanceof DedicatedWorkerGlobalScope && (self.filterXSS = e.exports)
}, function (e, t, i) {
    var n = i(570), o = i(860);
    i(571);

    function a(e) {
        return void 0 === e || null === e
    }

    function r(e) {
        (e = function (e) {
            var t = {};
            for (var i in e) t[i] = e[i];
            return t
        }(e || {})).whiteList = e.whiteList || n.whiteList, e.onAttr = e.onAttr || n.onAttr, e.onIgnoreAttr = e.onIgnoreAttr || n.onIgnoreAttr, e.safeAttrValue = e.safeAttrValue || n.safeAttrValue, this.options = e
    }

    r.prototype.process = function (e) {
        if (!(e = (e = e || "").toString())) return "";
        var t = this.options, i = t.whiteList, n = t.onAttr, r = t.onIgnoreAttr, s = t.safeAttrValue;
        return o(e, function (e, t, o, l, d) {
            var u = i[o], c = !1;
            if (!0 === u ? c = u : "function" == typeof u ? c = u(l) : u instanceof RegExp && (c = u.test(l)), !0 !== c && (c = !1), l = s(o, l)) {
                var h, f = {position: t, sourcePosition: e, source: d, isWhite: c};
                return c ? a(h = n(o, l, f)) ? o + ":" + l : h : a(h = r(o, l, f)) ? void 0 : h
            }
        })
    }, e.exports = r
}, function (e, t, i) {
    var n = i(571);
    e.exports = function (e, t) {
        ";" !== (e = n.trimRight(e))[e.length - 1] && (e += ";");
        var i = e.length, o = !1, a = 0, r = 0, s = "";

        function l() {
            if (!o) {
                var i = n.trim(e.slice(a, r)), l = i.indexOf(":");
                if (-1 !== l) {
                    var d = n.trim(i.slice(0, l)), u = n.trim(i.slice(l + 1));
                    if (d) {
                        var c = t(a, s.length, d, u, i);
                        c && (s += c + "; ")
                    }
                }
            }
            a = r + 1
        }

        for (; r < i; r++) {
            var d = e[r];
            if ("/" === d && "*" === e[r + 1]) {
                var u = e.indexOf("*/", r + 2);
                if (-1 === u) break;
                a = (r = u + 1) + 1, o = !1
            } else "(" === d ? o = !0 : ")" === d ? o = !1 : ";" === d ? o || l() : "\n" === d && l()
        }
        return n.trim(s)
    }
}, function (e, t, i) {
    var n = i(414).FilterCSS, o = i(569), a = i(572), r = a.parseTag, s = a.parseAttr, l = i(415);

    function d(e) {
        return void 0 === e || null === e
    }

    function u(e) {
        (e = function (e) {
            var t = {};
            for (var i in e) t[i] = e[i];
            return t
        }(e || {})).stripIgnoreTag && (e.onIgnoreTag && console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'), e.onIgnoreTag = o.onIgnoreTagStripAll), e.whiteList = e.whiteList || o.whiteList, e.onTag = e.onTag || o.onTag, e.onTagAttr = e.onTagAttr || o.onTagAttr, e.onIgnoreTag = e.onIgnoreTag || o.onIgnoreTag, e.onIgnoreTagAttr = e.onIgnoreTagAttr || o.onIgnoreTagAttr, e.safeAttrValue = e.safeAttrValue || o.safeAttrValue, e.escapeHtml = e.escapeHtml || o.escapeHtml, this.options = e, !1 === e.css ? this.cssFilter = !1 : (e.css = e.css || {}, this.cssFilter = new n(e.css))
    }

    u.prototype.process = function (e) {
        if (!(e = (e = e || "").toString())) return "";
        var t = this.options, i = t.whiteList, n = t.onTag, a = t.onIgnoreTag, u = t.onTagAttr, c = t.onIgnoreTagAttr,
            h = t.safeAttrValue, f = t.escapeHtml, p = this.cssFilter;
        t.stripBlankChar && (e = o.stripBlankChar(e)), t.allowCommentTag || (e = o.stripCommentTag(e));
        var g = !1;
        if (t.stripIgnoreTagBody) {
            g = o.StripTagBody(t.stripIgnoreTagBody, a);
            a = g.onIgnoreTag
        }
        var m = r(e, function (e, t, o, r, g) {
            var m, v = {sourcePosition: e, position: t, isClosing: g, isWhite: i.hasOwnProperty(o)};
            if (!d(m = n(o, r, v))) return m;
            if (v.isWhite) {
                if (v.isClosing) return "</" + o + ">";
                var y = function (e) {
                    var t = l.spaceIndex(e);
                    if (-1 === t) return {html: "", closing: "/" === e[e.length - 2]};
                    var i = "/" === (e = l.trim(e.slice(t + 1, -1)))[e.length - 1];
                    return i && (e = l.trim(e.slice(0, -1))), {html: e, closing: i}
                }(r), T = i[o], w = s(y.html, function (e, t) {
                    var i, n = -1 !== l.indexOf(T, e);
                    return d(i = u(o, e, t, n)) ? n ? (t = h(o, e, t, p)) ? e + '="' + t + '"' : e : d(i = c(o, e, t, n)) ? void 0 : i : i
                });
                r = "<" + o;
                return w && (r += " " + w), y.closing && (r += " /"), r += ">"
            }
            return d(m = a(o, r, v)) ? f(r) : m
        }, f);
        return g && (m = g.remove(m)), m
    }, e.exports = u
}, function (e) {
    e.exports = {
        "[开心]": "1F604",
        "[可爱]": "1F60A",
        "[大笑]": "1F603",
        "[憨笑]": "263A",
        "[眨眼]": "1F609",
        "[色]": "1F60D",
        "[爱你]": "1F618",
        "[亲亲]": "1F61A",
        "[脸红]": "1F633",
        "[满意]": "1F60C",
        "[傻笑]": "1F601",
        "[鬼脸]": "1F61C",
        "[吐舌]": "1F61D",
        "[无语]": "1F612",
        "[得意]": "1F60F",
        "[汗]": "1F613",
        "[失望]": "1F614",
        "[低落]": "1F61E",
        "[痛苦]": "1F616",
        "[焦虑]": "1F622",
        "[担心]": "1F630",
        "[震惊]": "1F628",
        "[悔恨]": "1F623",
        "[鼻涕]": "1F625",
        "[哭]": "1F62D",
        "[大哭]": "1F602",
        "[晕]": "1F632",
        "[惊恐]": "1F631",
        "[心烦]": "1F620",
        "[生气]": "1F621",
        "[睡觉]": "1F62A",
        "[口罩]": "1F637"
    }
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(489), o = i(285);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\commentInput.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(494), o = i(287);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\emoji.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(495), o = i(289);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\imgUpload.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(496), o = i(291);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\imgUploadPanel.vue", t.default = s.exports
}, function (e, t, i) {
    e.exports = function () {
        "use strict";
        var e, t = (function (e, t) {
            e.exports = function (e) {
                var t = function (e, t) {
                    return e + t & 4294967295
                }, i = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];

                function n(e, i, n, o, a, r) {
                    return i = t(t(i, e), t(o, r)), t(i << a | i >>> 32 - a, n)
                }

                function o(e, t, i, o, a, r, s) {
                    return n(t & i | ~t & o, e, t, a, r, s)
                }

                function a(e, t, i, o, a, r, s) {
                    return n(t & o | i & ~o, e, t, a, r, s)
                }

                function r(e, t, i, o, a, r, s) {
                    return n(t ^ i ^ o, e, t, a, r, s)
                }

                function s(e, t, i, o, a, r, s) {
                    return n(i ^ (t | ~o), e, t, a, r, s)
                }

                function l(e, i) {
                    var n = e[0], l = e[1], d = e[2], u = e[3];
                    n = o(n, l, d, u, i[0], 7, -680876936), u = o(u, n, l, d, i[1], 12, -389564586), d = o(d, u, n, l, i[2], 17, 606105819), l = o(l, d, u, n, i[3], 22, -1044525330), n = o(n, l, d, u, i[4], 7, -176418897), u = o(u, n, l, d, i[5], 12, 1200080426), d = o(d, u, n, l, i[6], 17, -1473231341), l = o(l, d, u, n, i[7], 22, -45705983), n = o(n, l, d, u, i[8], 7, 1770035416), u = o(u, n, l, d, i[9], 12, -1958414417), d = o(d, u, n, l, i[10], 17, -42063), l = o(l, d, u, n, i[11], 22, -1990404162), n = o(n, l, d, u, i[12], 7, 1804603682), u = o(u, n, l, d, i[13], 12, -40341101), d = o(d, u, n, l, i[14], 17, -1502002290), l = o(l, d, u, n, i[15], 22, 1236535329), n = a(n, l, d, u, i[1], 5, -165796510), u = a(u, n, l, d, i[6], 9, -1069501632), d = a(d, u, n, l, i[11], 14, 643717713), l = a(l, d, u, n, i[0], 20, -373897302), n = a(n, l, d, u, i[5], 5, -701558691), u = a(u, n, l, d, i[10], 9, 38016083), d = a(d, u, n, l, i[15], 14, -660478335), l = a(l, d, u, n, i[4], 20, -405537848), n = a(n, l, d, u, i[9], 5, 568446438), u = a(u, n, l, d, i[14], 9, -1019803690), d = a(d, u, n, l, i[3], 14, -187363961), l = a(l, d, u, n, i[8], 20, 1163531501), n = a(n, l, d, u, i[13], 5, -1444681467), u = a(u, n, l, d, i[2], 9, -51403784), d = a(d, u, n, l, i[7], 14, 1735328473), l = a(l, d, u, n, i[12], 20, -1926607734), n = r(n, l, d, u, i[5], 4, -378558), u = r(u, n, l, d, i[8], 11, -2022574463), d = r(d, u, n, l, i[11], 16, 1839030562), l = r(l, d, u, n, i[14], 23, -35309556), n = r(n, l, d, u, i[1], 4, -1530992060), u = r(u, n, l, d, i[4], 11, 1272893353), d = r(d, u, n, l, i[7], 16, -155497632), l = r(l, d, u, n, i[10], 23, -1094730640), n = r(n, l, d, u, i[13], 4, 681279174), u = r(u, n, l, d, i[0], 11, -358537222), d = r(d, u, n, l, i[3], 16, -722521979), l = r(l, d, u, n, i[6], 23, 76029189), n = r(n, l, d, u, i[9], 4, -640364487), u = r(u, n, l, d, i[12], 11, -421815835), d = r(d, u, n, l, i[15], 16, 530742520), l = r(l, d, u, n, i[2], 23, -995338651), n = s(n, l, d, u, i[0], 6, -198630844), u = s(u, n, l, d, i[7], 10, 1126891415), d = s(d, u, n, l, i[14], 15, -1416354905), l = s(l, d, u, n, i[5], 21, -57434055), n = s(n, l, d, u, i[12], 6, 1700485571), u = s(u, n, l, d, i[3], 10, -1894986606), d = s(d, u, n, l, i[10], 15, -1051523), l = s(l, d, u, n, i[1], 21, -2054922799), n = s(n, l, d, u, i[8], 6, 1873313359), u = s(u, n, l, d, i[15], 10, -30611744), d = s(d, u, n, l, i[6], 15, -1560198380), l = s(l, d, u, n, i[13], 21, 1309151649), n = s(n, l, d, u, i[4], 6, -145523070), u = s(u, n, l, d, i[11], 10, -1120210379), d = s(d, u, n, l, i[2], 15, 718787259), l = s(l, d, u, n, i[9], 21, -343485551), e[0] = t(n, e[0]), e[1] = t(l, e[1]), e[2] = t(d, e[2]), e[3] = t(u, e[3])
                }

                function d(e) {
                    var t, i = [];
                    for (t = 0; t < 64; t += 4) i[t >> 2] = e.charCodeAt(t) + (e.charCodeAt(t + 1) << 8) + (e.charCodeAt(t + 2) << 16) + (e.charCodeAt(t + 3) << 24);
                    return i
                }

                function u(e) {
                    var t, i = [];
                    for (t = 0; t < 64; t += 4) i[t >> 2] = e[t] + (e[t + 1] << 8) + (e[t + 2] << 16) + (e[t + 3] << 24);
                    return i
                }

                function c(e) {
                    var t, i, n, o, a, r, s = e.length, u = [1732584193, -271733879, -1732584194, 271733878];
                    for (t = 64; t <= s; t += 64) l(u, d(e.substring(t - 64, t)));
                    for (e = e.substring(t - 64), i = e.length, n = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t = 0; t < i; t += 1) n[t >> 2] |= e.charCodeAt(t) << (t % 4 << 3);
                    if (n[t >> 2] |= 128 << (t % 4 << 3), t > 55) for (l(u, n), t = 0; t < 16; t += 1) n[t] = 0;
                    return o = (o = 8 * s).toString(16).match(/(.*?)(.{0,8})$/), a = parseInt(o[2], 16), r = parseInt(o[1], 16) || 0, n[14] = a, n[15] = r, l(u, n), u
                }

                function h(e) {
                    var t, n = "";
                    for (t = 0; t < 4; t += 1) n += i[e >> 8 * t + 4 & 15] + i[e >> 8 * t & 15];
                    return n
                }

                function f(e) {
                    var t;
                    for (t = 0; t < e.length; t += 1) e[t] = h(e[t]);
                    return e.join("")
                }

                function p(e) {
                    return /[\u0080-\uFFFF]/.test(e) && (e = unescape(encodeURIComponent(e))), e
                }

                function g(e) {
                    var t, i = [], n = e.length;
                    for (t = 0; t < n - 1; t += 2) i.push(parseInt(e.substr(t, 2), 16));
                    return String.fromCharCode.apply(String, i)
                }

                function m() {
                    this.reset()
                }

                return "5d41402abc4b2a76b9719d911017c592" !== f(c("hello")) && (t = function (e, t) {
                    var i = (65535 & e) + (65535 & t), n = (e >> 16) + (t >> 16) + (i >> 16);
                    return n << 16 | 65535 & i
                }), "undefined" == typeof ArrayBuffer || ArrayBuffer.prototype.slice || function () {
                    function t(e, t) {
                        return (e = 0 | e || 0) < 0 ? Math.max(e + t, 0) : Math.min(e, t)
                    }

                    ArrayBuffer.prototype.slice = function (i, n) {
                        var o, a, r, s, l = this.byteLength, d = t(i, l), u = l;
                        return n !== e && (u = t(n, l)), d > u ? new ArrayBuffer(0) : (o = u - d, a = new ArrayBuffer(o), r = new Uint8Array(a), s = new Uint8Array(this, d, o), r.set(s), a)
                    }
                }(), m.prototype.append = function (e) {
                    return this.appendBinary(p(e)), this
                }, m.prototype.appendBinary = function (e) {
                    this._buff += e, this._length += e.length;
                    var t, i = this._buff.length;
                    for (t = 64; t <= i; t += 64) l(this._hash, d(this._buff.substring(t - 64, t)));
                    return this._buff = this._buff.substring(t - 64), this
                }, m.prototype.end = function (e) {
                    var t, i, n = this._buff, o = n.length, a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
                    for (t = 0; t < o; t += 1) a[t >> 2] |= n.charCodeAt(t) << (t % 4 << 3);
                    return this._finish(a, o), i = f(this._hash), e && (i = g(i)), this.reset(), i
                }, m.prototype.reset = function () {
                    return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this
                }, m.prototype.getState = function () {
                    return {buff: this._buff, length: this._length, hash: this._hash}
                }, m.prototype.setState = function (e) {
                    return this._buff = e.buff, this._length = e.length, this._hash = e.hash, this
                }, m.prototype.destroy = function () {
                    delete this._hash, delete this._buff, delete this._length
                }, m.prototype._finish = function (e, t) {
                    var i, n, o, a = t;
                    if (e[a >> 2] |= 128 << (a % 4 << 3), a > 55) for (l(this._hash, e), a = 0; a < 16; a += 1) e[a] = 0;
                    i = (i = 8 * this._length).toString(16).match(/(.*?)(.{0,8})$/), n = parseInt(i[2], 16), o = parseInt(i[1], 16) || 0, e[14] = n, e[15] = o, l(this._hash, e)
                }, m.hash = function (e, t) {
                    return m.hashBinary(p(e), t)
                }, m.hashBinary = function (e, t) {
                    var i = f(c(e));
                    return t ? g(i) : i
                }, m.ArrayBuffer = function () {
                    this.reset()
                }, m.ArrayBuffer.prototype.append = function (e) {
                    var t, i, n, o, a,
                        r = (i = this._buff.buffer, n = e, o = !0, (a = new Uint8Array(i.byteLength + n.byteLength)).set(new Uint8Array(i)), a.set(new Uint8Array(n), i.byteLength), o ? a : a.buffer),
                        s = r.length;
                    for (this._length += e.byteLength, t = 64; t <= s; t += 64) l(this._hash, u(r.subarray(t - 64, t)));
                    return this._buff = t - 64 < s ? new Uint8Array(r.buffer.slice(t - 64)) : new Uint8Array(0), this
                }, m.ArrayBuffer.prototype.end = function (e) {
                    var t, i, n = this._buff, o = n.length, a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
                    for (t = 0; t < o; t += 1) a[t >> 2] |= n[t] << (t % 4 << 3);
                    return this._finish(a, o), i = f(this._hash), e && (i = g(i)), this.reset(), i
                }, m.ArrayBuffer.prototype.reset = function () {
                    return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this
                }, m.ArrayBuffer.prototype.getState = function () {
                    var e, t = m.prototype.getState.call(this);
                    return t.buff = (e = t.buff, String.fromCharCode.apply(null, new Uint8Array(e))), t
                }, m.ArrayBuffer.prototype.setState = function (e) {
                    return e.buff = function (e, t) {
                        var i, n = e.length, o = new ArrayBuffer(n), a = new Uint8Array(o);
                        for (i = 0; i < n; i += 1) a[i] = e.charCodeAt(i);
                        return t ? a : o
                    }(e.buff, !0), m.prototype.setState.call(this, e)
                }, m.ArrayBuffer.prototype.destroy = m.prototype.destroy, m.ArrayBuffer.prototype._finish = m.prototype._finish, m.ArrayBuffer.hash = function (e, t) {
                    var i = f(function (e) {
                        var t, i, n, o, a, r, s = e.length, d = [1732584193, -271733879, -1732584194, 271733878];
                        for (t = 64; t <= s; t += 64) l(d, u(e.subarray(t - 64, t)));
                        for (e = t - 64 < s ? e.subarray(t - 64) : new Uint8Array(0), i = e.length, n = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t = 0; t < i; t += 1) n[t >> 2] |= e[t] << (t % 4 << 3);
                        if (n[t >> 2] |= 128 << (t % 4 << 3), t > 55) for (l(d, n), t = 0; t < 16; t += 1) n[t] = 0;
                        return o = (o = 8 * s).toString(16).match(/(.*?)(.{0,8})$/), a = parseInt(o[2], 16), r = parseInt(o[1], 16) || 0, n[14] = a, n[15] = r, l(d, n), d
                    }(new Uint8Array(e)));
                    return t ? g(i) : i
                }, m
            }()
        }(e = {exports: {}}, e.exports), e.exports);
        return class {
            md5(e, i, n) {
                this.aborted = !1, this.progress = 0;
                let o = 0;
                const a = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice, r = 2097152,
                    s = Math.ceil(e.size / r), l = new t.ArrayBuffer, d = new FileReader;

                function u() {
                    const t = o * r, i = t + r >= e.size ? e.size : t + r;
                    d.readAsArrayBuffer(a.call(e, t, i))
                }

                u(), d.onloadend = (e => {
                    l.append(e.target.result), o++, this.progress = o / s, n && "function" == typeof n && n(this.progress), this.aborted ? i("aborted") : o < s ? u() : i(null, l.end())
                })
            }

            abort() {
                this.aborted = !0
            }
        }
    }()
}, function (module, exports, __webpack_require__) {
    var require, require;
    module.exports = function () {
        var define, module, exports;
        return function e(t, i, n) {
            function o(r, s) {
                if (!i[r]) {
                    if (!t[r]) {
                        var l = "function" == typeof require && require;
                        if (!s && l) return require(r, !0);
                        if (a) return a(r, !0);
                        var d = new Error("Cannot find module '" + r + "'");
                        throw d.code = "MODULE_NOT_FOUND", d
                    }
                    var u = i[r] = {exports: {}};
                    t[r][0].call(u.exports, function (e) {
                        var i = t[r][1][e];
                        return o(i || e)
                    }, u, u.exports, e, t, i, n)
                }
                return i[r].exports
            }

            for (var a = "function" == typeof require && require, r = 0; r < n.length; r++) o(n[r]);
            return o
        }({
            1: [function (e, t, i) {
                "use strict";
                var n = e("./browser/client");
                n.Buffer = e("buffer").Buffer, n.urllib = e("../shims/xhr"), n.version = e("./browser/version").version, t.exports = n
            }, {"../shims/xhr": 334, "./browser/client": 2, "./browser/version": 5, buffer: 70}],
            2: [function (e, t, i) {
                (function (i, n) {
                    "use strict";
                    var o = e("babel-runtime/core-js/promise"), a = u(o), r = e("babel-runtime/regenerator"), s = u(r),
                        l = e("babel-runtime/core-js/object/assign"), d = u(l);

                    function u(e) {
                        return e && e.__esModule ? e : {default: e}
                    }

                    var c = e("debug")("ali-oss"), h = e("./../../shims/crypto/crypto.js"), f = e("path"),
                        p = e("copy-to"), g = e("mime"), m = e("xml2js"), v = e("agentkeepalive"),
                        y = e("merge-descriptors"), T = e("url"), w = e("is-type-of"), k = e("platform"),
                        C = e("utility"), b = e("urllib"), I = e("./version"), S = e("dateformat"), _ = e("bowser"),
                        D = e("../common/signUtils"), A = e("../common/utils/isIP"),
                        N = e("../common/client/initOptions"), x = new v;

                    function E(e, t) {
                        var i, n;
                        if (i = k.name, n = k.version, i && i.toLowerCase && "ie" === i.toLowerCase() && n.split(".")[0] < 10 && console.warn("ali-oss does not support the current browser"), !(this instanceof E)) return new E(e, t);
                        e && e.inited ? this.options = e : this.options = E.initOptions(e), this.options.cancelFlag = !1, this.options.urllib ? this.urllib = this.options.urllib : (this.urllib = b, this.agent = this.options.agent || x), this.ctx = t, this.userAgent = this._getUserAgent(), this.options.amendTimeSkewed = 0
                    }

                    t.exports = E, E.initOptions = function (e) {
                        e.stsToken || console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");
                        var t = (0, d.default)({secure: location && "https:" === location.protocol, useFetch: !1}, e);
                        return N(t)
                    };
                    var O = E.prototype;
                    O.debug = c, y(O, e("./object")), y(O, e("../common/bucket/getBucketWebsite")), y(O, e("../common/bucket/putBucketWebsite")), y(O, e("../common/bucket/deleteBucketWebsite")), y(O, e("../common/bucket/getBucketLifecycle")), y(O, e("../common/bucket/putBucketLifecycle")), y(O, e("../common/bucket/deleteBucketLifecycle")), y(O, e("../common/bucket/putBucketVersioning")), y(O, e("../common/bucket/getBucketVersioning")), y(O, e("./managed-upload")), y(O, e("../common/multipart")), y(O, e("../common/parallel")), O.signature = function (e) {
                        return this.debug("authorization stringToSign: %s", e, "info"), D.computeSignature(this.options.accessKeySecret, e)
                    }, O.authorization = function (e, t, i, n) {
                        var o = D.buildCanonicalString(e.toUpperCase(), t, {headers: n, parameters: i});
                        return D.authorization(this.options.accessKeyId, this.options.accessKeySecret, o)
                    }, O.createRequest = function (e) {
                        var t = {
                            "x-oss-date": S(+new Date + this.options.amendTimeSkewed, "UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),
                            "x-oss-user-agent": this.userAgent
                        };
                        this.options.isRequestPay && (0, d.default)(t, {"x-oss-request-payer": "requester"}), this.options.stsToken && (t["x-oss-security-token"] = this.options.stsToken), p(e.headers).to(t), function (e, t) {
                            return e[t] || e[t.toLowerCase()]
                        }(t, "Content-Type") || (e.mime === g.default_type && (e.mime = ""), e.mime && e.mime.indexOf("/") > 0 ? t["Content-Type"] = e.mime : t["Content-Type"] = g.getType(e.mime || f.extname(e.object || "")) || "application/octet-stream"), e.content && (t["Content-Md5"] = h.createHash("md5").update(n.from(e.content, "utf8")).digest("base64"), t["Content-Length"] || (t["Content-Length"] = e.content.length));
                        var i = this._getResource(e);
                        t.authorization = this.authorization(e.method, i, e.subres, t);
                        var o = this._getReqUrl(e);
                        this.debug("request %s %s, with headers %j, !!stream: %s", e.method, o, t, !!e.stream, "info");
                        var a = e.timeout || this.options.timeout, r = {
                            agent: this.agent,
                            method: e.method,
                            content: e.content,
                            stream: e.stream,
                            headers: t,
                            timeout: a,
                            writeStream: e.writeStream,
                            customResponse: e.customResponse,
                            ctx: e.ctx || this.ctx
                        };
                        return {url: o, params: r}
                    }, O.request = function (e) {
                        var t, i, n, o, a, r;
                        return s.default.async(function (l) {
                            for (; ;) switch (l.prev = l.next) {
                                case 0:
                                    return t = this.createRequest(e), this.options.useFetch || (t.params.mode = "disable-fetch"), i = void 0, n = void 0, o = !!e.stream, l.prev = 5, l.next = 8, s.default.awrap(this.urllib.request(t.url, t.params));
                                case 8:
                                    i = l.sent, this.debug("response %s %s, got %s, headers: %j", e.method, t.url, i.status, i.headers, "info"), l.next = 15;
                                    break;
                                case 12:
                                    l.prev = 12, l.t0 = l.catch(5), n = l.t0;
                                case 15:
                                    if (a = void 0, !i || !e.successStatuses || -1 !== e.successStatuses.indexOf(i.status)) {
                                        l.next = 28;
                                        break
                                    }
                                    return l.next = 19, s.default.awrap(this.requestError(i));
                                case 19:
                                    if ("RequestTimeTooSkewed" !== (a = l.sent).code || o) {
                                        l.next = 25;
                                        break
                                    }
                                    return this.options.amendTimeSkewed = +new Date(a.serverTime) - new Date, l.next = 24, s.default.awrap(this.request(e));
                                case 24:
                                    return l.abrupt("return", l.sent);
                                case 25:
                                    a.params = e, l.next = 32;
                                    break;
                                case 28:
                                    if (!n) {
                                        l.next = 32;
                                        break
                                    }
                                    return l.next = 31, s.default.awrap(this.requestError(n));
                                case 31:
                                    a = l.sent;
                                case 32:
                                    if (!a) {
                                        l.next = 34;
                                        break
                                    }
                                    throw a;
                                case 34:
                                    if (!e.xmlResponse) {
                                        l.next = 39;
                                        break
                                    }
                                    return l.next = 37, s.default.awrap(this.parseXML(i.data));
                                case 37:
                                    r = l.sent, i.data = r;
                                case 39:
                                    return l.abrupt("return", i);
                                case 40:
                                case"end":
                                    return l.stop()
                            }
                        }, null, this, [[5, 12]])
                    }, O._getResource = function (e) {
                        var t = "/";
                        return e.bucket && (t += e.bucket + "/"), e.object && (t += e.object), t
                    }, O._isIP = A, O._escape = function (e) {
                        return C.encodeURIComponent(e).replace(/%2F/g, "/")
                    }, O._getReqUrl = function (e) {
                        var t = {};
                        p(this.options.endpoint).to(t);
                        var i = this._isIP(t.hostname), n = this.options.cname;
                        !e.bucket || n || i || (t.host = e.bucket + "." + t.host);
                        var o = "/";
                        e.bucket && i && (o += e.bucket + "/"), e.object && (o += this._escape(e.object).replace(/\+/g, "%2B")), t.pathname = o;
                        var a = {};
                        if (e.query && y(a, e.query), e.subres) {
                            var r = {};
                            w.string(e.subres) ? r[e.subres] = "" : w.array(e.subres) ? e.subres.forEach(function (e) {
                                r[e] = ""
                            }) : r = e.subres, y(a, r)
                        }
                        return t.query = a, T.format(t)
                    }, O._getUserAgent = function () {
                        var e = i && i.browser ? "js" : "nodejs", t = "aliyun-sdk-" + e + "/" + I.version,
                            n = k.description;
                        return !n && i && (n = "Node.js " + i.version.slice(1) + " on " + i.platform + " " + i.arch), this._checkUserAgent(t + " " + n)
                    }, O._checkUserAgent = function (e) {
                        var t = e.replace(/\u03b1/, "alpha").replace(/\u03b2/, "beta");
                        return t
                    }, O.checkBrowserAndVersion = function (e, t) {
                        return _.name === e && _.version.split(".")[0] === t
                    }, O.parseXML = function (e) {
                        return new a.default(function (t, i) {
                            n.isBuffer(e) && (e = e.toString()), m.parseString(e, {
                                explicitRoot: !1,
                                explicitArray: !1
                            }, function (e, n) {
                                e ? i(e) : t(n)
                            })
                        })
                    }, O.requestError = function (e) {
                        var t, i, n, o;
                        return s.default.async(function (a) {
                            for (; ;) switch (a.prev = a.next) {
                                case 0:
                                    if (t = null, e.data && e.data.length) {
                                        a.next = 5;
                                        break
                                    }
                                    -1 === e.status || -2 === e.status ? ((t = new Error(e.message)).name = e.name, t.status = e.status, t.code = e.name) : (404 === e.status ? ((t = new Error("Object not exists")).name = "NoSuchKeyError", t.status = 404, t.code = "NoSuchKey") : 412 === e.status ? ((t = new Error("Pre condition failed")).name = "PreconditionFailedError", t.status = 412, t.code = "PreconditionFailed") : ((t = new Error("Unknow error, status: " + e.status)).name = "UnknowError", t.status = e.status), t.requestId = e.headers["x-oss-request-id"], t.host = ""), a.next = 33;
                                    break;
                                case 5:
                                    return i = String(e.data), this.debug("request response error data: %s", i, "error"), n = void 0, a.prev = 8, a.next = 11, s.default.awrap(this.parseXML(i));
                                case 11:
                                    if (a.t0 = a.sent, a.t0) {
                                        a.next = 14;
                                        break
                                    }
                                    a.t0 = {};
                                case 14:
                                    n = a.t0, a.next = 24;
                                    break;
                                case 17:
                                    return a.prev = 17, a.t1 = a.catch(8), this.debug(i, "error"), a.t1.message += "\nraw xml: " + i, a.t1.status = e.status, a.t1.requestId = e.headers["x-oss-request-id"], a.abrupt("return", a.t1);
                                case 24:
                                    o = n.Message || "unknow request error, status: " + e.status, n.Condition && (o += " (condition: " + n.Condition + ")"), (t = new Error(o)).name = n.Code ? n.Code + "Error" : "UnknowError", t.status = e.status, t.code = n.Code, t.requestId = n.RequestId, t.hostId = n.HostId, t.serverTime = n.ServerTime;
                                case 33:
                                    return this.debug("generate error %j", t, "error"), a.abrupt("return", t);
                                case 35:
                                case"end":
                                    return a.stop()
                            }
                        }, null, this, [[8, 17]])
                    }
                }).call(this, e("_process"), e("buffer").Buffer)
            }, {
                "../common/bucket/deleteBucketLifecycle": 6,
                "../common/bucket/deleteBucketWebsite": 7,
                "../common/bucket/getBucketLifecycle": 8,
                "../common/bucket/getBucketVersioning": 9,
                "../common/bucket/getBucketWebsite": 10,
                "../common/bucket/putBucketLifecycle": 11,
                "../common/bucket/putBucketVersioning": 12,
                "../common/bucket/putBucketWebsite": 13,
                "../common/client/initOptions": 15,
                "../common/multipart": 18,
                "../common/parallel": 29,
                "../common/signUtils": 30,
                "../common/utils/isIP": 40,
                "./../../shims/crypto/crypto.js": 328,
                "./managed-upload": 3,
                "./object": 4,
                "./version": 5,
                _process: 249,
                agentkeepalive: 43,
                "babel-runtime/core-js/object/assign": 49,
                "babel-runtime/core-js/promise": 56,
                "babel-runtime/regenerator": 65,
                bowser: 67,
                buffer: 70,
                "copy-to": 73,
                dateformat: 187,
                debug: 188,
                "is-type-of": 233,
                "merge-descriptors": 237,
                mime: 332,
                path: 246,
                platform: 247,
                url: 279,
                urllib: 334,
                utility: 333,
                xml2js: 293
            }],
            3: [function (e, t, i) {
                (function (t) {
                    "use strict";
                    var n = e("babel-runtime/core-js/array/from"), o = d(n), a = e("babel-runtime/core-js/promise"),
                        r = d(a), s = e("babel-runtime/regenerator"), l = d(s);

                    function d(e) {
                        return e && e.__esModule ? e : {default: e}
                    }

                    var u = e("is-type-of"), c = e("util"), h = e("path"), f = e("mime"), p = e("copy-to"),
                        g = e("../common/utils/isBlob"), m = e("../common/utils/isFile"), v = i;
                    v.multipartUpload = function (e, t, i) {
                        var n, o, a, r, s, d, u, c, p;
                        return l.default.async(function (v) {
                            for (; ;) switch (v.prev = v.next) {
                                case 0:
                                    if (this.resetCancelFlag(), !(i = i || {}).checkpoint || !i.checkpoint.uploadId) {
                                        v.next = 6;
                                        break
                                    }
                                    return v.next = 5, l.default.awrap(this._resumeMultipart(i.checkpoint, i));
                                case 5:
                                    return v.abrupt("return", v.sent);
                                case 6:
                                    return n = 102400, i.mime || (m(t) ? i.mime = f.getType(h.extname(t.name)) : g(t) ? i.mime = t.type : i.mime = f.getType(h.extname(t))), i.headers = i.headers || {}, this._convertMetaToHeaders(i.meta, i.headers), v.next = 12, l.default.awrap(this._getFileSize(t));
                                case 12:
                                    if (!((o = v.sent) < n)) {
                                        v.next = 25;
                                        break
                                    }
                                    return a = this._createStream(t, 0, o), i.contentLength = o, v.next = 18, l.default.awrap(this.putStream(e, a, i));
                                case 18:
                                    if (r = v.sent, !i || !i.progress) {
                                        v.next = 22;
                                        break
                                    }
                                    return v.next = 22, l.default.awrap(i.progress(1));
                                case 22:
                                    return s = {
                                        res: r.res,
                                        bucket: this.options.bucket,
                                        name: e,
                                        etag: r.res.headers.etag
                                    }, (i.headers && i.headers["x-oss-callback"] || i.callback) && (s.data = r.data), v.abrupt("return", s);
                                case 25:
                                    if (!i.partSize || parseInt(i.partSize, 10) === i.partSize) {
                                        v.next = 27;
                                        break
                                    }
                                    throw new Error("partSize must be int number");
                                case 27:
                                    if (!(i.partSize && i.partSize < n)) {
                                        v.next = 29;
                                        break
                                    }
                                    throw new Error("partSize must not be smaller than " + n);
                                case 29:
                                    return v.next = 31, l.default.awrap(this.initMultipartUpload(e, i));
                                case 31:
                                    if (d = v.sent, u = d.uploadId, c = this._getPartSize(o, i.partSize), p = {
                                        file: t,
                                        name: e,
                                        fileSize: o,
                                        partSize: c,
                                        uploadId: u,
                                        doneParts: []
                                    }, !i || !i.progress) {
                                        v.next = 38;
                                        break
                                    }
                                    return v.next = 38, l.default.awrap(i.progress(0, p, d.res));
                                case 38:
                                    return v.next = 40, l.default.awrap(this._resumeMultipart(p, i));
                                case 40:
                                    return v.abrupt("return", v.sent);
                                case 41:
                                case"end":
                                    return v.stop()
                            }
                        }, null, this)
                    }, v._resumeMultipart = function (e, t) {
                        var i, n, a, s, d, u, c, h, f, g, m, v, y, T, w, k, C, b;
                        return l.default.async(function (I) {
                            for (; ;) switch (I.prev = I.next) {
                                case 0:
                                    if (i = this, !this.isCancel()) {
                                        I.next = 3;
                                        break
                                    }
                                    throw this._makeCancelEvent();
                                case 3:
                                    return n = e.file, a = e.fileSize, s = e.partSize, d = e.uploadId, u = e.doneParts, c = e.name, h = [], u.length > 0 && p(u).to(h), f = this._divideParts(a, s), g = f.length, m = !1, v = function (i, o) {
                                        var a = this;
                                        return new r.default(function (r, s) {
                                            var h, v, y, T;
                                            return l.default.async(function (a) {
                                                for (; ;) switch (a.prev = a.next) {
                                                    case 0:
                                                        if (a.prev = 0, i.isCancel()) {
                                                            a.next = 18;
                                                            break
                                                        }
                                                        return h = f[o - 1], v = {
                                                            stream: i._createStream(n, h.start, h.end),
                                                            size: h.end - h.start
                                                        }, a.next = 6, l.default.awrap(i._uploadPart(c, d, o, v));
                                                    case 6:
                                                        if (y = a.sent, i.isCancel() || m) {
                                                            a.next = 15;
                                                            break
                                                        }
                                                        if (e.doneParts.push({
                                                            number: o,
                                                            etag: y.res.headers.etag
                                                        }), !t.progress) {
                                                            a.next = 12;
                                                            break
                                                        }
                                                        return a.next = 12, l.default.awrap(t.progress(u.length / g, e, y.res));
                                                    case 12:
                                                        r({number: o, etag: y.res.headers.etag}), a.next = 16;
                                                        break;
                                                    case 15:
                                                        r();
                                                    case 16:
                                                        a.next = 19;
                                                        break;
                                                    case 18:
                                                        r();
                                                    case 19:
                                                        a.next = 30;
                                                        break;
                                                    case 21:
                                                        a.prev = 21, a.t0 = a.catch(0), (T = new Error).name = a.t0.name, T.message = a.t0.message, T.stack = a.t0.stack, T.partNum = o, p(a.t0).to(T), s(T);
                                                    case 30:
                                                    case"end":
                                                        return a.stop()
                                                }
                                            }, null, a, [[0, 21]])
                                        })
                                    }, y = (0, o.default)(new Array(g), function (e, t) {
                                        return t + 1
                                    }), T = h.map(function (e) {
                                        return e.number
                                    }), w = y.filter(function (e) {
                                        return T.indexOf(e) < 0
                                    }), k = 5, C = t.parallel || k, I.next = 17, l.default.awrap(this._parallel(w, C, function (e) {
                                        return new r.default(function (t, n) {
                                            v(i, e).then(function (e) {
                                                e && h.push(e), t()
                                            }).catch(function (e) {
                                                n(e)
                                            })
                                        })
                                    }));
                                case 17:
                                    if (b = I.sent, m = !0, !this.isCancel()) {
                                        I.next = 22;
                                        break
                                    }
                                    throw v = null, this._makeCancelEvent();
                                case 22:
                                    if (!(b && b.length > 0)) {
                                        I.next = 25;
                                        break
                                    }
                                    throw b[0].message = "Failed to upload some parts with error: " + b[0].toString() + " part_num: " + b[0].partNum, b[0];
                                case 25:
                                    return I.next = 27, l.default.awrap(this.completeMultipartUpload(c, d, h, t));
                                case 27:
                                    return I.abrupt("return", I.sent);
                                case 28:
                                case"end":
                                    return I.stop()
                            }
                        }, null, this)
                    }, v._getFileSize = function (e) {
                        return l.default.async(function (t) {
                            for (; ;) switch (t.prev = t.next) {
                                case 0:
                                    if (!u.buffer(e)) {
                                        t.next = 4;
                                        break
                                    }
                                    return t.abrupt("return", e.length);
                                case 4:
                                    if (!g(e) && !m(e)) {
                                        t.next = 6;
                                        break
                                    }
                                    return t.abrupt("return", e.size);
                                case 6:
                                    throw new Error("_getFileSize requires Buffer/File/Blob.");
                                case 7:
                                case"end":
                                    return t.stop()
                            }
                        }, null, this)
                    };
                    var y = e("stream"), T = y.Readable;

                    function w(e, t) {
                        if (!(this instanceof w)) return new w(e, t);
                        T.call(this, t), this.file = e, this.reader = new FileReader, this.start = 0, this.finish = !1, this.fileBuffer = null
                    }

                    c.inherits(w, T), w.prototype.readFileAndPush = function (e) {
                        if (this.fileBuffer) for (var t = !0; t && this.fileBuffer && this.start < this.fileBuffer.length;) {
                            var i = this.start, n = i + e;
                            n = n > this.fileBuffer.length ? this.fileBuffer.length : n, this.start = n, t = this.push(this.fileBuffer.slice(i, n))
                        }
                    }, w.prototype._read = function (e) {
                        if (this.file && this.start >= this.file.size || this.fileBuffer && this.start >= this.fileBuffer.length || this.finish || 0 === this.start && !this.file) return this.finish || (this.fileBuffer = null, this.finish = !0), void this.push(null);
                        e = e || 16384;
                        var i = this;
                        this.reader.onload = function (n) {
                            i.fileBuffer = t.from(new Uint8Array(n.target.result)), i.file = null, i.readFileAndPush(e)
                        }, 0 === this.start ? this.reader.readAsArrayBuffer(this.file) : this.readFileAndPush(e)
                    }, v._createStream = function (e, t, i) {
                        if (g(e) || m(e)) return new w(e.slice(t, i));
                        throw new Error("_createStream requires File/Blob.")
                    }, v._getPartSize = function (e, t) {
                        return t ? Math.max(Math.ceil(e / 1e4), t) : 1048576
                    }, v._divideParts = function (e, t) {
                        for (var i = Math.ceil(e / t), n = [], o = 0; o < i; o++) {
                            var a = t * o, r = Math.min(a + t, e);
                            n.push({start: a, end: r})
                        }
                        return n
                    }
                }).call(this, e("buffer").Buffer)
            }, {
                "../common/utils/isBlob": 38,
                "../common/utils/isFile": 39,
                "babel-runtime/core-js/array/from": 47,
                "babel-runtime/core-js/promise": 56,
                "babel-runtime/regenerator": 65,
                buffer: 70,
                "copy-to": 73,
                "is-type-of": 233,
                mime: 332,
                path: 246,
                stream: 271,
                util: 287
            }],
            4: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/core-js/promise"), o = c(n), a = e("babel-runtime/core-js/object/keys"),
                    r = c(a), s = e("babel-runtime/core-js/object/assign"), l = c(s),
                    d = e("babel-runtime/regenerator"), u = c(d);

                function c(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var h = e("utility"), f = e("fs"), p = e("is-type-of"), g = e("url"), m = e("copy-to"), v = e("path"),
                    y = e("mime"), T = e("../common/callback"), w = e("../common/signUtils"),
                    k = e("merge-descriptors"), C = e("../common/utils/isBlob"), b = e("../common/utils/isFile"), I = i;
                I.append = function (e, t, i) {
                    var n;
                    return u.default.async(function (o) {
                        for (; ;) switch (o.prev = o.next) {
                            case 0:
                                return void 0 === (i = i || {}).position && (i.position = "0"), i.subres = {
                                    append: "",
                                    position: i.position
                                }, i.method = "POST", o.next = 6, u.default.awrap(this.put(e, t, i));
                            case 6:
                                return (n = o.sent).nextAppendPosition = n.res.headers["x-oss-next-append-position"], o.abrupt("return", n);
                            case 9:
                            case"end":
                                return o.stop()
                        }
                    }, null, this)
                }, I.put = function (e, t, i) {
                    var n, o, a, r, s, l, d;
                    return u.default.async(function (c) {
                        for (; ;) switch (c.prev = c.next) {
                            case 0:
                                if (n = void 0, i = i || {}, e = this._objectName(e), !p.buffer(t)) {
                                    c.next = 7;
                                    break
                                }
                                n = t, c.next = 30;
                                break;
                            case 7:
                                if (!C(t) && !b(t)) {
                                    c.next = 29;
                                    break
                                }
                                return i.mime || (b(t) ? i.mime = y.getType(v.extname(t.name)) : i.mime = t.type), o = this._createStream(t, 0, t.size), c.next = 12, u.default.awrap(this._getFileSize(t));
                            case 12:
                                return i.contentLength = c.sent, c.prev = 13, c.next = 16, u.default.awrap(this.putStream(e, o, i));
                            case 16:
                                return a = c.sent, c.abrupt("return", a);
                            case 20:
                                if (c.prev = 20, c.t0 = c.catch(13), "RequestTimeTooSkewed" !== c.t0.code) {
                                    c.next = 27;
                                    break
                                }
                                return this.options.amendTimeSkewed = +new Date(c.t0.serverTime) - new Date, c.next = 26, u.default.awrap(this.put(e, t, i));
                            case 26:
                                return c.abrupt("return", c.sent);
                            case 27:
                                c.next = 30;
                                break;
                            case 29:
                                throw new TypeError("Must provide Buffer/Blob/File for put.");
                            case 30:
                                return i.headers = i.headers || {}, this._convertMetaToHeaders(i.meta, i.headers), r = i.method || "PUT", s = this._objectRequestParams(r, e, i), T.encodeCallback(s, i), s.mime = i.mime, s.content = n, s.successStatuses = [200], c.next = 40, u.default.awrap(this.request(s));
                            case 40:
                                return l = c.sent, d = {
                                    name: e,
                                    url: this._objectUrl(e),
                                    res: l.res
                                }, s.headers && s.headers["x-oss-callback"] && (d.data = JSON.parse(l.data.toString())), c.abrupt("return", d);
                            case 44:
                            case"end":
                                return c.stop()
                        }
                    }, null, this, [[13, 20]])
                }, I.putStream = function (e, t, i) {
                    var n, o, a, r;
                    return u.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return (i = i || {}).headers = i.headers || {}, e = this._objectName(e), i.contentLength ? i.headers["Content-Length"] = i.contentLength : i.headers["Transfer-Encoding"] = "chunked", this._convertMetaToHeaders(i.meta, i.headers), n = i.method || "PUT", o = this._objectRequestParams(n, e, i), T.encodeCallback(o, i), o.mime = i.mime, o.stream = t, o.successStatuses = [200], s.next = 13, u.default.awrap(this.request(o));
                            case 13:
                                return a = s.sent, r = {
                                    name: e,
                                    url: this._objectUrl(e),
                                    res: a.res
                                }, o.headers && o.headers["x-oss-callback"] && (r.data = JSON.parse(a.data.toString())), s.abrupt("return", r);
                            case 17:
                            case"end":
                                return s.stop()
                        }
                    }, null, this)
                }, k(I, e("../common/object/copyObject")), k(I, e("../common/object/getObjectTagging")), k(I, e("../common/object/putObjectTagging")), k(I, e("../common/object/deleteObjectTagging")), k(I, e("../common/image")), k(I, e("../common/object/getBucketVersions")), k(I, e("../common/object/getACL")), k(I, e("../common/object/putACL")), k(I, e("../common/object/head")), k(I, e("../common/object/delete")), k(I, e("../common/object/get")), I.putMeta = function (e, t, i) {
                    var n;
                    return u.default.async(function (o) {
                        for (; ;) switch (o.prev = o.next) {
                            case 0:
                                return o.next = 2, u.default.awrap(this.copy(e, e, {
                                    meta: t || {},
                                    timeout: i && i.timeout,
                                    ctx: i && i.ctx
                                }));
                            case 2:
                                return n = o.sent, o.abrupt("return", n);
                            case 4:
                            case"end":
                                return o.stop()
                        }
                    }, null, this)
                }, I.list = function (e, t) {
                    var i, n, o, a, r;
                    return u.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return (i = this._objectRequestParams("GET", "", t)).query = e, i.xmlResponse = !0, i.successStatuses = [200], s.next = 6, u.default.awrap(this.request(i));
                            case 6:
                                return n = s.sent, o = n.data.Contents, a = this, o && (Array.isArray(o) || (o = [o]), o = o.map(function (e) {
                                    return {
                                        name: e.Key,
                                        url: a._objectUrl(e.Key),
                                        lastModified: e.LastModified,
                                        etag: e.ETag,
                                        type: e.Type,
                                        size: Number(e.Size),
                                        storageClass: e.StorageClass,
                                        owner: {id: e.Owner.ID, displayName: e.Owner.DisplayName}
                                    }
                                })), (r = n.data.CommonPrefixes || null) && (Array.isArray(r) || (r = [r]), r = r.map(function (e) {
                                    return e.Prefix
                                })), s.abrupt("return", {
                                    res: n.res,
                                    objects: o,
                                    prefixes: r,
                                    nextMarker: n.data.NextMarker || null,
                                    isTruncated: "true" === n.data.IsTruncated
                                });
                            case 13:
                            case"end":
                                return s.stop()
                        }
                    }, null, this)
                }, I.restore = function (e, t) {
                    var i, n;
                    return u.default.async(function (o) {
                        for (; ;) switch (o.prev = o.next) {
                            case 0:
                                return (t = t || {}).subres = (0, l.default)({restore: ""}, t.subres), t.versionId && (t.subres.versionId = t.versionId), (i = this._objectRequestParams("POST", e, t)).successStatuses = [202], o.next = 7, u.default.awrap(this.request(i));
                            case 7:
                                return n = o.sent, o.abrupt("return", {res: n.res});
                            case 9:
                            case"end":
                                return o.stop()
                        }
                    }, null, this)
                }, I.signatureUrl = function (e, t) {
                    t = t || {}, e = this._objectName(e), t.method = t.method || "GET";
                    var i = h.timestamp() + (t.expires || 1800), n = {bucket: this.options.bucket, object: e},
                        o = this._getResource(n);
                    this.options.stsToken && (t["security-token"] = this.options.stsToken);
                    var a = w._signatureForURL(this.options.accessKeySecret, t, o, i), r = g.parse(this._getReqUrl(n));
                    return r.query = {
                        OSSAccessKeyId: this.options.accessKeyId,
                        Expires: i,
                        Signature: a.Signature
                    }, m(a.subResource).to(r.query), r.format()
                }, I.getObjectUrl = function (e, t) {
                    return t ? "/" !== t[t.length - 1] && (t += "/") : t = this.options.endpoint.format(), t + this._escape(this._objectName(e))
                }, I._objectUrl = function (e) {
                    return this._getReqUrl({bucket: this.options.bucket, object: e})
                }, I.generateObjectUrl = function (e, t) {
                    if (t) "/" !== t[t.length - 1] && (t += "/"); else {
                        t = this.options.endpoint.format();
                        var i = g.parse(t), n = this.options.bucket;
                        i.hostname = n + "." + i.hostname, i.host = n + "." + i.host, t = i.format()
                    }
                    return t + this._escape(this._objectName(e))
                }, I._objectRequestParams = function (e, t, i) {
                    if (!this.options.bucket) throw new Error("Please create a bucket first");
                    i = i || {};
                    var n = {
                        object: t = this._objectName(t),
                        bucket: this.options.bucket,
                        method: e,
                        subres: i && i.subres,
                        timeout: i && i.timeout,
                        ctx: i && i.ctx
                    };
                    return i.headers && (n.headers = {}, m(i.headers).to(n.headers)), n
                }, I._objectName = function (e) {
                    return e.replace(/^\/+/, "")
                }, I._convertMetaToHeaders = function (e, t) {
                    e && (0, r.default)(e).forEach(function (i) {
                        t["x-oss-meta-" + i] = e[i]
                    })
                }, I._deleteFileSafe = function (e) {
                    var t = this;
                    return new o.default(function (i) {
                        f.exists(e, function (n) {
                            n ? f.unlink(e, function (n) {
                                n && t.debug("unlink %j error: %s", e, n, "error"), i()
                            }) : i()
                        })
                    })
                }
            }, {
                "../common/callback": 14,
                "../common/image": 16,
                "../common/object/copyObject": 19,
                "../common/object/delete": 20,
                "../common/object/deleteObjectTagging": 21,
                "../common/object/get": 22,
                "../common/object/getACL": 23,
                "../common/object/getBucketVersions": 24,
                "../common/object/getObjectTagging": 25,
                "../common/object/head": 26,
                "../common/object/putACL": 27,
                "../common/object/putObjectTagging": 28,
                "../common/signUtils": 30,
                "../common/utils/isBlob": 38,
                "../common/utils/isFile": 39,
                "babel-runtime/core-js/object/assign": 49,
                "babel-runtime/core-js/object/keys": 55,
                "babel-runtime/core-js/promise": 56,
                "babel-runtime/regenerator": 65,
                "copy-to": 73,
                fs: 68,
                "is-type-of": 233,
                "merge-descriptors": 237,
                mime: 332,
                path: 246,
                url: 279,
                utility: 333
            }],
            5: [function (e, t, i) {
                "use strict";
                i.version = "6.8.0"
            }, {}],
            6: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("../utils/checkBucketName"), s = i;
                s.deleteBucketLifecycle = function (e, t) {
                    var i, n;
                    return a.default.async(function (o) {
                        for (; ;) switch (o.prev = o.next) {
                            case 0:
                                return r(e), (i = this._bucketRequestParams("DELETE", e, "lifecycle", t)).successStatuses = [204], o.next = 5, a.default.awrap(this.request(i));
                            case 5:
                                return n = o.sent, o.abrupt("return", {res: n.res});
                            case 7:
                            case"end":
                                return o.stop()
                        }
                    }, null, this)
                }
            }, {"../utils/checkBucketName": 31, "babel-runtime/regenerator": 65}],
            7: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("../utils/checkBucketName"), s = i;
                s.deleteBucketWebsite = function (e, t) {
                    var i, n;
                    return a.default.async(function (o) {
                        for (; ;) switch (o.prev = o.next) {
                            case 0:
                                return r(e), (i = this._bucketRequestParams("DELETE", e, "website", t)).successStatuses = [204], o.next = 5, a.default.awrap(this.request(i));
                            case 5:
                                return n = o.sent, o.abrupt("return", {res: n.res});
                            case 7:
                            case"end":
                                return o.stop()
                        }
                    }, null, this)
                }
            }, {"../utils/checkBucketName": 31, "babel-runtime/regenerator": 65}],
            8: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("../utils/checkBucketName"), s = e("../utils/isArray"), l = e("../utils/formatObjKey"), d = i;
                d.getBucketLifecycle = function (e, t) {
                    var i, n, o;
                    return a.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                return r(e), (i = this._bucketRequestParams("GET", e, "lifecycle", t)).successStatuses = [200], i.xmlResponse = !0, d.next = 6, a.default.awrap(this.request(i));
                            case 6:
                                return n = d.sent, (o = n.data.Rule || null) && (s(o) || (o = [o]), o = o.map(function (e) {
                                    return e.ID && (e.id = e.ID, delete e.ID), e.Tag && !s(e.Tag) && (e.Tag = [e.Tag]), l(e, "firstLowerCase")
                                })), d.abrupt("return", {rules: o, res: n.res});
                            case 10:
                            case"end":
                                return d.stop()
                        }
                    }, null, this)
                }
            }, {
                "../utils/checkBucketName": 31,
                "../utils/formatObjKey": 35,
                "../utils/isArray": 37,
                "babel-runtime/regenerator": 65
            }],
            9: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("../utils/checkBucketName"), s = i;
                s.getBucketVersioning = function (e, t) {
                    var i, n, o;
                    return a.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return r(e), (i = this._bucketRequestParams("GET", e, "versioning", t)).xmlResponse = !0, i.successStatuses = [200], s.next = 6, a.default.awrap(this.request(i));
                            case 6:
                                return n = s.sent, o = n.data.Status, s.abrupt("return", {
                                    status: n.status,
                                    versionStatus: o,
                                    res: n.res
                                });
                            case 9:
                            case"end":
                                return s.stop()
                        }
                    }, null, this)
                }
            }, {"../utils/checkBucketName": 31, "babel-runtime/regenerator": 65}],
            10: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("../utils/checkBucketName"), s = e("../utils/isObject"), l = i;
                l.getBucketWebsite = function (e, t) {
                    var i, n, o;
                    return a.default.async(function (l) {
                        for (; ;) switch (l.prev = l.next) {
                            case 0:
                                return r(e), (i = this._bucketRequestParams("GET", e, "website", t)).successStatuses = [200], i.xmlResponse = !0, l.next = 6, a.default.awrap(this.request(i));
                            case 6:
                                return n = l.sent, o = [], n.data.RoutingRules && n.data.RoutingRules.RoutingRule && (o = s(n.data.RoutingRules.RoutingRule) ? [n.data.RoutingRules.RoutingRule] : n.data.RoutingRules.RoutingRule), l.abrupt("return", {
                                    index: n.data.IndexDocument && n.data.IndexDocument.Suffix || "",
                                    supportSubDir: n.data.IndexDocument && n.data.IndexDocument.SupportSubDir || "false",
                                    type: n.data.IndexDocument && n.data.IndexDocument.Type,
                                    routingRules: o,
                                    error: n.data.ErrorDocument && n.data.ErrorDocument.Key || null,
                                    res: n.res
                                });
                            case 10:
                            case"end":
                                return l.stop()
                        }
                    }, null, this)
                }
            }, {"../utils/checkBucketName": 31, "../utils/isObject": 41, "babel-runtime/regenerator": 65}],
            11: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("../utils/checkBucketName"), s = e("../utils/isArray"), l = e("../utils/deepCopy"),
                    d = e("../utils/isObject"), u = e("../utils/obj2xml"), c = e("../utils/checkObjectTag"),
                    h = e("../utils/getStrBytesCount"), f = i;

                function p(e, t) {
                    var i = e.days, n = e.createdBeforeDate;
                    if (!i && !n) throw new Error(t + " must includes days or createdBeforeDate");
                    if (i && !/^[1-9][0-9]*$/.test(i)) throw new Error("days must be a positive integer");
                    if (n && !/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(n)) throw new Error("createdBeforeDate must be date and conform to iso8601 format")
                }

                function g(e) {
                    if (e.id && h(e.id) > 255) throw new Error("ID is composed of 255 bytes at most");
                    if ("" === e.prefix || void 0 === e.prefix) throw new Error("Rule must includes prefix");
                    if (!["Enabled", "Disabled"].includes(e.status)) throw new Error("Status must be  Enabled or Disabled");
                    if (e.transition) {
                        if (!["IA", "Archive"].includes(e.transition.storageClass)) throw new Error("StorageClass must be  IA or Archive");
                        p(e.transition, "Transition")
                    }
                    if (e.expiration) if (e.expiration.expiredObjectDeleteMarker) {
                        if (e.expiration.days || e.expiration.createdBeforeDate) throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")
                    } else p(e.expiration, "Expiration");
                    if (e.abortMultipartUpload && p(e.abortMultipartUpload, "AbortMultipartUpload"), !(e.expiration || e.abortMultipartUpload || e.transition || e.noncurrentVersionTransition)) throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");
                    if (e.tag) {
                        if (e.abortMultipartUpload) throw new Error("Tag cannot be used with abortMultipartUpload");
                        !function (e) {
                            if (!s(e) && !d(e)) throw new Error("tag must be Object or Array");
                            e = d(e) ? [e] : e;
                            var t = {};
                            l(e).forEach(function (e) {
                                t[e.key] = e.value
                            }), c(t)
                        }(e.tag)
                    }
                }

                f.putBucketLifecycle = function (e, t, i) {
                    var n, o, l, d, c;
                    return a.default.async(function (h) {
                        for (; ;) switch (h.prev = h.next) {
                            case 0:
                                if (r(e), s(t)) {
                                    h.next = 3;
                                    break
                                }
                                throw new Error("rules must be Array");
                            case 3:
                                return n = this._bucketRequestParams("PUT", e, "lifecycle", i), l = {LifecycleConfiguration: {Rule: o = []}}, t.forEach(function (e) {
                                    var t;
                                    (t = e).days && (t.expiration = {days: t.days}), t.date && (t.expiration = {createdBeforeDate: t.date}), g(e), e.id && (e.ID = e.id, delete e.id), o.push(e)
                                }), d = u(l, {
                                    headers: !0,
                                    firstUpperCase: !0
                                }), n.content = d, n.mime = "xml", n.successStatuses = [200], h.next = 13, a.default.awrap(this.request(n));
                            case 13:
                                return c = h.sent, h.abrupt("return", {res: c.res});
                            case 15:
                            case"end":
                                return h.stop()
                        }
                    }, null, this)
                }
            }, {
                "../utils/checkBucketName": 31,
                "../utils/checkObjectTag": 32,
                "../utils/deepCopy": 34,
                "../utils/getStrBytesCount": 36,
                "../utils/isArray": 37,
                "../utils/isObject": 41,
                "../utils/obj2xml": 42,
                "babel-runtime/regenerator": 65
            }],
            12: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("../utils/checkBucketName"), s = e("../utils/obj2xml"), l = i;
                l.putBucketVersioning = function (e, t) {
                    var i, n, o, l = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
                    return a.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                if (r(e), ["Enabled", "Suspended"].includes(t)) {
                                    d.next = 3;
                                    break
                                }
                                throw new Error("status must be Enabled or Suspended");
                            case 3:
                                return i = this._bucketRequestParams("PUT", e, "versioning", l), n = {VersioningConfiguration: {Status: t}}, i.mime = "xml", i.content = s(n, {headers: !0}), d.next = 9, a.default.awrap(this.request(i));
                            case 9:
                                return o = d.sent, d.abrupt("return", {res: o.res, status: o.status});
                            case 11:
                            case"end":
                                return d.stop()
                        }
                    }, null, this)
                }
            }, {"../utils/checkBucketName": 31, "../utils/obj2xml": 42, "babel-runtime/regenerator": 65}],
            13: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("../utils/checkBucketName"), s = e("../utils/obj2xml"), l = e("../utils/isArray"), d = i;
                d.putBucketWebsite = function (e) {
                    var t, i, n, o, d, u = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
                        c = arguments[2];
                    return a.default.async(function (h) {
                        for (; ;) switch (h.prev = h.next) {
                            case 0:
                                if (r(e), t = this._bucketRequestParams("PUT", e, "website", c), i = {Suffix: u.index || "index.html"}, o = {WebsiteConfiguration: n = {IndexDocument: i}}, u.supportSubDir && (i.SupportSubDir = u.supportSubDir), u.type && (i.Type = u.type), u.error && (n.ErrorDocument = {Key: u.error}), void 0 === u.routingRules) {
                                    h.next = 12;
                                    break
                                }
                                if (l(u.routingRules)) {
                                    h.next = 11;
                                    break
                                }
                                throw new Error("RoutingRules must be Array");
                            case 11:
                                n.RoutingRules = {RoutingRule: u.routingRules};
                            case 12:
                                return o = s(o), t.content = o, t.mime = "xml", t.successStatuses = [200], h.next = 18, a.default.awrap(this.request(t));
                            case 18:
                                return d = h.sent, h.abrupt("return", {res: d.res});
                            case 20:
                            case"end":
                                return h.stop()
                        }
                    }, null, this)
                }
            }, {
                "../utils/checkBucketName": 31,
                "../utils/isArray": 37,
                "../utils/obj2xml": 42,
                "babel-runtime/regenerator": 65
            }],
            14: [function (e, t, i) {
                (function (t) {
                    "use strict";
                    var n = e("babel-runtime/core-js/object/keys"), o = s(n),
                        a = e("babel-runtime/core-js/json/stringify"), r = s(a);

                    function s(e) {
                        return e && e.__esModule ? e : {default: e}
                    }

                    i.encodeCallback = function (e, i) {
                        if (e.headers = e.headers || {}, !Object.prototype.hasOwnProperty.call(e.headers, "x-oss-callback") && i.callback) {
                            var n = {callbackUrl: encodeURI(i.callback.url), callbackBody: i.callback.body};
                            i.callback.host && (n.callbackHost = i.callback.host), i.callback.contentType && (n.callbackBodyType = i.callback.contentType);
                            var a = t.from((0, r.default)(n)).toString("base64");
                            if (e.headers["x-oss-callback"] = a, i.callback.customValue) {
                                var s = {};
                                (0, o.default)(i.callback.customValue).forEach(function (e) {
                                    s["x:" + e] = i.callback.customValue[e]
                                }), e.headers["x-oss-callback-var"] = t.from((0, r.default)(s)).toString("base64")
                            }
                        }
                    }
                }).call(this, e("buffer").Buffer)
            }, {"babel-runtime/core-js/json/stringify": 48, "babel-runtime/core-js/object/keys": 55, buffer: 70}],
            15: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/assign"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("humanize-ms"), s = e("url"), l = e("../utils/checkBucketName");
                t.exports = function (e) {
                    if (!e || !e.accessKeyId || !e.accessKeySecret) throw new Error("require accessKeyId, accessKeySecret");
                    e.bucket && l(e.bucket);
                    var t, i, n, o, d, u = (0, a.default)({
                        region: "oss-cn-hangzhou",
                        internal: !1,
                        secure: !1,
                        timeout: 6e4,
                        bucket: null,
                        endpoint: null,
                        cname: !1,
                        isRequestPay: !1,
                        sldEnable: !1
                    }, e);
                    if (u.accessKeyId = u.accessKeyId.trim(), u.accessKeySecret = u.accessKeySecret.trim(), u.timeout && (u.timeout = r(u.timeout)), u.endpoint) u.endpoint = function (e, t) {
                        var i = s.parse(e);
                        if (i.protocol || (i = s.parse("http" + (t ? "s" : "") + "://" + e)), "http:" !== i.protocol && "https:" !== i.protocol) throw new Error("Endpoint protocol must be http or https.");
                        return i
                    }(u.endpoint, u.secure); else {
                        if (!u.region) throw new Error("require options.endpoint or options.region");
                        u.endpoint = (t = u.region, i = u.internal, n = u.secure, o = n ? "https://" : "http://", d = i ? "-internal.aliyuncs.com" : ".aliyuncs.com", "vpc100-oss-cn-" === t.substr(0, "vpc100-oss-cn-".length) && (d = ".aliyuncs.com"), s.parse(o + t + d))
                    }
                    return u.inited = !0, u
                }
            }, {
                "../utils/checkBucketName": 31,
                "babel-runtime/core-js/object/assign": 49,
                "humanize-ms": 224,
                url: 279
            }],
            16: [function (e, t, i) {
                "use strict";
                var n = e("merge-descriptors"), o = i;
                n(o, e("./processObjectSave"))
            }, {"./processObjectSave": 17, "merge-descriptors": 237}],
            17: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("../utils/checkBucketName"), s = e("querystring"), l = e("js-base64"), d = l.Base64.encode,
                    u = i;

                function c(e, t) {
                    if (!e) throw new Error(t + " is required");
                    if ("string" != typeof e) throw new Error(t + " must be String")
                }

                u.processObjectSave = function (e, t, i, n) {
                    var o, l, u, h;
                    return a.default.async(function (f) {
                        for (; ;) switch (f.prev = f.next) {
                            case 0:
                                return c(e, "sourceObject"), c(t, "targetObject"), c(i, "process"), t = this._objectName(t), n && r(n), o = this._objectRequestParams("POST", e, {subres: "x-oss-process"}), l = n ? ",b_" + d(n) : "", t = d(t), u = {"x-oss-process": i + "|sys/saveas,o_" + t + l}, o.content = s.stringify(u), f.next = 12, a.default.awrap(this.request(o));
                            case 12:
                                return h = f.sent, f.abrupt("return", {res: h.res, status: h.res.status});
                            case 14:
                            case"end":
                                return f.stop()
                        }
                    }, null, this)
                }
            }, {"../utils/checkBucketName": 31, "babel-runtime/regenerator": 65, "js-base64": 236, querystring: 253}],
            18: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/regenerator"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("copy-to"), s = e("./callback"), l = e("./utils/deepCopy"), d = i;
                d.listUploads = function (e, t) {
                    var i, n, o, s;
                    return a.default.async(function (l) {
                        for (; ;) switch (l.prev = l.next) {
                            case 0:
                                return i = {}, r(t = t || {}).to(i), i.subres = "uploads", (n = this._objectRequestParams("GET", "", i)).query = e, n.xmlResponse = !0, n.successStatuses = [200], l.next = 10, a.default.awrap(this.request(n));
                            case 10:
                                return o = l.sent, s = o.data.Upload || [], Array.isArray(s) || (s = [s]), s = s.map(function (e) {
                                    return {name: e.Key, uploadId: e.UploadId, initiated: e.Initiated}
                                }), l.abrupt("return", {
                                    res: o.res,
                                    uploads: s,
                                    bucket: o.data.Bucket,
                                    nextKeyMarker: o.data.NextKeyMarker,
                                    nextUploadIdMarker: o.data.NextUploadIdMarker,
                                    isTruncated: "true" === o.data.IsTruncated
                                });
                            case 15:
                            case"end":
                                return l.stop()
                        }
                    }, null, this)
                }, d.listParts = function (e, t, i, n) {
                    var o, s, l;
                    return a.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                return o = {}, r(n = n || {}).to(o), o.subres = {uploadId: t}, (s = this._objectRequestParams("GET", e, o)).query = i, s.xmlResponse = !0, s.successStatuses = [200], d.next = 10, a.default.awrap(this.request(s));
                            case 10:
                                return l = d.sent, d.abrupt("return", {
                                    res: l.res,
                                    uploadId: l.data.UploadId,
                                    bucket: l.data.Bucket,
                                    name: l.data.Key,
                                    partNumberMarker: l.data.PartNumberMarker,
                                    nextPartNumberMarker: l.data.NextPartNumberMarker,
                                    maxParts: l.data.MaxParts,
                                    isTruncated: l.data.IsTruncated,
                                    parts: l.data.Part || []
                                });
                            case 12:
                            case"end":
                                return d.stop()
                        }
                    }, null, this)
                }, d.abortMultipartUpload = function (e, t, i) {
                    var n, o, s;
                    return a.default.async(function (l) {
                        for (; ;) switch (l.prev = l.next) {
                            case 0:
                                return this._stop(), n = {}, r(i = i || {}).to(n), n.subres = {uploadId: t}, (o = this._objectRequestParams("DELETE", e, n)).successStatuses = [204], l.next = 9, a.default.awrap(this.request(o));
                            case 9:
                                return s = l.sent, l.abrupt("return", {res: s.res});
                            case 11:
                            case"end":
                                return l.stop()
                        }
                    }, null, this)
                }, d.initMultipartUpload = function (e, t) {
                    var i, n, o;
                    return a.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return i = {}, r(t = t || {}).to(i), i.headers = i.headers || {}, this._convertMetaToHeaders(t.meta, i.headers), i.subres = "uploads", (n = this._objectRequestParams("POST", e, i)).mime = t.mime, n.xmlResponse = !0, n.successStatuses = [200], s.next = 12, a.default.awrap(this.request(n));
                            case 12:
                                return o = s.sent, s.abrupt("return", {
                                    res: o.res,
                                    bucket: o.data.Bucket,
                                    name: o.data.Key,
                                    uploadId: o.data.UploadId
                                });
                            case 14:
                            case"end":
                                return s.stop()
                        }
                    }, null, this)
                }, d.uploadPart = function (e, t, i, n, o, r, s) {
                    var l;
                    return a.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                return l = {
                                    stream: this._createStream(n, o, r),
                                    size: r - o
                                }, d.next = 3, a.default.awrap(this._uploadPart(e, t, i, l, s));
                            case 3:
                                return d.abrupt("return", d.sent);
                            case 4:
                            case"end":
                                return d.stop()
                        }
                    }, null, this)
                }, d.completeMultipartUpload = function (e, t, i, n) {
                    var o, r, d, u, c, h, f, p;
                    return a.default.async(function (g) {
                        for (; ;) switch (g.prev = g.next) {
                            case 0:
                                for (o = i.concat().sort(function (e, t) {
                                    return e.number - t.number
                                }).filter(function (e, t, i) {
                                    return !t || e.number !== i[t - 1].number
                                }), r = '<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n', d = 0; d < o.length; d++) u = o[d], r += "<Part>\n", r += "<PartNumber>" + u.number + "</PartNumber>\n", r += "<ETag>" + u.etag + "</ETag>\n", r += "</Part>\n";
                                return r += "</CompleteMultipartUpload>", c = {}, (c = l(n = n || {})).headers && delete c.headers["x-oss-server-side-encryption"], c.subres = {uploadId: t}, h = this._objectRequestParams("POST", e, c), s.encodeCallback(h, c), h.mime = "xml", h.content = r, h.headers && h.headers["x-oss-callback"] || (h.xmlResponse = !0), h.successStatuses = [200], g.next = 17, a.default.awrap(this.request(h));
                            case 17:
                                return f = g.sent, p = {
                                    res: f.res,
                                    bucket: h.bucket,
                                    name: e,
                                    etag: f.res.headers.etag
                                }, h.headers && h.headers["x-oss-callback"] && (p.data = JSON.parse(f.data.toString())), g.abrupt("return", p);
                            case 21:
                            case"end":
                                return g.stop()
                        }
                    }, null, this)
                }, d._uploadPart = function (e, t, i, n, o) {
                    var s, l, d;
                    return a.default.async(function (u) {
                        for (; ;) switch (u.prev = u.next) {
                            case 0:
                                return s = {}, r(o = o || {}).to(s), s.headers = {"Content-Length": n.size}, s.subres = {
                                    partNumber: i,
                                    uploadId: t
                                }, (l = this._objectRequestParams("PUT", e, s)).mime = s.mime, l.stream = n.stream, l.successStatuses = [200], u.next = 11, a.default.awrap(this.request(l));
                            case 11:
                                if ((d = u.sent).res.headers.etag) {
                                    u.next = 14;
                                    break
                                }
                                throw new Error("Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html");
                            case 14:
                                return n.stream = null, l.stream = null, u.abrupt("return", {
                                    name: e,
                                    etag: d.res.headers.etag,
                                    res: d.res
                                });
                            case 17:
                            case"end":
                                return u.stop()
                        }
                    }, null, this)
                }
            }, {"./callback": 14, "./utils/deepCopy": 34, "babel-runtime/regenerator": 65, "copy-to": 73}],
            19: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = d(n), a = e("babel-runtime/core-js/object/keys"), r = d(a),
                    s = e("babel-runtime/helpers/typeof"), l = d(s);

                function d(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var u = e("../utils/checkBucketName"), c = i;
                c.copy = function (e, t, i, n) {
                    var a, s, d;
                    return o.default.async(function (u) {
                        for (; ;) switch (u.prev = u.next) {
                            case 0:
                                return "object" === (void 0 === i ? "undefined" : (0, l.default)(i)) && (n = i), (n = n || {}).headers = n.headers || {}, (0, r.default)(n.headers).forEach(function (e) {
                                    n.headers["x-oss-copy-source-" + e.toLowerCase()] = n.headers[e]
                                }), n.meta && (n.headers["x-oss-metadata-directive"] = "REPLACE"), this._convertMetaToHeaders(n.meta, n.headers), t = this._getSourceName(t, i), n.versionId && (t = t + "?versionId=" + n.versionId), n.headers["x-oss-copy-source"] = t, (a = this._objectRequestParams("PUT", e, n)).xmlResponse = !0, a.successStatuses = [200, 304], u.next = 14, o.default.awrap(this.request(a));
                            case 14:
                                return s = u.sent, (d = s.data) && (d = {
                                    etag: d.ETag,
                                    lastModified: d.LastModified
                                }), u.abrupt("return", {data: d, res: s.res});
                            case 18:
                            case"end":
                                return u.stop()
                        }
                    }, null, this)
                }, c._getSourceName = function (e, t) {
                    return "string" == typeof t ? e = this._objectName(e) : "/" !== e[0] ? t = this.options.bucket : (t = e.replace(/\/(.+?)(\/.*)/, "$1"), e = e.replace(/(\/.+?\/)(.*)/, "$2")), u(t), e = encodeURI(e), e = "/" + t + "/" + e
                }
            }, {
                "../utils/checkBucketName": 31,
                "babel-runtime/core-js/object/keys": 55,
                "babel-runtime/helpers/typeof": 64,
                "babel-runtime/regenerator": 65
            }],
            20: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = s(n), a = e("babel-runtime/core-js/object/assign"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var l = i;
                l.delete = function (e) {
                    var t, i, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                    return o.default.async(function (a) {
                        for (; ;) switch (a.prev = a.next) {
                            case 0:
                                return n.subres = (0, r.default)({}, n.subres), n.versionId && (n.subres.versionId = n.versionId), (t = this._objectRequestParams("DELETE", e, n)).successStatuses = [204], a.next = 6, o.default.awrap(this.request(t));
                            case 6:
                                return i = a.sent, a.abrupt("return", {res: i.res});
                            case 8:
                            case"end":
                                return a.stop()
                        }
                    }, null, this)
                }
            }, {"babel-runtime/core-js/object/assign": 49, "babel-runtime/regenerator": 65}],
            21: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = s(n), a = e("babel-runtime/core-js/object/assign"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var l = i;
                l.deleteObjectTagging = function (e) {
                    var t, i, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                    return o.default.async(function (a) {
                        for (; ;) switch (a.prev = a.next) {
                            case 0:
                                return n.subres = (0, r.default)({tagging: ""}, n.subres), n.versionId && (n.subres.versionId = n.versionId), e = this._objectName(e), (t = this._objectRequestParams("DELETE", e, n)).successStatuses = [204], a.next = 7, o.default.awrap(this.request(t));
                            case 7:
                                return i = a.sent, a.abrupt("return", {status: i.status, res: i.res});
                            case 9:
                            case"end":
                                return a.stop()
                        }
                    }, null, this)
                }
            }, {"babel-runtime/core-js/object/assign": 49, "babel-runtime/regenerator": 65}],
            22: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = s(n), a = e("babel-runtime/core-js/object/assign"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var l = e("fs"), d = e("is-type-of"), u = i;
                u.get = function (e, t) {
                    var i, n, a, s, u = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
                    return o.default.async(function (c) {
                        for (; ;) switch (c.prev = c.next) {
                            case 0:
                                return i = null, n = !1, d.writableStream(t) ? i = t : d.string(t) ? (i = l.createWriteStream(t), n = !0) : u = t, (u = u || {}).subres = (0, r.default)({}, u.subres), u.versionId && (u.subres.versionId = u.versionId), u.process && (u.subres["x-oss-process"] = u.process), a = void 0, c.prev = 8, (s = this._objectRequestParams("GET", e, u)).writeStream = i, s.successStatuses = [200, 206, 304], c.next = 14, o.default.awrap(this.request(s));
                            case 14:
                                a = c.sent, n && i.destroy(), c.next = 25;
                                break;
                            case 18:
                                if (c.prev = 18, c.t0 = c.catch(8), !n) {
                                    c.next = 24;
                                    break
                                }
                                return i.destroy(), c.next = 24, o.default.awrap(this._deleteFileSafe(t));
                            case 24:
                                throw c.t0;
                            case 25:
                                return c.abrupt("return", {res: a.res, content: a.data});
                            case 26:
                            case"end":
                                return c.stop()
                        }
                    }, null, this, [[8, 18]])
                }
            }, {"babel-runtime/core-js/object/assign": 49, "babel-runtime/regenerator": 65, fs: 68, "is-type-of": 233}],
            23: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = s(n), a = e("babel-runtime/core-js/object/assign"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var l = i;
                l.getACL = function (e) {
                    var t, i, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                    return o.default.async(function (a) {
                        for (; ;) switch (a.prev = a.next) {
                            case 0:
                                return n.subres = (0, r.default)({acl: ""}, n.subres), n.versionId && (n.subres.versionId = n.versionId), e = this._objectName(e), (t = this._objectRequestParams("GET", e, n)).successStatuses = [200], t.xmlResponse = !0, a.next = 8, o.default.awrap(this.request(t));
                            case 8:
                                return i = a.sent, a.abrupt("return", {
                                    acl: i.data.AccessControlList.Grant,
                                    owner: {id: i.data.Owner.ID, displayName: i.data.Owner.DisplayName},
                                    res: i.res
                                });
                            case 10:
                            case"end":
                                return a.stop()
                        }
                    }, null, this)
                }
            }, {"babel-runtime/core-js/object/assign": 49, "babel-runtime/regenerator": 65}],
            24: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/core-js/object/keys"), o = d(n), a = e("babel-runtime/regenerator"), r = d(a),
                    s = e("babel-runtime/core-js/object/assign"), l = d(s);

                function d(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var u = i, c = e("../utils/isObject");

                function h() {
                    var e, t, i, n, o, a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
                        s = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                    return r.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                if (!a.versionIdMarker || void 0 !== a.keyMarker) {
                                    d.next = 2;
                                    break
                                }
                                throw new Error("A version-id marker cannot be specified without a key marker");
                            case 2:
                                return s.subres = (0, l.default)({versions: ""}, s.subres), s.versionId && (s.subres.versionId = s.versionId), (e = this._objectRequestParams("GET", "", s)).xmlResponse = !0, e.successStatuses = [200], e.query = f(a), d.next = 10, r.default.awrap(this.request(e));
                            case 10:
                                return t = d.sent, i = t.data.Version || [], n = t.data.DeleteMarker || [], o = this, i && (Array.isArray(i) || (i = [i]), i = i.map(function (e) {
                                    return {
                                        name: e.Key,
                                        url: o._objectUrl(e.Key),
                                        lastModified: e.LastModified,
                                        isLatest: "true" === e.IsLatest,
                                        versionId: e.VersionId,
                                        etag: e.ETag,
                                        type: e.Type,
                                        size: Number(e.Size),
                                        storageClass: e.StorageClass,
                                        owner: {id: e.Owner.ID, displayName: e.Owner.DisplayName}
                                    }
                                })), n && (Array.isArray(n) || (n = [n]), n = n.map(function (e) {
                                    return {
                                        name: e.Key,
                                        lastModified: e.LastModified,
                                        versionId: e.VersionId,
                                        owner: {id: e.Owner.ID, displayName: e.Owner.DisplayName}
                                    }
                                })), d.abrupt("return", {
                                    res: t.res,
                                    objects: i,
                                    deleteMarker: n,
                                    nextMarker: t.data.NextMarker || null,
                                    NextVersionIdMarker: t.data.NextVersionIdMarker || null,
                                    isTruncated: "true" === t.data.IsTruncated
                                });
                            case 17:
                            case"end":
                                return d.stop()
                        }
                    }, null, this)
                }

                function f() {
                    var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, t = {};
                    return c(e) && (0, o.default)(e).forEach(function (i) {
                        var n;
                        t[(n = i, n.replace(/([A-Z])/g, "-$1").toLowerCase())] = e[i]
                    }), t
                }

                u.getBucketVersions = h, u.listObjectVersions = h
            }, {
                "../utils/isObject": 41,
                "babel-runtime/core-js/object/assign": 49,
                "babel-runtime/core-js/object/keys": 55,
                "babel-runtime/regenerator": 65
            }],
            25: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = s(n), a = e("babel-runtime/core-js/object/assign"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var l = i, d = e("../utils/isObject");
                l.getObjectTagging = function (e) {
                    var t, i, n, a, s, l = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                    return o.default.async(function (u) {
                        for (; ;) switch (u.prev = u.next) {
                            case 0:
                                return l.subres = (0, r.default)({tagging: ""}, l.subres), l.versionId && (l.subres.versionId = l.versionId), e = this._objectName(e), (t = this._objectRequestParams("GET", e, l)).successStatuses = [200], u.next = 7, o.default.awrap(this.request(t));
                            case 7:
                                return i = u.sent, u.next = 10, o.default.awrap(this.parseXML(i.data));
                            case 10:
                                return n = u.sent, a = (a = n.TagSet.Tag) && d(a) ? [a] : a || [], s = {}, a.forEach(function (e) {
                                    s[e.Key] = e.Value
                                }), u.abrupt("return", {status: i.status, res: i.res, tag: s});
                            case 16:
                            case"end":
                                return u.stop()
                        }
                    }, null, this)
                }
            }, {"../utils/isObject": 41, "babel-runtime/core-js/object/assign": 49, "babel-runtime/regenerator": 65}],
            26: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = d(n), a = e("babel-runtime/core-js/object/keys"), r = d(a),
                    s = e("babel-runtime/core-js/object/assign"), l = d(s);

                function d(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var u = i;
                u.head = function (e) {
                    var t, i, n, a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                    return o.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return a.subres = (0, l.default)({}, a.subres), a.versionId && (a.subres.versionId = a.versionId), (t = this._objectRequestParams("HEAD", e, a)).successStatuses = [200, 304], s.next = 6, o.default.awrap(this.request(t));
                            case 6:
                                return i = s.sent, n = {
                                    meta: null,
                                    res: i.res,
                                    status: i.status
                                }, 200 === i.status && (0, r.default)(i.headers).forEach(function (e) {
                                    0 === e.indexOf("x-oss-meta-") && (n.meta || (n.meta = {}), n.meta[e.substring(11)] = i.headers[e])
                                }), s.abrupt("return", n);
                            case 10:
                            case"end":
                                return s.stop()
                        }
                    }, null, this)
                }
            }, {
                "babel-runtime/core-js/object/assign": 49,
                "babel-runtime/core-js/object/keys": 55,
                "babel-runtime/regenerator": 65
            }],
            27: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = s(n), a = e("babel-runtime/core-js/object/assign"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var l = i;
                l.putACL = function (e, t, i) {
                    var n, a;
                    return o.default.async(function (s) {
                        for (; ;) switch (s.prev = s.next) {
                            case 0:
                                return (i = i || {}).subres = (0, r.default)({acl: ""}, i.subres), i.versionId && (i.subres.versionId = i.versionId), i.headers = i.headers || {}, i.headers["x-oss-object-acl"] = t, e = this._objectName(e), (n = this._objectRequestParams("PUT", e, i)).successStatuses = [200], s.next = 10, o.default.awrap(this.request(n));
                            case 10:
                                return a = s.sent, s.abrupt("return", {res: a.res});
                            case 12:
                            case"end":
                                return s.stop()
                        }
                    }, null, this)
                }
            }, {"babel-runtime/core-js/object/assign": 49, "babel-runtime/regenerator": 65}],
            28: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = d(n), a = e("babel-runtime/core-js/object/keys"), r = d(a),
                    s = e("babel-runtime/core-js/object/assign"), l = d(s);

                function d(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var u = e("../utils/obj2xml"), c = e("../utils/checkObjectTag"), h = i;
                h.putObjectTagging = function (e, t) {
                    var i, n, a, s = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
                    return o.default.async(function (d) {
                        for (; ;) switch (d.prev = d.next) {
                            case 0:
                                return c(t), s.subres = (0, l.default)({tagging: ""}, s.subres), s.versionId && (s.subres.versionId = s.versionId), e = this._objectName(e), (i = this._objectRequestParams("PUT", e, s)).successStatuses = [200], t = (0, r.default)(t).map(function (e) {
                                    return {Key: e, Value: t[e]}
                                }), n = {Tagging: {TagSet: {Tag: t}}}, i.mime = "xml", i.content = u(n), d.next = 12, o.default.awrap(this.request(i));
                            case 12:
                                return a = d.sent, d.abrupt("return", {res: a.res, status: a.status});
                            case 14:
                            case"end":
                                return d.stop()
                        }
                    }, null, this)
                }
            }, {
                "../utils/checkObjectTag": 32,
                "../utils/obj2xml": 42,
                "babel-runtime/core-js/object/assign": 49,
                "babel-runtime/core-js/object/keys": 55,
                "babel-runtime/regenerator": 65
            }],
            29: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/regenerator"), o = s(n), a = e("babel-runtime/core-js/promise"), r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                var l = i;
                l._parallelNode = function (e, t, i, n) {
                    var a, s, l, d, u, c, h, f;
                    return o.default.async(function (p) {
                        for (; ;) switch (p.prev = p.next) {
                            case 0:
                                a = this, s = [], l = [], d = e.length / t, u = e.length % t, c = 0 === u ? d : (e.length - u) / t + 1, h = 1, f = 0;
                            case 8:
                                if (!(f < e.length)) {
                                    p.next = 26;
                                    break
                                }
                                if (!a.isCancel()) {
                                    p.next = 11;
                                    break
                                }
                                return p.abrupt("break", 26);
                            case 11:
                                if (n ? l.push(i(a, e[f], n)) : l.push(i(a, e[f])), l.length !== t && (h !== c || f !== e.length - 1)) {
                                    p.next = 23;
                                    break
                                }
                                return p.prev = 13, h += 1, p.next = 17, o.default.awrap(r.default.all(l));
                            case 17:
                                p.next = 22;
                                break;
                            case 19:
                                p.prev = 19, p.t0 = p.catch(13), s.push(p.t0);
                            case 22:
                                l = [];
                            case 23:
                                f++, p.next = 8;
                                break;
                            case 26:
                                return p.abrupt("return", s);
                            case 27:
                            case"end":
                                return p.stop()
                        }
                    }, null, this, [[13, 19]])
                }, l._parallel = function (e, t, i) {
                    var n = this;
                    return new r.default(function (o) {
                        var a = [];
                        if (t <= 0 || !e) o(a); else {
                            var r, s, l, d = (s = -1, l = (r = e).length, function () {
                                return ++s < l && !n.isCancel() ? {value: r[s], key: s} : null
                            }), u = !1, c = 0, h = !1;
                            m()
                        }

                        function f(e) {
                            return function () {
                                if (null === e) throw new Error("Callback was already called.");
                                var t = e;
                                e = null;
                                for (var i = arguments.length, n = Array(i), o = 0; o < i; o++) n[o] = arguments[o];
                                t.apply(this, n)
                            }
                        }

                        function p(e, t) {
                            c -= 1, e ? (u = !0, a.push(e), o(a)) : t === {} || u && c <= 0 ? (u = !0, o(a)) : h || (n.isCancel() ? o(a) : m())
                        }

                        function g(e, t) {
                            i(e).then(function (e) {
                                t(null, e)
                            }).catch(function (e) {
                                t(e)
                            })
                        }

                        function m() {
                            for (h = !0; c < t && !u && !n.isCancel();) {
                                var e = d();
                                if (null === e || a.length > 0) return u = !0, void (c <= 0 && o(a));
                                c += 1, g(e.value, f(p))
                            }
                            h = !1
                        }
                    })
                }, l.cancel = function (e) {
                    this.options.cancelFlag = !0, e && this.abortMultipartUpload(e.name, e.uploadId, e.options)
                }, l.isCancel = function () {
                    return this.options.cancelFlag
                }, l.resetCancelFlag = function () {
                    this.options.cancelFlag = !1
                }, l._stop = function () {
                    this.options.cancelFlag = !0
                }, l._makeCancelEvent = function () {
                    return {status: 0, name: "cancel"}
                }
            }, {"babel-runtime/core-js/promise": 56, "babel-runtime/regenerator": 65}],
            30: [function (e, t, i) {
                (function (t) {
                    "use strict";
                    var n = e("babel-runtime/core-js/json/stringify"), o = s(n),
                        a = e("babel-runtime/core-js/object/keys"), r = s(a);

                    function s(e) {
                        return e && e.__esModule ? e : {default: e}
                    }

                    var l = e("./../../shims/crypto/crypto.js"), d = e("is-type-of");
                    i.buildCanonicalizedResource = function (e, t) {
                        var i = "" + e, n = "?";
                        return d.string(t) && "" !== t.trim() ? i += n + t : d.array(t) ? (t.sort(), i += n + t.join("&")) : t && (0, r.default)(t).sort(function (e, t) {
                            return e[0] > t[0] ? 1 : e[0] < t[0] ? -1 : 0
                        }).forEach(function (e) {
                            i += n + e, t[e] && (i += "=" + t[e]), n = "&"
                        }), i
                    }, i.buildCanonicalString = function (e, t, i, n) {
                        var o = (i = i || {}).headers || {}, a = [], s = {},
                            l = [e.toUpperCase(), o["Content-Md5"] || "", o["Content-Type"] || o["Content-Type".toLowerCase()], n || o["x-oss-date"]];
                        return (0, r.default)(o).forEach(function (e) {
                            var t = e.toLowerCase();
                            0 === t.indexOf("x-oss-") && (s[t] = String(o[e]).trim())
                        }), (0, r.default)(s).sort().forEach(function (e) {
                            a.push(e + ":" + s[e])
                        }), (l = l.concat(a)).push(this.buildCanonicalizedResource(t, i.parameters)), l.join("\n")
                    }, i.computeSignature = function (e, i) {
                        var n = l.createHmac("sha1", e);
                        return n.update(t.from(i, "utf8")).digest("base64")
                    }, i.authorization = function (e, t, i) {
                        return "OSS " + e + ":" + this.computeSignature(t, i)
                    }, i._signatureForURL = function (e) {
                        var i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = arguments[2],
                            a = arguments[3], s = {}, l = i.subResource, d = void 0 === l ? {} : l;
                        if (i.process && (d["x-oss-process"] = i.process), i.trafficLimit && (d["x-oss-traffic-limit"] = i.trafficLimit), i.response && (0, r.default)(i.response).forEach(function (e) {
                            var t = "response-" + e.toLowerCase();
                            d[t] = i.response[e]
                        }), (0, r.default)(i).forEach(function (e) {
                            var t = e.toLowerCase(), n = i[e];
                            0 === t.indexOf("x-oss-") ? s[t] = n : 0 === t.indexOf("content-md5") ? s[e] = n : 0 === t.indexOf("content-type") && (s[e] = n)
                        }), Object.prototype.hasOwnProperty.call(i, "security-token") && (d["security-token"] = i["security-token"]), Object.prototype.hasOwnProperty.call(i, "callback")) {
                            var u = {callbackUrl: encodeURI(i.callback.url), callbackBody: i.callback.body};
                            if (i.callback.host && (u.callbackHost = i.callback.host), i.callback.contentType && (u.callbackBodyType = i.callback.contentType), d.callback = t.from((0, o.default)(u)).toString("base64"), i.callback.customValue) {
                                var c = {};
                                (0, r.default)(i.callback.customValue).forEach(function (e) {
                                    c["x:" + e] = i.callback.customValue[e]
                                }), d["callback-var"] = t.from((0, o.default)(c)).toString("base64")
                            }
                        }
                        var h = this.buildCanonicalString(i.method, n, {headers: s, parameters: d}, a.toString());
                        return {Signature: this.computeSignature(e, h), subResource: d}
                    }
                }).call(this, e("buffer").Buffer)
            }, {
                "./../../shims/crypto/crypto.js": 328,
                "babel-runtime/core-js/json/stringify": 48,
                "babel-runtime/core-js/object/keys": 55,
                buffer: 70,
                "is-type-of": 233
            }],
            31: [function (e, t, i) {
                "use strict";
                t.exports = function (e, t) {
                    var i = t ? /^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/ : /^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;
                    if (!i.test(e)) throw new Error("The bucket must be conform to the specifications")
                }
            }, {}],
            32: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/entries"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("./checkValid"), s = e("./isObject"), l = [{
                        validator: function (e) {
                            if ("string" != typeof e) throw new Error("the key and value of the tag must be String")
                        }
                    }, {
                        pattern: /^[a-zA-Z0-9 +-=._:/]+$/,
                        msg: "tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"
                    }], d = {
                        key: [].concat(l, [{
                            pattern: /^.{1,128}$/,
                            msg: "tag key can be a maximum of 128 bytes in length"
                        }]),
                        value: [].concat(l, [{
                            pattern: /^.{0,256}$/,
                            msg: "tag value can be a maximum of 256 bytes in length"
                        }])
                    };
                t.exports = function (e) {
                    if (!s(e)) throw new Error("tag must be Object");
                    var t = (0, a.default)(e);
                    if (t.length > 10) throw new Error("maximum of 10 tags for a object");
                    var i = ["key", "value"];
                    t.forEach(function (e) {
                        e.forEach(function (e, t) {
                            r(e, d[i[t]])
                        })
                    })
                }
            }, {"./checkValid": 33, "./isObject": 41, "babel-runtime/core-js/object/entries": 52}],
            33: [function (e, t, i) {
                "use strict";
                t.exports = function (e, t) {
                    t.forEach(function (t) {
                        if (t.validator) t.validator(e); else if (t.pattern && !t.pattern.test(e)) throw new Error(t.msg)
                    })
                }
            }, {}],
            34: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/core-js/object/keys"), o = s(n), a = e("babel-runtime/helpers/typeof"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                t.exports = function e(t) {
                    var i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
                    if (null === t || "object" !== (void 0 === t ? "undefined" : (0, r.default)(t))) return t;
                    var n = i.filter(function (e) {
                        return e.original === t
                    })[0];
                    if (n) return n.copy;
                    var a = Array.isArray(t) ? [] : {};
                    return i.push({original: t, copy: a}), (0, o.default)(t).forEach(function (n) {
                        a[n] = e(t[n], i)
                    }), a
                }
            }, {"babel-runtime/core-js/object/keys": 55, "babel-runtime/helpers/typeof": 64}],
            35: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/core-js/object/keys"), o = s(n), a = e("babel-runtime/helpers/typeof"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                t.exports = function e(t, i) {
                    if (null === t || "object" !== (void 0 === t ? "undefined" : (0, r.default)(t))) return t;
                    var n = void 0;
                    if (Array.isArray(t)) {
                        n = [];
                        for (var a = 0; a < t.length; a++) n.push(e(t[a], i))
                    } else n = {}, (0, o.default)(t).forEach(function (o) {
                        n[function (e, t) {
                            return "firstUpperCase" === t ? e = e.replace(/^./, function (e) {
                                return e.toUpperCase()
                            }) : "firstLowerCase" === t && (e = e.replace(/^./, function (e) {
                                return e.toLowerCase()
                            })), e
                        }(o, i)] = e(t[o], i)
                    });
                    return n
                }
            }, {"babel-runtime/core-js/object/keys": 55, "babel-runtime/helpers/typeof": 64}],
            36: [function (e, t, i) {
                "use strict";
                t.exports = function (e) {
                    for (var t = 0, i = 0; i < e.length; i++) {
                        var n = e.charAt(i);
                        /^[\u00-\uff]$/.test(n) ? t += 1 : t += 2
                    }
                    return t
                }
            }, {}],
            37: [function (e, t, i) {
                "use strict";
                t.exports = function (e) {
                    return "[object Array]" === Object.prototype.toString.call(e)
                }
            }, {}],
            38: [function (e, t, i) {
                "use strict";
                t.exports = function (e) {
                    return "undefined" != typeof Blob && e instanceof Blob
                }
            }, {}],
            39: [function (e, t, i) {
                "use strict";
                t.exports = function (e) {
                    return "undefined" != typeof File && e instanceof File
                }
            }, {}],
            40: [function (e, t, i) {
                "use strict";
                t.exports = function (e) {
                    var t = /^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/.test(e) || /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/.test(e);
                    return t
                }
            }, {}],
            41: [function (e, t, i) {
                "use strict";
                t.exports = function (e) {
                    return "[object Object]" === Object.prototype.toString.call(e)
                }
            }, {}],
            42: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/keys"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("./formatObjKey");

                function s(e) {
                    return Object.prototype.toString.call(e).replace(/(.*? |])/g, "").toLowerCase()
                }

                t.exports = function e(t, i) {
                    var n = "";
                    return i && i.headers && (n = '<?xml version="1.0" encoding="UTF-8"?>\n'), i && i.firstUpperCase && (t = r(t, "firstUpperCase")), "object" === s(t) ? (0, a.default)(t).forEach(function (i) {
                        "string" === s(t[i]) || "number" === s(t[i]) ? n += "<" + i + ">" + t[i] + "</" + i + ">" : "object" === s(t[i]) ? n += "<" + i + ">" + e(t[i]) + "</" + i + ">" : "array" === s(t[i]) ? n += t[i].map(function (t) {
                            return "<" + i + ">" + e(t) + "</" + i + ">"
                        }).join("") : n += "<" + i + ">" + t[i].toString() + "</" + i + ">"
                    }) : n += t.toString(), n
                }
            }, {"./formatObjKey": 35, "babel-runtime/core-js/object/keys": 55}],
            43: [function (e, t, i) {
                function n() {
                }

                t.exports = n, t.exports.HttpsAgent = n
            }, {}],
            44: [function (e, t, i) {
                t.exports = e("./register")().Promise
            }, {"./register": 46}],
            45: [function (e, t, i) {
                "use strict";
                var n = null;
                t.exports = function (e, t) {
                    return function (i, o) {
                        i = i || null;
                        var a = !1 !== (o = o || {}).global;
                        if (null === n && a && (n = e["@@any-promise/REGISTRATION"] || null), null !== n && null !== i && n.implementation !== i) throw new Error('any-promise already defined as "' + n.implementation + '".  You can only register an implementation before the first  call to require("any-promise") and an implementation cannot be changed');
                        return null === n && (n = null !== i && void 0 !== o.Promise ? {
                            Promise: o.Promise,
                            implementation: i
                        } : t(i), a && (e["@@any-promise/REGISTRATION"] = n)), n
                    }
                }
            }, {}],
            46: [function (e, t, i) {
                "use strict";
                t.exports = e("./loader")(window, function () {
                    if (void 0 === window.Promise) throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");
                    return {Promise: window.Promise, implementation: "window.Promise"}
                })
            }, {"./loader": 45}],
            47: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/array/from"), __esModule: !0}
            }, {"core-js/library/fn/array/from": 74}],
            48: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/json/stringify"), __esModule: !0}
            }, {"core-js/library/fn/json/stringify": 75}],
            49: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/object/assign"), __esModule: !0}
            }, {"core-js/library/fn/object/assign": 76}],
            50: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/object/create"), __esModule: !0}
            }, {"core-js/library/fn/object/create": 77}],
            51: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/object/define-property"), __esModule: !0}
            }, {"core-js/library/fn/object/define-property": 78}],
            52: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/object/entries"), __esModule: !0}
            }, {"core-js/library/fn/object/entries": 79}],
            53: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/object/get-own-property-names"), __esModule: !0}
            }, {"core-js/library/fn/object/get-own-property-names": 80}],
            54: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/object/get-prototype-of"), __esModule: !0}
            }, {"core-js/library/fn/object/get-prototype-of": 81}],
            55: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/object/keys"), __esModule: !0}
            }, {"core-js/library/fn/object/keys": 82}],
            56: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/promise"), __esModule: !0}
            }, {"core-js/library/fn/promise": 83}],
            57: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/set-immediate"), __esModule: !0}
            }, {"core-js/library/fn/set-immediate": 84}],
            58: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/string/from-code-point"), __esModule: !0}
            }, {"core-js/library/fn/string/from-code-point": 85}],
            59: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/symbol"), __esModule: !0}
            }, {"core-js/library/fn/symbol": 87}],
            60: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/symbol/has-instance"), __esModule: !0}
            }, {"core-js/library/fn/symbol/has-instance": 86}],
            61: [function (e, t, i) {
                t.exports = {default: e("core-js/library/fn/symbol/iterator"), __esModule: !0}
            }, {"core-js/library/fn/symbol/iterator": 88}],
            62: [function (e, t, i) {
                "use strict";
                i.__esModule = !0, i.default = function (e, t) {
                    if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
                }
            }, {}],
            63: [function (e, t, i) {
                "use strict";
                i.__esModule = !0;
                var n, o = e("../core-js/object/define-property"), a = (n = o) && n.__esModule ? n : {default: n};
                i.default = function () {
                    function e(e, t) {
                        for (var i = 0; i < t.length; i++) {
                            var n = t[i];
                            n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), (0, a.default)(e, n.key, n)
                        }
                    }

                    return function (t, i, n) {
                        return i && e(t.prototype, i), n && e(t, n), t
                    }
                }()
            }, {"../core-js/object/define-property": 51}],
            64: [function (e, t, i) {
                "use strict";
                i.__esModule = !0;
                var n = e("../core-js/symbol/iterator"), o = l(n), a = e("../core-js/symbol"), r = l(a),
                    s = "function" == typeof r.default && "symbol" == typeof o.default ? function (e) {
                        return typeof e
                    } : function (e) {
                        return e && "function" == typeof r.default && e.constructor === r.default && e !== r.default.prototype ? "symbol" : typeof e
                    };

                function l(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                i.default = "function" == typeof r.default && "symbol" === s(o.default) ? function (e) {
                    return void 0 === e ? "undefined" : s(e)
                } : function (e) {
                    return e && "function" == typeof r.default && e.constructor === r.default && e !== r.default.prototype ? "symbol" : void 0 === e ? "undefined" : s(e)
                }
            }, {"../core-js/symbol": 59, "../core-js/symbol/iterator": 61}],
            65: [function (e, t, i) {
                t.exports = e("regenerator-runtime")
            }, {"regenerator-runtime": 267}],
            66: [function (e, t, i) {
                "use strict";
                i.byteLength = function (e) {
                    var t = d(e), i = t[0], n = t[1];
                    return 3 * (i + n) / 4 - n
                }, i.toByteArray = function (e) {
                    for (var t, i = d(e), n = i[0], r = i[1], s = new a(function (e, t, i) {
                        return 3 * (t + i) / 4 - i
                    }(0, n, r)), l = 0, u = r > 0 ? n - 4 : n, c = 0; c < u; c += 4) t = o[e.charCodeAt(c)] << 18 | o[e.charCodeAt(c + 1)] << 12 | o[e.charCodeAt(c + 2)] << 6 | o[e.charCodeAt(c + 3)], s[l++] = t >> 16 & 255, s[l++] = t >> 8 & 255, s[l++] = 255 & t;
                    return 2 === r && (t = o[e.charCodeAt(c)] << 2 | o[e.charCodeAt(c + 1)] >> 4, s[l++] = 255 & t), 1 === r && (t = o[e.charCodeAt(c)] << 10 | o[e.charCodeAt(c + 1)] << 4 | o[e.charCodeAt(c + 2)] >> 2, s[l++] = t >> 8 & 255, s[l++] = 255 & t), s
                }, i.fromByteArray = function (e) {
                    for (var t, i = e.length, o = i % 3, a = [], r = 0, s = i - o; r < s; r += 16383) a.push(u(e, r, r + 16383 > s ? s : r + 16383));
                    return 1 === o ? (t = e[i - 1], a.push(n[t >> 2] + n[t << 4 & 63] + "==")) : 2 === o && (t = (e[i - 2] << 8) + e[i - 1], a.push(n[t >> 10] + n[t >> 4 & 63] + n[t << 2 & 63] + "=")), a.join("")
                };
                for (var n = [], o = [], a = "undefined" != typeof Uint8Array ? Uint8Array : Array, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = 0, l = r.length; s < l; ++s) n[s] = r[s], o[r.charCodeAt(s)] = s;

                function d(e) {
                    var t = e.length;
                    if (t % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
                    var i = e.indexOf("=");
                    -1 === i && (i = t);
                    var n = i === t ? 0 : 4 - i % 4;
                    return [i, n]
                }

                function u(e, t, i) {
                    for (var o, a, r = [], s = t; s < i; s += 3) o = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (255 & e[s + 2]), r.push(n[(a = o) >> 18 & 63] + n[a >> 12 & 63] + n[a >> 6 & 63] + n[63 & a]);
                    return r.join("")
                }

                o["-".charCodeAt(0)] = 62, o["_".charCodeAt(0)] = 63
            }, {}],
            67: [function (e, t, i) {
                var n, o;
                n = this, o = function () {
                    var e = !0;

                    function t(t) {
                        function i(e) {
                            var i = t.match(e);
                            return i && i.length > 1 && i[1] || ""
                        }

                        function n(e) {
                            var i = t.match(e);
                            return i && i.length > 1 && i[2] || ""
                        }

                        var o, r = i(/(ipod|iphone|ipad)/i).toLowerCase(), s = /like android/i.test(t),
                            l = !s && /android/i.test(t), d = /nexus\s*[0-6]\s*/i.test(t),
                            u = !d && /nexus\s*[0-9]+/i.test(t), c = /CrOS/.test(t), h = /silk/i.test(t),
                            f = /sailfish/i.test(t), p = /tizen/i.test(t), g = /(web|hpw)(o|0)s/i.test(t),
                            m = /windows phone/i.test(t), v = (/SamsungBrowser/i.test(t), !m && /windows/i.test(t)),
                            y = !r && !h && /macintosh/i.test(t), T = !l && !f && !p && !g && /linux/i.test(t),
                            w = n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i), k = i(/version\/(\d+(\.\d+)?)/i),
                            C = /tablet/i.test(t) && !/tablet pc/i.test(t), b = !C && /[^-]mobi/i.test(t),
                            I = /xbox/i.test(t);
                        /opera/i.test(t) ? o = {
                            name: "Opera",
                            opera: e,
                            version: k || i(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)
                        } : /opr\/|opios/i.test(t) ? o = {
                            name: "Opera",
                            opera: e,
                            version: i(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || k
                        } : /SamsungBrowser/i.test(t) ? o = {
                            name: "Samsung Internet for Android",
                            samsungBrowser: e,
                            version: k || i(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)
                        } : /Whale/i.test(t) ? o = {
                            name: "NAVER Whale browser",
                            whale: e,
                            version: i(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)
                        } : /MZBrowser/i.test(t) ? o = {
                            name: "MZ Browser",
                            mzbrowser: e,
                            version: i(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)
                        } : /coast/i.test(t) ? o = {
                            name: "Opera Coast",
                            coast: e,
                            version: k || i(/(?:coast)[\s\/](\d+(\.\d+)?)/i)
                        } : /focus/i.test(t) ? o = {
                            name: "Focus",
                            focus: e,
                            version: i(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)
                        } : /yabrowser/i.test(t) ? o = {
                            name: "Yandex Browser",
                            yandexbrowser: e,
                            version: k || i(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)
                        } : /ucbrowser/i.test(t) ? o = {
                            name: "UC Browser",
                            ucbrowser: e,
                            version: i(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)
                        } : /mxios/i.test(t) ? o = {
                            name: "Maxthon",
                            maxthon: e,
                            version: i(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)
                        } : /epiphany/i.test(t) ? o = {
                            name: "Epiphany",
                            epiphany: e,
                            version: i(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)
                        } : /puffin/i.test(t) ? o = {
                            name: "Puffin",
                            puffin: e,
                            version: i(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)
                        } : /sleipnir/i.test(t) ? o = {
                            name: "Sleipnir",
                            sleipnir: e,
                            version: i(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)
                        } : /k-meleon/i.test(t) ? o = {
                            name: "K-Meleon",
                            kMeleon: e,
                            version: i(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)
                        } : m ? (o = {
                            name: "Windows Phone",
                            osname: "Windows Phone",
                            windowsphone: e
                        }, w ? (o.msedge = e, o.version = w) : (o.msie = e, o.version = i(/iemobile\/(\d+(\.\d+)?)/i))) : /msie|trident/i.test(t) ? o = {
                            name: "Internet Explorer",
                            msie: e,
                            version: i(/(?:msie |rv:)(\d+(\.\d+)?)/i)
                        } : c ? o = {
                            name: "Chrome",
                            osname: "Chrome OS",
                            chromeos: e,
                            chromeBook: e,
                            chrome: e,
                            version: i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
                        } : /edg([ea]|ios)/i.test(t) ? o = {
                            name: "Microsoft Edge",
                            msedge: e,
                            version: w
                        } : /vivaldi/i.test(t) ? o = {
                            name: "Vivaldi",
                            vivaldi: e,
                            version: i(/vivaldi\/(\d+(\.\d+)?)/i) || k
                        } : f ? o = {
                            name: "Sailfish",
                            osname: "Sailfish OS",
                            sailfish: e,
                            version: i(/sailfish\s?browser\/(\d+(\.\d+)?)/i)
                        } : /seamonkey\//i.test(t) ? o = {
                            name: "SeaMonkey",
                            seamonkey: e,
                            version: i(/seamonkey\/(\d+(\.\d+)?)/i)
                        } : /firefox|iceweasel|fxios/i.test(t) ? (o = {
                            name: "Firefox",
                            firefox: e,
                            version: i(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)
                        }, /\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t) && (o.firefoxos = e, o.osname = "Firefox OS")) : h ? o = {
                            name: "Amazon Silk",
                            silk: e,
                            version: i(/silk\/(\d+(\.\d+)?)/i)
                        } : /phantom/i.test(t) ? o = {
                            name: "PhantomJS",
                            phantom: e,
                            version: i(/phantomjs\/(\d+(\.\d+)?)/i)
                        } : /slimerjs/i.test(t) ? o = {
                            name: "SlimerJS",
                            slimer: e,
                            version: i(/slimerjs\/(\d+(\.\d+)?)/i)
                        } : /blackberry|\bbb\d+/i.test(t) || /rim\stablet/i.test(t) ? o = {
                            name: "BlackBerry",
                            osname: "BlackBerry OS",
                            blackberry: e,
                            version: k || i(/blackberry[\d]+\/(\d+(\.\d+)?)/i)
                        } : g ? (o = {
                            name: "WebOS",
                            osname: "WebOS",
                            webos: e,
                            version: k || i(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)
                        }, /touchpad\//i.test(t) && (o.touchpad = e)) : /bada/i.test(t) ? o = {
                            name: "Bada",
                            osname: "Bada",
                            bada: e,
                            version: i(/dolfin\/(\d+(\.\d+)?)/i)
                        } : p ? o = {
                            name: "Tizen",
                            osname: "Tizen",
                            tizen: e,
                            version: i(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || k
                        } : /qupzilla/i.test(t) ? o = {
                            name: "QupZilla",
                            qupzilla: e,
                            version: i(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || k
                        } : /chromium/i.test(t) ? o = {
                            name: "Chromium",
                            chromium: e,
                            version: i(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || k
                        } : /chrome|crios|crmo/i.test(t) ? o = {
                            name: "Chrome",
                            chrome: e,
                            version: i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
                        } : l ? o = {
                            name: "Android",
                            version: k
                        } : /safari|applewebkit/i.test(t) ? (o = {
                            name: "Safari",
                            safari: e
                        }, k && (o.version = k)) : r ? (o = {name: "iphone" == r ? "iPhone" : "ipad" == r ? "iPad" : "iPod"}, k && (o.version = k)) : o = /googlebot/i.test(t) ? {
                            name: "Googlebot",
                            googlebot: e,
                            version: i(/googlebot\/(\d+(\.\d+))/i) || k
                        } : {
                            name: i(/^(.*)\/(.*) /),
                            version: n(/^(.*)\/(.*) /)
                        }, !o.msedge && /(apple)?webkit/i.test(t) ? (/(apple)?webkit\/537\.36/i.test(t) ? (o.name = o.name || "Blink", o.blink = e) : (o.name = o.name || "Webkit", o.webkit = e), !o.version && k && (o.version = k)) : !o.opera && /gecko\//i.test(t) && (o.name = o.name || "Gecko", o.gecko = e, o.version = o.version || i(/gecko\/(\d+(\.\d+)?)/i)), o.windowsphone || !l && !o.silk ? !o.windowsphone && r ? (o[r] = e, o.ios = e, o.osname = "iOS") : y ? (o.mac = e, o.osname = "macOS") : I ? (o.xbox = e, o.osname = "Xbox") : v ? (o.windows = e, o.osname = "Windows") : T && (o.linux = e, o.osname = "Linux") : (o.android = e, o.osname = "Android");
                        var S = "";
                        o.windows ? S = function (e) {
                            switch (e) {
                                case"NT":
                                    return "NT";
                                case"XP":
                                    return "XP";
                                case"NT 5.0":
                                    return "2000";
                                case"NT 5.1":
                                    return "XP";
                                case"NT 5.2":
                                    return "2003";
                                case"NT 6.0":
                                    return "Vista";
                                case"NT 6.1":
                                    return "7";
                                case"NT 6.2":
                                    return "8";
                                case"NT 6.3":
                                    return "8.1";
                                case"NT 10.0":
                                    return "10";
                                default:
                                    return
                            }
                        }(i(/Windows ((NT|XP)( \d\d?.\d)?)/i)) : o.windowsphone ? S = i(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i) : o.mac ? S = (S = i(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g, ".") : r ? S = (S = i(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g, ".") : l ? S = i(/android[ \/-](\d+(\.\d+)*)/i) : o.webos ? S = i(/(?:web|hpw)os\/(\d+(\.\d+)*)/i) : o.blackberry ? S = i(/rim\stablet\sos\s(\d+(\.\d+)*)/i) : o.bada ? S = i(/bada\/(\d+(\.\d+)*)/i) : o.tizen && (S = i(/tizen[\/\s](\d+(\.\d+)*)/i)), S && (o.osversion = S);
                        var _ = !o.windows && S.split(".")[0];
                        return C || u || "ipad" == r || l && (3 == _ || _ >= 4 && !b) || o.silk ? o.tablet = e : (b || "iphone" == r || "ipod" == r || l || d || o.blackberry || o.webos || o.bada) && (o.mobile = e), o.msedge || o.msie && o.version >= 10 || o.yandexbrowser && o.version >= 15 || o.vivaldi && o.version >= 1 || o.chrome && o.version >= 20 || o.samsungBrowser && o.version >= 4 || o.whale && 1 === a([o.version, "1.0"]) || o.mzbrowser && 1 === a([o.version, "6.0"]) || o.focus && 1 === a([o.version, "1.0"]) || o.firefox && o.version >= 20 || o.safari && o.version >= 6 || o.opera && o.version >= 10 || o.ios && o.osversion && o.osversion.split(".")[0] >= 6 || o.blackberry && o.version >= 10.1 || o.chromium && o.version >= 20 ? o.a = e : o.msie && o.version < 10 || o.chrome && o.version < 20 || o.firefox && o.version < 20 || o.safari && o.version < 6 || o.opera && o.version < 10 || o.ios && o.osversion && o.osversion.split(".")[0] < 6 || o.chromium && o.version < 20 ? o.c = e : o.x = e, o
                    }

                    var i = t("undefined" != typeof navigator && navigator.userAgent || "");

                    function n(e) {
                        return e.split(".").length
                    }

                    function o(e, t) {
                        var i, n = [];
                        if (Array.prototype.map) return Array.prototype.map.call(e, t);
                        for (i = 0; i < e.length; i++) n.push(t(e[i]));
                        return n
                    }

                    function a(e) {
                        for (var t = Math.max(n(e[0]), n(e[1])), i = o(e, function (e) {
                            var i = t - n(e);
                            return o((e += new Array(i + 1).join(".0")).split("."), function (e) {
                                return new Array(20 - e.length).join("0") + e
                            }).reverse()
                        }); --t >= 0;) {
                            if (i[0][t] > i[1][t]) return 1;
                            if (i[0][t] !== i[1][t]) return -1;
                            if (0 === t) return 0
                        }
                    }

                    function r(e, n, o) {
                        var r = i;
                        "string" == typeof n && (o = n, n = void 0), void 0 === n && (n = !1), o && (r = t(o));
                        var s = "" + r.version;
                        for (var l in e) if (e.hasOwnProperty(l) && r[l]) {
                            if ("string" != typeof e[l]) throw new Error("Browser version in the minVersion map should be a string: " + l + ": " + String(e));
                            return a([s, e[l]]) < 0
                        }
                        return n
                    }

                    return i.test = function (e) {
                        for (var t = 0; t < e.length; ++t) {
                            var n = e[t];
                            if ("string" == typeof n && n in i) return !0
                        }
                        return !1
                    }, i.isUnsupportedBrowser = r, i.compareVersions = a, i.check = function (e, t, i) {
                        return !r(e, t, i)
                    }, i._detect = t, i.detect = t, i
                }, void 0 !== t && t.exports ? t.exports = o() : "function" == typeof define && define.amd ? define("bowser", o) : n.bowser = o()
            }, {}],
            68: [function (e, t, i) {
            }, {}],
            69: [function (e, t, i) {
                var n = e("buffer").Buffer, o = n.isEncoding || function (e) {
                    switch (e && e.toLowerCase()) {
                        case"hex":
                        case"utf8":
                        case"utf-8":
                        case"ascii":
                        case"binary":
                        case"base64":
                        case"ucs2":
                        case"ucs-2":
                        case"utf16le":
                        case"utf-16le":
                        case"raw":
                            return !0;
                        default:
                            return !1
                    }
                }, a = i.StringDecoder = function (e) {
                    switch (this.encoding = (e || "utf8").toLowerCase().replace(/[-_]/, ""), function (e) {
                        if (e && !o(e)) throw new Error("Unknown encoding: " + e)
                    }(e), this.encoding) {
                        case"utf8":
                            this.surrogateSize = 3;
                            break;
                        case"ucs2":
                        case"utf16le":
                            this.surrogateSize = 2, this.detectIncompleteChar = s;
                            break;
                        case"base64":
                            this.surrogateSize = 3, this.detectIncompleteChar = l;
                            break;
                        default:
                            return void (this.write = r)
                    }
                    this.charBuffer = new n(6), this.charReceived = 0, this.charLength = 0
                };

                function r(e) {
                    return e.toString(this.encoding)
                }

                function s(e) {
                    this.charReceived = e.length % 2, this.charLength = this.charReceived ? 2 : 0
                }

                function l(e) {
                    this.charReceived = e.length % 3, this.charLength = this.charReceived ? 3 : 0
                }

                a.prototype.write = function (e) {
                    for (var t = ""; this.charLength;) {
                        var i = e.length >= this.charLength - this.charReceived ? this.charLength - this.charReceived : e.length;
                        if (e.copy(this.charBuffer, this.charReceived, 0, i), this.charReceived += i, this.charReceived < this.charLength) return "";
                        e = e.slice(i, e.length);
                        var n = (t = this.charBuffer.slice(0, this.charLength).toString(this.encoding)).charCodeAt(t.length - 1);
                        if (!(n >= 55296 && n <= 56319)) {
                            if (this.charReceived = this.charLength = 0, 0 === e.length) return t;
                            break
                        }
                        this.charLength += this.surrogateSize, t = ""
                    }
                    this.detectIncompleteChar(e);
                    var o = e.length;
                    this.charLength && (e.copy(this.charBuffer, 0, e.length - this.charReceived, o), o -= this.charReceived);
                    var o = (t += e.toString(this.encoding, 0, o)).length - 1, n = t.charCodeAt(o);
                    if (n >= 55296 && n <= 56319) {
                        var a = this.surrogateSize;
                        return this.charLength += a, this.charReceived += a, this.charBuffer.copy(this.charBuffer, a, 0, a), e.copy(this.charBuffer, 0, 0, a), t.substring(0, o)
                    }
                    return t
                }, a.prototype.detectIncompleteChar = function (e) {
                    for (var t = e.length >= 3 ? 3 : e.length; t > 0; t--) {
                        var i = e[e.length - t];
                        if (1 == t && i >> 5 == 6) {
                            this.charLength = 2;
                            break
                        }
                        if (t <= 2 && i >> 4 == 14) {
                            this.charLength = 3;
                            break
                        }
                        if (t <= 3 && i >> 3 == 30) {
                            this.charLength = 4;
                            break
                        }
                    }
                    this.charReceived = t
                }, a.prototype.end = function (e) {
                    var t = "";
                    if (e && e.length && (t = this.write(e)), this.charReceived) {
                        var i = this.charReceived, n = this.charBuffer, o = this.encoding;
                        t += n.slice(0, i).toString(o)
                    }
                    return t
                }
            }, {buffer: 70}],
            70: [function (e, t, i) {
                (function (t) {
                    /*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
                    "use strict";
                    var n = e("base64-js"), o = e("ieee754"), a = e("isarray");

                    function r() {
                        return l.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
                    }

                    function s(e, t) {
                        if (r() < t) throw new RangeError("Invalid typed array length");
                        return l.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = l.prototype : (null === e && (e = new l(t)), e.length = t), e
                    }

                    function l(e, t, i) {
                        if (!(l.TYPED_ARRAY_SUPPORT || this instanceof l)) return new l(e, t, i);
                        if ("number" == typeof e) {
                            if ("string" == typeof t) throw new Error("If encoding is specified then the first argument must be a string");
                            return c(this, e)
                        }
                        return d(this, e, t, i)
                    }

                    function d(e, t, i, n) {
                        if ("number" == typeof t) throw new TypeError('"value" argument must not be a number');
                        return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? function (e, t, i, n) {
                            if (t.byteLength, i < 0 || t.byteLength < i) throw new RangeError("'offset' is out of bounds");
                            if (t.byteLength < i + (n || 0)) throw new RangeError("'length' is out of bounds");
                            return t = void 0 === i && void 0 === n ? new Uint8Array(t) : void 0 === n ? new Uint8Array(t, i) : new Uint8Array(t, i, n), l.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = l.prototype : e = h(e, t), e
                        }(e, t, i, n) : "string" == typeof t ? function (e, t, i) {
                            if ("string" == typeof i && "" !== i || (i = "utf8"), !l.isEncoding(i)) throw new TypeError('"encoding" must be a valid string encoding');
                            var n = 0 | p(t, i), o = (e = s(e, n)).write(t, i);
                            return o !== n && (e = e.slice(0, o)), e
                        }(e, t, i) : function (e, t) {
                            if (l.isBuffer(t)) {
                                var i = 0 | f(t.length);
                                return 0 === (e = s(e, i)).length ? e : (t.copy(e, 0, 0, i), e)
                            }
                            if (t) {
                                if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer || "length" in t) return "number" != typeof t.length || (n = t.length) != n ? s(e, 0) : h(e, t);
                                if ("Buffer" === t.type && a(t.data)) return h(e, t.data)
                            }
                            var n;
                            throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")
                        }(e, t)
                    }

                    function u(e) {
                        if ("number" != typeof e) throw new TypeError('"size" argument must be a number');
                        if (e < 0) throw new RangeError('"size" argument must not be negative')
                    }

                    function c(e, t) {
                        if (u(t), e = s(e, t < 0 ? 0 : 0 | f(t)), !l.TYPED_ARRAY_SUPPORT) for (var i = 0; i < t; ++i) e[i] = 0;
                        return e
                    }

                    function h(e, t) {
                        var i = t.length < 0 ? 0 : 0 | f(t.length);
                        e = s(e, i);
                        for (var n = 0; n < i; n += 1) e[n] = 255 & t[n];
                        return e
                    }

                    function f(e) {
                        if (e >= r()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + r().toString(16) + " bytes");
                        return 0 | e
                    }

                    function p(e, t) {
                        if (l.isBuffer(e)) return e.length;
                        if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e.byteLength;
                        "string" != typeof e && (e = "" + e);
                        var i = e.length;
                        if (0 === i) return 0;
                        for (var n = !1; ;) switch (t) {
                            case"ascii":
                            case"latin1":
                            case"binary":
                                return i;
                            case"utf8":
                            case"utf-8":
                            case void 0:
                                return U(e).length;
                            case"ucs2":
                            case"ucs-2":
                            case"utf16le":
                            case"utf-16le":
                                return 2 * i;
                            case"hex":
                                return i >>> 1;
                            case"base64":
                                return V(e).length;
                            default:
                                if (n) return U(e).length;
                                t = ("" + t).toLowerCase(), n = !0
                        }
                    }

                    function g(e, t, i) {
                        var n = e[t];
                        e[t] = e[i], e[i] = n
                    }

                    function m(e, t, i, n, o) {
                        if (0 === e.length) return -1;
                        if ("string" == typeof i ? (n = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, isNaN(i) && (i = o ? 0 : e.length - 1), i < 0 && (i = e.length + i), i >= e.length) {
                            if (o) return -1;
                            i = e.length - 1
                        } else if (i < 0) {
                            if (!o) return -1;
                            i = 0
                        }
                        if ("string" == typeof t && (t = l.from(t, n)), l.isBuffer(t)) return 0 === t.length ? -1 : v(e, t, i, n, o);
                        if ("number" == typeof t) return t &= 255, l.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? o ? Uint8Array.prototype.indexOf.call(e, t, i) : Uint8Array.prototype.lastIndexOf.call(e, t, i) : v(e, [t], i, n, o);
                        throw new TypeError("val must be string, number or Buffer")
                    }

                    function v(e, t, i, n, o) {
                        var a, r = 1, s = e.length, l = t.length;
                        if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) {
                            if (e.length < 2 || t.length < 2) return -1;
                            r = 2, s /= 2, l /= 2, i /= 2
                        }

                        function d(e, t) {
                            return 1 === r ? e[t] : e.readUInt16BE(t * r)
                        }

                        if (o) {
                            var u = -1;
                            for (a = i; a < s; a++) if (d(e, a) === d(t, -1 === u ? 0 : a - u)) {
                                if (-1 === u && (u = a), a - u + 1 === l) return u * r
                            } else -1 !== u && (a -= a - u), u = -1
                        } else for (i + l > s && (i = s - l), a = i; a >= 0; a--) {
                            for (var c = !0, h = 0; h < l; h++) if (d(e, a + h) !== d(t, h)) {
                                c = !1;
                                break
                            }
                            if (c) return a
                        }
                        return -1
                    }

                    function y(e, t, i, n) {
                        i = Number(i) || 0;
                        var o = e.length - i;
                        n ? (n = Number(n)) > o && (n = o) : n = o;
                        var a = t.length;
                        if (a % 2 != 0) throw new TypeError("Invalid hex string");
                        n > a / 2 && (n = a / 2);
                        for (var r = 0; r < n; ++r) {
                            var s = parseInt(t.substr(2 * r, 2), 16);
                            if (isNaN(s)) return r;
                            e[i + r] = s
                        }
                        return r
                    }

                    function T(e, t, i, n) {
                        return K(U(t, e.length - i), e, i, n)
                    }

                    function w(e, t, i, n) {
                        return K(function (e) {
                            for (var t = [], i = 0; i < e.length; ++i) t.push(255 & e.charCodeAt(i));
                            return t
                        }(t), e, i, n)
                    }

                    function k(e, t, i, n) {
                        return w(e, t, i, n)
                    }

                    function C(e, t, i, n) {
                        return K(V(t), e, i, n)
                    }

                    function b(e, t, i, n) {
                        return K(function (e, t) {
                            for (var i, n, o, a = [], r = 0; r < e.length && !((t -= 2) < 0); ++r) i = e.charCodeAt(r), n = i >> 8, o = i % 256, a.push(o), a.push(n);
                            return a
                        }(t, e.length - i), e, i, n)
                    }

                    function I(e, t, i) {
                        return 0 === t && i === e.length ? n.fromByteArray(e) : n.fromByteArray(e.slice(t, i))
                    }

                    function S(e, t, i) {
                        i = Math.min(e.length, i);
                        for (var n = [], o = t; o < i;) {
                            var a, r, s, l, d = e[o], u = null, c = d > 239 ? 4 : d > 223 ? 3 : d > 191 ? 2 : 1;
                            if (o + c <= i) switch (c) {
                                case 1:
                                    d < 128 && (u = d);
                                    break;
                                case 2:
                                    128 == (192 & (a = e[o + 1])) && (l = (31 & d) << 6 | 63 & a) > 127 && (u = l);
                                    break;
                                case 3:
                                    a = e[o + 1], r = e[o + 2], 128 == (192 & a) && 128 == (192 & r) && (l = (15 & d) << 12 | (63 & a) << 6 | 63 & r) > 2047 && (l < 55296 || l > 57343) && (u = l);
                                    break;
                                case 4:
                                    a = e[o + 1], r = e[o + 2], s = e[o + 3], 128 == (192 & a) && 128 == (192 & r) && 128 == (192 & s) && (l = (15 & d) << 18 | (63 & a) << 12 | (63 & r) << 6 | 63 & s) > 65535 && l < 1114112 && (u = l)
                            }
                            null === u ? (u = 65533, c = 1) : u > 65535 && (u -= 65536, n.push(u >>> 10 & 1023 | 55296), u = 56320 | 1023 & u), n.push(u), o += c
                        }
                        return function (e) {
                            var t = e.length;
                            if (t <= _) return String.fromCharCode.apply(String, e);
                            for (var i = "", n = 0; n < t;) i += String.fromCharCode.apply(String, e.slice(n, n += _));
                            return i
                        }(n)
                    }

                    i.Buffer = l, i.SlowBuffer = function (e) {
                        return +e != e && (e = 0), l.alloc(+e)
                    }, i.INSPECT_MAX_BYTES = 50, l.TYPED_ARRAY_SUPPORT = void 0 !== t.TYPED_ARRAY_SUPPORT ? t.TYPED_ARRAY_SUPPORT : function () {
                        try {
                            var e = new Uint8Array(1);
                            return e.__proto__ = {
                                __proto__: Uint8Array.prototype, foo: function () {
                                    return 42
                                }
                            }, 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(1, 1).byteLength
                        } catch (e) {
                            return !1
                        }
                    }(), i.kMaxLength = r(), l.poolSize = 8192, l._augment = function (e) {
                        return e.__proto__ = l.prototype, e
                    }, l.from = function (e, t, i) {
                        return d(null, e, t, i)
                    }, l.TYPED_ARRAY_SUPPORT && (l.prototype.__proto__ = Uint8Array.prototype, l.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && l[Symbol.species] === l && Object.defineProperty(l, Symbol.species, {
                        value: null,
                        configurable: !0
                    })), l.alloc = function (e, t, i) {
                        return function (e, t, i, n) {
                            return u(t), t <= 0 ? s(e, t) : void 0 !== i ? "string" == typeof n ? s(e, t).fill(i, n) : s(e, t).fill(i) : s(e, t)
                        }(null, e, t, i)
                    }, l.allocUnsafe = function (e) {
                        return c(null, e)
                    }, l.allocUnsafeSlow = function (e) {
                        return c(null, e)
                    }, l.isBuffer = function (e) {
                        return !(null == e || !e._isBuffer)
                    }, l.compare = function (e, t) {
                        if (!l.isBuffer(e) || !l.isBuffer(t)) throw new TypeError("Arguments must be Buffers");
                        if (e === t) return 0;
                        for (var i = e.length, n = t.length, o = 0, a = Math.min(i, n); o < a; ++o) if (e[o] !== t[o]) {
                            i = e[o], n = t[o];
                            break
                        }
                        return i < n ? -1 : n < i ? 1 : 0
                    }, l.isEncoding = function (e) {
                        switch (String(e).toLowerCase()) {
                            case"hex":
                            case"utf8":
                            case"utf-8":
                            case"ascii":
                            case"latin1":
                            case"binary":
                            case"base64":
                            case"ucs2":
                            case"ucs-2":
                            case"utf16le":
                            case"utf-16le":
                                return !0;
                            default:
                                return !1
                        }
                    }, l.concat = function (e, t) {
                        if (!a(e)) throw new TypeError('"list" argument must be an Array of Buffers');
                        if (0 === e.length) return l.alloc(0);
                        var i;
                        if (void 0 === t) for (t = 0, i = 0; i < e.length; ++i) t += e[i].length;
                        var n = l.allocUnsafe(t), o = 0;
                        for (i = 0; i < e.length; ++i) {
                            var r = e[i];
                            if (!l.isBuffer(r)) throw new TypeError('"list" argument must be an Array of Buffers');
                            r.copy(n, o), o += r.length
                        }
                        return n
                    }, l.byteLength = p, l.prototype._isBuffer = !0, l.prototype.swap16 = function () {
                        var e = this.length;
                        if (e % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
                        for (var t = 0; t < e; t += 2) g(this, t, t + 1);
                        return this
                    }, l.prototype.swap32 = function () {
                        var e = this.length;
                        if (e % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
                        for (var t = 0; t < e; t += 4) g(this, t, t + 3), g(this, t + 1, t + 2);
                        return this
                    }, l.prototype.swap64 = function () {
                        var e = this.length;
                        if (e % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
                        for (var t = 0; t < e; t += 8) g(this, t, t + 7), g(this, t + 1, t + 6), g(this, t + 2, t + 5), g(this, t + 3, t + 4);
                        return this
                    }, l.prototype.toString = function () {
                        var e = 0 | this.length;
                        return 0 === e ? "" : 0 === arguments.length ? S(this, 0, e) : function (e, t, i) {
                            var n = !1;
                            if ((void 0 === t || t < 0) && (t = 0), t > this.length) return "";
                            if ((void 0 === i || i > this.length) && (i = this.length), i <= 0) return "";
                            if ((i >>>= 0) <= (t >>>= 0)) return "";
                            for (e || (e = "utf8"); ;) switch (e) {
                                case"hex":
                                    return N(this, t, i);
                                case"utf8":
                                case"utf-8":
                                    return S(this, t, i);
                                case"ascii":
                                    return D(this, t, i);
                                case"latin1":
                                case"binary":
                                    return A(this, t, i);
                                case"base64":
                                    return I(this, t, i);
                                case"ucs2":
                                case"ucs-2":
                                case"utf16le":
                                case"utf-16le":
                                    return x(this, t, i);
                                default:
                                    if (n) throw new TypeError("Unknown encoding: " + e);
                                    e = (e + "").toLowerCase(), n = !0
                            }
                        }.apply(this, arguments)
                    }, l.prototype.equals = function (e) {
                        if (!l.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
                        return this === e || 0 === l.compare(this, e)
                    }, l.prototype.inspect = function () {
                        var e = "", t = i.INSPECT_MAX_BYTES;
                        return this.length > 0 && (e = this.toString("hex", 0, t).match(/.{2}/g).join(" "), this.length > t && (e += " ... ")), "<Buffer " + e + ">"
                    }, l.prototype.compare = function (e, t, i, n, o) {
                        if (!l.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
                        if (void 0 === t && (t = 0), void 0 === i && (i = e ? e.length : 0), void 0 === n && (n = 0), void 0 === o && (o = this.length), t < 0 || i > e.length || n < 0 || o > this.length) throw new RangeError("out of range index");
                        if (n >= o && t >= i) return 0;
                        if (n >= o) return -1;
                        if (t >= i) return 1;
                        if (t >>>= 0, i >>>= 0, n >>>= 0, o >>>= 0, this === e) return 0;
                        for (var a = o - n, r = i - t, s = Math.min(a, r), d = this.slice(n, o), u = e.slice(t, i), c = 0; c < s; ++c) if (d[c] !== u[c]) {
                            a = d[c], r = u[c];
                            break
                        }
                        return a < r ? -1 : r < a ? 1 : 0
                    }, l.prototype.includes = function (e, t, i) {
                        return -1 !== this.indexOf(e, t, i)
                    }, l.prototype.indexOf = function (e, t, i) {
                        return m(this, e, t, i, !0)
                    }, l.prototype.lastIndexOf = function (e, t, i) {
                        return m(this, e, t, i, !1)
                    }, l.prototype.write = function (e, t, i, n) {
                        if (void 0 === t) n = "utf8", i = this.length, t = 0; else if (void 0 === i && "string" == typeof t) n = t, i = this.length, t = 0; else {
                            if (!isFinite(t)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
                            t |= 0, isFinite(i) ? (i |= 0, void 0 === n && (n = "utf8")) : (n = i, i = void 0)
                        }
                        var o = this.length - t;
                        if ((void 0 === i || i > o) && (i = o), e.length > 0 && (i < 0 || t < 0) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds");
                        n || (n = "utf8");
                        for (var a = !1; ;) switch (n) {
                            case"hex":
                                return y(this, e, t, i);
                            case"utf8":
                            case"utf-8":
                                return T(this, e, t, i);
                            case"ascii":
                                return w(this, e, t, i);
                            case"latin1":
                            case"binary":
                                return k(this, e, t, i);
                            case"base64":
                                return C(this, e, t, i);
                            case"ucs2":
                            case"ucs-2":
                            case"utf16le":
                            case"utf-16le":
                                return b(this, e, t, i);
                            default:
                                if (a) throw new TypeError("Unknown encoding: " + n);
                                n = ("" + n).toLowerCase(), a = !0
                        }
                    }, l.prototype.toJSON = function () {
                        return {type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0)}
                    };
                    var _ = 4096;

                    function D(e, t, i) {
                        var n = "";
                        i = Math.min(e.length, i);
                        for (var o = t; o < i; ++o) n += String.fromCharCode(127 & e[o]);
                        return n
                    }

                    function A(e, t, i) {
                        var n = "";
                        i = Math.min(e.length, i);
                        for (var o = t; o < i; ++o) n += String.fromCharCode(e[o]);
                        return n
                    }

                    function N(e, t, i) {
                        var n, o = e.length;
                        (!t || t < 0) && (t = 0), (!i || i < 0 || i > o) && (i = o);
                        for (var a = "", r = t; r < i; ++r) a += (n = e[r]) < 16 ? "0" + n.toString(16) : n.toString(16);
                        return a
                    }

                    function x(e, t, i) {
                        for (var n = e.slice(t, i), o = "", a = 0; a < n.length; a += 2) o += String.fromCharCode(n[a] + 256 * n[a + 1]);
                        return o
                    }

                    function E(e, t, i) {
                        if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");
                        if (e + t > i) throw new RangeError("Trying to access beyond buffer length")
                    }

                    function O(e, t, i, n, o, a) {
                        if (!l.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
                        if (t > o || t < a) throw new RangeError('"value" argument is out of bounds');
                        if (i + n > e.length) throw new RangeError("Index out of range")
                    }

                    function P(e, t, i, n) {
                        t < 0 && (t = 65535 + t + 1);
                        for (var o = 0, a = Math.min(e.length - i, 2); o < a; ++o) e[i + o] = (t & 255 << 8 * (n ? o : 1 - o)) >>> 8 * (n ? o : 1 - o)
                    }

                    function M(e, t, i, n) {
                        t < 0 && (t = 4294967295 + t + 1);
                        for (var o = 0, a = Math.min(e.length - i, 4); o < a; ++o) e[i + o] = t >>> 8 * (n ? o : 3 - o) & 255
                    }

                    function F(e, t, i, n, o, a) {
                        if (i + n > e.length) throw new RangeError("Index out of range");
                        if (i < 0) throw new RangeError("Index out of range")
                    }

                    function L(e, t, i, n, a) {
                        return a || F(e, 0, i, 4), o.write(e, t, i, n, 23, 4), i + 4
                    }

                    function R(e, t, i, n, a) {
                        return a || F(e, 0, i, 8), o.write(e, t, i, n, 52, 8), i + 8
                    }

                    l.prototype.slice = function (e, t) {
                        var i, n = this.length;
                        if (e = ~~e, t = void 0 === t ? n : ~~t, e < 0 ? (e += n) < 0 && (e = 0) : e > n && (e = n), t < 0 ? (t += n) < 0 && (t = 0) : t > n && (t = n), t < e && (t = e), l.TYPED_ARRAY_SUPPORT) (i = this.subarray(e, t)).__proto__ = l.prototype; else {
                            var o = t - e;
                            i = new l(o, void 0);
                            for (var a = 0; a < o; ++a) i[a] = this[a + e]
                        }
                        return i
                    }, l.prototype.readUIntLE = function (e, t, i) {
                        e |= 0, t |= 0, i || E(e, t, this.length);
                        for (var n = this[e], o = 1, a = 0; ++a < t && (o *= 256);) n += this[e + a] * o;
                        return n
                    }, l.prototype.readUIntBE = function (e, t, i) {
                        e |= 0, t |= 0, i || E(e, t, this.length);
                        for (var n = this[e + --t], o = 1; t > 0 && (o *= 256);) n += this[e + --t] * o;
                        return n
                    }, l.prototype.readUInt8 = function (e, t) {
                        return t || E(e, 1, this.length), this[e]
                    }, l.prototype.readUInt16LE = function (e, t) {
                        return t || E(e, 2, this.length), this[e] | this[e + 1] << 8
                    }, l.prototype.readUInt16BE = function (e, t) {
                        return t || E(e, 2, this.length), this[e] << 8 | this[e + 1]
                    }, l.prototype.readUInt32LE = function (e, t) {
                        return t || E(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
                    }, l.prototype.readUInt32BE = function (e, t) {
                        return t || E(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
                    }, l.prototype.readIntLE = function (e, t, i) {
                        e |= 0, t |= 0, i || E(e, t, this.length);
                        for (var n = this[e], o = 1, a = 0; ++a < t && (o *= 256);) n += this[e + a] * o;
                        return n >= (o *= 128) && (n -= Math.pow(2, 8 * t)), n
                    }, l.prototype.readIntBE = function (e, t, i) {
                        e |= 0, t |= 0, i || E(e, t, this.length);
                        for (var n = t, o = 1, a = this[e + --n]; n > 0 && (o *= 256);) a += this[e + --n] * o;
                        return a >= (o *= 128) && (a -= Math.pow(2, 8 * t)), a
                    }, l.prototype.readInt8 = function (e, t) {
                        return t || E(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]
                    }, l.prototype.readInt16LE = function (e, t) {
                        t || E(e, 2, this.length);
                        var i = this[e] | this[e + 1] << 8;
                        return 32768 & i ? 4294901760 | i : i
                    }, l.prototype.readInt16BE = function (e, t) {
                        t || E(e, 2, this.length);
                        var i = this[e + 1] | this[e] << 8;
                        return 32768 & i ? 4294901760 | i : i
                    }, l.prototype.readInt32LE = function (e, t) {
                        return t || E(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
                    }, l.prototype.readInt32BE = function (e, t) {
                        return t || E(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
                    }, l.prototype.readFloatLE = function (e, t) {
                        return t || E(e, 4, this.length), o.read(this, e, !0, 23, 4)
                    }, l.prototype.readFloatBE = function (e, t) {
                        return t || E(e, 4, this.length), o.read(this, e, !1, 23, 4)
                    }, l.prototype.readDoubleLE = function (e, t) {
                        return t || E(e, 8, this.length), o.read(this, e, !0, 52, 8)
                    }, l.prototype.readDoubleBE = function (e, t) {
                        return t || E(e, 8, this.length), o.read(this, e, !1, 52, 8)
                    }, l.prototype.writeUIntLE = function (e, t, i, n) {
                        if (e = +e, t |= 0, i |= 0, !n) {
                            var o = Math.pow(2, 8 * i) - 1;
                            O(this, e, t, i, o, 0)
                        }
                        var a = 1, r = 0;
                        for (this[t] = 255 & e; ++r < i && (a *= 256);) this[t + r] = e / a & 255;
                        return t + i
                    }, l.prototype.writeUIntBE = function (e, t, i, n) {
                        if (e = +e, t |= 0, i |= 0, !n) {
                            var o = Math.pow(2, 8 * i) - 1;
                            O(this, e, t, i, o, 0)
                        }
                        var a = i - 1, r = 1;
                        for (this[t + a] = 255 & e; --a >= 0 && (r *= 256);) this[t + a] = e / r & 255;
                        return t + i
                    }, l.prototype.writeUInt8 = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 1, 255, 0), l.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[t] = 255 & e, t + 1
                    }, l.prototype.writeUInt16LE = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 2, 65535, 0), l.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : P(this, e, t, !0), t + 2
                    }, l.prototype.writeUInt16BE = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 2, 65535, 0), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : P(this, e, t, !1), t + 2
                    }, l.prototype.writeUInt32LE = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 4, 4294967295, 0), l.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e) : M(this, e, t, !0), t + 4
                    }, l.prototype.writeUInt32BE = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 4, 4294967295, 0), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : M(this, e, t, !1), t + 4
                    }, l.prototype.writeIntLE = function (e, t, i, n) {
                        if (e = +e, t |= 0, !n) {
                            var o = Math.pow(2, 8 * i - 1);
                            O(this, e, t, i, o - 1, -o)
                        }
                        var a = 0, r = 1, s = 0;
                        for (this[t] = 255 & e; ++a < i && (r *= 256);) e < 0 && 0 === s && 0 !== this[t + a - 1] && (s = 1), this[t + a] = (e / r >> 0) - s & 255;
                        return t + i
                    }, l.prototype.writeIntBE = function (e, t, i, n) {
                        if (e = +e, t |= 0, !n) {
                            var o = Math.pow(2, 8 * i - 1);
                            O(this, e, t, i, o - 1, -o)
                        }
                        var a = i - 1, r = 1, s = 0;
                        for (this[t + a] = 255 & e; --a >= 0 && (r *= 256);) e < 0 && 0 === s && 0 !== this[t + a + 1] && (s = 1), this[t + a] = (e / r >> 0) - s & 255;
                        return t + i
                    }, l.prototype.writeInt8 = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 1, 127, -128), l.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1
                    }, l.prototype.writeInt16LE = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 2, 32767, -32768), l.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : P(this, e, t, !0), t + 2
                    }, l.prototype.writeInt16BE = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 2, 32767, -32768), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : P(this, e, t, !1), t + 2
                    }, l.prototype.writeInt32LE = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 4, 2147483647, -2147483648), l.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24) : M(this, e, t, !0), t + 4
                    }, l.prototype.writeInt32BE = function (e, t, i) {
                        return e = +e, t |= 0, i || O(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), l.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : M(this, e, t, !1), t + 4
                    }, l.prototype.writeFloatLE = function (e, t, i) {
                        return L(this, e, t, !0, i)
                    }, l.prototype.writeFloatBE = function (e, t, i) {
                        return L(this, e, t, !1, i)
                    }, l.prototype.writeDoubleLE = function (e, t, i) {
                        return R(this, e, t, !0, i)
                    }, l.prototype.writeDoubleBE = function (e, t, i) {
                        return R(this, e, t, !1, i)
                    }, l.prototype.copy = function (e, t, i, n) {
                        if (i || (i = 0), n || 0 === n || (n = this.length), t >= e.length && (t = e.length), t || (t = 0), n > 0 && n < i && (n = i), n === i) return 0;
                        if (0 === e.length || 0 === this.length) return 0;
                        if (t < 0) throw new RangeError("targetStart out of bounds");
                        if (i < 0 || i >= this.length) throw new RangeError("sourceStart out of bounds");
                        if (n < 0) throw new RangeError("sourceEnd out of bounds");
                        n > this.length && (n = this.length), e.length - t < n - i && (n = e.length - t + i);
                        var o, a = n - i;
                        if (this === e && i < t && t < n) for (o = a - 1; o >= 0; --o) e[o + t] = this[o + i]; else if (a < 1e3 || !l.TYPED_ARRAY_SUPPORT) for (o = 0; o < a; ++o) e[o + t] = this[o + i]; else Uint8Array.prototype.set.call(e, this.subarray(i, i + a), t);
                        return a
                    }, l.prototype.fill = function (e, t, i, n) {
                        if ("string" == typeof e) {
                            if ("string" == typeof t ? (n = t, t = 0, i = this.length) : "string" == typeof i && (n = i, i = this.length), 1 === e.length) {
                                var o = e.charCodeAt(0);
                                o < 256 && (e = o)
                            }
                            if (void 0 !== n && "string" != typeof n) throw new TypeError("encoding must be a string");
                            if ("string" == typeof n && !l.isEncoding(n)) throw new TypeError("Unknown encoding: " + n)
                        } else "number" == typeof e && (e &= 255);
                        if (t < 0 || this.length < t || this.length < i) throw new RangeError("Out of range index");
                        if (i <= t) return this;
                        var a;
                        if (t >>>= 0, i = void 0 === i ? this.length : i >>> 0, e || (e = 0), "number" == typeof e) for (a = t; a < i; ++a) this[a] = e; else {
                            var r = l.isBuffer(e) ? e : U(new l(e, n).toString()), s = r.length;
                            for (a = 0; a < i - t; ++a) this[a + t] = r[a % s]
                        }
                        return this
                    };
                    var B = /[^+\/0-9A-Za-z-_]/g;

                    function U(e, t) {
                        var i;
                        t = t || 1 / 0;
                        for (var n = e.length, o = null, a = [], r = 0; r < n; ++r) {
                            if ((i = e.charCodeAt(r)) > 55295 && i < 57344) {
                                if (!o) {
                                    if (i > 56319) {
                                        (t -= 3) > -1 && a.push(239, 191, 189);
                                        continue
                                    }
                                    if (r + 1 === n) {
                                        (t -= 3) > -1 && a.push(239, 191, 189);
                                        continue
                                    }
                                    o = i;
                                    continue
                                }
                                if (i < 56320) {
                                    (t -= 3) > -1 && a.push(239, 191, 189), o = i;
                                    continue
                                }
                                i = 65536 + (o - 55296 << 10 | i - 56320)
                            } else o && (t -= 3) > -1 && a.push(239, 191, 189);
                            if (o = null, i < 128) {
                                if ((t -= 1) < 0) break;
                                a.push(i)
                            } else if (i < 2048) {
                                if ((t -= 2) < 0) break;
                                a.push(i >> 6 | 192, 63 & i | 128)
                            } else if (i < 65536) {
                                if ((t -= 3) < 0) break;
                                a.push(i >> 12 | 224, i >> 6 & 63 | 128, 63 & i | 128)
                            } else {
                                if (!(i < 1114112)) throw new Error("Invalid code point");
                                if ((t -= 4) < 0) break;
                                a.push(i >> 18 | 240, i >> 12 & 63 | 128, i >> 6 & 63 | 128, 63 & i | 128)
                            }
                        }
                        return a
                    }

                    function V(e) {
                        return n.toByteArray(function (e) {
                            if ((e = function (e) {
                                return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
                            }(e).replace(B, "")).length < 2) return "";
                            for (; e.length % 4 != 0;) e += "=";
                            return e
                        }(e))
                    }

                    function K(e, t, i, n) {
                        for (var o = 0; o < n && !(o + i >= t.length || o >= e.length); ++o) t[o + i] = e[o];
                        return o
                    }
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {"base64-js": 66, ieee754: 225, isarray: 234}],
            71: [function (e, t, i) {
                t.exports = {
                    100: "Continue",
                    101: "Switching Protocols",
                    102: "Processing",
                    200: "OK",
                    201: "Created",
                    202: "Accepted",
                    203: "Non-Authoritative Information",
                    204: "No Content",
                    205: "Reset Content",
                    206: "Partial Content",
                    207: "Multi-Status",
                    208: "Already Reported",
                    226: "IM Used",
                    300: "Multiple Choices",
                    301: "Moved Permanently",
                    302: "Found",
                    303: "See Other",
                    304: "Not Modified",
                    305: "Use Proxy",
                    307: "Temporary Redirect",
                    308: "Permanent Redirect",
                    400: "Bad Request",
                    401: "Unauthorized",
                    402: "Payment Required",
                    403: "Forbidden",
                    404: "Not Found",
                    405: "Method Not Allowed",
                    406: "Not Acceptable",
                    407: "Proxy Authentication Required",
                    408: "Request Timeout",
                    409: "Conflict",
                    410: "Gone",
                    411: "Length Required",
                    412: "Precondition Failed",
                    413: "Payload Too Large",
                    414: "URI Too Long",
                    415: "Unsupported Media Type",
                    416: "Range Not Satisfiable",
                    417: "Expectation Failed",
                    418: "I'm a teapot",
                    421: "Misdirected Request",
                    422: "Unprocessable Entity",
                    423: "Locked",
                    424: "Failed Dependency",
                    425: "Unordered Collection",
                    426: "Upgrade Required",
                    428: "Precondition Required",
                    429: "Too Many Requests",
                    431: "Request Header Fields Too Large",
                    451: "Unavailable For Legal Reasons",
                    500: "Internal Server Error",
                    501: "Not Implemented",
                    502: "Bad Gateway",
                    503: "Service Unavailable",
                    504: "Gateway Timeout",
                    505: "HTTP Version Not Supported",
                    506: "Variant Also Negotiates",
                    507: "Insufficient Storage",
                    508: "Loop Detected",
                    509: "Bandwidth Limit Exceeded",
                    510: "Not Extended",
                    511: "Network Authentication Required"
                }
            }, {}],
            72: [function (e, t, i) {
                t.exports = {
                    O_RDONLY: 0,
                    O_WRONLY: 1,
                    O_RDWR: 2,
                    S_IFMT: 61440,
                    S_IFREG: 32768,
                    S_IFDIR: 16384,
                    S_IFCHR: 8192,
                    S_IFBLK: 24576,
                    S_IFIFO: 4096,
                    S_IFLNK: 40960,
                    S_IFSOCK: 49152,
                    O_CREAT: 512,
                    O_EXCL: 2048,
                    O_NOCTTY: 131072,
                    O_TRUNC: 1024,
                    O_APPEND: 8,
                    O_DIRECTORY: 1048576,
                    O_NOFOLLOW: 256,
                    O_SYNC: 128,
                    O_SYMLINK: 2097152,
                    O_NONBLOCK: 4,
                    S_IRWXU: 448,
                    S_IRUSR: 256,
                    S_IWUSR: 128,
                    S_IXUSR: 64,
                    S_IRWXG: 56,
                    S_IRGRP: 32,
                    S_IWGRP: 16,
                    S_IXGRP: 8,
                    S_IRWXO: 7,
                    S_IROTH: 4,
                    S_IWOTH: 2,
                    S_IXOTH: 1,
                    E2BIG: 7,
                    EACCES: 13,
                    EADDRINUSE: 48,
                    EADDRNOTAVAIL: 49,
                    EAFNOSUPPORT: 47,
                    EAGAIN: 35,
                    EALREADY: 37,
                    EBADF: 9,
                    EBADMSG: 94,
                    EBUSY: 16,
                    ECANCELED: 89,
                    ECHILD: 10,
                    ECONNABORTED: 53,
                    ECONNREFUSED: 61,
                    ECONNRESET: 54,
                    EDEADLK: 11,
                    EDESTADDRREQ: 39,
                    EDOM: 33,
                    EDQUOT: 69,
                    EEXIST: 17,
                    EFAULT: 14,
                    EFBIG: 27,
                    EHOSTUNREACH: 65,
                    EIDRM: 90,
                    EILSEQ: 92,
                    EINPROGRESS: 36,
                    EINTR: 4,
                    EINVAL: 22,
                    EIO: 5,
                    EISCONN: 56,
                    EISDIR: 21,
                    ELOOP: 62,
                    EMFILE: 24,
                    EMLINK: 31,
                    EMSGSIZE: 40,
                    EMULTIHOP: 95,
                    ENAMETOOLONG: 63,
                    ENETDOWN: 50,
                    ENETRESET: 52,
                    ENETUNREACH: 51,
                    ENFILE: 23,
                    ENOBUFS: 55,
                    ENODATA: 96,
                    ENODEV: 19,
                    ENOENT: 2,
                    ENOEXEC: 8,
                    ENOLCK: 77,
                    ENOLINK: 97,
                    ENOMEM: 12,
                    ENOMSG: 91,
                    ENOPROTOOPT: 42,
                    ENOSPC: 28,
                    ENOSR: 98,
                    ENOSTR: 99,
                    ENOSYS: 78,
                    ENOTCONN: 57,
                    ENOTDIR: 20,
                    ENOTEMPTY: 66,
                    ENOTSOCK: 38,
                    ENOTSUP: 45,
                    ENOTTY: 25,
                    ENXIO: 6,
                    EOPNOTSUPP: 102,
                    EOVERFLOW: 84,
                    EPERM: 1,
                    EPIPE: 32,
                    EPROTO: 100,
                    EPROTONOSUPPORT: 43,
                    EPROTOTYPE: 41,
                    ERANGE: 34,
                    EROFS: 30,
                    ESPIPE: 29,
                    ESRCH: 3,
                    ESTALE: 70,
                    ETIME: 101,
                    ETIMEDOUT: 60,
                    ETXTBSY: 26,
                    EWOULDBLOCK: 35,
                    EXDEV: 18,
                    SIGHUP: 1,
                    SIGINT: 2,
                    SIGQUIT: 3,
                    SIGILL: 4,
                    SIGTRAP: 5,
                    SIGABRT: 6,
                    SIGIOT: 6,
                    SIGBUS: 10,
                    SIGFPE: 8,
                    SIGKILL: 9,
                    SIGUSR1: 30,
                    SIGSEGV: 11,
                    SIGUSR2: 31,
                    SIGPIPE: 13,
                    SIGALRM: 14,
                    SIGTERM: 15,
                    SIGCHLD: 20,
                    SIGCONT: 19,
                    SIGSTOP: 17,
                    SIGTSTP: 18,
                    SIGTTIN: 21,
                    SIGTTOU: 22,
                    SIGURG: 16,
                    SIGXCPU: 24,
                    SIGXFSZ: 25,
                    SIGVTALRM: 26,
                    SIGPROF: 27,
                    SIGWINCH: 28,
                    SIGIO: 23,
                    SIGSYS: 12,
                    SSL_OP_ALL: 2147486719,
                    SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: 262144,
                    SSL_OP_CIPHER_SERVER_PREFERENCE: 4194304,
                    SSL_OP_CISCO_ANYCONNECT: 32768,
                    SSL_OP_COOKIE_EXCHANGE: 8192,
                    SSL_OP_CRYPTOPRO_TLSEXT_BUG: 2147483648,
                    SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: 2048,
                    SSL_OP_EPHEMERAL_RSA: 0,
                    SSL_OP_LEGACY_SERVER_CONNECT: 4,
                    SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: 32,
                    SSL_OP_MICROSOFT_SESS_ID_BUG: 1,
                    SSL_OP_MSIE_SSLV2_RSA_PADDING: 0,
                    SSL_OP_NETSCAPE_CA_DN_BUG: 536870912,
                    SSL_OP_NETSCAPE_CHALLENGE_BUG: 2,
                    SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: 1073741824,
                    SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: 8,
                    SSL_OP_NO_COMPRESSION: 131072,
                    SSL_OP_NO_QUERY_MTU: 4096,
                    SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: 65536,
                    SSL_OP_NO_SSLv2: 16777216,
                    SSL_OP_NO_SSLv3: 33554432,
                    SSL_OP_NO_TICKET: 16384,
                    SSL_OP_NO_TLSv1: 67108864,
                    SSL_OP_NO_TLSv1_1: 268435456,
                    SSL_OP_NO_TLSv1_2: 134217728,
                    SSL_OP_PKCS1_CHECK_1: 0,
                    SSL_OP_PKCS1_CHECK_2: 0,
                    SSL_OP_SINGLE_DH_USE: 1048576,
                    SSL_OP_SINGLE_ECDH_USE: 524288,
                    SSL_OP_SSLEAY_080_CLIENT_DH_BUG: 128,
                    SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: 0,
                    SSL_OP_TLS_BLOCK_PADDING_BUG: 512,
                    SSL_OP_TLS_D5_BUG: 256,
                    SSL_OP_TLS_ROLLBACK_BUG: 8388608,
                    ENGINE_METHOD_DSA: 2,
                    ENGINE_METHOD_DH: 4,
                    ENGINE_METHOD_RAND: 8,
                    ENGINE_METHOD_ECDH: 16,
                    ENGINE_METHOD_ECDSA: 32,
                    ENGINE_METHOD_CIPHERS: 64,
                    ENGINE_METHOD_DIGESTS: 128,
                    ENGINE_METHOD_STORE: 256,
                    ENGINE_METHOD_PKEY_METHS: 512,
                    ENGINE_METHOD_PKEY_ASN1_METHS: 1024,
                    ENGINE_METHOD_ALL: 65535,
                    ENGINE_METHOD_NONE: 0,
                    DH_CHECK_P_NOT_SAFE_PRIME: 2,
                    DH_CHECK_P_NOT_PRIME: 1,
                    DH_UNABLE_TO_CHECK_GENERATOR: 4,
                    DH_NOT_SUITABLE_GENERATOR: 8,
                    NPN_ENABLED: 1,
                    RSA_PKCS1_PADDING: 1,
                    RSA_SSLV23_PADDING: 2,
                    RSA_NO_PADDING: 3,
                    RSA_PKCS1_OAEP_PADDING: 4,
                    RSA_X931_PADDING: 5,
                    RSA_PKCS1_PSS_PADDING: 6,
                    POINT_CONVERSION_COMPRESSED: 2,
                    POINT_CONVERSION_UNCOMPRESSED: 4,
                    POINT_CONVERSION_HYBRID: 6,
                    F_OK: 0,
                    R_OK: 4,
                    W_OK: 2,
                    X_OK: 1,
                    UV_UDP_REUSEADDR: 4
                }
            }, {}],
            73: [function (e, t, i) {
                /*!
 * copy-to - index.js
 * Copyright(c) 2014 dead_horse <dead_horse@qq.com>
 * MIT Licensed
 */
                "use strict";
                var n = Array.prototype.slice;

                function o(e, t) {
                    if (!(this instanceof o)) return new o(e, t);
                    this.src = e, this._withAccess = t
                }

                function a(e, t) {
                    return void 0 === e[t] && void 0 === e.__lookupGetter__(t) && void 0 === e.__lookupSetter__(t)
                }

                t.exports = o, o.prototype.withAccess = function (e) {
                    return this._withAccess = !1 !== e, this
                }, o.prototype.pick = function (e) {
                    return Array.isArray(e) || (e = n.call(arguments)), e.length && (this.keys = e), this
                }, o.prototype.to = function (e) {
                    if (e = e || {}, !this.src) return e;
                    var t = this.keys || Object.keys(this.src);
                    if (!this._withAccess) {
                        for (var i = 0; i < t.length; i++) n = t[i], void 0 === e[n] && (e[n] = this.src[n]);
                        return e
                    }
                    for (var i = 0; i < t.length; i++) {
                        var n = t[i];
                        if (a(e, n)) {
                            var o = this.src.__lookupGetter__(n), r = this.src.__lookupSetter__(n);
                            o && e.__defineGetter__(n, o), r && e.__defineSetter__(n, r), o || r || (e[n] = this.src[n])
                        }
                    }
                    return e
                }, o.prototype.toCover = function (e) {
                    for (var t = this.keys || Object.keys(this.src), i = 0; i < t.length; i++) {
                        var n = t[i];
                        delete e[n];
                        var o = this.src.__lookupGetter__(n), a = this.src.__lookupSetter__(n);
                        o && e.__defineGetter__(n, o), a && e.__defineSetter__(n, a), o || a || (e[n] = this.src[n])
                    }
                }, o.prototype.override = o.prototype.toCover, o.prototype.and = function (e) {
                    var t = {};
                    return this.to(t), this.src = e, this.to(t), this.src = t, this
                }
            }, {}],
            74: [function (e, t, i) {
                e("../../modules/es6.string.iterator"), e("../../modules/es6.array.from"), t.exports = e("../../modules/_core").Array.from
            }, {
                "../../modules/_core": 96,
                "../../modules/es6.array.from": 165,
                "../../modules/es6.string.iterator": 177
            }],
            75: [function (e, t, i) {
                var n = e("../../modules/_core"), o = n.JSON || (n.JSON = {stringify: JSON.stringify});
                t.exports = function (e) {
                    return o.stringify.apply(o, arguments)
                }
            }, {"../../modules/_core": 96}],
            76: [function (e, t, i) {
                e("../../modules/es6.object.assign"), t.exports = e("../../modules/_core").Object.assign
            }, {"../../modules/_core": 96, "../../modules/es6.object.assign": 168}],
            77: [function (e, t, i) {
                e("../../modules/es6.object.create");
                var n = e("../../modules/_core").Object;
                t.exports = function (e, t) {
                    return n.create(e, t)
                }
            }, {"../../modules/_core": 96, "../../modules/es6.object.create": 169}],
            78: [function (e, t, i) {
                e("../../modules/es6.object.define-property");
                var n = e("../../modules/_core").Object;
                t.exports = function (e, t, i) {
                    return n.defineProperty(e, t, i)
                }
            }, {"../../modules/_core": 96, "../../modules/es6.object.define-property": 170}],
            79: [function (e, t, i) {
                e("../../modules/es7.object.entries"), t.exports = e("../../modules/_core").Object.entries
            }, {"../../modules/_core": 96, "../../modules/es7.object.entries": 179}],
            80: [function (e, t, i) {
                e("../../modules/es6.object.get-own-property-names");
                var n = e("../../modules/_core").Object;
                t.exports = function (e) {
                    return n.getOwnPropertyNames(e)
                }
            }, {"../../modules/_core": 96, "../../modules/es6.object.get-own-property-names": 171}],
            81: [function (e, t, i) {
                e("../../modules/es6.object.get-prototype-of"), t.exports = e("../../modules/_core").Object.getPrototypeOf
            }, {"../../modules/_core": 96, "../../modules/es6.object.get-prototype-of": 172}],
            82: [function (e, t, i) {
                e("../../modules/es6.object.keys"), t.exports = e("../../modules/_core").Object.keys
            }, {"../../modules/_core": 96, "../../modules/es6.object.keys": 173}],
            83: [function (e, t, i) {
                e("../modules/es6.object.to-string"), e("../modules/es6.string.iterator"), e("../modules/web.dom.iterable"), e("../modules/es6.promise"), e("../modules/es7.promise.finally"), e("../modules/es7.promise.try"), t.exports = e("../modules/_core").Promise
            }, {
                "../modules/_core": 96,
                "../modules/es6.object.to-string": 174,
                "../modules/es6.promise": 175,
                "../modules/es6.string.iterator": 177,
                "../modules/es7.promise.finally": 180,
                "../modules/es7.promise.try": 181,
                "../modules/web.dom.iterable": 184
            }],
            84: [function (e, t, i) {
                e("../modules/web.immediate"), t.exports = e("../modules/_core").setImmediate
            }, {"../modules/_core": 96, "../modules/web.immediate": 185}],
            85: [function (e, t, i) {
                e("../../modules/es6.string.from-code-point"), t.exports = e("../../modules/_core").String.fromCodePoint
            }, {"../../modules/_core": 96, "../../modules/es6.string.from-code-point": 176}],
            86: [function (e, t, i) {
                e("../../modules/es6.function.has-instance"), t.exports = e("../../modules/_wks-ext").f("hasInstance")
            }, {"../../modules/_wks-ext": 162, "../../modules/es6.function.has-instance": 167}],
            87: [function (e, t, i) {
                e("../../modules/es6.symbol"), e("../../modules/es6.object.to-string"), e("../../modules/es7.symbol.async-iterator"), e("../../modules/es7.symbol.observable"), t.exports = e("../../modules/_core").Symbol
            }, {
                "../../modules/_core": 96,
                "../../modules/es6.object.to-string": 174,
                "../../modules/es6.symbol": 178,
                "../../modules/es7.symbol.async-iterator": 182,
                "../../modules/es7.symbol.observable": 183
            }],
            88: [function (e, t, i) {
                e("../../modules/es6.string.iterator"), e("../../modules/web.dom.iterable"), t.exports = e("../../modules/_wks-ext").f("iterator")
            }, {
                "../../modules/_wks-ext": 162,
                "../../modules/es6.string.iterator": 177,
                "../../modules/web.dom.iterable": 184
            }],
            89: [function (e, t, i) {
                t.exports = function (e) {
                    if ("function" != typeof e) throw TypeError(e + " is not a function!");
                    return e
                }
            }, {}],
            90: [function (e, t, i) {
                t.exports = function () {
                }
            }, {}],
            91: [function (e, t, i) {
                t.exports = function (e, t, i, n) {
                    if (!(e instanceof t) || void 0 !== n && n in e) throw TypeError(i + ": incorrect invocation!");
                    return e
                }
            }, {}],
            92: [function (e, t, i) {
                var n = e("./_is-object");
                t.exports = function (e) {
                    if (!n(e)) throw TypeError(e + " is not an object!");
                    return e
                }
            }, {"./_is-object": 116}],
            93: [function (e, t, i) {
                var n = e("./_to-iobject"), o = e("./_to-length"), a = e("./_to-absolute-index");
                t.exports = function (e) {
                    return function (t, i, r) {
                        var s, l = n(t), d = o(l.length), u = a(r, d);
                        if (e && i != i) {
                            for (; d > u;) if ((s = l[u++]) != s) return !0
                        } else for (; d > u; u++) if ((e || u in l) && l[u] === i) return e || u || 0;
                        return !e && -1
                    }
                }
            }, {"./_to-absolute-index": 153, "./_to-iobject": 155, "./_to-length": 156}],
            94: [function (e, t, i) {
                var n = e("./_cof"), o = e("./_wks")("toStringTag"), a = "Arguments" == n(function () {
                    return arguments
                }());
                t.exports = function (e) {
                    var t, i, r;
                    return void 0 === e ? "Undefined" : null === e ? "Null" : "string" == typeof (i = function (e, t) {
                        try {
                            return e[t]
                        } catch (e) {
                        }
                    }(t = Object(e), o)) ? i : a ? n(t) : "Object" == (r = n(t)) && "function" == typeof t.callee ? "Arguments" : r
                }
            }, {"./_cof": 95, "./_wks": 163}],
            95: [function (e, t, i) {
                var n = {}.toString;
                t.exports = function (e) {
                    return n.call(e).slice(8, -1)
                }
            }, {}],
            96: [function (e, t, i) {
                var n = t.exports = {version: "2.5.7"};
                "number" == typeof __e && (__e = n)
            }, {}],
            97: [function (e, t, i) {
                "use strict";
                var n = e("./_object-dp"), o = e("./_property-desc");
                t.exports = function (e, t, i) {
                    t in e ? n.f(e, t, o(0, i)) : e[t] = i
                }
            }, {"./_object-dp": 129, "./_property-desc": 143}],
            98: [function (e, t, i) {
                var n = e("./_a-function");
                t.exports = function (e, t, i) {
                    if (n(e), void 0 === t) return e;
                    switch (i) {
                        case 1:
                            return function (i) {
                                return e.call(t, i)
                            };
                        case 2:
                            return function (i, n) {
                                return e.call(t, i, n)
                            };
                        case 3:
                            return function (i, n, o) {
                                return e.call(t, i, n, o)
                            }
                    }
                    return function () {
                        return e.apply(t, arguments)
                    }
                }
            }, {"./_a-function": 89}],
            99: [function (e, t, i) {
                t.exports = function (e) {
                    if (void 0 == e) throw TypeError("Can't call method on  " + e);
                    return e
                }
            }, {}],
            100: [function (e, t, i) {
                t.exports = !e("./_fails")(function () {
                    return 7 != Object.defineProperty({}, "a", {
                        get: function () {
                            return 7
                        }
                    }).a
                })
            }, {"./_fails": 105}],
            101: [function (e, t, i) {
                var n = e("./_is-object"), o = e("./_global").document, a = n(o) && n(o.createElement);
                t.exports = function (e) {
                    return a ? o.createElement(e) : {}
                }
            }, {"./_global": 107, "./_is-object": 116}],
            102: [function (e, t, i) {
                t.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")
            }, {}],
            103: [function (e, t, i) {
                var n = e("./_object-keys"), o = e("./_object-gops"), a = e("./_object-pie");
                t.exports = function (e) {
                    var t = n(e), i = o.f;
                    if (i) for (var r, s = i(e), l = a.f, d = 0; s.length > d;) l.call(e, r = s[d++]) && t.push(r);
                    return t
                }
            }, {"./_object-gops": 134, "./_object-keys": 137, "./_object-pie": 138}],
            104: [function (e, t, i) {
                var n = e("./_global"), o = e("./_core"), a = e("./_ctx"), r = e("./_hide"), s = e("./_has"),
                    l = function (e, t, i) {
                        var d, u, c, h = e & l.F, f = e & l.G, p = e & l.S, g = e & l.P, m = e & l.B, v = e & l.W,
                            y = f ? o : o[t] || (o[t] = {}), T = y.prototype,
                            w = f ? n : p ? n[t] : (n[t] || {}).prototype;
                        for (d in f && (i = t), i) (u = !h && w && void 0 !== w[d]) && s(y, d) || (c = u ? w[d] : i[d], y[d] = f && "function" != typeof w[d] ? i[d] : m && u ? a(c, n) : v && w[d] == c ? function (e) {
                            var t = function (t, i, n) {
                                if (this instanceof e) {
                                    switch (arguments.length) {
                                        case 0:
                                            return new e;
                                        case 1:
                                            return new e(t);
                                        case 2:
                                            return new e(t, i)
                                    }
                                    return new e(t, i, n)
                                }
                                return e.apply(this, arguments)
                            };
                            return t.prototype = e.prototype, t
                        }(c) : g && "function" == typeof c ? a(Function.call, c) : c, g && ((y.virtual || (y.virtual = {}))[d] = c, e & l.R && T && !T[d] && r(T, d, c)))
                    };
                l.F = 1, l.G = 2, l.S = 4, l.P = 8, l.B = 16, l.W = 32, l.U = 64, l.R = 128, t.exports = l
            }, {"./_core": 96, "./_ctx": 98, "./_global": 107, "./_has": 108, "./_hide": 109}],
            105: [function (e, t, i) {
                t.exports = function (e) {
                    try {
                        return !!e()
                    } catch (e) {
                        return !0
                    }
                }
            }, {}],
            106: [function (e, t, i) {
                var n = e("./_ctx"), o = e("./_iter-call"), a = e("./_is-array-iter"), r = e("./_an-object"),
                    s = e("./_to-length"), l = e("./core.get-iterator-method"), d = {}, u = {},
                    i = t.exports = function (e, t, i, c, h) {
                        var f, p, g, m, v = h ? function () {
                            return e
                        } : l(e), y = n(i, c, t ? 2 : 1), T = 0;
                        if ("function" != typeof v) throw TypeError(e + " is not iterable!");
                        if (a(v)) {
                            for (f = s(e.length); f > T; T++) if ((m = t ? y(r(p = e[T])[0], p[1]) : y(e[T])) === d || m === u) return m
                        } else for (g = v.call(e); !(p = g.next()).done;) if ((m = o(g, y, p.value, t)) === d || m === u) return m
                    };
                i.BREAK = d, i.RETURN = u
            }, {
                "./_an-object": 92,
                "./_ctx": 98,
                "./_is-array-iter": 114,
                "./_iter-call": 117,
                "./_to-length": 156,
                "./core.get-iterator-method": 164
            }],
            107: [function (e, t, i) {
                var n = t.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
                "number" == typeof __g && (__g = n)
            }, {}],
            108: [function (e, t, i) {
                var n = {}.hasOwnProperty;
                t.exports = function (e, t) {
                    return n.call(e, t)
                }
            }, {}],
            109: [function (e, t, i) {
                var n = e("./_object-dp"), o = e("./_property-desc");
                t.exports = e("./_descriptors") ? function (e, t, i) {
                    return n.f(e, t, o(1, i))
                } : function (e, t, i) {
                    return e[t] = i, e
                }
            }, {"./_descriptors": 100, "./_object-dp": 129, "./_property-desc": 143}],
            110: [function (e, t, i) {
                var n = e("./_global").document;
                t.exports = n && n.documentElement
            }, {"./_global": 107}],
            111: [function (e, t, i) {
                t.exports = !e("./_descriptors") && !e("./_fails")(function () {
                    return 7 != Object.defineProperty(e("./_dom-create")("div"), "a", {
                        get: function () {
                            return 7
                        }
                    }).a
                })
            }, {"./_descriptors": 100, "./_dom-create": 101, "./_fails": 105}],
            112: [function (e, t, i) {
                t.exports = function (e, t, i) {
                    var n = void 0 === i;
                    switch (t.length) {
                        case 0:
                            return n ? e() : e.call(i);
                        case 1:
                            return n ? e(t[0]) : e.call(i, t[0]);
                        case 2:
                            return n ? e(t[0], t[1]) : e.call(i, t[0], t[1]);
                        case 3:
                            return n ? e(t[0], t[1], t[2]) : e.call(i, t[0], t[1], t[2]);
                        case 4:
                            return n ? e(t[0], t[1], t[2], t[3]) : e.call(i, t[0], t[1], t[2], t[3])
                    }
                    return e.apply(i, t)
                }
            }, {}],
            113: [function (e, t, i) {
                var n = e("./_cof");
                t.exports = Object("z").propertyIsEnumerable(0) ? Object : function (e) {
                    return "String" == n(e) ? e.split("") : Object(e)
                }
            }, {"./_cof": 95}],
            114: [function (e, t, i) {
                var n = e("./_iterators"), o = e("./_wks")("iterator"), a = Array.prototype;
                t.exports = function (e) {
                    return void 0 !== e && (n.Array === e || a[o] === e)
                }
            }, {"./_iterators": 122, "./_wks": 163}],
            115: [function (e, t, i) {
                var n = e("./_cof");
                t.exports = Array.isArray || function (e) {
                    return "Array" == n(e)
                }
            }, {"./_cof": 95}],
            116: [function (e, t, i) {
                t.exports = function (e) {
                    return "object" == typeof e ? null !== e : "function" == typeof e
                }
            }, {}],
            117: [function (e, t, i) {
                var n = e("./_an-object");
                t.exports = function (e, t, i, o) {
                    try {
                        return o ? t(n(i)[0], i[1]) : t(i)
                    } catch (t) {
                        var a = e.return;
                        throw void 0 !== a && n(a.call(e)), t
                    }
                }
            }, {"./_an-object": 92}],
            118: [function (e, t, i) {
                "use strict";
                var n = e("./_object-create"), o = e("./_property-desc"), a = e("./_set-to-string-tag"), r = {};
                e("./_hide")(r, e("./_wks")("iterator"), function () {
                    return this
                }), t.exports = function (e, t, i) {
                    e.prototype = n(r, {next: o(1, i)}), a(e, t + " Iterator")
                }
            }, {
                "./_hide": 109,
                "./_object-create": 128,
                "./_property-desc": 143,
                "./_set-to-string-tag": 147,
                "./_wks": 163
            }],
            119: [function (e, t, i) {
                "use strict";
                var n = e("./_library"), o = e("./_export"), a = e("./_redefine"), r = e("./_hide"),
                    s = e("./_iterators"), l = e("./_iter-create"), d = e("./_set-to-string-tag"),
                    u = e("./_object-gpo"), c = e("./_wks")("iterator"), h = !([].keys && "next" in [].keys()),
                    f = function () {
                        return this
                    };
                t.exports = function (e, t, i, p, g, m, v) {
                    l(i, t, p);
                    var y, T, w, k = function (e) {
                            if (!h && e in S) return S[e];
                            switch (e) {
                                case"keys":
                                case"values":
                                    return function () {
                                        return new i(this, e)
                                    }
                            }
                            return function () {
                                return new i(this, e)
                            }
                        }, C = t + " Iterator", b = "values" == g, I = !1, S = e.prototype,
                        _ = S[c] || S["@@iterator"] || g && S[g], D = _ || k(g), A = g ? b ? k("entries") : D : void 0,
                        N = "Array" == t && S.entries || _;
                    if (N && (w = u(N.call(new e))) !== Object.prototype && w.next && (d(w, C, !0), n || "function" == typeof w[c] || r(w, c, f)), b && _ && "values" !== _.name && (I = !0, D = function () {
                        return _.call(this)
                    }), n && !v || !h && !I && S[c] || r(S, c, D), s[t] = D, s[C] = f, g) if (y = {
                        values: b ? D : k("values"),
                        keys: m ? D : k("keys"),
                        entries: A
                    }, v) for (T in y) T in S || a(S, T, y[T]); else o(o.P + o.F * (h || I), t, y);
                    return y
                }
            }, {
                "./_export": 104,
                "./_hide": 109,
                "./_iter-create": 118,
                "./_iterators": 122,
                "./_library": 123,
                "./_object-gpo": 135,
                "./_redefine": 145,
                "./_set-to-string-tag": 147,
                "./_wks": 163
            }],
            120: [function (e, t, i) {
                var n = e("./_wks")("iterator"), o = !1;
                try {
                    var a = [7][n]();
                    a.return = function () {
                        o = !0
                    }, Array.from(a, function () {
                        throw 2
                    })
                } catch (e) {
                }
                t.exports = function (e, t) {
                    if (!t && !o) return !1;
                    var i = !1;
                    try {
                        var a = [7], r = a[n]();
                        r.next = function () {
                            return {done: i = !0}
                        }, a[n] = function () {
                            return r
                        }, e(a)
                    } catch (e) {
                    }
                    return i
                }
            }, {"./_wks": 163}],
            121: [function (e, t, i) {
                t.exports = function (e, t) {
                    return {value: t, done: !!e}
                }
            }, {}],
            122: [function (e, t, i) {
                t.exports = {}
            }, {}],
            123: [function (e, t, i) {
                t.exports = !0
            }, {}],
            124: [function (e, t, i) {
                var n = e("./_uid")("meta"), o = e("./_is-object"), a = e("./_has"), r = e("./_object-dp").f, s = 0,
                    l = Object.isExtensible || function () {
                        return !0
                    }, d = !e("./_fails")(function () {
                        return l(Object.preventExtensions({}))
                    }), u = function (e) {
                        r(e, n, {value: {i: "O" + ++s, w: {}}})
                    }, c = t.exports = {
                        KEY: n, NEED: !1, fastKey: function (e, t) {
                            if (!o(e)) return "symbol" == typeof e ? e : ("string" == typeof e ? "S" : "P") + e;
                            if (!a(e, n)) {
                                if (!l(e)) return "F";
                                if (!t) return "E";
                                u(e)
                            }
                            return e[n].i
                        }, getWeak: function (e, t) {
                            if (!a(e, n)) {
                                if (!l(e)) return !0;
                                if (!t) return !1;
                                u(e)
                            }
                            return e[n].w
                        }, onFreeze: function (e) {
                            return d && c.NEED && l(e) && !a(e, n) && u(e), e
                        }
                    }
            }, {"./_fails": 105, "./_has": 108, "./_is-object": 116, "./_object-dp": 129, "./_uid": 159}],
            125: [function (e, t, i) {
                var n = e("./_global"), o = e("./_task").set, a = n.MutationObserver || n.WebKitMutationObserver,
                    r = n.process, s = n.Promise, l = "process" == e("./_cof")(r);
                t.exports = function () {
                    var e, t, i, d = function () {
                        var n, o;
                        for (l && (n = r.domain) && n.exit(); e;) {
                            o = e.fn, e = e.next;
                            try {
                                o()
                            } catch (n) {
                                throw e ? i() : t = void 0, n
                            }
                        }
                        t = void 0, n && n.enter()
                    };
                    if (l) i = function () {
                        r.nextTick(d)
                    }; else if (!a || n.navigator && n.navigator.standalone) if (s && s.resolve) {
                        var u = s.resolve(void 0);
                        i = function () {
                            u.then(d)
                        }
                    } else i = function () {
                        o.call(n, d)
                    }; else {
                        var c = !0, h = document.createTextNode("");
                        new a(d).observe(h, {characterData: !0}), i = function () {
                            h.data = c = !c
                        }
                    }
                    return function (n) {
                        var o = {fn: n, next: void 0};
                        t && (t.next = o), e || (e = o, i()), t = o
                    }
                }
            }, {"./_cof": 95, "./_global": 107, "./_task": 152}],
            126: [function (e, t, i) {
                "use strict";
                var n = e("./_a-function");
                t.exports.f = function (e) {
                    return new function (e) {
                        var t, i;
                        this.promise = new e(function (e, n) {
                            if (void 0 !== t || void 0 !== i) throw TypeError("Bad Promise constructor");
                            t = e, i = n
                        }), this.resolve = n(t), this.reject = n(i)
                    }(e)
                }
            }, {"./_a-function": 89}],
            127: [function (e, t, i) {
                "use strict";
                var n = e("./_object-keys"), o = e("./_object-gops"), a = e("./_object-pie"), r = e("./_to-object"),
                    s = e("./_iobject"), l = Object.assign;
                t.exports = !l || e("./_fails")(function () {
                    var e = {}, t = {}, i = Symbol(), n = "abcdefghijklmnopqrst";
                    return e[i] = 7, n.split("").forEach(function (e) {
                        t[e] = e
                    }), 7 != l({}, e)[i] || Object.keys(l({}, t)).join("") != n
                }) ? function (e, t) {
                    for (var i = r(e), l = arguments.length, d = 1, u = o.f, c = a.f; l > d;) for (var h, f = s(arguments[d++]), p = u ? n(f).concat(u(f)) : n(f), g = p.length, m = 0; g > m;) c.call(f, h = p[m++]) && (i[h] = f[h]);
                    return i
                } : l
            }, {
                "./_fails": 105,
                "./_iobject": 113,
                "./_object-gops": 134,
                "./_object-keys": 137,
                "./_object-pie": 138,
                "./_to-object": 157
            }],
            128: [function (e, t, i) {
                var n = e("./_an-object"), o = e("./_object-dps"), a = e("./_enum-bug-keys"),
                    r = e("./_shared-key")("IE_PROTO"), s = function () {
                    }, l = function () {
                        var t, i = e("./_dom-create")("iframe"), n = a.length;
                        for (i.style.display = "none", e("./_html").appendChild(i), i.src = "javascript:", (t = i.contentWindow.document).open(), t.write("<script>document.F=Object<\/script>"), t.close(), l = t.F; n--;) delete l.prototype[a[n]];
                        return l()
                    };
                t.exports = Object.create || function (e, t) {
                    var i;
                    return null !== e ? (s.prototype = n(e), i = new s, s.prototype = null, i[r] = e) : i = l(), void 0 === t ? i : o(i, t)
                }
            }, {
                "./_an-object": 92,
                "./_dom-create": 101,
                "./_enum-bug-keys": 102,
                "./_html": 110,
                "./_object-dps": 130,
                "./_shared-key": 148
            }],
            129: [function (e, t, i) {
                var n = e("./_an-object"), o = e("./_ie8-dom-define"), a = e("./_to-primitive"),
                    r = Object.defineProperty;
                i.f = e("./_descriptors") ? Object.defineProperty : function (e, t, i) {
                    if (n(e), t = a(t, !0), n(i), o) try {
                        return r(e, t, i)
                    } catch (e) {
                    }
                    if ("get" in i || "set" in i) throw TypeError("Accessors not supported!");
                    return "value" in i && (e[t] = i.value), e
                }
            }, {"./_an-object": 92, "./_descriptors": 100, "./_ie8-dom-define": 111, "./_to-primitive": 158}],
            130: [function (e, t, i) {
                var n = e("./_object-dp"), o = e("./_an-object"), a = e("./_object-keys");
                t.exports = e("./_descriptors") ? Object.defineProperties : function (e, t) {
                    o(e);
                    for (var i, r = a(t), s = r.length, l = 0; s > l;) n.f(e, i = r[l++], t[i]);
                    return e
                }
            }, {"./_an-object": 92, "./_descriptors": 100, "./_object-dp": 129, "./_object-keys": 137}],
            131: [function (e, t, i) {
                var n = e("./_object-pie"), o = e("./_property-desc"), a = e("./_to-iobject"), r = e("./_to-primitive"),
                    s = e("./_has"), l = e("./_ie8-dom-define"), d = Object.getOwnPropertyDescriptor;
                i.f = e("./_descriptors") ? d : function (e, t) {
                    if (e = a(e), t = r(t, !0), l) try {
                        return d(e, t)
                    } catch (e) {
                    }
                    if (s(e, t)) return o(!n.f.call(e, t), e[t])
                }
            }, {
                "./_descriptors": 100,
                "./_has": 108,
                "./_ie8-dom-define": 111,
                "./_object-pie": 138,
                "./_property-desc": 143,
                "./_to-iobject": 155,
                "./_to-primitive": 158
            }],
            132: [function (e, t, i) {
                var n = e("./_to-iobject"), o = e("./_object-gopn").f, a = {}.toString,
                    r = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
                t.exports.f = function (e) {
                    return r && "[object Window]" == a.call(e) ? function (e) {
                        try {
                            return o(e)
                        } catch (e) {
                            return r.slice()
                        }
                    }(e) : o(n(e))
                }
            }, {"./_object-gopn": 133, "./_to-iobject": 155}],
            133: [function (e, t, i) {
                var n = e("./_object-keys-internal"), o = e("./_enum-bug-keys").concat("length", "prototype");
                i.f = Object.getOwnPropertyNames || function (e) {
                    return n(e, o)
                }
            }, {"./_enum-bug-keys": 102, "./_object-keys-internal": 136}],
            134: [function (e, t, i) {
                i.f = Object.getOwnPropertySymbols
            }, {}],
            135: [function (e, t, i) {
                var n = e("./_has"), o = e("./_to-object"), a = e("./_shared-key")("IE_PROTO"), r = Object.prototype;
                t.exports = Object.getPrototypeOf || function (e) {
                    return e = o(e), n(e, a) ? e[a] : "function" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? r : null
                }
            }, {"./_has": 108, "./_shared-key": 148, "./_to-object": 157}],
            136: [function (e, t, i) {
                var n = e("./_has"), o = e("./_to-iobject"), a = e("./_array-includes")(!1),
                    r = e("./_shared-key")("IE_PROTO");
                t.exports = function (e, t) {
                    var i, s = o(e), l = 0, d = [];
                    for (i in s) i != r && n(s, i) && d.push(i);
                    for (; t.length > l;) n(s, i = t[l++]) && (~a(d, i) || d.push(i));
                    return d
                }
            }, {"./_array-includes": 93, "./_has": 108, "./_shared-key": 148, "./_to-iobject": 155}],
            137: [function (e, t, i) {
                var n = e("./_object-keys-internal"), o = e("./_enum-bug-keys");
                t.exports = Object.keys || function (e) {
                    return n(e, o)
                }
            }, {"./_enum-bug-keys": 102, "./_object-keys-internal": 136}],
            138: [function (e, t, i) {
                i.f = {}.propertyIsEnumerable
            }, {}],
            139: [function (e, t, i) {
                var n = e("./_export"), o = e("./_core"), a = e("./_fails");
                t.exports = function (e, t) {
                    var i = (o.Object || {})[e] || Object[e], r = {};
                    r[e] = t(i), n(n.S + n.F * a(function () {
                        i(1)
                    }), "Object", r)
                }
            }, {"./_core": 96, "./_export": 104, "./_fails": 105}],
            140: [function (e, t, i) {
                var n = e("./_object-keys"), o = e("./_to-iobject"), a = e("./_object-pie").f;
                t.exports = function (e) {
                    return function (t) {
                        for (var i, r = o(t), s = n(r), l = s.length, d = 0, u = []; l > d;) a.call(r, i = s[d++]) && u.push(e ? [i, r[i]] : r[i]);
                        return u
                    }
                }
            }, {"./_object-keys": 137, "./_object-pie": 138, "./_to-iobject": 155}],
            141: [function (e, t, i) {
                t.exports = function (e) {
                    try {
                        return {e: !1, v: e()}
                    } catch (e) {
                        return {e: !0, v: e}
                    }
                }
            }, {}],
            142: [function (e, t, i) {
                var n = e("./_an-object"), o = e("./_is-object"), a = e("./_new-promise-capability");
                t.exports = function (e, t) {
                    if (n(e), o(t) && t.constructor === e) return t;
                    var i = a.f(e), r = i.resolve;
                    return r(t), i.promise
                }
            }, {"./_an-object": 92, "./_is-object": 116, "./_new-promise-capability": 126}],
            143: [function (e, t, i) {
                t.exports = function (e, t) {
                    return {enumerable: !(1 & e), configurable: !(2 & e), writable: !(4 & e), value: t}
                }
            }, {}],
            144: [function (e, t, i) {
                var n = e("./_hide");
                t.exports = function (e, t, i) {
                    for (var o in t) i && e[o] ? e[o] = t[o] : n(e, o, t[o]);
                    return e
                }
            }, {"./_hide": 109}],
            145: [function (e, t, i) {
                t.exports = e("./_hide")
            }, {"./_hide": 109}],
            146: [function (e, t, i) {
                "use strict";
                var n = e("./_global"), o = e("./_core"), a = e("./_object-dp"), r = e("./_descriptors"),
                    s = e("./_wks")("species");
                t.exports = function (e) {
                    var t = "function" == typeof o[e] ? o[e] : n[e];
                    r && t && !t[s] && a.f(t, s, {
                        configurable: !0, get: function () {
                            return this
                        }
                    })
                }
            }, {"./_core": 96, "./_descriptors": 100, "./_global": 107, "./_object-dp": 129, "./_wks": 163}],
            147: [function (e, t, i) {
                var n = e("./_object-dp").f, o = e("./_has"), a = e("./_wks")("toStringTag");
                t.exports = function (e, t, i) {
                    e && !o(e = i ? e : e.prototype, a) && n(e, a, {configurable: !0, value: t})
                }
            }, {"./_has": 108, "./_object-dp": 129, "./_wks": 163}],
            148: [function (e, t, i) {
                var n = e("./_shared")("keys"), o = e("./_uid");
                t.exports = function (e) {
                    return n[e] || (n[e] = o(e))
                }
            }, {"./_shared": 149, "./_uid": 159}],
            149: [function (e, t, i) {
                var n = e("./_core"), o = e("./_global"), a = o["__core-js_shared__"] || (o["__core-js_shared__"] = {});
                (t.exports = function (e, t) {
                    return a[e] || (a[e] = void 0 !== t ? t : {})
                })("versions", []).push({
                    version: n.version,
                    mode: e("./_library") ? "pure" : "global",
                    copyright: "© 2018 Denis Pushkarev (zloirock.ru)"
                })
            }, {"./_core": 96, "./_global": 107, "./_library": 123}],
            150: [function (e, t, i) {
                var n = e("./_an-object"), o = e("./_a-function"), a = e("./_wks")("species");
                t.exports = function (e, t) {
                    var i, r = n(e).constructor;
                    return void 0 === r || void 0 == (i = n(r)[a]) ? t : o(i)
                }
            }, {"./_a-function": 89, "./_an-object": 92, "./_wks": 163}],
            151: [function (e, t, i) {
                var n = e("./_to-integer"), o = e("./_defined");
                t.exports = function (e) {
                    return function (t, i) {
                        var a, r, s = String(o(t)), l = n(i), d = s.length;
                        return l < 0 || l >= d ? e ? "" : void 0 : (a = s.charCodeAt(l)) < 55296 || a > 56319 || l + 1 === d || (r = s.charCodeAt(l + 1)) < 56320 || r > 57343 ? e ? s.charAt(l) : a : e ? s.slice(l, l + 2) : r - 56320 + (a - 55296 << 10) + 65536
                    }
                }
            }, {"./_defined": 99, "./_to-integer": 154}],
            152: [function (e, t, i) {
                var n, o, a, r = e("./_ctx"), s = e("./_invoke"), l = e("./_html"), d = e("./_dom-create"),
                    u = e("./_global"), c = u.process, h = u.setImmediate, f = u.clearImmediate, p = u.MessageChannel,
                    g = u.Dispatch, m = 0, v = {}, y = function () {
                        var e = +this;
                        if (v.hasOwnProperty(e)) {
                            var t = v[e];
                            delete v[e], t()
                        }
                    }, T = function (e) {
                        y.call(e.data)
                    };
                h && f || (h = function (e) {
                    for (var t = [], i = 1; arguments.length > i;) t.push(arguments[i++]);
                    return v[++m] = function () {
                        s("function" == typeof e ? e : Function(e), t)
                    }, n(m), m
                }, f = function (e) {
                    delete v[e]
                }, "process" == e("./_cof")(c) ? n = function (e) {
                    c.nextTick(r(y, e, 1))
                } : g && g.now ? n = function (e) {
                    g.now(r(y, e, 1))
                } : p ? (o = new p, a = o.port2, o.port1.onmessage = T, n = r(a.postMessage, a, 1)) : u.addEventListener && "function" == typeof postMessage && !u.importScripts ? (n = function (e) {
                    u.postMessage(e + "", "*")
                }, u.addEventListener("message", T, !1)) : n = "onreadystatechange" in d("script") ? function (e) {
                    l.appendChild(d("script")).onreadystatechange = function () {
                        l.removeChild(this), y.call(e)
                    }
                } : function (e) {
                    setTimeout(r(y, e, 1), 0)
                }), t.exports = {set: h, clear: f}
            }, {"./_cof": 95, "./_ctx": 98, "./_dom-create": 101, "./_global": 107, "./_html": 110, "./_invoke": 112}],
            153: [function (e, t, i) {
                var n = e("./_to-integer"), o = Math.max, a = Math.min;
                t.exports = function (e, t) {
                    return (e = n(e)) < 0 ? o(e + t, 0) : a(e, t)
                }
            }, {"./_to-integer": 154}],
            154: [function (e, t, i) {
                var n = Math.ceil, o = Math.floor;
                t.exports = function (e) {
                    return isNaN(e = +e) ? 0 : (e > 0 ? o : n)(e)
                }
            }, {}],
            155: [function (e, t, i) {
                var n = e("./_iobject"), o = e("./_defined");
                t.exports = function (e) {
                    return n(o(e))
                }
            }, {"./_defined": 99, "./_iobject": 113}],
            156: [function (e, t, i) {
                var n = e("./_to-integer"), o = Math.min;
                t.exports = function (e) {
                    return e > 0 ? o(n(e), 9007199254740991) : 0
                }
            }, {"./_to-integer": 154}],
            157: [function (e, t, i) {
                var n = e("./_defined");
                t.exports = function (e) {
                    return Object(n(e))
                }
            }, {"./_defined": 99}],
            158: [function (e, t, i) {
                var n = e("./_is-object");
                t.exports = function (e, t) {
                    if (!n(e)) return e;
                    var i, o;
                    if (t && "function" == typeof (i = e.toString) && !n(o = i.call(e))) return o;
                    if ("function" == typeof (i = e.valueOf) && !n(o = i.call(e))) return o;
                    if (!t && "function" == typeof (i = e.toString) && !n(o = i.call(e))) return o;
                    throw TypeError("Can't convert object to primitive value")
                }
            }, {"./_is-object": 116}],
            159: [function (e, t, i) {
                var n = 0, o = Math.random();
                t.exports = function (e) {
                    return "Symbol(".concat(void 0 === e ? "" : e, ")_", (++n + o).toString(36))
                }
            }, {}],
            160: [function (e, t, i) {
                var n = e("./_global"), o = n.navigator;
                t.exports = o && o.userAgent || ""
            }, {"./_global": 107}],
            161: [function (e, t, i) {
                var n = e("./_global"), o = e("./_core"), a = e("./_library"), r = e("./_wks-ext"),
                    s = e("./_object-dp").f;
                t.exports = function (e) {
                    var t = o.Symbol || (o.Symbol = a ? {} : n.Symbol || {});
                    "_" == e.charAt(0) || e in t || s(t, e, {value: r.f(e)})
                }
            }, {"./_core": 96, "./_global": 107, "./_library": 123, "./_object-dp": 129, "./_wks-ext": 162}],
            162: [function (e, t, i) {
                i.f = e("./_wks")
            }, {"./_wks": 163}],
            163: [function (e, t, i) {
                var n = e("./_shared")("wks"), o = e("./_uid"), a = e("./_global").Symbol, r = "function" == typeof a,
                    s = t.exports = function (e) {
                        return n[e] || (n[e] = r && a[e] || (r ? a : o)("Symbol." + e))
                    };
                s.store = n
            }, {"./_global": 107, "./_shared": 149, "./_uid": 159}],
            164: [function (e, t, i) {
                var n = e("./_classof"), o = e("./_wks")("iterator"), a = e("./_iterators");
                t.exports = e("./_core").getIteratorMethod = function (e) {
                    if (void 0 != e) return e[o] || e["@@iterator"] || a[n(e)]
                }
            }, {"./_classof": 94, "./_core": 96, "./_iterators": 122, "./_wks": 163}],
            165: [function (e, t, i) {
                "use strict";
                var n = e("./_ctx"), o = e("./_export"), a = e("./_to-object"), r = e("./_iter-call"),
                    s = e("./_is-array-iter"), l = e("./_to-length"), d = e("./_create-property"),
                    u = e("./core.get-iterator-method");
                o(o.S + o.F * !e("./_iter-detect")(function (e) {
                    Array.from(e)
                }), "Array", {
                    from: function (e) {
                        var t, i, o, c, h = a(e), f = "function" == typeof this ? this : Array, p = arguments.length,
                            g = p > 1 ? arguments[1] : void 0, m = void 0 !== g, v = 0, y = u(h);
                        if (m && (g = n(g, p > 2 ? arguments[2] : void 0, 2)), void 0 == y || f == Array && s(y)) for (t = l(h.length), i = new f(t); t > v; v++) d(i, v, m ? g(h[v], v) : h[v]); else for (c = y.call(h), i = new f; !(o = c.next()).done; v++) d(i, v, m ? r(c, g, [o.value, v], !0) : o.value);
                        return i.length = v, i
                    }
                })
            }, {
                "./_create-property": 97,
                "./_ctx": 98,
                "./_export": 104,
                "./_is-array-iter": 114,
                "./_iter-call": 117,
                "./_iter-detect": 120,
                "./_to-length": 156,
                "./_to-object": 157,
                "./core.get-iterator-method": 164
            }],
            166: [function (e, t, i) {
                "use strict";
                var n = e("./_add-to-unscopables"), o = e("./_iter-step"), a = e("./_iterators"),
                    r = e("./_to-iobject");
                t.exports = e("./_iter-define")(Array, "Array", function (e, t) {
                    this._t = r(e), this._i = 0, this._k = t
                }, function () {
                    var e = this._t, t = this._k, i = this._i++;
                    return !e || i >= e.length ? (this._t = void 0, o(1)) : o(0, "keys" == t ? i : "values" == t ? e[i] : [i, e[i]])
                }, "values"), a.Arguments = a.Array, n("keys"), n("values"), n("entries")
            }, {
                "./_add-to-unscopables": 90,
                "./_iter-define": 119,
                "./_iter-step": 121,
                "./_iterators": 122,
                "./_to-iobject": 155
            }],
            167: [function (e, t, i) {
                "use strict";
                var n = e("./_is-object"), o = e("./_object-gpo"), a = e("./_wks")("hasInstance"),
                    r = Function.prototype;
                a in r || e("./_object-dp").f(r, a, {
                    value: function (e) {
                        if ("function" != typeof this || !n(e)) return !1;
                        if (!n(this.prototype)) return e instanceof this;
                        for (; e = o(e);) if (this.prototype === e) return !0;
                        return !1
                    }
                })
            }, {"./_is-object": 116, "./_object-dp": 129, "./_object-gpo": 135, "./_wks": 163}],
            168: [function (e, t, i) {
                var n = e("./_export");
                n(n.S + n.F, "Object", {assign: e("./_object-assign")})
            }, {"./_export": 104, "./_object-assign": 127}],
            169: [function (e, t, i) {
                var n = e("./_export");
                n(n.S, "Object", {create: e("./_object-create")})
            }, {"./_export": 104, "./_object-create": 128}],
            170: [function (e, t, i) {
                var n = e("./_export");
                n(n.S + n.F * !e("./_descriptors"), "Object", {defineProperty: e("./_object-dp").f})
            }, {"./_descriptors": 100, "./_export": 104, "./_object-dp": 129}],
            171: [function (e, t, i) {
                e("./_object-sap")("getOwnPropertyNames", function () {
                    return e("./_object-gopn-ext").f
                })
            }, {"./_object-gopn-ext": 132, "./_object-sap": 139}],
            172: [function (e, t, i) {
                var n = e("./_to-object"), o = e("./_object-gpo");
                e("./_object-sap")("getPrototypeOf", function () {
                    return function (e) {
                        return o(n(e))
                    }
                })
            }, {"./_object-gpo": 135, "./_object-sap": 139, "./_to-object": 157}],
            173: [function (e, t, i) {
                var n = e("./_to-object"), o = e("./_object-keys");
                e("./_object-sap")("keys", function () {
                    return function (e) {
                        return o(n(e))
                    }
                })
            }, {"./_object-keys": 137, "./_object-sap": 139, "./_to-object": 157}],
            174: [function (e, t, i) {
                arguments[4][68][0].apply(i, arguments)
            }, {dup: 68}],
            175: [function (e, t, i) {
                "use strict";
                var n, o, a, r, s = e("./_library"), l = e("./_global"), d = e("./_ctx"), u = e("./_classof"),
                    c = e("./_export"), h = e("./_is-object"), f = e("./_a-function"), p = e("./_an-instance"),
                    g = e("./_for-of"), m = e("./_species-constructor"), v = e("./_task").set, y = e("./_microtask")(),
                    T = e("./_new-promise-capability"), w = e("./_perform"), k = e("./_user-agent"),
                    C = e("./_promise-resolve"), b = l.TypeError, I = l.process, S = I && I.versions,
                    _ = S && S.v8 || "", D = l.Promise, A = "process" == u(I), N = function () {
                    }, x = o = T.f, E = !!function () {
                        try {
                            var t = D.resolve(1), i = (t.constructor = {})[e("./_wks")("species")] = function (e) {
                                e(N, N)
                            };
                            return (A || "function" == typeof PromiseRejectionEvent) && t.then(N) instanceof i && 0 !== _.indexOf("6.6") && -1 === k.indexOf("Chrome/66")
                        } catch (e) {
                        }
                    }(), O = function (e) {
                        var t;
                        return !(!h(e) || "function" != typeof (t = e.then)) && t
                    }, P = function (e, t) {
                        if (!e._n) {
                            e._n = !0;
                            var i = e._c;
                            y(function () {
                                for (var n = e._v, o = 1 == e._s, a = 0, r = function (t) {
                                    var i, a, r, s = o ? t.ok : t.fail, l = t.resolve, d = t.reject, u = t.domain;
                                    try {
                                        s ? (o || (2 == e._h && L(e), e._h = 1), !0 === s ? i = n : (u && u.enter(), i = s(n), u && (u.exit(), r = !0)), i === t.promise ? d(b("Promise-chain cycle")) : (a = O(i)) ? a.call(i, l, d) : l(i)) : d(n)
                                    } catch (e) {
                                        u && !r && u.exit(), d(e)
                                    }
                                }; i.length > a;) r(i[a++]);
                                e._c = [], e._n = !1, t && !e._h && M(e)
                            })
                        }
                    }, M = function (e) {
                        v.call(l, function () {
                            var t, i, n, o = e._v, a = F(e);
                            if (a && (t = w(function () {
                                A ? I.emit("unhandledRejection", o, e) : (i = l.onunhandledrejection) ? i({
                                    promise: e,
                                    reason: o
                                }) : (n = l.console) && n.error && n.error("Unhandled promise rejection", o)
                            }), e._h = A || F(e) ? 2 : 1), e._a = void 0, a && t.e) throw t.v
                        })
                    }, F = function (e) {
                        return 1 !== e._h && 0 === (e._a || e._c).length
                    }, L = function (e) {
                        v.call(l, function () {
                            var t;
                            A ? I.emit("rejectionHandled", e) : (t = l.onrejectionhandled) && t({promise: e, reason: e._v})
                        })
                    }, R = function (e) {
                        var t = this;
                        t._d || (t._d = !0, (t = t._w || t)._v = e, t._s = 2, t._a || (t._a = t._c.slice()), P(t, !0))
                    }, B = function (e) {
                        var t, i = this;
                        if (!i._d) {
                            i._d = !0, i = i._w || i;
                            try {
                                if (i === e) throw b("Promise can't be resolved itself");
                                (t = O(e)) ? y(function () {
                                    var n = {_w: i, _d: !1};
                                    try {
                                        t.call(e, d(B, n, 1), d(R, n, 1))
                                    } catch (e) {
                                        R.call(n, e)
                                    }
                                }) : (i._v = e, i._s = 1, P(i, !1))
                            } catch (e) {
                                R.call({_w: i, _d: !1}, e)
                            }
                        }
                    };
                E || (D = function (e) {
                    p(this, D, "Promise", "_h"), f(e), n.call(this);
                    try {
                        e(d(B, this, 1), d(R, this, 1))
                    } catch (e) {
                        R.call(this, e)
                    }
                }, (n = function (e) {
                    this._c = [], this._a = void 0, this._s = 0, this._d = !1, this._v = void 0, this._h = 0, this._n = !1
                }).prototype = e("./_redefine-all")(D.prototype, {
                    then: function (e, t) {
                        var i = x(m(this, D));
                        return i.ok = "function" != typeof e || e, i.fail = "function" == typeof t && t, i.domain = A ? I.domain : void 0, this._c.push(i), this._a && this._a.push(i), this._s && P(this, !1), i.promise
                    }, catch: function (e) {
                        return this.then(void 0, e)
                    }
                }), a = function () {
                    var e = new n;
                    this.promise = e, this.resolve = d(B, e, 1), this.reject = d(R, e, 1)
                }, T.f = x = function (e) {
                    return e === D || e === r ? new a(e) : o(e)
                }), c(c.G + c.W + c.F * !E, {Promise: D}), e("./_set-to-string-tag")(D, "Promise"), e("./_set-species")("Promise"), r = e("./_core").Promise, c(c.S + c.F * !E, "Promise", {
                    reject: function (e) {
                        var t = x(this), i = t.reject;
                        return i(e), t.promise
                    }
                }), c(c.S + c.F * (s || !E), "Promise", {
                    resolve: function (e) {
                        return C(s && this === r ? D : this, e)
                    }
                }), c(c.S + c.F * !(E && e("./_iter-detect")(function (e) {
                    D.all(e).catch(N)
                })), "Promise", {
                    all: function (e) {
                        var t = this, i = x(t), n = i.resolve, o = i.reject, a = w(function () {
                            var i = [], a = 0, r = 1;
                            g(e, !1, function (e) {
                                var s = a++, l = !1;
                                i.push(void 0), r++, t.resolve(e).then(function (e) {
                                    l || (l = !0, i[s] = e, --r || n(i))
                                }, o)
                            }), --r || n(i)
                        });
                        return a.e && o(a.v), i.promise
                    }, race: function (e) {
                        var t = this, i = x(t), n = i.reject, o = w(function () {
                            g(e, !1, function (e) {
                                t.resolve(e).then(i.resolve, n)
                            })
                        });
                        return o.e && n(o.v), i.promise
                    }
                })
            }, {
                "./_a-function": 89,
                "./_an-instance": 91,
                "./_classof": 94,
                "./_core": 96,
                "./_ctx": 98,
                "./_export": 104,
                "./_for-of": 106,
                "./_global": 107,
                "./_is-object": 116,
                "./_iter-detect": 120,
                "./_library": 123,
                "./_microtask": 125,
                "./_new-promise-capability": 126,
                "./_perform": 141,
                "./_promise-resolve": 142,
                "./_redefine-all": 144,
                "./_set-species": 146,
                "./_set-to-string-tag": 147,
                "./_species-constructor": 150,
                "./_task": 152,
                "./_user-agent": 160,
                "./_wks": 163
            }],
            176: [function (e, t, i) {
                var n = e("./_export"), o = e("./_to-absolute-index"), a = String.fromCharCode,
                    r = String.fromCodePoint;
                n(n.S + n.F * (!!r && 1 != r.length), "String", {
                    fromCodePoint: function (e) {
                        for (var t, i = [], n = arguments.length, r = 0; n > r;) {
                            if (t = +arguments[r++], o(t, 1114111) !== t) throw RangeError(t + " is not a valid code point");
                            i.push(t < 65536 ? a(t) : a(55296 + ((t -= 65536) >> 10), t % 1024 + 56320))
                        }
                        return i.join("")
                    }
                })
            }, {"./_export": 104, "./_to-absolute-index": 153}],
            177: [function (e, t, i) {
                "use strict";
                var n = e("./_string-at")(!0);
                e("./_iter-define")(String, "String", function (e) {
                    this._t = String(e), this._i = 0
                }, function () {
                    var e, t = this._t, i = this._i;
                    return i >= t.length ? {value: void 0, done: !0} : (e = n(t, i), this._i += e.length, {
                        value: e,
                        done: !1
                    })
                })
            }, {"./_iter-define": 119, "./_string-at": 151}],
            178: [function (e, t, i) {
                "use strict";
                var n = e("./_global"), o = e("./_has"), a = e("./_descriptors"), r = e("./_export"),
                    s = e("./_redefine"), l = e("./_meta").KEY, d = e("./_fails"), u = e("./_shared"),
                    c = e("./_set-to-string-tag"), h = e("./_uid"), f = e("./_wks"), p = e("./_wks-ext"),
                    g = e("./_wks-define"), m = e("./_enum-keys"), v = e("./_is-array"), y = e("./_an-object"),
                    T = e("./_is-object"), w = e("./_to-iobject"), k = e("./_to-primitive"), C = e("./_property-desc"),
                    b = e("./_object-create"), I = e("./_object-gopn-ext"), S = e("./_object-gopd"),
                    _ = e("./_object-dp"), D = e("./_object-keys"), A = S.f, N = _.f, x = I.f, E = n.Symbol, O = n.JSON,
                    P = O && O.stringify, M = f("_hidden"), F = f("toPrimitive"), L = {}.propertyIsEnumerable,
                    R = u("symbol-registry"), B = u("symbols"), U = u("op-symbols"), V = Object.prototype,
                    K = "function" == typeof E, G = n.QObject, W = !G || !G.prototype || !G.prototype.findChild,
                    j = a && d(function () {
                        return 7 != b(N({}, "a", {
                            get: function () {
                                return N(this, "a", {value: 7}).a
                            }
                        })).a
                    }) ? function (e, t, i) {
                        var n = A(V, t);
                        n && delete V[t], N(e, t, i), n && e !== V && N(V, t, n)
                    } : N, H = function (e) {
                        var t = B[e] = b(E.prototype);
                        return t._k = e, t
                    }, z = K && "symbol" == typeof E.iterator ? function (e) {
                        return "symbol" == typeof e
                    } : function (e) {
                        return e instanceof E
                    }, X = function (e, t, i) {
                        return e === V && X(U, t, i), y(e), t = k(t, !0), y(i), o(B, t) ? (i.enumerable ? (o(e, M) && e[M][t] && (e[M][t] = !1), i = b(i, {enumerable: C(0, !1)})) : (o(e, M) || N(e, M, C(1, {})), e[M][t] = !0), j(e, t, i)) : N(e, t, i)
                    }, q = function (e, t) {
                        y(e);
                        for (var i, n = m(t = w(t)), o = 0, a = n.length; a > o;) X(e, i = n[o++], t[i]);
                        return e
                    }, Y = function (e) {
                        var t = L.call(this, e = k(e, !0));
                        return !(this === V && o(B, e) && !o(U, e)) && (!(t || !o(this, e) || !o(B, e) || o(this, M) && this[M][e]) || t)
                    }, J = function (e, t) {
                        if (e = w(e), t = k(t, !0), e !== V || !o(B, t) || o(U, t)) {
                            var i = A(e, t);
                            return !i || !o(B, t) || o(e, M) && e[M][t] || (i.enumerable = !0), i
                        }
                    }, Z = function (e) {
                        for (var t, i = x(w(e)), n = [], a = 0; i.length > a;) o(B, t = i[a++]) || t == M || t == l || n.push(t);
                        return n
                    }, Q = function (e) {
                        for (var t, i = e === V, n = x(i ? U : w(e)), a = [], r = 0; n.length > r;) !o(B, t = n[r++]) || i && !o(V, t) || a.push(B[t]);
                        return a
                    };
                K || (s((E = function () {
                    if (this instanceof E) throw TypeError("Symbol is not a constructor!");
                    var e = h(arguments.length > 0 ? arguments[0] : void 0), t = function (i) {
                        this === V && t.call(U, i), o(this, M) && o(this[M], e) && (this[M][e] = !1), j(this, e, C(1, i))
                    };
                    return a && W && j(V, e, {configurable: !0, set: t}), H(e)
                }).prototype, "toString", function () {
                    return this._k
                }), S.f = J, _.f = X, e("./_object-gopn").f = I.f = Z, e("./_object-pie").f = Y, e("./_object-gops").f = Q, a && !e("./_library") && s(V, "propertyIsEnumerable", Y, !0), p.f = function (e) {
                    return H(f(e))
                }), r(r.G + r.W + r.F * !K, {Symbol: E});
                for (var $ = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), ee = 0; $.length > ee;) f($[ee++]);
                for (var te = D(f.store), ie = 0; te.length > ie;) g(te[ie++]);
                r(r.S + r.F * !K, "Symbol", {
                    for: function (e) {
                        return o(R, e += "") ? R[e] : R[e] = E(e)
                    }, keyFor: function (e) {
                        if (!z(e)) throw TypeError(e + " is not a symbol!");
                        for (var t in R) if (R[t] === e) return t
                    }, useSetter: function () {
                        W = !0
                    }, useSimple: function () {
                        W = !1
                    }
                }), r(r.S + r.F * !K, "Object", {
                    create: function (e, t) {
                        return void 0 === t ? b(e) : q(b(e), t)
                    },
                    defineProperty: X,
                    defineProperties: q,
                    getOwnPropertyDescriptor: J,
                    getOwnPropertyNames: Z,
                    getOwnPropertySymbols: Q
                }), O && r(r.S + r.F * (!K || d(function () {
                    var e = E();
                    return "[null]" != P([e]) || "{}" != P({a: e}) || "{}" != P(Object(e))
                })), "JSON", {
                    stringify: function (e) {
                        for (var t, i, n = [e], o = 1; arguments.length > o;) n.push(arguments[o++]);
                        if (i = t = n[1], (T(t) || void 0 !== e) && !z(e)) return v(t) || (t = function (e, t) {
                            if ("function" == typeof i && (t = i.call(this, e, t)), !z(t)) return t
                        }), n[1] = t, P.apply(O, n)
                    }
                }), E.prototype[F] || e("./_hide")(E.prototype, F, E.prototype.valueOf), c(E, "Symbol"), c(Math, "Math", !0), c(n.JSON, "JSON", !0)
            }, {
                "./_an-object": 92,
                "./_descriptors": 100,
                "./_enum-keys": 103,
                "./_export": 104,
                "./_fails": 105,
                "./_global": 107,
                "./_has": 108,
                "./_hide": 109,
                "./_is-array": 115,
                "./_is-object": 116,
                "./_library": 123,
                "./_meta": 124,
                "./_object-create": 128,
                "./_object-dp": 129,
                "./_object-gopd": 131,
                "./_object-gopn": 133,
                "./_object-gopn-ext": 132,
                "./_object-gops": 134,
                "./_object-keys": 137,
                "./_object-pie": 138,
                "./_property-desc": 143,
                "./_redefine": 145,
                "./_set-to-string-tag": 147,
                "./_shared": 149,
                "./_to-iobject": 155,
                "./_to-primitive": 158,
                "./_uid": 159,
                "./_wks": 163,
                "./_wks-define": 161,
                "./_wks-ext": 162
            }],
            179: [function (e, t, i) {
                var n = e("./_export"), o = e("./_object-to-array")(!0);
                n(n.S, "Object", {
                    entries: function (e) {
                        return o(e)
                    }
                })
            }, {"./_export": 104, "./_object-to-array": 140}],
            180: [function (e, t, i) {
                "use strict";
                var n = e("./_export"), o = e("./_core"), a = e("./_global"), r = e("./_species-constructor"),
                    s = e("./_promise-resolve");
                n(n.P + n.R, "Promise", {
                    finally: function (e) {
                        var t = r(this, o.Promise || a.Promise), i = "function" == typeof e;
                        return this.then(i ? function (i) {
                            return s(t, e()).then(function () {
                                return i
                            })
                        } : e, i ? function (i) {
                            return s(t, e()).then(function () {
                                throw i
                            })
                        } : e)
                    }
                })
            }, {
                "./_core": 96,
                "./_export": 104,
                "./_global": 107,
                "./_promise-resolve": 142,
                "./_species-constructor": 150
            }],
            181: [function (e, t, i) {
                "use strict";
                var n = e("./_export"), o = e("./_new-promise-capability"), a = e("./_perform");
                n(n.S, "Promise", {
                    try: function (e) {
                        var t = o.f(this), i = a(e);
                        return (i.e ? t.reject : t.resolve)(i.v), t.promise
                    }
                })
            }, {"./_export": 104, "./_new-promise-capability": 126, "./_perform": 141}],
            182: [function (e, t, i) {
                e("./_wks-define")("asyncIterator")
            }, {"./_wks-define": 161}],
            183: [function (e, t, i) {
                e("./_wks-define")("observable")
            }, {"./_wks-define": 161}],
            184: [function (e, t, i) {
                e("./es6.array.iterator");
                for (var n = e("./_global"), o = e("./_hide"), a = e("./_iterators"), r = e("./_wks")("toStringTag"), s = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","), l = 0; l < s.length; l++) {
                    var d = s[l], u = n[d], c = u && u.prototype;
                    c && !c[r] && o(c, r, d), a[d] = a.Array
                }
            }, {"./_global": 107, "./_hide": 109, "./_iterators": 122, "./_wks": 163, "./es6.array.iterator": 166}],
            185: [function (e, t, i) {
                var n = e("./_export"), o = e("./_task");
                n(n.G + n.B, {setImmediate: o.set, clearImmediate: o.clear})
            }, {"./_export": 104, "./_task": 152}],
            186: [function (e, t, i) {
                (function (t) {
                    "use strict";
                    var n, o = e("babel-runtime/helpers/typeof"), a = (n = o) && n.__esModule ? n : {default: n};

                    function r(e) {
                        return Object.prototype.toString.call(e)
                    }

                    i.isArray = function (e) {
                        return Array.isArray ? Array.isArray(e) : "[object Array]" === r(e)
                    }, i.isBoolean = function (e) {
                        return "boolean" == typeof e
                    }, i.isNull = function (e) {
                        return null === e
                    }, i.isNullOrUndefined = function (e) {
                        return null == e
                    }, i.isNumber = function (e) {
                        return "number" == typeof e
                    }, i.isString = function (e) {
                        return "string" == typeof e
                    }, i.isSymbol = function (e) {
                        return "symbol" === (void 0 === e ? "undefined" : (0, a.default)(e))
                    }, i.isUndefined = function (e) {
                        return void 0 === e
                    }, i.isRegExp = function (e) {
                        return "[object RegExp]" === r(e)
                    }, i.isObject = function (e) {
                        return "object" === (void 0 === e ? "undefined" : (0, a.default)(e)) && null !== e
                    }, i.isDate = function (e) {
                        return "[object Date]" === r(e)
                    }, i.isError = function (e) {
                        return "[object Error]" === r(e) || e instanceof Error
                    }, i.isFunction = function (e) {
                        return "function" == typeof e
                    }, i.isPrimitive = function (e) {
                        return null === e || "boolean" == typeof e || "number" == typeof e || "string" == typeof e || "symbol" === (void 0 === e ? "undefined" : (0, a.default)(e)) || void 0 === e
                    }, i.isBuffer = t.isBuffer
                }).call(this, {isBuffer: e("../../is-buffer/index.js")})
            }, {"../../is-buffer/index.js": 227, "babel-runtime/helpers/typeof": 64}],
            187: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/helpers/typeof"), a = (n = o) && n.__esModule ? n : {default: n};
                !function (e) {
                    var n, o, r,
                        s = (n = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g, o = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, r = /[^-+\dA-Z]/g, function (e, t, i, d) {
                            if (1 !== arguments.length || "string" !== (null === (u = e) ? "null" : void 0 === u ? "undefined" : "object" !== (void 0 === u ? "undefined" : (0, a.default)(u)) ? void 0 === u ? "undefined" : (0, a.default)(u) : Array.isArray(u) ? "array" : {}.toString.call(u).slice(8, -1).toLowerCase()) || /\d/.test(e) || (t = e, e = void 0), (e = e || new Date) instanceof Date || (e = new Date(e)), isNaN(e)) throw TypeError("Invalid date");
                            var u, c = (t = String(s.masks[t] || t || s.masks.default)).slice(0, 4);
                            "UTC:" !== c && "GMT:" !== c || (t = t.slice(4), i = !0, "GMT:" === c && (d = !0));
                            var h = i ? "getUTC" : "get", f = e[h + "Date"](), p = e[h + "Day"](), g = e[h + "Month"](),
                                m = e[h + "FullYear"](), v = e[h + "Hours"](), y = e[h + "Minutes"](),
                                T = e[h + "Seconds"](), w = e[h + "Milliseconds"](), k = i ? 0 : e.getTimezoneOffset(),
                                C = function (e) {
                                    var t = new Date(e.getFullYear(), e.getMonth(), e.getDate());
                                    t.setDate(t.getDate() - (t.getDay() + 6) % 7 + 3);
                                    var i = new Date(t.getFullYear(), 0, 4);
                                    i.setDate(i.getDate() - (i.getDay() + 6) % 7 + 3);
                                    var n = t.getTimezoneOffset() - i.getTimezoneOffset();
                                    t.setHours(t.getHours() - n);
                                    var o = (t - i) / 6048e5;
                                    return 1 + Math.floor(o)
                                }(e), b = function (e) {
                                    var t = e.getDay();
                                    return 0 === t && (t = 7), t
                                }(e), I = {
                                    d: f,
                                    dd: l(f),
                                    ddd: s.i18n.dayNames[p],
                                    dddd: s.i18n.dayNames[p + 7],
                                    m: g + 1,
                                    mm: l(g + 1),
                                    mmm: s.i18n.monthNames[g],
                                    mmmm: s.i18n.monthNames[g + 12],
                                    yy: String(m).slice(2),
                                    yyyy: m,
                                    h: v % 12 || 12,
                                    hh: l(v % 12 || 12),
                                    H: v,
                                    HH: l(v),
                                    M: y,
                                    MM: l(y),
                                    s: T,
                                    ss: l(T),
                                    l: l(w, 3),
                                    L: l(Math.round(w / 10)),
                                    t: v < 12 ? "a" : "p",
                                    tt: v < 12 ? "am" : "pm",
                                    T: v < 12 ? "A" : "P",
                                    TT: v < 12 ? "AM" : "PM",
                                    Z: d ? "GMT" : i ? "UTC" : (String(e).match(o) || [""]).pop().replace(r, ""),
                                    o: (k > 0 ? "-" : "+") + l(100 * Math.floor(Math.abs(k) / 60) + Math.abs(k) % 60, 4),
                                    S: ["th", "st", "nd", "rd"][f % 10 > 3 ? 0 : (f % 100 - f % 10 != 10) * f % 10],
                                    W: C,
                                    N: b
                                };
                            return t.replace(n, function (e) {
                                return e in I ? I[e] : e.slice(1, e.length - 1)
                            })
                        });

                    function l(e, t) {
                        for (e = String(e), t = t || 2; e.length < t;) e = "0" + e;
                        return e
                    }

                    s.masks = {
                        default: "ddd mmm dd yyyy HH:MM:ss",
                        shortDate: "m/d/yy",
                        mediumDate: "mmm d, yyyy",
                        longDate: "mmmm d, yyyy",
                        fullDate: "dddd, mmmm d, yyyy",
                        shortTime: "h:MM TT",
                        mediumTime: "h:MM:ss TT",
                        longTime: "h:MM:ss TT Z",
                        isoDate: "yyyy-mm-dd",
                        isoTime: "HH:MM:ss",
                        isoDateTime: "yyyy-mm-dd'T'HH:MM:sso",
                        isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",
                        expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z"
                    }, s.i18n = {
                        dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
                        monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
                    }, "function" == typeof define && define.amd ? define(function () {
                        return s
                    }) : "object" === (void 0 === i ? "undefined" : (0, a.default)(i)) ? t.exports = s : e.dateFormat = s
                }(void 0)
            }, {"babel-runtime/helpers/typeof": 64}],
            188: [function (e, t, i) {
                (function (n) {
                    function o() {
                        var e;
                        try {
                            e = i.storage.debug
                        } catch (e) {
                        }
                        return !e && void 0 !== n && "env" in n && (e = n.env.DEBUG), e
                    }

                    (i = t.exports = e("./debug")).log = function () {
                        return "object" == typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments)
                    }, i.formatArgs = function (e) {
                        var t = this.useColors;
                        if (e[0] = (t ? "%c" : "") + this.namespace + (t ? " %c" : " ") + e[0] + (t ? "%c " : " ") + "+" + i.humanize(this.diff), t) {
                            var n = "color: " + this.color;
                            e.splice(1, 0, n, "color: inherit");
                            var o = 0, a = 0;
                            e[0].replace(/%[a-zA-Z%]/g, function (e) {
                                "%%" !== e && "%c" === e && (a = ++o)
                            }), e.splice(a, 0, n)
                        }
                    }, i.save = function (e) {
                        try {
                            null == e ? i.storage.removeItem("debug") : i.storage.debug = e
                        } catch (e) {
                        }
                    }, i.load = o, i.useColors = function () {
                        return !("undefined" == typeof window || !window.process || "renderer" !== window.process.type) || ("undefined" != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "undefined" != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))
                    }, i.storage = "undefined" != typeof chrome && void 0 !== chrome.storage ? chrome.storage.local : function () {
                        try {
                            return window.localStorage
                        } catch (e) {
                        }
                    }(), i.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], i.formatters.j = function (e) {
                        try {
                            return JSON.stringify(e)
                        } catch (e) {
                            return "[UnexpectedJSONParseError]: " + e.message
                        }
                    }, i.enable(o())
                }).call(this, e("_process"))
            }, {"./debug": 189, _process: 249}],
            189: [function (e, t, i) {
                var n;

                function o(e) {
                    function t() {
                        if (t.enabled) {
                            var e = t, o = +new Date, a = o - (n || o);
                            e.diff = a, e.prev = n, e.curr = o, n = o;
                            for (var r = new Array(arguments.length), s = 0; s < r.length; s++) r[s] = arguments[s];
                            r[0] = i.coerce(r[0]), "string" != typeof r[0] && r.unshift("%O");
                            var l = 0;
                            r[0] = r[0].replace(/%([a-zA-Z%])/g, function (t, n) {
                                if ("%%" === t) return t;
                                l++;
                                var o = i.formatters[n];
                                if ("function" == typeof o) {
                                    var a = r[l];
                                    t = o.call(e, a), r.splice(l, 1), l--
                                }
                                return t
                            }), i.formatArgs.call(e, r);
                            var d = t.log || i.log || console.log.bind(console);
                            d.apply(e, r)
                        }
                    }

                    return t.namespace = e, t.enabled = i.enabled(e), t.useColors = i.useColors(), t.color = function (e) {
                        var t, n = 0;
                        for (t in e) n = (n << 5) - n + e.charCodeAt(t), n |= 0;
                        return i.colors[Math.abs(n) % i.colors.length]
                    }(e), "function" == typeof i.init && i.init(t), t
                }

                (i = t.exports = o.debug = o.default = o).coerce = function (e) {
                    return e instanceof Error ? e.stack || e.message : e
                }, i.disable = function () {
                    i.enable("")
                }, i.enable = function (e) {
                    i.save(e), i.names = [], i.skips = [];
                    for (var t = ("string" == typeof e ? e : "").split(/[\s,]+/), n = t.length, o = 0; o < n; o++) t[o] && ("-" === (e = t[o].replace(/\*/g, ".*?"))[0] ? i.skips.push(new RegExp("^" + e.substr(1) + "$")) : i.names.push(new RegExp("^" + e + "$")))
                }, i.enabled = function (e) {
                    var t, n;
                    for (t = 0, n = i.skips.length; t < n; t++) if (i.skips[t].test(e)) return !1;
                    for (t = 0, n = i.names.length; t < n; t++) if (i.names[t].test(e)) return !0;
                    return !1
                }, i.humanize = e("ms"), i.names = [], i.skips = [], i.formatters = {}
            }, {ms: 238}],
            190: [function (e, t, i) {
                "use strict";
                var n = e("object-keys"), o = e("foreach"),
                    a = "function" == typeof Symbol && "symbol" == typeof Symbol(), r = Object.prototype.toString,
                    s = Object.defineProperty && function () {
                        var e = {};
                        try {
                            for (var t in Object.defineProperty(e, "x", {enumerable: !1, value: e}), e) return !1;
                            return e.x === e
                        } catch (e) {
                            return !1
                        }
                    }(), l = function (e, t, i, n) {
                        var o;
                        t in e && ("function" != typeof (o = n) || "[object Function]" !== r.call(o) || !n()) || (s ? Object.defineProperty(e, t, {
                            configurable: !0,
                            enumerable: !1,
                            value: i,
                            writable: !0
                        }) : e[t] = i)
                    }, d = function (e, t) {
                        var i = arguments.length > 2 ? arguments[2] : {}, r = n(t);
                        a && (r = r.concat(Object.getOwnPropertySymbols(t))), o(r, function (n) {
                            l(e, n, t[n], i[n])
                        })
                    };
                d.supportsDescriptors = !!s, t.exports = d
            }, {foreach: 217, "object-keys": 240}],
            191: [function (e, t, i) {
                "use strict";
                var n = Object.getOwnPropertyDescriptor ? function () {
                        return Object.getOwnPropertyDescriptor(arguments, "callee").get
                    }() : function () {
                        throw new TypeError
                    }, o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator,
                    a = Object.getPrototypeOf || function (e) {
                        return e.__proto__
                    }, r = void 0, s = "undefined" == typeof Uint8Array ? void 0 : a(Uint8Array), l = {
                        "$ %Array%": Array,
                        "$ %ArrayBuffer%": "undefined" == typeof ArrayBuffer ? void 0 : ArrayBuffer,
                        "$ %ArrayBufferPrototype%": "undefined" == typeof ArrayBuffer ? void 0 : ArrayBuffer.prototype,
                        "$ %ArrayIteratorPrototype%": o ? a([][Symbol.iterator]()) : void 0,
                        "$ %ArrayPrototype%": Array.prototype,
                        "$ %ArrayProto_entries%": Array.prototype.entries,
                        "$ %ArrayProto_forEach%": Array.prototype.forEach,
                        "$ %ArrayProto_keys%": Array.prototype.keys,
                        "$ %ArrayProto_values%": Array.prototype.values,
                        "$ %AsyncFromSyncIteratorPrototype%": void 0,
                        "$ %AsyncFunction%": void 0,
                        "$ %AsyncFunctionPrototype%": void 0,
                        "$ %AsyncGenerator%": void 0,
                        "$ %AsyncGeneratorFunction%": void 0,
                        "$ %AsyncGeneratorPrototype%": void 0,
                        "$ %AsyncIteratorPrototype%": r && o && Symbol.asyncIterator ? r[Symbol.asyncIterator]() : void 0,
                        "$ %Atomics%": "undefined" == typeof Atomics ? void 0 : Atomics,
                        "$ %Boolean%": Boolean,
                        "$ %BooleanPrototype%": Boolean.prototype,
                        "$ %DataView%": "undefined" == typeof DataView ? void 0 : DataView,
                        "$ %DataViewPrototype%": "undefined" == typeof DataView ? void 0 : DataView.prototype,
                        "$ %Date%": Date,
                        "$ %DatePrototype%": Date.prototype,
                        "$ %decodeURI%": decodeURI,
                        "$ %decodeURIComponent%": decodeURIComponent,
                        "$ %encodeURI%": encodeURI,
                        "$ %encodeURIComponent%": encodeURIComponent,
                        "$ %Error%": Error,
                        "$ %ErrorPrototype%": Error.prototype,
                        "$ %eval%": eval,
                        "$ %EvalError%": EvalError,
                        "$ %EvalErrorPrototype%": EvalError.prototype,
                        "$ %Float32Array%": "undefined" == typeof Float32Array ? void 0 : Float32Array,
                        "$ %Float32ArrayPrototype%": "undefined" == typeof Float32Array ? void 0 : Float32Array.prototype,
                        "$ %Float64Array%": "undefined" == typeof Float64Array ? void 0 : Float64Array,
                        "$ %Float64ArrayPrototype%": "undefined" == typeof Float64Array ? void 0 : Float64Array.prototype,
                        "$ %Function%": Function,
                        "$ %FunctionPrototype%": Function.prototype,
                        "$ %Generator%": void 0,
                        "$ %GeneratorFunction%": void 0,
                        "$ %GeneratorPrototype%": void 0,
                        "$ %Int8Array%": "undefined" == typeof Int8Array ? void 0 : Int8Array,
                        "$ %Int8ArrayPrototype%": "undefined" == typeof Int8Array ? void 0 : Int8Array.prototype,
                        "$ %Int16Array%": "undefined" == typeof Int16Array ? void 0 : Int16Array,
                        "$ %Int16ArrayPrototype%": "undefined" == typeof Int16Array ? void 0 : Int8Array.prototype,
                        "$ %Int32Array%": "undefined" == typeof Int32Array ? void 0 : Int32Array,
                        "$ %Int32ArrayPrototype%": "undefined" == typeof Int32Array ? void 0 : Int32Array.prototype,
                        "$ %isFinite%": isFinite,
                        "$ %isNaN%": isNaN,
                        "$ %IteratorPrototype%": o ? a(a([][Symbol.iterator]())) : void 0,
                        "$ %JSON%": JSON,
                        "$ %JSONParse%": JSON.parse,
                        "$ %Map%": "undefined" == typeof Map ? void 0 : Map,
                        "$ %MapIteratorPrototype%": "undefined" != typeof Map && o ? a((new Map)[Symbol.iterator]()) : void 0,
                        "$ %MapPrototype%": "undefined" == typeof Map ? void 0 : Map.prototype,
                        "$ %Math%": Math,
                        "$ %Number%": Number,
                        "$ %NumberPrototype%": Number.prototype,
                        "$ %Object%": Object,
                        "$ %ObjectPrototype%": Object.prototype,
                        "$ %ObjProto_toString%": Object.prototype.toString,
                        "$ %ObjProto_valueOf%": Object.prototype.valueOf,
                        "$ %parseFloat%": parseFloat,
                        "$ %parseInt%": parseInt,
                        "$ %Promise%": "undefined" == typeof Promise ? void 0 : Promise,
                        "$ %PromisePrototype%": "undefined" == typeof Promise ? void 0 : Promise.prototype,
                        "$ %PromiseProto_then%": "undefined" == typeof Promise ? void 0 : Promise.prototype.then,
                        "$ %Promise_all%": "undefined" == typeof Promise ? void 0 : Promise.all,
                        "$ %Promise_reject%": "undefined" == typeof Promise ? void 0 : Promise.reject,
                        "$ %Promise_resolve%": "undefined" == typeof Promise ? void 0 : Promise.resolve,
                        "$ %Proxy%": "undefined" == typeof Proxy ? void 0 : Proxy,
                        "$ %RangeError%": RangeError,
                        "$ %RangeErrorPrototype%": RangeError.prototype,
                        "$ %ReferenceError%": ReferenceError,
                        "$ %ReferenceErrorPrototype%": ReferenceError.prototype,
                        "$ %Reflect%": "undefined" == typeof Reflect ? void 0 : Reflect,
                        "$ %RegExp%": RegExp,
                        "$ %RegExpPrototype%": RegExp.prototype,
                        "$ %Set%": "undefined" == typeof Set ? void 0 : Set,
                        "$ %SetIteratorPrototype%": "undefined" != typeof Set && o ? a((new Set)[Symbol.iterator]()) : void 0,
                        "$ %SetPrototype%": "undefined" == typeof Set ? void 0 : Set.prototype,
                        "$ %SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? void 0 : SharedArrayBuffer,
                        "$ %SharedArrayBufferPrototype%": "undefined" == typeof SharedArrayBuffer ? void 0 : SharedArrayBuffer.prototype,
                        "$ %String%": String,
                        "$ %StringIteratorPrototype%": o ? a(""[Symbol.iterator]()) : void 0,
                        "$ %StringPrototype%": String.prototype,
                        "$ %Symbol%": o ? Symbol : void 0,
                        "$ %SymbolPrototype%": o ? Symbol.prototype : void 0,
                        "$ %SyntaxError%": SyntaxError,
                        "$ %SyntaxErrorPrototype%": SyntaxError.prototype,
                        "$ %ThrowTypeError%": n,
                        "$ %TypedArray%": s,
                        "$ %TypedArrayPrototype%": s ? s.prototype : void 0,
                        "$ %TypeError%": TypeError,
                        "$ %TypeErrorPrototype%": TypeError.prototype,
                        "$ %Uint8Array%": "undefined" == typeof Uint8Array ? void 0 : Uint8Array,
                        "$ %Uint8ArrayPrototype%": "undefined" == typeof Uint8Array ? void 0 : Uint8Array.prototype,
                        "$ %Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? void 0 : Uint8ClampedArray,
                        "$ %Uint8ClampedArrayPrototype%": "undefined" == typeof Uint8ClampedArray ? void 0 : Uint8ClampedArray.prototype,
                        "$ %Uint16Array%": "undefined" == typeof Uint16Array ? void 0 : Uint16Array,
                        "$ %Uint16ArrayPrototype%": "undefined" == typeof Uint16Array ? void 0 : Uint16Array.prototype,
                        "$ %Uint32Array%": "undefined" == typeof Uint32Array ? void 0 : Uint32Array,
                        "$ %Uint32ArrayPrototype%": "undefined" == typeof Uint32Array ? void 0 : Uint32Array.prototype,
                        "$ %URIError%": URIError,
                        "$ %URIErrorPrototype%": URIError.prototype,
                        "$ %WeakMap%": "undefined" == typeof WeakMap ? void 0 : WeakMap,
                        "$ %WeakMapPrototype%": "undefined" == typeof WeakMap ? void 0 : WeakMap.prototype,
                        "$ %WeakSet%": "undefined" == typeof WeakSet ? void 0 : WeakSet,
                        "$ %WeakSetPrototype%": "undefined" == typeof WeakSet ? void 0 : WeakSet.prototype
                    };
                t.exports = function (e, t) {
                    if (arguments.length > 1 && "boolean" != typeof t) throw new TypeError('"allowMissing" argument must be a boolean');
                    var i = "$ " + e;
                    if (!(i in l)) throw new SyntaxError("intrinsic " + e + " does not exist!");
                    if (void 0 === l[i] && !t) throw new TypeError("intrinsic " + e + " exists, but is not available. Please file an issue!");
                    return l[i]
                }
            }, {}],
            192: [function (e, t, i) {
                "use strict";
                var n = e("has"), o = e("es-to-primitive/es6"), a = e("object-keys"), r = e("object-inspect"),
                    s = e("./GetIntrinsic"), l = s("%TypeError%"), d = s("%RangeError%"), u = s("%SyntaxError%"),
                    c = s("%Array%"), h = c.prototype, f = s("%String%"), p = s("%Object%"), g = s("%Number%"),
                    m = s("%Symbol%", !0), v = s("%RegExp%"), y = s("%Promise%", !0), T = p.preventExtensions,
                    w = e("has-symbols")(), k = e("./helpers/assertRecord"), C = e("./helpers/isNaN"),
                    b = e("./helpers/isFinite"), I = Math.pow(2, 32) - 1, S = g.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1,
                    _ = e("./helpers/assign"), D = e("./helpers/sign"), A = e("./helpers/mod"),
                    N = e("./helpers/isPrimitive"), x = e("./helpers/forEach"), E = e("./helpers/every"),
                    O = e("./helpers/isSamePropertyDescriptor"), P = e("./helpers/isPropertyDescriptor"), M = parseInt,
                    F = e("./helpers/callBind"), L = y ? F(s("%PromiseProto_then%")) : null, R = F(c.prototype.slice),
                    B = F(f.prototype.slice), U = F(v.prototype.test, /^0b[01]+$/i),
                    V = F(v.prototype.test, /^0o[0-7]+$/i), K = F(v.prototype.test, /^[0-9]$/), G = F(v.prototype.exec),
                    W = ["", "​", ""].join(""), j = new v("[" + W + "]", "g"), H = F(v.prototype.test, j),
                    z = F(v.prototype.test, /^[-+]0x[0-9a-f]+$/i), X = F(f.prototype.charCodeAt),
                    q = F(p.prototype.propertyIsEnumerable), Y = F(p.prototype.toString),
                    J = F(s("%NumberPrototype%").valueOf), Z = F(s("%BooleanPrototype%").valueOf),
                    Q = F(s("%StringPrototype%").valueOf), $ = F(s("%DatePrototype%").valueOf),
                    ee = w && F(s("%SymbolPrototype%").toString), te = Math.floor, ie = Math.abs, ne = p.create,
                    oe = p.getOwnPropertyDescriptor, ae = p.getOwnPropertyNames, re = p.getOwnPropertySymbols,
                    se = p.isExtensible, le = p.defineProperty,
                    de = Object.setPrototypeOf || ([].__proto__ !== Array.prototype ? null : function (e, t) {
                        return e.__proto__ = t, e
                    }), ue = function (e, t, i, n) {
                        if (!le) {
                            if (!e.IsDataDescriptor(n)) return !1;
                            if (!n["[[Configurable]]"] || !n["[[Writable]]"]) return !1;
                            if (i in t && q(t, i) !== !!n["[[Enumerable]]"]) return !1;
                            var o = n["[[Value]]"];
                            return t[i] = o, e.SameValue(t[i], o)
                        }
                        return le(t, i, e.FromPropertyDescriptor(n)), !0
                    }, ce = ["\t\n\v\f\r   ᠎    ", "         　\u2028", "\u2029\ufeff"].join(""),
                    he = new RegExp("(^[" + ce + "]+)|([" + ce + "]+$)", "g"), fe = F(f.prototype.replace),
                    pe = e("./es5"), ge = e("is-regex"), me = _(_({}, pe), {
                        Call: function (e, t) {
                            var i = arguments.length > 2 ? arguments[2] : [];
                            if (!this.IsCallable(e)) throw new l(r(e) + " is not a function");
                            return e.apply(t, i)
                        }, ToPrimitive: o, ToNumber: function (e) {
                            var t = N(e) ? e : o(e, g);
                            if ("symbol" == typeof t) throw new l("Cannot convert a Symbol value to a number");
                            if ("string" == typeof t) {
                                if (U(t)) return this.ToNumber(M(B(t, 2), 2));
                                if (V(t)) return this.ToNumber(M(B(t, 2), 8));
                                if (H(t) || z(t)) return NaN;
                                var i = function (e) {
                                    return fe(e, he, "")
                                }(t);
                                if (i !== t) return this.ToNumber(i)
                            }
                            return g(t)
                        }, ToInt16: function (e) {
                            var t = this.ToUint16(e);
                            return t >= 32768 ? t - 65536 : t
                        }, ToInt8: function (e) {
                            var t = this.ToUint8(e);
                            return t >= 128 ? t - 256 : t
                        }, ToUint8: function (e) {
                            var t = this.ToNumber(e);
                            if (C(t) || 0 === t || !b(t)) return 0;
                            var i = D(t) * te(ie(t));
                            return A(i, 256)
                        }, ToUint8Clamp: function (e) {
                            var t = this.ToNumber(e);
                            if (C(t) || t <= 0) return 0;
                            if (t >= 255) return 255;
                            var i = te(e);
                            return i + .5 < t ? i + 1 : t < i + .5 ? i : i % 2 != 0 ? i + 1 : i
                        }, ToString: function (e) {
                            if ("symbol" == typeof e) throw new l("Cannot convert a Symbol value to a string");
                            return f(e)
                        }, ToObject: function (e) {
                            return this.RequireObjectCoercible(e), p(e)
                        }, ToPropertyKey: function (e) {
                            var t = this.ToPrimitive(e, f);
                            return "symbol" == typeof t ? t : this.ToString(t)
                        }, ToLength: function (e) {
                            var t = this.ToInteger(e);
                            return t <= 0 ? 0 : t > S ? S : t
                        }, CanonicalNumericIndexString: function (e) {
                            if ("[object String]" !== Y(e)) throw new l("must be a string");
                            if ("-0" === e) return -0;
                            var t = this.ToNumber(e);
                            return this.SameValue(this.ToString(t), e) ? t : void 0
                        }, RequireObjectCoercible: pe.CheckObjectCoercible, IsArray: c.isArray || function (e) {
                            return "[object Array]" === Y(e)
                        }, IsConstructor: function (e) {
                            return "function" == typeof e && !!e.prototype
                        }, IsExtensible: T ? function (e) {
                            return !N(e) && se(e)
                        } : function (e) {
                            return !0
                        }, IsInteger: function (e) {
                            if ("number" != typeof e || C(e) || !b(e)) return !1;
                            var t = ie(e);
                            return te(t) === t
                        }, IsPropertyKey: function (e) {
                            return "string" == typeof e || "symbol" == typeof e
                        }, IsRegExp: function (e) {
                            if (!e || "object" != typeof e) return !1;
                            if (w) {
                                var t = e[m.match];
                                if (void 0 !== t) return pe.ToBoolean(t)
                            }
                            return ge(e)
                        }, SameValueZero: function (e, t) {
                            return e === t || C(e) && C(t)
                        }, GetV: function (e, t) {
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: IsPropertyKey(P) is not true");
                            var i = this.ToObject(e);
                            return i[t]
                        }, GetMethod: function (e, t) {
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: IsPropertyKey(P) is not true");
                            var i = this.GetV(e, t);
                            if (null != i) {
                                if (!this.IsCallable(i)) throw new l(t + "is not a function");
                                return i
                            }
                        }, Get: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: IsPropertyKey(P) is not true, got " + r(t));
                            return e[t]
                        }, Type: function (e) {
                            return "symbol" == typeof e ? "Symbol" : pe.Type(e)
                        }, SpeciesConstructor: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            var i = e.constructor;
                            if (void 0 === i) return t;
                            if ("Object" !== this.Type(i)) throw new l("O.constructor is not an Object");
                            var n = w && m.species ? i[m.species] : void 0;
                            if (null == n) return t;
                            if (this.IsConstructor(n)) return n;
                            throw new l("no constructor found")
                        }, FromPropertyDescriptor: function (e) {
                            if (void 0 === e) return e;
                            k(this, "Property Descriptor", "Desc", e);
                            var t = {};
                            return "[[Value]]" in e && (t.value = e["[[Value]]"]), "[[Writable]]" in e && (t.writable = e["[[Writable]]"]), "[[Get]]" in e && (t.get = e["[[Get]]"]), "[[Set]]" in e && (t.set = e["[[Set]]"]), "[[Enumerable]]" in e && (t.enumerable = e["[[Enumerable]]"]), "[[Configurable]]" in e && (t.configurable = e["[[Configurable]]"]), t
                        }, CompletePropertyDescriptor: function (e) {
                            return k(this, "Property Descriptor", "Desc", e), this.IsGenericDescriptor(e) || this.IsDataDescriptor(e) ? (n(e, "[[Value]]") || (e["[[Value]]"] = void 0), n(e, "[[Writable]]") || (e["[[Writable]]"] = !1)) : (n(e, "[[Get]]") || (e["[[Get]]"] = void 0), n(e, "[[Set]]") || (e["[[Set]]"] = void 0)), n(e, "[[Enumerable]]") || (e["[[Enumerable]]"] = !1), n(e, "[[Configurable]]") || (e["[[Configurable]]"] = !1), e
                        }, Set: function (e, t, i, n) {
                            if ("Object" !== this.Type(e)) throw new l("O must be an Object");
                            if (!this.IsPropertyKey(t)) throw new l("P must be a Property Key");
                            if ("Boolean" !== this.Type(n)) throw new l("Throw must be a Boolean");
                            if (n) return e[t] = i, !0;
                            try {
                                e[t] = i
                            } catch (e) {
                                return !1
                            }
                        }, HasOwnProperty: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("O must be an Object");
                            if (!this.IsPropertyKey(t)) throw new l("P must be a Property Key");
                            return n(e, t)
                        }, HasProperty: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("O must be an Object");
                            if (!this.IsPropertyKey(t)) throw new l("P must be a Property Key");
                            return t in e
                        }, IsConcatSpreadable: function (e) {
                            if ("Object" !== this.Type(e)) return !1;
                            if (w && "symbol" == typeof m.isConcatSpreadable) {
                                var t = this.Get(e, Symbol.isConcatSpreadable);
                                if (void 0 !== t) return this.ToBoolean(t)
                            }
                            return this.IsArray(e)
                        }, Invoke: function (e, t) {
                            if (!this.IsPropertyKey(t)) throw new l("P must be a Property Key");
                            var i = R(arguments, 2), n = this.GetV(e, t);
                            return this.Call(n, e, i)
                        }, GetIterator: function (e, t) {
                            var i = t;
                            if (arguments.length < 2) {
                                if (!w) throw new SyntaxError("GetIterator depends on native Symbol support when `method` is not passed");
                                i = this.GetMethod(e, m.iterator)
                            }
                            var n = this.Call(i, e);
                            if ("Object" !== this.Type(n)) throw new l("iterator must return an object");
                            return n
                        }, IteratorNext: function (e, t) {
                            var i = this.Invoke(e, "next", arguments.length < 2 ? [] : [t]);
                            if ("Object" !== this.Type(i)) throw new l("iterator next must return an object");
                            return i
                        }, IteratorComplete: function (e) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(iterResult) is not Object");
                            return this.ToBoolean(this.Get(e, "done"))
                        }, IteratorValue: function (e) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(iterResult) is not Object");
                            return this.Get(e, "value")
                        }, IteratorStep: function (e) {
                            var t = this.IteratorNext(e), i = this.IteratorComplete(t);
                            return !0 !== i && t
                        }, IteratorClose: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(iterator) is not Object");
                            if (!this.IsCallable(t)) throw new l("Assertion failed: completion is not a thunk for a Completion Record");
                            var i, n = t, o = this.GetMethod(e, "return");
                            if (void 0 === o) return n();
                            try {
                                var a = this.Call(o, e, [])
                            } catch (e) {
                                throw i = n(), n = null, e
                            }
                            if (i = n(), n = null, "Object" !== this.Type(a)) throw new l("iterator .return must return an object");
                            return i
                        }, CreateIterResultObject: function (e, t) {
                            if ("Boolean" !== this.Type(t)) throw new l("Assertion failed: Type(done) is not Boolean");
                            return {value: e, done: t}
                        }, RegExpExec: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("R must be an Object");
                            if ("String" !== this.Type(t)) throw new l("S must be a String");
                            var i = this.Get(e, "exec");
                            if (this.IsCallable(i)) {
                                var n = this.Call(i, e, [t]);
                                if (null === n || "Object" === this.Type(n)) return n;
                                throw new l('"exec" method must return `null` or an Object')
                            }
                            return G(e, t)
                        }, ArraySpeciesCreate: function (e, t) {
                            if (!this.IsInteger(t) || t < 0) throw new l("Assertion failed: length must be an integer >= 0");
                            var i, n = 0 === t ? 0 : t, o = this.IsArray(e);
                            if (o && (i = this.Get(e, "constructor"), "Object" === this.Type(i) && w && m.species && null === (i = this.Get(i, m.species)) && (i = void 0)), void 0 === i) return c(n);
                            if (!this.IsConstructor(i)) throw new l("C must be a constructor");
                            return new i(n)
                        }, CreateDataProperty: function (e, t, i) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: IsPropertyKey(P) is not true");
                            var n = oe(e, t), o = n || this.IsExtensible(e), a = n && (!n.writable || !n.configurable);
                            return !(a || !o) && ue(this, e, t, {
                                "[[Configurable]]": !0,
                                "[[Enumerable]]": !0,
                                "[[Value]]": i,
                                "[[Writable]]": !0
                            })
                        }, CreateDataPropertyOrThrow: function (e, t, i) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: IsPropertyKey(P) is not true");
                            var n = this.CreateDataProperty(e, t, i);
                            if (!n) throw new l("unable to create data property");
                            return n
                        }, ObjectCreate: function (e, t) {
                            if (null !== e && "Object" !== this.Type(e)) throw new l("Assertion failed: proto must be null or an object");
                            var i = arguments.length < 2 ? [] : t;
                            if (i.length > 0) throw new u("es-abstract does not yet support internal slots");
                            if (null === e && !ne) throw new u("native Object.create support is required to create null objects");
                            return ne(e)
                        }, AdvanceStringIndex: function (e, t, i) {
                            if ("String" !== this.Type(e)) throw new l("S must be a String");
                            if (!this.IsInteger(t) || t < 0 || t > S) throw new l("Assertion failed: length must be an integer >= 0 and <= 2**53");
                            if ("Boolean" !== this.Type(i)) throw new l("Assertion failed: unicode must be a Boolean");
                            if (!i) return t + 1;
                            var n = e.length;
                            if (t + 1 >= n) return t + 1;
                            var o = X(e, t);
                            if (o < 55296 || o > 56319) return t + 1;
                            var a = X(e, t + 1);
                            return a < 56320 || a > 57343 ? t + 1 : t + 2
                        }, CreateMethodProperty: function (e, t, i) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: IsPropertyKey(P) is not true");
                            var n = {"[[Configurable]]": !0, "[[Enumerable]]": !1, "[[Value]]": i, "[[Writable]]": !0};
                            return ue(this, e, t, n)
                        }, DefinePropertyOrThrow: function (e, t, i) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: IsPropertyKey(P) is not true");
                            var n = P(this, i) ? i : this.ToPropertyDescriptor(i);
                            if (!P(this, n)) throw new l("Assertion failed: Desc is not a valid Property Descriptor");
                            return ue(this, e, t, n)
                        }, DeletePropertyOrThrow: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: IsPropertyKey(P) is not true");
                            var i = delete e[t];
                            if (!i) throw new TypeError("Attempt to delete property failed.");
                            return i
                        }, EnumerableOwnNames: function (e) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            return a(e)
                        }, thisNumberValue: function (e) {
                            return "Number" === this.Type(e) ? e : J(e)
                        }, thisBooleanValue: function (e) {
                            return "Boolean" === this.Type(e) ? e : Z(e)
                        }, thisStringValue: function (e) {
                            return "String" === this.Type(e) ? e : Q(e)
                        }, thisTimeValue: function (e) {
                            return $(e)
                        }, SetIntegrityLevel: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if ("sealed" !== t && "frozen" !== t) throw new l('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
                            if (!T) throw new u("SetIntegrityLevel requires native `Object.preventExtensions` support");
                            var i = T(e);
                            if (!i) return !1;
                            if (!ae) throw new u("SetIntegrityLevel requires native `Object.getOwnPropertyNames` support");
                            var n = ae(e), o = this;
                            return "sealed" === t ? x(n, function (t) {
                                o.DefinePropertyOrThrow(e, t, {configurable: !1})
                            }) : "frozen" === t && x(n, function (t) {
                                var i, n = oe(e, t);
                                void 0 !== n && (i = o.IsAccessorDescriptor(o.ToPropertyDescriptor(n)) ? {configurable: !1} : {
                                    configurable: !1,
                                    writable: !1
                                }, o.DefinePropertyOrThrow(e, t, i))
                            }), !0
                        }, TestIntegrityLevel: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if ("sealed" !== t && "frozen" !== t) throw new l('Assertion failed: `level` must be `"sealed"` or `"frozen"`');
                            var i = this.IsExtensible(e);
                            if (i) return !1;
                            var n = ae(e), o = this;
                            return 0 === n.length || E(n, function (i) {
                                var n = oe(e, i);
                                if (void 0 !== n) {
                                    if (n.configurable) return !1;
                                    if ("frozen" === t && o.IsDataDescriptor(o.ToPropertyDescriptor(n)) && n.writable) return !1
                                }
                                return !0
                            })
                        }, OrdinaryHasInstance: function (e, t) {
                            if (!1 === this.IsCallable(e)) return !1;
                            if ("Object" !== this.Type(t)) return !1;
                            var i = this.Get(e, "prototype");
                            if ("Object" !== this.Type(i)) throw new l("OrdinaryHasInstance called on an object with an invalid prototype property.");
                            return t instanceof e
                        }, OrdinaryHasProperty: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: P must be a Property Key");
                            return t in e
                        }, InstanceofOperator: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            var i = w && m.hasInstance ? this.GetMethod(t, m.hasInstance) : void 0;
                            if (void 0 !== i) return this.ToBoolean(this.Call(i, t, [e]));
                            if (!this.IsCallable(t)) throw new l("`C` is not Callable");
                            return this.OrdinaryHasInstance(t, e)
                        }, IsPromise: function (e) {
                            if ("Object" !== this.Type(e)) return !1;
                            if (!y) return !1;
                            try {
                                L(e)
                            } catch (e) {
                                return !1
                            }
                            return !0
                        }, "Abstract Equality Comparison": function (e, t) {
                            var i = this.Type(e), n = this.Type(t);
                            return i === n ? e === t : null == e && null == t || ("Number" === i && "String" === n ? this["Abstract Equality Comparison"](e, this.ToNumber(t)) : "String" === i && "Number" === n ? this["Abstract Equality Comparison"](this.ToNumber(e), t) : "Boolean" === i ? this["Abstract Equality Comparison"](this.ToNumber(e), t) : "Boolean" === n ? this["Abstract Equality Comparison"](e, this.ToNumber(t)) : "String" !== i && "Number" !== i && "Symbol" !== i || "Object" !== n ? "Object" === i && ("String" === n || "Number" === n || "Symbol" === n) && this["Abstract Equality Comparison"](this.ToPrimitive(e), t) : this["Abstract Equality Comparison"](e, this.ToPrimitive(t)))
                        }, ValidateAndApplyPropertyDescriptor: function (e, t, i, n, o) {
                            var a = this.Type(e);
                            if ("Undefined" !== a && "Object" !== a) throw new l("Assertion failed: O must be undefined or an Object");
                            if ("Boolean" !== this.Type(i)) throw new l("Assertion failed: extensible must be a Boolean");
                            if (!P(this, n)) throw new l("Assertion failed: Desc must be a Property Descriptor");
                            if ("Undefined" !== this.Type(o) && !P(this, o)) throw new l("Assertion failed: current must be a Property Descriptor, or undefined");
                            if ("Undefined" !== a && !this.IsPropertyKey(t)) throw new l("Assertion failed: if O is not undefined, P must be a Property Key");
                            if ("Undefined" === this.Type(o)) {
                                if (!i) return !1;
                                if (this.IsGenericDescriptor(n) || this.IsDataDescriptor(n)) "Undefined" !== a && ue(this, e, t, {
                                    "[[Configurable]]": n["[[Configurable]]"],
                                    "[[Enumerable]]": n["[[Enumerable]]"],
                                    "[[Value]]": n["[[Value]]"],
                                    "[[Writable]]": n["[[Writable]]"]
                                }); else {
                                    if (!this.IsAccessorDescriptor(n)) throw new l("Assertion failed: Desc is not an accessor descriptor");
                                    if ("Undefined" !== a) return ue(this, e, t, n)
                                }
                                return !0
                            }
                            if (this.IsGenericDescriptor(n) && !("[[Configurable]]" in n) && !("[[Enumerable]]" in n)) return !0;
                            if (O(this, n, o)) return !0;
                            if (!o["[[Configurable]]"]) {
                                if (n["[[Configurable]]"]) return !1;
                                if ("[[Enumerable]]" in n && !n["[[Enumerable]]"] == !!o["[[Enumerable]]"]) return !1
                            }
                            if (this.IsGenericDescriptor(n)) ; else if (this.IsDataDescriptor(o) !== this.IsDataDescriptor(n)) {
                                if (!o["[[Configurable]]"]) return !1;
                                this.IsDataDescriptor(o) ? "Undefined" !== a && ue(this, e, t, {
                                    "[[Configurable]]": o["[[Configurable]]"],
                                    "[[Enumerable]]": o["[[Enumerable]]"],
                                    "[[Get]]": void 0
                                }) : "Undefined" !== a && ue(this, e, t, {
                                    "[[Configurable]]": o["[[Configurable]]"],
                                    "[[Enumerable]]": o["[[Enumerable]]"],
                                    "[[Value]]": void 0
                                })
                            } else if (this.IsDataDescriptor(o) && this.IsDataDescriptor(n)) {
                                if (!o["[[Configurable]]"] && !o["[[Writable]]"]) return !("[[Writable]]" in n && n["[[Writable]]"] || "[[Value]]" in n && !this.SameValue(n["[[Value]]"], o["[[Value]]"]))
                            } else {
                                if (!this.IsAccessorDescriptor(o) || !this.IsAccessorDescriptor(n)) throw new l("Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.");
                                if (!o["[[Configurable]]"]) return !("[[Set]]" in n && !this.SameValue(n["[[Set]]"], o["[[Set]]"]) || "[[Get]]" in n && !this.SameValue(n["[[Get]]"], o["[[Get]]"]))
                            }
                            return "Undefined" === a || ue(this, e, t, n)
                        }, OrdinaryDefineOwnProperty: function (e, t, i) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: O must be an Object");
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: P must be a Property Key");
                            if (!P(this, i)) throw new l("Assertion failed: Desc must be a Property Descriptor");
                            var n = oe(e, t), o = n && this.ToPropertyDescriptor(n), a = this.IsExtensible(e);
                            return this.ValidateAndApplyPropertyDescriptor(e, t, a, i, o)
                        }, OrdinaryGetOwnProperty: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: O must be an Object");
                            if (!this.IsPropertyKey(t)) throw new l("Assertion failed: P must be a Property Key");
                            if (n(e, t)) {
                                if (!oe) {
                                    var i = this.IsArray(e) && "length" === t, o = this.IsRegExp(e) && "lastIndex" === t;
                                    return {
                                        "[[Configurable]]": !(i || o),
                                        "[[Enumerable]]": q(e, t),
                                        "[[Value]]": e[t],
                                        "[[Writable]]": !0
                                    }
                                }
                                return this.ToPropertyDescriptor(oe(e, t))
                            }
                        }, ArrayCreate: function (e) {
                            if (!this.IsInteger(e) || e < 0) throw new l("Assertion failed: `length` must be an integer Number >= 0");
                            if (e > I) throw new d("length is greater than (2**32 - 1)");
                            var t = arguments.length > 1 ? arguments[1] : h, i = [];
                            if (t !== h) {
                                if (!de) throw new u("ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]");
                                de(i, t)
                            }
                            return 0 !== e && (i.length = e), i
                        }, ArraySetLength: function (e, t) {
                            if (!this.IsArray(e)) throw new l("Assertion failed: A must be an Array");
                            if (!P(this, t)) throw new l("Assertion failed: Desc must be a Property Descriptor");
                            if (!("[[Value]]" in t)) return this.OrdinaryDefineOwnProperty(e, "length", t);
                            var i = _({}, t), n = this.ToUint32(t["[[Value]]"]), o = this.ToNumber(t["[[Value]]"]);
                            if (n !== o) throw new d("Invalid array length");
                            i["[[Value]]"] = n;
                            var a = this.OrdinaryGetOwnProperty(e, "length");
                            if (!this.IsDataDescriptor(a)) throw new l("Assertion failed: an array had a non-data descriptor on `length`");
                            var r, s = a["[[Value]]"];
                            if (n >= s) return this.OrdinaryDefineOwnProperty(e, "length", i);
                            if (!a["[[Writable]]"]) return !1;
                            "[[Writable]]" in i && !i["[[Writable]]"] ? (r = !1, i["[[Writable]]"] = !0) : r = !0;
                            var u = this.OrdinaryDefineOwnProperty(e, "length", i);
                            if (!u) return !1;
                            for (; n < s;) {
                                s -= 1;
                                var c = delete e[this.ToString(s)];
                                if (!c && (i["[[Value]]"] = s + 1, !r)) return i["[[Writable]]"] = !1, this.OrdinaryDefineOwnProperty(e, "length", i), !1
                            }
                            return !!r || this.OrdinaryDefineOwnProperty(e, "length", {"[[Writable]]": !1})
                        }, CreateHTML: function (e, t, i, n) {
                            if ("String" !== this.Type(t) || "String" !== this.Type(i)) throw new l("Assertion failed: `tag` and `attribute` must be strings");
                            var o = this.RequireObjectCoercible(e), a = this.ToString(o), r = "<" + t;
                            if ("" !== i) {
                                var s = this.ToString(n), d = fe(s, /\x22/g, "&quot;");
                                r += " " + i + '="' + d + '"'
                            }
                            return r + ">" + a + "</" + t + ">"
                        }, GetOwnPropertyKeys: function (e, t) {
                            if ("Object" !== this.Type(e)) throw new l("Assertion failed: Type(O) is not Object");
                            if ("Symbol" === t) return w && re ? re(e) : [];
                            if ("String" === t) return ae ? ae(e) : a(e);
                            throw new l('Assertion failed: `Type` must be `"String"` or `"Symbol"`')
                        }, SymbolDescriptiveString: function (e) {
                            if ("Symbol" !== this.Type(e)) throw new l("Assertion failed: `sym` must be a Symbol");
                            return ee(e)
                        }, GetSubstitution: function (e, t, i, n, o) {
                            if ("String" !== this.Type(e)) throw new l("Assertion failed: `matched` must be a String");
                            var a = e.length;
                            if ("String" !== this.Type(t)) throw new l("Assertion failed: `str` must be a String");
                            var s = t.length;
                            if (!this.IsInteger(i) || i < 0 || i > s) throw new l("Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got " + r(i));
                            var d = this;
                            if (!this.IsArray(n) || !E(n, function (e, t, i) {
                                return "String" === d.Type(e) || !(t in i)
                            })) throw new l("Assertion failed: `captures` must be a List of Strings, got " + r(n));
                            if ("String" !== this.Type(o)) throw new l("Assertion failed: `replacement` must be a String");
                            for (var u = i + a, c = n.length, h = "", f = 0; f < o.length; f += 1) {
                                var p = o[f], g = f + 1 >= o.length, m = f + 2 >= o.length;
                                if ("$" !== p || g) h += o[f]; else {
                                    var v = o[f + 1];
                                    if ("$" === v) h += "$", f += 1; else if ("&" === v) h += e, f += 1; else if ("`" === v) h += 0 === i ? "" : B(t, 0, i - 1), f += 1; else if ("'" === v) h += u >= s ? "" : B(t, u), f += 1; else {
                                        var y = m ? null : o[f + 2];
                                        if (!K(v) || "0" === v || !m && K(y)) if (K(v) && (m || K(y))) {
                                            var T = v + y, w = M(T, 10) - 1;
                                            h += T <= c && "Undefined" === this.Type(n[w]) ? "" : n[w], f += 2
                                        } else h += "$"; else {
                                            var k = M(v, 10);
                                            h += k <= c && "Undefined" === this.Type(n[k - 1]) ? "" : n[k - 1], f += 1
                                        }
                                    }
                                }
                            }
                            return h
                        }
                    });
                delete me.CheckObjectCoercible, t.exports = me
            }, {
                "./GetIntrinsic": 191,
                "./es5": 194,
                "./helpers/assertRecord": 196,
                "./helpers/assign": 197,
                "./helpers/callBind": 198,
                "./helpers/every": 199,
                "./helpers/forEach": 200,
                "./helpers/isFinite": 201,
                "./helpers/isNaN": 202,
                "./helpers/isPrimitive": 203,
                "./helpers/isPropertyDescriptor": 204,
                "./helpers/isSamePropertyDescriptor": 205,
                "./helpers/mod": 206,
                "./helpers/sign": 207,
                "es-to-primitive/es6": 213,
                has: 222,
                "has-symbols": 220,
                "is-regex": 231,
                "object-inspect": 239,
                "object-keys": 209
            }],
            193: [function (e, t, i) {
                "use strict";
                var n = e("./GetIntrinsic"), o = n("%Array%"), a = e("has-symbols")(), r = e("./es2015"),
                    s = e("./helpers/assign"), l = e("./helpers/callBind"), d = l(o.prototype.push),
                    u = l(o.prototype.slice), c = l(o.prototype.join), h = s(s({}, r), {
                        SameValueNonNumber: function (e, t) {
                            if ("number" == typeof e || typeof e != typeof t) throw new TypeError("SameValueNonNumber requires two non-number values of the same type.");
                            return this.SameValue(e, t)
                        }, IterableToArrayLike: function (e) {
                            var t;
                            if (a) t = this.GetMethod(e, Symbol.iterator); else if (this.IsArray(e)) t = function () {
                                var e = -1, t = this;
                                return {
                                    next: function () {
                                        return {done: (e += 1) >= t.length, value: t[e]}
                                    }
                                }
                            }; else if ("String" === this.Type(e)) {
                                var i = this;
                                t = function () {
                                    var t = 0;
                                    return {
                                        next: function () {
                                            var n = i.AdvanceStringIndex(e, t, !0), o = c(u(e, t, n), "");
                                            return t = n, {done: n > e.length, value: o}
                                        }
                                    }
                                }
                            }
                            if (void 0 !== t) {
                                for (var n = this.GetIterator(e, t), o = [], r = !0; r;) if (r = this.IteratorStep(n)) {
                                    var s = this.IteratorValue(r);
                                    d(o, s)
                                }
                                return o
                            }
                            return this.ToObject(e)
                        }
                    });
                t.exports = h
            }, {
                "./GetIntrinsic": 191,
                "./es2015": 192,
                "./helpers/assign": 197,
                "./helpers/callBind": 198,
                "has-symbols": 220
            }],
            194: [function (e, t, i) {
                "use strict";
                var n = e("./GetIntrinsic"), o = n("%Object%"), a = n("%TypeError%"), r = n("%String%"),
                    s = n("%Number%"), l = e("./helpers/assertRecord"), d = e("./helpers/isPropertyDescriptor"),
                    u = e("./helpers/isNaN"), c = e("./helpers/isFinite"), h = e("./helpers/sign"),
                    f = e("./helpers/mod"), p = e("is-callable"), g = e("es-to-primitive/es5"), m = e("has"),
                    v = e("./helpers/callBind"), y = v(r.prototype.slice), T = function (e, t) {
                        return e === t || !(e.length > t.length) && y(t, 0, e.length) === e
                    }, w = {
                        ToPrimitive: g, ToBoolean: function (e) {
                            return !!e
                        }, ToNumber: function (e) {
                            return +e
                        }, ToInteger: function (e) {
                            var t = this.ToNumber(e);
                            return u(t) ? 0 : 0 !== t && c(t) ? h(t) * Math.floor(Math.abs(t)) : t
                        }, ToInt32: function (e) {
                            return this.ToNumber(e) >> 0
                        }, ToUint32: function (e) {
                            return this.ToNumber(e) >>> 0
                        }, ToUint16: function (e) {
                            var t = this.ToNumber(e);
                            if (u(t) || 0 === t || !c(t)) return 0;
                            var i = h(t) * Math.floor(Math.abs(t));
                            return f(i, 65536)
                        }, ToString: function (e) {
                            return r(e)
                        }, ToObject: function (e) {
                            return this.CheckObjectCoercible(e), o(e)
                        }, CheckObjectCoercible: function (e, t) {
                            if (null == e) throw new a(t || "Cannot call method on " + e);
                            return e
                        }, IsCallable: p, SameValue: function (e, t) {
                            return e === t ? 0 !== e || 1 / e == 1 / t : u(e) && u(t)
                        }, Type: function (e) {
                            return null === e ? "Null" : void 0 === e ? "Undefined" : "function" == typeof e || "object" == typeof e ? "Object" : "number" == typeof e ? "Number" : "boolean" == typeof e ? "Boolean" : "string" == typeof e ? "String" : void 0
                        }, IsPropertyDescriptor: function (e) {
                            return d(this, e)
                        }, IsAccessorDescriptor: function (e) {
                            return void 0 !== e && (l(this, "Property Descriptor", "Desc", e), !(!m(e, "[[Get]]") && !m(e, "[[Set]]")))
                        }, IsDataDescriptor: function (e) {
                            return void 0 !== e && (l(this, "Property Descriptor", "Desc", e), !(!m(e, "[[Value]]") && !m(e, "[[Writable]]")))
                        }, IsGenericDescriptor: function (e) {
                            return void 0 !== e && (l(this, "Property Descriptor", "Desc", e), !this.IsAccessorDescriptor(e) && !this.IsDataDescriptor(e))
                        }, FromPropertyDescriptor: function (e) {
                            if (void 0 === e) return e;
                            if (l(this, "Property Descriptor", "Desc", e), this.IsDataDescriptor(e)) return {
                                value: e["[[Value]]"],
                                writable: !!e["[[Writable]]"],
                                enumerable: !!e["[[Enumerable]]"],
                                configurable: !!e["[[Configurable]]"]
                            };
                            if (this.IsAccessorDescriptor(e)) return {
                                get: e["[[Get]]"],
                                set: e["[[Set]]"],
                                enumerable: !!e["[[Enumerable]]"],
                                configurable: !!e["[[Configurable]]"]
                            };
                            throw new a("FromPropertyDescriptor must be called with a fully populated Property Descriptor")
                        }, ToPropertyDescriptor: function (e) {
                            if ("Object" !== this.Type(e)) throw new a("ToPropertyDescriptor requires an object");
                            var t = {};
                            if (m(e, "enumerable") && (t["[[Enumerable]]"] = this.ToBoolean(e.enumerable)), m(e, "configurable") && (t["[[Configurable]]"] = this.ToBoolean(e.configurable)), m(e, "value") && (t["[[Value]]"] = e.value), m(e, "writable") && (t["[[Writable]]"] = this.ToBoolean(e.writable)), m(e, "get")) {
                                var i = e.get;
                                if (void 0 !== i && !this.IsCallable(i)) throw new TypeError("getter must be a function");
                                t["[[Get]]"] = i
                            }
                            if (m(e, "set")) {
                                var n = e.set;
                                if (void 0 !== n && !this.IsCallable(n)) throw new a("setter must be a function");
                                t["[[Set]]"] = n
                            }
                            if ((m(t, "[[Get]]") || m(t, "[[Set]]")) && (m(t, "[[Value]]") || m(t, "[[Writable]]"))) throw new a("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");
                            return t
                        }, "Abstract Equality Comparison": function (e, t) {
                            var i = this.Type(e), n = this.Type(t);
                            return i === n ? e === t : null == e && null == t || ("Number" === i && "String" === n ? this["Abstract Equality Comparison"](e, this.ToNumber(t)) : "String" === i && "Number" === n ? this["Abstract Equality Comparison"](this.ToNumber(e), t) : "Boolean" === i ? this["Abstract Equality Comparison"](this.ToNumber(e), t) : "Boolean" === n ? this["Abstract Equality Comparison"](e, this.ToNumber(t)) : "String" !== i && "Number" !== i || "Object" !== n ? "Object" === i && ("String" === n || "Number" === n) && this["Abstract Equality Comparison"](this.ToPrimitive(e), t) : this["Abstract Equality Comparison"](e, this.ToPrimitive(t)))
                        }, "Strict Equality Comparison": function (e, t) {
                            var i = this.Type(e), n = this.Type(t);
                            return i === n && ("Undefined" === i || "Null" === i || e === t)
                        }, "Abstract Relational Comparison": function (e, t, i) {
                            if ("Boolean" !== this.Type(i)) throw new a("Assertion failed: LeftFirst argument must be a Boolean");
                            var n, o;
                            i ? (n = this.ToPrimitive(e, s), o = this.ToPrimitive(t, s)) : (o = this.ToPrimitive(t, s), n = this.ToPrimitive(e, s));
                            var r = "String" === this.Type(n) && "String" === this.Type(o);
                            if (!r) {
                                var l = this.ToNumber(n), d = this.ToNumber(o);
                                if (u(l) || u(d)) return;
                                return !(c(l) && c(d) && l === d || 0 === l && 0 === d || l === 1 / 0 || !(d === 1 / 0 || d !== -1 / 0 && (l === -1 / 0 || l < d)))
                            }
                            return !T(o, n) && (!!T(n, o) || n < o)
                        }
                    };
                t.exports = w
            }, {
                "./GetIntrinsic": 191,
                "./helpers/assertRecord": 196,
                "./helpers/callBind": 198,
                "./helpers/isFinite": 201,
                "./helpers/isNaN": 202,
                "./helpers/isPropertyDescriptor": 204,
                "./helpers/mod": 206,
                "./helpers/sign": 207,
                "es-to-primitive/es5": 212,
                has: 222,
                "is-callable": 228
            }],
            195: [function (e, t, i) {
                "use strict";
                t.exports = e("./es2016")
            }, {"./es2016": 193}],
            196: [function (e, t, i) {
                "use strict";
                var n = e("../GetIntrinsic"), o = n("%TypeError%"), a = n("%SyntaxError%"), r = e("has"), s = {
                    "Property Descriptor": function (e, t) {
                        if ("Object" !== e.Type(t)) return !1;
                        var i = {
                            "[[Configurable]]": !0,
                            "[[Enumerable]]": !0,
                            "[[Get]]": !0,
                            "[[Set]]": !0,
                            "[[Value]]": !0,
                            "[[Writable]]": !0
                        };
                        for (var n in t) if (r(t, n) && !i[n]) return !1;
                        var a = r(t, "[[Value]]"), s = r(t, "[[Get]]") || r(t, "[[Set]]");
                        if (a && s) throw new o("Property Descriptors may not be both accessor and data descriptors");
                        return !0
                    }
                };
                t.exports = function (e, t, i, n) {
                    var r = s[t];
                    if ("function" != typeof r) throw new a("unknown record type: " + t);
                    if (!r(e, n)) throw new o(i + " must be a " + t)
                }
            }, {"../GetIntrinsic": 191, has: 222}],
            197: [function (e, t, i) {
                "use strict";
                var n = e("../GetIntrinsic"), o = e("has"), a = n("%Object%").assign;
                t.exports = function (e, t) {
                    if (a) return a(e, t);
                    for (var i in t) o(t, i) && (e[i] = t[i]);
                    return e
                }
            }, {"../GetIntrinsic": 191, has: 222}],
            198: [function (e, t, i) {
                "use strict";
                var n = e("function-bind"), o = e("../GetIntrinsic"), a = o("%Function%"), r = a.apply, s = a.call;
                t.exports = function () {
                    return n.apply(s, arguments)
                }, t.exports.apply = function () {
                    return n.apply(r, arguments)
                }
            }, {"../GetIntrinsic": 191, "function-bind": 219}],
            199: [function (e, t, i) {
                "use strict";
                t.exports = function (e, t) {
                    for (var i = 0; i < e.length; i += 1) if (!t(e[i], i, e)) return !1;
                    return !0
                }
            }, {}],
            200: [function (e, t, i) {
                "use strict";
                t.exports = function (e, t) {
                    for (var i = 0; i < e.length; i += 1) t(e[i], i, e)
                }
            }, {}],
            201: [function (e, t, i) {
                "use strict";
                var n = Number.isNaN || function (e) {
                    return e != e
                };
                t.exports = Number.isFinite || function (e) {
                    return "number" == typeof e && !n(e) && e !== 1 / 0 && e !== -1 / 0
                }
            }, {}],
            202: [function (e, t, i) {
                "use strict";
                t.exports = Number.isNaN || function (e) {
                    return e != e
                }
            }, {}],
            203: [function (e, t, i) {
                "use strict";
                t.exports = function (e) {
                    return null === e || "function" != typeof e && "object" != typeof e
                }
            }, {}],
            204: [function (e, t, i) {
                "use strict";
                var n = e("../GetIntrinsic"), o = e("has"), a = n("%TypeError%");
                t.exports = function (e, t) {
                    if ("Object" !== e.Type(t)) return !1;
                    var i = {
                        "[[Configurable]]": !0,
                        "[[Enumerable]]": !0,
                        "[[Get]]": !0,
                        "[[Set]]": !0,
                        "[[Value]]": !0,
                        "[[Writable]]": !0
                    };
                    for (var n in t) if (o(t, n) && !i[n]) return !1;
                    if (e.IsDataDescriptor(t) && e.IsAccessorDescriptor(t)) throw new a("Property Descriptors may not be both accessor and data descriptors");
                    return !0
                }
            }, {"../GetIntrinsic": 191, has: 222}],
            205: [function (e, t, i) {
                "use strict";
                var n = e("./every");
                t.exports = function (e, t, i) {
                    return n(["[[Configurable]]", "[[Enumerable]]", "[[Get]]", "[[Set]]", "[[Value]]", "[[Writable]]"], function (n) {
                        return n in t == n in i && e.SameValue(t[n], i[n])
                    })
                }
            }, {"./every": 199}],
            206: [function (e, t, i) {
                "use strict";
                t.exports = function (e, t) {
                    var i = e % t;
                    return Math.floor(i >= 0 ? i : i + t)
                }
            }, {}],
            207: [function (e, t, i) {
                "use strict";
                t.exports = function (e) {
                    return e >= 0 ? 1 : -1
                }
            }, {}],
            208: [function (e, t, i) {
                "use strict";
                var n;
                if (!Object.keys) {
                    var o = Object.prototype.hasOwnProperty, a = Object.prototype.toString, r = e("./isArguments"),
                        s = Object.prototype.propertyIsEnumerable, l = !s.call({toString: null}, "toString"),
                        d = s.call(function () {
                        }, "prototype"),
                        u = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"],
                        c = function (e) {
                            var t = e.constructor;
                            return t && t.prototype === e
                        }, h = {
                            $applicationCache: !0,
                            $console: !0,
                            $external: !0,
                            $frame: !0,
                            $frameElement: !0,
                            $frames: !0,
                            $innerHeight: !0,
                            $innerWidth: !0,
                            $onmozfullscreenchange: !0,
                            $onmozfullscreenerror: !0,
                            $outerHeight: !0,
                            $outerWidth: !0,
                            $pageXOffset: !0,
                            $pageYOffset: !0,
                            $parent: !0,
                            $scrollLeft: !0,
                            $scrollTop: !0,
                            $scrollX: !0,
                            $scrollY: !0,
                            $self: !0,
                            $webkitIndexedDB: !0,
                            $webkitStorageInfo: !0,
                            $window: !0
                        }, f = function () {
                            if ("undefined" == typeof window) return !1;
                            for (var e in window) try {
                                if (!h["$" + e] && o.call(window, e) && null !== window[e] && "object" == typeof window[e]) try {
                                    c(window[e])
                                } catch (e) {
                                    return !0
                                }
                            } catch (e) {
                                return !0
                            }
                            return !1
                        }();
                    n = function (e) {
                        var t = null !== e && "object" == typeof e, i = "[object Function]" === a.call(e), n = r(e),
                            s = t && "[object String]" === a.call(e), h = [];
                        if (!t && !i && !n) throw new TypeError("Object.keys called on a non-object");
                        var p = d && i;
                        if (s && e.length > 0 && !o.call(e, 0)) for (var g = 0; g < e.length; ++g) h.push(String(g));
                        if (n && e.length > 0) for (var m = 0; m < e.length; ++m) h.push(String(m)); else for (var v in e) p && "prototype" === v || !o.call(e, v) || h.push(String(v));
                        if (l) for (var y = function (e) {
                            if ("undefined" == typeof window || !f) return c(e);
                            try {
                                return c(e)
                            } catch (e) {
                                return !1
                            }
                        }(e), T = 0; T < u.length; ++T) y && "constructor" === u[T] || !o.call(e, u[T]) || h.push(u[T]);
                        return h
                    }
                }
                t.exports = n
            }, {"./isArguments": 210}],
            209: [function (e, t, i) {
                "use strict";
                var n = Array.prototype.slice, o = e("./isArguments"), a = Object.keys, r = a ? function (e) {
                    return a(e)
                } : e("./implementation"), s = Object.keys;
                r.shim = function () {
                    if (Object.keys) {
                        var e = function () {
                            var e = Object.keys(arguments);
                            return e && e.length === arguments.length
                        }(1, 2);
                        e || (Object.keys = function (e) {
                            return o(e) ? s(n.call(e)) : s(e)
                        })
                    } else Object.keys = r;
                    return Object.keys || r
                }, t.exports = r
            }, {"./implementation": 208, "./isArguments": 210}],
            210: [function (e, t, i) {
                "use strict";
                var n = Object.prototype.toString;
                t.exports = function (e) {
                    var t = n.call(e), i = "[object Arguments]" === t;
                    return i || (i = "[object Array]" !== t && null !== e && "object" == typeof e && "number" == typeof e.length && e.length >= 0 && "[object Function]" === n.call(e.callee)), i
                }
            }, {}],
            211: [function (e, t, i) {
                "use strict";
                var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator,
                    o = e("./helpers/isPrimitive"), a = e("is-callable"), r = e("is-date-object"), s = e("is-symbol");
                t.exports = function (e) {
                    if (o(e)) return e;
                    var t, i = "default";
                    if (arguments.length > 1 && (arguments[1] === String ? i = "string" : arguments[1] === Number && (i = "number")), n && (Symbol.toPrimitive ? t = function (e, t) {
                        var i = e[t];
                        if (null !== i && void 0 !== i) {
                            if (!a(i)) throw new TypeError(i + " returned for property " + t + " of object " + e + " is not a function");
                            return i
                        }
                    }(e, Symbol.toPrimitive) : s(e) && (t = Symbol.prototype.valueOf)), void 0 !== t) {
                        var l = t.call(e, i);
                        if (o(l)) return l;
                        throw new TypeError("unable to convert exotic object to primitive")
                    }
                    return "default" === i && (r(e) || s(e)) && (i = "string"), function (e, t) {
                        if (void 0 === e || null === e) throw new TypeError("Cannot call method on " + e);
                        if ("string" != typeof t || "number" !== t && "string" !== t) throw new TypeError('hint must be "string" or "number"');
                        var i, n, r, s = "string" === t ? ["toString", "valueOf"] : ["valueOf", "toString"];
                        for (r = 0; r < s.length; ++r) if (i = e[s[r]], a(i) && (n = i.call(e), o(n))) return n;
                        throw new TypeError("No default value")
                    }(e, "default" === i ? "number" : i)
                }
            }, {"./helpers/isPrimitive": 214, "is-callable": 228, "is-date-object": 230, "is-symbol": 232}],
            212: [function (e, t, i) {
                "use strict";
                var n = Object.prototype.toString, o = e("./helpers/isPrimitive"), a = e("is-callable"), r = {
                    "[[DefaultValue]]": function (e) {
                        var t;
                        if ((t = arguments.length > 1 ? arguments[1] : "[object Date]" === n.call(e) ? String : Number) === String || t === Number) {
                            var i, r, s = t === String ? ["toString", "valueOf"] : ["valueOf", "toString"];
                            for (r = 0; r < s.length; ++r) if (a(e[s[r]]) && (i = e[s[r]](), o(i))) return i;
                            throw new TypeError("No default value")
                        }
                        throw new TypeError("invalid [[DefaultValue]] hint supplied")
                    }
                };
                t.exports = function (e) {
                    return o(e) ? e : arguments.length > 1 ? r["[[DefaultValue]]"](e, arguments[1]) : r["[[DefaultValue]]"](e)
                }
            }, {"./helpers/isPrimitive": 214, "is-callable": 228}],
            213: [function (e, t, i) {
                "use strict";
                t.exports = e("./es2015")
            }, {"./es2015": 211}],
            214: [function (e, t, i) {
                t.exports = function (e) {
                    return null === e || "function" != typeof e && "object" != typeof e
                }
            }, {}],
            215: [function (e, t, i) {
                /*!
 * escape-html
 * Copyright(c) 2012-2013 TJ Holowaychuk
 * Copyright(c) 2015 Andreas Lubbe
 * Copyright(c) 2015 Tiancheng "Timothy" Gu
 * MIT Licensed
 */
                "use strict";
                var n = /["'&<>]/;
                t.exports = function (e) {
                    var t, i = "" + e, o = n.exec(i);
                    if (!o) return i;
                    var a = "", r = 0, s = 0;
                    for (r = o.index; r < i.length; r++) {
                        switch (i.charCodeAt(r)) {
                            case 34:
                                t = "&quot;";
                                break;
                            case 38:
                                t = "&amp;";
                                break;
                            case 39:
                                t = "&#39;";
                                break;
                            case 60:
                                t = "&lt;";
                                break;
                            case 62:
                                t = "&gt;";
                                break;
                            default:
                                continue
                        }
                        s !== r && (a += i.substring(s, r)), s = r + 1, a += t
                    }
                    return s !== r ? a + i.substring(s, r) : a
                }
            }, {}],
            216: [function (e, t, i) {
                function n() {
                    this._events = this._events || {}, this._maxListeners = this._maxListeners || void 0
                }

                function o(e) {
                    return "function" == typeof e
                }

                function a(e) {
                    return "object" == typeof e && null !== e
                }

                function r(e) {
                    return void 0 === e
                }

                t.exports = n, n.EventEmitter = n, n.prototype._events = void 0, n.prototype._maxListeners = void 0, n.defaultMaxListeners = 10, n.prototype.setMaxListeners = function (e) {
                    if ("number" != typeof e || e < 0 || isNaN(e)) throw TypeError("n must be a positive number");
                    return this._maxListeners = e, this
                }, n.prototype.emit = function (e) {
                    var t, i, n, s, l, d;
                    if (this._events || (this._events = {}), "error" === e && (!this._events.error || a(this._events.error) && !this._events.error.length)) {
                        if ((t = arguments[1]) instanceof Error) throw t;
                        var u = new Error('Uncaught, unspecified "error" event. (' + t + ")");
                        throw u.context = t, u
                    }
                    if (r(i = this._events[e])) return !1;
                    if (o(i)) switch (arguments.length) {
                        case 1:
                            i.call(this);
                            break;
                        case 2:
                            i.call(this, arguments[1]);
                            break;
                        case 3:
                            i.call(this, arguments[1], arguments[2]);
                            break;
                        default:
                            s = Array.prototype.slice.call(arguments, 1), i.apply(this, s)
                    } else if (a(i)) for (s = Array.prototype.slice.call(arguments, 1), d = i.slice(), n = d.length, l = 0; l < n; l++) d[l].apply(this, s);
                    return !0
                }, n.prototype.addListener = function (e, t) {
                    var i;
                    if (!o(t)) throw TypeError("listener must be a function");
                    return this._events || (this._events = {}), this._events.newListener && this.emit("newListener", e, o(t.listener) ? t.listener : t), this._events[e] ? a(this._events[e]) ? this._events[e].push(t) : this._events[e] = [this._events[e], t] : this._events[e] = t, a(this._events[e]) && !this._events[e].warned && (i = r(this._maxListeners) ? n.defaultMaxListeners : this._maxListeners) && i > 0 && this._events[e].length > i && (this._events[e].warned = !0, console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", this._events[e].length), "function" == typeof console.trace && console.trace()), this
                }, n.prototype.on = n.prototype.addListener, n.prototype.once = function (e, t) {
                    if (!o(t)) throw TypeError("listener must be a function");
                    var i = !1;

                    function n() {
                        this.removeListener(e, n), i || (i = !0, t.apply(this, arguments))
                    }

                    return n.listener = t, this.on(e, n), this
                }, n.prototype.removeListener = function (e, t) {
                    var i, n, r, s;
                    if (!o(t)) throw TypeError("listener must be a function");
                    if (!this._events || !this._events[e]) return this;
                    if (i = this._events[e], r = i.length, n = -1, i === t || o(i.listener) && i.listener === t) delete this._events[e], this._events.removeListener && this.emit("removeListener", e, t); else if (a(i)) {
                        for (s = r; s-- > 0;) if (i[s] === t || i[s].listener && i[s].listener === t) {
                            n = s;
                            break
                        }
                        if (n < 0) return this;
                        1 === i.length ? (i.length = 0, delete this._events[e]) : i.splice(n, 1), this._events.removeListener && this.emit("removeListener", e, t)
                    }
                    return this
                }, n.prototype.removeAllListeners = function (e) {
                    var t, i;
                    if (!this._events) return this;
                    if (!this._events.removeListener) return 0 === arguments.length ? this._events = {} : this._events[e] && delete this._events[e], this;
                    if (0 === arguments.length) {
                        for (t in this._events) "removeListener" !== t && this.removeAllListeners(t);
                        return this.removeAllListeners("removeListener"), this._events = {}, this
                    }
                    if (o(i = this._events[e])) this.removeListener(e, i); else if (i) for (; i.length;) this.removeListener(e, i[i.length - 1]);
                    return delete this._events[e], this
                }, n.prototype.listeners = function (e) {
                    return this._events && this._events[e] ? o(this._events[e]) ? [this._events[e]] : this._events[e].slice() : []
                }, n.prototype.listenerCount = function (e) {
                    if (this._events) {
                        var t = this._events[e];
                        if (o(t)) return 1;
                        if (t) return t.length
                    }
                    return 0
                }, n.listenerCount = function (e, t) {
                    return e.listenerCount(t)
                }
            }, {}],
            217: [function (e, t, i) {
                var n = Object.prototype.hasOwnProperty, o = Object.prototype.toString;
                t.exports = function (e, t, i) {
                    if ("[object Function]" !== o.call(t)) throw new TypeError("iterator must be a function");
                    var a = e.length;
                    if (a === +a) for (var r = 0; r < a; r++) t.call(i, e[r], r, e); else for (var s in e) n.call(e, s) && t.call(i, e[s], s, e)
                }
            }, {}],
            218: [function (e, t, i) {
                "use strict";
                var n = Array.prototype.slice, o = Object.prototype.toString;
                t.exports = function (e) {
                    var t = this;
                    if ("function" != typeof t || "[object Function]" !== o.call(t)) throw new TypeError("Function.prototype.bind called on incompatible " + t);
                    for (var i, a = n.call(arguments, 1), r = Math.max(0, t.length - a.length), s = [], l = 0; l < r; l++) s.push("$" + l);
                    if (i = Function("binder", "return function (" + s.join(",") + "){ return binder.apply(this,arguments); }")(function () {
                        if (this instanceof i) {
                            var o = t.apply(this, a.concat(n.call(arguments)));
                            return Object(o) === o ? o : this
                        }
                        return t.apply(e, a.concat(n.call(arguments)))
                    }), t.prototype) {
                        var d = function () {
                        };
                        d.prototype = t.prototype, i.prototype = new d, d.prototype = null
                    }
                    return i
                }
            }, {}],
            219: [function (e, t, i) {
                "use strict";
                var n = e("./implementation");
                t.exports = Function.prototype.bind || n
            }, {"./implementation": 218}],
            220: [function (e, t, i) {
                (function (i) {
                    "use strict";
                    var n = i.Symbol, o = e("./shams");
                    t.exports = function () {
                        return "function" == typeof n && "function" == typeof Symbol && "symbol" == typeof n("foo") && "symbol" == typeof Symbol("bar") && o()
                    }
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {"./shams": 221}],
            221: [function (e, t, i) {
                "use strict";
                t.exports = function () {
                    if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return !1;
                    if ("symbol" == typeof Symbol.iterator) return !0;
                    var e = {}, t = Symbol("test"), i = Object(t);
                    if ("string" == typeof t) return !1;
                    if ("[object Symbol]" !== Object.prototype.toString.call(t)) return !1;
                    if ("[object Symbol]" !== Object.prototype.toString.call(i)) return !1;
                    for (t in e[t] = 42, e) return !1;
                    if ("function" == typeof Object.keys && 0 !== Object.keys(e).length) return !1;
                    if ("function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(e).length) return !1;
                    var n = Object.getOwnPropertySymbols(e);
                    if (1 !== n.length || n[0] !== t) return !1;
                    if (!Object.prototype.propertyIsEnumerable.call(e, t)) return !1;
                    if ("function" == typeof Object.getOwnPropertyDescriptor) {
                        var o = Object.getOwnPropertyDescriptor(e, t);
                        if (42 !== o.value || !0 !== o.enumerable) return !1
                    }
                    return !0
                }
            }, {}],
            222: [function (e, t, i) {
                "use strict";
                var n = e("function-bind");
                t.exports = n.call(Function.call, Object.prototype.hasOwnProperty)
            }, {"function-bind": 219}],
            223: [function (e, t, i) {
                var n = e("http"), o = t.exports;
                for (var a in n) n.hasOwnProperty(a) && (o[a] = n[a]);
                o.request = function (e, t) {
                    return e || (e = {}), e.scheme = "https", e.protocol = "https:", n.request.call(this, e, t)
                }
            }, {http: 272}],
            224: [function (e, t, i) {
                /*!
 * humanize-ms - index.js
 * Copyright(c) 2014 dead_horse <dead_horse@qq.com>
 * MIT Licensed
 */
                "use strict";
                var n = e("util"), o = e("ms");
                t.exports = function (e) {
                    if ("number" == typeof e) return e;
                    var t = o(e);
                    if (void 0 === t) {
                        var i = new Error(n.format("humanize-ms(%j) result undefined", e));
                        console.warn(i.stack)
                    }
                    return t
                }
            }, {ms: 238, util: 287}],
            225: [function (e, t, i) {
                i.read = function (e, t, i, n, o) {
                    var a, r, s = 8 * o - n - 1, l = (1 << s) - 1, d = l >> 1, u = -7, c = i ? o - 1 : 0,
                        h = i ? -1 : 1, f = e[t + c];
                    for (c += h, a = f & (1 << -u) - 1, f >>= -u, u += s; u > 0; a = 256 * a + e[t + c], c += h, u -= 8) ;
                    for (r = a & (1 << -u) - 1, a >>= -u, u += n; u > 0; r = 256 * r + e[t + c], c += h, u -= 8) ;
                    if (0 === a) a = 1 - d; else {
                        if (a === l) return r ? NaN : 1 / 0 * (f ? -1 : 1);
                        r += Math.pow(2, n), a -= d
                    }
                    return (f ? -1 : 1) * r * Math.pow(2, a - n)
                }, i.write = function (e, t, i, n, o, a) {
                    var r, s, l, d = 8 * a - o - 1, u = (1 << d) - 1, c = u >> 1,
                        h = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, f = n ? 0 : a - 1, p = n ? 1 : -1,
                        g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
                    for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (s = isNaN(t) ? 1 : 0, r = u) : (r = Math.floor(Math.log(t) / Math.LN2), t * (l = Math.pow(2, -r)) < 1 && (r--, l *= 2), (t += r + c >= 1 ? h / l : h * Math.pow(2, 1 - c)) * l >= 2 && (r++, l /= 2), r + c >= u ? (s = 0, r = u) : r + c >= 1 ? (s = (t * l - 1) * Math.pow(2, o), r += c) : (s = t * Math.pow(2, c - 1) * Math.pow(2, o), r = 0)); o >= 8; e[i + f] = 255 & s, f += p, s /= 256, o -= 8) ;
                    for (r = r << o | s, d += o; d > 0; e[i + f] = 255 & r, f += p, r /= 256, d -= 8) ;
                    e[i + f - p] |= 128 * g
                }
            }, {}],
            226: [function (e, t, i) {
                "function" == typeof Object.create ? t.exports = function (e, t) {
                    e.super_ = t, e.prototype = Object.create(t.prototype, {
                        constructor: {
                            value: e,
                            enumerable: !1,
                            writable: !0,
                            configurable: !0
                        }
                    })
                } : t.exports = function (e, t) {
                    e.super_ = t;
                    var i = function () {
                    };
                    i.prototype = t.prototype, e.prototype = new i, e.prototype.constructor = e
                }
            }, {}],
            227: [function (e, t, i) {
                function n(e) {
                    return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
                }

                /*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
                t.exports = function (e) {
                    return null != e && (n(e) || function (e) {
                        return "function" == typeof e.readFloatLE && "function" == typeof e.slice && n(e.slice(0, 0))
                    }(e) || !!e._isBuffer)
                }
            }, {}],
            228: [function (e, t, i) {
                "use strict";
                var n = Function.prototype.toString, o = /^\s*class\b/, a = function (e) {
                        try {
                            var t = n.call(e);
                            return o.test(t)
                        } catch (e) {
                            return !1
                        }
                    }, r = Object.prototype.toString,
                    s = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
                t.exports = function (e) {
                    if (!e) return !1;
                    if ("function" != typeof e && "object" != typeof e) return !1;
                    if ("function" == typeof e && !e.prototype) return !0;
                    if (s) return function (e) {
                        try {
                            return !a(e) && (n.call(e), !0)
                        } catch (e) {
                            return !1
                        }
                    }(e);
                    if (a(e)) return !1;
                    var t = r.call(e);
                    return "[object Function]" === t || "[object GeneratorFunction]" === t
                }
            }, {}],
            229: [function (e, t, i) {
                !function (e) {
                    var n = Function.prototype.toString;

                    function o(e) {
                        return "function" == typeof e && (/^class(?:\s|{)/.test(n.call(e)) || /^.*classCallCheck\(/.test(function (e) {
                            return n.call(e).replace(/^[^{]*{\s*/, "").replace(/\s*}[^}]*$/, "")
                        }(e)))
                    }

                    void 0 !== i ? (void 0 !== t && t.exports && (i = t.exports = o), i.isClass = o) : "function" == typeof define && define.amd ? define([], function () {
                        return o
                    }) : e.isClass = o
                }(this)
            }, {}],
            230: [function (e, t, i) {
                "use strict";
                var n = Date.prototype.getDay, o = Object.prototype.toString,
                    a = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
                t.exports = function (e) {
                    return "object" == typeof e && null !== e && (a ? function (e) {
                        try {
                            return n.call(e), !0
                        } catch (e) {
                            return !1
                        }
                    }(e) : "[object Date]" === o.call(e))
                }
            }, {}],
            231: [function (e, t, i) {
                "use strict";
                var n = e("has"), o = RegExp.prototype.exec, a = Object.getOwnPropertyDescriptor,
                    r = Object.prototype.toString,
                    s = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag;
                t.exports = function (e) {
                    if (!e || "object" != typeof e) return !1;
                    if (!s) return "[object RegExp]" === r.call(e);
                    var t = a(e, "lastIndex"), i = t && n(t, "value");
                    return !!i && function (e) {
                        try {
                            var t = e.lastIndex;
                            return e.lastIndex = 0, o.call(e), !0
                        } catch (e) {
                            return !1
                        } finally {
                            e.lastIndex = t
                        }
                    }(e)
                }
            }, {has: 222}],
            232: [function (e, t, i) {
                "use strict";
                var n = Object.prototype.toString, o = e("has-symbols")();
                if (o) {
                    var a = Symbol.prototype.toString, r = /^Symbol\(.*\)$/;
                    t.exports = function (e) {
                        if ("symbol" == typeof e) return !0;
                        if ("[object Symbol]" !== n.call(e)) return !1;
                        try {
                            return function (e) {
                                return "symbol" == typeof e.valueOf() && r.test(a.call(e))
                            }(e)
                        } catch (e) {
                            return !1
                        }
                    }
                } else t.exports = function (e) {
                    return !1
                }
            }, {"has-symbols": 220}],
            233: [function (e, t, i) {
                "use strict";
                var n = e("core-util-is"), o = e("isstream"), a = e("is-class-hotfix");
                Object.keys(n).map(function (e) {
                    i[function (e) {
                        var t = e.slice(2);
                        return t = t[0].toLowerCase() + t.slice(1)
                    }(e)] = n[e]
                }), i.stream = o, i.readableStream = o.isReadable, i.writableStream = o.isWritable, i.duplexStream = o.isDuplex, i.class = a, i.finite = Number.isFinite, i.NaN = Number.isNaN, i.generator = function (e) {
                    return e && "function" == typeof e.next && "function" == typeof e.throw
                }, i.generatorFunction = function (e) {
                    return e && e.constructor && "GeneratorFunction" === e.constructor.name
                }, i.asyncFunction = function (e) {
                    return e && e.constructor && "AsyncFunction" === e.constructor.name
                }, i.promise = function (e) {
                    return e && "function" == typeof e.then
                };
                var r = Math.pow(2, 31);
                i.int = function (e) {
                    return n.isNumber(e) && e % 1 == 0
                }, i.int32 = function (e) {
                    return i.int(e) && e < r && e >= -r
                }, i.long = function (e) {
                    return i.int(e) && (e >= r || e < -r)
                }, i.Long = function (e) {
                    return i.object(e) && i.number(e.high) && i.number(e.low)
                }, i.double = function (e) {
                    return n.isNumber(e) && !isNaN(e) && e % 1 != 0
                }, i.date = function (e) {
                    return e instanceof Date
                }, i.regExp = function (e) {
                    return e instanceof RegExp
                }, i.regexp = i.regExp, i.error = function (e) {
                    return e instanceof Error
                }, i.array = Array.isArray
            }, {"core-util-is": 186, "is-class-hotfix": 229, isstream: 235}],
            234: [function (e, t, i) {
                var n = {}.toString;
                t.exports = Array.isArray || function (e) {
                    return "[object Array]" == n.call(e)
                }
            }, {}],
            235: [function (e, t, i) {
                var n = e("stream");

                function o(e) {
                    return e instanceof n.Stream
                }

                function a(e) {
                    return o(e) && "function" == typeof e._read && "object" == typeof e._readableState
                }

                function r(e) {
                    return o(e) && "function" == typeof e._write && "object" == typeof e._writableState
                }

                t.exports = o, t.exports.isReadable = a, t.exports.isWritable = r, t.exports.isDuplex = function (e) {
                    return a(e) && r(e)
                }
            }, {stream: 271}],
            236: [function (require, module, exports) {
                (function (global) {
                    !function (e, t) {
                        "object" == typeof exports && void 0 !== module ? module.exports = t(e) : "function" == typeof define && define.amd ? define(t) : t(e)
                    }("undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== global ? global : this, function (global) {
                        "use strict";
                        global = global || {};
                        var _Base64 = global.Base64, version = "2.5.2", buffer;
                        if (void 0 !== module && module.exports) try {
                            buffer = eval("require('buffer').Buffer")
                        } catch (e) {
                            buffer = void 0
                        }
                        var b64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
                            b64tab = function (e) {
                                for (var t = {}, i = 0, n = e.length; i < n; i++) t[e.charAt(i)] = i;
                                return t
                            }(b64chars), fromCharCode = String.fromCharCode, cb_utob = function (e) {
                                if (e.length < 2) {
                                    var t = e.charCodeAt(0);
                                    return t < 128 ? e : t < 2048 ? fromCharCode(192 | t >>> 6) + fromCharCode(128 | 63 & t) : fromCharCode(224 | t >>> 12 & 15) + fromCharCode(128 | t >>> 6 & 63) + fromCharCode(128 | 63 & t)
                                }
                                var t = 65536 + 1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320);
                                return fromCharCode(240 | t >>> 18 & 7) + fromCharCode(128 | t >>> 12 & 63) + fromCharCode(128 | t >>> 6 & 63) + fromCharCode(128 | 63 & t)
                            }, re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, utob = function (e) {
                                return e.replace(re_utob, cb_utob)
                            }, cb_encode = function (e) {
                                var t = [0, 2, 1][e.length % 3],
                                    i = e.charCodeAt(0) << 16 | (e.length > 1 ? e.charCodeAt(1) : 0) << 8 | (e.length > 2 ? e.charCodeAt(2) : 0),
                                    n = [b64chars.charAt(i >>> 18), b64chars.charAt(i >>> 12 & 63), t >= 2 ? "=" : b64chars.charAt(i >>> 6 & 63), t >= 1 ? "=" : b64chars.charAt(63 & i)];
                                return n.join("")
                            }, btoa = global.btoa ? function (e) {
                                return global.btoa(e)
                            } : function (e) {
                                return e.replace(/[\s\S]{1,3}/g, cb_encode)
                            }, _encode = function (e) {
                                var t = "[object Uint8Array]" === Object.prototype.toString.call(e);
                                return t ? e.toString("base64") : btoa(utob(String(e)))
                            }, encode = function (e, t) {
                                return t ? _encode(String(e)).replace(/[+\/]/g, function (e) {
                                    return "+" == e ? "-" : "_"
                                }).replace(/=/g, "") : _encode(e)
                            }, encodeURI = function (e) {
                                return encode(e, !0)
                            }, re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,
                            cb_btou = function (e) {
                                switch (e.length) {
                                    case 4:
                                        var t = (7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3),
                                            i = t - 65536;
                                        return fromCharCode(55296 + (i >>> 10)) + fromCharCode(56320 + (1023 & i));
                                    case 3:
                                        return fromCharCode((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
                                    default:
                                        return fromCharCode((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1))
                                }
                            }, btou = function (e) {
                                return e.replace(re_btou, cb_btou)
                            }, cb_decode = function (e) {
                                var t = e.length, i = t % 4,
                                    n = (t > 0 ? b64tab[e.charAt(0)] << 18 : 0) | (t > 1 ? b64tab[e.charAt(1)] << 12 : 0) | (t > 2 ? b64tab[e.charAt(2)] << 6 : 0) | (t > 3 ? b64tab[e.charAt(3)] : 0),
                                    o = [fromCharCode(n >>> 16), fromCharCode(n >>> 8 & 255), fromCharCode(255 & n)];
                                return o.length -= [0, 0, 2, 1][i], o.join("")
                            }, _atob = global.atob ? function (e) {
                                return global.atob(e)
                            } : function (e) {
                                return e.replace(/\S{1,4}/g, cb_decode)
                            }, atob = function (e) {
                                return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g, ""))
                            },
                            _decode = buffer ? buffer.from && Uint8Array && buffer.from !== Uint8Array.from ? function (e) {
                                return (e.constructor === buffer.constructor ? e : buffer.from(e, "base64")).toString()
                            } : function (e) {
                                return (e.constructor === buffer.constructor ? e : new buffer(e, "base64")).toString()
                            } : function (e) {
                                return btou(_atob(e))
                            }, decode = function (e) {
                                return _decode(String(e).replace(/[-_]/g, function (e) {
                                    return "-" == e ? "+" : "/"
                                }).replace(/[^A-Za-z0-9\+\/]/g, ""))
                            }, noConflict = function () {
                                var e = global.Base64;
                                return global.Base64 = _Base64, e
                            };
                        if (global.Base64 = {
                            VERSION: version,
                            atob,
                            btoa,
                            fromBase64: decode,
                            toBase64: encode,
                            utob,
                            encode,
                            encodeURI,
                            btou,
                            decode,
                            noConflict,
                            __buffer__: buffer
                        }, "function" == typeof Object.defineProperty) {
                            var noEnum = function (e) {
                                return {value: e, enumerable: !1, writable: !0, configurable: !0}
                            };
                            global.Base64.extendString = function () {
                                Object.defineProperty(String.prototype, "fromBase64", noEnum(function () {
                                    return decode(this)
                                })), Object.defineProperty(String.prototype, "toBase64", noEnum(function (e) {
                                    return encode(this, e)
                                })), Object.defineProperty(String.prototype, "toBase64URI", noEnum(function () {
                                    return encode(this, !0)
                                }))
                            }
                        }
                        return global.Meteor && (Base64 = global.Base64), void 0 !== module && module.exports ? module.exports.Base64 = global.Base64 : "function" == typeof define && define.amd && define([], function () {
                            return global.Base64
                        }), {Base64: global.Base64}
                    })
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            237: [function (e, t, i) {
                /*!
 * merge-descriptors
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */
                "use strict";
                t.exports = function (e, t, i) {
                    if (!e) throw new TypeError("argument dest is required");
                    if (!t) throw new TypeError("argument src is required");
                    return void 0 === i && (i = !0), Object.getOwnPropertyNames(t).forEach(function (o) {
                        if (i || !n.call(e, o)) {
                            var a = Object.getOwnPropertyDescriptor(t, o);
                            Object.defineProperty(e, o, a)
                        }
                    }), e
                };
                var n = Object.prototype.hasOwnProperty
            }, {}],
            238: [function (e, t, i) {
                var n = 1e3, o = 60 * n, a = 60 * o, r = 24 * a, s = 365.25 * r;

                function l(e, t, i) {
                    if (!(e < t)) return e < 1.5 * t ? Math.floor(e / t) + " " + i : Math.ceil(e / t) + " " + i + "s"
                }

                t.exports = function (e, t) {
                    t = t || {};
                    var i, d = typeof e;
                    if ("string" === d && e.length > 0) return function (e) {
                        if (!((e = String(e)).length > 100)) {
                            var t = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);
                            if (t) {
                                var i = parseFloat(t[1]);
                                switch ((t[2] || "ms").toLowerCase()) {
                                    case"years":
                                    case"year":
                                    case"yrs":
                                    case"yr":
                                    case"y":
                                        return i * s;
                                    case"days":
                                    case"day":
                                    case"d":
                                        return i * r;
                                    case"hours":
                                    case"hour":
                                    case"hrs":
                                    case"hr":
                                    case"h":
                                        return i * a;
                                    case"minutes":
                                    case"minute":
                                    case"mins":
                                    case"min":
                                    case"m":
                                        return i * o;
                                    case"seconds":
                                    case"second":
                                    case"secs":
                                    case"sec":
                                    case"s":
                                        return i * n;
                                    case"milliseconds":
                                    case"millisecond":
                                    case"msecs":
                                    case"msec":
                                    case"ms":
                                        return i;
                                    default:
                                        return
                                }
                            }
                        }
                    }(e);
                    if ("number" === d && !1 === isNaN(e)) return t.long ? l(i = e, r, "day") || l(i, a, "hour") || l(i, o, "minute") || l(i, n, "second") || i + " ms" : function (e) {
                        return e >= r ? Math.round(e / r) + "d" : e >= a ? Math.round(e / a) + "h" : e >= o ? Math.round(e / o) + "m" : e >= n ? Math.round(e / n) + "s" : e + "ms"
                    }(e);
                    throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e))
                }
            }, {}],
            239: [function (e, t, i) {
                var n = "function" == typeof Map && Map.prototype,
                    o = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null,
                    a = n && o && "function" == typeof o.get ? o.get : null, r = n && Map.prototype.forEach,
                    s = "function" == typeof Set && Set.prototype,
                    l = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null,
                    d = s && l && "function" == typeof l.get ? l.get : null, u = s && Set.prototype.forEach,
                    c = Boolean.prototype.valueOf, h = Object.prototype.toString,
                    f = "function" == typeof BigInt ? BigInt.prototype.valueOf : null, p = e("./util.inspect").custom,
                    g = p && T(p) ? p : null;

                function m(e, t, i) {
                    var n = "double" === (i.quoteStyle || t) ? '"' : "'";
                    return n + e + n
                }

                function v(e) {
                    return String(e).replace(/"/g, "&quot;")
                }

                function y(e) {
                    return "[object Array]" === C(e)
                }

                function T(e) {
                    return "[object Symbol]" === C(e)
                }

                t.exports = function e(t, i, n, o) {
                    if (i || (i = {}), k(i, "quoteStyle") && "single" !== i.quoteStyle && "double" !== i.quoteStyle) throw new TypeError('option "quoteStyle" must be "single" or "double"');
                    if (void 0 === t) return "undefined";
                    if (null === t) return "null";
                    if ("boolean" == typeof t) return t ? "true" : "false";
                    if ("string" == typeof t) return function (e, t) {
                        return m(e.replace(/(['\\])/g, "\\$1").replace(/[\x00-\x1f]/g, b), "single", t)
                    }(t, i);
                    if ("number" == typeof t) return 0 === t ? 1 / 0 / t > 0 ? "0" : "-0" : String(t);
                    if ("bigint" == typeof t) return String(t) + "n";
                    var s, l = void 0 === i.depth ? 5 : i.depth;
                    if (void 0 === n && (n = 0), n >= l && l > 0 && "object" == typeof t) return "[Object]";
                    if (void 0 === o) o = []; else if (function (e, t) {
                        if (e.indexOf) return e.indexOf(t);
                        for (var i = 0, n = e.length; i < n; i++) if (e[i] === t) return i;
                        return -1
                    }(o, t) >= 0) return "[Circular]";

                    function h(t, a) {
                        return a && (o = o.slice()).push(a), e(t, i, n + 1, o)
                    }

                    if ("function" == typeof t) {
                        var p = function (e) {
                            if (e.name) return e.name;
                            var t = String(e).match(/^function\s*([\w$]+)/);
                            return t ? t[1] : void 0
                        }(t);
                        return "[Function" + (p ? ": " + p : "") + "]"
                    }
                    if (T(t)) {
                        var w = Symbol.prototype.toString.call(t);
                        return "object" == typeof t ? I(w) : w
                    }
                    if ((s = t) && "object" == typeof s && ("undefined" != typeof HTMLElement && s instanceof HTMLElement || "string" == typeof s.nodeName && "function" == typeof s.getAttribute)) {
                        for (var D = "<" + String(t.nodeName).toLowerCase(), A = t.attributes || [], N = 0; N < A.length; N++) D += " " + A[N].name + "=" + m(v(A[N].value), "double", i);
                        return D += ">", t.childNodes && t.childNodes.length && (D += "..."), D += "</" + String(t.nodeName).toLowerCase() + ">"
                    }
                    if (y(t)) return 0 === t.length ? "[]" : "[ " + _(t, h).join(", ") + " ]";
                    if (function (e) {
                        return "[object Error]" === C(e)
                    }(t)) {
                        var x = _(t, h);
                        return 0 === x.length ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + x.join(", ") + " }"
                    }
                    if ("object" == typeof t) {
                        if (g && "function" == typeof t[g]) return t[g]();
                        if ("function" == typeof t.inspect) return t.inspect()
                    }
                    if (function (e) {
                        if (!a) return !1;
                        try {
                            a.call(e);
                            try {
                                d.call(e)
                            } catch (e) {
                                return !0
                            }
                            return e instanceof Map
                        } catch (e) {
                        }
                        return !1
                    }(t)) {
                        var x = [];
                        return r.call(t, function (e, i) {
                            x.push(h(i, t) + " => " + h(e, t))
                        }), S("Map", a.call(t), x)
                    }
                    if (function (e) {
                        if (!d) return !1;
                        try {
                            d.call(e);
                            try {
                                a.call(e)
                            } catch (e) {
                                return !0
                            }
                            return e instanceof Set
                        } catch (e) {
                        }
                        return !1
                    }(t)) {
                        var x = [];
                        return u.call(t, function (e) {
                            x.push(h(e, t))
                        }), S("Set", d.call(t), x)
                    }
                    if (function (e) {
                        return "[object Number]" === C(e)
                    }(t)) return I(h(Number(t)));
                    if (function (e) {
                        return "[object BigInt]" === C(e)
                    }(t)) return I(h(f.call(t)));
                    if (function (e) {
                        return "[object Boolean]" === C(e)
                    }(t)) return I(c.call(t));
                    if (function (e) {
                        return "[object String]" === C(e)
                    }(t)) return I(h(String(t)));
                    if (!function (e) {
                        return "[object Date]" === C(e)
                    }(t) && !function (e) {
                        return "[object RegExp]" === C(e)
                    }(t)) {
                        var E = _(t, h);
                        return 0 === E.length ? "{}" : "{ " + E.join(", ") + " }"
                    }
                    return String(t)
                };
                var w = Object.prototype.hasOwnProperty || function (e) {
                    return e in this
                };

                function k(e, t) {
                    return w.call(e, t)
                }

                function C(e) {
                    return h.call(e)
                }

                function b(e) {
                    var t = e.charCodeAt(0), i = {8: "b", 9: "t", 10: "n", 12: "f", 13: "r"}[t];
                    return i ? "\\" + i : "\\x" + (t < 16 ? "0" : "") + t.toString(16)
                }

                function I(e) {
                    return "Object(" + e + ")"
                }

                function S(e, t, i) {
                    return e + " (" + t + ") {" + i.join(", ") + "}"
                }

                function _(e, t) {
                    var i = y(e), n = [];
                    if (i) {
                        n.length = e.length;
                        for (var o = 0; o < e.length; o++) n[o] = k(e, o) ? t(e[o], e) : ""
                    }
                    for (var a in e) k(e, a) && (i && String(Number(a)) === a && a < e.length || (/[^\w$]/.test(a) ? n.push(t(a, e) + ": " + t(e[a], e)) : n.push(a + ": " + t(e[a], e))));
                    return n
                }
            }, {"./util.inspect": 68}],
            240: [function (e, t, i) {
                "use strict";
                var n = Object.prototype.hasOwnProperty, o = Object.prototype.toString, a = Array.prototype.slice,
                    r = e("./isArguments"), s = Object.prototype.propertyIsEnumerable,
                    l = !s.call({toString: null}, "toString"), d = s.call(function () {
                    }, "prototype"),
                    u = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"],
                    c = function (e) {
                        var t = e.constructor;
                        return t && t.prototype === e
                    }, h = {
                        $applicationCache: !0,
                        $console: !0,
                        $external: !0,
                        $frame: !0,
                        $frameElement: !0,
                        $frames: !0,
                        $innerHeight: !0,
                        $innerWidth: !0,
                        $outerHeight: !0,
                        $outerWidth: !0,
                        $pageXOffset: !0,
                        $pageYOffset: !0,
                        $parent: !0,
                        $scrollLeft: !0,
                        $scrollTop: !0,
                        $scrollX: !0,
                        $scrollY: !0,
                        $self: !0,
                        $webkitIndexedDB: !0,
                        $webkitStorageInfo: !0,
                        $window: !0
                    }, f = function () {
                        if ("undefined" == typeof window) return !1;
                        for (var e in window) try {
                            if (!h["$" + e] && n.call(window, e) && null !== window[e] && "object" == typeof window[e]) try {
                                c(window[e])
                            } catch (e) {
                                return !0
                            }
                        } catch (e) {
                            return !0
                        }
                        return !1
                    }(), p = function (e) {
                        var t = null !== e && "object" == typeof e, i = "[object Function]" === o.call(e), a = r(e),
                            s = t && "[object String]" === o.call(e), h = [];
                        if (!t && !i && !a) throw new TypeError("Object.keys called on a non-object");
                        var p = d && i;
                        if (s && e.length > 0 && !n.call(e, 0)) for (var g = 0; g < e.length; ++g) h.push(String(g));
                        if (a && e.length > 0) for (var m = 0; m < e.length; ++m) h.push(String(m)); else for (var v in e) p && "prototype" === v || !n.call(e, v) || h.push(String(v));
                        if (l) for (var y = function (e) {
                            if ("undefined" == typeof window || !f) return c(e);
                            try {
                                return c(e)
                            } catch (e) {
                                return !1
                            }
                        }(e), T = 0; T < u.length; ++T) y && "constructor" === u[T] || !n.call(e, u[T]) || h.push(u[T]);
                        return h
                    };
                p.shim = function () {
                    if (Object.keys) {
                        var e = function () {
                            return 2 === (Object.keys(arguments) || "").length
                        }(1, 2);
                        if (!e) {
                            var t = Object.keys;
                            Object.keys = function (e) {
                                return r(e) ? t(a.call(e)) : t(e)
                            }
                        }
                    } else Object.keys = p;
                    return Object.keys || p
                }, t.exports = p
            }, {"./isArguments": 241}],
            241: [function (e, t, i) {
                arguments[4][210][0].apply(i, arguments)
            }, {dup: 210}],
            242: [function (e, t, i) {
                "use strict";
                var n = e("es-abstract/es7"), o = Object.defineProperty, a = Object.getOwnPropertyDescriptor,
                    r = Object.getOwnPropertyNames, s = Object.getOwnPropertySymbols,
                    l = Function.call.bind(Array.prototype.concat), d = Function.call.bind(Array.prototype.reduce),
                    u = s ? function (e) {
                        return l(r(e), s(e))
                    } : r, c = n.IsCallable(a) && n.IsCallable(r);
                t.exports = function (e) {
                    if (n.RequireObjectCoercible(e), !c) throw new TypeError("getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor");
                    var t = n.ToObject(e);
                    return d(u(t), function (e, i) {
                        var n, r, s, l = a(t, i);
                        return void 0 !== l && (n = e, r = i, s = l, o && r in n ? o(n, r, {
                            configurable: !0,
                            enumerable: !0,
                            value: s,
                            writable: !0
                        }) : n[r] = s), e
                    }, {})
                }
            }, {"es-abstract/es7": 195}],
            243: [function (e, t, i) {
                "use strict";
                var n = e("define-properties"), o = e("./implementation"), a = e("./polyfill"), r = e("./shim");
                n(o, {getPolyfill: a, implementation: o, shim: r}), t.exports = o
            }, {"./implementation": 242, "./polyfill": 244, "./shim": 245, "define-properties": 190}],
            244: [function (e, t, i) {
                "use strict";
                var n = e("./implementation");
                t.exports = function () {
                    return "function" == typeof Object.getOwnPropertyDescriptors ? Object.getOwnPropertyDescriptors : n
                }
            }, {"./implementation": 242}],
            245: [function (e, t, i) {
                "use strict";
                var n = e("./polyfill"), o = e("define-properties");
                t.exports = function () {
                    var e = n();
                    return o(Object, {getOwnPropertyDescriptors: e}, {
                        getOwnPropertyDescriptors: function () {
                            return Object.getOwnPropertyDescriptors !== e
                        }
                    }), e
                }
            }, {"./polyfill": 244, "define-properties": 190}],
            246: [function (e, t, i) {
                (function (e) {
                    function t(e, t) {
                        for (var i = 0, n = e.length - 1; n >= 0; n--) {
                            var o = e[n];
                            "." === o ? e.splice(n, 1) : ".." === o ? (e.splice(n, 1), i++) : i && (e.splice(n, 1), i--)
                        }
                        if (t) for (; i--; i) e.unshift("..");
                        return e
                    }

                    function n(e, t) {
                        if (e.filter) return e.filter(t);
                        for (var i = [], n = 0; n < e.length; n++) t(e[n], n, e) && i.push(e[n]);
                        return i
                    }

                    i.resolve = function () {
                        for (var i = "", o = !1, a = arguments.length - 1; a >= -1 && !o; a--) {
                            var r = a >= 0 ? arguments[a] : e.cwd();
                            if ("string" != typeof r) throw new TypeError("Arguments to path.resolve must be strings");
                            r && (i = r + "/" + i, o = "/" === r.charAt(0))
                        }
                        return i = t(n(i.split("/"), function (e) {
                            return !!e
                        }), !o).join("/"), (o ? "/" : "") + i || "."
                    }, i.normalize = function (e) {
                        var a = i.isAbsolute(e), r = "/" === o(e, -1);
                        return (e = t(n(e.split("/"), function (e) {
                            return !!e
                        }), !a).join("/")) || a || (e = "."), e && r && (e += "/"), (a ? "/" : "") + e
                    }, i.isAbsolute = function (e) {
                        return "/" === e.charAt(0)
                    }, i.join = function () {
                        var e = Array.prototype.slice.call(arguments, 0);
                        return i.normalize(n(e, function (e, t) {
                            if ("string" != typeof e) throw new TypeError("Arguments to path.join must be strings");
                            return e
                        }).join("/"))
                    }, i.relative = function (e, t) {
                        function n(e) {
                            for (var t = 0; t < e.length && "" === e[t]; t++) ;
                            for (var i = e.length - 1; i >= 0 && "" === e[i]; i--) ;
                            return t > i ? [] : e.slice(t, i - t + 1)
                        }

                        e = i.resolve(e).substr(1), t = i.resolve(t).substr(1);
                        for (var o = n(e.split("/")), a = n(t.split("/")), r = Math.min(o.length, a.length), s = r, l = 0; l < r; l++) if (o[l] !== a[l]) {
                            s = l;
                            break
                        }
                        for (var d = [], l = s; l < o.length; l++) d.push("..");
                        return (d = d.concat(a.slice(s))).join("/")
                    }, i.sep = "/", i.delimiter = ":", i.dirname = function (e) {
                        if ("string" != typeof e && (e += ""), 0 === e.length) return ".";
                        for (var t = e.charCodeAt(0), i = 47 === t, n = -1, o = !0, a = e.length - 1; a >= 1; --a) if (47 === (t = e.charCodeAt(a))) {
                            if (!o) {
                                n = a;
                                break
                            }
                        } else o = !1;
                        return -1 === n ? i ? "/" : "." : i && 1 === n ? "/" : e.slice(0, n)
                    }, i.basename = function (e, t) {
                        var i = function (e) {
                            "string" != typeof e && (e += "");
                            var t, i = 0, n = -1, o = !0;
                            for (t = e.length - 1; t >= 0; --t) if (47 === e.charCodeAt(t)) {
                                if (!o) {
                                    i = t + 1;
                                    break
                                }
                            } else -1 === n && (o = !1, n = t + 1);
                            return -1 === n ? "" : e.slice(i, n)
                        }(e);
                        return t && i.substr(-1 * t.length) === t && (i = i.substr(0, i.length - t.length)), i
                    }, i.extname = function (e) {
                        "string" != typeof e && (e += "");
                        for (var t = -1, i = 0, n = -1, o = !0, a = 0, r = e.length - 1; r >= 0; --r) {
                            var s = e.charCodeAt(r);
                            if (47 !== s) -1 === n && (o = !1, n = r + 1), 46 === s ? -1 === t ? t = r : 1 !== a && (a = 1) : -1 !== t && (a = -1); else if (!o) {
                                i = r + 1;
                                break
                            }
                        }
                        return -1 === t || -1 === n || 0 === a || 1 === a && t === n - 1 && t === i + 1 ? "" : e.slice(t, n)
                    };
                    var o = "b" === "ab".substr(-1) ? function (e, t, i) {
                        return e.substr(t, i)
                    } : function (e, t, i) {
                        return t < 0 && (t = e.length + t), e.substr(t, i)
                    }
                }).call(this, e("_process"))
            }, {_process: 249}],
            247: [function (e, t, i) {
                (function (e) {
                    (function () {
                        "use strict";
                        var n = {function: !0, object: !0}, o = n[typeof window] && window || this,
                            a = n[typeof i] && i, r = n[typeof t] && t && !t.nodeType && t,
                            s = a && r && "object" == typeof e && e;
                        !s || s.global !== s && s.window !== s && s.self !== s || (o = s);
                        var l = Math.pow(2, 53) - 1, d = /\bOpera/, u = Object.prototype, c = u.hasOwnProperty,
                            h = u.toString;

                        function f(e) {
                            return (e = String(e)).charAt(0).toUpperCase() + e.slice(1)
                        }

                        function p(e) {
                            return e = T(e), /^(?:webOS|i(?:OS|P))/.test(e) ? e : f(e)
                        }

                        function g(e, t) {
                            for (var i in e) c.call(e, i) && t(e[i], i, e)
                        }

                        function m(e) {
                            return null == e ? f(e) : h.call(e).slice(8, -1)
                        }

                        function v(e) {
                            return String(e).replace(/([ -])(?!$)/g, "$1?")
                        }

                        function y(e, t) {
                            var i = null;
                            return function (e, t) {
                                var i = -1, n = e ? e.length : 0;
                                if ("number" == typeof n && n > -1 && n <= l) for (; ++i < n;) t(e[i], i, e); else g(e, t)
                            }(e, function (n, o) {
                                i = t(i, n, o, e)
                            }), i
                        }

                        function T(e) {
                            return String(e).replace(/^ +| +$/g, "")
                        }

                        var w = function e(t) {
                            var i = o, n = t && "object" == typeof t && "String" != m(t);
                            n && (i = t, t = null);
                            var a = i.navigator || {}, r = a.userAgent || "";
                            t || (t = r);
                            var s, l, u, c, f, w,
                                k = n ? !!a.likeChrome : /\bChrome\b/.test(t) && !/internal|\n/i.test(h.toString()),
                                C = n ? "Object" : "ScriptBridgingProxyObject", b = n ? "Object" : "Environment",
                                I = n && i.java ? "JavaPackage" : m(i.java), S = n ? "Object" : "RuntimeObject",
                                _ = /\bJava/.test(I) && i.java, D = _ && m(i.environment) == b, A = _ ? "a" : "α",
                                N = _ ? "b" : "β", x = i.document || {}, E = i.operamini || i.opera,
                                O = d.test(O = n && E ? E["[[Class]]"] : m(E)) ? O : E = null, P = t, M = [], F = null,
                                L = t == r, R = L && E && "function" == typeof E.version && E.version(),
                                B = y([{label: "EdgeHTML", pattern: "Edge"}, "Trident", {
                                    label: "WebKit",
                                    pattern: "AppleWebKit"
                                }, "iCab", "Presto", "NetFront", "Tasman", "KHTML", "Gecko"], function (e, i) {
                                    return e || RegExp("\\b" + (i.pattern || v(i)) + "\\b", "i").exec(t) && (i.label || i)
                                }), U = function (e) {
                                    return y(e, function (e, i) {
                                        return e || RegExp("\\b" + (i.pattern || v(i)) + "\\b", "i").exec(t) && (i.label || i)
                                    })
                                }(["Adobe AIR", "Arora", "Avant Browser", "Breach", "Camino", "Electron", "Epiphany", "Fennec", "Flock", "Galeon", "GreenBrowser", "iCab", "Iceweasel", "K-Meleon", "Konqueror", "Lunascape", "Maxthon", {
                                    label: "Microsoft Edge",
                                    pattern: "Edge"
                                }, "Midori", "Nook Browser", "PaleMoon", "PhantomJS", "Raven", "Rekonq", "RockMelt", {
                                    label: "Samsung Internet",
                                    pattern: "SamsungBrowser"
                                }, "SeaMonkey", {
                                    label: "Silk",
                                    pattern: "(?:Cloud9|Silk-Accelerated)"
                                }, "Sleipnir", "SlimBrowser", {
                                    label: "SRWare Iron",
                                    pattern: "Iron"
                                }, "Sunrise", "Swiftfox", "Waterfox", "WebPositive", "Opera Mini", {
                                    label: "Opera Mini",
                                    pattern: "OPiOS"
                                }, "Opera", {label: "Opera", pattern: "OPR"}, "Chrome", {
                                    label: "Chrome Mobile",
                                    pattern: "(?:CriOS|CrMo)"
                                }, {label: "Firefox", pattern: "(?:Firefox|Minefield)"}, {
                                    label: "Firefox for iOS",
                                    pattern: "FxiOS"
                                }, {label: "IE", pattern: "IEMobile"}, {label: "IE", pattern: "MSIE"}, "Safari"]),
                                V = W([{label: "BlackBerry", pattern: "BB10"}, "BlackBerry", {
                                    label: "Galaxy S",
                                    pattern: "GT-I9000"
                                }, {label: "Galaxy S2", pattern: "GT-I9100"}, {
                                    label: "Galaxy S3",
                                    pattern: "GT-I9300"
                                }, {label: "Galaxy S4", pattern: "GT-I9500"}, {
                                    label: "Galaxy S5",
                                    pattern: "SM-G900"
                                }, {label: "Galaxy S6", pattern: "SM-G920"}, {
                                    label: "Galaxy S6 Edge",
                                    pattern: "SM-G925"
                                }, {label: "Galaxy S7", pattern: "SM-G930"}, {
                                    label: "Galaxy S7 Edge",
                                    pattern: "SM-G935"
                                }, "Google TV", "Lumia", "iPad", "iPod", "iPhone", "Kindle", {
                                    label: "Kindle Fire",
                                    pattern: "(?:Cloud9|Silk-Accelerated)"
                                }, "Nexus", "Nook", "PlayBook", "PlayStation Vita", "PlayStation", "TouchPad", "Transformer", {
                                    label: "Wii U",
                                    pattern: "WiiU"
                                }, "Wii", "Xbox One", {label: "Xbox 360", pattern: "Xbox"}, "Xoom"]), K = function (e) {
                                    return y(e, function (e, i, n) {
                                        return e || (i[V] || i[/^[a-z]+(?: +[a-z]+\b)*/i.exec(V)] || RegExp("\\b" + v(n) + "(?:\\b|\\w*\\d)", "i").exec(t)) && n
                                    })
                                }({
                                    Apple: {iPad: 1, iPhone: 1, iPod: 1},
                                    Archos: {},
                                    Amazon: {Kindle: 1, "Kindle Fire": 1},
                                    Asus: {Transformer: 1},
                                    "Barnes & Noble": {Nook: 1},
                                    BlackBerry: {PlayBook: 1},
                                    Google: {"Google TV": 1, Nexus: 1},
                                    HP: {TouchPad: 1},
                                    HTC: {},
                                    LG: {},
                                    Microsoft: {Xbox: 1, "Xbox One": 1},
                                    Motorola: {Xoom: 1},
                                    Nintendo: {"Wii U": 1, Wii: 1},
                                    Nokia: {Lumia: 1},
                                    Samsung: {"Galaxy S": 1, "Galaxy S2": 1, "Galaxy S3": 1, "Galaxy S4": 1},
                                    Sony: {PlayStation: 1, "PlayStation Vita": 1}
                                }), G = function (e) {
                                    return y(e, function (e, i) {
                                        var n = i.pattern || v(i);
                                        return !e && (e = RegExp("\\b" + n + "(?:/[\\d.]+|[ \\w.]*)", "i").exec(t)) && (e = function (e, t, i) {
                                            var n = {
                                                "10.0": "10",
                                                6.4: "10 Technical Preview",
                                                6.3: "8.1",
                                                6.2: "8",
                                                6.1: "Server 2008 R2 / 7",
                                                "6.0": "Server 2008 / Vista",
                                                5.2: "Server 2003 / XP 64-bit",
                                                5.1: "XP",
                                                5.01: "2000 SP1",
                                                "5.0": "2000",
                                                "4.0": "NT",
                                                "4.90": "ME"
                                            };
                                            return t && i && /^Win/i.test(e) && !/^Windows Phone /i.test(e) && (n = n[/[\d.]+$/.exec(e)]) && (e = "Windows " + n), e = String(e), t && i && (e = e.replace(RegExp(t, "i"), i)), e = p(e.replace(/ ce$/i, " CE").replace(/\bhpw/i, "web").replace(/\bMacintosh\b/, "Mac OS").replace(/_PowerPC\b/i, " OS").replace(/\b(OS X) [^ \d]+/i, "$1").replace(/\bMac (OS X)\b/, "$1").replace(/\/(\d)/, " $1").replace(/_/g, ".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, "").replace(/\bx86\.64\b/gi, "x86_64").replace(/\b(Windows Phone) OS\b/, "$1").replace(/\b(Chrome OS \w+) [\d.]+\b/, "$1").split(" on ")[0])
                                        }(e, n, i.label || i)), e
                                    })
                                }(["Windows Phone", "Android", "CentOS", {
                                    label: "Chrome OS",
                                    pattern: "CrOS"
                                }, "Debian", "Fedora", "FreeBSD", "Gentoo", "Haiku", "Kubuntu", "Linux Mint", "OpenBSD", "Red Hat", "SuSE", "Ubuntu", "Xubuntu", "Cygwin", "Symbian OS", "hpwOS", "webOS ", "webOS", "Tablet OS", "Tizen", "Linux", "Mac OS X", "Macintosh", "Mac", "Windows 98;", "Windows "]);

                            function W(e) {
                                return y(e, function (e, i) {
                                    var n = i.pattern || v(i);
                                    return !e && (e = RegExp("\\b" + n + " *\\d+[.\\w_]*", "i").exec(t) || RegExp("\\b" + n + " *\\w+-[\\w]*", "i").exec(t) || RegExp("\\b" + n + "(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)", "i").exec(t)) && ((e = String(i.label && !RegExp(n, "i").test(i.label) ? i.label : e).split("/"))[1] && !/[\d.]+/.test(e[0]) && (e[0] += " " + e[1]), i = i.label || i, e = p(e[0].replace(RegExp(n, "i"), i).replace(RegExp("; *(?:" + i + "[_-])?", "i"), " ").replace(RegExp("(" + i + ")[-_.]?(\\w)", "i"), "$1 $2"))), e
                                })
                            }

                            if (B && (B = [B]), K && !V && (V = W([K])), (s = /\bGoogle TV\b/.exec(V)) && (V = s[0]), /\bSimulator\b/i.test(t) && (V = (V ? V + " " : "") + "Simulator"), "Opera Mini" == U && /\bOPiOS\b/.test(t) && M.push("running in Turbo/Uncompressed mode"), "IE" == U && /\blike iPhone OS\b/.test(t) ? (s = e(t.replace(/like iPhone OS/, "")), K = s.manufacturer, V = s.product) : /^iP/.test(V) ? (U || (U = "Safari"), G = "iOS" + ((s = / OS ([\d_]+)/i.exec(t)) ? " " + s[1].replace(/_/g, ".") : "")) : "Konqueror" != U || /buntu/i.test(G) ? K && "Google" != K && (/Chrome/.test(U) && !/\bMobile Safari\b/i.test(t) || /\bVita\b/.test(V)) || /\bAndroid\b/.test(G) && /^Chrome/.test(U) && /\bVersion\//i.test(t) ? (U = "Android Browser", G = /\bAndroid\b/.test(G) ? G : "Android") : "Silk" == U ? (/\bMobi/i.test(t) || (G = "Android", M.unshift("desktop mode")), /Accelerated *= *true/i.test(t) && M.unshift("accelerated")) : "PaleMoon" == U && (s = /\bFirefox\/([\d.]+)\b/.exec(t)) ? M.push("identifying as Firefox " + s[1]) : "Firefox" == U && (s = /\b(Mobile|Tablet|TV)\b/i.exec(t)) ? (G || (G = "Firefox OS"), V || (V = s[1])) : !U || (s = !/\bMinefield\b/i.test(t) && /\b(?:Firefox|Safari)\b/.exec(U)) ? (U && !V && /[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(s + "/") + 8)) && (U = null), (s = V || K || G) && (V || K || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(G)) && (U = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(G) ? G : s) + " Browser")) : "Electron" == U && (s = (/\bChrome\/([\d.]+)\b/.exec(t) || 0)[1]) && M.push("Chromium " + s) : G = "Kubuntu", R || (u = ["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))", "Version", v(U), "(?:Firefox|Minefield|NetFront)"], R = y(u, function (e, i) {
                                return e || (RegExp(i + "(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)", "i").exec(t) || 0)[1] || null
                            })), (s = ("iCab" == B && parseFloat(R) > 3 ? "WebKit" : /\bOpera\b/.test(U) && (/\bOPR\b/.test(t) ? "Blink" : "Presto")) || /\b(?:Midori|Nook|Safari)\b/i.test(t) && !/^(?:Trident|EdgeHTML)$/.test(B) && "WebKit" || !B && /\bMSIE\b/i.test(t) && ("Mac OS" == G ? "Tasman" : "Trident") || "WebKit" == B && /\bPlayStation\b(?! Vita\b)/i.test(U) && "NetFront") && (B = [s]), "IE" == U && (s = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t) || 0)[1]) ? (U += " Mobile", G = "Windows Phone " + (/\+$/.test(s) ? s : s + ".x"), M.unshift("desktop mode")) : /\bWPDesktop\b/i.test(t) ? (U = "IE Mobile", G = "Windows Phone 8.x", M.unshift("desktop mode"), R || (R = (/\brv:([\d.]+)/.exec(t) || 0)[1])) : "IE" != U && "Trident" == B && (s = /\brv:([\d.]+)/.exec(t)) && (U && M.push("identifying as " + U + (R ? " " + R : "")), U = "IE", R = s[1]), L) {
                                if (f = "global", w = null != (c = i) ? typeof c[f] : "number", /^(?:boolean|number|string|undefined)$/.test(w) || "object" == w && !c[f]) m(s = i.runtime) == C ? (U = "Adobe AIR", G = s.flash.system.Capabilities.os) : m(s = i.phantom) == S ? (U = "PhantomJS", R = (s = s.version || null) && s.major + "." + s.minor + "." + s.patch) : "number" == typeof x.documentMode && (s = /\bTrident\/(\d+)/i.exec(t)) ? (R = [R, x.documentMode], (s = +s[1] + 4) != R[1] && (M.push("IE " + R[1] + " mode"), B && (B[1] = ""), R[1] = s), R = "IE" == U ? String(R[1].toFixed(1)) : R[0]) : "number" == typeof x.documentMode && /^(?:Chrome|Firefox)\b/.test(U) && (M.push("masking as " + U + " " + R), U = "IE", R = "11.0", B = ["Trident"], G = "Windows"); else if (_ && (s = _.lang.System, P = s.getProperty("os.arch"), G = G || s.getProperty("os.name") + " " + s.getProperty("os.version")), D) {
                                    try {
                                        R = i.require("ringo/engine").version.join("."), U = "RingoJS"
                                    } catch (e) {
                                        (s = i.system) && s.global.system == i.system && (U = "Narwhal", G || (G = s[0].os || null))
                                    }
                                    U || (U = "Rhino")
                                } else "object" == typeof i.process && !i.process.browser && (s = i.process) && ("object" == typeof s.versions && ("string" == typeof s.versions.electron ? (M.push("Node " + s.versions.node), U = "Electron", R = s.versions.electron) : "string" == typeof s.versions.nw && (M.push("Chromium " + R, "Node " + s.versions.node), U = "NW.js", R = s.versions.nw)), U || (U = "Node.js", P = s.arch, G = s.platform, R = (R = /[\d.]+/.exec(s.version)) ? R[0] : null));
                                G = G && p(G)
                            }
                            if (R && (s = /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(R) || /(?:alpha|beta)(?: ?\d)?/i.exec(t + ";" + (L && a.appMinorVersion)) || /\bMinefield\b/i.test(t) && "a") && (F = /b/i.test(s) ? "beta" : "alpha", R = R.replace(RegExp(s + "\\+?$"), "") + ("beta" == F ? N : A) + (/\d+\+?/.exec(s) || "")), "Fennec" == U || "Firefox" == U && /\b(?:Android|Firefox OS)\b/.test(G)) U = "Firefox Mobile"; else if ("Maxthon" == U && R) R = R.replace(/\.[\d.]+/, ".x"); else if (/\bXbox\b/i.test(V)) "Xbox 360" == V && (G = null), "Xbox 360" == V && /\bIEMobile\b/.test(t) && M.unshift("mobile mode"); else if (!/^(?:Chrome|IE|Opera)$/.test(U) && (!U || V || /Browser|Mobi/.test(U)) || "Windows CE" != G && !/Mobi/i.test(t)) if ("IE" == U && L) try {
                                null === i.external && M.unshift("platform preview")
                            } catch (e) {
                                M.unshift("embedded")
                            } else (/\bBlackBerry\b/.test(V) || /\bBB10\b/.test(t)) && (s = (RegExp(V.replace(/ +/g, " *") + "/([.\\d]+)", "i").exec(t) || 0)[1] || R) ? (s = [s, /BB10/.test(t)], G = (s[1] ? (V = null, K = "BlackBerry") : "Device Software") + " " + s[0], R = null) : this != g && "Wii" != V && (L && E || /Opera/.test(U) && /\b(?:MSIE|Firefox)\b/i.test(t) || "Firefox" == U && /\bOS X (?:\d+\.){2,}/.test(G) || "IE" == U && (G && !/^Win/.test(G) && R > 5.5 || /\bWindows XP\b/.test(G) && R > 8 || 8 == R && !/\bTrident\b/.test(t))) && !d.test(s = e.call(g, t.replace(d, "") + ";")) && s.name && (s = "ing as " + s.name + ((s = s.version) ? " " + s : ""), d.test(U) ? (/\bIE\b/.test(s) && "Mac OS" == G && (G = null), s = "identify" + s) : (s = "mask" + s, U = O ? p(O.replace(/([a-z])([A-Z])/g, "$1 $2")) : "Opera", /\bIE\b/.test(s) && (G = null), L || (R = null)), B = ["Presto"], M.push(s)); else U += " Mobile";
                            (s = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(t) || 0)[1]) && (s = [parseFloat(s.replace(/\.(\d)$/, ".0$1")), s], "Safari" == U && "+" == s[1].slice(-1) ? (U = "WebKit Nightly", F = "alpha", R = s[1].slice(0, -1)) : R != s[1] && R != (s[2] = (/\bSafari\/([\d.]+\+?)/i.exec(t) || 0)[1]) || (R = null), s[1] = (/\bChrome\/([\d.]+)/i.exec(t) || 0)[1], 537.36 == s[0] && 537.36 == s[2] && parseFloat(s[1]) >= 28 && "WebKit" == B && (B = ["Blink"]), L && (k || s[1]) ? (B && (B[1] = "like Chrome"), s = s[1] || ((s = s[0]) < 530 ? 1 : s < 532 ? 2 : s < 532.05 ? 3 : s < 533 ? 4 : s < 534.03 ? 5 : s < 534.07 ? 6 : s < 534.1 ? 7 : s < 534.13 ? 8 : s < 534.16 ? 9 : s < 534.24 ? 10 : s < 534.3 ? 11 : s < 535.01 ? 12 : s < 535.02 ? "13+" : s < 535.07 ? 15 : s < 535.11 ? 16 : s < 535.19 ? 17 : s < 536.05 ? 18 : s < 536.1 ? 19 : s < 537.01 ? 20 : s < 537.11 ? "21+" : s < 537.13 ? 23 : s < 537.18 ? 24 : s < 537.24 ? 25 : s < 537.36 ? 26 : "Blink" != B ? "27" : "28")) : (B && (B[1] = "like Safari"), s = (s = s[0]) < 400 ? 1 : s < 500 ? 2 : s < 526 ? 3 : s < 533 ? 4 : s < 534 ? "4+" : s < 535 ? 5 : s < 537 ? 6 : s < 538 ? 7 : s < 601 ? 8 : "8"), B && (B[1] += " " + (s += "number" == typeof s ? ".x" : /[.+]/.test(s) ? "" : "+")), "Safari" == U && (!R || parseInt(R) > 45) && (R = s)), "Opera" == U && (s = /\bzbov|zvav$/.exec(G)) ? (U += " ", M.unshift("desktop mode"), "zvav" == s ? (U += "Mini", R = null) : U += "Mobile", G = G.replace(RegExp(" *" + s + "$"), "")) : "Safari" == U && /\bChrome\b/.exec(B && B[1]) && (M.unshift("desktop mode"), U = "Chrome Mobile", R = null, /\bOS X\b/.test(G) ? (K = "Apple", G = "iOS 4.3+") : G = null), R && 0 == R.indexOf(s = /[\d.]+$/.exec(G)) && t.indexOf("/" + s + "-") > -1 && (G = T(G.replace(s, ""))), B && !/\b(?:Avant|Nook)\b/.test(U) && (/Browser|Lunascape|Maxthon/.test(U) || "Safari" != U && /^iOS/.test(G) && /\bSafari\b/.test(B[1]) || /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(U) && B[1]) && (s = B[B.length - 1]) && M.push(s), M.length && (M = ["(" + M.join("; ") + ")"]), K && V && V.indexOf(K) < 0 && M.push("on " + K), V && M.push((/^on /.test(M[M.length - 1]) ? "" : "on ") + V), G && (s = / ([\d.+]+)$/.exec(G), l = s && "/" == G.charAt(G.length - s[0].length - 1), G = {
                                architecture: 32,
                                family: s && !l ? G.replace(s[0], "") : G,
                                version: s ? s[1] : null,
                                toString: function () {
                                    var e = this.version;
                                    return this.family + (e && !l ? " " + e : "") + (64 == this.architecture ? " 64-bit" : "")
                                }
                            }), (s = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(P)) && !/\bi686\b/i.test(P) ? (G && (G.architecture = 64, G.family = G.family.replace(RegExp(" *" + s), "")), U && (/\bWOW64\b/i.test(t) || L && /\w(?:86|32)$/.test(a.cpuClass || a.platform) && !/\bWin64; x64\b/i.test(t)) && M.unshift("32-bit")) : G && /^OS X/.test(G.family) && "Chrome" == U && parseFloat(R) >= 39 && (G.architecture = 64), t || (t = null);
                            var j = {};
                            return j.description = t, j.layout = B && B[0], j.manufacturer = K, j.name = U, j.prerelease = F, j.product = V, j.ua = t, j.version = U && R, j.os = G || {
                                architecture: null,
                                family: null,
                                version: null,
                                toString: function () {
                                    return "null"
                                }
                            }, j.parse = e, j.toString = function () {
                                return this.description || ""
                            }, j.version && M.unshift(R), j.name && M.unshift(U), G && U && (G != String(G).split(" ")[0] || G != U.split(" ")[0] && !V) && M.push(V ? "(" + G + ")" : "on " + G), M.length && (j.description = M.join(" ")), j
                        }();
                        "function" == typeof define && "object" == typeof define.amd && define.amd ? (o.platform = w, define(function () {
                            return w
                        })) : a && r ? g(w, function (e, t) {
                            a[t] = e
                        }) : o.platform = w
                    }).call(this)
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            248: [function (e, t, i) {
                (function (e) {
                    "use strict";
                    !e.version || 0 === e.version.indexOf("v0.") || 0 === e.version.indexOf("v1.") && 0 !== e.version.indexOf("v1.8.") ? t.exports = {
                        nextTick: function (t, i, n, o) {
                            if ("function" != typeof t) throw new TypeError('"callback" argument must be a function');
                            var a, r, s = arguments.length;
                            switch (s) {
                                case 0:
                                case 1:
                                    return e.nextTick(t);
                                case 2:
                                    return e.nextTick(function () {
                                        t.call(null, i)
                                    });
                                case 3:
                                    return e.nextTick(function () {
                                        t.call(null, i, n)
                                    });
                                case 4:
                                    return e.nextTick(function () {
                                        t.call(null, i, n, o)
                                    });
                                default:
                                    for (a = new Array(s - 1), r = 0; r < a.length;) a[r++] = arguments[r];
                                    return e.nextTick(function () {
                                        t.apply(null, a)
                                    })
                            }
                        }
                    } : t.exports = e
                }).call(this, e("_process"))
            }, {_process: 249}],
            249: [function (e, t, i) {
                var n, o, a = t.exports = {};

                function r() {
                    throw new Error("setTimeout has not been defined")
                }

                function s() {
                    throw new Error("clearTimeout has not been defined")
                }

                function l(e) {
                    if (n === setTimeout) return setTimeout(e, 0);
                    if ((n === r || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0);
                    try {
                        return n(e, 0)
                    } catch (t) {
                        try {
                            return n.call(null, e, 0)
                        } catch (t) {
                            return n.call(this, e, 0)
                        }
                    }
                }

                !function () {
                    try {
                        n = "function" == typeof setTimeout ? setTimeout : r
                    } catch (e) {
                        n = r
                    }
                    try {
                        o = "function" == typeof clearTimeout ? clearTimeout : s
                    } catch (e) {
                        o = s
                    }
                }();
                var d, u = [], c = !1, h = -1;

                function f() {
                    c && d && (c = !1, d.length ? u = d.concat(u) : h = -1, u.length && p())
                }

                function p() {
                    if (!c) {
                        var e = l(f);
                        c = !0;
                        for (var t = u.length; t;) {
                            for (d = u, u = []; ++h < t;) d && d[h].run();
                            h = -1, t = u.length
                        }
                        d = null, c = !1, function (e) {
                            if (o === clearTimeout) return clearTimeout(e);
                            if ((o === s || !o) && clearTimeout) return o = clearTimeout, clearTimeout(e);
                            try {
                                o(e)
                            } catch (t) {
                                try {
                                    return o.call(null, e)
                                } catch (t) {
                                    return o.call(this, e)
                                }
                            }
                        }(e)
                    }
                }

                function g(e, t) {
                    this.fun = e, this.array = t
                }

                function m() {
                }

                a.nextTick = function (e) {
                    var t = new Array(arguments.length - 1);
                    if (arguments.length > 1) for (var i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
                    u.push(new g(e, t)), 1 !== u.length || c || l(p)
                }, g.prototype.run = function () {
                    this.fun.apply(null, this.array)
                }, a.title = "browser", a.browser = !0, a.env = {}, a.argv = [], a.version = "", a.versions = {}, a.on = m, a.addListener = m, a.once = m, a.off = m, a.removeListener = m, a.removeAllListeners = m, a.emit = m, a.prependListener = m, a.prependOnceListener = m, a.listeners = function (e) {
                    return []
                }, a.binding = function (e) {
                    throw new Error("process.binding is not supported")
                }, a.cwd = function () {
                    return "/"
                }, a.chdir = function (e) {
                    throw new Error("process.chdir is not supported")
                }, a.umask = function () {
                    return 0
                }
            }, {}],
            250: [function (e, t, i) {
                (function (e) {
                    !function (n) {
                        var o = "object" == typeof i && i && !i.nodeType && i,
                            a = "object" == typeof t && t && !t.nodeType && t, r = "object" == typeof e && e;
                        r.global !== r && r.window !== r && r.self !== r || (n = r);
                        var s, l, d = 2147483647, u = 36, c = 1, h = 26, f = 38, p = 700, g = 72, m = 128, v = "-",
                            y = /^xn--/, T = /[^\x20-\x7E]/, w = /[\x2E\u3002\uFF0E\uFF61]/g, k = {
                                overflow: "Overflow: input needs wider integers to process",
                                "not-basic": "Illegal input >= 0x80 (not a basic code point)",
                                "invalid-input": "Invalid input"
                            }, C = u - c, b = Math.floor, I = String.fromCharCode;

                        function S(e) {
                            throw new RangeError(k[e])
                        }

                        function _(e, t) {
                            for (var i = e.length, n = []; i--;) n[i] = t(e[i]);
                            return n
                        }

                        function D(e, t) {
                            var i = e.split("@"), n = "";
                            i.length > 1 && (n = i[0] + "@", e = i[1]);
                            var o = (e = e.replace(w, ".")).split("."), a = _(o, t).join(".");
                            return n + a
                        }

                        function A(e) {
                            for (var t, i, n = [], o = 0, a = e.length; o < a;) (t = e.charCodeAt(o++)) >= 55296 && t <= 56319 && o < a ? 56320 == (64512 & (i = e.charCodeAt(o++))) ? n.push(((1023 & t) << 10) + (1023 & i) + 65536) : (n.push(t), o--) : n.push(t);
                            return n
                        }

                        function N(e) {
                            return _(e, function (e) {
                                var t = "";
                                return e > 65535 && (t += I((e -= 65536) >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += I(e)
                            }).join("")
                        }

                        function x(e, t) {
                            return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
                        }

                        function E(e, t, i) {
                            var n = 0;
                            for (e = i ? b(e / p) : e >> 1, e += b(e / t); e > C * h >> 1; n += u) e = b(e / C);
                            return b(n + (C + 1) * e / (e + f))
                        }

                        function O(e) {
                            var t, i, n, o, a, r, s, l, f, p, y, T = [], w = e.length, k = 0, C = m, I = g;
                            for ((i = e.lastIndexOf(v)) < 0 && (i = 0), n = 0; n < i; ++n) e.charCodeAt(n) >= 128 && S("not-basic"), T.push(e.charCodeAt(n));
                            for (o = i > 0 ? i + 1 : 0; o < w;) {
                                for (a = k, r = 1, s = u; o >= w && S("invalid-input"), y = e.charCodeAt(o++), ((l = y - 48 < 10 ? y - 22 : y - 65 < 26 ? y - 65 : y - 97 < 26 ? y - 97 : u) >= u || l > b((d - k) / r)) && S("overflow"), k += l * r, !(l < (f = s <= I ? c : s >= I + h ? h : s - I)); s += u) r > b(d / (p = u - f)) && S("overflow"), r *= p;
                                t = T.length + 1, I = E(k - a, t, 0 == a), b(k / t) > d - C && S("overflow"), C += b(k / t), k %= t, T.splice(k++, 0, C)
                            }
                            return N(T)
                        }

                        function P(e) {
                            var t, i, n, o, a, r, s, l, f, p, y, T, w, k, C, _ = [];
                            for (e = A(e), T = e.length, t = m, i = 0, a = g, r = 0; r < T; ++r) (y = e[r]) < 128 && _.push(I(y));
                            for (n = o = _.length, o && _.push(v); n < T;) {
                                for (s = d, r = 0; r < T; ++r) (y = e[r]) >= t && y < s && (s = y);
                                for (s - t > b((d - i) / (w = n + 1)) && S("overflow"), i += (s - t) * w, t = s, r = 0; r < T; ++r) if ((y = e[r]) < t && ++i > d && S("overflow"), y == t) {
                                    for (l = i, f = u; !(l < (p = f <= a ? c : f >= a + h ? h : f - a)); f += u) C = l - p, k = u - p, _.push(I(x(p + C % k, 0))), l = b(C / k);
                                    _.push(I(x(l, 0))), a = E(i, w, n == o), i = 0, ++n
                                }
                                ++i, ++t
                            }
                            return _.join("")
                        }

                        if (s = {
                            version: "1.4.1",
                            ucs2: {decode: A, encode: N},
                            decode: O,
                            encode: P,
                            toASCII: function (e) {
                                return D(e, function (e) {
                                    return T.test(e) ? "xn--" + P(e) : e
                                })
                            },
                            toUnicode: function (e) {
                                return D(e, function (e) {
                                    return y.test(e) ? O(e.slice(4).toLowerCase()) : e
                                })
                            }
                        }, "function" == typeof define && "object" == typeof define.amd && define.amd) define("punycode", function () {
                            return s
                        }); else if (o && a) if (t.exports == o) a.exports = s; else for (l in s) s.hasOwnProperty(l) && (o[l] = s[l]); else n.punycode = s
                    }(this)
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            251: [function (e, t, i) {
                "use strict";

                function n(e, t) {
                    return Object.prototype.hasOwnProperty.call(e, t)
                }

                t.exports = function (e, t, i, a) {
                    t = t || "&", i = i || "=";
                    var r = {};
                    if ("string" != typeof e || 0 === e.length) return r;
                    var s = /\+/g;
                    e = e.split(t);
                    var l = 1e3;
                    a && "number" == typeof a.maxKeys && (l = a.maxKeys);
                    var d = e.length;
                    l > 0 && d > l && (d = l);
                    for (var u = 0; u < d; ++u) {
                        var c, h, f, p, g = e[u].replace(s, "%20"), m = g.indexOf(i);
                        m >= 0 ? (c = g.substr(0, m), h = g.substr(m + 1)) : (c = g, h = ""), f = decodeURIComponent(c), p = decodeURIComponent(h), n(r, f) ? o(r[f]) ? r[f].push(p) : r[f] = [r[f], p] : r[f] = p
                    }
                    return r
                };
                var o = Array.isArray || function (e) {
                    return "[object Array]" === Object.prototype.toString.call(e)
                }
            }, {}],
            252: [function (e, t, i) {
                "use strict";
                var n = function (e) {
                    switch (typeof e) {
                        case"string":
                            return e;
                        case"boolean":
                            return e ? "true" : "false";
                        case"number":
                            return isFinite(e) ? e : "";
                        default:
                            return ""
                    }
                };
                t.exports = function (e, t, i, s) {
                    return t = t || "&", i = i || "=", null === e && (e = void 0), "object" == typeof e ? a(r(e), function (r) {
                        var s = encodeURIComponent(n(r)) + i;
                        return o(e[r]) ? a(e[r], function (e) {
                            return s + encodeURIComponent(n(e))
                        }).join(t) : s + encodeURIComponent(n(e[r]))
                    }).join(t) : s ? encodeURIComponent(n(s)) + i + encodeURIComponent(n(e)) : ""
                };
                var o = Array.isArray || function (e) {
                    return "[object Array]" === Object.prototype.toString.call(e)
                };

                function a(e, t) {
                    if (e.map) return e.map(t);
                    for (var i = [], n = 0; n < e.length; n++) i.push(t(e[n], n));
                    return i
                }

                var r = Object.keys || function (e) {
                    var t = [];
                    for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && t.push(i);
                    return t
                }
            }, {}],
            253: [function (e, t, i) {
                "use strict";
                i.decode = i.parse = e("./decode"), i.encode = i.stringify = e("./encode")
            }, {"./decode": 251, "./encode": 252}],
            254: [function (e, t, i) {
                t.exports = e("./lib/_stream_duplex.js")
            }, {"./lib/_stream_duplex.js": 255}],
            255: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/keys"), a = (n = o) && n.__esModule ? n : {default: n},
                    r = e("process-nextick-args"), s = a.default || function (e) {
                        var t = [];
                        for (var i in e) t.push(i);
                        return t
                    };
                t.exports = p;
                var l = e("core-util-is");
                l.inherits = e("inherits");
                var d = e("./_stream_readable"), u = e("./_stream_writable");
                l.inherits(p, d);
                for (var c = s(u.prototype), h = 0; h < c.length; h++) {
                    var f = c[h];
                    p.prototype[f] || (p.prototype[f] = u.prototype[f])
                }

                function p(e) {
                    if (!(this instanceof p)) return new p(e);
                    d.call(this, e), u.call(this, e), e && !1 === e.readable && (this.readable = !1), e && !1 === e.writable && (this.writable = !1), this.allowHalfOpen = !0, e && !1 === e.allowHalfOpen && (this.allowHalfOpen = !1), this.once("end", g)
                }

                function g() {
                    this.allowHalfOpen || this._writableState.ended || r.nextTick(m, this)
                }

                function m(e) {
                    e.end()
                }

                Object.defineProperty(p.prototype, "writableHighWaterMark", {
                    enumerable: !1, get: function () {
                        return this._writableState.highWaterMark
                    }
                }), Object.defineProperty(p.prototype, "destroyed", {
                    get: function () {
                        return void 0 !== this._readableState && void 0 !== this._writableState && this._readableState.destroyed && this._writableState.destroyed
                    }, set: function (e) {
                        void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e, this._writableState.destroyed = e)
                    }
                }), p.prototype._destroy = function (e, t) {
                    this.push(null), this.end(), r.nextTick(t, e)
                }
            }, {
                "./_stream_readable": 257,
                "./_stream_writable": 259,
                "babel-runtime/core-js/object/keys": 55,
                "core-util-is": 186,
                inherits: 226,
                "process-nextick-args": 248
            }],
            256: [function (e, t, i) {
                "use strict";
                t.exports = a;
                var n = e("./_stream_transform"), o = e("core-util-is");

                function a(e) {
                    if (!(this instanceof a)) return new a(e);
                    n.call(this, e)
                }

                o.inherits = e("inherits"), o.inherits(a, n), a.prototype._transform = function (e, t, i) {
                    i(null, e)
                }
            }, {"./_stream_transform": 258, "core-util-is": 186, inherits: 226}],
            257: [function (e, t, i) {
                (function (i, n) {
                    "use strict";
                    var o, a = e("babel-runtime/core-js/object/get-prototype-of"),
                        r = (o = a) && o.__esModule ? o : {default: o}, s = e("process-nextick-args");
                    t.exports = C;
                    var l, d = e("isarray");
                    C.ReadableState = k, e("events").EventEmitter;
                    var u = function (e, t) {
                            return e.listeners(t).length
                        }, c = e("./internal/streams/stream"), h = e("safe-buffer").Buffer,
                        f = n.Uint8Array || function () {
                        }, p = e("core-util-is");
                    p.inherits = e("inherits");
                    var g = e("util"), m = void 0;
                    m = g && g.debuglog ? g.debuglog("stream") : function () {
                    };
                    var v, y = e("./internal/streams/BufferList"), T = e("./internal/streams/destroy");
                    p.inherits(C, c);
                    var w = ["error", "close", "destroy", "pause", "resume"];

                    function k(t, i) {
                        l = l || e("./_stream_duplex"), t = t || {};
                        var n = i instanceof l;
                        this.objectMode = !!t.objectMode, n && (this.objectMode = this.objectMode || !!t.readableObjectMode);
                        var o = t.highWaterMark, a = t.readableHighWaterMark, r = this.objectMode ? 16 : 16384;
                        this.highWaterMark = o || 0 === o ? o : n && (a || 0 === a) ? a : r, this.highWaterMark = Math.floor(this.highWaterMark), this.buffer = new y, this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.destroyed = !1, this.defaultEncoding = t.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, t.encoding && (v || (v = e("string_decoder/").StringDecoder), this.decoder = new v(t.encoding), this.encoding = t.encoding)
                    }

                    function C(t) {
                        if (l = l || e("./_stream_duplex"), !(this instanceof C)) return new C(t);
                        this._readableState = new k(t, this), this.readable = !0, t && ("function" == typeof t.read && (this._read = t.read), "function" == typeof t.destroy && (this._destroy = t.destroy)), c.call(this)
                    }

                    function b(e, t, i, n, o) {
                        var a, s = e._readableState;
                        return null === t ? (s.reading = !1, function (e, t) {
                            if (!t.ended) {
                                if (t.decoder) {
                                    var i = t.decoder.end();
                                    i && i.length && (t.buffer.push(i), t.length += t.objectMode ? 1 : i.length)
                                }
                                t.ended = !0, D(e)
                            }
                        }(e, s)) : (o || (a = function (e, t) {
                            var i, n;
                            return n = t, h.isBuffer(n) || n instanceof f || "string" == typeof t || void 0 === t || e.objectMode || (i = new TypeError("Invalid non-string/buffer chunk")), i
                        }(s, t)), a ? e.emit("error", a) : s.objectMode || t && t.length > 0 ? ("string" == typeof t || s.objectMode || (0, r.default)(t) === h.prototype || (t = function (e) {
                            return h.from(e)
                        }(t)), n ? s.endEmitted ? e.emit("error", new Error("stream.unshift() after end event")) : I(e, s, t, !0) : s.ended ? e.emit("error", new Error("stream.push() after EOF")) : (s.reading = !1, s.decoder && !i ? (t = s.decoder.write(t), s.objectMode || 0 !== t.length ? I(e, s, t, !1) : N(e, s)) : I(e, s, t, !1))) : n || (s.reading = !1)), function (e) {
                            return !e.ended && (e.needReadable || e.length < e.highWaterMark || 0 === e.length)
                        }(s)
                    }

                    function I(e, t, i, n) {
                        t.flowing && 0 === t.length && !t.sync ? (e.emit("data", i), e.read(0)) : (t.length += t.objectMode ? 1 : i.length, n ? t.buffer.unshift(i) : t.buffer.push(i), t.needReadable && D(e)), N(e, t)
                    }

                    Object.defineProperty(C.prototype, "destroyed", {
                        get: function () {
                            return void 0 !== this._readableState && this._readableState.destroyed
                        }, set: function (e) {
                            this._readableState && (this._readableState.destroyed = e)
                        }
                    }), C.prototype.destroy = T.destroy, C.prototype._undestroy = T.undestroy, C.prototype._destroy = function (e, t) {
                        this.push(null), t(e)
                    }, C.prototype.push = function (e, t) {
                        var i, n = this._readableState;
                        return n.objectMode ? i = !0 : "string" == typeof e && ((t = t || n.defaultEncoding) !== n.encoding && (e = h.from(e, t), t = ""), i = !0), b(this, e, t, !1, i)
                    }, C.prototype.unshift = function (e) {
                        return b(this, e, null, !0, !1)
                    }, C.prototype.isPaused = function () {
                        return !1 === this._readableState.flowing
                    }, C.prototype.setEncoding = function (t) {
                        return v || (v = e("string_decoder/").StringDecoder), this._readableState.decoder = new v(t), this._readableState.encoding = t, this
                    };
                    var S = 8388608;

                    function _(e, t) {
                        return e <= 0 || 0 === t.length && t.ended ? 0 : t.objectMode ? 1 : e != e ? t.flowing && t.length ? t.buffer.head.data.length : t.length : (e > t.highWaterMark && (t.highWaterMark = function (e) {
                            return e >= S ? e = S : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e
                        }(e)), e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0, 0))
                    }

                    function D(e) {
                        var t = e._readableState;
                        t.needReadable = !1, t.emittedReadable || (m("emitReadable", t.flowing), t.emittedReadable = !0, t.sync ? s.nextTick(A, e) : A(e))
                    }

                    function A(e) {
                        m("emit readable"), e.emit("readable"), P(e)
                    }

                    function N(e, t) {
                        t.readingMore || (t.readingMore = !0, s.nextTick(x, e, t))
                    }

                    function x(e, t) {
                        for (var i = t.length; !t.reading && !t.flowing && !t.ended && t.length < t.highWaterMark && (m("maybeReadMore read 0"), e.read(0), i !== t.length);) i = t.length;
                        t.readingMore = !1
                    }

                    function E(e) {
                        m("readable nexttick read 0"), e.read(0)
                    }

                    function O(e, t) {
                        t.reading || (m("resume read 0"), e.read(0)), t.resumeScheduled = !1, t.awaitDrain = 0, e.emit("resume"), P(e), t.flowing && !t.reading && e.read(0)
                    }

                    function P(e) {
                        var t = e._readableState;
                        for (m("flow", t.flowing); t.flowing && null !== e.read();) ;
                    }

                    function M(e, t) {
                        return 0 === t.length ? null : (t.objectMode ? i = t.buffer.shift() : !e || e >= t.length ? (i = t.decoder ? t.buffer.join("") : 1 === t.buffer.length ? t.buffer.head.data : t.buffer.concat(t.length), t.buffer.clear()) : i = function (e, t, i) {
                            var n;
                            return e < t.head.data.length ? (n = t.head.data.slice(0, e), t.head.data = t.head.data.slice(e)) : n = e === t.head.data.length ? t.shift() : i ? function (e, t) {
                                var i = t.head, n = 1, o = i.data;
                                for (e -= o.length; i = i.next;) {
                                    var a = i.data, r = e > a.length ? a.length : e;
                                    if (r === a.length ? o += a : o += a.slice(0, e), 0 == (e -= r)) {
                                        r === a.length ? (++n, i.next ? t.head = i.next : t.head = t.tail = null) : (t.head = i, i.data = a.slice(r));
                                        break
                                    }
                                    ++n
                                }
                                return t.length -= n, o
                            }(e, t) : function (e, t) {
                                var i = h.allocUnsafe(e), n = t.head, o = 1;
                                for (n.data.copy(i), e -= n.data.length; n = n.next;) {
                                    var a = n.data, r = e > a.length ? a.length : e;
                                    if (a.copy(i, i.length - e, 0, r), 0 == (e -= r)) {
                                        r === a.length ? (++o, n.next ? t.head = n.next : t.head = t.tail = null) : (t.head = n, n.data = a.slice(r));
                                        break
                                    }
                                    ++o
                                }
                                return t.length -= o, i
                            }(e, t), n
                        }(e, t.buffer, t.decoder), i);
                        var i
                    }

                    function F(e) {
                        var t = e._readableState;
                        if (t.length > 0) throw new Error('"endReadable()" called on non-empty stream');
                        t.endEmitted || (t.ended = !0, s.nextTick(L, t, e))
                    }

                    function L(e, t) {
                        e.endEmitted || 0 !== e.length || (e.endEmitted = !0, t.readable = !1, t.emit("end"))
                    }

                    function R(e, t) {
                        for (var i = 0, n = e.length; i < n; i++) if (e[i] === t) return i;
                        return -1
                    }

                    C.prototype.read = function (e) {
                        m("read", e), e = parseInt(e, 10);
                        var t = this._readableState, i = e;
                        if (0 !== e && (t.emittedReadable = !1), 0 === e && t.needReadable && (t.length >= t.highWaterMark || t.ended)) return m("read: emitReadable", t.length, t.ended), 0 === t.length && t.ended ? F(this) : D(this), null;
                        if (0 === (e = _(e, t)) && t.ended) return 0 === t.length && F(this), null;
                        var n, o = t.needReadable;
                        return m("need readable", o), (0 === t.length || t.length - e < t.highWaterMark) && m("length less than watermark", o = !0), t.ended || t.reading ? m("reading or ended", o = !1) : o && (m("do read"), t.reading = !0, t.sync = !0, 0 === t.length && (t.needReadable = !0), this._read(t.highWaterMark), t.sync = !1, t.reading || (e = _(i, t))), null === (n = e > 0 ? M(e, t) : null) ? (t.needReadable = !0, e = 0) : t.length -= e, 0 === t.length && (t.ended || (t.needReadable = !0), i !== e && t.ended && F(this)), null !== n && this.emit("data", n), n
                    }, C.prototype._read = function (e) {
                        this.emit("error", new Error("_read() is not implemented"))
                    }, C.prototype.pipe = function (e, t) {
                        var n = this, o = this._readableState;
                        switch (o.pipesCount) {
                            case 0:
                                o.pipes = e;
                                break;
                            case 1:
                                o.pipes = [o.pipes, e];
                                break;
                            default:
                                o.pipes.push(e)
                        }
                        o.pipesCount += 1, m("pipe count=%d opts=%j", o.pipesCount, t);
                        var a = (!t || !1 !== t.end) && e !== i.stdout && e !== i.stderr, r = a ? c : w;

                        function l(t, i) {
                            m("onunpipe"), t === n && i && !1 === i.hasUnpiped && (i.hasUnpiped = !0, m("cleanup"), e.removeListener("close", y), e.removeListener("finish", T), e.removeListener("drain", h), e.removeListener("error", v), e.removeListener("unpipe", l), n.removeListener("end", c), n.removeListener("end", w), n.removeListener("data", g), f = !0, !o.awaitDrain || e._writableState && !e._writableState.needDrain || h())
                        }

                        function c() {
                            m("onend"), e.end()
                        }

                        o.endEmitted ? s.nextTick(r) : n.once("end", r), e.on("unpipe", l);
                        var h = function (e) {
                            return function () {
                                var t = e._readableState;
                                m("pipeOnDrain", t.awaitDrain), t.awaitDrain && t.awaitDrain--, 0 === t.awaitDrain && u(e, "data") && (t.flowing = !0, P(e))
                            }
                        }(n);
                        e.on("drain", h);
                        var f = !1, p = !1;

                        function g(t) {
                            m("ondata"), p = !1;
                            var i = e.write(t);
                            !1 !== i || p || ((1 === o.pipesCount && o.pipes === e || o.pipesCount > 1 && -1 !== R(o.pipes, e)) && !f && (m("false write response, pause", n._readableState.awaitDrain), n._readableState.awaitDrain++, p = !0), n.pause())
                        }

                        function v(t) {
                            m("onerror", t), w(), e.removeListener("error", v), 0 === u(e, "error") && e.emit("error", t)
                        }

                        function y() {
                            e.removeListener("finish", T), w()
                        }

                        function T() {
                            m("onfinish"), e.removeListener("close", y), w()
                        }

                        function w() {
                            m("unpipe"), n.unpipe(e)
                        }

                        return n.on("data", g), function (e, t, i) {
                            if ("function" == typeof e.prependListener) return e.prependListener(t, i);
                            e._events && e._events[t] ? d(e._events[t]) ? e._events[t].unshift(i) : e._events[t] = [i, e._events[t]] : e.on(t, i)
                        }(e, "error", v), e.once("close", y), e.once("finish", T), e.emit("pipe", n), o.flowing || (m("pipe resume"), n.resume()), e
                    }, C.prototype.unpipe = function (e) {
                        var t = this._readableState, i = {hasUnpiped: !1};
                        if (0 === t.pipesCount) return this;
                        if (1 === t.pipesCount) return e && e !== t.pipes ? this : (e || (e = t.pipes), t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit("unpipe", this, i), this);
                        if (!e) {
                            var n = t.pipes, o = t.pipesCount;
                            t.pipes = null, t.pipesCount = 0, t.flowing = !1;
                            for (var a = 0; a < o; a++) n[a].emit("unpipe", this, i);
                            return this
                        }
                        var r = R(t.pipes, e);
                        return -1 === r ? this : (t.pipes.splice(r, 1), t.pipesCount -= 1, 1 === t.pipesCount && (t.pipes = t.pipes[0]), e.emit("unpipe", this, i), this)
                    }, C.prototype.on = function (e, t) {
                        var i = c.prototype.on.call(this, e, t);
                        if ("data" === e) !1 !== this._readableState.flowing && this.resume(); else if ("readable" === e) {
                            var n = this._readableState;
                            n.endEmitted || n.readableListening || (n.readableListening = n.needReadable = !0, n.emittedReadable = !1, n.reading ? n.length && D(this) : s.nextTick(E, this))
                        }
                        return i
                    }, C.prototype.addListener = C.prototype.on, C.prototype.resume = function () {
                        var e = this._readableState;
                        return e.flowing || (m("resume"), e.flowing = !0, function (e, t) {
                            t.resumeScheduled || (t.resumeScheduled = !0, s.nextTick(O, e, t))
                        }(this, e)), this
                    }, C.prototype.pause = function () {
                        return m("call pause flowing=%j", this._readableState.flowing), !1 !== this._readableState.flowing && (m("pause"), this._readableState.flowing = !1, this.emit("pause")), this
                    }, C.prototype.wrap = function (e) {
                        var t = this, i = this._readableState, n = !1;
                        for (var o in e.on("end", function () {
                            if (m("wrapped end"), i.decoder && !i.ended) {
                                var e = i.decoder.end();
                                e && e.length && t.push(e)
                            }
                            t.push(null)
                        }), e.on("data", function (o) {
                            if (m("wrapped data"), i.decoder && (o = i.decoder.write(o)), (!i.objectMode || null !== o && void 0 !== o) && (i.objectMode || o && o.length)) {
                                var a = t.push(o);
                                a || (n = !0, e.pause())
                            }
                        }), e) void 0 === this[o] && "function" == typeof e[o] && (this[o] = function (t) {
                            return function () {
                                return e[t].apply(e, arguments)
                            }
                        }(o));
                        for (var a = 0; a < w.length; a++) e.on(w[a], this.emit.bind(this, w[a]));
                        return this._read = function (t) {
                            m("wrapped _read", t), n && (n = !1, e.resume())
                        }, this
                    }, Object.defineProperty(C.prototype, "readableHighWaterMark", {
                        enumerable: !1, get: function () {
                            return this._readableState.highWaterMark
                        }
                    }), C._fromList = M
                }).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "./_stream_duplex": 255,
                "./internal/streams/BufferList": 260,
                "./internal/streams/destroy": 261,
                "./internal/streams/stream": 262,
                _process: 249,
                "babel-runtime/core-js/object/get-prototype-of": 54,
                "core-util-is": 186,
                events: 216,
                inherits: 226,
                isarray: 234,
                "process-nextick-args": 248,
                "safe-buffer": 269,
                "string_decoder/": 276,
                util: 68
            }],
            258: [function (e, t, i) {
                "use strict";
                t.exports = a;
                var n = e("./_stream_duplex"), o = e("core-util-is");

                function a(e) {
                    if (!(this instanceof a)) return new a(e);
                    n.call(this, e), this._transformState = {
                        afterTransform: function (e, t) {
                            var i = this._transformState;
                            i.transforming = !1;
                            var n = i.writecb;
                            if (!n) return this.emit("error", new Error("write callback called multiple times"));
                            i.writechunk = null, i.writecb = null, null != t && this.push(t), n(e);
                            var o = this._readableState;
                            o.reading = !1, (o.needReadable || o.length < o.highWaterMark) && this._read(o.highWaterMark)
                        }.bind(this),
                        needTransform: !1,
                        transforming: !1,
                        writecb: null,
                        writechunk: null,
                        writeencoding: null
                    }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && ("function" == typeof e.transform && (this._transform = e.transform), "function" == typeof e.flush && (this._flush = e.flush)), this.on("prefinish", r)
                }

                function r() {
                    var e = this;
                    "function" == typeof this._flush ? this._flush(function (t, i) {
                        s(e, t, i)
                    }) : s(this, null, null)
                }

                function s(e, t, i) {
                    if (t) return e.emit("error", t);
                    if (null != i && e.push(i), e._writableState.length) throw new Error("Calling transform done when ws.length != 0");
                    if (e._transformState.transforming) throw new Error("Calling transform done when still transforming");
                    return e.push(null)
                }

                o.inherits = e("inherits"), o.inherits(a, n), a.prototype.push = function (e, t) {
                    return this._transformState.needTransform = !1, n.prototype.push.call(this, e, t)
                }, a.prototype._transform = function (e, t, i) {
                    throw new Error("_transform() is not implemented")
                }, a.prototype._write = function (e, t, i) {
                    var n = this._transformState;
                    if (n.writecb = i, n.writechunk = e, n.writeencoding = t, !n.transforming) {
                        var o = this._readableState;
                        (n.needTransform || o.needReadable || o.length < o.highWaterMark) && this._read(o.highWaterMark)
                    }
                }, a.prototype._read = function (e) {
                    var t = this._transformState;
                    null !== t.writechunk && t.writecb && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) : t.needTransform = !0
                }, a.prototype._destroy = function (e, t) {
                    var i = this;
                    n.prototype._destroy.call(this, e, function (e) {
                        t(e), i.emit("close")
                    })
                }
            }, {"./_stream_duplex": 255, "core-util-is": 186, inherits: 226}],
            259: [function (e, t, i) {
                (function (i, n) {
                    "use strict";
                    var o = e("babel-runtime/core-js/object/define-property"), a = h(o),
                        r = e("babel-runtime/core-js/symbol/has-instance"), s = h(r),
                        l = e("babel-runtime/core-js/symbol"), d = h(l), u = e("babel-runtime/core-js/set-immediate"),
                        c = h(u);

                    function h(e) {
                        return e && e.__esModule ? e : {default: e}
                    }

                    var f = e("process-nextick-args");

                    function p(e) {
                        var t = this;
                        this.next = null, this.entry = null, this.finish = function () {
                            !function (e, t, i) {
                                var n = e.entry;
                                for (e.entry = null; n;) {
                                    var o = n.callback;
                                    t.pendingcb--, o(i), n = n.next
                                }
                                t.corkedRequestsFree ? t.corkedRequestsFree.next = e : t.corkedRequestsFree = e
                            }(t, e)
                        }
                    }

                    t.exports = _;
                    var g,
                        m = !i.browser && ["v0.10", "v0.9."].indexOf(i.version.slice(0, 5)) > -1 ? c.default : f.nextTick;
                    _.WritableState = S;
                    var v = e("core-util-is");
                    v.inherits = e("inherits");
                    var y, T = {deprecate: e("util-deprecate")}, w = e("./internal/streams/stream"),
                        k = e("safe-buffer").Buffer, C = n.Uint8Array || function () {
                        }, b = e("./internal/streams/destroy");

                    function I() {
                    }

                    function S(t, i) {
                        g = g || e("./_stream_duplex"), t = t || {};
                        var n = i instanceof g;
                        this.objectMode = !!t.objectMode, n && (this.objectMode = this.objectMode || !!t.writableObjectMode);
                        var o = t.highWaterMark, a = t.writableHighWaterMark, r = this.objectMode ? 16 : 16384;
                        this.highWaterMark = o || 0 === o ? o : n && (a || 0 === a) ? a : r, this.highWaterMark = Math.floor(this.highWaterMark), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
                        var s = !1 === t.decodeStrings;
                        this.decodeStrings = !s, this.defaultEncoding = t.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function (e) {
                            !function (e, t) {
                                var i = e._writableState, n = i.sync, o = i.writecb;
                                if (function (e) {
                                    e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0
                                }(i), t) !function (e, t, i, n, o) {
                                    --t.pendingcb, i ? (f.nextTick(o, n), f.nextTick(O, e, t), e._writableState.errorEmitted = !0, e.emit("error", n)) : (o(n), e._writableState.errorEmitted = !0, e.emit("error", n), O(e, t))
                                }(e, i, n, t, o); else {
                                    var a = x(i);
                                    a || i.corked || i.bufferProcessing || !i.bufferedRequest || N(e, i), n ? m(A, e, i, a, o) : A(e, i, a, o)
                                }
                            }(i, e)
                        }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new p(this)
                    }

                    function _(t) {
                        if (g = g || e("./_stream_duplex"), !(y.call(_, this) || this instanceof g)) return new _(t);
                        this._writableState = new S(t, this), this.writable = !0, t && ("function" == typeof t.write && (this._write = t.write), "function" == typeof t.writev && (this._writev = t.writev), "function" == typeof t.destroy && (this._destroy = t.destroy), "function" == typeof t.final && (this._final = t.final)), w.call(this)
                    }

                    function D(e, t, i, n, o, a, r) {
                        t.writelen = n, t.writecb = r, t.writing = !0, t.sync = !0, i ? e._writev(o, t.onwrite) : e._write(o, a, t.onwrite), t.sync = !1
                    }

                    function A(e, t, i, n) {
                        i || function (e, t) {
                            0 === t.length && t.needDrain && (t.needDrain = !1, e.emit("drain"))
                        }(e, t), t.pendingcb--, n(), O(e, t)
                    }

                    function N(e, t) {
                        t.bufferProcessing = !0;
                        var i = t.bufferedRequest;
                        if (e._writev && i && i.next) {
                            var n = t.bufferedRequestCount, o = new Array(n), a = t.corkedRequestsFree;
                            a.entry = i;
                            for (var r = 0, s = !0; i;) o[r] = i, i.isBuf || (s = !1), i = i.next, r += 1;
                            o.allBuffers = s, D(e, t, !0, t.length, o, "", a.finish), t.pendingcb++, t.lastBufferedRequest = null, a.next ? (t.corkedRequestsFree = a.next, a.next = null) : t.corkedRequestsFree = new p(t), t.bufferedRequestCount = 0
                        } else {
                            for (; i;) {
                                var l = i.chunk, d = i.encoding, u = i.callback, c = t.objectMode ? 1 : l.length;
                                if (D(e, t, !1, c, l, d, u), i = i.next, t.bufferedRequestCount--, t.writing) break
                            }
                            null === i && (t.lastBufferedRequest = null)
                        }
                        t.bufferedRequest = i, t.bufferProcessing = !1
                    }

                    function x(e) {
                        return e.ending && 0 === e.length && null === e.bufferedRequest && !e.finished && !e.writing
                    }

                    function E(e, t) {
                        e._final(function (i) {
                            t.pendingcb--, i && e.emit("error", i), t.prefinished = !0, e.emit("prefinish"), O(e, t)
                        })
                    }

                    function O(e, t) {
                        var i = x(t);
                        return i && (function (e, t) {
                            t.prefinished || t.finalCalled || ("function" == typeof e._final ? (t.pendingcb++, t.finalCalled = !0, f.nextTick(E, e, t)) : (t.prefinished = !0, e.emit("prefinish")))
                        }(e, t), 0 === t.pendingcb && (t.finished = !0, e.emit("finish"))), i
                    }

                    v.inherits(_, w), S.prototype.getBuffer = function () {
                        for (var e = this.bufferedRequest, t = []; e;) t.push(e), e = e.next;
                        return t
                    }, function () {
                        try {
                            Object.defineProperty(S.prototype, "buffer", {
                                get: T.deprecate(function () {
                                    return this.getBuffer()
                                }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
                            })
                        } catch (e) {
                        }
                    }(), "function" == typeof d.default && s.default && "function" == typeof Function.prototype[s.default] ? (y = Function.prototype[s.default], (0, a.default)(_, s.default, {
                        value: function (e) {
                            return !!y.call(this, e) || this === _ && e && e._writableState instanceof S
                        }
                    })) : y = function (e) {
                        return e instanceof this
                    }, _.prototype.pipe = function () {
                        this.emit("error", new Error("Cannot pipe, not readable"))
                    }, _.prototype.write = function (e, t, i) {
                        var n, o = this._writableState, a = !1,
                            r = !o.objectMode && (n = e, k.isBuffer(n) || n instanceof C);
                        return r && !k.isBuffer(e) && (e = function (e) {
                            return k.from(e)
                        }(e)), "function" == typeof t && (i = t, t = null), r ? t = "buffer" : t || (t = o.defaultEncoding), "function" != typeof i && (i = I), o.ended ? function (e, t) {
                            var i = new Error("write after end");
                            e.emit("error", i), f.nextTick(t, i)
                        }(this, i) : (r || function (e, t, i, n) {
                            var o = !0, a = !1;
                            return null === i ? a = new TypeError("May not write null values to stream") : "string" == typeof i || void 0 === i || t.objectMode || (a = new TypeError("Invalid non-string/buffer chunk")), a && (e.emit("error", a), f.nextTick(n, a), o = !1), o
                        }(this, o, e, i)) && (o.pendingcb++, a = function (e, t, i, n, o, a) {
                            if (!i) {
                                var r = function (e, t, i) {
                                    return e.objectMode || !1 === e.decodeStrings || "string" != typeof t || (t = k.from(t, i)), t
                                }(t, n, o);
                                n !== r && (i = !0, o = "buffer", n = r)
                            }
                            var s = t.objectMode ? 1 : n.length;
                            t.length += s;
                            var l = t.length < t.highWaterMark;
                            if (l || (t.needDrain = !0), t.writing || t.corked) {
                                var d = t.lastBufferedRequest;
                                t.lastBufferedRequest = {
                                    chunk: n,
                                    encoding: o,
                                    isBuf: i,
                                    callback: a,
                                    next: null
                                }, d ? d.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1
                            } else D(e, t, !1, s, n, o, a);
                            return l
                        }(this, o, r, e, t, i)), a
                    }, _.prototype.cork = function () {
                        var e = this._writableState;
                        e.corked++
                    }, _.prototype.uncork = function () {
                        var e = this._writableState;
                        e.corked && (e.corked--, e.writing || e.corked || e.finished || e.bufferProcessing || !e.bufferedRequest || N(this, e))
                    }, _.prototype.setDefaultEncoding = function (e) {
                        if ("string" == typeof e && (e = e.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + e);
                        return this._writableState.defaultEncoding = e, this
                    }, Object.defineProperty(_.prototype, "writableHighWaterMark", {
                        enumerable: !1, get: function () {
                            return this._writableState.highWaterMark
                        }
                    }), _.prototype._write = function (e, t, i) {
                        i(new Error("_write() is not implemented"))
                    }, _.prototype._writev = null, _.prototype.end = function (e, t, i) {
                        var n = this._writableState;
                        "function" == typeof e ? (i = e, e = null, t = null) : "function" == typeof t && (i = t, t = null), null !== e && void 0 !== e && this.write(e, t), n.corked && (n.corked = 1, this.uncork()), n.ending || n.finished || function (e, t, i) {
                            t.ending = !0, O(e, t), i && (t.finished ? f.nextTick(i) : e.once("finish", i)), t.ended = !0, e.writable = !1
                        }(this, n, i)
                    }, Object.defineProperty(_.prototype, "destroyed", {
                        get: function () {
                            return void 0 !== this._writableState && this._writableState.destroyed
                        }, set: function (e) {
                            this._writableState && (this._writableState.destroyed = e)
                        }
                    }), _.prototype.destroy = b.destroy, _.prototype._undestroy = b.undestroy, _.prototype._destroy = function (e, t) {
                        this.end(), t(e)
                    }
                }).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "./_stream_duplex": 255,
                "./internal/streams/destroy": 261,
                "./internal/streams/stream": 262,
                _process: 249,
                "babel-runtime/core-js/object/define-property": 51,
                "babel-runtime/core-js/set-immediate": 57,
                "babel-runtime/core-js/symbol": 59,
                "babel-runtime/core-js/symbol/has-instance": 60,
                "core-util-is": 186,
                inherits: 226,
                "process-nextick-args": 248,
                "safe-buffer": 269,
                "util-deprecate": 281
            }],
            260: [function (e, t, i) {
                "use strict";
                var n = e("safe-buffer").Buffer, o = e("util");
                t.exports = function () {
                    function e() {
                        !function (e, t) {
                            if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
                        }(this, e), this.head = null, this.tail = null, this.length = 0
                    }

                    return e.prototype.push = function (e) {
                        var t = {data: e, next: null};
                        this.length > 0 ? this.tail.next = t : this.head = t, this.tail = t, ++this.length
                    }, e.prototype.unshift = function (e) {
                        var t = {data: e, next: this.head};
                        0 === this.length && (this.tail = t), this.head = t, ++this.length
                    }, e.prototype.shift = function () {
                        if (0 !== this.length) {
                            var e = this.head.data;
                            return 1 === this.length ? this.head = this.tail = null : this.head = this.head.next, --this.length, e
                        }
                    }, e.prototype.clear = function () {
                        this.head = this.tail = null, this.length = 0
                    }, e.prototype.join = function (e) {
                        if (0 === this.length) return "";
                        for (var t = this.head, i = "" + t.data; t = t.next;) i += e + t.data;
                        return i
                    }, e.prototype.concat = function (e) {
                        if (0 === this.length) return n.alloc(0);
                        if (1 === this.length) return this.head.data;
                        for (var t, i, o, a = n.allocUnsafe(e >>> 0), r = this.head, s = 0; r;) t = r.data, i = a, o = s, t.copy(i, o), s += r.data.length, r = r.next;
                        return a
                    }, e
                }(), o && o.inspect && o.inspect.custom && (t.exports.prototype[o.inspect.custom] = function () {
                    var e = o.inspect({length: this.length});
                    return this.constructor.name + " " + e
                })
            }, {"safe-buffer": 269, util: 68}],
            261: [function (e, t, i) {
                "use strict";
                var n = e("process-nextick-args");

                function o(e, t) {
                    e.emit("error", t)
                }

                t.exports = {
                    destroy: function (e, t) {
                        var i = this, a = this._readableState && this._readableState.destroyed,
                            r = this._writableState && this._writableState.destroyed;
                        return a || r ? (t ? t(e) : !e || this._writableState && this._writableState.errorEmitted || n.nextTick(o, this, e), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function (e) {
                            !t && e ? (n.nextTick(o, i, e), i._writableState && (i._writableState.errorEmitted = !0)) : t && t(e)
                        }), this)
                    }, undestroy: function () {
                        this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1)
                    }
                }
            }, {"process-nextick-args": 248}],
            262: [function (e, t, i) {
                "use strict";
                t.exports = e("events").EventEmitter
            }, {events: 216}],
            263: [function (e, t, i) {
                t.exports = e("./readable").PassThrough
            }, {"./readable": 264}],
            264: [function (e, t, i) {
                (i = t.exports = e("./lib/_stream_readable.js")).Stream = i, i.Readable = i, i.Writable = e("./lib/_stream_writable.js"), i.Duplex = e("./lib/_stream_duplex.js"), i.Transform = e("./lib/_stream_transform.js"), i.PassThrough = e("./lib/_stream_passthrough.js")
            }, {
                "./lib/_stream_duplex.js": 255,
                "./lib/_stream_passthrough.js": 256,
                "./lib/_stream_readable.js": 257,
                "./lib/_stream_transform.js": 258,
                "./lib/_stream_writable.js": 259
            }],
            265: [function (e, t, i) {
                t.exports = e("./readable").Transform
            }, {"./readable": 264}],
            266: [function (e, t, i) {
                t.exports = e("./lib/_stream_writable.js")
            }, {"./lib/_stream_writable.js": 259}],
            267: [function (e, t, i) {
                var n = function () {
                        return this
                    }() || Function("return this")(),
                    o = n.regeneratorRuntime && Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime") >= 0,
                    a = o && n.regeneratorRuntime;
                if (n.regeneratorRuntime = void 0, t.exports = e("./runtime"), o) n.regeneratorRuntime = a; else try {
                    delete n.regeneratorRuntime
                } catch (e) {
                    n.regeneratorRuntime = void 0
                }
            }, {"./runtime": 268}],
            268: [function (e, t, i) {
                !function (e) {
                    "use strict";
                    var i, n = Object.prototype, o = n.hasOwnProperty, a = "function" == typeof Symbol ? Symbol : {},
                        r = a.iterator || "@@iterator", s = a.asyncIterator || "@@asyncIterator",
                        l = a.toStringTag || "@@toStringTag", d = "object" == typeof t, u = e.regeneratorRuntime;
                    if (u) d && (t.exports = u); else {
                        (u = e.regeneratorRuntime = d ? t.exports : {}).wrap = w;
                        var c = "suspendedStart", h = "suspendedYield", f = "executing", p = "completed", g = {},
                            m = {};
                        m[r] = function () {
                            return this
                        };
                        var v = Object.getPrototypeOf, y = v && v(v(E([])));
                        y && y !== n && o.call(y, r) && (m = y);
                        var T = I.prototype = C.prototype = Object.create(m);
                        b.prototype = T.constructor = I, I.constructor = b, I[l] = b.displayName = "GeneratorFunction", u.isGeneratorFunction = function (e) {
                            var t = "function" == typeof e && e.constructor;
                            return !!t && (t === b || "GeneratorFunction" === (t.displayName || t.name))
                        }, u.mark = function (e) {
                            return Object.setPrototypeOf ? Object.setPrototypeOf(e, I) : (e.__proto__ = I, l in e || (e[l] = "GeneratorFunction")), e.prototype = Object.create(T), e
                        }, u.awrap = function (e) {
                            return {__await: e}
                        }, S(_.prototype), _.prototype[s] = function () {
                            return this
                        }, u.AsyncIterator = _, u.async = function (e, t, i, n) {
                            var o = new _(w(e, t, i, n));
                            return u.isGeneratorFunction(t) ? o : o.next().then(function (e) {
                                return e.done ? e.value : o.next()
                            })
                        }, S(T), T[l] = "Generator", T[r] = function () {
                            return this
                        }, T.toString = function () {
                            return "[object Generator]"
                        }, u.keys = function (e) {
                            var t = [];
                            for (var i in e) t.push(i);
                            return t.reverse(), function i() {
                                for (; t.length;) {
                                    var n = t.pop();
                                    if (n in e) return i.value = n, i.done = !1, i
                                }
                                return i.done = !0, i
                            }
                        }, u.values = E, x.prototype = {
                            constructor: x, reset: function (e) {
                                if (this.prev = 0, this.next = 0, this.sent = this._sent = i, this.done = !1, this.delegate = null, this.method = "next", this.arg = i, this.tryEntries.forEach(N), !e) for (var t in this) "t" === t.charAt(0) && o.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = i)
                            }, stop: function () {
                                this.done = !0;
                                var e = this.tryEntries[0], t = e.completion;
                                if ("throw" === t.type) throw t.arg;
                                return this.rval
                            }, dispatchException: function (e) {
                                if (this.done) throw e;
                                var t = this;

                                function n(n, o) {
                                    return s.type = "throw", s.arg = e, t.next = n, o && (t.method = "next", t.arg = i), !!o
                                }

                                for (var a = this.tryEntries.length - 1; a >= 0; --a) {
                                    var r = this.tryEntries[a], s = r.completion;
                                    if ("root" === r.tryLoc) return n("end");
                                    if (r.tryLoc <= this.prev) {
                                        var l = o.call(r, "catchLoc"), d = o.call(r, "finallyLoc");
                                        if (l && d) {
                                            if (this.prev < r.catchLoc) return n(r.catchLoc, !0);
                                            if (this.prev < r.finallyLoc) return n(r.finallyLoc)
                                        } else if (l) {
                                            if (this.prev < r.catchLoc) return n(r.catchLoc, !0)
                                        } else {
                                            if (!d) throw new Error("try statement without catch or finally");
                                            if (this.prev < r.finallyLoc) return n(r.finallyLoc)
                                        }
                                    }
                                }
                            }, abrupt: function (e, t) {
                                for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                                    var n = this.tryEntries[i];
                                    if (n.tryLoc <= this.prev && o.call(n, "finallyLoc") && this.prev < n.finallyLoc) {
                                        var a = n;
                                        break
                                    }
                                }
                                a && ("break" === e || "continue" === e) && a.tryLoc <= t && t <= a.finallyLoc && (a = null);
                                var r = a ? a.completion : {};
                                return r.type = e, r.arg = t, a ? (this.method = "next", this.next = a.finallyLoc, g) : this.complete(r)
                            }, complete: function (e, t) {
                                if ("throw" === e.type) throw e.arg;
                                return "break" === e.type || "continue" === e.type ? this.next = e.arg : "return" === e.type ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : "normal" === e.type && t && (this.next = t), g
                            }, finish: function (e) {
                                for (var t = this.tryEntries.length - 1; t >= 0; --t) {
                                    var i = this.tryEntries[t];
                                    if (i.finallyLoc === e) return this.complete(i.completion, i.afterLoc), N(i), g
                                }
                            }, catch: function (e) {
                                for (var t = this.tryEntries.length - 1; t >= 0; --t) {
                                    var i = this.tryEntries[t];
                                    if (i.tryLoc === e) {
                                        var n = i.completion;
                                        if ("throw" === n.type) {
                                            var o = n.arg;
                                            N(i)
                                        }
                                        return o
                                    }
                                }
                                throw new Error("illegal catch attempt")
                            }, delegateYield: function (e, t, n) {
                                return this.delegate = {
                                    iterator: E(e),
                                    resultName: t,
                                    nextLoc: n
                                }, "next" === this.method && (this.arg = i), g
                            }
                        }
                    }

                    function w(e, t, i, n) {
                        var o = t && t.prototype instanceof C ? t : C, a = Object.create(o.prototype),
                            r = new x(n || []);
                        return a._invoke = function (e, t, i) {
                            var n = c;
                            return function (o, a) {
                                if (n === f) throw new Error("Generator is already running");
                                if (n === p) {
                                    if ("throw" === o) throw a;
                                    return O()
                                }
                                for (i.method = o, i.arg = a; ;) {
                                    var r = i.delegate;
                                    if (r) {
                                        var s = D(r, i);
                                        if (s) {
                                            if (s === g) continue;
                                            return s
                                        }
                                    }
                                    if ("next" === i.method) i.sent = i._sent = i.arg; else if ("throw" === i.method) {
                                        if (n === c) throw n = p, i.arg;
                                        i.dispatchException(i.arg)
                                    } else "return" === i.method && i.abrupt("return", i.arg);
                                    n = f;
                                    var l = k(e, t, i);
                                    if ("normal" === l.type) {
                                        if (n = i.done ? p : h, l.arg === g) continue;
                                        return {value: l.arg, done: i.done}
                                    }
                                    "throw" === l.type && (n = p, i.method = "throw", i.arg = l.arg)
                                }
                            }
                        }(e, i, r), a
                    }

                    function k(e, t, i) {
                        try {
                            return {type: "normal", arg: e.call(t, i)}
                        } catch (e) {
                            return {type: "throw", arg: e}
                        }
                    }

                    function C() {
                    }

                    function b() {
                    }

                    function I() {
                    }

                    function S(e) {
                        ["next", "throw", "return"].forEach(function (t) {
                            e[t] = function (e) {
                                return this._invoke(t, e)
                            }
                        })
                    }

                    function _(e) {
                        var t;
                        this._invoke = function (i, n) {
                            function a() {
                                return new Promise(function (t, a) {
                                    !function t(i, n, a, r) {
                                        var s = k(e[i], e, n);
                                        if ("throw" !== s.type) {
                                            var l = s.arg, d = l.value;
                                            return d && "object" == typeof d && o.call(d, "__await") ? Promise.resolve(d.__await).then(function (e) {
                                                t("next", e, a, r)
                                            }, function (e) {
                                                t("throw", e, a, r)
                                            }) : Promise.resolve(d).then(function (e) {
                                                l.value = e, a(l)
                                            }, r)
                                        }
                                        r(s.arg)
                                    }(i, n, t, a)
                                })
                            }

                            return t = t ? t.then(a, a) : a()
                        }
                    }

                    function D(e, t) {
                        var n = e.iterator[t.method];
                        if (n === i) {
                            if (t.delegate = null, "throw" === t.method) {
                                if (e.iterator.return && (t.method = "return", t.arg = i, D(e, t), "throw" === t.method)) return g;
                                t.method = "throw", t.arg = new TypeError("The iterator does not provide a 'throw' method")
                            }
                            return g
                        }
                        var o = k(n, e.iterator, t.arg);
                        if ("throw" === o.type) return t.method = "throw", t.arg = o.arg, t.delegate = null, g;
                        var a = o.arg;
                        return a ? a.done ? (t[e.resultName] = a.value, t.next = e.nextLoc, "return" !== t.method && (t.method = "next", t.arg = i), t.delegate = null, g) : a : (t.method = "throw", t.arg = new TypeError("iterator result is not an object"), t.delegate = null, g)
                    }

                    function A(e) {
                        var t = {tryLoc: e[0]};
                        1 in e && (t.catchLoc = e[1]), 2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), this.tryEntries.push(t)
                    }

                    function N(e) {
                        var t = e.completion || {};
                        t.type = "normal", delete t.arg, e.completion = t
                    }

                    function x(e) {
                        this.tryEntries = [{tryLoc: "root"}], e.forEach(A, this), this.reset(!0)
                    }

                    function E(e) {
                        if (e) {
                            var t = e[r];
                            if (t) return t.call(e);
                            if ("function" == typeof e.next) return e;
                            if (!isNaN(e.length)) {
                                var n = -1, a = function t() {
                                    for (; ++n < e.length;) if (o.call(e, n)) return t.value = e[n], t.done = !1, t;
                                    return t.value = i, t.done = !0, t
                                };
                                return a.next = a
                            }
                        }
                        return {next: O}
                    }

                    function O() {
                        return {value: i, done: !0}
                    }
                }(function () {
                    return this
                }() || Function("return this")())
            }, {}],
            269: [function (e, t, i) {
                var n = e("buffer"), o = n.Buffer;

                function a(e, t) {
                    for (var i in e) t[i] = e[i]
                }

                function r(e, t, i) {
                    return o(e, t, i)
                }

                o.from && o.alloc && o.allocUnsafe && o.allocUnsafeSlow ? t.exports = n : (a(n, i), i.Buffer = r), a(o, r), r.from = function (e, t, i) {
                    if ("number" == typeof e) throw new TypeError("Argument must not be a number");
                    return o(e, t, i)
                }, r.alloc = function (e, t, i) {
                    if ("number" != typeof e) throw new TypeError("Argument must be a number");
                    var n = o(e);
                    return void 0 !== t ? "string" == typeof i ? n.fill(t, i) : n.fill(t) : n.fill(0), n
                }, r.allocUnsafe = function (e) {
                    if ("number" != typeof e) throw new TypeError("Argument must be a number");
                    return o(e)
                }, r.allocUnsafeSlow = function (e) {
                    if ("number" != typeof e) throw new TypeError("Argument must be a number");
                    return n.SlowBuffer(e)
                }
            }, {buffer: 70}],
            270: [function (e, t, i) {
                (function (t) {
                    "use strict";
                    var n = e("babel-runtime/core-js/string/from-code-point"), o = g(n),
                        a = e("babel-runtime/core-js/json/stringify"), r = g(a), s = e("babel-runtime/helpers/typeof"),
                        l = g(s), d = e("babel-runtime/core-js/object/define-property"), u = g(d),
                        c = e("babel-runtime/core-js/object/keys"), h = g(c),
                        f = e("babel-runtime/core-js/object/create"), p = g(f);

                    function g(e) {
                        return e && e.__esModule ? e : {default: e}
                    }

                    !function (i) {
                        i.parser = function (e, t) {
                            return new s(e, t)
                        }, i.SAXParser = s, i.SAXStream = c, i.createStream = function (e, t) {
                            return new c(e, t)
                        }, i.MAX_BUFFER_LENGTH = 65536;
                        var n,
                            a = ["comment", "sgmlDecl", "textNode", "tagName", "doctype", "procInstName", "procInstBody", "entity", "attribName", "attribValue", "cdata", "script"];

                        function s(e, t) {
                            if (!(this instanceof s)) return new s(e, t);
                            !function (e) {
                                for (var t = 0, i = a.length; t < i; t++) e[a[t]] = ""
                            }(this), this.q = this.c = "", this.bufferCheckPosition = i.MAX_BUFFER_LENGTH, this.opt = t || {}, this.opt.lowercase = this.opt.lowercase || this.opt.lowercasetags, this.looseCase = this.opt.lowercase ? "toLowerCase" : "toUpperCase", this.tags = [], this.closed = this.closedRoot = this.sawRoot = !1, this.tag = this.error = null, this.strict = !!e, this.noscript = !(!e && !this.opt.noscript), this.state = E.BEGIN, this.strictEntities = this.opt.strictEntities, this.ENTITIES = this.strictEntities ? (0, p.default)(i.XML_ENTITIES) : (0, p.default)(i.ENTITIES), this.attribList = [], this.opt.xmlns && (this.ns = (0, p.default)(y)), this.trackPosition = !1 !== this.opt.position, this.trackPosition && (this.position = this.line = this.column = 0), P(this, "onready")
                        }

                        i.EVENTS = ["text", "processinginstruction", "sgmldeclaration", "doctype", "comment", "opentagstart", "attribute", "opentag", "closetag", "opencdata", "cdata", "closecdata", "error", "end", "ready", "script", "opennamespace", "closenamespace"], p.default || (Object.create = function (e) {
                            function t() {
                            }

                            t.prototype = e;
                            var i = new t;
                            return i
                        }), h.default || (Object.keys = function (e) {
                            var t = [];
                            for (var i in e) e.hasOwnProperty(i) && t.push(i);
                            return t
                        }), s.prototype = {
                            end: function () {
                                B(this)
                            }, write: function (e) {
                                if (this.error) throw this.error;
                                if (this.closed) return R(this, "Cannot write after close. Assign an onready handler.");
                                if (null === e) return B(this);
                                "object" === (void 0 === e ? "undefined" : (0, l.default)(e)) && (e = e.toString());
                                for (var t = 0, n = ""; n = X(e, t++), this.c = n, n;) switch (this.trackPosition && (this.position++, "\n" === n ? (this.line++, this.column = 0) : this.column++), this.state) {
                                    case E.BEGIN:
                                        if (this.state = E.BEGIN_WHITESPACE, "\ufeff" === n) continue;
                                        z(this, n);
                                        continue;
                                    case E.BEGIN_WHITESPACE:
                                        z(this, n);
                                        continue;
                                    case E.TEXT:
                                        if (this.sawRoot && !this.closedRoot) {
                                            for (var o = t - 1; n && "<" !== n && "&" !== n;) (n = X(e, t++)) && this.trackPosition && (this.position++, "\n" === n ? (this.line++, this.column = 0) : this.column++);
                                            this.textNode += e.substring(o, t - 1)
                                        }
                                        "<" !== n || this.sawRoot && this.closedRoot && !this.strict ? (b(n) || this.sawRoot && !this.closedRoot || U(this, "Text data outside of root node."), "&" === n ? this.state = E.TEXT_ENTITY : this.textNode += n) : (this.state = E.OPEN_WAKA, this.startTagPosition = this.position);
                                        continue;
                                    case E.SCRIPT:
                                        "<" === n ? this.state = E.SCRIPT_ENDING : this.script += n;
                                        continue;
                                    case E.SCRIPT_ENDING:
                                        "/" === n ? this.state = E.CLOSE_TAG : (this.script += "<" + n, this.state = E.SCRIPT);
                                        continue;
                                    case E.OPEN_WAKA:
                                        if ("!" === n) this.state = E.SGML_DECL, this.sgmlDecl = ""; else if (b(n)) ; else if (_(T, n)) this.state = E.OPEN_TAG, this.tagName = n; else if ("/" === n) this.state = E.CLOSE_TAG, this.tagName = ""; else if ("?" === n) this.state = E.PROC_INST, this.procInstName = this.procInstBody = ""; else {
                                            if (U(this, "Unencoded <"), this.startTagPosition + 1 < this.position) {
                                                var r = this.position - this.startTagPosition;
                                                n = new Array(r).join(" ") + n
                                            }
                                            this.textNode += "<" + n, this.state = E.TEXT
                                        }
                                        continue;
                                    case E.SGML_DECL:
                                        (this.sgmlDecl + n).toUpperCase() === f ? (M(this, "onopencdata"), this.state = E.CDATA, this.sgmlDecl = "", this.cdata = "") : this.sgmlDecl + n === "--" ? (this.state = E.COMMENT, this.comment = "", this.sgmlDecl = "") : (this.sgmlDecl + n).toUpperCase() === g ? (this.state = E.DOCTYPE, (this.doctype || this.sawRoot) && U(this, "Inappropriately located doctype declaration"), this.doctype = "", this.sgmlDecl = "") : ">" === n ? (M(this, "onsgmldeclaration", this.sgmlDecl), this.sgmlDecl = "", this.state = E.TEXT) : I(n) ? (this.state = E.SGML_DECL_QUOTED, this.sgmlDecl += n) : this.sgmlDecl += n;
                                        continue;
                                    case E.SGML_DECL_QUOTED:
                                        n === this.q && (this.state = E.SGML_DECL, this.q = ""), this.sgmlDecl += n;
                                        continue;
                                    case E.DOCTYPE:
                                        ">" === n ? (this.state = E.TEXT, M(this, "ondoctype", this.doctype), this.doctype = !0) : (this.doctype += n, "[" === n ? this.state = E.DOCTYPE_DTD : I(n) && (this.state = E.DOCTYPE_QUOTED, this.q = n));
                                        continue;
                                    case E.DOCTYPE_QUOTED:
                                        this.doctype += n, n === this.q && (this.q = "", this.state = E.DOCTYPE);
                                        continue;
                                    case E.DOCTYPE_DTD:
                                        this.doctype += n, "]" === n ? this.state = E.DOCTYPE : I(n) && (this.state = E.DOCTYPE_DTD_QUOTED, this.q = n);
                                        continue;
                                    case E.DOCTYPE_DTD_QUOTED:
                                        this.doctype += n, n === this.q && (this.state = E.DOCTYPE_DTD, this.q = "");
                                        continue;
                                    case E.COMMENT:
                                        "-" === n ? this.state = E.COMMENT_ENDING : this.comment += n;
                                        continue;
                                    case E.COMMENT_ENDING:
                                        "-" === n ? (this.state = E.COMMENT_ENDED, this.comment = L(this.opt, this.comment), this.comment && M(this, "oncomment", this.comment), this.comment = "") : (this.comment += "-" + n, this.state = E.COMMENT);
                                        continue;
                                    case E.COMMENT_ENDED:
                                        ">" !== n ? (U(this, "Malformed comment"), this.comment += "--" + n, this.state = E.COMMENT) : this.state = E.TEXT;
                                        continue;
                                    case E.CDATA:
                                        "]" === n ? this.state = E.CDATA_ENDING : this.cdata += n;
                                        continue;
                                    case E.CDATA_ENDING:
                                        "]" === n ? this.state = E.CDATA_ENDING_2 : (this.cdata += "]" + n, this.state = E.CDATA);
                                        continue;
                                    case E.CDATA_ENDING_2:
                                        ">" === n ? (this.cdata && M(this, "oncdata", this.cdata), M(this, "onclosecdata"), this.cdata = "", this.state = E.TEXT) : "]" === n ? this.cdata += "]" : (this.cdata += "]]" + n, this.state = E.CDATA);
                                        continue;
                                    case E.PROC_INST:
                                        "?" === n ? this.state = E.PROC_INST_ENDING : b(n) ? this.state = E.PROC_INST_BODY : this.procInstName += n;
                                        continue;
                                    case E.PROC_INST_BODY:
                                        if (!this.procInstBody && b(n)) continue;
                                        "?" === n ? this.state = E.PROC_INST_ENDING : this.procInstBody += n;
                                        continue;
                                    case E.PROC_INST_ENDING:
                                        ">" === n ? (M(this, "onprocessinginstruction", {
                                            name: this.procInstName,
                                            body: this.procInstBody
                                        }), this.procInstName = this.procInstBody = "", this.state = E.TEXT) : (this.procInstBody += "?" + n, this.state = E.PROC_INST_BODY);
                                        continue;
                                    case E.OPEN_TAG:
                                        _(w, n) ? this.tagName += n : (V(this), ">" === n ? W(this) : "/" === n ? this.state = E.OPEN_TAG_SLASH : (b(n) || U(this, "Invalid character in tag name"), this.state = E.ATTRIB));
                                        continue;
                                    case E.OPEN_TAG_SLASH:
                                        ">" === n ? (W(this, !0), j(this)) : (U(this, "Forward-slash in opening tag not followed by >"), this.state = E.ATTRIB);
                                        continue;
                                    case E.ATTRIB:
                                        if (b(n)) continue;
                                        ">" === n ? W(this) : "/" === n ? this.state = E.OPEN_TAG_SLASH : _(T, n) ? (this.attribName = n, this.attribValue = "", this.state = E.ATTRIB_NAME) : U(this, "Invalid attribute name");
                                        continue;
                                    case E.ATTRIB_NAME:
                                        "=" === n ? this.state = E.ATTRIB_VALUE : ">" === n ? (U(this, "Attribute without value"), this.attribValue = this.attribName, G(this), W(this)) : b(n) ? this.state = E.ATTRIB_NAME_SAW_WHITE : _(w, n) ? this.attribName += n : U(this, "Invalid attribute name");
                                        continue;
                                    case E.ATTRIB_NAME_SAW_WHITE:
                                        if ("=" === n) this.state = E.ATTRIB_VALUE; else {
                                            if (b(n)) continue;
                                            U(this, "Attribute without value"), this.tag.attributes[this.attribName] = "", this.attribValue = "", M(this, "onattribute", {
                                                name: this.attribName,
                                                value: ""
                                            }), this.attribName = "", ">" === n ? W(this) : _(T, n) ? (this.attribName = n, this.state = E.ATTRIB_NAME) : (U(this, "Invalid attribute name"), this.state = E.ATTRIB)
                                        }
                                        continue;
                                    case E.ATTRIB_VALUE:
                                        if (b(n)) continue;
                                        I(n) ? (this.q = n, this.state = E.ATTRIB_VALUE_QUOTED) : (U(this, "Unquoted attribute value"), this.state = E.ATTRIB_VALUE_UNQUOTED, this.attribValue = n);
                                        continue;
                                    case E.ATTRIB_VALUE_QUOTED:
                                        if (n !== this.q) {
                                            "&" === n ? this.state = E.ATTRIB_VALUE_ENTITY_Q : this.attribValue += n;
                                            continue
                                        }
                                        G(this), this.q = "", this.state = E.ATTRIB_VALUE_CLOSED;
                                        continue;
                                    case E.ATTRIB_VALUE_CLOSED:
                                        b(n) ? this.state = E.ATTRIB : ">" === n ? W(this) : "/" === n ? this.state = E.OPEN_TAG_SLASH : _(T, n) ? (U(this, "No whitespace between attributes"), this.attribName = n, this.attribValue = "", this.state = E.ATTRIB_NAME) : U(this, "Invalid attribute name");
                                        continue;
                                    case E.ATTRIB_VALUE_UNQUOTED:
                                        if (!S(n)) {
                                            "&" === n ? this.state = E.ATTRIB_VALUE_ENTITY_U : this.attribValue += n;
                                            continue
                                        }
                                        G(this), ">" === n ? W(this) : this.state = E.ATTRIB;
                                        continue;
                                    case E.CLOSE_TAG:
                                        if (this.tagName) ">" === n ? j(this) : _(w, n) ? this.tagName += n : this.script ? (this.script += "</" + this.tagName, this.tagName = "", this.state = E.SCRIPT) : (b(n) || U(this, "Invalid tagname in closing tag"), this.state = E.CLOSE_TAG_SAW_WHITE); else {
                                            if (b(n)) continue;
                                            D(T, n) ? this.script ? (this.script += "</" + n, this.state = E.SCRIPT) : U(this, "Invalid tagname in closing tag.") : this.tagName = n
                                        }
                                        continue;
                                    case E.CLOSE_TAG_SAW_WHITE:
                                        if (b(n)) continue;
                                        ">" === n ? j(this) : U(this, "Invalid characters in closing tag");
                                        continue;
                                    case E.TEXT_ENTITY:
                                    case E.ATTRIB_VALUE_ENTITY_Q:
                                    case E.ATTRIB_VALUE_ENTITY_U:
                                        var s, d;
                                        switch (this.state) {
                                            case E.TEXT_ENTITY:
                                                s = E.TEXT, d = "textNode";
                                                break;
                                            case E.ATTRIB_VALUE_ENTITY_Q:
                                                s = E.ATTRIB_VALUE_QUOTED, d = "attribValue";
                                                break;
                                            case E.ATTRIB_VALUE_ENTITY_U:
                                                s = E.ATTRIB_VALUE_UNQUOTED, d = "attribValue"
                                        }
                                        ";" === n ? (this[d] += H(this), this.entity = "", this.state = s) : _(this.entity.length ? C : k, n) ? this.entity += n : (U(this, "Invalid character in entity name"), this[d] += "&" + this.entity + n, this.entity = "", this.state = s);
                                        continue;
                                    default:
                                        throw new Error(this, "Unknown state: " + this.state)
                                }
                                return this.position >= this.bufferCheckPosition && function (e) {
                                    for (var t = Math.max(i.MAX_BUFFER_LENGTH, 10), n = 0, o = 0, r = a.length; o < r; o++) {
                                        var s = e[a[o]].length;
                                        if (s > t) switch (a[o]) {
                                            case"textNode":
                                                F(e);
                                                break;
                                            case"cdata":
                                                M(e, "oncdata", e.cdata), e.cdata = "";
                                                break;
                                            case"script":
                                                M(e, "onscript", e.script), e.script = "";
                                                break;
                                            default:
                                                R(e, "Max buffer length exceeded: " + a[o])
                                        }
                                        n = Math.max(n, s)
                                    }
                                    var l = i.MAX_BUFFER_LENGTH - n;
                                    e.bufferCheckPosition = l + e.position
                                }(this), this
                            }
                            /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */, resume: function () {
                                return this.error = null, this
                            }, close: function () {
                                return this.write(null)
                            }, flush: function () {
                                var e;
                                F(e = this), "" !== e.cdata && (M(e, "oncdata", e.cdata), e.cdata = ""), "" !== e.script && (M(e, "onscript", e.script), e.script = "")
                            }
                        };
                        try {
                            n = e("stream").Stream
                        } catch (e) {
                            n = function () {
                            }
                        }
                        var d = i.EVENTS.filter(function (e) {
                            return "error" !== e && "end" !== e
                        });

                        function c(e, t) {
                            if (!(this instanceof c)) return new c(e, t);
                            n.apply(this), this._parser = new s(e, t), this.writable = !0, this.readable = !0;
                            var i = this;
                            this._parser.onend = function () {
                                i.emit("end")
                            }, this._parser.onerror = function (e) {
                                i.emit("error", e), i._parser.error = null
                            }, this._decoder = null, d.forEach(function (e) {
                                (0, u.default)(i, "on" + e, {
                                    get: function () {
                                        return i._parser["on" + e]
                                    }, set: function (t) {
                                        if (!t) return i.removeAllListeners(e), i._parser["on" + e] = t, t;
                                        i.on(e, t)
                                    }, enumerable: !0, configurable: !1
                                })
                            })
                        }

                        c.prototype = (0, p.default)(n.prototype, {constructor: {value: c}}), c.prototype.write = function (i) {
                            if ("function" == typeof t && "function" == typeof t.isBuffer && t.isBuffer(i)) {
                                if (!this._decoder) {
                                    var n = e("string_decoder").StringDecoder;
                                    this._decoder = new n("utf8")
                                }
                                i = this._decoder.write(i)
                            }
                            return this._parser.write(i.toString()), this.emit("data", i), !0
                        }, c.prototype.end = function (e) {
                            return e && e.length && this.write(e), this._parser.end(), !0
                        }, c.prototype.on = function (e, t) {
                            var i = this;
                            return i._parser["on" + e] || -1 === d.indexOf(e) || (i._parser["on" + e] = function () {
                                var t = 1 === arguments.length ? [arguments[0]] : Array.apply(null, arguments);
                                t.splice(0, 0, e), i.emit.apply(i, t)
                            }), n.prototype.on.call(i, e, t)
                        };
                        var f = "[CDATA[", g = "DOCTYPE", m = "http://www.w3.org/XML/1998/namespace",
                            v = "http://www.w3.org/2000/xmlns/", y = {xml: m, xmlns: v},
                            T = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,
                            w = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,
                            k = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,
                            C = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;

                        function b(e) {
                            return " " === e || "\n" === e || "\r" === e || "\t" === e
                        }

                        function I(e) {
                            return '"' === e || "'" === e
                        }

                        function S(e) {
                            return ">" === e || b(e)
                        }

                        function _(e, t) {
                            return e.test(t)
                        }

                        function D(e, t) {
                            return !_(e, t)
                        }

                        var A, N, x, E = 0;
                        for (var O in i.STATE = {
                            BEGIN: E++,
                            BEGIN_WHITESPACE: E++,
                            TEXT: E++,
                            TEXT_ENTITY: E++,
                            OPEN_WAKA: E++,
                            SGML_DECL: E++,
                            SGML_DECL_QUOTED: E++,
                            DOCTYPE: E++,
                            DOCTYPE_QUOTED: E++,
                            DOCTYPE_DTD: E++,
                            DOCTYPE_DTD_QUOTED: E++,
                            COMMENT_STARTING: E++,
                            COMMENT: E++,
                            COMMENT_ENDING: E++,
                            COMMENT_ENDED: E++,
                            CDATA: E++,
                            CDATA_ENDING: E++,
                            CDATA_ENDING_2: E++,
                            PROC_INST: E++,
                            PROC_INST_BODY: E++,
                            PROC_INST_ENDING: E++,
                            OPEN_TAG: E++,
                            OPEN_TAG_SLASH: E++,
                            ATTRIB: E++,
                            ATTRIB_NAME: E++,
                            ATTRIB_NAME_SAW_WHITE: E++,
                            ATTRIB_VALUE: E++,
                            ATTRIB_VALUE_QUOTED: E++,
                            ATTRIB_VALUE_CLOSED: E++,
                            ATTRIB_VALUE_UNQUOTED: E++,
                            ATTRIB_VALUE_ENTITY_Q: E++,
                            ATTRIB_VALUE_ENTITY_U: E++,
                            CLOSE_TAG: E++,
                            CLOSE_TAG_SAW_WHITE: E++,
                            SCRIPT: E++,
                            SCRIPT_ENDING: E++
                        }, i.XML_ENTITIES = {amp: "&", gt: ">", lt: "<", quot: '"', apos: "'"}, i.ENTITIES = {
                            amp: "&",
                            gt: ">",
                            lt: "<",
                            quot: '"',
                            apos: "'",
                            AElig: 198,
                            Aacute: 193,
                            Acirc: 194,
                            Agrave: 192,
                            Aring: 197,
                            Atilde: 195,
                            Auml: 196,
                            Ccedil: 199,
                            ETH: 208,
                            Eacute: 201,
                            Ecirc: 202,
                            Egrave: 200,
                            Euml: 203,
                            Iacute: 205,
                            Icirc: 206,
                            Igrave: 204,
                            Iuml: 207,
                            Ntilde: 209,
                            Oacute: 211,
                            Ocirc: 212,
                            Ograve: 210,
                            Oslash: 216,
                            Otilde: 213,
                            Ouml: 214,
                            THORN: 222,
                            Uacute: 218,
                            Ucirc: 219,
                            Ugrave: 217,
                            Uuml: 220,
                            Yacute: 221,
                            aacute: 225,
                            acirc: 226,
                            aelig: 230,
                            agrave: 224,
                            aring: 229,
                            atilde: 227,
                            auml: 228,
                            ccedil: 231,
                            eacute: 233,
                            ecirc: 234,
                            egrave: 232,
                            eth: 240,
                            euml: 235,
                            iacute: 237,
                            icirc: 238,
                            igrave: 236,
                            iuml: 239,
                            ntilde: 241,
                            oacute: 243,
                            ocirc: 244,
                            ograve: 242,
                            oslash: 248,
                            otilde: 245,
                            ouml: 246,
                            szlig: 223,
                            thorn: 254,
                            uacute: 250,
                            ucirc: 251,
                            ugrave: 249,
                            uuml: 252,
                            yacute: 253,
                            yuml: 255,
                            copy: 169,
                            reg: 174,
                            nbsp: 160,
                            iexcl: 161,
                            cent: 162,
                            pound: 163,
                            curren: 164,
                            yen: 165,
                            brvbar: 166,
                            sect: 167,
                            uml: 168,
                            ordf: 170,
                            laquo: 171,
                            not: 172,
                            shy: 173,
                            macr: 175,
                            deg: 176,
                            plusmn: 177,
                            sup1: 185,
                            sup2: 178,
                            sup3: 179,
                            acute: 180,
                            micro: 181,
                            para: 182,
                            middot: 183,
                            cedil: 184,
                            ordm: 186,
                            raquo: 187,
                            frac14: 188,
                            frac12: 189,
                            frac34: 190,
                            iquest: 191,
                            times: 215,
                            divide: 247,
                            OElig: 338,
                            oelig: 339,
                            Scaron: 352,
                            scaron: 353,
                            Yuml: 376,
                            fnof: 402,
                            circ: 710,
                            tilde: 732,
                            Alpha: 913,
                            Beta: 914,
                            Gamma: 915,
                            Delta: 916,
                            Epsilon: 917,
                            Zeta: 918,
                            Eta: 919,
                            Theta: 920,
                            Iota: 921,
                            Kappa: 922,
                            Lambda: 923,
                            Mu: 924,
                            Nu: 925,
                            Xi: 926,
                            Omicron: 927,
                            Pi: 928,
                            Rho: 929,
                            Sigma: 931,
                            Tau: 932,
                            Upsilon: 933,
                            Phi: 934,
                            Chi: 935,
                            Psi: 936,
                            Omega: 937,
                            alpha: 945,
                            beta: 946,
                            gamma: 947,
                            delta: 948,
                            epsilon: 949,
                            zeta: 950,
                            eta: 951,
                            theta: 952,
                            iota: 953,
                            kappa: 954,
                            lambda: 955,
                            mu: 956,
                            nu: 957,
                            xi: 958,
                            omicron: 959,
                            pi: 960,
                            rho: 961,
                            sigmaf: 962,
                            sigma: 963,
                            tau: 964,
                            upsilon: 965,
                            phi: 966,
                            chi: 967,
                            psi: 968,
                            omega: 969,
                            thetasym: 977,
                            upsih: 978,
                            piv: 982,
                            ensp: 8194,
                            emsp: 8195,
                            thinsp: 8201,
                            zwnj: 8204,
                            zwj: 8205,
                            lrm: 8206,
                            rlm: 8207,
                            ndash: 8211,
                            mdash: 8212,
                            lsquo: 8216,
                            rsquo: 8217,
                            sbquo: 8218,
                            ldquo: 8220,
                            rdquo: 8221,
                            bdquo: 8222,
                            dagger: 8224,
                            Dagger: 8225,
                            bull: 8226,
                            hellip: 8230,
                            permil: 8240,
                            prime: 8242,
                            Prime: 8243,
                            lsaquo: 8249,
                            rsaquo: 8250,
                            oline: 8254,
                            frasl: 8260,
                            euro: 8364,
                            image: 8465,
                            weierp: 8472,
                            real: 8476,
                            trade: 8482,
                            alefsym: 8501,
                            larr: 8592,
                            uarr: 8593,
                            rarr: 8594,
                            darr: 8595,
                            harr: 8596,
                            crarr: 8629,
                            lArr: 8656,
                            uArr: 8657,
                            rArr: 8658,
                            dArr: 8659,
                            hArr: 8660,
                            forall: 8704,
                            part: 8706,
                            exist: 8707,
                            empty: 8709,
                            nabla: 8711,
                            isin: 8712,
                            notin: 8713,
                            ni: 8715,
                            prod: 8719,
                            sum: 8721,
                            minus: 8722,
                            lowast: 8727,
                            radic: 8730,
                            prop: 8733,
                            infin: 8734,
                            ang: 8736,
                            and: 8743,
                            or: 8744,
                            cap: 8745,
                            cup: 8746,
                            int: 8747,
                            there4: 8756,
                            sim: 8764,
                            cong: 8773,
                            asymp: 8776,
                            ne: 8800,
                            equiv: 8801,
                            le: 8804,
                            ge: 8805,
                            sub: 8834,
                            sup: 8835,
                            nsub: 8836,
                            sube: 8838,
                            supe: 8839,
                            oplus: 8853,
                            otimes: 8855,
                            perp: 8869,
                            sdot: 8901,
                            lceil: 8968,
                            rceil: 8969,
                            lfloor: 8970,
                            rfloor: 8971,
                            lang: 9001,
                            rang: 9002,
                            loz: 9674,
                            spades: 9824,
                            clubs: 9827,
                            hearts: 9829,
                            diams: 9830
                        }, (0, h.default)(i.ENTITIES).forEach(function (e) {
                            var t = i.ENTITIES[e], n = "number" == typeof t ? String.fromCharCode(t) : t;
                            i.ENTITIES[e] = n
                        }), i.STATE) i.STATE[i.STATE[O]] = O;

                        function P(e, t, i) {
                            e[t] && e[t](i)
                        }

                        function M(e, t, i) {
                            e.textNode && F(e), P(e, t, i)
                        }

                        function F(e) {
                            e.textNode = L(e.opt, e.textNode), e.textNode && P(e, "ontext", e.textNode), e.textNode = ""
                        }

                        function L(e, t) {
                            return e.trim && (t = t.trim()), e.normalize && (t = t.replace(/\s+/g, " ")), t
                        }

                        function R(e, t) {
                            return F(e), e.trackPosition && (t += "\nLine: " + e.line + "\nColumn: " + e.column + "\nChar: " + e.c), t = new Error(t), e.error = t, P(e, "onerror", t), e
                        }

                        function B(e) {
                            return e.sawRoot && !e.closedRoot && U(e, "Unclosed root tag"), e.state !== E.BEGIN && e.state !== E.BEGIN_WHITESPACE && e.state !== E.TEXT && R(e, "Unexpected end"), F(e), e.c = "", e.closed = !0, P(e, "onend"), s.call(e, e.strict, e.opt), e
                        }

                        function U(e, t) {
                            if ("object" !== (void 0 === e ? "undefined" : (0, l.default)(e)) || !(e instanceof s)) throw new Error("bad call to strictFail");
                            e.strict && R(e, t)
                        }

                        function V(e) {
                            e.strict || (e.tagName = e.tagName[e.looseCase]());
                            var t = e.tags[e.tags.length - 1] || e, i = e.tag = {name: e.tagName, attributes: {}};
                            e.opt.xmlns && (i.ns = t.ns), e.attribList.length = 0, M(e, "onopentagstart", i)
                        }

                        function K(e, t) {
                            var i = e.indexOf(":"), n = i < 0 ? ["", e] : e.split(":"), o = n[0], a = n[1];
                            return t && "xmlns" === e && (o = "xmlns", a = ""), {prefix: o, local: a}
                        }

                        function G(e) {
                            if (e.strict || (e.attribName = e.attribName[e.looseCase]()), -1 !== e.attribList.indexOf(e.attribName) || e.tag.attributes.hasOwnProperty(e.attribName)) e.attribName = e.attribValue = ""; else {
                                if (e.opt.xmlns) {
                                    var t = K(e.attribName, !0), i = t.prefix, n = t.local;
                                    if ("xmlns" === i) if ("xml" === n && e.attribValue !== m) U(e, "xml: prefix must be bound to " + m + "\nActual: " + e.attribValue); else if ("xmlns" === n && e.attribValue !== v) U(e, "xmlns: prefix must be bound to " + v + "\nActual: " + e.attribValue); else {
                                        var o = e.tag, a = e.tags[e.tags.length - 1] || e;
                                        o.ns === a.ns && (o.ns = (0, p.default)(a.ns)), o.ns[n] = e.attribValue
                                    }
                                    e.attribList.push([e.attribName, e.attribValue])
                                } else e.tag.attributes[e.attribName] = e.attribValue, M(e, "onattribute", {
                                    name: e.attribName,
                                    value: e.attribValue
                                });
                                e.attribName = e.attribValue = ""
                            }
                        }

                        function W(e, t) {
                            if (e.opt.xmlns) {
                                var i = e.tag, n = K(e.tagName);
                                i.prefix = n.prefix, i.local = n.local, i.uri = i.ns[n.prefix] || "", i.prefix && !i.uri && (U(e, "Unbound namespace prefix: " + (0, r.default)(e.tagName)), i.uri = n.prefix);
                                var o = e.tags[e.tags.length - 1] || e;
                                i.ns && o.ns !== i.ns && (0, h.default)(i.ns).forEach(function (t) {
                                    M(e, "onopennamespace", {prefix: t, uri: i.ns[t]})
                                });
                                for (var a = 0, s = e.attribList.length; a < s; a++) {
                                    var l = e.attribList[a], d = l[0], u = l[1], c = K(d, !0), f = c.prefix,
                                        p = c.local, g = "" === f ? "" : i.ns[f] || "",
                                        m = {name: d, value: u, prefix: f, local: p, uri: g};
                                    f && "xmlns" !== f && !g && (U(e, "Unbound namespace prefix: " + (0, r.default)(f)), m.uri = f), e.tag.attributes[d] = m, M(e, "onattribute", m)
                                }
                                e.attribList.length = 0
                            }
                            e.tag.isSelfClosing = !!t, e.sawRoot = !0, e.tags.push(e.tag), M(e, "onopentag", e.tag), t || (e.noscript || "script" !== e.tagName.toLowerCase() ? e.state = E.TEXT : e.state = E.SCRIPT, e.tag = null, e.tagName = ""), e.attribName = e.attribValue = "", e.attribList.length = 0
                        }

                        function j(e) {
                            if (!e.tagName) return U(e, "Weird empty close tag."), e.textNode += "</>", void (e.state = E.TEXT);
                            if (e.script) {
                                if ("script" !== e.tagName) return e.script += "</" + e.tagName + ">", e.tagName = "", void (e.state = E.SCRIPT);
                                M(e, "onscript", e.script), e.script = ""
                            }
                            var t = e.tags.length, i = e.tagName;
                            e.strict || (i = i[e.looseCase]());
                            for (var n = i; t--;) {
                                var o = e.tags[t];
                                if (o.name === n) break;
                                U(e, "Unexpected close tag")
                            }
                            if (t < 0) return U(e, "Unmatched closing tag: " + e.tagName), e.textNode += "</" + e.tagName + ">", void (e.state = E.TEXT);
                            e.tagName = i;
                            for (var a = e.tags.length; a-- > t;) {
                                var r = e.tag = e.tags.pop();
                                e.tagName = e.tag.name, M(e, "onclosetag", e.tagName);
                                var s = {};
                                for (var l in r.ns) s[l] = r.ns[l];
                                var d = e.tags[e.tags.length - 1] || e;
                                e.opt.xmlns && r.ns !== d.ns && (0, h.default)(r.ns).forEach(function (t) {
                                    var i = r.ns[t];
                                    M(e, "onclosenamespace", {prefix: t, uri: i})
                                })
                            }
                            0 === t && (e.closedRoot = !0), e.tagName = e.attribValue = e.attribName = "", e.attribList.length = 0, e.state = E.TEXT
                        }

                        function H(e) {
                            var t, i = e.entity, n = i.toLowerCase(), a = "";
                            return e.ENTITIES[i] ? e.ENTITIES[i] : e.ENTITIES[n] ? e.ENTITIES[n] : ("#" === (i = n).charAt(0) && ("x" === i.charAt(1) ? (i = i.slice(2), t = parseInt(i, 16), a = t.toString(16)) : (i = i.slice(1), t = parseInt(i, 10), a = t.toString(10))), i = i.replace(/^0+/, ""), isNaN(t) || a.toLowerCase() !== i ? (U(e, "Invalid character entity"), "&" + e.entity + ";") : (0, o.default)(t))
                        }

                        function z(e, t) {
                            "<" === t ? (e.state = E.OPEN_WAKA, e.startTagPosition = e.position) : b(t) || (U(e, "Non-whitespace before first tag."), e.textNode = t, e.state = E.TEXT)
                        }

                        function X(e, t) {
                            var i = "";
                            return t < e.length && (i = e.charAt(t)), i
                        }

                        E = i.STATE, o.default || (A = String.fromCharCode, N = Math.floor, x = function () {
                            var e, t, i = [], n = -1, o = arguments.length;
                            if (!o) return "";
                            for (var a = ""; ++n < o;) {
                                var r = Number(arguments[n]);
                                if (!isFinite(r) || r < 0 || r > 1114111 || N(r) !== r) throw RangeError("Invalid code point: " + r);
                                r <= 65535 ? i.push(r) : (e = 55296 + ((r -= 65536) >> 10), t = r % 1024 + 56320, i.push(e, t)), (n + 1 === o || i.length > 16384) && (a += A.apply(null, i), i.length = 0)
                            }
                            return a
                        }, u.default ? Object.defineProperty(String, "fromCodePoint", {
                            value: x,
                            configurable: !0,
                            writable: !0
                        }) : String.fromCodePoint = x)
                    }(void 0 === i ? (void 0).sax = {} : i)
                }).call(this, e("buffer").Buffer)
            }, {
                "babel-runtime/core-js/json/stringify": 48,
                "babel-runtime/core-js/object/create": 50,
                "babel-runtime/core-js/object/define-property": 51,
                "babel-runtime/core-js/object/keys": 55,
                "babel-runtime/core-js/string/from-code-point": 58,
                "babel-runtime/helpers/typeof": 64,
                buffer: 70,
                stream: 271,
                string_decoder: 69
            }],
            271: [function (e, t, i) {
                t.exports = a;
                var n = e("events").EventEmitter, o = e("inherits");

                function a() {
                    n.call(this)
                }

                o(a, n), a.Readable = e("readable-stream/readable.js"), a.Writable = e("readable-stream/writable.js"), a.Duplex = e("readable-stream/duplex.js"), a.Transform = e("readable-stream/transform.js"), a.PassThrough = e("readable-stream/passthrough.js"), a.Stream = a, a.prototype.pipe = function (e, t) {
                    var i = this;

                    function o(t) {
                        e.writable && !1 === e.write(t) && i.pause && i.pause()
                    }

                    function a() {
                        i.readable && i.resume && i.resume()
                    }

                    i.on("data", o), e.on("drain", a), e._isStdio || t && !1 === t.end || (i.on("end", s), i.on("close", l));
                    var r = !1;

                    function s() {
                        r || (r = !0, e.end())
                    }

                    function l() {
                        r || (r = !0, "function" == typeof e.destroy && e.destroy())
                    }

                    function d(e) {
                        if (u(), 0 === n.listenerCount(this, "error")) throw e
                    }

                    function u() {
                        i.removeListener("data", o), e.removeListener("drain", a), i.removeListener("end", s), i.removeListener("close", l), i.removeListener("error", d), e.removeListener("error", d), i.removeListener("end", u), i.removeListener("close", u), e.removeListener("close", u)
                    }

                    return i.on("error", d), e.on("error", d), i.on("end", u), i.on("close", u), e.on("close", u), e.emit("pipe", i), e
                }
            }, {
                events: 216,
                inherits: 226,
                "readable-stream/duplex.js": 254,
                "readable-stream/passthrough.js": 263,
                "readable-stream/readable.js": 264,
                "readable-stream/transform.js": 265,
                "readable-stream/writable.js": 266
            }],
            272: [function (e, t, i) {
                (function (t) {
                    var n = e("./lib/request"), o = e("./lib/response"), a = e("xtend"), r = e("builtin-status-codes"),
                        s = e("url"), l = i;
                    l.request = function (e, i) {
                        e = "string" == typeof e ? s.parse(e) : a(e);
                        var o = -1 === t.location.protocol.search(/^https?:$/) ? "http:" : "", r = e.protocol || o,
                            l = e.hostname || e.host, d = e.port, u = e.path || "/";
                        l && -1 !== l.indexOf(":") && (l = "[" + l + "]"), e.url = (l ? r + "//" + l : "") + (d ? ":" + d : "") + u, e.method = (e.method || "GET").toUpperCase(), e.headers = e.headers || {};
                        var c = new n(e);
                        return i && c.on("response", i), c
                    }, l.get = function (e, t) {
                        var i = l.request(e, t);
                        return i.end(), i
                    }, l.ClientRequest = n, l.IncomingMessage = o.IncomingMessage, l.Agent = function () {
                    }, l.Agent.defaultMaxSockets = 4, l.globalAgent = new l.Agent, l.STATUS_CODES = r, l.METHODS = ["CHECKOUT", "CONNECT", "COPY", "DELETE", "GET", "HEAD", "LOCK", "M-SEARCH", "MERGE", "MKACTIVITY", "MKCOL", "MOVE", "NOTIFY", "OPTIONS", "PATCH", "POST", "PROPFIND", "PROPPATCH", "PURGE", "PUT", "REPORT", "SEARCH", "SUBSCRIBE", "TRACE", "UNLOCK", "UNSUBSCRIBE"]
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {"./lib/request": 274, "./lib/response": 275, "builtin-status-codes": 71, url: 279, xtend: 327}],
            273: [function (e, t, i) {
                (function (e) {
                    "use strict";
                    i.fetch = s(e.fetch) && s(e.ReadableStream), i.writableStream = s(e.WritableStream), i.abortController = s(e.AbortController), i.blobConstructor = !1;
                    try {
                        new Blob([new ArrayBuffer(1)]), i.blobConstructor = !0
                    } catch (e) {
                    }
                    var t;

                    function n() {
                        if (void 0 !== t) return t;
                        if (e.XMLHttpRequest) {
                            t = new e.XMLHttpRequest;
                            try {
                                t.open("GET", e.XDomainRequest ? "/" : "https://example.com")
                            } catch (e) {
                                t = null
                            }
                        } else t = null;
                        return t
                    }

                    function o(e) {
                        var t = n();
                        if (!t) return !1;
                        try {
                            return t.responseType = e, t.responseType === e
                        } catch (e) {
                        }
                        return !1
                    }

                    var a = void 0 !== e.ArrayBuffer, r = a && s(e.ArrayBuffer.prototype.slice);

                    function s(e) {
                        return "function" == typeof e
                    }

                    i.arraybuffer = i.fetch || a && o("arraybuffer"), i.msstream = !i.fetch && r && o("ms-stream"), i.mozchunkedarraybuffer = !i.fetch && a && o("moz-chunked-arraybuffer"), i.overrideMimeType = i.fetch || !!n() && s(n().overrideMimeType), i.vbArray = s(e.VBArray), t = null
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            274: [function (e, t, i) {
                (function (i, n, o) {
                    "use strict";
                    var a, r = e("babel-runtime/core-js/object/keys"), s = (a = r) && a.__esModule ? a : {default: a},
                        l = e("./capability"), d = e("inherits"), u = e("./response"), c = e("readable-stream"),
                        h = e("to-arraybuffer"), f = u.IncomingMessage, p = u.readyStates,
                        g = t.exports = function (e) {
                            var t, i = this;
                            c.Writable.call(i), i._opts = e, i._body = [], i._headers = {}, e.auth && i.setHeader("Authorization", "Basic " + new o(e.auth).toString("base64")), (0, s.default)(e.headers).forEach(function (t) {
                                i.setHeader(t, e.headers[t])
                            });
                            var n = !0;
                            if ("disable-fetch" === e.mode || "requestTimeout" in e && !l.abortController) n = !1, t = !0; else if ("prefer-streaming" === e.mode) t = !1; else if ("allow-wrong-content-type" === e.mode) t = !l.overrideMimeType; else {
                                if (e.mode && "default" !== e.mode && "prefer-fast" !== e.mode) throw new Error("Invalid value for opts.mode");
                                t = !0
                            }
                            i._mode = function (e, t) {
                                return l.fetch && t ? "fetch" : l.mozchunkedarraybuffer ? "moz-chunked-arraybuffer" : l.msstream ? "ms-stream" : l.arraybuffer && e ? "arraybuffer" : l.vbArray && e ? "text:vbarray" : "text"
                            }(t, n), i._fetchTimer = null, i.on("finish", function () {
                                i._onFinish()
                            })
                        };
                    d(g, c.Writable), g.prototype.setHeader = function (e, t) {
                        var i = e.toLowerCase();
                        -1 === m.indexOf(i) && (this._headers[i] = {name: e, value: t})
                    }, g.prototype.getHeader = function (e) {
                        var t = this._headers[e.toLowerCase()];
                        return t ? t.value : null
                    }, g.prototype.removeHeader = function (e) {
                        delete this._headers[e.toLowerCase()]
                    }, g.prototype._onFinish = function () {
                        var e = this;
                        if (!e._destroyed) {
                            var t = e._opts, a = e._headers, r = null;
                            "GET" !== t.method && "HEAD" !== t.method && (r = l.arraybuffer ? h(o.concat(e._body)) : l.blobConstructor ? new n.Blob(e._body.map(function (e) {
                                return h(e)
                            }), {type: (a["content-type"] || {}).value || ""}) : o.concat(e._body).toString());
                            var d = [];
                            if ((0, s.default)(a).forEach(function (e) {
                                var t = a[e].name, i = a[e].value;
                                Array.isArray(i) ? i.forEach(function (e) {
                                    d.push([t, e])
                                }) : d.push([t, i])
                            }), "fetch" === e._mode) {
                                var u = null;
                                if (l.abortController) {
                                    var c = new AbortController;
                                    u = c.signal, e._fetchAbortController = c, "requestTimeout" in t && 0 !== t.requestTimeout && (e._fetchTimer = n.setTimeout(function () {
                                        e.emit("requestTimeout"), e._fetchAbortController && e._fetchAbortController.abort()
                                    }, t.requestTimeout))
                                }
                                n.fetch(e._opts.url, {
                                    method: e._opts.method,
                                    headers: d,
                                    body: r || void 0,
                                    mode: "cors",
                                    credentials: t.withCredentials ? "include" : "same-origin",
                                    signal: u
                                }).then(function (t) {
                                    e._fetchResponse = t, e._connect()
                                }, function (t) {
                                    n.clearTimeout(e._fetchTimer), e._destroyed || e.emit("error", t)
                                })
                            } else {
                                var f = e._xhr = new n.XMLHttpRequest;
                                try {
                                    f.open(e._opts.method, e._opts.url, !0)
                                } catch (t) {
                                    return void i.nextTick(function () {
                                        e.emit("error", t)
                                    })
                                }
                                "responseType" in f && (f.responseType = e._mode.split(":")[0]), "withCredentials" in f && (f.withCredentials = !!t.withCredentials), "text" === e._mode && "overrideMimeType" in f && f.overrideMimeType("text/plain; charset=x-user-defined"), "requestTimeout" in t && (f.timeout = t.requestTimeout, f.ontimeout = function () {
                                    e.emit("requestTimeout")
                                }), d.forEach(function (e) {
                                    f.setRequestHeader(e[0], e[1])
                                }), e._response = null, f.onreadystatechange = function () {
                                    switch (f.readyState) {
                                        case p.LOADING:
                                        case p.DONE:
                                            e._onXHRProgress()
                                    }
                                }, "moz-chunked-arraybuffer" === e._mode && (f.onprogress = function () {
                                    e._onXHRProgress()
                                }), f.onerror = function () {
                                    e._destroyed || e.emit("error", new Error("XHR error"))
                                };
                                try {
                                    f.send(r)
                                } catch (t) {
                                    return void i.nextTick(function () {
                                        e.emit("error", t)
                                    })
                                }
                            }
                        }
                    }, g.prototype._onXHRProgress = function () {
                        (function (e) {
                            try {
                                var t = e.status;
                                return null !== t && 0 !== t
                            } catch (e) {
                                return !1
                            }
                        })(this._xhr) && !this._destroyed && (this._response || this._connect(), this._response._onXHRProgress())
                    }, g.prototype._connect = function () {
                        var e = this;
                        e._destroyed || (e._response = new f(e._xhr, e._fetchResponse, e._mode, e._fetchTimer), e._response.on("error", function (t) {
                            e.emit("error", t)
                        }), e.emit("response", e._response))
                    }, g.prototype._write = function (e, t, i) {
                        this._body.push(e), i()
                    }, g.prototype.abort = g.prototype.destroy = function () {
                        this._destroyed = !0, n.clearTimeout(this._fetchTimer), this._response && (this._response._destroyed = !0), this._xhr ? this._xhr.abort() : this._fetchAbortController && this._fetchAbortController.abort()
                    }, g.prototype.end = function (e, t, i) {
                        "function" == typeof e && (i = e, e = void 0), c.Writable.prototype.end.call(this, e, t, i)
                    }, g.prototype.flushHeaders = function () {
                    }, g.prototype.setTimeout = function () {
                    }, g.prototype.setNoDelay = function () {
                    }, g.prototype.setSocketKeepAlive = function () {
                    };
                    var m = ["accept-charset", "accept-encoding", "access-control-request-headers", "access-control-request-method", "connection", "content-length", "cookie", "cookie2", "date", "dnt", "expect", "host", "keep-alive", "origin", "referer", "te", "trailer", "transfer-encoding", "upgrade", "user-agent", "via"]
                }).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}, e("buffer").Buffer)
            }, {
                "./capability": 273,
                "./response": 275,
                _process: 249,
                "babel-runtime/core-js/object/keys": 55,
                buffer: 70,
                inherits: 226,
                "readable-stream": 264,
                "to-arraybuffer": 278
            }],
            275: [function (e, t, i) {
                (function (t, n, o) {
                    "use strict";
                    var a, r = e("babel-runtime/core-js/promise"), s = (a = r) && a.__esModule ? a : {default: a},
                        l = e("./capability"), d = e("inherits"), u = e("readable-stream"),
                        c = i.readyStates = {UNSENT: 0, OPENED: 1, HEADERS_RECEIVED: 2, LOADING: 3, DONE: 4},
                        h = i.IncomingMessage = function (e, i, a, r) {
                            var d = this;
                            if (u.Readable.call(d), d._mode = a, d.headers = {}, d.rawHeaders = [], d.trailers = {}, d.rawTrailers = [], d.on("end", function () {
                                t.nextTick(function () {
                                    d.emit("close")
                                })
                            }), "fetch" === a) {
                                if (d._fetchResponse = i, d.url = i.url, d.statusCode = i.status, d.statusMessage = i.statusText, i.headers.forEach(function (e, t) {
                                    d.headers[t.toLowerCase()] = e, d.rawHeaders.push(t, e)
                                }), l.writableStream) {
                                    var c = new WritableStream({
                                        write: function (e) {
                                            return new s.default(function (t, i) {
                                                d._destroyed ? i() : d.push(new o(e)) ? t() : d._resumeFetch = t
                                            })
                                        }, close: function () {
                                            n.clearTimeout(r), d._destroyed || d.push(null)
                                        }, abort: function (e) {
                                            d._destroyed || d.emit("error", e)
                                        }
                                    });
                                    try {
                                        return void i.body.pipeTo(c).catch(function (e) {
                                            n.clearTimeout(r), d._destroyed || d.emit("error", e)
                                        })
                                    } catch (e) {
                                    }
                                }
                                var h = i.body.getReader();
                                !function e() {
                                    h.read().then(function (t) {
                                        if (!d._destroyed) {
                                            if (t.done) return n.clearTimeout(r), void d.push(null);
                                            d.push(new o(t.value)), e()
                                        }
                                    }).catch(function (e) {
                                        n.clearTimeout(r), d._destroyed || d.emit("error", e)
                                    })
                                }()
                            } else {
                                d._xhr = e, d._pos = 0, d.url = e.responseURL, d.statusCode = e.status, d.statusMessage = e.statusText;
                                var f = e.getAllResponseHeaders().split(/\r?\n/);
                                if (f.forEach(function (e) {
                                    var t = e.match(/^([^:]+):\s*(.*)/);
                                    if (t) {
                                        var i = t[1].toLowerCase();
                                        "set-cookie" === i ? (void 0 === d.headers[i] && (d.headers[i] = []), d.headers[i].push(t[2])) : void 0 !== d.headers[i] ? d.headers[i] += ", " + t[2] : d.headers[i] = t[2], d.rawHeaders.push(t[1], t[2])
                                    }
                                }), d._charset = "x-user-defined", !l.overrideMimeType) {
                                    var p = d.rawHeaders["mime-type"];
                                    if (p) {
                                        var g = p.match(/;\s*charset=([^;])(;|$)/);
                                        g && (d._charset = g[1].toLowerCase())
                                    }
                                    d._charset || (d._charset = "utf-8")
                                }
                            }
                        };
                    d(h, u.Readable), h.prototype._read = function () {
                        var e = this._resumeFetch;
                        e && (this._resumeFetch = null, e())
                    }, h.prototype._onXHRProgress = function () {
                        var e = this, t = e._xhr, i = null;
                        switch (e._mode) {
                            case"text:vbarray":
                                if (t.readyState !== c.DONE) break;
                                try {
                                    i = new n.VBArray(t.responseBody).toArray()
                                } catch (e) {
                                }
                                if (null !== i) {
                                    e.push(new o(i));
                                    break
                                }
                            case"text":
                                try {
                                    i = t.responseText
                                } catch (t) {
                                    e._mode = "text:vbarray";
                                    break
                                }
                                if (i.length > e._pos) {
                                    var a = i.substr(e._pos);
                                    if ("x-user-defined" === e._charset) {
                                        for (var r = new o(a.length), s = 0; s < a.length; s++) r[s] = 255 & a.charCodeAt(s);
                                        e.push(r)
                                    } else e.push(a, e._charset);
                                    e._pos = i.length
                                }
                                break;
                            case"arraybuffer":
                                if (t.readyState !== c.DONE || !t.response) break;
                                i = t.response, e.push(new o(new Uint8Array(i)));
                                break;
                            case"moz-chunked-arraybuffer":
                                if (i = t.response, t.readyState !== c.LOADING || !i) break;
                                e.push(new o(new Uint8Array(i)));
                                break;
                            case"ms-stream":
                                if (i = t.response, t.readyState !== c.LOADING) break;
                                var l = new n.MSStreamReader;
                                l.onprogress = function () {
                                    l.result.byteLength > e._pos && (e.push(new o(new Uint8Array(l.result.slice(e._pos)))), e._pos = l.result.byteLength)
                                }, l.onload = function () {
                                    e.push(null)
                                }, l.readAsArrayBuffer(i)
                        }
                        e._xhr.readyState === c.DONE && "ms-stream" !== e._mode && e.push(null)
                    }
                }).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}, e("buffer").Buffer)
            }, {
                "./capability": 273,
                _process: 249,
                "babel-runtime/core-js/promise": 56,
                buffer: 70,
                inherits: 226,
                "readable-stream": 264
            }],
            276: [function (e, t, i) {
                "use strict";
                var n = e("safe-buffer").Buffer, o = n.isEncoding || function (e) {
                    switch ((e = "" + e) && e.toLowerCase()) {
                        case"hex":
                        case"utf8":
                        case"utf-8":
                        case"ascii":
                        case"binary":
                        case"base64":
                        case"ucs2":
                        case"ucs-2":
                        case"utf16le":
                        case"utf-16le":
                        case"raw":
                            return !0;
                        default:
                            return !1
                    }
                };

                function a(e) {
                    var t;
                    switch (this.encoding = function (e) {
                        var t = function (e) {
                            if (!e) return "utf8";
                            for (var t; ;) switch (e) {
                                case"utf8":
                                case"utf-8":
                                    return "utf8";
                                case"ucs2":
                                case"ucs-2":
                                case"utf16le":
                                case"utf-16le":
                                    return "utf16le";
                                case"latin1":
                                case"binary":
                                    return "latin1";
                                case"base64":
                                case"ascii":
                                case"hex":
                                    return e;
                                default:
                                    if (t) return;
                                    e = ("" + e).toLowerCase(), t = !0
                            }
                        }(e);
                        if ("string" != typeof t && (n.isEncoding === o || !o(e))) throw new Error("Unknown encoding: " + e);
                        return t || e
                    }(e), this.encoding) {
                        case"utf16le":
                            this.text = l, this.end = d, t = 4;
                            break;
                        case"utf8":
                            this.fillLast = s, t = 4;
                            break;
                        case"base64":
                            this.text = u, this.end = c, t = 3;
                            break;
                        default:
                            return this.write = h, void (this.end = f)
                    }
                    this.lastNeed = 0, this.lastTotal = 0, this.lastChar = n.allocUnsafe(t)
                }

                function r(e) {
                    return e <= 127 ? 0 : e >> 5 == 6 ? 2 : e >> 4 == 14 ? 3 : e >> 3 == 30 ? 4 : e >> 6 == 2 ? -1 : -2
                }

                function s(e) {
                    var t = this.lastTotal - this.lastNeed, i = function (e, t, i) {
                        if (128 != (192 & t[0])) return e.lastNeed = 0, "�";
                        if (e.lastNeed > 1 && t.length > 1) {
                            if (128 != (192 & t[1])) return e.lastNeed = 1, "�";
                            if (e.lastNeed > 2 && t.length > 2 && 128 != (192 & t[2])) return e.lastNeed = 2, "�"
                        }
                    }(this, e);
                    return void 0 !== i ? i : this.lastNeed <= e.length ? (e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (e.copy(this.lastChar, t, 0, e.length), void (this.lastNeed -= e.length))
                }

                function l(e, t) {
                    if ((e.length - t) % 2 == 0) {
                        var i = e.toString("utf16le", t);
                        if (i) {
                            var n = i.charCodeAt(i.length - 1);
                            if (n >= 55296 && n <= 56319) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1], i.slice(0, -1)
                        }
                        return i
                    }
                    return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1)
                }

                function d(e) {
                    var t = e && e.length ? this.write(e) : "";
                    if (this.lastNeed) {
                        var i = this.lastTotal - this.lastNeed;
                        return t + this.lastChar.toString("utf16le", 0, i)
                    }
                    return t
                }

                function u(e, t) {
                    var i = (e.length - t) % 3;
                    return 0 === i ? e.toString("base64", t) : (this.lastNeed = 3 - i, this.lastTotal = 3, 1 === i ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString("base64", t, e.length - i))
                }

                function c(e) {
                    var t = e && e.length ? this.write(e) : "";
                    return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t
                }

                function h(e) {
                    return e.toString(this.encoding)
                }

                function f(e) {
                    return e && e.length ? this.write(e) : ""
                }

                i.StringDecoder = a, a.prototype.write = function (e) {
                    if (0 === e.length) return "";
                    var t, i;
                    if (this.lastNeed) {
                        if (void 0 === (t = this.fillLast(e))) return "";
                        i = this.lastNeed, this.lastNeed = 0
                    } else i = 0;
                    return i < e.length ? t ? t + this.text(e, i) : this.text(e, i) : t || ""
                }, a.prototype.end = function (e) {
                    var t = e && e.length ? this.write(e) : "";
                    return this.lastNeed ? t + "�" : t
                }, a.prototype.text = function (e, t) {
                    var i = function (e, t, i) {
                        var n = t.length - 1;
                        if (n < i) return 0;
                        var o = r(t[n]);
                        return o >= 0 ? (o > 0 && (e.lastNeed = o - 1), o) : --n < i || -2 === o ? 0 : (o = r(t[n])) >= 0 ? (o > 0 && (e.lastNeed = o - 2), o) : --n < i || -2 === o ? 0 : (o = r(t[n])) >= 0 ? (o > 0 && (2 === o ? o = 0 : e.lastNeed = o - 3), o) : 0
                    }(this, e, t);
                    if (!this.lastNeed) return e.toString("utf8", t);
                    this.lastTotal = i;
                    var n = e.length - (i - this.lastNeed);
                    return e.copy(this.lastChar, 0, n), e.toString("utf8", t, n)
                }, a.prototype.fillLast = function (e) {
                    if (this.lastNeed <= e.length) return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
                    e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e.length), this.lastNeed -= e.length
                }
            }, {"safe-buffer": 269}],
            277: [function (e, t, i) {
                (function (t, n) {
                    var o = e("process/browser.js").nextTick, a = Function.prototype.apply, r = Array.prototype.slice,
                        s = {}, l = 0;

                    function d(e, t) {
                        this._id = e, this._clearFn = t
                    }

                    i.setTimeout = function () {
                        return new d(a.call(setTimeout, window, arguments), clearTimeout)
                    }, i.setInterval = function () {
                        return new d(a.call(setInterval, window, arguments), clearInterval)
                    }, i.clearTimeout = i.clearInterval = function (e) {
                        e.close()
                    }, d.prototype.unref = d.prototype.ref = function () {
                    }, d.prototype.close = function () {
                        this._clearFn.call(window, this._id)
                    }, i.enroll = function (e, t) {
                        clearTimeout(e._idleTimeoutId), e._idleTimeout = t
                    }, i.unenroll = function (e) {
                        clearTimeout(e._idleTimeoutId), e._idleTimeout = -1
                    }, i._unrefActive = i.active = function (e) {
                        clearTimeout(e._idleTimeoutId);
                        var t = e._idleTimeout;
                        t >= 0 && (e._idleTimeoutId = setTimeout(function () {
                            e._onTimeout && e._onTimeout()
                        }, t))
                    }, i.setImmediate = "function" == typeof t ? t : function (e) {
                        var t = l++, n = !(arguments.length < 2) && r.call(arguments, 1);
                        return s[t] = !0, o(function () {
                            s[t] && (n ? e.apply(null, n) : e.call(null), i.clearImmediate(t))
                        }), t
                    }, i.clearImmediate = "function" == typeof n ? n : function (e) {
                        delete s[e]
                    }
                }).call(this, e("timers").setImmediate, e("timers").clearImmediate)
            }, {"process/browser.js": 249, timers: 277}],
            278: [function (e, t, i) {
                var n = e("buffer").Buffer;
                t.exports = function (e) {
                    if (e instanceof Uint8Array) {
                        if (0 === e.byteOffset && e.byteLength === e.buffer.byteLength) return e.buffer;
                        if ("function" == typeof e.buffer.slice) return e.buffer.slice(e.byteOffset, e.byteOffset + e.byteLength)
                    }
                    if (n.isBuffer(e)) {
                        for (var t = new Uint8Array(e.length), i = e.length, o = 0; o < i; o++) t[o] = e[o];
                        return t.buffer
                    }
                    throw new Error("Argument must be a Buffer")
                }
            }, {buffer: 70}],
            279: [function (e, t, i) {
                "use strict";
                var n = e("punycode"), o = e("./util");

                function a() {
                    this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null
                }

                i.parse = T, i.resolve = function (e, t) {
                    return T(e, !1, !0).resolve(t)
                }, i.resolveObject = function (e, t) {
                    return e ? T(e, !1, !0).resolveObject(t) : t
                }, i.format = function (e) {
                    return o.isString(e) && (e = T(e)), e instanceof a ? e.format() : a.prototype.format.call(e)
                }, i.Url = a;
                var r = /^([a-z0-9.+-]+:)/i, s = /:[0-9]*$/, l = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
                    d = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"]),
                    u = ["'"].concat(d), c = ["%", "/", "?", ";", "#"].concat(u), h = ["/", "?", "#"],
                    f = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
                    g = {javascript: !0, "javascript:": !0}, m = {javascript: !0, "javascript:": !0}, v = {
                        http: !0,
                        https: !0,
                        ftp: !0,
                        gopher: !0,
                        file: !0,
                        "http:": !0,
                        "https:": !0,
                        "ftp:": !0,
                        "gopher:": !0,
                        "file:": !0
                    }, y = e("querystring");

                function T(e, t, i) {
                    if (e && o.isObject(e) && e instanceof a) return e;
                    var n = new a;
                    return n.parse(e, t, i), n
                }

                a.prototype.parse = function (e, t, i) {
                    if (!o.isString(e)) throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
                    var a = e.indexOf("?"), s = -1 !== a && a < e.indexOf("#") ? "?" : "#", d = e.split(s);
                    d[0] = d[0].replace(/\\/g, "/");
                    var T = e = d.join(s);
                    if (T = T.trim(), !i && 1 === e.split("#").length) {
                        var w = l.exec(T);
                        if (w) return this.path = T, this.href = T, this.pathname = w[1], w[2] ? (this.search = w[2], this.query = t ? y.parse(this.search.substr(1)) : this.search.substr(1)) : t && (this.search = "", this.query = {}), this
                    }
                    var k = r.exec(T);
                    if (k) {
                        var C = (k = k[0]).toLowerCase();
                        this.protocol = C, T = T.substr(k.length)
                    }
                    if (i || k || T.match(/^\/\/[^@\/]+@[^@\/]+/)) {
                        var b = "//" === T.substr(0, 2);
                        !b || k && m[k] || (T = T.substr(2), this.slashes = !0)
                    }
                    if (!m[k] && (b || k && !v[k])) {
                        for (var I, S, _ = -1, D = 0; D < h.length; D++) {
                            var A = T.indexOf(h[D]);
                            -1 !== A && (-1 === _ || A < _) && (_ = A)
                        }
                        -1 !== (S = -1 === _ ? T.lastIndexOf("@") : T.lastIndexOf("@", _)) && (I = T.slice(0, S), T = T.slice(S + 1), this.auth = decodeURIComponent(I)), _ = -1;
                        for (var D = 0; D < c.length; D++) {
                            var A = T.indexOf(c[D]);
                            -1 !== A && (-1 === _ || A < _) && (_ = A)
                        }
                        -1 === _ && (_ = T.length), this.host = T.slice(0, _), T = T.slice(_), this.parseHost(), this.hostname = this.hostname || "";
                        var N = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
                        if (!N) for (var x = this.hostname.split(/\./), D = 0, E = x.length; D < E; D++) {
                            var O = x[D];
                            if (O && !O.match(f)) {
                                for (var P = "", M = 0, F = O.length; M < F; M++) O.charCodeAt(M) > 127 ? P += "x" : P += O[M];
                                if (!P.match(f)) {
                                    var L = x.slice(0, D), R = x.slice(D + 1), B = O.match(p);
                                    B && (L.push(B[1]), R.unshift(B[2])), R.length && (T = "/" + R.join(".") + T), this.hostname = L.join(".");
                                    break
                                }
                            }
                        }
                        this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), N || (this.hostname = n.toASCII(this.hostname));
                        var U = this.port ? ":" + this.port : "", V = this.hostname || "";
                        this.host = V + U, this.href += this.host, N && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), "/" !== T[0] && (T = "/" + T))
                    }
                    if (!g[C]) for (var D = 0, E = u.length; D < E; D++) {
                        var K = u[D];
                        if (-1 !== T.indexOf(K)) {
                            var G = encodeURIComponent(K);
                            G === K && (G = escape(K)), T = T.split(K).join(G)
                        }
                    }
                    var W = T.indexOf("#");
                    -1 !== W && (this.hash = T.substr(W), T = T.slice(0, W));
                    var j = T.indexOf("?");
                    if (-1 !== j ? (this.search = T.substr(j), this.query = T.substr(j + 1), t && (this.query = y.parse(this.query)), T = T.slice(0, j)) : t && (this.search = "", this.query = {}), T && (this.pathname = T), v[C] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
                        var U = this.pathname || "", H = this.search || "";
                        this.path = U + H
                    }
                    return this.href = this.format(), this
                }, a.prototype.format = function () {
                    var e = this.auth || "";
                    e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"), e += "@");
                    var t = this.protocol || "", i = this.pathname || "", n = this.hash || "", a = !1, r = "";
                    this.host ? a = e + this.host : this.hostname && (a = e + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port && (a += ":" + this.port)), this.query && o.isObject(this.query) && Object.keys(this.query).length && (r = y.stringify(this.query));
                    var s = this.search || r && "?" + r || "";
                    return t && ":" !== t.substr(-1) && (t += ":"), this.slashes || (!t || v[t]) && !1 !== a ? (a = "//" + (a || ""), i && "/" !== i.charAt(0) && (i = "/" + i)) : a || (a = ""), n && "#" !== n.charAt(0) && (n = "#" + n), s && "?" !== s.charAt(0) && (s = "?" + s), i = i.replace(/[?#]/g, function (e) {
                        return encodeURIComponent(e)
                    }), s = s.replace("#", "%23"), t + a + i + s + n
                }, a.prototype.resolve = function (e) {
                    return this.resolveObject(T(e, !1, !0)).format()
                }, a.prototype.resolveObject = function (e) {
                    if (o.isString(e)) {
                        var t = new a;
                        t.parse(e, !1, !0), e = t
                    }
                    for (var i = new a, n = Object.keys(this), r = 0; r < n.length; r++) {
                        var s = n[r];
                        i[s] = this[s]
                    }
                    if (i.hash = e.hash, "" === e.href) return i.href = i.format(), i;
                    if (e.slashes && !e.protocol) {
                        for (var l = Object.keys(e), d = 0; d < l.length; d++) {
                            var u = l[d];
                            "protocol" !== u && (i[u] = e[u])
                        }
                        return v[i.protocol] && i.hostname && !i.pathname && (i.path = i.pathname = "/"), i.href = i.format(), i
                    }
                    if (e.protocol && e.protocol !== i.protocol) {
                        if (!v[e.protocol]) {
                            for (var c = Object.keys(e), h = 0; h < c.length; h++) {
                                var f = c[h];
                                i[f] = e[f]
                            }
                            return i.href = i.format(), i
                        }
                        if (i.protocol = e.protocol, e.host || m[e.protocol]) i.pathname = e.pathname; else {
                            for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift());) ;
                            e.host || (e.host = ""), e.hostname || (e.hostname = ""), "" !== p[0] && p.unshift(""), p.length < 2 && p.unshift(""), i.pathname = p.join("/")
                        }
                        if (i.search = e.search, i.query = e.query, i.host = e.host || "", i.auth = e.auth, i.hostname = e.hostname || e.host, i.port = e.port, i.pathname || i.search) {
                            var g = i.pathname || "", y = i.search || "";
                            i.path = g + y
                        }
                        return i.slashes = i.slashes || e.slashes, i.href = i.format(), i
                    }
                    var T = i.pathname && "/" === i.pathname.charAt(0),
                        w = e.host || e.pathname && "/" === e.pathname.charAt(0), k = w || T || i.host && e.pathname,
                        C = k, b = i.pathname && i.pathname.split("/") || [],
                        p = e.pathname && e.pathname.split("/") || [], I = i.protocol && !v[i.protocol];
                    if (I && (i.hostname = "", i.port = null, i.host && ("" === b[0] ? b[0] = i.host : b.unshift(i.host)), i.host = "", e.protocol && (e.hostname = null, e.port = null, e.host && ("" === p[0] ? p[0] = e.host : p.unshift(e.host)), e.host = null), k = k && ("" === p[0] || "" === b[0])), w) i.host = e.host || "" === e.host ? e.host : i.host, i.hostname = e.hostname || "" === e.hostname ? e.hostname : i.hostname, i.search = e.search, i.query = e.query, b = p; else if (p.length) b || (b = []), b.pop(), b = b.concat(p), i.search = e.search, i.query = e.query; else if (!o.isNullOrUndefined(e.search)) {
                        if (I) {
                            i.hostname = i.host = b.shift();
                            var S = !!(i.host && i.host.indexOf("@") > 0) && i.host.split("@");
                            S && (i.auth = S.shift(), i.host = i.hostname = S.shift())
                        }
                        return i.search = e.search, i.query = e.query, o.isNull(i.pathname) && o.isNull(i.search) || (i.path = (i.pathname ? i.pathname : "") + (i.search ? i.search : "")), i.href = i.format(), i
                    }
                    if (!b.length) return i.pathname = null, i.search ? i.path = "/" + i.search : i.path = null, i.href = i.format(), i;
                    for (var _ = b.slice(-1)[0], D = (i.host || e.host || b.length > 1) && ("." === _ || ".." === _) || "" === _, A = 0, N = b.length; N >= 0; N--) "." === (_ = b[N]) ? b.splice(N, 1) : ".." === _ ? (b.splice(N, 1), A++) : A && (b.splice(N, 1), A--);
                    if (!k && !C) for (; A--; A) b.unshift("..");
                    !k || "" === b[0] || b[0] && "/" === b[0].charAt(0) || b.unshift(""), D && "/" !== b.join("/").substr(-1) && b.push("");
                    var x = "" === b[0] || b[0] && "/" === b[0].charAt(0);
                    if (I) {
                        i.hostname = i.host = x ? "" : b.length ? b.shift() : "";
                        var S = !!(i.host && i.host.indexOf("@") > 0) && i.host.split("@");
                        S && (i.auth = S.shift(), i.host = i.hostname = S.shift())
                    }
                    return (k = k || i.host && b.length) && !x && b.unshift(""), b.length ? i.pathname = b.join("/") : (i.pathname = null, i.path = null), o.isNull(i.pathname) && o.isNull(i.search) || (i.path = (i.pathname ? i.pathname : "") + (i.search ? i.search : "")), i.auth = e.auth || i.auth, i.slashes = i.slashes || e.slashes, i.href = i.format(), i
                }, a.prototype.parseHost = function () {
                    var e = this.host, t = s.exec(e);
                    t && (":" !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e)
                }
            }, {"./util": 280, punycode: 250, querystring: 253}],
            280: [function (e, t, i) {
                "use strict";
                t.exports = {
                    isString: function (e) {
                        return "string" == typeof e
                    }, isObject: function (e) {
                        return "object" == typeof e && null !== e
                    }, isNull: function (e) {
                        return null === e
                    }, isNullOrUndefined: function (e) {
                        return null == e
                    }
                }
            }, {}],
            281: [function (e, t, i) {
                (function (e) {
                    function i(t) {
                        try {
                            if (!e.localStorage) return !1
                        } catch (e) {
                            return !1
                        }
                        var i = e.localStorage[t];
                        return null != i && "true" === String(i).toLowerCase()
                    }

                    t.exports = function (e, t) {
                        if (i("noDeprecation")) return e;
                        var n = !1;
                        return function () {
                            if (!n) {
                                if (i("throwDeprecation")) throw new Error(t);
                                i("traceDeprecation") ? console.trace(t) : console.warn(t), n = !0
                            }
                            return e.apply(this, arguments)
                        }
                    }
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {}],
            282: [function (e, t, i) {
                "use strict";
                var n = "function" == typeof Object.defineProperty && "function" == typeof Object.defineProperties && "function" == typeof Object.getPrototypeOf && "function" == typeof Object.setPrototypeOf;
                if (!n) throw new TypeError("util.promisify requires a true ES5 environment");
                var o = e("object.getownpropertydescriptors");
                if ("function" != typeof Promise) throw new TypeError("`Promise` must be globally available for util.promisify to work.");
                var a = Function.call.bind(Array.prototype.slice), r = Function.call.bind(Array.prototype.concat),
                    s = Function.call.bind(Array.prototype.forEach),
                    l = "function" == typeof Symbol && "symbol" == typeof Symbol(""),
                    d = l ? Symbol("util.promisify.custom") : null, u = l ? Symbol("customPromisifyArgs") : null;
                t.exports = function (e) {
                    if ("function" != typeof e) {
                        var t = new TypeError('The "original" argument must be of type function');
                        throw t.name = "TypeError [ERR_INVALID_ARG_TYPE]", t.code = "ERR_INVALID_ARG_TYPE", t
                    }
                    if (l && e[d]) {
                        var i = e[d];
                        if ("function" != typeof i) throw new TypeError("The [util.promisify.custom] property must be a function");
                        return Object.defineProperty(i, d, {
                            configurable: !0,
                            enumerable: !1,
                            value: i,
                            writable: !1
                        }), i
                    }
                    var n = e[u], c = function () {
                        var t = a(arguments), i = this;
                        return new Promise(function (o, l) {
                            e.apply(i, r(t, function (e) {
                                var t = arguments.length > 1 ? a(arguments, 1) : [];
                                if (e) l(e); else if (void 0 !== n && t.length > 1) {
                                    var i = {};
                                    s(n, function (e, n) {
                                        i[e] = t[n]
                                    }), o(i)
                                } else o(t[0])
                            }))
                        })
                    };
                    return Object.setPrototypeOf(c, Object.getPrototypeOf(e)), Object.defineProperty(c, d, {
                        configurable: !0,
                        enumerable: !1,
                        value: c,
                        writable: !1
                    }), Object.defineProperties(c, o(e))
                }, t.exports.custom = d, t.exports.customPromisifyArgs = u
            }, {"object.getownpropertydescriptors": 243}],
            283: [function (e, t, i) {
                "use strict";
                var n = e("define-properties"), o = e("util"), a = e("./implementation"), r = e("./polyfill"), s = r(),
                    l = e("./shim"), d = function (e) {
                        return s.apply(o, arguments)
                    };
                n(d, {
                    custom: s.custom,
                    customPromisifyArgs: s.customPromisifyArgs,
                    getPolyfill: r,
                    implementation: a,
                    shim: l
                }), t.exports = d
            }, {"./implementation": 282, "./polyfill": 284, "./shim": 285, "define-properties": 190, util: 287}],
            284: [function (e, t, i) {
                "use strict";
                var n = e("util"), o = e("./implementation");
                t.exports = function () {
                    return "function" == typeof n.promisify ? n.promisify : o
                }
            }, {"./implementation": 282, util: 287}],
            285: [function (e, t, i) {
                "use strict";
                var n = e("util"), o = e("./polyfill");
                t.exports = function () {
                    var e = o();
                    return e !== n.promisify && (n.promisify = e, Object.defineProperty(n, "promisify", {value: e})), e
                }
            }, {"./polyfill": 284, util: 287}],
            286: [function (e, t, i) {
                t.exports = function (e) {
                    return e && "object" == typeof e && "function" == typeof e.copy && "function" == typeof e.fill && "function" == typeof e.readUInt8
                }
            }, {}],
            287: [function (e, t, i) {
                (function (t, n) {
                    var o = /%[sdj%]/g;
                    i.format = function (e) {
                        if (!v(e)) {
                            for (var t = [], i = 0; i < arguments.length; i++) t.push(s(arguments[i]));
                            return t.join(" ")
                        }
                        for (var i = 1, n = arguments, a = n.length, r = String(e).replace(o, function (e) {
                            if ("%%" === e) return "%";
                            if (i >= a) return e;
                            switch (e) {
                                case"%s":
                                    return String(n[i++]);
                                case"%d":
                                    return Number(n[i++]);
                                case"%j":
                                    try {
                                        return JSON.stringify(n[i++])
                                    } catch (e) {
                                        return "[Circular]"
                                    }
                                default:
                                    return e
                            }
                        }), l = n[i]; i < a; l = n[++i]) g(l) || !w(l) ? r += " " + l : r += " " + s(l);
                        return r
                    }, i.deprecate = function (e, o) {
                        if (y(n.process)) return function () {
                            return i.deprecate(e, o).apply(this, arguments)
                        };
                        if (!0 === t.noDeprecation) return e;
                        var a = !1;
                        return function () {
                            if (!a) {
                                if (t.throwDeprecation) throw new Error(o);
                                t.traceDeprecation ? console.trace(o) : console.error(o), a = !0
                            }
                            return e.apply(this, arguments)
                        }
                    };
                    var a, r = {};

                    function s(e, t) {
                        var n = {seen: [], stylize: d};
                        return arguments.length >= 3 && (n.depth = arguments[2]), arguments.length >= 4 && (n.colors = arguments[3]), p(t) ? n.showHidden = t : t && i._extend(n, t), y(n.showHidden) && (n.showHidden = !1), y(n.depth) && (n.depth = 2), y(n.colors) && (n.colors = !1), y(n.customInspect) && (n.customInspect = !0), n.colors && (n.stylize = l), u(n, e, n.depth)
                    }

                    function l(e, t) {
                        var i = s.styles[t];
                        return i ? "[" + s.colors[i][0] + "m" + e + "[" + s.colors[i][1] + "m" : e
                    }

                    function d(e, t) {
                        return e
                    }

                    function u(e, t, n) {
                        if (e.customInspect && t && b(t.inspect) && t.inspect !== i.inspect && (!t.constructor || t.constructor.prototype !== t)) {
                            var o = t.inspect(n, e);
                            return v(o) || (o = u(e, o, n)), o
                        }
                        var a = function (e, t) {
                            if (y(t)) return e.stylize("undefined", "undefined");
                            if (v(t)) {
                                var i = "'" + JSON.stringify(t).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
                                return e.stylize(i, "string")
                            }
                            return m(t) ? e.stylize("" + t, "number") : p(t) ? e.stylize("" + t, "boolean") : g(t) ? e.stylize("null", "null") : void 0
                        }(e, t);
                        if (a) return a;
                        var r = Object.keys(t), s = function (e) {
                            var t = {};
                            return e.forEach(function (e, i) {
                                t[e] = !0
                            }), t
                        }(r);
                        if (e.showHidden && (r = Object.getOwnPropertyNames(t)), C(t) && (r.indexOf("message") >= 0 || r.indexOf("description") >= 0)) return c(t);
                        if (0 === r.length) {
                            if (b(t)) {
                                var l = t.name ? ": " + t.name : "";
                                return e.stylize("[Function" + l + "]", "special")
                            }
                            if (T(t)) return e.stylize(RegExp.prototype.toString.call(t), "regexp");
                            if (k(t)) return e.stylize(Date.prototype.toString.call(t), "date");
                            if (C(t)) return c(t)
                        }
                        var d, w = "", I = !1, S = ["{", "}"];
                        if (f(t) && (I = !0, S = ["[", "]"]), b(t)) {
                            var _ = t.name ? ": " + t.name : "";
                            w = " [Function" + _ + "]"
                        }
                        return T(t) && (w = " " + RegExp.prototype.toString.call(t)), k(t) && (w = " " + Date.prototype.toUTCString.call(t)), C(t) && (w = " " + c(t)), 0 !== r.length || I && 0 != t.length ? n < 0 ? T(t) ? e.stylize(RegExp.prototype.toString.call(t), "regexp") : e.stylize("[Object]", "special") : (e.seen.push(t), d = I ? function (e, t, i, n, o) {
                            for (var a = [], r = 0, s = t.length; r < s; ++r) D(t, String(r)) ? a.push(h(e, t, i, n, String(r), !0)) : a.push("");
                            return o.forEach(function (o) {
                                o.match(/^\d+$/) || a.push(h(e, t, i, n, o, !0))
                            }), a
                        }(e, t, n, s, r) : r.map(function (i) {
                            return h(e, t, n, s, i, I)
                        }), e.seen.pop(), function (e, t, i) {
                            return e.reduce(function (e, t) {
                                return t.indexOf("\n"), e + t.replace(/\u001b\[\d\d?m/g, "").length + 1
                            }, 0) > 60 ? i[0] + ("" === t ? "" : t + "\n ") + " " + e.join(",\n  ") + " " + i[1] : i[0] + t + " " + e.join(", ") + " " + i[1]
                        }(d, w, S)) : S[0] + w + S[1]
                    }

                    function c(e) {
                        return "[" + Error.prototype.toString.call(e) + "]"
                    }

                    function h(e, t, i, n, o, a) {
                        var r, s, l;
                        if ((l = Object.getOwnPropertyDescriptor(t, o) || {value: t[o]}).get ? s = l.set ? e.stylize("[Getter/Setter]", "special") : e.stylize("[Getter]", "special") : l.set && (s = e.stylize("[Setter]", "special")), D(n, o) || (r = "[" + o + "]"), s || (e.seen.indexOf(l.value) < 0 ? (s = g(i) ? u(e, l.value, null) : u(e, l.value, i - 1)).indexOf("\n") > -1 && (s = a ? s.split("\n").map(function (e) {
                            return "  " + e
                        }).join("\n").substr(2) : "\n" + s.split("\n").map(function (e) {
                            return "   " + e
                        }).join("\n")) : s = e.stylize("[Circular]", "special")), y(r)) {
                            if (a && o.match(/^\d+$/)) return s;
                            (r = JSON.stringify("" + o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (r = r.substr(1, r.length - 2), r = e.stylize(r, "name")) : (r = r.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), r = e.stylize(r, "string"))
                        }
                        return r + ": " + s
                    }

                    function f(e) {
                        return Array.isArray(e)
                    }

                    function p(e) {
                        return "boolean" == typeof e
                    }

                    function g(e) {
                        return null === e
                    }

                    function m(e) {
                        return "number" == typeof e
                    }

                    function v(e) {
                        return "string" == typeof e
                    }

                    function y(e) {
                        return void 0 === e
                    }

                    function T(e) {
                        return w(e) && "[object RegExp]" === I(e)
                    }

                    function w(e) {
                        return "object" == typeof e && null !== e
                    }

                    function k(e) {
                        return w(e) && "[object Date]" === I(e)
                    }

                    function C(e) {
                        return w(e) && ("[object Error]" === I(e) || e instanceof Error)
                    }

                    function b(e) {
                        return "function" == typeof e
                    }

                    function I(e) {
                        return Object.prototype.toString.call(e)
                    }

                    function S(e) {
                        return e < 10 ? "0" + e.toString(10) : e.toString(10)
                    }

                    i.debuglog = function (e) {
                        if (y(a) && (a = t.env.NODE_DEBUG || ""), e = e.toUpperCase(), !r[e]) if (new RegExp("\\b" + e + "\\b", "i").test(a)) {
                            var n = t.pid;
                            r[e] = function () {
                                var t = i.format.apply(i, arguments);
                                console.error("%s %d: %s", e, n, t)
                            }
                        } else r[e] = function () {
                        };
                        return r[e]
                    }, i.inspect = s, s.colors = {
                        bold: [1, 22],
                        italic: [3, 23],
                        underline: [4, 24],
                        inverse: [7, 27],
                        white: [37, 39],
                        grey: [90, 39],
                        black: [30, 39],
                        blue: [34, 39],
                        cyan: [36, 39],
                        green: [32, 39],
                        magenta: [35, 39],
                        red: [31, 39],
                        yellow: [33, 39]
                    }, s.styles = {
                        special: "cyan",
                        number: "yellow",
                        boolean: "yellow",
                        undefined: "grey",
                        null: "bold",
                        string: "green",
                        date: "magenta",
                        regexp: "red"
                    }, i.isArray = f, i.isBoolean = p, i.isNull = g, i.isNullOrUndefined = function (e) {
                        return null == e
                    }, i.isNumber = m, i.isString = v, i.isSymbol = function (e) {
                        return "symbol" == typeof e
                    }, i.isUndefined = y, i.isRegExp = T, i.isObject = w, i.isDate = k, i.isError = C, i.isFunction = b, i.isPrimitive = function (e) {
                        return null === e || "boolean" == typeof e || "number" == typeof e || "string" == typeof e || "symbol" == typeof e || void 0 === e
                    }, i.isBuffer = e("./support/isBuffer");
                    var _ = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];

                    function D(e, t) {
                        return Object.prototype.hasOwnProperty.call(e, t)
                    }

                    i.log = function () {
                        var e, t;
                        console.log("%s - %s", (e = new Date, t = [S(e.getHours()), S(e.getMinutes()), S(e.getSeconds())].join(":"), [e.getDate(), _[e.getMonth()], t].join(" ")), i.format.apply(i, arguments))
                    }, i.inherits = e("inherits"), i._extend = function (e, t) {
                        if (!t || !w(t)) return e;
                        for (var i = Object.keys(t), n = i.length; n--;) e[i[n]] = t[i[n]];
                        return e
                    }
                }).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {"./support/isBuffer": 286, _process: 249, inherits: 226}],
            288: [function (e, t, i) {
                "use strict";
                (function () {
                    i.stripBOM = function (e) {
                        return "\ufeff" === e[0] ? e.substring(1) : e
                    }
                }).call(void 0)
            }, {}],
            289: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/helpers/typeof"), o = s(n), a = e("babel-runtime/core-js/object/keys"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                (function () {
                    var t, n, a, s, l, d = {}.hasOwnProperty;
                    t = e("xmlbuilder"), n = e("./defaults").defaults, s = function (e) {
                        return "string" == typeof e && (e.indexOf("&") >= 0 || e.indexOf(">") >= 0 || e.indexOf("<") >= 0)
                    }, l = function (e) {
                        return "<![CDATA[" + a(e) + "]]>"
                    }, a = function (e) {
                        return e.replace("]]>", "]]]]><![CDATA[>")
                    }, i.Builder = function () {
                        function e(e) {
                            var t, i, o;
                            for (t in this.options = {}, i = n[.2]) d.call(i, t) && (o = i[t], this.options[t] = o);
                            for (t in e) d.call(e, t) && (o = e[t], this.options[t] = o)
                        }

                        return e.prototype.buildObject = function (e) {
                            var i, a, u, c, h, f;
                            return i = this.options.attrkey, a = this.options.charkey, 1 === (0, r.default)(e).length && this.options.rootName === n[.2].rootName ? (h = (0, r.default)(e)[0], e = e[h]) : h = this.options.rootName, f = this, u = function (e, t) {
                                var n, r, c, h, p, g;
                                if ("object" !== (void 0 === t ? "undefined" : (0, o.default)(t))) f.options.cdata && s(t) ? e.raw(l(t)) : e.txt(t); else if (Array.isArray(t)) {
                                    for (h in t) if (d.call(t, h)) for (p in r = t[h]) c = r[p], e = u(e.ele(p), c).up()
                                } else for (p in t) if (d.call(t, p)) if (r = t[p], p === i) {
                                    if ("object" === (void 0 === r ? "undefined" : (0, o.default)(r))) for (n in r) g = r[n], e = e.att(n, g)
                                } else if (p === a) e = f.options.cdata && s(r) ? e.raw(l(r)) : e.txt(r); else if (Array.isArray(r)) for (h in r) d.call(r, h) && (c = r[h], e = "string" == typeof c ? f.options.cdata && s(c) ? e.ele(p).raw(l(c)).up() : e.ele(p, c).up() : u(e.ele(p), c).up()); else "object" === (void 0 === r ? "undefined" : (0, o.default)(r)) ? e = u(e.ele(p), r).up() : "string" == typeof r && f.options.cdata && s(r) ? e = e.ele(p).raw(l(r)).up() : (null == r && (r = ""), e = e.ele(p, r.toString()).up());
                                return e
                            }, c = t.create(h, this.options.xmldec, this.options.doctype, {
                                headless: this.options.headless,
                                allowSurrogateChars: this.options.allowSurrogateChars
                            }), u(c, e).end(this.options.renderOpts)
                        }, e
                    }()
                }).call(void 0)
            }, {
                "./defaults": 290,
                "babel-runtime/core-js/object/keys": 55,
                "babel-runtime/helpers/typeof": 64,
                xmlbuilder: 326
            }],
            290: [function (e, t, i) {
                "use strict";
                (function () {
                    i.defaults = {
                        .1: {
                            explicitCharkey: !1,
                            trim: !0,
                            normalize: !0,
                            normalizeTags: !1,
                            attrkey: "@",
                            charkey: "#",
                            explicitArray: !1,
                            ignoreAttrs: !1,
                            mergeAttrs: !1,
                            explicitRoot: !1,
                            validator: null,
                            xmlns: !1,
                            explicitChildren: !1,
                            childkey: "@@",
                            charsAsChildren: !1,
                            includeWhiteChars: !1,
                            async: !1,
                            strict: !0,
                            attrNameProcessors: null,
                            attrValueProcessors: null,
                            tagNameProcessors: null,
                            valueProcessors: null,
                            emptyTag: ""
                        },
                        .2: {
                            explicitCharkey: !1,
                            trim: !1,
                            normalize: !1,
                            normalizeTags: !1,
                            attrkey: "$",
                            charkey: "_",
                            explicitArray: !0,
                            ignoreAttrs: !1,
                            mergeAttrs: !1,
                            explicitRoot: !0,
                            validator: null,
                            xmlns: !1,
                            explicitChildren: !1,
                            preserveChildrenOrder: !1,
                            childkey: "$$",
                            charsAsChildren: !1,
                            includeWhiteChars: !1,
                            async: !1,
                            strict: !0,
                            attrNameProcessors: null,
                            attrValueProcessors: null,
                            tagNameProcessors: null,
                            valueProcessors: null,
                            rootName: "root",
                            xmldec: {version: "1.0", encoding: "UTF-8", standalone: !0},
                            doctype: null,
                            renderOpts: {pretty: !0, indent: "  ", newline: "\n"},
                            headless: !1,
                            chunkSize: 1e4,
                            emptyTag: "",
                            cdata: !1
                        }
                    }
                }).call(void 0)
            }, {}],
            291: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/core-js/object/get-own-property-names"), o = d(n),
                    a = e("babel-runtime/core-js/object/keys"), r = d(a), s = e("babel-runtime/helpers/typeof"),
                    l = d(s);

                function d(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                (function () {
                    var t, n, a, s, d, u, c, h, f, p = function (e, t) {
                        return function () {
                            return e.apply(t, arguments)
                        }
                    }, g = {}.hasOwnProperty;
                    h = e("sax"), a = e("events"), t = e("./bom"), u = e("./processors"), f = e("timers").setImmediate, n = e("./defaults").defaults, c = e("util.promisify"), s = function (e) {
                        return "object" === (void 0 === e ? "undefined" : (0, l.default)(e)) && null != e && 0 === (0, r.default)(e).length
                    }, d = function (e, t, i) {
                        var n, o, a;
                        for (n = 0, o = e.length; n < o; n++) a = e[n], t = a(t, i);
                        return t
                    }, i.Parser = function (e) {
                        function a(e) {
                            var t, o, a;
                            if (this.parseStringPromise = p(this.parseStringPromise, this), this.parseString = p(this.parseString, this), this.reset = p(this.reset, this), this.assignOrPush = p(this.assignOrPush, this), this.processAsync = p(this.processAsync, this), !(this instanceof i.Parser)) return new i.Parser(e);
                            for (t in this.options = {}, o = n[.2]) g.call(o, t) && (a = o[t], this.options[t] = a);
                            for (t in e) g.call(e, t) && (a = e[t], this.options[t] = a);
                            this.options.xmlns && (this.options.xmlnskey = this.options.attrkey + "ns"), this.options.normalizeTags && (this.options.tagNameProcessors || (this.options.tagNameProcessors = []), this.options.tagNameProcessors.unshift(u.normalize)), this.reset()
                        }

                        return function (e, t) {
                            for (var i in t) g.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(a, e), a.prototype.processAsync = function () {
                            var e, t;
                            try {
                                return this.remaining.length <= this.options.chunkSize ? (e = this.remaining, this.remaining = "", this.saxParser = this.saxParser.write(e), this.saxParser.close()) : (e = this.remaining.substr(0, this.options.chunkSize), this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length), this.saxParser = this.saxParser.write(e), f(this.processAsync))
                            } catch (e) {
                                if (t = e, !this.saxParser.errThrown) return this.saxParser.errThrown = !0, this.emit(t)
                            }
                        }, a.prototype.assignOrPush = function (e, t, i) {
                            return t in e ? (e[t] instanceof Array || (e[t] = [e[t]]), e[t].push(i)) : this.options.explicitArray ? e[t] = [i] : e[t] = i
                        }, a.prototype.reset = function () {
                            var e, t, i, n, a;
                            return this.removeAllListeners(), this.saxParser = h.parser(this.options.strict, {
                                trim: !1,
                                normalize: !1,
                                xmlns: this.options.xmlns
                            }), this.saxParser.errThrown = !1, this.saxParser.onerror = (a = this, function (e) {
                                if (a.saxParser.resume(), !a.saxParser.errThrown) return a.saxParser.errThrown = !0, a.emit("error", e)
                            }), this.saxParser.onend = function (e) {
                                return function () {
                                    if (!e.saxParser.ended) return e.saxParser.ended = !0, e.emit("end", e.resultObject)
                                }
                            }(this), this.saxParser.ended = !1, this.EXPLICIT_CHARKEY = this.options.explicitCharkey, this.resultObject = null, n = [], e = this.options.attrkey, t = this.options.charkey, this.saxParser.onopentag = function (i) {
                                return function (o) {
                                    var a, r, s, l, u;
                                    if ((s = {})[t] = "", !i.options.ignoreAttrs) for (a in u = o.attributes) g.call(u, a) && (e in s || i.options.mergeAttrs || (s[e] = {}), r = i.options.attrValueProcessors ? d(i.options.attrValueProcessors, o.attributes[a], a) : o.attributes[a], l = i.options.attrNameProcessors ? d(i.options.attrNameProcessors, a) : a, i.options.mergeAttrs ? i.assignOrPush(s, l, r) : s[e][l] = r);
                                    return s["#name"] = i.options.tagNameProcessors ? d(i.options.tagNameProcessors, o.name) : o.name, i.options.xmlns && (s[i.options.xmlnskey] = {
                                        uri: o.uri,
                                        local: o.local
                                    }), n.push(s)
                                }
                            }(this), this.saxParser.onclosetag = function (e) {
                                return function () {
                                    var i, a, u, c, h, f, p, m, v, y;
                                    if (f = n.pop(), h = f["#name"], e.options.explicitChildren && e.options.preserveChildrenOrder || delete f["#name"], !0 === f.cdata && (i = f.cdata, delete f.cdata), v = n[n.length - 1], f[t].match(/^\s*$/) && !i ? (a = f[t], delete f[t]) : (e.options.trim && (f[t] = f[t].trim()), e.options.normalize && (f[t] = f[t].replace(/\s{2,}/g, " ").trim()), f[t] = e.options.valueProcessors ? d(e.options.valueProcessors, f[t], h) : f[t], 1 === (0, r.default)(f).length && t in f && !e.EXPLICIT_CHARKEY && (f = f[t])), s(f) && (f = "" !== e.options.emptyTag ? e.options.emptyTag : a), null != e.options.validator && (y = "/" + function () {
                                        var e, t, i;
                                        for (i = [], e = 0, t = n.length; e < t; e++) c = n[e], i.push(c["#name"]);
                                        return i
                                    }().concat(h).join("/"), function () {
                                        var t;
                                        try {
                                            f = e.options.validator(y, v && v[h], f)
                                        } catch (i) {
                                            return t = i, e.emit("error", t)
                                        }
                                    }()), e.options.explicitChildren && !e.options.mergeAttrs && "object" === (void 0 === f ? "undefined" : (0, l.default)(f))) if (e.options.preserveChildrenOrder) {
                                        if (v) {
                                            for (u in v[e.options.childkey] = v[e.options.childkey] || [], p = {}, f) g.call(f, u) && (p[u] = f[u]);
                                            v[e.options.childkey].push(p), delete f["#name"], 1 === (0, r.default)(f).length && t in f && !e.EXPLICIT_CHARKEY && (f = f[t])
                                        }
                                    } else c = {}, e.options.attrkey in f && (c[e.options.attrkey] = f[e.options.attrkey], delete f[e.options.attrkey]), !e.options.charsAsChildren && e.options.charkey in f && (c[e.options.charkey] = f[e.options.charkey], delete f[e.options.charkey]), (0, o.default)(f).length > 0 && (c[e.options.childkey] = f), f = c;
                                    return n.length > 0 ? e.assignOrPush(v, h, f) : (e.options.explicitRoot && (m = f, (f = {})[h] = m), e.resultObject = f, e.saxParser.ended = !0, e.emit("end", e.resultObject))
                                }
                            }(this), i = function (e) {
                                return function (i) {
                                    var o, a;
                                    if (a = n[n.length - 1]) return a[t] += i, e.options.explicitChildren && e.options.preserveChildrenOrder && e.options.charsAsChildren && (e.options.includeWhiteChars || "" !== i.replace(/\\n/g, "").trim()) && (a[e.options.childkey] = a[e.options.childkey] || [], (o = {"#name": "__text__"})[t] = i, e.options.normalize && (o[t] = o[t].replace(/\s{2,}/g, " ").trim()), a[e.options.childkey].push(o)), a
                                }
                            }(this), this.saxParser.ontext = i, this.saxParser.oncdata = function (e) {
                                var t;
                                if (t = i(e)) return t.cdata = !0
                            }
                        }, a.prototype.parseString = function (e, i) {
                            var n;
                            null != i && "function" == typeof i && (this.on("end", function (e) {
                                return this.reset(), i(null, e)
                            }), this.on("error", function (e) {
                                return this.reset(), i(e)
                            }));
                            try {
                                return "" === (e = e.toString()).trim() ? (this.emit("end", null), !0) : (e = t.stripBOM(e), this.options.async ? (this.remaining = e, f(this.processAsync), this.saxParser) : this.saxParser.write(e).close())
                            } catch (e) {
                                if (n = e, !this.saxParser.errThrown && !this.saxParser.ended) return this.emit("error", n), this.saxParser.errThrown = !0;
                                if (this.saxParser.ended) throw n
                            }
                        }, a.prototype.parseStringPromise = function (e) {
                            return c(this.parseString)(e)
                        }, a
                    }(a), i.parseString = function (e, t, n) {
                        var o, a;
                        return null != n ? ("function" == typeof n && (o = n), "object" === (void 0 === t ? "undefined" : (0, l.default)(t)) && (a = t)) : ("function" == typeof t && (o = t), a = {}), new i.Parser(a).parseString(e, o)
                    }, i.parseStringPromise = function (e, t) {
                        var n;
                        return "object" === (void 0 === t ? "undefined" : (0, l.default)(t)) && (n = t), new i.Parser(n).parseStringPromise(e)
                    }
                }).call(void 0)
            }, {
                "./bom": 288,
                "./defaults": 290,
                "./processors": 292,
                "babel-runtime/core-js/object/get-own-property-names": 53,
                "babel-runtime/core-js/object/keys": 55,
                "babel-runtime/helpers/typeof": 64,
                events: 216,
                sax: 270,
                timers: 277,
                "util.promisify": 283
            }],
            292: [function (e, t, i) {
                "use strict";
                (function () {
                    var e;
                    e = new RegExp(/(?!xmlns)^.*:/), i.normalize = function (e) {
                        return e.toLowerCase()
                    }, i.firstCharLowerCase = function (e) {
                        return e.charAt(0).toLowerCase() + e.slice(1)
                    }, i.stripPrefix = function (t) {
                        return t.replace(e, "")
                    }, i.parseNumbers = function (e) {
                        return isNaN(e) || (e = e % 1 == 0 ? parseInt(e, 10) : parseFloat(e)), e
                    }, i.parseBooleans = function (e) {
                        return /^(?:true|false)$/i.test(e) && (e = "true" === e.toLowerCase()), e
                    }
                }).call(void 0)
            }, {}],
            293: [function (e, t, i) {
                "use strict";
                (function () {
                    var t, n, o, a, r = {}.hasOwnProperty;
                    n = e("./defaults"), t = e("./builder"), o = e("./parser"), a = e("./processors"), i.defaults = n.defaults, i.processors = a, i.ValidationError = function (e) {
                        function t(e) {
                            this.message = e
                        }

                        return function (e, t) {
                            for (var i in t) r.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t
                    }(Error), i.Builder = t.Builder, i.Parser = o.Parser, i.parseString = o.parseString, i.parseStringPromise = o.parseStringPromise
                }).call(void 0)
            }, {"./builder": 289, "./defaults": 290, "./parser": 291, "./processors": 292}],
            294: [function (e, t, i) {
                "use strict";
                (function () {
                    t.exports = {
                        Disconnected: 1,
                        Preceding: 2,
                        Following: 4,
                        Contains: 8,
                        ContainedBy: 16,
                        ImplementationSpecific: 32
                    }
                }).call(void 0)
            }, {}],
            295: [function (e, t, i) {
                "use strict";
                (function () {
                    t.exports = {
                        Element: 1,
                        Attribute: 2,
                        Text: 3,
                        CData: 4,
                        EntityReference: 5,
                        EntityDeclaration: 6,
                        ProcessingInstruction: 7,
                        Comment: 8,
                        Document: 9,
                        DocType: 10,
                        DocumentFragment: 11,
                        NotationDeclaration: 12,
                        Declaration: 201,
                        Raw: 202,
                        AttributeDeclaration: 203,
                        ElementDeclaration: 204,
                        Dummy: 205
                    }
                }).call(void 0)
            }, {}],
            296: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/core-js/object/get-prototype-of"), o = d(n),
                    a = e("babel-runtime/helpers/typeof"), r = d(a), s = e("babel-runtime/core-js/object/assign"),
                    l = d(s);

                function d(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                (function () {
                    var e, i, n, a, s, d, u, c = [].slice, h = {}.hasOwnProperty;
                    e = function () {
                        var e, t, i, n, o, a;
                        if (a = arguments[0], o = 2 <= arguments.length ? c.call(arguments, 1) : [], s(l.default)) l.default.apply(null, arguments); else for (e = 0, i = o.length; e < i; e++) if (null != (n = o[e])) for (t in n) h.call(n, t) && (a[t] = n[t]);
                        return a
                    }, s = function (e) {
                        return !!e && "[object Function]" === Object.prototype.toString.call(e)
                    }, d = function (e) {
                        var t;
                        return !!e && ("function" === (t = void 0 === e ? "undefined" : (0, r.default)(e)) || "object" === t)
                    }, n = function (e) {
                        return s(Array.isArray) ? Array.isArray(e) : "[object Array]" === Object.prototype.toString.call(e)
                    }, a = function (e) {
                        var t;
                        if (n(e)) return !e.length;
                        for (t in e) if (h.call(e, t)) return !1;
                        return !0
                    }, u = function (e) {
                        var t, i;
                        return d(e) && (i = (0, o.default)(e)) && (t = i.constructor) && "function" == typeof t && t instanceof t && Function.prototype.toString.call(t) === Function.prototype.toString.call(Object)
                    }, i = function (e) {
                        return s(e.valueOf) ? e.valueOf() : e
                    }, t.exports.assign = e, t.exports.isFunction = s, t.exports.isObject = d, t.exports.isArray = n, t.exports.isEmpty = a, t.exports.isPlainObject = u, t.exports.getValue = i
                }).call(void 0)
            }, {
                "babel-runtime/core-js/object/assign": 49,
                "babel-runtime/core-js/object/get-prototype-of": 54,
                "babel-runtime/helpers/typeof": 64
            }],
            297: [function (e, t, i) {
                "use strict";
                (function () {
                    t.exports = {None: 0, OpenTag: 1, InsideTag: 2, CloseTag: 3}
                }).call(void 0)
            }, {}],
            298: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/create"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i;
                    i = e("./NodeType"), e("./XMLNode"), t.exports = function () {
                        function e(e, t, n) {
                            if (this.parent = e, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify), null == t) throw new Error("Missing attribute name. " + this.debugInfo(t));
                            this.name = this.stringify.name(t), this.value = this.stringify.attValue(n), this.type = i.Attribute, this.isId = !1, this.schemaTypeInfo = null
                        }

                        return Object.defineProperty(e.prototype, "nodeType", {
                            get: function () {
                                return this.type
                            }
                        }), Object.defineProperty(e.prototype, "ownerElement", {
                            get: function () {
                                return this.parent
                            }
                        }), Object.defineProperty(e.prototype, "textContent", {
                            get: function () {
                                return this.value
                            }, set: function (e) {
                                return this.value = e || ""
                            }
                        }), Object.defineProperty(e.prototype, "namespaceURI", {
                            get: function () {
                                return ""
                            }
                        }), Object.defineProperty(e.prototype, "prefix", {
                            get: function () {
                                return ""
                            }
                        }), Object.defineProperty(e.prototype, "localName", {
                            get: function () {
                                return this.name
                            }
                        }), Object.defineProperty(e.prototype, "specified", {
                            get: function () {
                                return !0
                            }
                        }), e.prototype.clone = function () {
                            return (0, a.default)(this)
                        }, e.prototype.toString = function (e) {
                            return this.options.writer.attribute(this, this.options.writer.filterOptions(e))
                        }, e.prototype.debugInfo = function (e) {
                            return null == (e = e || this.name) ? "parent: <" + this.parent.name + ">" : "attribute: {" + e + "}, parent: <" + this.parent.name + ">"
                        }, e.prototype.isEqualNode = function (e) {
                            return e.namespaceURI === this.namespaceURI && e.prefix === this.prefix && e.localName === this.localName && e.value === this.value
                        }, e
                    }()
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLNode": 317, "babel-runtime/core-js/object/create": 50}],
            299: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/create"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i, n, o = {}.hasOwnProperty;
                    i = e("./NodeType"), n = e("./XMLCharacterData"), t.exports = function (e) {
                        function t(e, n) {
                            if (t.__super__.constructor.call(this, e), null == n) throw new Error("Missing CDATA text. " + this.debugInfo());
                            this.name = "#cdata-section", this.type = i.CData, this.value = this.stringify.cdata(n)
                        }

                        return function (e, t) {
                            for (var i in t) o.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t.prototype.clone = function () {
                            return (0, a.default)(this)
                        }, t.prototype.toString = function (e) {
                            return this.options.writer.cdata(this, this.options.writer.filterOptions(e))
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLCharacterData": 300, "babel-runtime/core-js/object/create": 50}],
            300: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/create"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i, n = {}.hasOwnProperty;
                    i = e("./XMLNode"), t.exports = function (e) {
                        function t(e) {
                            t.__super__.constructor.call(this, e), this.value = ""
                        }

                        return function (e, t) {
                            for (var i in t) n.call(t, i) && (e[i] = t[i]);

                            function o() {
                                this.constructor = e
                            }

                            o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
                        }(t, e), Object.defineProperty(t.prototype, "data", {
                            get: function () {
                                return this.value
                            }, set: function (e) {
                                return this.value = e || ""
                            }
                        }), Object.defineProperty(t.prototype, "length", {
                            get: function () {
                                return this.value.length
                            }
                        }), Object.defineProperty(t.prototype, "textContent", {
                            get: function () {
                                return this.value
                            }, set: function (e) {
                                return this.value = e || ""
                            }
                        }), t.prototype.clone = function () {
                            return (0, a.default)(this)
                        }, t.prototype.substringData = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.appendData = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.insertData = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.deleteData = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.replaceData = function (e, t, i) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.isEqualNode = function (e) {
                            return !!t.__super__.isEqualNode.apply(this, arguments).isEqualNode(e) && e.data === this.data
                        }, t
                    }(i)
                }).call(void 0)
            }, {"./XMLNode": 317, "babel-runtime/core-js/object/create": 50}],
            301: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/create"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i, n, o = {}.hasOwnProperty;
                    i = e("./NodeType"), n = e("./XMLCharacterData"), t.exports = function (e) {
                        function t(e, n) {
                            if (t.__super__.constructor.call(this, e), null == n) throw new Error("Missing comment text. " + this.debugInfo());
                            this.name = "#comment", this.type = i.Comment, this.value = this.stringify.comment(n)
                        }

                        return function (e, t) {
                            for (var i in t) o.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t.prototype.clone = function () {
                            return (0, a.default)(this)
                        }, t.prototype.toString = function (e) {
                            return this.options.writer.comment(this, this.options.writer.filterOptions(e))
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLCharacterData": 300, "babel-runtime/core-js/object/create": 50}],
            302: [function (e, t, i) {
                "use strict";
                var n = e("babel-runtime/core-js/object/keys"), o = s(n), a = e("babel-runtime/core-js/object/create"),
                    r = s(a);

                function s(e) {
                    return e && e.__esModule ? e : {default: e}
                }

                (function () {
                    var i, n;
                    i = e("./XMLDOMErrorHandler"), n = e("./XMLDOMStringList"), t.exports = function () {
                        function e() {
                            this.defaultParams = {
                                "canonical-form": !1,
                                "cdata-sections": !1,
                                comments: !1,
                                "datatype-normalization": !1,
                                "element-content-whitespace": !0,
                                entities: !0,
                                "error-handler": new i,
                                infoset: !0,
                                "validate-if-schema": !1,
                                namespaces: !0,
                                "namespace-declarations": !0,
                                "normalize-characters": !1,
                                "schema-location": "",
                                "schema-type": "",
                                "split-cdata-sections": !0,
                                validate: !1,
                                "well-formed": !0
                            }, this.params = (0, r.default)(this.defaultParams)
                        }

                        return Object.defineProperty(e.prototype, "parameterNames", {
                            get: function () {
                                return new n((0, o.default)(this.defaultParams))
                            }
                        }), e.prototype.getParameter = function (e) {
                            return this.params.hasOwnProperty(e) ? this.params[e] : null
                        }, e.prototype.canSetParameter = function (e, t) {
                            return !0
                        }, e.prototype.setParameter = function (e, t) {
                            return null != t ? this.params[e] = t : delete this.params[e]
                        }, e
                    }()
                }).call(void 0)
            }, {
                "./XMLDOMErrorHandler": 303,
                "./XMLDOMStringList": 305,
                "babel-runtime/core-js/object/create": 50,
                "babel-runtime/core-js/object/keys": 55
            }],
            303: [function (e, t, i) {
                "use strict";
                (function () {
                    t.exports = function () {
                        function e() {
                        }

                        return e.prototype.handleError = function (e) {
                            throw new Error(e)
                        }, e
                    }()
                }).call(void 0)
            }, {}],
            304: [function (e, t, i) {
                "use strict";
                (function () {
                    t.exports = function () {
                        function e() {
                        }

                        return e.prototype.hasFeature = function (e, t) {
                            return !0
                        }, e.prototype.createDocumentType = function (e, t, i) {
                            throw new Error("This DOM method is not implemented.")
                        }, e.prototype.createDocument = function (e, t, i) {
                            throw new Error("This DOM method is not implemented.")
                        }, e.prototype.createHTMLDocument = function (e) {
                            throw new Error("This DOM method is not implemented.")
                        }, e.prototype.getFeature = function (e, t) {
                            throw new Error("This DOM method is not implemented.")
                        }, e
                    }()
                }).call(void 0)
            }, {}],
            305: [function (e, t, i) {
                "use strict";
                (function () {
                    t.exports = function () {
                        function e(e) {
                            this.arr = e || []
                        }

                        return Object.defineProperty(e.prototype, "length", {
                            get: function () {
                                return this.arr.length
                            }
                        }), e.prototype.item = function (e) {
                            return this.arr[e] || null
                        }, e.prototype.contains = function (e) {
                            return -1 !== this.arr.indexOf(e)
                        }, e
                    }()
                }).call(void 0)
            }, {}],
            306: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o = {}.hasOwnProperty;
                    n = e("./XMLNode"), i = e("./NodeType"), t.exports = function (e) {
                        function t(e, n, o, a, r, s) {
                            if (t.__super__.constructor.call(this, e), null == n) throw new Error("Missing DTD element name. " + this.debugInfo());
                            if (null == o) throw new Error("Missing DTD attribute name. " + this.debugInfo(n));
                            if (!a) throw new Error("Missing DTD attribute type. " + this.debugInfo(n));
                            if (!r) throw new Error("Missing DTD attribute default. " + this.debugInfo(n));
                            if (0 !== r.indexOf("#") && (r = "#" + r), !r.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(n));
                            if (s && !r.match(/^(#FIXED|#DEFAULT)$/)) throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(n));
                            this.elementName = this.stringify.name(n), this.type = i.AttributeDeclaration, this.attributeName = this.stringify.name(o), this.attributeType = this.stringify.dtdAttType(a), s && (this.defaultValue = this.stringify.dtdAttDefault(s)), this.defaultValueType = r
                        }

                        return function (e, t) {
                            for (var i in t) o.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t.prototype.toString = function (e) {
                            return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(e))
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLNode": 317}],
            307: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o = {}.hasOwnProperty;
                    n = e("./XMLNode"), i = e("./NodeType"), t.exports = function (e) {
                        function t(e, n, o) {
                            if (t.__super__.constructor.call(this, e), null == n) throw new Error("Missing DTD element name. " + this.debugInfo());
                            o || (o = "(#PCDATA)"), Array.isArray(o) && (o = "(" + o.join(",") + ")"), this.name = this.stringify.name(n), this.type = i.ElementDeclaration, this.value = this.stringify.dtdElementValue(o)
                        }

                        return function (e, t) {
                            for (var i in t) o.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t.prototype.toString = function (e) {
                            return this.options.writer.dtdElement(this, this.options.writer.filterOptions(e))
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLNode": 317}],
            308: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o, a = {}.hasOwnProperty;
                    o = e("./Utility").isObject, n = e("./XMLNode"), i = e("./NodeType"), t.exports = function (e) {
                        function t(e, n, a, r) {
                            if (t.__super__.constructor.call(this, e), null == a) throw new Error("Missing DTD entity name. " + this.debugInfo(a));
                            if (null == r) throw new Error("Missing DTD entity value. " + this.debugInfo(a));
                            if (this.pe = !!n, this.name = this.stringify.name(a), this.type = i.EntityDeclaration, o(r)) {
                                if (!r.pubID && !r.sysID) throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(a));
                                if (r.pubID && !r.sysID) throw new Error("System identifier is required for a public external entity. " + this.debugInfo(a));
                                if (this.internal = !1, null != r.pubID && (this.pubID = this.stringify.dtdPubID(r.pubID)), null != r.sysID && (this.sysID = this.stringify.dtdSysID(r.sysID)), null != r.nData && (this.nData = this.stringify.dtdNData(r.nData)), this.pe && this.nData) throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(a))
                            } else this.value = this.stringify.dtdEntityValue(r), this.internal = !0
                        }

                        return function (e, t) {
                            for (var i in t) a.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), Object.defineProperty(t.prototype, "publicId", {
                            get: function () {
                                return this.pubID
                            }
                        }), Object.defineProperty(t.prototype, "systemId", {
                            get: function () {
                                return this.sysID
                            }
                        }), Object.defineProperty(t.prototype, "notationName", {
                            get: function () {
                                return this.nData || null
                            }
                        }), Object.defineProperty(t.prototype, "inputEncoding", {
                            get: function () {
                                return null
                            }
                        }), Object.defineProperty(t.prototype, "xmlEncoding", {
                            get: function () {
                                return null
                            }
                        }), Object.defineProperty(t.prototype, "xmlVersion", {
                            get: function () {
                                return null
                            }
                        }), t.prototype.toString = function (e) {
                            return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(e))
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./Utility": 296, "./XMLNode": 317}],
            309: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o = {}.hasOwnProperty;
                    n = e("./XMLNode"), i = e("./NodeType"), t.exports = function (e) {
                        function t(e, n, o) {
                            if (t.__super__.constructor.call(this, e), null == n) throw new Error("Missing DTD notation name. " + this.debugInfo(n));
                            if (!o.pubID && !o.sysID) throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(n));
                            this.name = this.stringify.name(n), this.type = i.NotationDeclaration, null != o.pubID && (this.pubID = this.stringify.dtdPubID(o.pubID)), null != o.sysID && (this.sysID = this.stringify.dtdSysID(o.sysID))
                        }

                        return function (e, t) {
                            for (var i in t) o.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), Object.defineProperty(t.prototype, "publicId", {
                            get: function () {
                                return this.pubID
                            }
                        }), Object.defineProperty(t.prototype, "systemId", {
                            get: function () {
                                return this.sysID
                            }
                        }), t.prototype.toString = function (e) {
                            return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(e))
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLNode": 317}],
            310: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o, a = {}.hasOwnProperty;
                    o = e("./Utility").isObject, n = e("./XMLNode"), i = e("./NodeType"), t.exports = function (e) {
                        function t(e, n, a, r) {
                            var s;
                            t.__super__.constructor.call(this, e), o(n) && (n = (s = n).version, a = s.encoding, r = s.standalone), n || (n = "1.0"), this.type = i.Declaration, this.version = this.stringify.xmlVersion(n), null != a && (this.encoding = this.stringify.xmlEncoding(a)), null != r && (this.standalone = this.stringify.xmlStandalone(r))
                        }

                        return function (e, t) {
                            for (var i in t) a.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t.prototype.toString = function (e) {
                            return this.options.writer.declaration(this, this.options.writer.filterOptions(e))
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./Utility": 296, "./XMLNode": 317}],
            311: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o, a, r, s, l, d, u = {}.hasOwnProperty;
                    d = e("./Utility").isObject, l = e("./XMLNode"), i = e("./NodeType"), n = e("./XMLDTDAttList"), a = e("./XMLDTDEntity"), o = e("./XMLDTDElement"), r = e("./XMLDTDNotation"), s = e("./XMLNamedNodeMap"), t.exports = function (e) {
                        function t(e, n, o) {
                            var a, r, s, l, u, c;
                            if (t.__super__.constructor.call(this, e), this.type = i.DocType, e.children) for (l = e.children, r = 0, s = l.length; r < s; r++) if ((a = l[r]).type === i.Element) {
                                this.name = a.name;
                                break
                            }
                            this.documentObject = e, d(n) && (n = (u = n).pubID, o = u.sysID), null == o && (o = (c = [n, o])[0], n = c[1]), null != n && (this.pubID = this.stringify.dtdPubID(n)), null != o && (this.sysID = this.stringify.dtdSysID(o))
                        }

                        return function (e, t) {
                            for (var i in t) u.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), Object.defineProperty(t.prototype, "entities", {
                            get: function () {
                                var e, t, n, o, a;
                                for (o = {}, a = this.children, t = 0, n = a.length; t < n; t++) (e = a[t]).type !== i.EntityDeclaration || e.pe || (o[e.name] = e);
                                return new s(o)
                            }
                        }), Object.defineProperty(t.prototype, "notations", {
                            get: function () {
                                var e, t, n, o, a;
                                for (o = {}, a = this.children, t = 0, n = a.length; t < n; t++) (e = a[t]).type === i.NotationDeclaration && (o[e.name] = e);
                                return new s(o)
                            }
                        }), Object.defineProperty(t.prototype, "publicId", {
                            get: function () {
                                return this.pubID
                            }
                        }), Object.defineProperty(t.prototype, "systemId", {
                            get: function () {
                                return this.sysID
                            }
                        }), Object.defineProperty(t.prototype, "internalSubset", {
                            get: function () {
                                throw new Error("This DOM method is not implemented." + this.debugInfo())
                            }
                        }), t.prototype.element = function (e, t) {
                            var i;
                            return i = new o(this, e, t), this.children.push(i), this
                        }, t.prototype.attList = function (e, t, i, o, a) {
                            var r;
                            return r = new n(this, e, t, i, o, a), this.children.push(r), this
                        }, t.prototype.entity = function (e, t) {
                            var i;
                            return i = new a(this, !1, e, t), this.children.push(i), this
                        }, t.prototype.pEntity = function (e, t) {
                            var i;
                            return i = new a(this, !0, e, t), this.children.push(i), this
                        }, t.prototype.notation = function (e, t) {
                            var i;
                            return i = new r(this, e, t), this.children.push(i), this
                        }, t.prototype.toString = function (e) {
                            return this.options.writer.docType(this, this.options.writer.filterOptions(e))
                        }, t.prototype.ele = function (e, t) {
                            return this.element(e, t)
                        }, t.prototype.att = function (e, t, i, n, o) {
                            return this.attList(e, t, i, n, o)
                        }, t.prototype.ent = function (e, t) {
                            return this.entity(e, t)
                        }, t.prototype.pent = function (e, t) {
                            return this.pEntity(e, t)
                        }, t.prototype.not = function (e, t) {
                            return this.notation(e, t)
                        }, t.prototype.up = function () {
                            return this.root() || this.documentObject
                        }, t.prototype.isEqualNode = function (e) {
                            return !!t.__super__.isEqualNode.apply(this, arguments).isEqualNode(e) && e.name === this.name && e.publicId === this.publicId && e.systemId === this.systemId
                        }, t
                    }(l)
                }).call(void 0)
            }, {
                "./NodeType": 295,
                "./Utility": 296,
                "./XMLDTDAttList": 306,
                "./XMLDTDElement": 307,
                "./XMLDTDEntity": 308,
                "./XMLDTDNotation": 309,
                "./XMLNamedNodeMap": 316,
                "./XMLNode": 317
            }],
            312: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o, a, r, s, l, d = {}.hasOwnProperty;
                    l = e("./Utility").isPlainObject, o = e("./XMLDOMImplementation"), n = e("./XMLDOMConfiguration"), a = e("./XMLNode"), i = e("./NodeType"), s = e("./XMLStringifier"), r = e("./XMLStringWriter"), t.exports = function (e) {
                        function t(e) {
                            t.__super__.constructor.call(this, null), this.name = "#document", this.type = i.Document, this.documentURI = null, this.domConfig = new n, e || (e = {}), e.writer || (e.writer = new r), this.options = e, this.stringify = new s(e)
                        }

                        return function (e, t) {
                            for (var i in t) d.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), Object.defineProperty(t.prototype, "implementation", {value: new o}), Object.defineProperty(t.prototype, "doctype", {
                            get: function () {
                                var e, t, n, o;
                                for (o = this.children, t = 0, n = o.length; t < n; t++) if ((e = o[t]).type === i.DocType) return e;
                                return null
                            }
                        }), Object.defineProperty(t.prototype, "documentElement", {
                            get: function () {
                                return this.rootObject || null
                            }
                        }), Object.defineProperty(t.prototype, "inputEncoding", {
                            get: function () {
                                return null
                            }
                        }), Object.defineProperty(t.prototype, "strictErrorChecking", {
                            get: function () {
                                return !1
                            }
                        }), Object.defineProperty(t.prototype, "xmlEncoding", {
                            get: function () {
                                return 0 !== this.children.length && this.children[0].type === i.Declaration ? this.children[0].encoding : null
                            }
                        }), Object.defineProperty(t.prototype, "xmlStandalone", {
                            get: function () {
                                return 0 !== this.children.length && this.children[0].type === i.Declaration && "yes" === this.children[0].standalone
                            }
                        }), Object.defineProperty(t.prototype, "xmlVersion", {
                            get: function () {
                                return 0 !== this.children.length && this.children[0].type === i.Declaration ? this.children[0].version : "1.0"
                            }
                        }), Object.defineProperty(t.prototype, "URL", {
                            get: function () {
                                return this.documentURI
                            }
                        }), Object.defineProperty(t.prototype, "origin", {
                            get: function () {
                                return null
                            }
                        }), Object.defineProperty(t.prototype, "compatMode", {
                            get: function () {
                                return null
                            }
                        }), Object.defineProperty(t.prototype, "characterSet", {
                            get: function () {
                                return null
                            }
                        }), Object.defineProperty(t.prototype, "contentType", {
                            get: function () {
                                return null
                            }
                        }), t.prototype.end = function (e) {
                            var t;
                            return t = {}, e ? l(e) && (t = e, e = this.options.writer) : e = this.options.writer, e.document(this, e.filterOptions(t))
                        }, t.prototype.toString = function (e) {
                            return this.options.writer.document(this, this.options.writer.filterOptions(e))
                        }, t.prototype.createElement = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createDocumentFragment = function () {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createTextNode = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createComment = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createCDATASection = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createProcessingInstruction = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createAttribute = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createEntityReference = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getElementsByTagName = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.importNode = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createElementNS = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createAttributeNS = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getElementsByTagNameNS = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getElementById = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.adoptNode = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.normalizeDocument = function () {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.renameNode = function (e, t, i) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getElementsByClassName = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createEvent = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createRange = function () {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createNodeIterator = function (e, t, i) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.createTreeWalker = function (e, t, i) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t
                    }(a)
                }).call(void 0)
            }, {
                "./NodeType": 295,
                "./Utility": 296,
                "./XMLDOMConfiguration": 302,
                "./XMLDOMImplementation": 304,
                "./XMLNode": 317,
                "./XMLStringWriter": 322,
                "./XMLStringifier": 323
            }],
            313: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o, a, r, s, l, d, u, c, h, f, p, g, m, v, y, T, w, k, C, b, I, S = {}.hasOwnProperty;
                    I = e("./Utility"), C = I.isObject, k = I.isFunction, b = I.isPlainObject, w = I.getValue, i = e("./NodeType"), f = e("./XMLDocument"), p = e("./XMLElement"), a = e("./XMLCData"), r = e("./XMLComment"), m = e("./XMLRaw"), T = e("./XMLText"), g = e("./XMLProcessingInstruction"), c = e("./XMLDeclaration"), h = e("./XMLDocType"), s = e("./XMLDTDAttList"), d = e("./XMLDTDEntity"), l = e("./XMLDTDElement"), u = e("./XMLDTDNotation"), o = e("./XMLAttribute"), y = e("./XMLStringifier"), v = e("./XMLStringWriter"), n = e("./WriterState"), t.exports = function () {
                        function e(e, t, n) {
                            var o;
                            this.name = "?xml", this.type = i.Document, e || (e = {}), o = {}, e.writer ? b(e.writer) && (o = e.writer, e.writer = new v) : e.writer = new v, this.options = e, this.writer = e.writer, this.writerOptions = this.writer.filterOptions(o), this.stringify = new y(e), this.onDataCallback = t || function () {
                            }, this.onEndCallback = n || function () {
                            }, this.currentNode = null, this.currentLevel = -1, this.openTags = {}, this.documentStarted = !1, this.documentCompleted = !1, this.root = null
                        }

                        return e.prototype.createChildNode = function (e) {
                            var t, n, o, a, r, s, l, d;
                            switch (e.type) {
                                case i.CData:
                                    this.cdata(e.value);
                                    break;
                                case i.Comment:
                                    this.comment(e.value);
                                    break;
                                case i.Element:
                                    for (n in o = {}, l = e.attribs) S.call(l, n) && (t = l[n], o[n] = t.value);
                                    this.node(e.name, o);
                                    break;
                                case i.Dummy:
                                    this.dummy();
                                    break;
                                case i.Raw:
                                    this.raw(e.value);
                                    break;
                                case i.Text:
                                    this.text(e.value);
                                    break;
                                case i.ProcessingInstruction:
                                    this.instruction(e.target, e.value);
                                    break;
                                default:
                                    throw new Error("This XML node type is not supported in a JS object: " + e.constructor.name)
                            }
                            for (d = e.children, r = 0, s = d.length; r < s; r++) a = d[r], this.createChildNode(a), a.type === i.Element && this.up();
                            return this
                        }, e.prototype.dummy = function () {
                            return this
                        }, e.prototype.node = function (e, t, i) {
                            var n;
                            if (null == e) throw new Error("Missing node name.");
                            if (this.root && -1 === this.currentLevel) throw new Error("Document can only have one root node. " + this.debugInfo(e));
                            return this.openCurrent(), e = w(e), null == t && (t = {}), t = w(t), C(t) || (i = (n = [t, i])[0], t = n[1]), this.currentNode = new p(this, e, t), this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, null != i && this.text(i), this
                        }, e.prototype.element = function (e, t, n) {
                            var o, a, r, s, l, d;
                            if (this.currentNode && this.currentNode.type === i.DocType) this.dtdElement.apply(this, arguments); else if (Array.isArray(e) || C(e) || k(e)) for (s = this.options.noValidation, this.options.noValidation = !0, (d = new f(this.options).element("TEMP_ROOT")).element(e), this.options.noValidation = s, l = d.children, a = 0, r = l.length; a < r; a++) o = l[a], this.createChildNode(o), o.type === i.Element && this.up(); else this.node(e, t, n);
                            return this
                        }, e.prototype.attribute = function (e, t) {
                            var i, n;
                            if (!this.currentNode || this.currentNode.children) throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(e));
                            if (null != e && (e = w(e)), C(e)) for (i in e) S.call(e, i) && (n = e[i], this.attribute(i, n)); else k(t) && (t = t.apply()), this.options.keepNullAttributes && null == t ? this.currentNode.attribs[e] = new o(this, e, "") : null != t && (this.currentNode.attribs[e] = new o(this, e, t));
                            return this
                        }, e.prototype.text = function (e) {
                            var t;
                            return this.openCurrent(), t = new T(this, e), this.onData(this.writer.text(t, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.cdata = function (e) {
                            var t;
                            return this.openCurrent(), t = new a(this, e), this.onData(this.writer.cdata(t, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.comment = function (e) {
                            var t;
                            return this.openCurrent(), t = new r(this, e), this.onData(this.writer.comment(t, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.raw = function (e) {
                            var t;
                            return this.openCurrent(), t = new m(this, e), this.onData(this.writer.raw(t, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.instruction = function (e, t) {
                            var i, n, o, a, r;
                            if (this.openCurrent(), null != e && (e = w(e)), null != t && (t = w(t)), Array.isArray(e)) for (i = 0, a = e.length; i < a; i++) n = e[i], this.instruction(n); else if (C(e)) for (n in e) S.call(e, n) && (o = e[n], this.instruction(n, o)); else k(t) && (t = t.apply()), r = new g(this, e, t), this.onData(this.writer.processingInstruction(r, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
                            return this
                        }, e.prototype.declaration = function (e, t, i) {
                            var n;
                            if (this.openCurrent(), this.documentStarted) throw new Error("declaration() must be the first node.");
                            return n = new c(this, e, t, i), this.onData(this.writer.declaration(n, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.doctype = function (e, t, i) {
                            if (this.openCurrent(), null == e) throw new Error("Missing root node name.");
                            if (this.root) throw new Error("dtd() must come before the root node.");
                            return this.currentNode = new h(this, t, i), this.currentNode.rootNodeName = e, this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, this
                        }, e.prototype.dtdElement = function (e, t) {
                            var i;
                            return this.openCurrent(), i = new l(this, e, t), this.onData(this.writer.dtdElement(i, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.attList = function (e, t, i, n, o) {
                            var a;
                            return this.openCurrent(), a = new s(this, e, t, i, n, o), this.onData(this.writer.dtdAttList(a, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.entity = function (e, t) {
                            var i;
                            return this.openCurrent(), i = new d(this, !1, e, t), this.onData(this.writer.dtdEntity(i, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.pEntity = function (e, t) {
                            var i;
                            return this.openCurrent(), i = new d(this, !0, e, t), this.onData(this.writer.dtdEntity(i, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.notation = function (e, t) {
                            var i;
                            return this.openCurrent(), i = new u(this, e, t), this.onData(this.writer.dtdNotation(i, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this
                        }, e.prototype.up = function () {
                            if (this.currentLevel < 0) throw new Error("The document node has no parent.");
                            return this.currentNode ? (this.currentNode.children ? this.closeNode(this.currentNode) : this.openNode(this.currentNode), this.currentNode = null) : this.closeNode(this.openTags[this.currentLevel]), delete this.openTags[this.currentLevel], this.currentLevel--, this
                        }, e.prototype.end = function () {
                            for (; this.currentLevel >= 0;) this.up();
                            return this.onEnd()
                        }, e.prototype.openCurrent = function () {
                            if (this.currentNode) return this.currentNode.children = !0, this.openNode(this.currentNode)
                        }, e.prototype.openNode = function (e) {
                            var t, o, a, r;
                            if (!e.isOpen) {
                                if (this.root || 0 !== this.currentLevel || e.type !== i.Element || (this.root = e), o = "", e.type === i.Element) {
                                    for (a in this.writerOptions.state = n.OpenTag, o = this.writer.indent(e, this.writerOptions, this.currentLevel) + "<" + e.name, r = e.attribs) S.call(r, a) && (t = r[a], o += this.writer.attribute(t, this.writerOptions, this.currentLevel));
                                    o += (e.children ? ">" : "/>") + this.writer.endline(e, this.writerOptions, this.currentLevel), this.writerOptions.state = n.InsideTag
                                } else this.writerOptions.state = n.OpenTag, o = this.writer.indent(e, this.writerOptions, this.currentLevel) + "<!DOCTYPE " + e.rootNodeName, e.pubID && e.sysID ? o += ' PUBLIC "' + e.pubID + '" "' + e.sysID + '"' : e.sysID && (o += ' SYSTEM "' + e.sysID + '"'), e.children ? (o += " [", this.writerOptions.state = n.InsideTag) : (this.writerOptions.state = n.CloseTag, o += ">"), o += this.writer.endline(e, this.writerOptions, this.currentLevel);
                                return this.onData(o, this.currentLevel), e.isOpen = !0
                            }
                        }, e.prototype.closeNode = function (e) {
                            var t;
                            if (!e.isClosed) return t = "", this.writerOptions.state = n.CloseTag, t = e.type === i.Element ? this.writer.indent(e, this.writerOptions, this.currentLevel) + "</" + e.name + ">" + this.writer.endline(e, this.writerOptions, this.currentLevel) : this.writer.indent(e, this.writerOptions, this.currentLevel) + "]>" + this.writer.endline(e, this.writerOptions, this.currentLevel), this.writerOptions.state = n.None, this.onData(t, this.currentLevel), e.isClosed = !0
                        }, e.prototype.onData = function (e, t) {
                            return this.documentStarted = !0, this.onDataCallback(e, t + 1)
                        }, e.prototype.onEnd = function () {
                            return this.documentCompleted = !0, this.onEndCallback()
                        }, e.prototype.debugInfo = function (e) {
                            return null == e ? "" : "node: <" + e + ">"
                        }, e.prototype.ele = function () {
                            return this.element.apply(this, arguments)
                        }, e.prototype.nod = function (e, t, i) {
                            return this.node(e, t, i)
                        }, e.prototype.txt = function (e) {
                            return this.text(e)
                        }, e.prototype.dat = function (e) {
                            return this.cdata(e)
                        }, e.prototype.com = function (e) {
                            return this.comment(e)
                        }, e.prototype.ins = function (e, t) {
                            return this.instruction(e, t)
                        }, e.prototype.dec = function (e, t, i) {
                            return this.declaration(e, t, i)
                        }, e.prototype.dtd = function (e, t, i) {
                            return this.doctype(e, t, i)
                        }, e.prototype.e = function (e, t, i) {
                            return this.element(e, t, i)
                        }, e.prototype.n = function (e, t, i) {
                            return this.node(e, t, i)
                        }, e.prototype.t = function (e) {
                            return this.text(e)
                        }, e.prototype.d = function (e) {
                            return this.cdata(e)
                        }, e.prototype.c = function (e) {
                            return this.comment(e)
                        }, e.prototype.r = function (e) {
                            return this.raw(e)
                        }, e.prototype.i = function (e, t) {
                            return this.instruction(e, t)
                        }, e.prototype.att = function () {
                            return this.currentNode && this.currentNode.type === i.DocType ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments)
                        }, e.prototype.a = function () {
                            return this.currentNode && this.currentNode.type === i.DocType ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments)
                        }, e.prototype.ent = function (e, t) {
                            return this.entity(e, t)
                        }, e.prototype.pent = function (e, t) {
                            return this.pEntity(e, t)
                        }, e.prototype.not = function (e, t) {
                            return this.notation(e, t)
                        }, e
                    }()
                }).call(void 0)
            }, {
                "./NodeType": 295,
                "./Utility": 296,
                "./WriterState": 297,
                "./XMLAttribute": 298,
                "./XMLCData": 299,
                "./XMLComment": 301,
                "./XMLDTDAttList": 306,
                "./XMLDTDElement": 307,
                "./XMLDTDEntity": 308,
                "./XMLDTDNotation": 309,
                "./XMLDeclaration": 310,
                "./XMLDocType": 311,
                "./XMLDocument": 312,
                "./XMLElement": 315,
                "./XMLProcessingInstruction": 319,
                "./XMLRaw": 320,
                "./XMLStringWriter": 322,
                "./XMLStringifier": 323,
                "./XMLText": 324
            }],
            314: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/create"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i, n, o = {}.hasOwnProperty;
                    n = e("./XMLNode"), i = e("./NodeType"), t.exports = function (e) {
                        function t(e) {
                            t.__super__.constructor.call(this, e), this.type = i.Dummy
                        }

                        return function (e, t) {
                            for (var i in t) o.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t.prototype.clone = function () {
                            return (0, a.default)(this)
                        }, t.prototype.toString = function (e) {
                            return ""
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLNode": 317, "babel-runtime/core-js/object/create": 50}],
            315: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/create"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i, n, o, r, s, l, d, u, c = {}.hasOwnProperty;
                    u = e("./Utility"), d = u.isObject, l = u.isFunction, s = u.getValue, r = e("./XMLNode"), i = e("./NodeType"), n = e("./XMLAttribute"), o = e("./XMLNamedNodeMap"), t.exports = function (e) {
                        function t(e, n, o) {
                            var a, r, s, l;
                            if (t.__super__.constructor.call(this, e), null == n) throw new Error("Missing element name. " + this.debugInfo());
                            if (this.name = this.stringify.name(n), this.type = i.Element, this.attribs = {}, this.schemaTypeInfo = null, null != o && this.attribute(o), e.type === i.Document && (this.isRoot = !0, this.documentObject = e, e.rootObject = this, e.children)) for (l = e.children, r = 0, s = l.length; r < s; r++) if ((a = l[r]).type === i.DocType) {
                                a.name = this.name;
                                break
                            }
                        }

                        return function (e, t) {
                            for (var i in t) c.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), Object.defineProperty(t.prototype, "tagName", {
                            get: function () {
                                return this.name
                            }
                        }), Object.defineProperty(t.prototype, "namespaceURI", {
                            get: function () {
                                return ""
                            }
                        }), Object.defineProperty(t.prototype, "prefix", {
                            get: function () {
                                return ""
                            }
                        }), Object.defineProperty(t.prototype, "localName", {
                            get: function () {
                                return this.name
                            }
                        }), Object.defineProperty(t.prototype, "id", {
                            get: function () {
                                throw new Error("This DOM method is not implemented." + this.debugInfo())
                            }
                        }), Object.defineProperty(t.prototype, "className", {
                            get: function () {
                                throw new Error("This DOM method is not implemented." + this.debugInfo())
                            }
                        }), Object.defineProperty(t.prototype, "classList", {
                            get: function () {
                                throw new Error("This DOM method is not implemented." + this.debugInfo())
                            }
                        }), Object.defineProperty(t.prototype, "attributes", {
                            get: function () {
                                return this.attributeMap && this.attributeMap.nodes || (this.attributeMap = new o(this.attribs)), this.attributeMap
                            }
                        }), t.prototype.clone = function () {
                            var e, t, i, n;
                            for (t in(i = (0, a.default)(this)).isRoot && (i.documentObject = null), i.attribs = {}, n = this.attribs) c.call(n, t) && (e = n[t], i.attribs[t] = e.clone());
                            return i.children = [], this.children.forEach(function (e) {
                                var t;
                                return (t = e.clone()).parent = i, i.children.push(t)
                            }), i
                        }, t.prototype.attribute = function (e, t) {
                            var i, o;
                            if (null != e && (e = s(e)), d(e)) for (i in e) c.call(e, i) && (o = e[i], this.attribute(i, o)); else l(t) && (t = t.apply()), this.options.keepNullAttributes && null == t ? this.attribs[e] = new n(this, e, "") : null != t && (this.attribs[e] = new n(this, e, t));
                            return this
                        }, t.prototype.removeAttribute = function (e) {
                            var t, i, n;
                            if (null == e) throw new Error("Missing attribute name. " + this.debugInfo());
                            if (e = s(e), Array.isArray(e)) for (i = 0, n = e.length; i < n; i++) t = e[i], delete this.attribs[t]; else delete this.attribs[e];
                            return this
                        }, t.prototype.toString = function (e) {
                            return this.options.writer.element(this, this.options.writer.filterOptions(e))
                        }, t.prototype.att = function (e, t) {
                            return this.attribute(e, t)
                        }, t.prototype.a = function (e, t) {
                            return this.attribute(e, t)
                        }, t.prototype.getAttribute = function (e) {
                            return this.attribs.hasOwnProperty(e) ? this.attribs[e].value : null
                        }, t.prototype.setAttribute = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getAttributeNode = function (e) {
                            return this.attribs.hasOwnProperty(e) ? this.attribs[e] : null
                        }, t.prototype.setAttributeNode = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.removeAttributeNode = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getElementsByTagName = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getAttributeNS = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.setAttributeNS = function (e, t, i) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.removeAttributeNS = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getAttributeNodeNS = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.setAttributeNodeNS = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getElementsByTagNameNS = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.hasAttribute = function (e) {
                            return this.attribs.hasOwnProperty(e)
                        }, t.prototype.hasAttributeNS = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.setIdAttribute = function (e, t) {
                            return this.attribs.hasOwnProperty(e) ? this.attribs[e].isId : t
                        }, t.prototype.setIdAttributeNS = function (e, t, i) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.setIdAttributeNode = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getElementsByTagName = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getElementsByTagNameNS = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getElementsByClassName = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.isEqualNode = function (e) {
                            var i, n, o;
                            if (!t.__super__.isEqualNode.apply(this, arguments).isEqualNode(e)) return !1;
                            if (e.namespaceURI !== this.namespaceURI) return !1;
                            if (e.prefix !== this.prefix) return !1;
                            if (e.localName !== this.localName) return !1;
                            if (e.attribs.length !== this.attribs.length) return !1;
                            for (i = n = 0, o = this.attribs.length - 1; 0 <= o ? n <= o : n >= o; i = 0 <= o ? ++n : --n) if (!this.attribs[i].isEqualNode(e.attribs[i])) return !1;
                            return !0
                        }, t
                    }(r)
                }).call(void 0)
            }, {
                "./NodeType": 295,
                "./Utility": 296,
                "./XMLAttribute": 298,
                "./XMLNamedNodeMap": 316,
                "./XMLNode": 317,
                "babel-runtime/core-js/object/create": 50
            }],
            316: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/keys"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    t.exports = function () {
                        function e(e) {
                            this.nodes = e
                        }

                        return Object.defineProperty(e.prototype, "length", {
                            get: function () {
                                return (0, a.default)(this.nodes).length || 0
                            }
                        }), e.prototype.clone = function () {
                            return this.nodes = null
                        }, e.prototype.getNamedItem = function (e) {
                            return this.nodes[e]
                        }, e.prototype.setNamedItem = function (e) {
                            var t;
                            return t = this.nodes[e.nodeName], this.nodes[e.nodeName] = e, t || null
                        }, e.prototype.removeNamedItem = function (e) {
                            var t;
                            return t = this.nodes[e], delete this.nodes[e], t || null
                        }, e.prototype.item = function (e) {
                            return this.nodes[(0, a.default)(this.nodes)[e]] || null
                        }, e.prototype.getNamedItemNS = function (e, t) {
                            throw new Error("This DOM method is not implemented.")
                        }, e.prototype.setNamedItemNS = function (e) {
                            throw new Error("This DOM method is not implemented.")
                        }, e.prototype.removeNamedItemNS = function (e, t) {
                            throw new Error("This DOM method is not implemented.")
                        }, e
                    }()
                }).call(void 0)
            }, {"babel-runtime/core-js/object/keys": 55}],
            317: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o, a, r, s, l, d, u, c, h, f, p, g, m, v, y, T = {}.hasOwnProperty;
                    y = e("./Utility"), v = y.isObject, m = y.isFunction, g = y.isEmpty, p = y.getValue, d = null, o = null, a = null, r = null, s = null, h = null, f = null, c = null, l = null, n = null, u = null, i = null, t.exports = function () {
                        function t(t) {
                            this.parent = t, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify), this.value = null, this.children = [], this.baseURI = null, d || (d = e("./XMLElement"), o = e("./XMLCData"), a = e("./XMLComment"), r = e("./XMLDeclaration"), s = e("./XMLDocType"), h = e("./XMLRaw"), f = e("./XMLText"), c = e("./XMLProcessingInstruction"), l = e("./XMLDummy"), n = e("./NodeType"), u = e("./XMLNodeList"), e("./XMLNamedNodeMap"), i = e("./DocumentPosition"))
                        }

                        return Object.defineProperty(t.prototype, "nodeName", {
                            get: function () {
                                return this.name
                            }
                        }), Object.defineProperty(t.prototype, "nodeType", {
                            get: function () {
                                return this.type
                            }
                        }), Object.defineProperty(t.prototype, "nodeValue", {
                            get: function () {
                                return this.value
                            }
                        }), Object.defineProperty(t.prototype, "parentNode", {
                            get: function () {
                                return this.parent
                            }
                        }), Object.defineProperty(t.prototype, "childNodes", {
                            get: function () {
                                return this.childNodeList && this.childNodeList.nodes || (this.childNodeList = new u(this.children)), this.childNodeList
                            }
                        }), Object.defineProperty(t.prototype, "firstChild", {
                            get: function () {
                                return this.children[0] || null
                            }
                        }), Object.defineProperty(t.prototype, "lastChild", {
                            get: function () {
                                return this.children[this.children.length - 1] || null
                            }
                        }), Object.defineProperty(t.prototype, "previousSibling", {
                            get: function () {
                                var e;
                                return e = this.parent.children.indexOf(this), this.parent.children[e - 1] || null
                            }
                        }), Object.defineProperty(t.prototype, "nextSibling", {
                            get: function () {
                                var e;
                                return e = this.parent.children.indexOf(this), this.parent.children[e + 1] || null
                            }
                        }), Object.defineProperty(t.prototype, "ownerDocument", {
                            get: function () {
                                return this.document() || null
                            }
                        }), Object.defineProperty(t.prototype, "textContent", {
                            get: function () {
                                var e, t, i, o, a;
                                if (this.nodeType === n.Element || this.nodeType === n.DocumentFragment) {
                                    for (a = "", o = this.children, t = 0, i = o.length; t < i; t++) (e = o[t]).textContent && (a += e.textContent);
                                    return a
                                }
                                return null
                            }, set: function (e) {
                                throw new Error("This DOM method is not implemented." + this.debugInfo())
                            }
                        }), t.prototype.setParent = function (e) {
                            var t, i, n, o, a;
                            for (this.parent = e, e && (this.options = e.options, this.stringify = e.stringify), o = this.children, a = [], i = 0, n = o.length; i < n; i++) t = o[i], a.push(t.setParent(this));
                            return a
                        }, t.prototype.element = function (e, t, i) {
                            var n, o, a, r, s, l, d, u, c, h, f;
                            if (l = null, null === t && null == i && (t = (c = [{}, null])[0], i = c[1]), null == t && (t = {}), t = p(t), v(t) || (i = (h = [t, i])[0], t = h[1]), null != e && (e = p(e)), Array.isArray(e)) for (a = 0, d = e.length; a < d; a++) o = e[a], l = this.element(o); else if (m(e)) l = this.element(e.apply()); else if (v(e)) {
                                for (s in e) if (T.call(e, s)) if (f = e[s], m(f) && (f = f.apply()), !this.options.ignoreDecorators && this.stringify.convertAttKey && 0 === s.indexOf(this.stringify.convertAttKey)) l = this.attribute(s.substr(this.stringify.convertAttKey.length), f); else if (!this.options.separateArrayItems && Array.isArray(f) && g(f)) l = this.dummy(); else if (v(f) && g(f)) l = this.element(s); else if (this.options.keepNullNodes || null != f) if (!this.options.separateArrayItems && Array.isArray(f)) for (r = 0, u = f.length; r < u; r++) o = f[r], (n = {})[s] = o, l = this.element(n); else v(f) ? !this.options.ignoreDecorators && this.stringify.convertTextKey && 0 === s.indexOf(this.stringify.convertTextKey) ? l = this.element(f) : (l = this.element(s)).element(f) : l = this.element(s, f); else l = this.dummy()
                            } else l = this.options.keepNullNodes || null !== i ? !this.options.ignoreDecorators && this.stringify.convertTextKey && 0 === e.indexOf(this.stringify.convertTextKey) ? this.text(i) : !this.options.ignoreDecorators && this.stringify.convertCDataKey && 0 === e.indexOf(this.stringify.convertCDataKey) ? this.cdata(i) : !this.options.ignoreDecorators && this.stringify.convertCommentKey && 0 === e.indexOf(this.stringify.convertCommentKey) ? this.comment(i) : !this.options.ignoreDecorators && this.stringify.convertRawKey && 0 === e.indexOf(this.stringify.convertRawKey) ? this.raw(i) : !this.options.ignoreDecorators && this.stringify.convertPIKey && 0 === e.indexOf(this.stringify.convertPIKey) ? this.instruction(e.substr(this.stringify.convertPIKey.length), i) : this.node(e, t, i) : this.dummy();
                            if (null == l) throw new Error("Could not create any elements with: " + e + ". " + this.debugInfo());
                            return l
                        }, t.prototype.insertBefore = function (e, t, i) {
                            var n, o, a, r, s;
                            if (null != e ? e.type : void 0) return r = t, (a = e).setParent(this), r ? (o = children.indexOf(r), s = children.splice(o), children.push(a), Array.prototype.push.apply(children, s)) : children.push(a), a;
                            if (this.isRoot) throw new Error("Cannot insert elements at root level. " + this.debugInfo(e));
                            return o = this.parent.children.indexOf(this), s = this.parent.children.splice(o), n = this.parent.element(e, t, i), Array.prototype.push.apply(this.parent.children, s), n
                        }, t.prototype.insertAfter = function (e, t, i) {
                            var n, o, a;
                            if (this.isRoot) throw new Error("Cannot insert elements at root level. " + this.debugInfo(e));
                            return o = this.parent.children.indexOf(this), a = this.parent.children.splice(o + 1), n = this.parent.element(e, t, i), Array.prototype.push.apply(this.parent.children, a), n
                        }, t.prototype.remove = function () {
                            var e;
                            if (this.isRoot) throw new Error("Cannot remove the root element. " + this.debugInfo());
                            return e = this.parent.children.indexOf(this), [].splice.apply(this.parent.children, [e, e - e + 1].concat([])), this.parent
                        }, t.prototype.node = function (e, t, i) {
                            var n, o;
                            return null != e && (e = p(e)), t || (t = {}), t = p(t), v(t) || (i = (o = [t, i])[0], t = o[1]), n = new d(this, e, t), null != i && n.text(i), this.children.push(n), n
                        }, t.prototype.text = function (e) {
                            var t;
                            return v(e) && this.element(e), t = new f(this, e), this.children.push(t), this
                        }, t.prototype.cdata = function (e) {
                            var t;
                            return t = new o(this, e), this.children.push(t), this
                        }, t.prototype.comment = function (e) {
                            var t;
                            return t = new a(this, e), this.children.push(t), this
                        }, t.prototype.commentBefore = function (e) {
                            var t, i;
                            return t = this.parent.children.indexOf(this), i = this.parent.children.splice(t), this.parent.comment(e), Array.prototype.push.apply(this.parent.children, i), this
                        }, t.prototype.commentAfter = function (e) {
                            var t, i;
                            return t = this.parent.children.indexOf(this), i = this.parent.children.splice(t + 1), this.parent.comment(e), Array.prototype.push.apply(this.parent.children, i), this
                        }, t.prototype.raw = function (e) {
                            var t;
                            return t = new h(this, e), this.children.push(t), this
                        }, t.prototype.dummy = function () {
                            return new l(this)
                        }, t.prototype.instruction = function (e, t) {
                            var i, n, o, a, r;
                            if (null != e && (e = p(e)), null != t && (t = p(t)), Array.isArray(e)) for (a = 0, r = e.length; a < r; a++) i = e[a], this.instruction(i); else if (v(e)) for (i in e) T.call(e, i) && (n = e[i], this.instruction(i, n)); else m(t) && (t = t.apply()), o = new c(this, e, t), this.children.push(o);
                            return this
                        }, t.prototype.instructionBefore = function (e, t) {
                            var i, n;
                            return i = this.parent.children.indexOf(this), n = this.parent.children.splice(i), this.parent.instruction(e, t), Array.prototype.push.apply(this.parent.children, n), this
                        }, t.prototype.instructionAfter = function (e, t) {
                            var i, n;
                            return i = this.parent.children.indexOf(this), n = this.parent.children.splice(i + 1), this.parent.instruction(e, t), Array.prototype.push.apply(this.parent.children, n), this
                        }, t.prototype.declaration = function (e, t, i) {
                            var o, a;
                            return o = this.document(), a = new r(o, e, t, i), 0 === o.children.length ? o.children.unshift(a) : o.children[0].type === n.Declaration ? o.children[0] = a : o.children.unshift(a), o.root() || o
                        }, t.prototype.dtd = function (e, t) {
                            var i, o, a, r, l, d, u, c, h;
                            for (i = this.document(), o = new s(i, e, t), c = i.children, a = r = 0, d = c.length; r < d; a = ++r) if (c[a].type === n.DocType) return i.children[a] = o, o;
                            for (h = i.children, a = l = 0, u = h.length; l < u; a = ++l) if (h[a].isRoot) return i.children.splice(a, 0, o), o;
                            return i.children.push(o), o
                        }, t.prototype.up = function () {
                            if (this.isRoot) throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
                            return this.parent
                        }, t.prototype.root = function () {
                            var e;
                            for (e = this; e;) {
                                if (e.type === n.Document) return e.rootObject;
                                if (e.isRoot) return e;
                                e = e.parent
                            }
                        }, t.prototype.document = function () {
                            var e;
                            for (e = this; e;) {
                                if (e.type === n.Document) return e;
                                e = e.parent
                            }
                        }, t.prototype.end = function (e) {
                            return this.document().end(e)
                        }, t.prototype.prev = function () {
                            var e;
                            if ((e = this.parent.children.indexOf(this)) < 1) throw new Error("Already at the first node. " + this.debugInfo());
                            return this.parent.children[e - 1]
                        }, t.prototype.next = function () {
                            var e;
                            if (-1 === (e = this.parent.children.indexOf(this)) || e === this.parent.children.length - 1) throw new Error("Already at the last node. " + this.debugInfo());
                            return this.parent.children[e + 1]
                        }, t.prototype.importDocument = function (e) {
                            var t;
                            return (t = e.root().clone()).parent = this, t.isRoot = !1, this.children.push(t), this
                        }, t.prototype.debugInfo = function (e) {
                            var t, i;
                            return null != (e = e || this.name) || (null != (t = this.parent) ? t.name : void 0) ? null == e ? "parent: <" + this.parent.name + ">" : (null != (i = this.parent) ? i.name : void 0) ? "node: <" + e + ">, parent: <" + this.parent.name + ">" : "node: <" + e + ">" : ""
                        }, t.prototype.ele = function (e, t, i) {
                            return this.element(e, t, i)
                        }, t.prototype.nod = function (e, t, i) {
                            return this.node(e, t, i)
                        }, t.prototype.txt = function (e) {
                            return this.text(e)
                        }, t.prototype.dat = function (e) {
                            return this.cdata(e)
                        }, t.prototype.com = function (e) {
                            return this.comment(e)
                        }, t.prototype.ins = function (e, t) {
                            return this.instruction(e, t)
                        }, t.prototype.doc = function () {
                            return this.document()
                        }, t.prototype.dec = function (e, t, i) {
                            return this.declaration(e, t, i)
                        }, t.prototype.e = function (e, t, i) {
                            return this.element(e, t, i)
                        }, t.prototype.n = function (e, t, i) {
                            return this.node(e, t, i)
                        }, t.prototype.t = function (e) {
                            return this.text(e)
                        }, t.prototype.d = function (e) {
                            return this.cdata(e)
                        }, t.prototype.c = function (e) {
                            return this.comment(e)
                        }, t.prototype.r = function (e) {
                            return this.raw(e)
                        }, t.prototype.i = function (e, t) {
                            return this.instruction(e, t)
                        }, t.prototype.u = function () {
                            return this.up()
                        }, t.prototype.importXMLBuilder = function (e) {
                            return this.importDocument(e)
                        }, t.prototype.replaceChild = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.removeChild = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.appendChild = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.hasChildNodes = function () {
                            return 0 !== this.children.length
                        }, t.prototype.cloneNode = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.normalize = function () {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.isSupported = function (e, t) {
                            return !0
                        }, t.prototype.hasAttributes = function () {
                            return 0 !== this.attribs.length
                        }, t.prototype.compareDocumentPosition = function (e) {
                            var t;
                            return this === e ? 0 : this.document() !== e.document() ? (t = i.Disconnected | i.ImplementationSpecific, Math.random() < .5 ? t |= i.Preceding : t |= i.Following, t) : this.isAncestor(e) ? i.Contains | i.Preceding : this.isDescendant(e) ? i.Contains | i.Following : this.isPreceding(e) ? i.Preceding : i.Following
                        }, t.prototype.isSameNode = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.lookupPrefix = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.isDefaultNamespace = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.lookupNamespaceURI = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.isEqualNode = function (e) {
                            var t, i, n;
                            if (e.nodeType !== this.nodeType) return !1;
                            if (e.children.length !== this.children.length) return !1;
                            for (t = i = 0, n = this.children.length - 1; 0 <= n ? i <= n : i >= n; t = 0 <= n ? ++i : --i) if (!this.children[t].isEqualNode(e.children[t])) return !1;
                            return !0
                        }, t.prototype.getFeature = function (e, t) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.setUserData = function (e, t, i) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.getUserData = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.contains = function (e) {
                            return !!e && (e === this || this.isDescendant(e))
                        }, t.prototype.isDescendant = function (e) {
                            var t, i, n, o;
                            for (o = this.children, i = 0, n = o.length; i < n; i++) {
                                if (t = o[i], e === t) return !0;
                                if (t.isDescendant(e)) return !0
                            }
                            return !1
                        }, t.prototype.isAncestor = function (e) {
                            return e.isDescendant(this)
                        }, t.prototype.isPreceding = function (e) {
                            var t, i;
                            return t = this.treePosition(e), i = this.treePosition(this), -1 !== t && -1 !== i && t < i
                        }, t.prototype.isFollowing = function (e) {
                            var t, i;
                            return t = this.treePosition(e), i = this.treePosition(this), -1 !== t && -1 !== i && t > i
                        }, t.prototype.treePosition = function (e) {
                            var t, i;
                            return i = 0, t = !1, this.foreachTreeNode(this.document(), function (n) {
                                if (i++, !t && n === e) return t = !0
                            }), t ? i : -1
                        }, t.prototype.foreachTreeNode = function (e, t) {
                            var i, n, o, a, r;
                            for (e || (e = this.document()), a = e.children, n = 0, o = a.length; n < o; n++) {
                                if (i = a[n], r = t(i)) return r;
                                if (r = this.foreachTreeNode(i, t)) return r
                            }
                        }, t
                    }()
                }).call(void 0)
            }, {
                "./DocumentPosition": 294,
                "./NodeType": 295,
                "./Utility": 296,
                "./XMLCData": 299,
                "./XMLComment": 301,
                "./XMLDeclaration": 310,
                "./XMLDocType": 311,
                "./XMLDummy": 314,
                "./XMLElement": 315,
                "./XMLNamedNodeMap": 316,
                "./XMLNodeList": 318,
                "./XMLProcessingInstruction": 319,
                "./XMLRaw": 320,
                "./XMLText": 324
            }],
            318: [function (e, t, i) {
                "use strict";
                (function () {
                    t.exports = function () {
                        function e(e) {
                            this.nodes = e
                        }

                        return Object.defineProperty(e.prototype, "length", {
                            get: function () {
                                return this.nodes.length || 0
                            }
                        }), e.prototype.clone = function () {
                            return this.nodes = null
                        }, e.prototype.item = function (e) {
                            return this.nodes[e] || null
                        }, e
                    }()
                }).call(void 0)
            }, {}],
            319: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/create"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i, n, o = {}.hasOwnProperty;
                    i = e("./NodeType"), n = e("./XMLCharacterData"), t.exports = function (e) {
                        function t(e, n, o) {
                            if (t.__super__.constructor.call(this, e), null == n) throw new Error("Missing instruction target. " + this.debugInfo());
                            this.type = i.ProcessingInstruction, this.target = this.stringify.insTarget(n), this.name = this.target, o && (this.value = this.stringify.insValue(o))
                        }

                        return function (e, t) {
                            for (var i in t) o.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t.prototype.clone = function () {
                            return (0, a.default)(this)
                        }, t.prototype.toString = function (e) {
                            return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(e))
                        }, t.prototype.isEqualNode = function (e) {
                            return !!t.__super__.isEqualNode.apply(this, arguments).isEqualNode(e) && e.target === this.target
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLCharacterData": 300, "babel-runtime/core-js/object/create": 50}],
            320: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/create"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i, n, o = {}.hasOwnProperty;
                    i = e("./NodeType"), n = e("./XMLNode"), t.exports = function (e) {
                        function t(e, n) {
                            if (t.__super__.constructor.call(this, e), null == n) throw new Error("Missing raw text. " + this.debugInfo());
                            this.type = i.Raw, this.value = this.stringify.raw(n)
                        }

                        return function (e, t) {
                            for (var i in t) o.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t.prototype.clone = function () {
                            return (0, a.default)(this)
                        }, t.prototype.toString = function (e) {
                            return this.options.writer.raw(this, this.options.writer.filterOptions(e))
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLNode": 317, "babel-runtime/core-js/object/create": 50}],
            321: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o, a = {}.hasOwnProperty;
                    i = e("./NodeType"), o = e("./XMLWriterBase"), n = e("./WriterState"), t.exports = function (e) {
                        function t(e, i) {
                            this.stream = e, t.__super__.constructor.call(this, i)
                        }

                        return function (e, t) {
                            for (var i in t) a.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), t.prototype.endline = function (e, i, o) {
                            return e.isLastRootNode && i.state === n.CloseTag ? "" : t.__super__.endline.call(this, e, i, o)
                        }, t.prototype.document = function (e, t) {
                            var i, n, o, a, r, s, l, d, u;
                            for (l = e.children, n = o = 0, r = l.length; o < r; n = ++o) (i = l[n]).isLastRootNode = n === e.children.length - 1;
                            for (t = this.filterOptions(t), d = e.children, u = [], a = 0, s = d.length; a < s; a++) i = d[a], u.push(this.writeChildNode(i, t, 0));
                            return u
                        }, t.prototype.attribute = function (e, i, n) {
                            return this.stream.write(t.__super__.attribute.call(this, e, i, n))
                        }, t.prototype.cdata = function (e, i, n) {
                            return this.stream.write(t.__super__.cdata.call(this, e, i, n))
                        }, t.prototype.comment = function (e, i, n) {
                            return this.stream.write(t.__super__.comment.call(this, e, i, n))
                        }, t.prototype.declaration = function (e, i, n) {
                            return this.stream.write(t.__super__.declaration.call(this, e, i, n))
                        }, t.prototype.docType = function (e, t, i) {
                            var o, a, r, s;
                            if (i || (i = 0), this.openNode(e, t, i), t.state = n.OpenTag, this.stream.write(this.indent(e, t, i)), this.stream.write("<!DOCTYPE " + e.root().name), e.pubID && e.sysID ? this.stream.write(' PUBLIC "' + e.pubID + '" "' + e.sysID + '"') : e.sysID && this.stream.write(' SYSTEM "' + e.sysID + '"'), e.children.length > 0) {
                                for (this.stream.write(" ["), this.stream.write(this.endline(e, t, i)), t.state = n.InsideTag, s = e.children, a = 0, r = s.length; a < r; a++) o = s[a], this.writeChildNode(o, t, i + 1);
                                t.state = n.CloseTag, this.stream.write("]")
                            }
                            return t.state = n.CloseTag, this.stream.write(t.spaceBeforeSlash + ">"), this.stream.write(this.endline(e, t, i)), t.state = n.None, this.closeNode(e, t, i)
                        }, t.prototype.element = function (e, t, o) {
                            var r, s, l, d, u, c, h, f, p;
                            for (h in o || (o = 0), this.openNode(e, t, o), t.state = n.OpenTag, this.stream.write(this.indent(e, t, o) + "<" + e.name), f = e.attribs) a.call(f, h) && (r = f[h], this.attribute(r, t, o));
                            if (l = e.children.length, d = 0 === l ? null : e.children[0], 0 === l || e.children.every(function (e) {
                                return (e.type === i.Text || e.type === i.Raw) && "" === e.value
                            })) t.allowEmpty ? (this.stream.write(">"), t.state = n.CloseTag, this.stream.write("</" + e.name + ">")) : (t.state = n.CloseTag, this.stream.write(t.spaceBeforeSlash + "/>")); else if (!t.pretty || 1 !== l || d.type !== i.Text && d.type !== i.Raw || null == d.value) {
                                for (this.stream.write(">" + this.endline(e, t, o)), t.state = n.InsideTag, p = e.children, u = 0, c = p.length; u < c; u++) s = p[u], this.writeChildNode(s, t, o + 1);
                                t.state = n.CloseTag, this.stream.write(this.indent(e, t, o) + "</" + e.name + ">")
                            } else this.stream.write(">"), t.state = n.InsideTag, t.suppressPrettyCount++, this.writeChildNode(d, t, o + 1), t.suppressPrettyCount--, t.state = n.CloseTag, this.stream.write("</" + e.name + ">");
                            return this.stream.write(this.endline(e, t, o)), t.state = n.None, this.closeNode(e, t, o)
                        }, t.prototype.processingInstruction = function (e, i, n) {
                            return this.stream.write(t.__super__.processingInstruction.call(this, e, i, n))
                        }, t.prototype.raw = function (e, i, n) {
                            return this.stream.write(t.__super__.raw.call(this, e, i, n))
                        }, t.prototype.text = function (e, i, n) {
                            return this.stream.write(t.__super__.text.call(this, e, i, n))
                        }, t.prototype.dtdAttList = function (e, i, n) {
                            return this.stream.write(t.__super__.dtdAttList.call(this, e, i, n))
                        }, t.prototype.dtdElement = function (e, i, n) {
                            return this.stream.write(t.__super__.dtdElement.call(this, e, i, n))
                        }, t.prototype.dtdEntity = function (e, i, n) {
                            return this.stream.write(t.__super__.dtdEntity.call(this, e, i, n))
                        }, t.prototype.dtdNotation = function (e, i, n) {
                            return this.stream.write(t.__super__.dtdNotation.call(this, e, i, n))
                        }, t
                    }(o)
                }).call(void 0)
            }, {"./NodeType": 295, "./WriterState": 297, "./XMLWriterBase": 325}],
            322: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n = {}.hasOwnProperty;
                    i = e("./XMLWriterBase"), t.exports = function (e) {
                        function t(e) {
                            t.__super__.constructor.call(this, e)
                        }

                        return function (e, t) {
                            for (var i in t) n.call(t, i) && (e[i] = t[i]);

                            function o() {
                                this.constructor = e
                            }

                            o.prototype = t.prototype, e.prototype = new o, e.__super__ = t.prototype
                        }(t, e), t.prototype.document = function (e, t) {
                            var i, n, o, a, r;
                            for (t = this.filterOptions(t), a = "", r = e.children, n = 0, o = r.length; n < o; n++) i = r[n], a += this.writeChildNode(i, t, 0);
                            return t.pretty && a.slice(-t.newline.length) === t.newline && (a = a.slice(0, -t.newline.length)), a
                        }, t
                    }(i)
                }).call(void 0)
            }, {"./XMLWriterBase": 325}],
            323: [function (e, t, i) {
                "use strict";
                (function () {
                    var e = function (e, t) {
                        return function () {
                            return e.apply(t, arguments)
                        }
                    }, i = {}.hasOwnProperty;
                    t.exports = function () {
                        function t(t) {
                            var n, o, a;
                            for (n in this.assertLegalName = e(this.assertLegalName, this), this.assertLegalChar = e(this.assertLegalChar, this), t || (t = {}), this.options = t, this.options.version || (this.options.version = "1.0"), o = t.stringify || {}) i.call(o, n) && (a = o[n], this[n] = a)
                        }

                        return t.prototype.name = function (e) {
                            return this.options.noValidation ? e : this.assertLegalName("" + e || "")
                        }, t.prototype.text = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar(this.textEscape("" + e || ""))
                        }, t.prototype.cdata = function (e) {
                            return this.options.noValidation ? e : (e = (e = "" + e || "").replace("]]>", "]]]]><![CDATA[>"), this.assertLegalChar(e))
                        }, t.prototype.comment = function (e) {
                            if (this.options.noValidation) return e;
                            if ((e = "" + e || "").match(/--/)) throw new Error("Comment text cannot contain double-hypen: " + e);
                            return this.assertLegalChar(e)
                        }, t.prototype.raw = function (e) {
                            return this.options.noValidation ? e : "" + e || ""
                        }, t.prototype.attValue = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar(this.attEscape(e = "" + e || ""))
                        }, t.prototype.insTarget = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar("" + e || "")
                        }, t.prototype.insValue = function (e) {
                            if (this.options.noValidation) return e;
                            if ((e = "" + e || "").match(/\?>/)) throw new Error("Invalid processing instruction value: " + e);
                            return this.assertLegalChar(e)
                        }, t.prototype.xmlVersion = function (e) {
                            if (this.options.noValidation) return e;
                            if (!(e = "" + e || "").match(/1\.[0-9]+/)) throw new Error("Invalid version number: " + e);
                            return e
                        }, t.prototype.xmlEncoding = function (e) {
                            if (this.options.noValidation) return e;
                            if (!(e = "" + e || "").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) throw new Error("Invalid encoding: " + e);
                            return this.assertLegalChar(e)
                        }, t.prototype.xmlStandalone = function (e) {
                            return this.options.noValidation ? e : e ? "yes" : "no"
                        }, t.prototype.dtdPubID = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar("" + e || "")
                        }, t.prototype.dtdSysID = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar("" + e || "")
                        }, t.prototype.dtdElementValue = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar("" + e || "")
                        }, t.prototype.dtdAttType = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar("" + e || "")
                        }, t.prototype.dtdAttDefault = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar("" + e || "")
                        }, t.prototype.dtdEntityValue = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar("" + e || "")
                        }, t.prototype.dtdNData = function (e) {
                            return this.options.noValidation ? e : this.assertLegalChar("" + e || "")
                        }, t.prototype.convertAttKey = "@", t.prototype.convertPIKey = "?", t.prototype.convertTextKey = "#text", t.prototype.convertCDataKey = "#cdata", t.prototype.convertCommentKey = "#comment", t.prototype.convertRawKey = "#raw", t.prototype.assertLegalChar = function (e) {
                            var t, i;
                            if (this.options.noValidation) return e;
                            if (t = "", "1.0" === this.options.version) {
                                if (t = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, i = e.match(t)) throw new Error("Invalid character in string: " + e + " at index " + i.index)
                            } else if ("1.1" === this.options.version && (t = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, i = e.match(t))) throw new Error("Invalid character in string: " + e + " at index " + i.index);
                            return e
                        }, t.prototype.assertLegalName = function (e) {
                            var t;
                            if (this.options.noValidation) return e;
                            if (this.assertLegalChar(e), t = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/, !e.match(t)) throw new Error("Invalid character in name");
                            return e
                        }, t.prototype.textEscape = function (e) {
                            var t;
                            return this.options.noValidation ? e : (t = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g, e.replace(t, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\r/g, "&#xD;"))
                        }, t.prototype.attEscape = function (e) {
                            var t;
                            return this.options.noValidation ? e : (t = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g, e.replace(t, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;").replace(/\t/g, "&#x9;").replace(/\n/g, "&#xA;").replace(/\r/g, "&#xD;"))
                        }, t
                    }()
                }).call(void 0)
            }, {}],
            324: [function (e, t, i) {
                "use strict";
                var n, o = e("babel-runtime/core-js/object/create"), a = (n = o) && n.__esModule ? n : {default: n};
                (function () {
                    var i, n, o = {}.hasOwnProperty;
                    i = e("./NodeType"), n = e("./XMLCharacterData"), t.exports = function (e) {
                        function t(e, n) {
                            if (t.__super__.constructor.call(this, e), null == n) throw new Error("Missing element text. " + this.debugInfo());
                            this.name = "#text", this.type = i.Text, this.value = this.stringify.text(n)
                        }

                        return function (e, t) {
                            for (var i in t) o.call(t, i) && (e[i] = t[i]);

                            function n() {
                                this.constructor = e
                            }

                            n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype
                        }(t, e), Object.defineProperty(t.prototype, "isElementContentWhitespace", {
                            get: function () {
                                throw new Error("This DOM method is not implemented." + this.debugInfo())
                            }
                        }), Object.defineProperty(t.prototype, "wholeText", {
                            get: function () {
                                var e, t, i;
                                for (i = "", t = this.previousSibling; t;) i = t.data + i, t = t.previousSibling;
                                for (i += this.data, e = this.nextSibling; e;) i += e.data, e = e.nextSibling;
                                return i
                            }
                        }), t.prototype.clone = function () {
                            return (0, a.default)(this)
                        }, t.prototype.toString = function (e) {
                            return this.options.writer.text(this, this.options.writer.filterOptions(e))
                        }, t.prototype.splitText = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t.prototype.replaceWholeText = function (e) {
                            throw new Error("This DOM method is not implemented." + this.debugInfo())
                        }, t
                    }(n)
                }).call(void 0)
            }, {"./NodeType": 295, "./XMLCharacterData": 300, "babel-runtime/core-js/object/create": 50}],
            325: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o, a = {}.hasOwnProperty;
                    o = e("./Utility").assign, i = e("./NodeType"), e("./XMLDeclaration"), e("./XMLDocType"), e("./XMLCData"), e("./XMLComment"), e("./XMLElement"), e("./XMLRaw"), e("./XMLText"), e("./XMLProcessingInstruction"), e("./XMLDummy"), e("./XMLDTDAttList"), e("./XMLDTDElement"), e("./XMLDTDEntity"), e("./XMLDTDNotation"), n = e("./WriterState"), t.exports = function () {
                        function e(e) {
                            var t, i, n;
                            for (t in e || (e = {}), this.options = e, i = e.writer || {}) a.call(i, t) && (n = i[t], this["_" + t] = this[t], this[t] = n)
                        }

                        return e.prototype.filterOptions = function (e) {
                            var t, i, a, r, s, l, d, u;
                            return e || (e = {}), e = o({}, this.options, e), (t = {writer: this}).pretty = e.pretty || !1, t.allowEmpty = e.allowEmpty || !1, t.indent = null != (i = e.indent) ? i : "  ", t.newline = null != (a = e.newline) ? a : "\n", t.offset = null != (r = e.offset) ? r : 0, t.dontPrettyTextNodes = null != (s = null != (l = e.dontPrettyTextNodes) ? l : e.dontprettytextnodes) ? s : 0, t.spaceBeforeSlash = null != (d = null != (u = e.spaceBeforeSlash) ? u : e.spacebeforeslash) ? d : "", !0 === t.spaceBeforeSlash && (t.spaceBeforeSlash = " "), t.suppressPrettyCount = 0, t.user = {}, t.state = n.None, t
                        }, e.prototype.indent = function (e, t, i) {
                            var n;
                            return !t.pretty || t.suppressPrettyCount ? "" : t.pretty && (n = (i || 0) + t.offset + 1) > 0 ? new Array(n).join(t.indent) : ""
                        }, e.prototype.endline = function (e, t, i) {
                            return !t.pretty || t.suppressPrettyCount ? "" : t.newline
                        }, e.prototype.attribute = function (e, t, i) {
                            var n;
                            return this.openAttribute(e, t, i), n = " " + e.name + '="' + e.value + '"', this.closeAttribute(e, t, i), n
                        }, e.prototype.cdata = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i) + "<![CDATA[", t.state = n.InsideTag, o += e.value, t.state = n.CloseTag, o += "]]>" + this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.comment = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i) + "\x3c!-- ", t.state = n.InsideTag, o += e.value, t.state = n.CloseTag, o += " --\x3e" + this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.declaration = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i) + "<?xml", t.state = n.InsideTag, o += ' version="' + e.version + '"', null != e.encoding && (o += ' encoding="' + e.encoding + '"'), null != e.standalone && (o += ' standalone="' + e.standalone + '"'), t.state = n.CloseTag, o += t.spaceBeforeSlash + "?>", o += this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.docType = function (e, t, i) {
                            var o, a, r, s, l;
                            if (i || (i = 0), this.openNode(e, t, i), t.state = n.OpenTag, s = this.indent(e, t, i), s += "<!DOCTYPE " + e.root().name, e.pubID && e.sysID ? s += ' PUBLIC "' + e.pubID + '" "' + e.sysID + '"' : e.sysID && (s += ' SYSTEM "' + e.sysID + '"'), e.children.length > 0) {
                                for (s += " [", s += this.endline(e, t, i), t.state = n.InsideTag, l = e.children, a = 0, r = l.length; a < r; a++) o = l[a], s += this.writeChildNode(o, t, i + 1);
                                t.state = n.CloseTag, s += "]"
                            }
                            return t.state = n.CloseTag, s += t.spaceBeforeSlash + ">", s += this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), s
                        }, e.prototype.element = function (e, t, o) {
                            var r, s, l, d, u, c, h, f, p, g, m, v, y, T;
                            for (p in o || (o = 0), g = !1, m = "", this.openNode(e, t, o), t.state = n.OpenTag, m += this.indent(e, t, o) + "<" + e.name, v = e.attribs) a.call(v, p) && (r = v[p], m += this.attribute(r, t, o));
                            if (l = e.children.length, d = 0 === l ? null : e.children[0], 0 === l || e.children.every(function (e) {
                                return (e.type === i.Text || e.type === i.Raw) && "" === e.value
                            })) t.allowEmpty ? (m += ">", t.state = n.CloseTag, m += "</" + e.name + ">" + this.endline(e, t, o)) : (t.state = n.CloseTag, m += t.spaceBeforeSlash + "/>" + this.endline(e, t, o)); else if (!t.pretty || 1 !== l || d.type !== i.Text && d.type !== i.Raw || null == d.value) {
                                if (t.dontPrettyTextNodes) for (y = e.children, u = 0, h = y.length; u < h; u++) if (((s = y[u]).type === i.Text || s.type === i.Raw) && null != s.value) {
                                    t.suppressPrettyCount++, g = !0;
                                    break
                                }
                                for (m += ">" + this.endline(e, t, o), t.state = n.InsideTag, T = e.children, c = 0, f = T.length; c < f; c++) s = T[c], m += this.writeChildNode(s, t, o + 1);
                                t.state = n.CloseTag, m += this.indent(e, t, o) + "</" + e.name + ">", g && t.suppressPrettyCount--, m += this.endline(e, t, o), t.state = n.None
                            } else m += ">", t.state = n.InsideTag, t.suppressPrettyCount++, g = !0, m += this.writeChildNode(d, t, o + 1), t.suppressPrettyCount--, g = !1, t.state = n.CloseTag, m += "</" + e.name + ">" + this.endline(e, t, o);
                            return this.closeNode(e, t, o), m
                        }, e.prototype.writeChildNode = function (e, t, n) {
                            switch (e.type) {
                                case i.CData:
                                    return this.cdata(e, t, n);
                                case i.Comment:
                                    return this.comment(e, t, n);
                                case i.Element:
                                    return this.element(e, t, n);
                                case i.Raw:
                                    return this.raw(e, t, n);
                                case i.Text:
                                    return this.text(e, t, n);
                                case i.ProcessingInstruction:
                                    return this.processingInstruction(e, t, n);
                                case i.Dummy:
                                    return "";
                                case i.Declaration:
                                    return this.declaration(e, t, n);
                                case i.DocType:
                                    return this.docType(e, t, n);
                                case i.AttributeDeclaration:
                                    return this.dtdAttList(e, t, n);
                                case i.ElementDeclaration:
                                    return this.dtdElement(e, t, n);
                                case i.EntityDeclaration:
                                    return this.dtdEntity(e, t, n);
                                case i.NotationDeclaration:
                                    return this.dtdNotation(e, t, n);
                                default:
                                    throw new Error("Unknown XML node type: " + e.constructor.name)
                            }
                        }, e.prototype.processingInstruction = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i) + "<?", t.state = n.InsideTag, o += e.target, e.value && (o += " " + e.value), t.state = n.CloseTag, o += t.spaceBeforeSlash + "?>", o += this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.raw = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i), t.state = n.InsideTag, o += e.value, t.state = n.CloseTag, o += this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.text = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i), t.state = n.InsideTag, o += e.value, t.state = n.CloseTag, o += this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.dtdAttList = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i) + "<!ATTLIST", t.state = n.InsideTag, o += " " + e.elementName + " " + e.attributeName + " " + e.attributeType, "#DEFAULT" !== e.defaultValueType && (o += " " + e.defaultValueType), e.defaultValue && (o += ' "' + e.defaultValue + '"'), t.state = n.CloseTag, o += t.spaceBeforeSlash + ">" + this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.dtdElement = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i) + "<!ELEMENT", t.state = n.InsideTag, o += " " + e.name + " " + e.value, t.state = n.CloseTag, o += t.spaceBeforeSlash + ">" + this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.dtdEntity = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i) + "<!ENTITY", t.state = n.InsideTag, e.pe && (o += " %"), o += " " + e.name, e.value ? o += ' "' + e.value + '"' : (e.pubID && e.sysID ? o += ' PUBLIC "' + e.pubID + '" "' + e.sysID + '"' : e.sysID && (o += ' SYSTEM "' + e.sysID + '"'), e.nData && (o += " NDATA " + e.nData)), t.state = n.CloseTag, o += t.spaceBeforeSlash + ">" + this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.dtdNotation = function (e, t, i) {
                            var o;
                            return this.openNode(e, t, i), t.state = n.OpenTag, o = this.indent(e, t, i) + "<!NOTATION", t.state = n.InsideTag, o += " " + e.name, e.pubID && e.sysID ? o += ' PUBLIC "' + e.pubID + '" "' + e.sysID + '"' : e.pubID ? o += ' PUBLIC "' + e.pubID + '"' : e.sysID && (o += ' SYSTEM "' + e.sysID + '"'), t.state = n.CloseTag, o += t.spaceBeforeSlash + ">" + this.endline(e, t, i), t.state = n.None, this.closeNode(e, t, i), o
                        }, e.prototype.openNode = function (e, t, i) {
                        }, e.prototype.closeNode = function (e, t, i) {
                        }, e.prototype.openAttribute = function (e, t, i) {
                        }, e.prototype.closeAttribute = function (e, t, i) {
                        }, e
                    }()
                }).call(void 0)
            }, {
                "./NodeType": 295,
                "./Utility": 296,
                "./WriterState": 297,
                "./XMLCData": 299,
                "./XMLComment": 301,
                "./XMLDTDAttList": 306,
                "./XMLDTDElement": 307,
                "./XMLDTDEntity": 308,
                "./XMLDTDNotation": 309,
                "./XMLDeclaration": 310,
                "./XMLDocType": 311,
                "./XMLDummy": 314,
                "./XMLElement": 315,
                "./XMLProcessingInstruction": 319,
                "./XMLRaw": 320,
                "./XMLText": 324
            }],
            326: [function (e, t, i) {
                "use strict";
                (function () {
                    var i, n, o, a, r, s, l, d, u, c;
                    c = e("./Utility"), d = c.assign, u = c.isFunction, o = e("./XMLDOMImplementation"), a = e("./XMLDocument"), r = e("./XMLDocumentCB"), l = e("./XMLStringWriter"), s = e("./XMLStreamWriter"), i = e("./NodeType"), n = e("./WriterState"), t.exports.create = function (e, t, i, n) {
                        var o, r;
                        if (null == e) throw new Error("Root element needs a name.");
                        return n = d({}, t, i, n), o = new a(n), r = o.element(e), n.headless || (o.declaration(n), null == n.pubID && null == n.sysID || o.dtd(n)), r
                    }, t.exports.begin = function (e, t, i) {
                        var n;
                        return u(e) && (t = (n = [e, t])[0], i = n[1], e = {}), t ? new r(e, t, i) : new a(e)
                    }, t.exports.stringWriter = function (e) {
                        return new l(e)
                    }, t.exports.streamWriter = function (e, t) {
                        return new s(e, t)
                    }, t.exports.implementation = new o, t.exports.nodeType = i, t.exports.writerState = n
                }).call(void 0)
            }, {
                "./NodeType": 295,
                "./Utility": 296,
                "./WriterState": 297,
                "./XMLDOMImplementation": 304,
                "./XMLDocument": 312,
                "./XMLDocumentCB": 313,
                "./XMLStreamWriter": 321,
                "./XMLStringWriter": 322
            }],
            327: [function (e, t, i) {
                t.exports = function () {
                    for (var e = {}, t = 0; t < arguments.length; t++) {
                        var i = arguments[t];
                        for (var o in i) n.call(i, o) && (e[o] = i[o])
                    }
                    return e
                };
                var n = Object.prototype.hasOwnProperty
            }, {}],
            328: [function (e, t, i) {
                "use strict";
                var n = e("buffer").Buffer, o = e("./sha"), a = e("./md5"), r = {sha1: o, md5: a}, s = 64,
                    l = n.alloc(s);

                function d(e, t) {
                    var i = r[e = e || "sha1"], o = [];
                    return i || u("algorithm:", e, "is not yet supported"), {
                        update: function (e) {
                            return n.isBuffer(e) || (e = n.from(e)), o.push(e), e.length, this
                        }, digest: function (e) {
                            var a = n.concat(o), r = t ? function (e, t, i) {
                                n.isBuffer(t) || (t = n.from(t)), n.isBuffer(i) || (i = n.from(i)), t.length > s ? t = e(t) : t.length < s && (t = n.concat([t, l], s));
                                for (var o = n.alloc(s), a = n.alloc(s), r = 0; r < s; r++) o[r] = 54 ^ t[r], a[r] = 92 ^ t[r];
                                var d = e(n.concat([o, i]));
                                return e(n.concat([a, d]))
                            }(i, t, a) : i(a);
                            return o = null, e ? r.toString(e) : r
                        }
                    }
                }

                function u() {
                    var e = [].slice.call(arguments).join(" ");
                    throw new Error([e, "we accept pull requests", "http://github.com/dominictarr/crypto-browserify"].join("\n"))
                }

                l.fill(0), i.createHash = function (e) {
                    return d(e)
                }, i.createHmac = function (e, t) {
                    return d(e, t)
                }, function (e, t) {
                    for (var i in e) t(e[i], i)
                }(["createCredentials", "createCipher", "createCipheriv", "createDecipher", "createDecipheriv", "createSign", "createVerify", "createDiffieHellman", "pbkdf2"], function (e) {
                    i[e] = function () {
                        u("sorry,", e, "is not implemented yet")
                    }
                })
            }, {"./md5": 330, "./sha": 331, buffer: 70}],
            329: [function (e, t, i) {
                "use strict";
                var n = e("buffer").Buffer, o = 4, a = n.alloc(o);
                a.fill(0);
                var r = 8;
                t.exports = {
                    hash: function (e, t, i, s) {
                        return n.isBuffer(e) || (e = n.from(e)), function (e, t, i) {
                            for (var o = n.alloc(t), a = i ? o.writeInt32BE : o.writeInt32LE, r = 0; r < e.length; r++) a.call(o, e[r], 4 * r, !0);
                            return o
                        }(t(function (e, t) {
                            if (e.length % o != 0) {
                                var i = e.length + (o - e.length % o);
                                e = n.concat([e, a], i)
                            }
                            for (var r = [], s = t ? e.readInt32BE : e.readInt32LE, l = 0; l < e.length; l += o) r.push(s.call(e, l));
                            return r
                        }(e, s), e.length * r), i, s)
                    }
                }
            }, {buffer: 70}],
            330: [function (e, t, i) {
                "use strict";
                var n = e("./helpers");

                function o(e, t) {
                    e[t >> 5] |= 128 << t % 32, e[14 + (t + 64 >>> 9 << 4)] = t;
                    for (var i = 1732584193, n = -271733879, o = -1732584194, a = 271733878, c = 0; c < e.length; c += 16) {
                        var h = i, f = n, p = o, g = a;
                        i = r(i, n, o, a, e[c + 0], 7, -680876936), a = r(a, i, n, o, e[c + 1], 12, -389564586), o = r(o, a, i, n, e[c + 2], 17, 606105819), n = r(n, o, a, i, e[c + 3], 22, -1044525330), i = r(i, n, o, a, e[c + 4], 7, -176418897), a = r(a, i, n, o, e[c + 5], 12, 1200080426), o = r(o, a, i, n, e[c + 6], 17, -1473231341), n = r(n, o, a, i, e[c + 7], 22, -45705983), i = r(i, n, o, a, e[c + 8], 7, 1770035416), a = r(a, i, n, o, e[c + 9], 12, -1958414417), o = r(o, a, i, n, e[c + 10], 17, -42063), n = r(n, o, a, i, e[c + 11], 22, -1990404162), i = r(i, n, o, a, e[c + 12], 7, 1804603682), a = r(a, i, n, o, e[c + 13], 12, -40341101), o = r(o, a, i, n, e[c + 14], 17, -1502002290), n = r(n, o, a, i, e[c + 15], 22, 1236535329), i = s(i, n, o, a, e[c + 1], 5, -165796510), a = s(a, i, n, o, e[c + 6], 9, -1069501632), o = s(o, a, i, n, e[c + 11], 14, 643717713), n = s(n, o, a, i, e[c + 0], 20, -373897302), i = s(i, n, o, a, e[c + 5], 5, -701558691), a = s(a, i, n, o, e[c + 10], 9, 38016083), o = s(o, a, i, n, e[c + 15], 14, -660478335), n = s(n, o, a, i, e[c + 4], 20, -405537848), i = s(i, n, o, a, e[c + 9], 5, 568446438), a = s(a, i, n, o, e[c + 14], 9, -1019803690), o = s(o, a, i, n, e[c + 3], 14, -187363961), n = s(n, o, a, i, e[c + 8], 20, 1163531501), i = s(i, n, o, a, e[c + 13], 5, -1444681467), a = s(a, i, n, o, e[c + 2], 9, -51403784), o = s(o, a, i, n, e[c + 7], 14, 1735328473), n = s(n, o, a, i, e[c + 12], 20, -1926607734), i = l(i, n, o, a, e[c + 5], 4, -378558), a = l(a, i, n, o, e[c + 8], 11, -2022574463), o = l(o, a, i, n, e[c + 11], 16, 1839030562), n = l(n, o, a, i, e[c + 14], 23, -35309556), i = l(i, n, o, a, e[c + 1], 4, -1530992060), a = l(a, i, n, o, e[c + 4], 11, 1272893353), o = l(o, a, i, n, e[c + 7], 16, -155497632), n = l(n, o, a, i, e[c + 10], 23, -1094730640), i = l(i, n, o, a, e[c + 13], 4, 681279174), a = l(a, i, n, o, e[c + 0], 11, -358537222), o = l(o, a, i, n, e[c + 3], 16, -722521979), n = l(n, o, a, i, e[c + 6], 23, 76029189), i = l(i, n, o, a, e[c + 9], 4, -640364487), a = l(a, i, n, o, e[c + 12], 11, -421815835), o = l(o, a, i, n, e[c + 15], 16, 530742520), n = l(n, o, a, i, e[c + 2], 23, -995338651), i = d(i, n, o, a, e[c + 0], 6, -198630844), a = d(a, i, n, o, e[c + 7], 10, 1126891415), o = d(o, a, i, n, e[c + 14], 15, -1416354905), n = d(n, o, a, i, e[c + 5], 21, -57434055), i = d(i, n, o, a, e[c + 12], 6, 1700485571), a = d(a, i, n, o, e[c + 3], 10, -1894986606), o = d(o, a, i, n, e[c + 10], 15, -1051523), n = d(n, o, a, i, e[c + 1], 21, -2054922799), i = d(i, n, o, a, e[c + 8], 6, 1873313359), a = d(a, i, n, o, e[c + 15], 10, -30611744), o = d(o, a, i, n, e[c + 6], 15, -1560198380), n = d(n, o, a, i, e[c + 13], 21, 1309151649), i = d(i, n, o, a, e[c + 4], 6, -145523070), a = d(a, i, n, o, e[c + 11], 10, -1120210379), o = d(o, a, i, n, e[c + 2], 15, 718787259), n = d(n, o, a, i, e[c + 9], 21, -343485551), i = u(i, h), n = u(n, f), o = u(o, p), a = u(a, g)
                    }
                    return Array(i, n, o, a)
                }

                function a(e, t, i, n, o, a) {
                    return u((r = u(u(t, e), u(n, a))) << (s = o) | r >>> 32 - s, i);
                    var r, s
                }

                function r(e, t, i, n, o, r, s) {
                    return a(t & i | ~t & n, e, t, o, r, s)
                }

                function s(e, t, i, n, o, r, s) {
                    return a(t & n | i & ~n, e, t, o, r, s)
                }

                function l(e, t, i, n, o, r, s) {
                    return a(t ^ i ^ n, e, t, o, r, s)
                }

                function d(e, t, i, n, o, r, s) {
                    return a(i ^ (t | ~n), e, t, o, r, s)
                }

                function u(e, t) {
                    var i = (65535 & e) + (65535 & t), n = (e >> 16) + (t >> 16) + (i >> 16);
                    return n << 16 | 65535 & i
                }

                t.exports = function (e) {
                    return n.hash(e, o, 16)
                }
            }, {"./helpers": 329}],
            331: [function (e, t, i) {
                "use strict";
                var n = e("./helpers");

                function o(e, t) {
                    e[t >> 5] |= 128 << 24 - t % 32, e[15 + (t + 64 >> 9 << 4)] = t;
                    for (var i = Array(80), n = 1732584193, o = -271733879, d = -1732584194, u = 271733878, c = -1009589776, h = 0; h < e.length; h += 16) {
                        for (var f = n, p = o, g = d, m = u, v = c, y = 0; y < 80; y++) {
                            i[y] = y < 16 ? e[h + y] : l(i[y - 3] ^ i[y - 8] ^ i[y - 14] ^ i[y - 16], 1);
                            var T = s(s(l(n, 5), a(y, o, d, u)), s(s(c, i[y]), r(y)));
                            c = u, u = d, d = l(o, 30), o = n, n = T
                        }
                        n = s(n, f), o = s(o, p), d = s(d, g), u = s(u, m), c = s(c, v)
                    }
                    return Array(n, o, d, u, c)
                }

                function a(e, t, i, n) {
                    return e < 20 ? t & i | ~t & n : e < 40 ? t ^ i ^ n : e < 60 ? t & i | t & n | i & n : t ^ i ^ n
                }

                function r(e) {
                    return e < 20 ? 1518500249 : e < 40 ? 1859775393 : e < 60 ? -1894007588 : -899497514
                }

                function s(e, t) {
                    var i = (65535 & e) + (65535 & t), n = (e >> 16) + (t >> 16) + (i >> 16);
                    return n << 16 | 65535 & i
                }

                function l(e, t) {
                    return e << t | e >>> 32 - t
                }

                t.exports = function (e) {
                    return n.hash(e, o, 20, !0)
                }
            }, {"./helpers": 329}],
            332: [function (e, t, i) {
                (function (n) {
                    "use strict";
                    var o = e("babel-runtime/core-js/object/create"), a = h(o),
                        r = e("babel-runtime/helpers/classCallCheck"), s = h(r),
                        l = e("babel-runtime/helpers/createClass"), d = h(l), u = e("babel-runtime/helpers/typeof"),
                        c = h(u);

                    function h(e) {
                        return e && e.__esModule ? e : {default: e}
                    }

                    !function (e) {
                        "object" === (void 0 === i ? "undefined" : (0, c.default)(i)) && void 0 !== t ? t.exports = e() : "function" == typeof define && define.amd ? define([], e) : ("undefined" != typeof window ? window : void 0 !== n ? n : "undefined" != typeof self ? self : this).mime = e()
                    }(function () {
                        return function t(i, n, o) {
                            function a(s, l) {
                                if (!n[s]) {
                                    if (!i[s]) {
                                        var d = "function" == typeof e && e;
                                        if (!l && d) return d(s, !0);
                                        if (r) return r(s, !0);
                                        var u = new Error("Cannot find module '" + s + "'");
                                        throw u.code = "MODULE_NOT_FOUND", u
                                    }
                                    var c = n[s] = {exports: {}};
                                    i[s][0].call(c.exports, function (e) {
                                        var t = i[s][1][e];
                                        return a(t || e)
                                    }, c, c.exports, t, i, n, o)
                                }
                                return n[s].exports
                            }

                            for (var r = "function" == typeof e && e, s = 0; s < o.length; s++) a(o[s]);
                            return a
                        }({
                            1: [function (e, t, i) {
                                var n = function () {
                                    function e() {
                                        (0, s.default)(this, e), this._types = (0, a.default)(null), this._extensions = (0, a.default)(null);
                                        for (var t = 0; t < arguments.length; t++) this.define(arguments[t])
                                    }

                                    return (0, d.default)(e, [{
                                        key: "define", value: function (e, t) {
                                            for (var i in e) {
                                                for (var n = e[i], o = 0; o < n.length; o++) {
                                                    var a = n[o];
                                                    if (!t && a in this._types) throw new Error('Attempt to change mapping for "' + a + '" extension from "' + this._types[a] + '" to "' + i + '". Pass `force=true` to allow this, otherwise remove "' + a + '" from the list of extensions for "' + i + '".');
                                                    this._types[a] = i
                                                }
                                                !t && this._extensions[i] || (this._extensions[i] = n[0])
                                            }
                                        }
                                    }, {
                                        key: "getType", value: function (e) {
                                            var t = (e = String(e)).replace(/^.*[/\\]/, "").toLowerCase(),
                                                i = t.replace(/^.*\./, "").toLowerCase(), n = t.length < e.length,
                                                o = i.length < t.length - 1;
                                            return (o || !n) && this._types[i] || null
                                        }
                                    }, {
                                        key: "getExtension", value: function (e) {
                                            return (e = /^\s*([^;\s]*)/.test(e) && RegExp.$1) && this._extensions[e.toLowerCase()] || null
                                        }
                                    }]), e
                                }();
                                t.exports = n
                            }, {}], 2: [function (e, t, i) {
                                var n = e("./Mime");
                                t.exports = new n(e("./types/standard"), e("./types/other"))
                            }, {"./Mime": 1, "./types/other": 3, "./types/standard": 4}], 3: [function (e, t, i) {
                                t.exports = {
                                    "application/prs.cww": ["cww"],
                                    "application/vnd.3gpp.pic-bw-large": ["plb"],
                                    "application/vnd.3gpp.pic-bw-small": ["psb"],
                                    "application/vnd.3gpp.pic-bw-var": ["pvb"],
                                    "application/vnd.3gpp2.tcap": ["tcap"],
                                    "application/vnd.3m.post-it-notes": ["pwn"],
                                    "application/vnd.accpac.simply.aso": ["aso"],
                                    "application/vnd.accpac.simply.imp": ["imp"],
                                    "application/vnd.acucobol": ["acu"],
                                    "application/vnd.acucorp": ["atc", "acutc"],
                                    "application/vnd.adobe.air-application-installer-package+zip": ["air"],
                                    "application/vnd.adobe.formscentral.fcdt": ["fcdt"],
                                    "application/vnd.adobe.fxp": ["fxp", "fxpl"],
                                    "application/vnd.adobe.xdp+xml": ["xdp"],
                                    "application/vnd.adobe.xfdf": ["xfdf"],
                                    "application/vnd.ahead.space": ["ahead"],
                                    "application/vnd.airzip.filesecure.azf": ["azf"],
                                    "application/vnd.airzip.filesecure.azs": ["azs"],
                                    "application/vnd.amazon.ebook": ["azw"],
                                    "application/vnd.americandynamics.acc": ["acc"],
                                    "application/vnd.amiga.ami": ["ami"],
                                    "application/vnd.android.package-archive": ["apk"],
                                    "application/vnd.anser-web-certificate-issue-initiation": ["cii"],
                                    "application/vnd.anser-web-funds-transfer-initiation": ["fti"],
                                    "application/vnd.apple.installer+xml": ["mpkg"],
                                    "application/vnd.apple.mpegurl": ["m3u8"],
                                    "application/vnd.apple.pkpass": ["pkpass"],
                                    "application/vnd.aristanetworks.swi": ["swi"],
                                    "application/vnd.astraea-software.iota": ["iota"],
                                    "application/vnd.audiograph": ["aep"],
                                    "application/vnd.blueice.multipass": ["mpm"],
                                    "application/vnd.bmi": ["bmi"],
                                    "application/vnd.businessobjects": ["rep"],
                                    "application/vnd.chemdraw+xml": ["cdxml"],
                                    "application/vnd.chipnuts.karaoke-mmd": ["mmd"],
                                    "application/vnd.cinderella": ["cdy"],
                                    "application/vnd.claymore": ["cla"],
                                    "application/vnd.cloanto.rp9": ["rp9"],
                                    "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"],
                                    "application/vnd.cluetrust.cartomobile-config": ["c11amc"],
                                    "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"],
                                    "application/vnd.commonspace": ["csp"],
                                    "application/vnd.contact.cmsg": ["cdbcmsg"],
                                    "application/vnd.cosmocaller": ["cmc"],
                                    "application/vnd.crick.clicker": ["clkx"],
                                    "application/vnd.crick.clicker.keyboard": ["clkk"],
                                    "application/vnd.crick.clicker.palette": ["clkp"],
                                    "application/vnd.crick.clicker.template": ["clkt"],
                                    "application/vnd.crick.clicker.wordbank": ["clkw"],
                                    "application/vnd.criticaltools.wbs+xml": ["wbs"],
                                    "application/vnd.ctc-posml": ["pml"],
                                    "application/vnd.cups-ppd": ["ppd"],
                                    "application/vnd.curl.car": ["car"],
                                    "application/vnd.curl.pcurl": ["pcurl"],
                                    "application/vnd.dart": ["dart"],
                                    "application/vnd.data-vision.rdz": ["rdz"],
                                    "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"],
                                    "application/vnd.dece.ttml+xml": ["uvt", "uvvt"],
                                    "application/vnd.dece.unspecified": ["uvx", "uvvx"],
                                    "application/vnd.dece.zip": ["uvz", "uvvz"],
                                    "application/vnd.denovo.fcselayout-link": ["fe_launch"],
                                    "application/vnd.dna": ["dna"],
                                    "application/vnd.dolby.mlp": ["mlp"],
                                    "application/vnd.dpgraph": ["dpg"],
                                    "application/vnd.dreamfactory": ["dfac"],
                                    "application/vnd.ds-keypoint": ["kpxx"],
                                    "application/vnd.dvb.ait": ["ait"],
                                    "application/vnd.dvb.service": ["svc"],
                                    "application/vnd.dynageo": ["geo"],
                                    "application/vnd.ecowin.chart": ["mag"],
                                    "application/vnd.enliven": ["nml"],
                                    "application/vnd.epson.esf": ["esf"],
                                    "application/vnd.epson.msf": ["msf"],
                                    "application/vnd.epson.quickanime": ["qam"],
                                    "application/vnd.epson.salt": ["slt"],
                                    "application/vnd.epson.ssf": ["ssf"],
                                    "application/vnd.eszigno3+xml": ["es3", "et3"],
                                    "application/vnd.ezpix-album": ["ez2"],
                                    "application/vnd.ezpix-package": ["ez3"],
                                    "application/vnd.fdf": ["fdf"],
                                    "application/vnd.fdsn.mseed": ["mseed"],
                                    "application/vnd.fdsn.seed": ["seed", "dataless"],
                                    "application/vnd.flographit": ["gph"],
                                    "application/vnd.fluxtime.clip": ["ftc"],
                                    "application/vnd.framemaker": ["fm", "frame", "maker", "book"],
                                    "application/vnd.frogans.fnc": ["fnc"],
                                    "application/vnd.frogans.ltf": ["ltf"],
                                    "application/vnd.fsc.weblaunch": ["fsc"],
                                    "application/vnd.fujitsu.oasys": ["oas"],
                                    "application/vnd.fujitsu.oasys2": ["oa2"],
                                    "application/vnd.fujitsu.oasys3": ["oa3"],
                                    "application/vnd.fujitsu.oasysgp": ["fg5"],
                                    "application/vnd.fujitsu.oasysprs": ["bh2"],
                                    "application/vnd.fujixerox.ddd": ["ddd"],
                                    "application/vnd.fujixerox.docuworks": ["xdw"],
                                    "application/vnd.fujixerox.docuworks.binder": ["xbd"],
                                    "application/vnd.fuzzysheet": ["fzs"],
                                    "application/vnd.genomatix.tuxedo": ["txd"],
                                    "application/vnd.geogebra.file": ["ggb"],
                                    "application/vnd.geogebra.tool": ["ggt"],
                                    "application/vnd.geometry-explorer": ["gex", "gre"],
                                    "application/vnd.geonext": ["gxt"],
                                    "application/vnd.geoplan": ["g2w"],
                                    "application/vnd.geospace": ["g3w"],
                                    "application/vnd.gmx": ["gmx"],
                                    "application/vnd.google-apps.document": ["gdoc"],
                                    "application/vnd.google-apps.presentation": ["gslides"],
                                    "application/vnd.google-apps.spreadsheet": ["gsheet"],
                                    "application/vnd.google-earth.kml+xml": ["kml"],
                                    "application/vnd.google-earth.kmz": ["kmz"],
                                    "application/vnd.grafeq": ["gqf", "gqs"],
                                    "application/vnd.groove-account": ["gac"],
                                    "application/vnd.groove-help": ["ghf"],
                                    "application/vnd.groove-identity-message": ["gim"],
                                    "application/vnd.groove-injector": ["grv"],
                                    "application/vnd.groove-tool-message": ["gtm"],
                                    "application/vnd.groove-tool-template": ["tpl"],
                                    "application/vnd.groove-vcard": ["vcg"],
                                    "application/vnd.hal+xml": ["hal"],
                                    "application/vnd.handheld-entertainment+xml": ["zmm"],
                                    "application/vnd.hbci": ["hbci"],
                                    "application/vnd.hhe.lesson-player": ["les"],
                                    "application/vnd.hp-hpgl": ["hpgl"],
                                    "application/vnd.hp-hpid": ["hpid"],
                                    "application/vnd.hp-hps": ["hps"],
                                    "application/vnd.hp-jlyt": ["jlt"],
                                    "application/vnd.hp-pcl": ["pcl"],
                                    "application/vnd.hp-pclxl": ["pclxl"],
                                    "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"],
                                    "application/vnd.ibm.minipay": ["mpy"],
                                    "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"],
                                    "application/vnd.ibm.rights-management": ["irm"],
                                    "application/vnd.ibm.secure-container": ["sc"],
                                    "application/vnd.iccprofile": ["icc", "icm"],
                                    "application/vnd.igloader": ["igl"],
                                    "application/vnd.immervision-ivp": ["ivp"],
                                    "application/vnd.immervision-ivu": ["ivu"],
                                    "application/vnd.insors.igm": ["igm"],
                                    "application/vnd.intercon.formnet": ["xpw", "xpx"],
                                    "application/vnd.intergeo": ["i2g"],
                                    "application/vnd.intu.qbo": ["qbo"],
                                    "application/vnd.intu.qfx": ["qfx"],
                                    "application/vnd.ipunplugged.rcprofile": ["rcprofile"],
                                    "application/vnd.irepository.package+xml": ["irp"],
                                    "application/vnd.is-xpr": ["xpr"],
                                    "application/vnd.isac.fcs": ["fcs"],
                                    "application/vnd.jam": ["jam"],
                                    "application/vnd.jcp.javame.midlet-rms": ["rms"],
                                    "application/vnd.jisp": ["jisp"],
                                    "application/vnd.joost.joda-archive": ["joda"],
                                    "application/vnd.kahootz": ["ktz", "ktr"],
                                    "application/vnd.kde.karbon": ["karbon"],
                                    "application/vnd.kde.kchart": ["chrt"],
                                    "application/vnd.kde.kformula": ["kfo"],
                                    "application/vnd.kde.kivio": ["flw"],
                                    "application/vnd.kde.kontour": ["kon"],
                                    "application/vnd.kde.kpresenter": ["kpr", "kpt"],
                                    "application/vnd.kde.kspread": ["ksp"],
                                    "application/vnd.kde.kword": ["kwd", "kwt"],
                                    "application/vnd.kenameaapp": ["htke"],
                                    "application/vnd.kidspiration": ["kia"],
                                    "application/vnd.kinar": ["kne", "knp"],
                                    "application/vnd.koan": ["skp", "skd", "skt", "skm"],
                                    "application/vnd.kodak-descriptor": ["sse"],
                                    "application/vnd.las.las+xml": ["lasxml"],
                                    "application/vnd.llamagraphics.life-balance.desktop": ["lbd"],
                                    "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"],
                                    "application/vnd.lotus-1-2-3": ["123"],
                                    "application/vnd.lotus-approach": ["apr"],
                                    "application/vnd.lotus-freelance": ["pre"],
                                    "application/vnd.lotus-notes": ["nsf"],
                                    "application/vnd.lotus-organizer": ["org"],
                                    "application/vnd.lotus-screencam": ["scm"],
                                    "application/vnd.lotus-wordpro": ["lwp"],
                                    "application/vnd.macports.portpkg": ["portpkg"],
                                    "application/vnd.mcd": ["mcd"],
                                    "application/vnd.medcalcdata": ["mc1"],
                                    "application/vnd.mediastation.cdkey": ["cdkey"],
                                    "application/vnd.mfer": ["mwf"],
                                    "application/vnd.mfmp": ["mfm"],
                                    "application/vnd.micrografx.flo": ["flo"],
                                    "application/vnd.micrografx.igx": ["igx"],
                                    "application/vnd.mif": ["mif"],
                                    "application/vnd.mobius.daf": ["daf"],
                                    "application/vnd.mobius.dis": ["dis"],
                                    "application/vnd.mobius.mbk": ["mbk"],
                                    "application/vnd.mobius.mqy": ["mqy"],
                                    "application/vnd.mobius.msl": ["msl"],
                                    "application/vnd.mobius.plc": ["plc"],
                                    "application/vnd.mobius.txf": ["txf"],
                                    "application/vnd.mophun.application": ["mpn"],
                                    "application/vnd.mophun.certificate": ["mpc"],
                                    "application/vnd.mozilla.xul+xml": ["xul"],
                                    "application/vnd.ms-artgalry": ["cil"],
                                    "application/vnd.ms-cab-compressed": ["cab"],
                                    "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"],
                                    "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"],
                                    "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"],
                                    "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"],
                                    "application/vnd.ms-excel.template.macroenabled.12": ["xltm"],
                                    "application/vnd.ms-fontobject": ["eot"],
                                    "application/vnd.ms-htmlhelp": ["chm"],
                                    "application/vnd.ms-ims": ["ims"],
                                    "application/vnd.ms-lrm": ["lrm"],
                                    "application/vnd.ms-officetheme": ["thmx"],
                                    "application/vnd.ms-outlook": ["msg"],
                                    "application/vnd.ms-pki.seccat": ["cat"],
                                    "application/vnd.ms-pki.stl": ["stl"],
                                    "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"],
                                    "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"],
                                    "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"],
                                    "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"],
                                    "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"],
                                    "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"],
                                    "application/vnd.ms-project": ["mpp", "mpt"],
                                    "application/vnd.ms-word.document.macroenabled.12": ["docm"],
                                    "application/vnd.ms-word.template.macroenabled.12": ["dotm"],
                                    "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"],
                                    "application/vnd.ms-wpl": ["wpl"],
                                    "application/vnd.ms-xpsdocument": ["xps"],
                                    "application/vnd.mseq": ["mseq"],
                                    "application/vnd.musician": ["mus"],
                                    "application/vnd.muvee.style": ["msty"],
                                    "application/vnd.mynfc": ["taglet"],
                                    "application/vnd.neurolanguage.nlu": ["nlu"],
                                    "application/vnd.nitf": ["ntf", "nitf"],
                                    "application/vnd.noblenet-directory": ["nnd"],
                                    "application/vnd.noblenet-sealer": ["nns"],
                                    "application/vnd.noblenet-web": ["nnw"],
                                    "application/vnd.nokia.n-gage.data": ["ngdat"],
                                    "application/vnd.nokia.n-gage.symbian.install": ["n-gage"],
                                    "application/vnd.nokia.radio-preset": ["rpst"],
                                    "application/vnd.nokia.radio-presets": ["rpss"],
                                    "application/vnd.novadigm.edm": ["edm"],
                                    "application/vnd.novadigm.edx": ["edx"],
                                    "application/vnd.novadigm.ext": ["ext"],
                                    "application/vnd.oasis.opendocument.chart": ["odc"],
                                    "application/vnd.oasis.opendocument.chart-template": ["otc"],
                                    "application/vnd.oasis.opendocument.database": ["odb"],
                                    "application/vnd.oasis.opendocument.formula": ["odf"],
                                    "application/vnd.oasis.opendocument.formula-template": ["odft"],
                                    "application/vnd.oasis.opendocument.graphics": ["odg"],
                                    "application/vnd.oasis.opendocument.graphics-template": ["otg"],
                                    "application/vnd.oasis.opendocument.image": ["odi"],
                                    "application/vnd.oasis.opendocument.image-template": ["oti"],
                                    "application/vnd.oasis.opendocument.presentation": ["odp"],
                                    "application/vnd.oasis.opendocument.presentation-template": ["otp"],
                                    "application/vnd.oasis.opendocument.spreadsheet": ["ods"],
                                    "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"],
                                    "application/vnd.oasis.opendocument.text": ["odt"],
                                    "application/vnd.oasis.opendocument.text-master": ["odm"],
                                    "application/vnd.oasis.opendocument.text-template": ["ott"],
                                    "application/vnd.oasis.opendocument.text-web": ["oth"],
                                    "application/vnd.olpc-sugar": ["xo"],
                                    "application/vnd.oma.dd2+xml": ["dd2"],
                                    "application/vnd.openofficeorg.extension": ["oxt"],
                                    "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"],
                                    "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"],
                                    "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"],
                                    "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"],
                                    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"],
                                    "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"],
                                    "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"],
                                    "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"],
                                    "application/vnd.osgeo.mapguide.package": ["mgp"],
                                    "application/vnd.osgi.dp": ["dp"],
                                    "application/vnd.osgi.subsystem": ["esa"],
                                    "application/vnd.palm": ["pdb", "pqa", "oprc"],
                                    "application/vnd.pawaafile": ["paw"],
                                    "application/vnd.pg.format": ["str"],
                                    "application/vnd.pg.osasli": ["ei6"],
                                    "application/vnd.picsel": ["efif"],
                                    "application/vnd.pmi.widget": ["wg"],
                                    "application/vnd.pocketlearn": ["plf"],
                                    "application/vnd.powerbuilder6": ["pbd"],
                                    "application/vnd.previewsystems.box": ["box"],
                                    "application/vnd.proteus.magazine": ["mgz"],
                                    "application/vnd.publishare-delta-tree": ["qps"],
                                    "application/vnd.pvi.ptid1": ["ptid"],
                                    "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"],
                                    "application/vnd.realvnc.bed": ["bed"],
                                    "application/vnd.recordare.musicxml": ["mxl"],
                                    "application/vnd.recordare.musicxml+xml": ["musicxml"],
                                    "application/vnd.rig.cryptonote": ["cryptonote"],
                                    "application/vnd.rim.cod": ["cod"],
                                    "application/vnd.rn-realmedia": ["rm"],
                                    "application/vnd.rn-realmedia-vbr": ["rmvb"],
                                    "application/vnd.route66.link66+xml": ["link66"],
                                    "application/vnd.sailingtracker.track": ["st"],
                                    "application/vnd.seemail": ["see"],
                                    "application/vnd.sema": ["sema"],
                                    "application/vnd.semd": ["semd"],
                                    "application/vnd.semf": ["semf"],
                                    "application/vnd.shana.informed.formdata": ["ifm"],
                                    "application/vnd.shana.informed.formtemplate": ["itp"],
                                    "application/vnd.shana.informed.interchange": ["iif"],
                                    "application/vnd.shana.informed.package": ["ipk"],
                                    "application/vnd.simtech-mindmapper": ["twd", "twds"],
                                    "application/vnd.smaf": ["mmf"],
                                    "application/vnd.smart.teacher": ["teacher"],
                                    "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"],
                                    "application/vnd.spotfire.dxp": ["dxp"],
                                    "application/vnd.spotfire.sfs": ["sfs"],
                                    "application/vnd.stardivision.calc": ["sdc"],
                                    "application/vnd.stardivision.draw": ["sda"],
                                    "application/vnd.stardivision.impress": ["sdd"],
                                    "application/vnd.stardivision.math": ["smf"],
                                    "application/vnd.stardivision.writer": ["sdw", "vor"],
                                    "application/vnd.stardivision.writer-global": ["sgl"],
                                    "application/vnd.stepmania.package": ["smzip"],
                                    "application/vnd.stepmania.stepchart": ["sm"],
                                    "application/vnd.sun.wadl+xml": ["wadl"],
                                    "application/vnd.sun.xml.calc": ["sxc"],
                                    "application/vnd.sun.xml.calc.template": ["stc"],
                                    "application/vnd.sun.xml.draw": ["sxd"],
                                    "application/vnd.sun.xml.draw.template": ["std"],
                                    "application/vnd.sun.xml.impress": ["sxi"],
                                    "application/vnd.sun.xml.impress.template": ["sti"],
                                    "application/vnd.sun.xml.math": ["sxm"],
                                    "application/vnd.sun.xml.writer": ["sxw"],
                                    "application/vnd.sun.xml.writer.global": ["sxg"],
                                    "application/vnd.sun.xml.writer.template": ["stw"],
                                    "application/vnd.sus-calendar": ["sus", "susp"],
                                    "application/vnd.svd": ["svd"],
                                    "application/vnd.symbian.install": ["sis", "sisx"],
                                    "application/vnd.syncml+xml": ["xsm"],
                                    "application/vnd.syncml.dm+wbxml": ["bdm"],
                                    "application/vnd.syncml.dm+xml": ["xdm"],
                                    "application/vnd.tao.intent-module-archive": ["tao"],
                                    "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"],
                                    "application/vnd.tmobile-livetv": ["tmo"],
                                    "application/vnd.trid.tpt": ["tpt"],
                                    "application/vnd.triscape.mxs": ["mxs"],
                                    "application/vnd.trueapp": ["tra"],
                                    "application/vnd.ufdl": ["ufd", "ufdl"],
                                    "application/vnd.uiq.theme": ["utz"],
                                    "application/vnd.umajin": ["umj"],
                                    "application/vnd.unity": ["unityweb"],
                                    "application/vnd.uoml+xml": ["uoml"],
                                    "application/vnd.vcx": ["vcx"],
                                    "application/vnd.visio": ["vsd", "vst", "vss", "vsw"],
                                    "application/vnd.visionary": ["vis"],
                                    "application/vnd.vsf": ["vsf"],
                                    "application/vnd.wap.wbxml": ["wbxml"],
                                    "application/vnd.wap.wmlc": ["wmlc"],
                                    "application/vnd.wap.wmlscriptc": ["wmlsc"],
                                    "application/vnd.webturbo": ["wtb"],
                                    "application/vnd.wolfram.player": ["nbp"],
                                    "application/vnd.wordperfect": ["wpd"],
                                    "application/vnd.wqd": ["wqd"],
                                    "application/vnd.wt.stf": ["stf"],
                                    "application/vnd.xara": ["xar"],
                                    "application/vnd.xfdl": ["xfdl"],
                                    "application/vnd.yamaha.hv-dic": ["hvd"],
                                    "application/vnd.yamaha.hv-script": ["hvs"],
                                    "application/vnd.yamaha.hv-voice": ["hvp"],
                                    "application/vnd.yamaha.openscoreformat": ["osf"],
                                    "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"],
                                    "application/vnd.yamaha.smaf-audio": ["saf"],
                                    "application/vnd.yamaha.smaf-phrase": ["spf"],
                                    "application/vnd.yellowriver-custom-menu": ["cmp"],
                                    "application/vnd.zul": ["zir", "zirz"],
                                    "application/vnd.zzazz.deck+xml": ["zaz"],
                                    "application/x-7z-compressed": ["7z"],
                                    "application/x-abiword": ["abw"],
                                    "application/x-ace-compressed": ["ace"],
                                    "application/x-apple-diskimage": [],
                                    "application/x-arj": ["arj"],
                                    "application/x-authorware-bin": ["aab", "x32", "u32", "vox"],
                                    "application/x-authorware-map": ["aam"],
                                    "application/x-authorware-seg": ["aas"],
                                    "application/x-bcpio": ["bcpio"],
                                    "application/x-bdoc": [],
                                    "application/x-bittorrent": ["torrent"],
                                    "application/x-blorb": ["blb", "blorb"],
                                    "application/x-bzip": ["bz"],
                                    "application/x-bzip2": ["bz2", "boz"],
                                    "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"],
                                    "application/x-cdlink": ["vcd"],
                                    "application/x-cfs-compressed": ["cfs"],
                                    "application/x-chat": ["chat"],
                                    "application/x-chess-pgn": ["pgn"],
                                    "application/x-chrome-extension": ["crx"],
                                    "application/x-cocoa": ["cco"],
                                    "application/x-conference": ["nsc"],
                                    "application/x-cpio": ["cpio"],
                                    "application/x-csh": ["csh"],
                                    "application/x-debian-package": ["udeb"],
                                    "application/x-dgc-compressed": ["dgc"],
                                    "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"],
                                    "application/x-doom": ["wad"],
                                    "application/x-dtbncx+xml": ["ncx"],
                                    "application/x-dtbook+xml": ["dtb"],
                                    "application/x-dtbresource+xml": ["res"],
                                    "application/x-dvi": ["dvi"],
                                    "application/x-envoy": ["evy"],
                                    "application/x-eva": ["eva"],
                                    "application/x-font-bdf": ["bdf"],
                                    "application/x-font-ghostscript": ["gsf"],
                                    "application/x-font-linux-psf": ["psf"],
                                    "application/x-font-otf": [],
                                    "application/x-font-pcf": ["pcf"],
                                    "application/x-font-snf": ["snf"],
                                    "application/x-font-ttf": ["ttf", "ttc"],
                                    "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"],
                                    "application/x-freearc": ["arc"],
                                    "application/x-futuresplash": ["spl"],
                                    "application/x-gca-compressed": ["gca"],
                                    "application/x-glulx": ["ulx"],
                                    "application/x-gnumeric": ["gnumeric"],
                                    "application/x-gramps-xml": ["gramps"],
                                    "application/x-gtar": ["gtar"],
                                    "application/x-hdf": ["hdf"],
                                    "application/x-httpd-php": ["php"],
                                    "application/x-install-instructions": ["install"],
                                    "application/x-iso9660-image": [],
                                    "application/x-java-archive-diff": ["jardiff"],
                                    "application/x-java-jnlp-file": ["jnlp"],
                                    "application/x-latex": ["latex"],
                                    "application/x-lua-bytecode": ["luac"],
                                    "application/x-lzh-compressed": ["lzh", "lha"],
                                    "application/x-makeself": ["run"],
                                    "application/x-mie": ["mie"],
                                    "application/x-mobipocket-ebook": ["prc", "mobi"],
                                    "application/x-ms-application": ["application"],
                                    "application/x-ms-shortcut": ["lnk"],
                                    "application/x-ms-wmd": ["wmd"],
                                    "application/x-ms-wmz": ["wmz"],
                                    "application/x-ms-xbap": ["xbap"],
                                    "application/x-msaccess": ["mdb"],
                                    "application/x-msbinder": ["obd"],
                                    "application/x-mscardfile": ["crd"],
                                    "application/x-msclip": ["clp"],
                                    "application/x-msdos-program": [],
                                    "application/x-msdownload": ["com", "bat"],
                                    "application/x-msmediaview": ["mvb", "m13", "m14"],
                                    "application/x-msmetafile": ["wmf", "emf", "emz"],
                                    "application/x-msmoney": ["mny"],
                                    "application/x-mspublisher": ["pub"],
                                    "application/x-msschedule": ["scd"],
                                    "application/x-msterminal": ["trm"],
                                    "application/x-mswrite": ["wri"],
                                    "application/x-netcdf": ["nc", "cdf"],
                                    "application/x-ns-proxy-autoconfig": ["pac"],
                                    "application/x-nzb": ["nzb"],
                                    "application/x-perl": ["pl", "pm"],
                                    "application/x-pilot": [],
                                    "application/x-pkcs12": ["p12", "pfx"],
                                    "application/x-pkcs7-certificates": ["p7b", "spc"],
                                    "application/x-pkcs7-certreqresp": ["p7r"],
                                    "application/x-rar-compressed": ["rar"],
                                    "application/x-redhat-package-manager": ["rpm"],
                                    "application/x-research-info-systems": ["ris"],
                                    "application/x-sea": ["sea"],
                                    "application/x-sh": ["sh"],
                                    "application/x-shar": ["shar"],
                                    "application/x-shockwave-flash": ["swf"],
                                    "application/x-silverlight-app": ["xap"],
                                    "application/x-sql": ["sql"],
                                    "application/x-stuffit": ["sit"],
                                    "application/x-stuffitx": ["sitx"],
                                    "application/x-subrip": ["srt"],
                                    "application/x-sv4cpio": ["sv4cpio"],
                                    "application/x-sv4crc": ["sv4crc"],
                                    "application/x-t3vm-image": ["t3"],
                                    "application/x-tads": ["gam"],
                                    "application/x-tar": ["tar"],
                                    "application/x-tcl": ["tcl", "tk"],
                                    "application/x-tex": ["tex"],
                                    "application/x-tex-tfm": ["tfm"],
                                    "application/x-texinfo": ["texinfo", "texi"],
                                    "application/x-tgif": ["obj"],
                                    "application/x-ustar": ["ustar"],
                                    "application/x-virtualbox-hdd": ["hdd"],
                                    "application/x-virtualbox-ova": ["ova"],
                                    "application/x-virtualbox-ovf": ["ovf"],
                                    "application/x-virtualbox-vbox": ["vbox"],
                                    "application/x-virtualbox-vbox-extpack": ["vbox-extpack"],
                                    "application/x-virtualbox-vdi": ["vdi"],
                                    "application/x-virtualbox-vhd": ["vhd"],
                                    "application/x-virtualbox-vmdk": ["vmdk"],
                                    "application/x-wais-source": ["src"],
                                    "application/x-web-app-manifest+json": ["webapp"],
                                    "application/x-x509-ca-cert": ["der", "crt", "pem"],
                                    "application/x-xfig": ["fig"],
                                    "application/x-xliff+xml": ["xlf"],
                                    "application/x-xpinstall": ["xpi"],
                                    "application/x-xz": ["xz"],
                                    "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"],
                                    "audio/vnd.dece.audio": ["uva", "uvva"],
                                    "audio/vnd.digital-winds": ["eol"],
                                    "audio/vnd.dra": ["dra"],
                                    "audio/vnd.dts": ["dts"],
                                    "audio/vnd.dts.hd": ["dtshd"],
                                    "audio/vnd.lucent.voice": ["lvp"],
                                    "audio/vnd.ms-playready.media.pya": ["pya"],
                                    "audio/vnd.nuera.ecelp4800": ["ecelp4800"],
                                    "audio/vnd.nuera.ecelp7470": ["ecelp7470"],
                                    "audio/vnd.nuera.ecelp9600": ["ecelp9600"],
                                    "audio/vnd.rip": ["rip"],
                                    "audio/x-aac": ["aac"],
                                    "audio/x-aiff": ["aif", "aiff", "aifc"],
                                    "audio/x-caf": ["caf"],
                                    "audio/x-flac": ["flac"],
                                    "audio/x-m4a": [],
                                    "audio/x-matroska": ["mka"],
                                    "audio/x-mpegurl": ["m3u"],
                                    "audio/x-ms-wax": ["wax"],
                                    "audio/x-ms-wma": ["wma"],
                                    "audio/x-pn-realaudio": ["ram", "ra"],
                                    "audio/x-pn-realaudio-plugin": ["rmp"],
                                    "audio/x-realaudio": [],
                                    "audio/x-wav": [],
                                    "chemical/x-cdx": ["cdx"],
                                    "chemical/x-cif": ["cif"],
                                    "chemical/x-cmdf": ["cmdf"],
                                    "chemical/x-cml": ["cml"],
                                    "chemical/x-csml": ["csml"],
                                    "chemical/x-xyz": ["xyz"],
                                    "image/prs.btif": ["btif"],
                                    "image/vnd.adobe.photoshop": ["psd"],
                                    "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"],
                                    "image/vnd.djvu": ["djvu", "djv"],
                                    "image/vnd.dvb.subtitle": [],
                                    "image/vnd.dwg": ["dwg"],
                                    "image/vnd.dxf": ["dxf"],
                                    "image/vnd.fastbidsheet": ["fbs"],
                                    "image/vnd.fpx": ["fpx"],
                                    "image/vnd.fst": ["fst"],
                                    "image/vnd.fujixerox.edmics-mmr": ["mmr"],
                                    "image/vnd.fujixerox.edmics-rlc": ["rlc"],
                                    "image/vnd.ms-modi": ["mdi"],
                                    "image/vnd.ms-photo": ["wdp"],
                                    "image/vnd.net-fpx": ["npx"],
                                    "image/vnd.wap.wbmp": ["wbmp"],
                                    "image/vnd.xiff": ["xif"],
                                    "image/x-3ds": ["3ds"],
                                    "image/x-cmu-raster": ["ras"],
                                    "image/x-cmx": ["cmx"],
                                    "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"],
                                    "image/x-icon": ["ico"],
                                    "image/x-jng": ["jng"],
                                    "image/x-mrsid-image": ["sid"],
                                    "image/x-ms-bmp": [],
                                    "image/x-pcx": ["pcx"],
                                    "image/x-pict": ["pic", "pct"],
                                    "image/x-portable-anymap": ["pnm"],
                                    "image/x-portable-bitmap": ["pbm"],
                                    "image/x-portable-graymap": ["pgm"],
                                    "image/x-portable-pixmap": ["ppm"],
                                    "image/x-rgb": ["rgb"],
                                    "image/x-tga": ["tga"],
                                    "image/x-xbitmap": ["xbm"],
                                    "image/x-xpixmap": ["xpm"],
                                    "image/x-xwindowdump": ["xwd"],
                                    "model/vnd.collada+xml": ["dae"],
                                    "model/vnd.dwf": ["dwf"],
                                    "model/vnd.gdl": ["gdl"],
                                    "model/vnd.gtw": ["gtw"],
                                    "model/vnd.mts": ["mts"],
                                    "model/vnd.vtu": ["vtu"],
                                    "text/prs.lines.tag": ["dsc"],
                                    "text/vnd.curl": ["curl"],
                                    "text/vnd.curl.dcurl": ["dcurl"],
                                    "text/vnd.curl.mcurl": ["mcurl"],
                                    "text/vnd.curl.scurl": ["scurl"],
                                    "text/vnd.dvb.subtitle": ["sub"],
                                    "text/vnd.fly": ["fly"],
                                    "text/vnd.fmi.flexstor": ["flx"],
                                    "text/vnd.graphviz": ["gv"],
                                    "text/vnd.in3d.3dml": ["3dml"],
                                    "text/vnd.in3d.spot": ["spot"],
                                    "text/vnd.sun.j2me.app-descriptor": ["jad"],
                                    "text/vnd.wap.wml": ["wml"],
                                    "text/vnd.wap.wmlscript": ["wmls"],
                                    "text/x-asm": ["s", "asm"],
                                    "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"],
                                    "text/x-component": ["htc"],
                                    "text/x-fortran": ["f", "for", "f77", "f90"],
                                    "text/x-handlebars-template": ["hbs"],
                                    "text/x-java-source": ["java"],
                                    "text/x-lua": ["lua"],
                                    "text/x-markdown": ["mkd"],
                                    "text/x-nfo": ["nfo"],
                                    "text/x-opml": ["opml"],
                                    "text/x-org": [],
                                    "text/x-pascal": ["p", "pas"],
                                    "text/x-processing": ["pde"],
                                    "text/x-sass": ["sass"],
                                    "text/x-scss": ["scss"],
                                    "text/x-setext": ["etx"],
                                    "text/x-sfv": ["sfv"],
                                    "text/x-suse-ymp": ["ymp"],
                                    "text/x-uuencode": ["uu"],
                                    "text/x-vcalendar": ["vcs"],
                                    "text/x-vcard": ["vcf"],
                                    "video/vnd.dece.hd": ["uvh", "uvvh"],
                                    "video/vnd.dece.mobile": ["uvm", "uvvm"],
                                    "video/vnd.dece.pd": ["uvp", "uvvp"],
                                    "video/vnd.dece.sd": ["uvs", "uvvs"],
                                    "video/vnd.dece.video": ["uvv", "uvvv"],
                                    "video/vnd.dvb.file": ["dvb"],
                                    "video/vnd.fvt": ["fvt"],
                                    "video/vnd.mpegurl": ["mxu", "m4u"],
                                    "video/vnd.ms-playready.media.pyv": ["pyv"],
                                    "video/vnd.uvvu.mp4": ["uvu", "uvvu"],
                                    "video/vnd.vivo": ["viv"],
                                    "video/x-f4v": ["f4v"],
                                    "video/x-fli": ["fli"],
                                    "video/x-flv": ["flv"],
                                    "video/x-m4v": ["m4v"],
                                    "video/x-matroska": ["mkv", "mk3d", "mks"],
                                    "video/x-mng": ["mng"],
                                    "video/x-ms-asf": ["asf", "asx"],
                                    "video/x-ms-vob": ["vob"],
                                    "video/x-ms-wm": ["wm"],
                                    "video/x-ms-wmv": ["wmv"],
                                    "video/x-ms-wmx": ["wmx"],
                                    "video/x-ms-wvx": ["wvx"],
                                    "video/x-msvideo": ["avi"],
                                    "video/x-sgi-movie": ["movie"],
                                    "video/x-smv": ["smv"],
                                    "x-conference/x-cooltalk": ["ice"]
                                }
                            }, {}], 4: [function (e, t, i) {
                                t.exports = {
                                    "application/andrew-inset": ["ez"],
                                    "application/applixware": ["aw"],
                                    "application/atom+xml": ["atom"],
                                    "application/atomcat+xml": ["atomcat"],
                                    "application/atomsvc+xml": ["atomsvc"],
                                    "application/bdoc": ["bdoc"],
                                    "application/ccxml+xml": ["ccxml"],
                                    "application/cdmi-capability": ["cdmia"],
                                    "application/cdmi-container": ["cdmic"],
                                    "application/cdmi-domain": ["cdmid"],
                                    "application/cdmi-object": ["cdmio"],
                                    "application/cdmi-queue": ["cdmiq"],
                                    "application/cu-seeme": ["cu"],
                                    "application/dash+xml": ["mpd"],
                                    "application/davmount+xml": ["davmount"],
                                    "application/docbook+xml": ["dbk"],
                                    "application/dssc+der": ["dssc"],
                                    "application/dssc+xml": ["xdssc"],
                                    "application/ecmascript": ["ecma"],
                                    "application/emma+xml": ["emma"],
                                    "application/epub+zip": ["epub"],
                                    "application/exi": ["exi"],
                                    "application/font-tdpfr": ["pfr"],
                                    "application/font-woff": ["woff"],
                                    "application/font-woff2": ["woff2"],
                                    "application/geo+json": ["geojson"],
                                    "application/gml+xml": ["gml"],
                                    "application/gpx+xml": ["gpx"],
                                    "application/gxf": ["gxf"],
                                    "application/gzip": ["gz"],
                                    "application/hyperstudio": ["stk"],
                                    "application/inkml+xml": ["ink", "inkml"],
                                    "application/ipfix": ["ipfix"],
                                    "application/java-archive": ["jar", "war", "ear"],
                                    "application/java-serialized-object": ["ser"],
                                    "application/java-vm": ["class"],
                                    "application/javascript": ["js", "mjs"],
                                    "application/json": ["json", "map"],
                                    "application/json5": ["json5"],
                                    "application/jsonml+json": ["jsonml"],
                                    "application/ld+json": ["jsonld"],
                                    "application/lost+xml": ["lostxml"],
                                    "application/mac-binhex40": ["hqx"],
                                    "application/mac-compactpro": ["cpt"],
                                    "application/mads+xml": ["mads"],
                                    "application/manifest+json": ["webmanifest"],
                                    "application/marc": ["mrc"],
                                    "application/marcxml+xml": ["mrcx"],
                                    "application/mathematica": ["ma", "nb", "mb"],
                                    "application/mathml+xml": ["mathml"],
                                    "application/mbox": ["mbox"],
                                    "application/mediaservercontrol+xml": ["mscml"],
                                    "application/metalink+xml": ["metalink"],
                                    "application/metalink4+xml": ["meta4"],
                                    "application/mets+xml": ["mets"],
                                    "application/mods+xml": ["mods"],
                                    "application/mp21": ["m21", "mp21"],
                                    "application/mp4": ["mp4s", "m4p"],
                                    "application/msword": ["doc", "dot"],
                                    "application/mxf": ["mxf"],
                                    "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"],
                                    "application/oda": ["oda"],
                                    "application/oebps-package+xml": ["opf"],
                                    "application/ogg": ["ogx"],
                                    "application/omdoc+xml": ["omdoc"],
                                    "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"],
                                    "application/oxps": ["oxps"],
                                    "application/patch-ops-error+xml": ["xer"],
                                    "application/pdf": ["pdf"],
                                    "application/pgp-encrypted": ["pgp"],
                                    "application/pgp-signature": ["asc", "sig"],
                                    "application/pics-rules": ["prf"],
                                    "application/pkcs10": ["p10"],
                                    "application/pkcs7-mime": ["p7m", "p7c"],
                                    "application/pkcs7-signature": ["p7s"],
                                    "application/pkcs8": ["p8"],
                                    "application/pkix-attr-cert": ["ac"],
                                    "application/pkix-cert": ["cer"],
                                    "application/pkix-crl": ["crl"],
                                    "application/pkix-pkipath": ["pkipath"],
                                    "application/pkixcmp": ["pki"],
                                    "application/pls+xml": ["pls"],
                                    "application/postscript": ["ai", "eps", "ps"],
                                    "application/pskc+xml": ["pskcxml"],
                                    "application/rdf+xml": ["rdf"],
                                    "application/reginfo+xml": ["rif"],
                                    "application/relax-ng-compact-syntax": ["rnc"],
                                    "application/resource-lists+xml": ["rl"],
                                    "application/resource-lists-diff+xml": ["rld"],
                                    "application/rls-services+xml": ["rs"],
                                    "application/rpki-ghostbusters": ["gbr"],
                                    "application/rpki-manifest": ["mft"],
                                    "application/rpki-roa": ["roa"],
                                    "application/rsd+xml": ["rsd"],
                                    "application/rss+xml": ["rss"],
                                    "application/rtf": ["rtf"],
                                    "application/sbml+xml": ["sbml"],
                                    "application/scvp-cv-request": ["scq"],
                                    "application/scvp-cv-response": ["scs"],
                                    "application/scvp-vp-request": ["spq"],
                                    "application/scvp-vp-response": ["spp"],
                                    "application/sdp": ["sdp"],
                                    "application/set-payment-initiation": ["setpay"],
                                    "application/set-registration-initiation": ["setreg"],
                                    "application/shf+xml": ["shf"],
                                    "application/smil+xml": ["smi", "smil"],
                                    "application/sparql-query": ["rq"],
                                    "application/sparql-results+xml": ["srx"],
                                    "application/srgs": ["gram"],
                                    "application/srgs+xml": ["grxml"],
                                    "application/sru+xml": ["sru"],
                                    "application/ssdl+xml": ["ssdl"],
                                    "application/ssml+xml": ["ssml"],
                                    "application/tei+xml": ["tei", "teicorpus"],
                                    "application/thraud+xml": ["tfi"],
                                    "application/timestamped-data": ["tsd"],
                                    "application/voicexml+xml": ["vxml"],
                                    "application/widget": ["wgt"],
                                    "application/winhlp": ["hlp"],
                                    "application/wsdl+xml": ["wsdl"],
                                    "application/wspolicy+xml": ["wspolicy"],
                                    "application/xaml+xml": ["xaml"],
                                    "application/xcap-diff+xml": ["xdf"],
                                    "application/xenc+xml": ["xenc"],
                                    "application/xhtml+xml": ["xhtml", "xht"],
                                    "application/xml": ["xml", "xsl", "xsd", "rng"],
                                    "application/xml-dtd": ["dtd"],
                                    "application/xop+xml": ["xop"],
                                    "application/xproc+xml": ["xpl"],
                                    "application/xslt+xml": ["xslt"],
                                    "application/xspf+xml": ["xspf"],
                                    "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"],
                                    "application/yang": ["yang"],
                                    "application/yin+xml": ["yin"],
                                    "application/zip": ["zip"],
                                    "audio/3gpp": [],
                                    "audio/adpcm": ["adp"],
                                    "audio/basic": ["au", "snd"],
                                    "audio/midi": ["mid", "midi", "kar", "rmi"],
                                    "audio/mp3": [],
                                    "audio/mp4": ["m4a", "mp4a"],
                                    "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"],
                                    "audio/ogg": ["oga", "ogg", "spx"],
                                    "audio/s3m": ["s3m"],
                                    "audio/silk": ["sil"],
                                    "audio/wav": ["wav"],
                                    "audio/wave": [],
                                    "audio/webm": ["weba"],
                                    "audio/xm": ["xm"],
                                    "font/otf": ["otf"],
                                    "image/apng": ["apng"],
                                    "image/bmp": ["bmp"],
                                    "image/cgm": ["cgm"],
                                    "image/g3fax": ["g3"],
                                    "image/gif": ["gif"],
                                    "image/ief": ["ief"],
                                    "image/jpeg": ["jpeg", "jpg", "jpe"],
                                    "image/ktx": ["ktx"],
                                    "image/png": ["png"],
                                    "image/sgi": ["sgi"],
                                    "image/svg+xml": ["svg", "svgz"],
                                    "image/tiff": ["tiff", "tif"],
                                    "image/webp": ["webp"],
                                    "message/rfc822": ["eml", "mime"],
                                    "model/gltf+json": ["gltf"],
                                    "model/gltf-binary": ["glb"],
                                    "model/iges": ["igs", "iges"],
                                    "model/mesh": ["msh", "mesh", "silo"],
                                    "model/vrml": ["wrl", "vrml"],
                                    "model/x3d+binary": ["x3db", "x3dbz"],
                                    "model/x3d+vrml": ["x3dv", "x3dvz"],
                                    "model/x3d+xml": ["x3d", "x3dz"],
                                    "text/cache-manifest": ["appcache", "manifest"],
                                    "text/calendar": ["ics", "ifb"],
                                    "text/coffeescript": ["coffee", "litcoffee"],
                                    "text/css": ["css"],
                                    "text/csv": ["csv"],
                                    "text/hjson": ["hjson"],
                                    "text/html": ["html", "htm", "shtml"],
                                    "text/jade": ["jade"],
                                    "text/jsx": ["jsx"],
                                    "text/less": ["less"],
                                    "text/markdown": ["markdown", "md"],
                                    "text/mathml": ["mml"],
                                    "text/n3": ["n3"],
                                    "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"],
                                    "text/richtext": ["rtx"],
                                    "text/rtf": [],
                                    "text/sgml": ["sgml", "sgm"],
                                    "text/slim": ["slim", "slm"],
                                    "text/stylus": ["stylus", "styl"],
                                    "text/tab-separated-values": ["tsv"],
                                    "text/troff": ["t", "tr", "roff", "man", "me", "ms"],
                                    "text/turtle": ["ttl"],
                                    "text/uri-list": ["uri", "uris", "urls"],
                                    "text/vcard": ["vcard"],
                                    "text/vtt": ["vtt"],
                                    "text/xml": [],
                                    "text/yaml": ["yaml", "yml"],
                                    "video/3gpp": ["3gp", "3gpp"],
                                    "video/3gpp2": ["3g2"],
                                    "video/h261": ["h261"],
                                    "video/h263": ["h263"],
                                    "video/h264": ["h264"],
                                    "video/jpeg": ["jpgv"],
                                    "video/jpm": ["jpm", "jpgm"],
                                    "video/mj2": ["mj2", "mjp2"],
                                    "video/mp2t": ["ts"],
                                    "video/mp4": ["mp4", "mp4v", "mpg4"],
                                    "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"],
                                    "video/ogg": ["ogv"],
                                    "video/quicktime": ["qt", "mov"],
                                    "video/webm": ["webm"]
                                }
                            }, {}]
                        }, {}, [2])(2)
                    })
                }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
            }, {
                "babel-runtime/core-js/object/create": 50,
                "babel-runtime/helpers/classCallCheck": 62,
                "babel-runtime/helpers/createClass": 63,
                "babel-runtime/helpers/typeof": 64
            }],
            333: [function (e, t, i) {
                "use strict";
                i.encodeURIComponent = function (e) {
                    try {
                        return encodeURIComponent(e)
                    } catch (t) {
                        return e
                    }
                }, i.escape = e("escape-html"), i.timestamp = function (e) {
                    if (e) {
                        var t = e;
                        return "string" == typeof t && (t = Number(t)), 10 === String(e).length && (t *= 1e3), new Date(t)
                    }
                    return Math.round(Date.now() / 1e3)
                }
            }, {"escape-html": 215}],
            334: [function (e, t, i) {
                (function (t, n) {
                    "use strict";
                    var o = e("babel-runtime/core-js/json/stringify"), a = l(o), r = e("babel-runtime/helpers/typeof"),
                        s = l(r);

                    function l(e) {
                        return e && e.__esModule ? e : {default: e}
                    }

                    var d, u = e("util"), c = e("url"), h = e("http"), f = e("https"), p = e("debug")("urllib"),
                        g = e("humanize-ms"), m = 0, v = Math.pow(2, 31) - 10, y = /^https?:\/\//i;

                    function T(e, t) {
                        return void 0 === e ? t : e
                    }

                    i.TIMEOUTS = [g("300s"), g("300s")];
                    var w = ["json", "text"];
                    i.request = function (t, n, o) {
                        return 2 === arguments.length && "function" == typeof n && (o = n, n = null), "function" == typeof o ? i.requestWithCallback(t, n, o) : (d || (d = e("any-promise")), new d(function (e, o) {
                            i.requestWithCallback(t, n, function (e, t) {
                                return function (i, n, o) {
                                    if (i) return t(i);
                                    e({data: n, status: o.statusCode, headers: o.headers, res: o})
                                }
                            }(e, o))
                        }))
                    }, i.requestWithCallback = function (o, r, l) {
                        if (!o || "string" != typeof o && "object" !== (void 0 === o ? "undefined" : (0, s.default)(o))) {
                            var d = u.format("expect request url to be a string or a http request options, but got %j", o);
                            throw new Error(d)
                        }
                        2 === arguments.length && "function" == typeof r && (l = r, r = null), r = r || {}, m >= v && (m = 0);
                        var k = ++m;
                        r.requestUrls = r.requestUrls || [];
                        var C = {requestId: k, url: o, args: r, ctx: r.ctx};
                        r.emitter && r.emitter.emit("request", C), r.timeout = r.timeout || i.TIMEOUTS, r.maxRedirects = r.maxRedirects || 10, r.streaming = r.streaming || r.customResponse;
                        var b, I = Date.now();
                        "string" == typeof o ? (y.test(o) || (o = "http://" + o), b = c.parse(o)) : b = o;
                        var S = (r.type || r.method || b.method || "GET").toUpperCase(), _ = b.port || 80, D = h,
                            A = T(r.agent, i.agent), N = r.fixJSONCtlChars;
                        "https:" === b.protocol && (D = f, A = T(r.httpsAgent, i.httpsAgent), b.port || (_ = 443));
                        var x = {
                            host: b.hostname || b.host || "localhost",
                            path: b.path || "/",
                            method: S,
                            port: _,
                            agent: A,
                            headers: r.headers || {},
                            lookup: r.lookup
                        };
                        Array.isArray(r.timeout) ? x.requestTimeout = r.timeout[r.timeout.length - 1] : void 0 !== r.timeout && (x.requestTimeout = r.timeout);
                        for (var E = ["pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "secureProtocol", "secureOptions"], O = 0; O < E.length; O++) {
                            var P = E[O];
                            r.hasOwnProperty(P) && (x[P] = r[P])
                        }
                        !1 !== x.rejectUnauthorized || x.hasOwnProperty("secureOptions") || (x.secureOptions = e("constants").SSL_OP_NO_TLSv1_2);
                        var M = r.auth || b.auth;
                        M && (x.auth = M);
                        var F = r.content || r.data, L = "GET" === S || "HEAD" === S || r.dataAsQueryString;
                        if (!r.content && F && "string" != typeof F && !n.isBuffer(F)) if (L) F = r.nestedQuerystring ? qs.stringify(F) : querystring.stringify(F); else {
                            var R = x.headers["Content-Type"] || x.headers["content-type"];
                            R || (R = "json" === r.contentType ? "application/json" : "application/x-www-form-urlencoded", x.headers["Content-Type"] = R), F = "application/json" === parseContentType(R).type ? (0, a.default)(F) : r.nestedQuerystring ? qs.stringify(F) : querystring.stringify(F)
                        }
                        L && F && (x.path += (b.query ? "&" : "?") + F, F = null);
                        var B = 0;
                        if (F) {
                            var U = F.length;
                            n.isBuffer(F) || (U = n.byteLength(F)), B = x.headers["Content-Length"] = U
                        }
                        "json" === r.dataType && (x.headers.Accept = "application/json"), "function" == typeof r.beforeRequest && r.beforeRequest(x);
                        var V = null, K = null, G = null, W = !1, j = !1, H = 0, z = -1, X = !1, q = "", Y = "",
                            J = null;

                        function Z() {
                            V && (clearTimeout(V), V = null)
                        }

                        function Q() {
                            K && (clearTimeout(K), K = null)
                        }

                        function $(e, n, s) {
                            if (Q(), !l) return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!", Date(), k, t.pid, x.method, o), void (e && console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s: %s\nstack: %s", Date(), k, t.pid, e.name, e.message, e.stack));
                            var d = l;
                            l = null;
                            var u = {};
                            if (s && (z = s.statusCode, u = s.headers), 401 === z && u["www-authenticate"] && (!r.headers || !r.headers.Authorization) && r.digestAuth) {
                                var c = u["www-authenticate"];
                                if (c.indexOf("Digest ") >= 0) return p("Request#%d %s: got digest auth header WWW-Authenticate: %s", k, o, c), r.headers = r.headers || {}, r.headers.Authorization = digestAuthHeader(x.method, x.path, c, r.digestAuth), p("Request#%d %s: auth with digest header: %s", k, o, r.headers.Authorization), s.headers["set-cookie"] && (r.headers.Cookie = s.headers["set-cookie"].join(";")), i.requestWithCallback(o, r, d)
                            }
                            var h = Date.now() - I;
                            J && (J.contentDownload = h), p("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j", h, H, z, x.method, x.host, x.path, j, J);
                            var f = {
                                status: z,
                                statusCode: z,
                                headers: u,
                                size: H,
                                aborted: X,
                                rt: h,
                                keepAliveSocket: j,
                                data: n,
                                requestUrls: r.requestUrls,
                                timing: J,
                                remoteAddress: q,
                                remotePort: Y
                            };
                            if (e) {
                                var g = "";
                                A && "function" == typeof A.getCurrentStatus && (g = ", agent status: " + (0, a.default)(A.getCurrentStatus())), e.message += ", " + x.method + " " + o + " " + z + " (connected: " + W + ", keepalive socket: " + j + g + ")\nheaders: " + (0, a.default)(u), e.data = n, e.path = x.path, e.status = z, e.headers = u, e.res = f
                            }
                            d(e, n, r.streaming ? s : f), r.emitter && (C.url = o, C.socket = ne && ne.connection, C.options = x, C.size = B, r.emitter.emit("response", {
                                requestId: k,
                                error: e,
                                ctx: r.ctx,
                                req: C,
                                res: f
                            }))
                        }

                        function ee(e) {
                            var t = null;
                            if (r.followRedirect && statuses.redirect[e.statusCode]) {
                                r._followRedirectCount = (r._followRedirectCount || 0) + 1;
                                var n = e.headers.location;
                                if (n) {
                                    if (!(r._followRedirectCount > r.maxRedirects)) {
                                        var a = r.formatRedirectUrl ? r.formatRedirectUrl(o, n) : c.resolve(o, n);
                                        p("Request#%d %s: `redirected` from %s to %s", k, x.path, o, a), Q(), r.headers && r.headers.Host && y.test(n) && (r.headers.Host = null);
                                        var s = l;
                                        return l = null, i.requestWithCallback(a, r, s), {redirect: !0, error: null}
                                    }
                                    (t = new Error("Exceeded maxRedirects. Probably stuck in a redirect loop " + o)).name = "MaxRedirectError"
                                } else (t = new Error("Got statusCode " + e.statusCode + " but cannot resolve next location from headers")).name = "FollowRedirectError"
                            }
                            return {redirect: !1, error: t}
                        }

                        r.timing && (J = {
                            queuing: 0,
                            dnslookup: 0,
                            connected: 0,
                            requestSent: 0,
                            waiting: 0,
                            contentDownload: 0
                        }), x.headers["User-Agent"] || x.headers["user-agent"] || (x.headers["User-Agent"] = navigator.userAgent), r.gzip && (x.headers["Accept-Encoding"] || x.headers["accept-encoding"] || (x.headers["Accept-Encoding"] = "gzip"));
                        var te, ie, ne, oe = r.writeStream;

                        function ae() {
                            p("Response timer ticking, timeout: %d", ie), K = setTimeout(function () {
                                K = null;
                                var e = "Response timeout for " + ie + "ms";
                                (G = new Error(e)).name = "ResponseTimeoutError", G.requestId = k, p("ResponseTimeout: Request#%d %s %s: %s, connected: %s", k, o, G.name, e, W), re()
                            }, ie)
                        }

                        p("Request#%d %s %s with headers %j, options.path: %s", k, S, o, x.headers, x.path), r.requestUrls.push(o), Array.isArray(r.timeout) ? (te = g(r.timeout[0]), ie = g(r.timeout[1])) : te = ie = g(r.timeout), p("ConnectTimeout: %d, ResponseTimeout: %d", te, ie), x.mode = r.mode ? r.mode : "";
                        try {
                            ne = D.request(x, function (e) {
                                if (J && (J.waiting = Date.now() - I), p("Request#%d %s `req response` event emit: status %d, headers: %j", k, o, e.statusCode, e.headers), r.streaming) {
                                    var t = ee(e);
                                    return t.redirect ? void e.resume() : t.error ? (e.resume(), $(t.error, null, e)) : $(null, null, e)
                                }
                                if (e.on("close", function () {
                                    p("Request#%d %s: `res close` event emit, total size %d", k, o, H)
                                }), e.on("error", function () {
                                    p("Request#%d %s: `res error` event emit, total size %d", k, o, H)
                                }), e.on("aborted", function () {
                                    X = !0, p("Request#%d %s: `res aborted` event emit, total size %d", k, o, H)
                                }), oe) {
                                    var t = ee(e);
                                    return t.redirect ? void e.resume() : t.error ? (e.resume(), oe.end(), $(t.error, null, e)) : (!1 === r.consumeWriteStream ? e.on("end", $.bind(null, null, null, e)) : isNode010 || isNode012 ? first([[oe, "close"], [e, "aborted"]], function (t, i, n) {
                                        p("Request#%d %s: writeStream or res %s event emitted", k, o, n), $(G || null, null, e)
                                    }) : oe.on("close", function () {
                                        p("Request#%d %s: writeStream close event emitted", k, o), $(G || null, null, e)
                                    }), e.pipe(oe))
                                }
                                var i = [];
                                e.on("data", function (e) {
                                    p("Request#%d %s: `res data` event emit, size %d", k, o, e.length), H += e.length, i.push(e)
                                }), e.on("end", function () {
                                    var t = n.concat(i, H);
                                    if (p("Request#%d %s: `res end` event emit, total size %d, _dumped: %s", k, o, H, e._dumped), G) return $(G, t, e);
                                    var a = ee(e);
                                    if (a.error) return $(a.error, t, e);
                                    a.redirect || function (e, t, i) {
                                        var n = e.headers["content-encoding"];
                                        i(null, t, n)
                                    }(e, t, function (i, n, a) {
                                        if (i) return $(i, t, e);
                                        if (!a && w.indexOf(r.dataType) >= 0) {
                                            try {
                                                n = decodeBodyByCharset(n, e)
                                            } catch (t) {
                                                return p("decodeBodyByCharset error: %s", t), $(null, n, e)
                                            }
                                            if ("json" === r.dataType) if (0 === H) n = null; else {
                                                var s = parseJSON(n, N);
                                                s.error ? i = s.error : n = s.data
                                            }
                                        }
                                        X && p("Request#%d %s: Remote socket was terminated before `response.end()` was called", k, o), $(i, n, e)
                                    })
                                })
                            })
                        } catch (e) {
                            return $(e)
                        }

                        function re() {
                            p("Request#%d %s abort, connected: %s", k, o, W), ne.socket || (G.noSocket = !0, $(G)), ne.abort()
                        }

                        return "undefined" == typeof window ? (p("Connect timer ticking, timeout: %d", te), V = setTimeout(function () {
                            V = null, -1 === z && (z = -2);
                            var e = "Connect timeout for " + te + "ms", t = "ConnectionTimeoutError";
                            ne.socket || (t = "SocketAssignTimeoutError", e += ", working sockets is full"), (G = new Error(e)).name = t, G.requestId = k, p("ConnectTimeout: Request#%d %s %s: %s, connected: %s", k, o, G.name, e, W), re()
                        }, te)) : ne.on("requestTimeout", function () {
                            -1 === z && (z = -2);
                            var e = "Connect timeout for " + te + "ms";
                            (G = new Error(e)).name = "ConnectionTimeoutError", G.requestId = k, re()
                        }), J && ne.on("finish", function () {
                            J.requestSent = Date.now() - I
                        }), ne.once("socket", function (e) {
                            J && (J.queuing = Date.now() - I), isNode010 && e.socket && (e = e.socket);
                            var t = e.readyState;
                            if ("opening" === t) return e.once("lookup", function (e, t, i) {
                                p("Request#%d %s lookup: %s, %s, %s", k, o, e, t, i), J && (J.dnslookup = Date.now() - I), t && (q = t)
                            }), void e.once("connect", function () {
                                J && (J.connected = Date.now() - I), Z(), ae(), p("Request#%d %s new socket connected", k, o), W = !0, q || (q = e.remoteAddress), Y = e.remotePort
                            });
                            p("Request#%d %s reuse socket connected, readyState: %s", k, o, t), W = !0, j = !0, q || (q = e.remoteAddress), Y = e.remotePort, Z(), ae()
                        }), ne.on("error", function (e) {
                            "Error" !== e.name && "TypeError" !== e.name || (e.name = W ? "ResponseError" : "RequestError"), e.message += ' (req "error")', p("Request#%d %s `req error` event emit, %s: %s", k, o, e.name, e.message), $(G || e)
                        }), oe && oe.once("error", function (e) {
                            e.message += ' (writeStream "error")', G = e, p("Request#%d %s `writeStream error` event emit, %s: %s", k, o, e.name, e.message), re()
                        }), r.stream ? (r.stream.pipe(ne), r.stream.once("error", function (e) {
                            e.message += ' (stream "error")', G = e, p("Request#%d %s `readStream error` event emit, %s: %s", k, o, e.name, e.message), re()
                        })) : ne.end(F), ne.requestId = k, ne
                    }
                }).call(this, e("_process"), e("buffer").Buffer)
            }, {
                _process: 249,
                "any-promise": 44,
                "babel-runtime/core-js/json/stringify": 48,
                "babel-runtime/helpers/typeof": 64,
                buffer: 70,
                constants: 72,
                debug: 188,
                http: 272,
                https: 223,
                "humanize-ms": 224,
                url: 279,
                util: 287
            }]
        }, {}, [1])(1)
    }()
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(483), o = i(293);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\commentItem.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(490), o = i(295);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\userHeadCard.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(491), o = i(297);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\img.vue", t.default = s.exports
}, function (e, t) {
    e.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABHNCSVQICAgIfAhkiAAAAA1JREFUCJljOHvvvy8ACB4C+AENS7kAAAAASUVORK5CYII="
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(492), o = i(299);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\commentReport.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(484), o = i(301);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\components\\comment\\quickReview.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(464), o = i(303);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(876);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "3b3b3296", null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-detail\\pages\\Recommend.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1028);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1030);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(305);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\download-list-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(446), o = i(307);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\download-list.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(311);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\downloading-item-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(485), o = i(313);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\downloading-item.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(409), a = i(883), r = i(0), s = i(42), l = i(57), d = r.default.getLogger("Thunder.QueryTaskInfo");
    const u = new class extends o.HttpSession {
        constructor() {
            super(), this.lastActiveTaskId = -1, this.curBatchQueryId = void 0, this.timerId = null
        }

        queryP2spTaskInfo(e) {
            return n(this, void 0, void 0, function* () {
                return s.Common.isThunderPrivateUrl(e) && (e = s.Common.parseThunderPrivateUrl(e)), 0 === e.indexOf("ed2k://") && -1 === e.indexOf("|") && (e = e.replace(/%7C/g, "|")), new Promise(t => {
                    this.queryResInfo("url", e).then(e => {
                        let i = {result: 0, gcid: "", fileSize: 0, errCode: 0};
                        e && 200 === e.status && null !== e.data && null !== e.data.result && "ok" === e.data.result && "" !== e.data.gcid ? (i.result = e.data.code, i.fileSize = e.data.file_size, i.gcid = e.data.gcid, t(i)) : t(null)
                    }).catch(() => {
                        t(null)
                    })
                })
            })
        }

        asyncBatchQueryP2spTaskInfoByUrl(e, t, i) {
            return n(this, void 0, void 0, function* () {
                if (!e || 0 === e.length) return 0;
                void 0 === this.curBatchQueryId ? this.curBatchQueryId = 1 : this.curBatchQueryId += 1;
                let n = 0;
                for (; n < e.length; ++n) {
                    let i = yield this.queryP2spTaskInfo(e[n]);
                    i && t(e[n], i, n), yield this.delay(200)
                }
                return n >= e.length && i && "function" == typeof i && i(this.curBatchQueryId), this.curBatchQueryId
            })
        }

        postRequestEd2kTaskInfoByEd2kLink(e) {
            return s.Common.isThunderPrivateUrl(e) && (e = s.Common.parseThunderPrivateUrl(e)), new Promise(t => {
                this.host = "hub5idx.shub.sandai.net", this.port = 80, this.retries = 1, this.timeout = 15e3, this.body = a.QueryTaskInfoPackageNS.createQueryEd2kTaskInfoBuffer(e), this.post(e => {
                    let i = null;
                    200 === e.statusCode && e.body && e.body.length > 12 && (i = a.QueryTaskInfoPackageNS.praseEd2kTaskInfoBuffer(e.body)), d.information("postRequestEd2kTaskInfoByEd2kLink", i), t(i)
                }, e => {
                    d.warning("postRequestEd2kTaskInfoByEd2kLink", e), t(null)
                })
            })
        }

        delay(e) {
            return n(this, void 0, void 0, function* () {
                return new Promise(t => {
                    setTimeout(t, e)
                })
            })
        }

        queryResInfo(e, t) {
            return n(this, void 0, void 0, function* () {
                return l.fetchPCRes({url: "/xlppc.resinfo.api/v1/queryresinfo", data: {type: e, res: t}}, "prod")
            })
        }
    };
    !function (e) {
        e.postRequestEd2kTaskInfoByEd2kLink = function (e) {
            return n(this, void 0, void 0, function* () {
                return u.postRequestEd2kTaskInfoByEd2kLink(e)
            })
        }, e.asyncBatchQueryP2spTaskInfoByUrl = function (e, t, i) {
            return n(this, void 0, void 0, function* () {
                return u.asyncBatchQueryP2spTaskInfoByUrl(e, t, i)
            })
        }, e.queryResInfo = function (e, t) {
            return n(this, void 0, void 0, function* () {
                return u.queryResInfo(e, t)
            })
        }
    }(t.QueryTaskInfoHelperNS || (t.QueryTaskInfoHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(7), a = i(884), r = i(885), s = i(0).default.getLogger("Thunder.QueryTaskInfoPackage"),
        l = o.default(n.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        let t = 0;

        function i() {
            let e = 0, t = n.join(__rootDir, "../../Thunder.exe"), i = l.getFileVersion(t).split(".");
            if (i && 4 === i.length) {
                e = 26 * Number(i[0]).valueOf() + 18 * Number(i[1]).valueOf() + Number(i[3]).valueOf()
            }
            return e
        }

        function o() {
            return l.getPeerID()
        }

        e.createQueryP2spTaskInfoBuffer = function (e) {
            let n = 0, l = Buffer.alloc(10240);
            return s.information("createQueryP2spTaskInfoBuffer protocolVersion", 61, n), n = l.writeUInt32LE(61, n), s.information("createQueryP2spTaskInfoBuffer sequence", t, n), n = l.writeUInt32LE(++t, n), s.information("createQueryP2spTaskInfoBuffer command length", "0", n), n = l.writeUInt32LE(0, n), s.information("createQueryP2spTaskInfoBuffer thunder ver", i(), n), n = l.writeUInt32LE(i(), n), s.information("createQueryP2spTaskInfoBuffer compress flag", "0", n), n = l.writeUInt16LE(0, n), s.information("createQueryP2spTaskInfoBuffer reserved", "0", n), n = r.BufferUtilitiesNS.writeString(l, "", n, "utf-8"), s.information("createQueryP2spTaskInfoBuffer command", "2021", n), n = l.writeUInt16LE(2021, n), s.information("createQueryP2spTaskInfoBuffer by what", "2", n), n = l.writeUInt8(2, n), s.information("createQueryP2spTaskInfoBuffer body length", "0", n), n = l.writeUInt32LE(0, n), s.information("createQueryP2spTaskInfoBuffer url", e, n), n = r.BufferUtilitiesNS.writeString(l, e, n, "utf-8"), s.information("createQueryP2spTaskInfoBuffer code", "-1", n), n = l.writeInt32LE(-1, n), s.information("createQueryP2spTaskInfoBuffer", "origin url", n), n = r.BufferUtilitiesNS.writeString(l, "", n, "utf-8"), s.information("createQueryP2spTaskInfoBuffer code", "-1", n), n = l.writeInt32LE(-1, n), s.information("createQueryP2spTaskInfoBuffer", "refurl", n), n = r.BufferUtilitiesNS.writeString(l, "", n, "utf-8"), s.information("createQueryP2spTaskInfoBuffer code", "-1", n), n = l.writeInt32LE(-1, n), s.information("createQueryP2spTaskInfoBuffer", o(), n), n = r.BufferUtilitiesNS.writeString(l, o(), n, "utf-8"), s.information("createQueryP2spTaskInfoBuffer", "ip", n), n = l.writeInt32LE(0, n), n = l.writeInt32LE(0, n), n = l.writeInt32LE(-1, n), n = l.writeInt32LE(-1, n), s.information("createQueryP2spTaskInfoBuffer", "length", n), l = l.slice(0, n), s.information("createQueryP2spTaskInfoBuffer", l), l = a.ShubCryptoNS.encryptHttpBuffer(l)
        }, e.praseP2spTaskInfoBuffer = function (e) {
            let t = {result: 0, gcid: "", fileSize: 0, errCode: 0};
            try {
                e = a.ShubCryptoNS.decryptHttpBuffer(e);
                let i = 0, n = e.readUInt32LE(i);
                s.information("protocolVersion:", n), i += 4;
                let o = e.readUInt32LE(i);
                s.information("sequence:", o), i += 4;
                let l = e.readUInt32LE(i);
                s.information("commandLegth:", l), i += 4;
                let d = e.readUInt32LE(i);
                s.information("thunderVersion:", d), i += 4;
                let u = e.readUInt16LE(i);
                s.information("compressFlag:", u), i += 2, i = r.BufferUtilitiesNS.readString(e, i, "utf-8")[0];
                let c = e.readUInt16LE(i);
                if (s.information("commandType:", c), i += 2, t.result = e.readUInt8(i), i += 1, 1 === t.result) {
                    i = r.BufferUtilitiesNS.readString(e, i, "hex")[0];
                    let n = r.BufferUtilitiesNS.readUInt64LE(e, i);
                    i = n[0], t.fileSize = n[1];
                    let o = r.BufferUtilitiesNS.readString(e, i, "hex");
                    i = o[0], t.gcid = o[1].toUpperCase(), s.information("gcid", o[1])
                } else t.errCode = e.readUInt32LE(i);
                s.information("praseTaskInfoBuffer", t)
            } catch (e) {
                s.warning("decryptHttpBuffer", e)
            }
            return t
        }, e.createQueryEd2kTaskInfoBuffer = function (e) {
            let n = 0, d = Buffer.alloc(4096);
            s.information("createQueryEd2kTaskInfoBuffer protocolVersion", 60, n), n = d.writeUInt32LE(60, n), s.information("createQueryEd2kTaskInfoBuffer sequence", t, n), n = d.writeUInt32LE(++t, n), s.information("createQueryEd2kTaskInfoBuffer command length", "0", n), n = d.writeUInt32LE(0, n), s.information("createQueryEd2kTaskInfoBuffer thunder ver", i(), n), n = d.writeUInt32LE(i(), n), s.information("createQueryEd2kTaskInfoBuffer compress flag", "0", n), n = d.writeUInt16LE(0, n), s.information("createQueryEd2kTaskInfoBuffer reserved", "0", n), n = r.BufferUtilitiesNS.writeString(d, "", n, "utf-8"), s.information("createQueryEd2kTaskInfoBuffer command", "5001", n), n = d.writeUInt16LE(5001, n), s.information("createQueryEd2kTaskInfoBuffer", o(), n), n = r.BufferUtilitiesNS.writeString(d, o(), n, "utf-8");
            let u = l.parseEd2kUrl(e), c = u.fileHash;
            n = d.writeInt32LE(c.length / 2, n);
            let h = 0, f = 0;
            for (let e = 0; e < c.length; e += 2) h = parseInt(c.charAt(e), 16), f = parseInt(c.charAt(e + 1), 16), n = d.writeUInt8(h << 4 | f, n);
            return n = r.BufferUtilitiesNS.writeUInt64LE(d, u.fileSize, n), n = d.writeInt32LE(0, n), n = r.BufferUtilitiesNS.writeString(d, "", n, "utf-8"), n = d.writeInt32LE(0, n), n = r.BufferUtilitiesNS.writeString(d, e, n, "utf-8"), d = d.slice(0, n), s.information("createQueryEd2kTaskInfoBuffer before encrypt", d, n), d = a.ShubCryptoNS.encryptHttpBuffer(d)
        }, e.praseEd2kTaskInfoBuffer = function (e) {
            let t = {result: 0, hasRecord: 0, gcid: ""};
            try {
                e = a.ShubCryptoNS.decryptHttpBuffer(e), s.information("praseEd2kTaskInfoBuffer buffer", e);
                let i = 0, n = e.readUInt32LE(i);
                s.information("protocolVersion:", n), i += 4;
                let o = e.readUInt32LE(i);
                s.information("sequence:", o), i += 4;
                let l = e.readUInt32LE(i);
                s.information("commandLegth:", l), i += 4;
                let d = e.readUInt32LE(i);
                s.information("thunderVersion:", d), i += 4;
                let u = e.readUInt16LE(i);
                s.information("compressFlag:", u), i += 2, i = r.BufferUtilitiesNS.readString(e, i, "utf-8")[0];
                let c = e.readUInt16LE(i);
                if (s.information("commandType:", c), i += 2, t.result = e.readUInt8(i), i += 1, 1 === t.result && (t.hasRecord = e.readInt32LE(i), i += 4, 1 === t.hasRecord)) {
                    i = r.BufferUtilitiesNS.readString(e, i, "utf-8")[0], i = r.BufferUtilitiesNS.readString(e, i, "utf-8")[0], i = r.BufferUtilitiesNS.readString(e, i, "hex")[0];
                    let n = r.BufferUtilitiesNS.readString(e, i, "hex");
                    i = n[0], t.gcid = n[1].toUpperCase()
                }
                s.information("praseTaskInfoBuffer", t)
            } catch (e) {
                s.warning("decryptHttpBuffer", e)
            }
            return s.information("praseEd2kTaskInfoBuffer response", t), t
        }
    }(t.QueryTaskInfoPackageNS || (t.QueryTaskInfoPackageNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(97), o = i(80), a = i(72), r = i(29), s = i(0).default.getLogger("Thunder.shub-http.shub-crypto");
    !function (e) {
        function t(e) {
            let t = a.createHash("md5");
            return t.update(e), t.digest()
        }

        e.encryptHttpBuffer = function (e) {
            if (0 !== e.readUInt16LE(16)) {
                let t = n.Buffer.alloc(20);
                e.copy(t, 0, 0, 20);
                let i = n.Buffer.alloc(e.length - 20);
                e.copy(i, 0, 20);
                let a = o.deflateSync(i);
                e = n.Buffer.concat([t, a])
            }
            let i = n.Buffer.alloc(8);
            e.copy(i, 0, 0, 7), i = t(i);
            let a = n.Buffer.alloc(12);
            e.copy(a, 0, 0, 11);
            let s = n.Buffer.alloc(e.length - 12);
            e.copy(s, 0, 12), s = r.ToolsUtilitiesAWNS.encryptBuffer(s, i);
            let l = n.Buffer.concat([a, s]);
            return l.writeUInt32LE(s.length, 8), l
        }, e.decryptHttpBuffer = function (e) {
            let i = null;
            try {
                let a = n.Buffer.alloc(8);
                e.copy(a, 0, 0, 7), a = t(a);
                let l = n.Buffer.alloc(12);
                e.copy(l, 0, 0, 11);
                let d = n.Buffer.alloc(e.length - 12);
                if (e.copy(d, 0, 12), d = r.ToolsUtilitiesAWNS.decryptBuffer(d, a), 0 !== (i = n.Buffer.concat([l, d])).readUInt16LE(16)) {
                    let e = n.Buffer.alloc(20);
                    i.copy(e, 0, 0, 20);
                    let t = n.Buffer.alloc(i.length - 20);
                    i.copy(t, 0, 20);
                    let a = o.inflateSync(t);
                    i = n.Buffer.concat([e, a])
                }
            } catch (e) {
                s.warning("decryptHttpBuffer", e)
            }
            return i
        }
    }(t.ShubCryptoNS || (t.ShubCryptoNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(7).default(n.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        e.writeUInt64LE = function (e, t, i) {
            const n = ~~(t / 4294967295), o = t % 4294967295 - n;
            return i = e.writeUInt32LE(o, i), i = e.writeUInt32LE(n, i)
        }, e.writeString = function (e, t, i, n) {
            let a = null;
            if ("gbk" === n) {
                let e = 936, i = o.utf8StringEncodeToBinary(t, e);
                a = Buffer.from(i, "binary")
            } else a = Buffer.from(t, n);
            return (i = e.writeUInt32LE(a.byteLength, i)) + a.copy(e, i, 0)
        }, e.readUInt64LE = function (e, t) {
            let i = e.readUInt32LE(t);
            t += 4;
            let n = e.readUInt32LE(t);
            return [t += 4, n * Math.pow(2, 32) + i]
        }, e.readString = function (e, t, i) {
            let n = e.readUInt32LE(t);
            t += 4;
            let a = void 0;
            if ("gbk" === i) {
                let i = 936, r = e.toString("binary", t, t + n);
                a = o.utf8StringDecodeFromBinary(r, i)
            } else a = e.toString(i, t, t + n);
            return [t += n, a]
        }
    }(t.BufferUtilitiesNS || (t.BufferUtilitiesNS = {}))
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(493), o = i(315);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\item-vip-expand\\item-vip-speed-plugin.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(317);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\completed-item-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(486), o = i(319);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\completed-item.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(321);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\recycle-item-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(487), o = i(323);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\task-items\\recycle-item.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1032);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(437), o = i(325);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\download-list-skeleton.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(327);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\private-space-open-page-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(447), o = i(329);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\private-space-open-page.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(331);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\download-search-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(448), o = i(333);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\download-panel\\download-list-search.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(335);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\setting-center-view\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(430), o = i(337);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(911);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\find-page\\setting-center-view\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(438), o = i(339);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(910);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "69ad46c4", null);
    s.options.__file = "src\\common\\generator-view\\generator-view.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(449), o = i(341);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-checkbox.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1034);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(468), o = i(355);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-speed.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(469), o = i(357);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-speed-time.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(455), o = i(361);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-radio.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(470), o = i(363);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-container.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(456), o = i(365);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-checkinput.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(457), o = i(367);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-checkselect.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(458), o = i(369);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-textarea.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(459), o = i(371);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, null, null);
    s.options.__file = "src\\common\\generator-view\\conf-component\\conf-proxy-list.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1036);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1038);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(373);
    for (var o in n) "default" !== o && function (e) {
        i.d(t, e, function () {
            return n[e]
        })
    }(o);
    var a = i(1), r = Object(a.a)(n.default, void 0, void 0, !1, null, null, null);
    r.options.__file = "src\\main-renderer\\views\\main-body\\embedded-browser-view\\index-container.vue", t.default = r.exports
}, function (e, t, i) {
    "use strict";
    i.r(t);
    var n = i(431), o = i(375);
    for (var a in o) "default" !== a && function (e) {
        i.d(t, e, function () {
            return o[e]
        })
    }(a);
    i(545), i(914);
    var r = i(1), s = Object(r.a)(o.default, n.a, n.b, !1, null, "34c4af56", null);
    s.options.__file = "src\\main-renderer\\views\\main-body\\embedded-browser-view\\index.vue", t.default = s.exports
}, function (e, t, i) {
    "use strict";
    var n = i(1040);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1042);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1044);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1051);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1054);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1064);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1067);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1070);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1072);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1075);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1078);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1085);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1087);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1089);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1092);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1094);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1096);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1098);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1101);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1103);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1107);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1112);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1115);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1118);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1120);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1122);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1127);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1129);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1131);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1133);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1135);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1137);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1139);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = i(1141);
    i.n(n).a
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(12), a = i(8), r = i(3), s = i(79);
    !function (e) {
        function t(e, t) {
            return n(this, void 0, void 0, function* () {
                if (null !== e) {
                    let i = e.webContents;
                    (yield i.isDevToolsOpened()) ? yield i.closeDevTools() : yield i.openDevTools(t)
                }
            })
        }

        e.openDevTool = t, e.enableDevTools = function (e) {
            return n(this, void 0, void 0, function* () {
                window.addEventListener("keyup", i => n(this, void 0, void 0, function* () {
                    if ("F12" === i.key && i.ctrlKey) s.DevEnvHelperNS.isLogEnable() && (yield t(yield o.asyncRemoteCall.getCurrentWindow(), e)); else if (("t" === i.key || "T" === i.key) && i.altKey && s.DevEnvHelperNS.isLogEnable()) {
                        let e = document.getElementById("DevProcessPid");
                        if (e) document.body.removeChild(e); else {
                            (e = document.createElement("p")).id = "DevProcessPid", e.style.position = "absolute", e.style.left = "0px", e.style.top = "0px", e.style.width = "100%", e.style.zIndex = "10000", e.style.color = "rgb(255,0,0)", document.body.appendChild(e);
                            let t = "process.pid:" + process.pid;
                            t += "\r\nlocation.href:" + location.href, t += "\r\nprocess.argv:" + process.argv, e.innerText = t
                        }
                    }
                }), !0)
            })
        }, e.enableDragOpenFile = function (e) {
            void 0 === e && (e = !1), document.addEventListener("dragover", e => (e.preventDefault(), e.stopPropagation(), !1), !0), document.addEventListener("drop", e => n(this, void 0, void 0, function* () {
                e.preventDefault(), e.stopPropagation();
                let t = e.dataTransfer, i = t.files, n = t.items;
                if (void 0 !== n && null !== n && n.length > 0) for (let e = 0; e < n.length; e++) {
                    let t = n[e];
                    "string" === t.kind && "text/uri-list" === t.type ? t.getAsString(e => {
                        r.client.callServerFunction("DropOpenUrl", e).catch()
                    }) : t.kind
                }
                if (void 0 !== i && null !== i && i.length > 0) for (let e = 0; e < i.length; e++) {
                    let t = i[e].path;
                    void 0 !== t && null !== t && "" !== t && (yield a.FileSystemAWNS.existsAW(t)) && r.client.callServerFunction("DropOpenFile", t).catch()
                }
                return !1
            }), !0)
        }
    }(t.ThunderToolsNS || (t.ThunderToolsNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(12), r = i(3), s = i(50), l = i(14), d = i(0), u = i(7), c = i(42), h = i(4), f = i(10),
        p = i(39), g = i(31), m = i(73), v = i(82), y = i(77), T = i(523),
        w = u.default(o.join(__rootDir, "../bin/ThunderHelper.node"));

    class k {
        static getInstance() {
            return null === k.instance && (k.instance = new k), k.instance
        }
    }

    k.instance = null, function (e) {
        const t = ["http://", "https://", "ftp://"], i = "thunder://", u = "ed2k://", C = "magnet:?",
            b = [i, "thunders://", u, C];
        let I = !1;
        const S = d.default.getLogger("ClipBoardNS");

        function _(e) {
            let i = !1;
            if (e) for (let n = 0; n < t.length; ++n) {
                let o = t[n];
                if (0 === e.indexOf(o)) {
                    i = !0;
                    break
                }
            }
            return i
        }

        function D(e) {
            let t = !1;
            if (e) for (let i = 0; i < b.length; ++i) {
                let n = b[i];
                if (0 === e.indexOf(n)) {
                    t = !0;
                    break
                }
            }
            return t
        }

        function A(e) {
            let t = !1;
            return e && (t = 0 === e.indexOf(u)), t
        }

        function N(e) {
            let t = !1;
            return e && (t = 0 === e.indexOf(C)), t
        }

        function x(e, t) {
            let i = !1;
            do {
                if (!e) break;
                if (!t) break;
                if (t.endsWith(";") || (t = `${t};`), t.indexOf(`${e};`) > -1) {
                    i = !0;
                    break
                }
            } while (0);
            return i
        }

        function E(e) {
            let t = !1;
            do {
                if (void 0 === e || null === e || "" === e) break;
                let i = "thunderx://";
                if (void 0 === (e = e.trim()) || null === e || "" === e) break;
                0 === e.indexOf(i, 0) && (t = !0)
            } while (0);
            return t
        }

        function O(e) {
            let t = "", i = (e = e.trim()).substring("thunderx://".length), n = i.lastIndexOf("}");
            return n > 0 && (t = i.substring(0, n + 1)), t
        }

        function P(e) {
            let t = e, i = e.substr(C.length).split("&");
            for (let n = 0; n < i.length; ++n) {
                let o = i[n].indexOf("=");
                if (o < 0) continue;
                let a = i[n].substr(0, o);
                if ("xt" === a || 0 === a.indexOf("xt.")) {
                    const a = "urn:btih:";
                    if (i[n].substr(o + 1, a.length) !== a) break;
                    let r = i[n].substr(o + a.length + 1);
                    if (r.length <= 32) break;
                    let s = /[0-9,A-Z,a-z]{40}/;
                    if (s.test(r)) {
                        r.length > 40 && "&" !== r[40] && (S.information("reg test 40"), r = r.substr(0, 40), (o = e.indexOf(r)) >= 0 && (t = e.substr(0, o + r.length))), S.information("urlOut", t, e);
                        break
                    }
                    if ((s = /[0-9,A-Z,a-z]{32}/).test(r)) {
                        "&" !== r[32] && (S.information("reg test 32"), r = r.substr(0, 32), (o = e.indexOf(r)) >= 0 && (t = e.substr(0, o + r.length))), S.information("urlOut", t, e);
                        break
                    }
                }
            }
            return t
        }

        function M(e) {
            let t = e;
            if (e) {
                let n = /[^A-Za-z0-9=\/\+]/g;
                n.lastIndex = i.length, n.exec(e) && (t = e.substr(0, n.lastIndex - 1), S.information("urlOut", t, e))
            }
            return t
        }

        function F(e) {
            let t = e;
            if (e) {
                let i = /\|\//g;
                i.lastIndex = u.length, i.exec(e) && (t = e.substr(0, i.lastIndex), S.information("urlOut", t, e))
            }
            return t
        }

        function L(e, t, i) {
            let n = !0, o = t[0];
            return i - o.length >= 3 && 0 === o.indexOf("http") && "&tr=" === e.substr(i - o.length - "&tr=".length, "&tr=".length) && (n = !1), n
        }

        function R(e) {
            let t = [];
            if (e) {
                let i = function (e) {
                    let t = [], i = /(https?|ftp|thunder|ed2k|magnet):/g, n = i.exec(e), o = -1;
                    for (; n;) {
                        if (L(e, n, i.lastIndex)) {
                            let a = o, r = n[0];
                            o = i.lastIndex - r.length, a >= 0 && t.push(e.substr(a, o - a))
                        }
                        (n = i.exec(e)) || t.push(e.substr(o))
                    }
                    return t
                }(e);
                if (S.information("splitTextByProtocal", i), 1 === i.length) {
                    let e = i[0];
                    if (N(e)) e = P(e); else if (c.Common.isThunderPrivateUrl(e)) e = M(e); else if (A(e)) e = F(e); else {
                        let t = e.trim().match(/([\S]+)/);
                        t && t[0] && (e = t[0])
                    }
                    t.push(e)
                } else i.forEach(e => {
                    N(e = function (e) {
                        let t = e;
                        if (e) {
                            let i = /[ ,\r,\n]/g;
                            i.exec(e) && (t = e.substr(0, i.lastIndex - 1), S.information("urlOut", t, e))
                        }
                        return t
                    }(e = e.trim())) ? e = P(e) : c.Common.isThunderPrivateUrl(e) ? e = M(e) : A(e) ? e = F(e) : _(e) && (e = function (e) {
                        let t = e;
                        if (e) {
                            let i = y.BHOConfigNS.getValue("Monitor", "ExtendNames", y.BHOConfigNS.getDefaultExtendNames()).split(";");
                            i.sort((e, t) => t.length - e.length), S.information("extendNamesArr", i);
                            let n = -1;
                            for (let t = 0; t < i.length; ++t) {
                                if (i[t].length <= 0) continue;
                                let o = e.lastIndexOf(i[t]);
                                S.information("index", o, "endIndex", n, "ext", i[t]), o >= 0 && o >= n && (n = o + i[t].length)
                            }
                            n >= 0 && (t = e.substr(0, n), S.information("urlOut", t, e))
                        }
                        return t
                    }(e)), S.information("validUrl", e), t.push(e)
                })
            }
            return t
        }

        function B(e, t) {
            let i = e.join(" ");
            for (let e = 0; e < t.length; e++) {
                let n = t[e];
                if (0 === n.indexOf("https://pan.xunlei.com/s/")) {
                    if (l.ThunderUtil.getQueryString(n, "pass_code")) {
                        S.information("auto share completely url", n), r.client.callServerFunction("BringMainWndToTop").catch(), r.client.callServerFunction("OpenNewTab", n).catch();
                        break
                    }
                    let o = i.indexOf(n) + n.length, a = i.substring(o);
                    if (e !== t.length - 1) {
                        let n = t[e + 1], r = i.indexOf(n, o);
                        -1 !== r && (a = i.substring(o, r))
                    }
                    let s = /提取码.*?([a-zA-Z0-9]+)/.exec(a);
                    if (s || (s = /.*?([a-zA-Z0-9]+)/.exec(a)), S.information("auto share", s), s && s[1] && 4 === s[1].length) {
                        let e = s[1];
                        S.information("auto share", n, e), n = l.ThunderUtil.setQueryString(n, {pass_code: e}), S.information("auto share open url", n), r.client.callServerFunction("BringMainWndToTop").catch(), r.client.callServerFunction("OpenNewTab", n).catch();
                        break
                    }
                }
            }
        }

        function U(e, t) {
            return n(this, void 0, void 0, function* () {
                if (I) {
                    if (I = !1, !(yield(yield a.asyncRemoteCall.getCurrentWindow()).isVisible())) return
                }
                let i = [], n = f.ConfigNS.getValue("Monitor", "MonitorClipBoard", !0);
                do {
                    if (!n) {
                        S.information("notwatch");
                        break
                    }
                    let a = t.join("");
                    S.information("textList", t), v.URLHelperNS.isBirdKey(a) && (S.information("isbirdkey"), m.openBirdKeyDecodeDialog(a, {from: "clipboard"}));
                    let r = v.URLHelperNS.isYunFetchBackTask(a);
                    if (S.information("clipBoardText", a, "regExp", r), S.information("isYunFetchBackTask regExp", r), r && r.length > 0) {
                        let e = r[1], t = new Buffer(e, "base64").toString("utf8");
                        yield T.ThunderUnionYunFetchBackNS.createTaskFromJsonString(decodeURIComponent(t));
                        break
                    }
                    if (S.information("attachClipBoardCallback type:", e, t), null !== t && void 0 !== t && t.length > 0) {
                        let e = t.join("");
                        if (E(e)) {
                            let t = O(e);
                            p.ThunderNewTask.createThunderxTask(t).catch();
                            break
                        }
                    }
                    let l = y.BHOConfigNS.getValue("Monitor", "ExtendNames", y.BHOConfigNS.getDefaultExtendNames()),
                        d = y.BHOConfigNS.getValue("Monitor", "WatchTraditionLink", 1),
                        u = y.BHOConfigNS.getValue("Monitor", "ConfigWatch_Bt", 1),
                        f = y.BHOConfigNS.getValue("EMuleGenericSettings", "EMuleWatchLink", 1),
                        w = y.BHOConfigNS.getValue("MagnetGenericSettings", "MagnetWatchLink", 1), k = {};
                    for (let e = 0; e < t.length; ++e) {
                        let i = t[e];
                        if (!i) continue;
                        let n = R(i);
                        for (let e of n) k[e] = !0
                    }
                    let C = Object.keys(k);
                    if (!C || 0 === C.length) break;
                    B(t, C);
                    for (let e = 0; e < C.length; e++) {
                        let t = C[e];
                        if (!t) continue;
                        let n = t;
                        if (c.Common.isThunderPrivateUrl(t) && (t = c.Common.parseThunderPrivateUrl(t)), !_(t) && !D(t)) {
                            S.information("isVaildUrl && isVaildUrl url:", t);
                            continue
                        }
                        let a = g.ThunderHelper.getTaskTypeFromUrl(t);
                        if (a === h.DownloadKernel.TaskType.P2sp) {
                            if (0 === d && 0 === u) {
                                S.information("taskType: P2sp, watchTraditionLink === 0 && watchBtLink === 0");
                                continue
                            }
                            let e = s.parse(t);
                            if (null === e) continue;
                            let a = o.extname(e.pathname);
                            if (a && (a = a.toLowerCase()), 0 !== d && x(a, l)) S.information("valid watchTraditionLink"); else {
                                if (0 === u || ".torrent" !== a) {
                                    S.information("invalid ext:", a);
                                    continue
                                }
                                S.information("valid watchBtLink")
                            }
                            -1 !== n.indexOf("(*)") || i.includes(n, 0) || i.push(n)
                        } else if (a === h.DownloadKernel.TaskType.Emule) {
                            if (0 === f) {
                                S.information("taskType: Emule, watchBtLink === 0");
                                continue
                            }
                            -1 !== n.indexOf("(*)") || i.includes(n, 0) || i.push(n)
                        } else if (a === h.DownloadKernel.TaskType.Magnet || a === h.DownloadKernel.TaskType.Bt) {
                            if (0 === Number(w)) {
                                S.information("taskType: Magnet, watchMagnetLink === 0");
                                continue
                            }
                            p.ThunderNewTask.createBtTaskWindow({url: n, type: "url"}, {source: "clipboard"})
                        }
                    }
                } while (0);
                i.length > 0 && p.ThunderNewTask.createPreNewTaskWindow(i, "clipboard")
            })
        }

        e.init = function (e) {
            I = e, w.initClipBoard(), setTimeout(() => {
                w.attachClipBoard(U)
            }, 1e3)
        }, e.getOperInfoInstance = function () {
            return k.getInstance()
        }
    }(t.ClipBoardNS || (t.ClipBoardNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(19), r = i(12), s = i(2), l = i(8), d = i(14), u = i(7), c = i(13), h = i(10),
        f = o.default.getLogger("MainRendererHelper"), p = u.default(s.join(__rootDir, "../bin/ThunderHelper.node"));
    const g = new class {
        constructor() {
            this.mainWndDataIniPath = s.resolve(__profilesDir, "mainWndData.ini"), this.preBossKeyName = "", this.defaultMainWndWidth = 1060, this.defaultMainWndHeight = 680
        }

        saveMainWndData() {
            return n(this, void 0, void 0, function* () {
                let e = yield r.asyncRemoteCall.getCurrentWindow(), t = yield e.getSize(), i = "normal";
                (yield e.isMaximized()) && (i = "max");
                let n = this.defaultMainWndWidth, o = this.defaultMainWndHeight;
                t && (n = t[0], o = t[1]), p.writeINI(this.mainWndDataIniPath, "MainBody", "ExitState", i), p.writeINI(this.mainWndDataIniPath, "MainBody", "MainWndLastWidth", n.toString()), p.writeINI(this.mainWndDataIniPath, "MainBody", "MainWndLastHeight", o.toString()), f.information("saveMainWndData:", this.mainWndDataIniPath, n, o, i)
            })
        }

        initMainRendererHelper() {
            h.ConfigNS.attachListener(c.NodeEventMesssageNS.eventConfigInitFinished, () => {
                this.onRegisterBossKey(), this.onInitDefaultPath().catch()
            })
        }

        onInitDefaultPath() {
            return n(this, void 0, void 0, function* () {
                let e = h.ConfigNS.getValue("TaskDefaultSettings", "InitPath", "");
                if ("" === e) {
                    let t = d.ThunderUtil.getMaxFreeDriver();
                    null !== t && "" !== t && (e = t + ":\\迅雷下载")
                }
                "" !== e && h.ConfigNS.setValue("TaskDefaultSettings", "InitPath", e);
                let t = h.ConfigNS.getValue("TaskDefaultSettings", "DefaultPath", "");
                "" !== t && (yield l.FileSystemAWNS.mkdirsAW(t)) || "" !== e && (yield l.FileSystemAWNS.mkdirsAW(e), h.ConfigNS.setValue("TaskDefaultSettings", "DefaultPath", e))
            })
        }

        onRegisterBossKey() {
            h.ConfigNS.setValue("BossKey", "BossKeyState", !1), this.registerBossKey().catch(), h.ConfigNS.attachListener(c.NodeEventMesssageNS.eventConfigValueChanged, (e, t, i, n) => {
                "BossKey" === e && this.registerBossKey().catch()
            })
        }

        registerBossKey() {
            return n(this, void 0, void 0, function* () {
                let e = yield r.asyncRemoteCall.getGlobalShortcut();
                if ("" !== this.preBossKeyName && (yield e.unregister(this.preBossKeyName)), h.ConfigNS.getValue("BossKey", "BossKeySwitch", !1)) {
                    let t = h.ConfigNS.getValue("BossKey", "BossKeyName", "Alt+D");
                    0 === t.indexOf("Crtl+") && (t = t.replace("Crtl", "Ctrl"), h.ConfigNS.setValue("BossKey", "BossKeyName", t)), null !== t && void 0 !== t && "" !== t && (e.register(t, () => {
                        a.ipcRenderer.send("closeMainWindow", "BossKey")
                    }), this.preBossKeyName = t)
                }
            })
        }
    };
    t.default = g
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(2), r = i(7), s = i(17), l = r.default(a.join(__rootDir, "../bin/ThunderHelper.node")),
        d = o.default.getLogger("BindConfigNS");
    let u = a.resolve(__profilesDir, "BindingConfig.ini");
    !function (e) {
        e.init = function () {
            s.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", e => n(this, void 0, void 0, function* () {
                d.information("BindConfigNS init userId:", e), l.writeINI(u, "UserInfo", "UserId", e)
            }))
        }
    }(t.BindConfigNS || (t.BindConfigNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(10), r = i(12), s = i(13);
    let l = void 0;

    function d() {
        return n(this, void 0, void 0, function* () {
            let e = void 0;
            if ("browser" === process.type) e = process.argv; else if ("renderer" === process.type) {
                e = (yield r.asyncRemoteCall.getProcess()).argv
            }
            return e
        })
    }

    function u() {
        return n(this, void 0, void 0, function* () {
            return new Promise(e => {
                a.ConfigNS.attachListener(s.NodeEventMesssageNS.eventConfigInitFinished, () => {
                    let t = a.ConfigNS.getValue("PerformanceTest", "memoryWarning", 500);
                    e(t)
                })
            })
        })
    }

    function c() {
        return n(this, void 0, void 0, function* () {
            do {
                let e = (new Date).getHours();
                if (e < 10 && e > 20) break;
                const t = i(19).dialog;
                let n = "browser" === process.type ? t : yield r.asyncRemoteCall.getDialog();
                if (!n) break;
                let o = {
                    type: "info",
                    title: "内存预警",
                    message: `memory warning in ${process.type} ${process.pid} process`,
                    detail: `进程id ${process.pid}`,
                    buttons: ["close"]
                };
                yield n.showMessageBox(o)
            } while (0)
        })
    }

    t.memoryWarningSupport = function () {
        return n(this, void 0, void 0, function* () {
            do {
                let e = yield d();
                if (!e || 0 === e.length) break;
                if (!e.includes("--autotest:startup")) break;
                let t = yield u();
                if (void 0 !== l) break;
                l = setInterval(() => {
                    let e = process.memoryUsage(), i = e && e.heapUsed;
                    i && i >= 1024 * t * 1024 && (process.takeHeapSnapshot(o.join(__rootDir, `..\\..\\A-Heap-${(new Date).getTime()}.heapsnapshot`)), clearInterval(l), l = null, c().catch())
                }, 1e4)
            } while (0)
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(36), a = i(5), r = i(15), s = i(27), l = i(547), d = i(954), u = i(410);
    !function (e) {
        e.adNaviteFunction = new class {
            constructor() {
                this.isRegister = !1
            }

            registerFunction() {
                this.isRegister || (this.isRegister = !0, this.registerNativeFunction(), this.registerServerFunction())
            }

            registerNativeFunction() {
                let e = [{functionName: "SetSceneStatus", nativeFunc: this.setSceneStatus}, {
                    functionName: "ShowAdTips",
                    nativeFunc: this.showTips
                }];
                o.NativeCallNS.registerNativeFunction(e)
            }

            registerServerFunction() {
                let e = {SetSceneStatus: this.ipcSetSceneStatus, ShowAdTips: this.ipcShowTips};
                r.server.registerFunctions(e)
            }

            setSceneStatus(e, t, i, n) {
                do {
                    if (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) break;
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0]) || a.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1];
                    l.adPlatform.setSceneStatus(o, r, n[2]), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
                } while (0)
            }

            ipcSetSceneStatus(e, t, ...i) {
                do {
                    if (!e) break;
                    if (!i || !i[0] || !i[1]) break;
                    l.adPlatform.setSceneStatus(i[0], i[1], i[2])
                } while (0)
            }

            showTips(e, t, i, n) {
                do {
                    if (a.isNullOrUndefined(e) || a.isNullOrUndefined(t) || a.isNullOrUndefined(i)) break;
                    if (a.isNullOrUndefined(n) || a.isNullOrUndefined(n[0]) || a.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], r = n[1];
                    d.adTipsManager.showFunctionalTips(r, o), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
                } while (0)
            }

            ipcShowTips(e, t, ...i) {
                do {
                    if (!e) break;
                    if (!i || !i[0] || !i[1]) break;
                    let t = i[0], n = i[1];
                    d.adTipsManager.showFunctionalTips(n, t)
                } while (0)
            }
        }, e.init = function () {
            e.adNaviteFunction.registerFunction(), setTimeout(() => n(this, void 0, void 0, function* () {
                const {AdPlatformManagerNS: e} = yield Promise.resolve().then(() => i(85));
                e.getInstance().init().catch(), l.adPlatform.initAw().catch()
            }), 5e3);
            let t = 60;
            process.env.DEBUG_AD_TEST && (t = 5), setTimeout(() => {
                u.adLeftBottomHelper.fetchOrderAw().catch()
            }, 1e3 * t);
            let o = 120;
            process.env.DEBUG_JS_TIP && (o = 5), setTimeout(() => {
                d.adTipsManager.initAw().catch()
            }, 1e3 * o)
        }
    }(t.AdManageNS || (t.AdManageNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(158), a = i(955), r = i(956), s = i(35), l = i(12), d = i(957);
    t.adTipsManager = new class {
        constructor() {
            this.marketTips = new a.AdMarketTips, this.functionalTips = new r.AdFunctionalTips, this.webPageTips = new d.AdWebPageTips
        }

        initAw() {
            return n(this, void 0, void 0, function* () {
                (yield l.asyncRemoteCall.getIpcMain()).on(s.ThunderChannelList.channelMRAdTipsClick, (e, t, i) => n(this, void 0, void 0, function* () {
                    i && i.orderType && (i.orderType === o.OrderType.Market ? yield this.marketTips.onClickAw(t, i) : i.orderType === o.OrderType.Functional && (yield this.functionalTips.onClickAw(t, i)))
                })), yield this.webPageTips.initAw(), setTimeout(() => n(this, void 0, void 0, function* () {
                    yield this.marketTips.initAw()
                }), 15e3), setTimeout(() => n(this, void 0, void 0, function* () {
                    yield this.functionalTips.initAw()
                }), 3e4)
            })
        }

        showFunctionalTips(e, t) {
            this.functionalTips.showTip(e, t)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(75), a = i(10), r = i(78), s = i(158), l = i(17), d = i(3), u = i(0);
    t.AdMarketTips = class extends s.AdTips {
        constructor() {
            super(), this.isVip = !1, this.lastShowTime = 0, this.orderType = s.OrderType.Market, this.tipsPriority = r.MsgQueueNS.MsgPriority.AdvertisementMarket, this.positionId = 1305, this.logger = u.default.getLogger("AdMarketTips")
        }

        initAw() {
            const e = e => super[e];
            return n(this, void 0, void 0, function* () {
                return l.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", () => n(this, void 0, void 0, function* () {
                    yield this.updateUserInfoAw()
                })), l.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => n(this, void 0, void 0, function* () {
                    this.isVip = !1, (new Date).getTime() - this.lastShowTime > 108e5 && this.timerCookie && (this.killTimer(), yield this.fetchOrdersAw())
                })), yield this.updateUserInfoAw(), e("initAw").call(this)
            })
        }

        showTip() {
            do {
                if (null === this.curSelectOrder || void 0 === this.curSelectOrder) {
                    this.logger.information("showTip:curSelectOrder 有问题");
                    break
                }
                let e = this.curSelectOrder.materials;
                if (e.length <= 0) {
                    this.logger.information("showTip:materials 有问题");
                    break
                }
                let t = e[0].materialId;
                super.showTip(t)
            } while (0)
        }

        fetchOrdersAw() {
            const e = e => super[e];
            return n(this, void 0, void 0, function* () {
                let t = null;
                return this.isVip || (this.shownOrderIds = yield this.getShownOrderIdAw(), t = e("fetchOrdersAw").call(this)), this.createTimer(), t
            })
        }

        handleEventAW(e, t) {
            const i = e => super[e];
            return n(this, void 0, void 0, function* () {
                try {
                    switch (yield i("handleEventAW").call(this, e, t), e) {
                        case"ad_load":
                            let n = yield this.downloadResourcesAW();
                            this.logger.information("downloadResourcesAW result", n), n && (this.isVip ? yield this.handleEventAW("ad_noshow", "vip") : this.showTip());
                            break;
                        case"ad_show":
                            this.lastShowTime = (new Date).getTime(), this.saveShownOrders()
                    }
                } catch (e) {
                    this.logger.warning(e)
                }
            })
        }

        updateUserInfoAw() {
            return n(this, void 0, void 0, function* () {
                try {
                    let e = yield d.client.callServerFunction("GetUserInfo", 2);
                    if (e) {
                        let t = JSON.parse(e).isVip;
                        this.isVip = t > 0, this.isVip && this.clearAllTips()
                    }
                } catch (e) {
                    this.logger.warning(e)
                }
            })
        }

        getShownOrderIdAw() {
            return n(this, void 0, void 0, function* () {
                let e = "";
                return yield o.AdHelperNS.onConfigInitAw(), a.ConfigNS.getValue("AdMarketTips", "TheDate", "") === o.AdHelperNS.getCurDate() && "" !== (e = a.ConfigNS.getValue("AdMarketTips", "shownOrders", "")) && "," === e.slice(e.length - 1) && (e = e.slice(0, e.length - 1)), e
            })
        }

        saveShownOrders() {
            let e = a.ConfigNS.getValue("AdMarketTips", "TheDate", ""), t = o.AdHelperNS.getCurDate(), i = "";
            e === t ? "" !== (i = a.ConfigNS.getValue("AdMarketTips", "shownOrders", "")) && "," === i.slice(i.length - 1) && (i = i.slice(0, i.length - 1)) : a.ConfigNS.setValue("AdMarketTips", "TheDate", t), i = "" !== i ? `${i},${this.curShowOrder.orderId}` : `${this.curShowOrder.orderId}`, a.ConfigNS.setValue("AdMarketTips", "shownOrders", i)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(75), r = i(29), s = i(8), l = i(78), d = i(158), u = i(66), c = i(0);
    t.AdFunctionalTips = class extends d.AdTips {
        constructor() {
            super(), this.readyScenesMap = new Map, this.orderType = d.OrderType.Functional, this.tipsPriority = l.MsgQueueNS.MsgPriority.AdvertisementFunctional, this.positionId = 1306, this.logger = c.default.getLogger("AdFunctionalTips")
        }

        showTip(e, t) {
            this.logger.information("sceneName", t);
            do {
                let i = this.readyScenesMap.get(t);
                if (!i) {
                    this.logger.information("showTip:sceneName 有问题");
                    break
                }
                this.curSelectScene = i, super.showTip(e)
            } while (0)
        }

        fetchOrdersAw() {
            const e = e => super[e];
            return n(this, void 0, void 0, function* () {
                let t = e("fetchOrdersAw").call(this);
                return this.createTimer(), t
            })
        }

        handleEventAW(e, t) {
            const i = e => super[e];
            return n(this, void 0, void 0, function* () {
                switch (yield i("handleEventAW").call(this, e, t), e) {
                    case"ad_load":
                        let n = yield this.downloadResourcesAW();
                        this.logger.information("downloadResourcesAW result", n), n && (yield this.downloadScenes(), yield this.loadAllScenes())
                }
            })
        }

        downloadScenes() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (null === this.curSelectOrder || void 0 === this.curSelectOrder) break;
                    const {UnzipUtilitiesAWNS: e} = yield Promise.resolve().then(() => i(106));
                    let t = this.curSelectOrder.scenes;
                    if (!(t.length <= 0)) for (let i = 0; i < t.length; ++i) {
                        let n = t[i], a = n.url, l = n.md5, d = `${n.name}.zip`, c = o.join(this.adDataScenesDir, d);
                        this.logger.information("downloadScenes:", a, c);
                        let h = yield u.AxiosNS.downloadFileAW(a, c);
                        if (this.logger.information("下载场景包：result = ", h, ";fileName = ", d), h) {
                            if (!1 === (h = yield r.ToolsUtilitiesAWNS.matchFileMd5(c, l))) {
                                this.logger.information("校验MD5值没通过，故删除该文件", l), yield s.FileSystemAWNS.unlinkAW(c);
                                continue
                            }
                            h = yield e.uncompressZipFile(`${this.adDataScenesDir}/`, c), this.logger.information("解压场景包：result = ", h, ";fileName = ", d), yield s.FileSystemAWNS.unlinkAW(c)
                        }
                    }
                } while (0)
            })
        }

        loadAllScenes() {
            return n(this, void 0, void 0, function* () {
                do {
                    if (null === this.curSelectOrder || void 0 === this.curSelectOrder) break;
                    let e = this.curSelectOrder.scenes;
                    if (e.length <= 0) this.logger.information("没有场景包"); else for (let t = 0; t < e.length; ++t) {
                        let i = e[t], n = i.name, r = this.readyScenesMap.get(n);
                        if (null === r || void 0 === r) {
                            this.readyScenesMap.set(n, i);
                            let e = o.join(this.adDataScenesDir, n);
                            yield a.AdHelperNS.loadScene(e)
                        }
                    }
                } while (0)
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(75), a = i(10), r = i(78), s = i(158), l = i(17), d = i(3), u = i(14), c = i(84), h = i(148), f = i(0),
        p = i(12);
    t.AdWebPageTips = class extends s.AdTips {
        constructor() {
            super(), this.isVip = !1, this.lastShowTime = 0, this.orderType = s.OrderType.WebPage, this.tipsPriority = r.MsgQueueNS.MsgPriority.AdvertisementMarket, this.positionId = 1352, this.logger = f.default.getLogger("AdWebPageTips")
        }

        initAw() {
            const e = e => super[e];
            return n(this, void 0, void 0, function* () {
                return l.NativeCallModule.nativeCall.AttachNativeEvent("onLoginSuc", () => n(this, void 0, void 0, function* () {
                    yield this.updateUserInfoAw()
                })), l.NativeCallModule.nativeCall.AttachNativeEvent("onLogout", () => n(this, void 0, void 0, function* () {
                    this.isVip = !1, (new Date).getTime() - this.lastShowTime > 108e5 && this.timerCookie && (this.killTimer(), yield this.fetchOrdersAw())
                })), yield this.updateUserInfoAw(), e("initAw").call(this)
            })
        }

        showTip() {
            do {
                if (null === this.curSelectOrder || void 0 === this.curSelectOrder) {
                    this.logger.information("showTip:curSelectOrder 有问题");
                    break
                }
                let e = this.curSelectOrder.materials;
                if (e.length <= 0) {
                    this.logger.information("showTip:materials 有问题");
                    break
                }
                this.logger.information("showTip");
                let t = e[0].materialId;
                super.showTip(t)
            } while (0)
        }

        fetchOrdersAw() {
            const e = e => super[e];
            return n(this, void 0, void 0, function* () {
                let t = null;
                return this.isVip || (this.shownOrderIds = yield this.getShownOrderIdAw(), t = e("fetchOrdersAw").call(this)), this.createTimer(), t
            })
        }

        createTip(e) {
            let t = !0, i = u.ThunderUtil.deepCopy(e);
            h.NotificationHelper.notify({
                title: i.title || "迅雷TIPS",
                type: c.Notification.TipsType.AdvertisementWebPageTips,
                width: i.width || 316,
                height: i.height ? i.height + 30 : 296,
                duration: i.timeout ? 1e3 * i.timeout : 6e3,
                noDelay: !0,
                name: this.tipsName,
                priority: this.tipsPriority,
                url: i.targetUrl,
                data: {exData: i}
            }, (e, ...a) => n(this, void 0, void 0, function* () {
                if ("webpage_loading" === e) this.curShowOrder = this.curSelectOrder, this.curShowScene = this.curSelectScene, this.curShowMaterialId = i.materialId; else if ("webpage_load_failed" === e) this.handleEventAW("ad_noshow", "loaderror").catch(); else if ("webpage_loaded" === e) this.handleEventAW("ad_show").catch(); else if ("click" === e) {
                    t = !1, this.handleEventAW("ad_click", "img").catch();
                    let [e] = a;
                    o.AdHelperNS.execute(i.openType, e), 1 === i.openType && (yield p.asyncRemoteCall.getCurrentWindow()).show()
                } else "click_close" === e ? (t = !1, this.handleEventAW("ad_closed", "btnClose").catch()) : "closed" === e && t && this.handleEventAW("ad_closed", "auto").catch()
            }))
        }

        parseOrders(e) {
            let t = [];
            if (this.orderType !== s.OrderType.WebPage) throw this.logger.warning("parseOrders only for orders width type [WebPage]"), new Error("parseOrders only for orders width type [WebPage]");
            for (let i = 0; i < e.length; ++i) {
                let n = {}, o = e[i];
                n.orderId = o.orderId, this.logger.information("parseOrders: orderId = ", o.orderId);
                let a = o.materials;
                if (!a || a.length <= 0) this.logger.warning("parseOrders: has no materials"); else {
                    n.materials = [];
                    for (let e of a) {
                        let t = {};
                        if (t.materialId = e.material_id, t.openType = e.open_type, t.targetUrl = e.open_url, t.style = e.type, this.orderType === s.OrderType.WebPage) {
                            let i = {
                                10101: {key: "title", type: "string"},
                                10901: {key: "width", type: "number"},
                                10902: {key: "height", type: "number"},
                                10906: {key: "timeout", type: "number"},
                                10910: {key: "targetUrl", type: "string"}
                            };
                            e.data.map(e => {
                                let n = i[e.asset];
                                n && ("number" === n.type ? t[n.key] = parseInt(e.value, 10) : t[n.key] = String(e.value))
                            })
                        }
                        t.targetUrl ? n.materials.push(t) : this.logger.warning("parseOrder: targetUrl missing")
                    }
                    t.push(n)
                }
            }
            return this.logger.information("parseOrder done. orders = ", t), t
        }

        handleEventAW(e, t) {
            const i = e => super[e];
            return n(this, void 0, void 0, function* () {
                try {
                    switch (yield i("handleEventAW").call(this, e, t), e) {
                        case"ad_load":
                            let n = yield this.downloadResourcesAW();
                            this.logger.information("downloadResourcesAW result", n), n && (this.isVip ? yield this.handleEventAW("ad_noshow", "vip") : this.showTip());
                            break;
                        case"ad_show":
                            this.lastShowTime = (new Date).getTime(), this.saveShownOrders()
                    }
                } catch (e) {
                    this.logger.warning(e)
                }
            })
        }

        updateUserInfoAw() {
            return n(this, void 0, void 0, function* () {
                try {
                    let e = yield d.client.callServerFunction("GetUserInfo", 2);
                    if (e) {
                        let t = JSON.parse(e).isVip;
                        this.isVip = t > 0, this.isVip && this.clearAllTips()
                    }
                } catch (e) {
                    this.logger.warning(e)
                }
            })
        }

        getShownOrderIdAw() {
            return n(this, void 0, void 0, function* () {
                let e = "";
                return yield o.AdHelperNS.onConfigInitAw(), a.ConfigNS.getValue("AdWebPageTips", "TheDate", "") === o.AdHelperNS.getCurDate() && "" !== (e = a.ConfigNS.getValue("AdWebPageTips", "shownOrders", "")) && "," === e.slice(e.length - 1) && (e = e.slice(0, e.length - 1)), e
            })
        }

        saveShownOrders() {
            let e = a.ConfigNS.getValue("AdWebPageTips", "TheDate", ""), t = o.AdHelperNS.getCurDate(), i = "";
            e === t ? "" !== (i = a.ConfigNS.getValue("AdWebPageTips", "shownOrders", "")) && "," === i.slice(i.length - 1) && (i = i.slice(0, i.length - 1)) : a.ConfigNS.setValue("AdWebPageTips", "TheDate", t), i = "" !== i ? `${i},${this.curShowOrder.orderId}` : `${this.curShowOrder.orderId}`, a.ConfigNS.setValue("AdWebPageTips", "shownOrders", i)
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(0), a = i(36), r = i(5), s = i(27), l = i(531), d = i(28), u = i(17),
        c = o.default.getLogger("NativeFunction.Login");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{
                        functionName: "AttachCallbackEvent",
                        nativeFunc: this.attachCallbackEvent
                    }, {functionName: "IsTipsWndShow", nativeFunc: this.isTipsWndShow}, {
                        functionName: "IsMainWndShow",
                        nativeFunc: this.isMainWndShow
                    }, {functionName: "CreateTipsWnd", nativeFunc: this.createTipsWnd}, {
                        functionName: "CloseTipsWnd",
                        nativeFunc: this.closeTipsWnd
                    }, {functionName: "ShowOrHideTipsWnd", nativeFunc: this.showOrHideTipsWnd}];
                    a.NativeCallNS.registerNativeFunction(e)
                }
            }

            attachCallbackEvent(e, t, i, n) {
                if (r.isNullOrUndefined(n) || r.isNullOrUndefined(n[0])) return void e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                let o = n[0], a = n[1];
                u.NativeCallModule.nativeCall.AttachNativeEvent(o, (...e) => {
                    d.NativeCallHostModule.nativeCallHost.fireNativeEvent(a, ...e)
                }), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            }

            createTipsWnd(e, t, i, n) {
                do {
                    if (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i) || r.isNullOrUndefined(n)) break;
                    if (r.isNullOrUndefined(n[0]) || r.isNullOrUndefined(n[1])) {
                        e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let o = n[0], a = n[1], d = "", u = null, c = null;
                    r.isNullOrUndefined(n[2]) || (u = n[2]), r.isNullOrUndefined(n[3]) || (c = n[3]), r.isNullOrUndefined(n[4]) || (d = n[4]), l.TipsHelperNS.tipsUIHelper.createTipsWnd(o, a, u, c, d).catch(), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
                } while (0)
            }

            isTipsWndShow(e, t, i) {
                do {
                    if (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) break;
                    let n = l.TipsHelperNS.tipsUIHelper.isTipsWndShow();
                    e.callNativeFunctionCallback(t, i, n)
                } while (0)
            }

            isMainWndShow(e, t, i) {
                return n(this, void 0, void 0, function* () {
                    do {
                        if (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) break;
                        let n = yield l.TipsHelperNS.tipsUIHelper.isMainWndShow();
                        e.callNativeFunctionCallback(t, i, n)
                    } while (0)
                })
            }

            closeTipsWnd(e, t, i) {
                do {
                    if (r.isNullOrUndefined(e) || r.isNullOrUndefined(t) || r.isNullOrUndefined(i)) break;
                    l.TipsHelperNS.tipsUIHelper.closeTipsWnd(), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
                } while (0)
            }

            showOrHideTipsWnd(e, t, i, n) {
                c.information("showOrHideTipsWnd", e, t, i);
                let o = !1, a = null, d = null, u = null, h = null;
                r.isNullOrUndefined(n[0]) || (o = n[0]), r.isNullOrUndefined(n[1]) || (a = n[1]), r.isNullOrUndefined(n[2]) || (d = n[2]), r.isNullOrUndefined(n[3]) || (u = n[3]), r.isNullOrUndefined(n[4]) || (h = n[4]), l.TipsHelperNS.tipsUIHelper.showOrHideTipsWnd(o, a, d, u, h), e.callNativeFunctionCallback(t, i, s.NativeFunctionErrorCode.Success)
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.TipsNaviteFunctionNS || (t.TipsNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(36), a = i(27), r = i(28), s = i(14), l = i(148),
        d = n.default.getLogger("NotificationNaviteFunction");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerNativeFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = [{functionName: "ShowNotification", nativeFunc: this.showNotification}];
                    o.NativeCallNS.registerNativeFunction(e)
                }
            }

            showNotification(e, t, i, n) {
                do {
                    if (s.ThunderUtil.isUndef(e) || s.ThunderUtil.isUndef(t) || s.ThunderUtil.isUndef(i)) break;
                    if (s.ThunderUtil.isUndef(n) || s.ThunderUtil.isUndef(n[0])) {
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    try {
                        let o = JSON.parse(n[0]);
                        if (d.information("showNotification", "options", o), !o) break;
                        let u = n[1], c = null;
                        d.information("notificationCallBackId", u), s.ThunderUtil.isDef(u) && (c = ((...e) => {
                            r.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, u, ...e)
                        })), l.NotificationHelper.notify(o, c)
                    } catch (n) {
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success)
                } while (0)
            }
        };
        e.registerNativeFunction = function () {
            t.registerNativeFunction()
        }
    }(t.NotificationNaviteFunctionNS || (t.NotificationNaviteFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(3), a = i(17), r = i(0), s = i(14), l = i(8), d = i(539),
        u = r.default.getLogger("Thunder.suspension-skin.init-skin"), {isDef: c, isUndef: h} = s.ThunderUtil;
    let f = !1, p = "", g = `${d.SuspensionSkinHelperNS.cacheDir}/user-skin-info.json`;

    function m(e) {
        let t = !0;
        return e.type === d.SuspensionSkinHelperNS.SkinType.Vip && (t = f), t
    }

    function v(e) {
        return c(e.type) && e.type >= d.SuspensionSkinHelperNS.SkinType.Vip
    }

    function y(e) {
        return n(this, void 0, void 0, function* () {
            u.information("updateUserSkin", e), p = e, yield function (e) {
                return n(this, void 0, void 0, function* () {
                    if (h(e) || e) try {
                        let e = JSON.parse(yield o.client.callServerFunction("GetUserInfo", 2));
                        c(e) && (f = "1" === e.isVip)
                    } catch (e) {
                        u.warning(e)
                    } else f = !1
                })
            }(e && "" !== e);
            let t = void 0;
            try {
                t = (yield l.FileSystemAWNS.readFileAW(g)).toString()
            } catch (e) {
                u.warning(e)
            }
            let i = null;
            if (t) try {
                let n = JSON.parse(t);
                n && (i = n[e])
            } catch (e) {
                u.warning(e)
            }
            let a = yield o.client.callServerFunction("GetSuspensionSkinInfo");
            if (a && v(a) && m(a)) return void (yield T(e));
            i || (i = f ? d.SuspensionSkinHelperNS.vipSkinInfo : d.SuspensionSkinHelperNS.defaultSkinInfo), u.information("skinInfo", i);
            let r = v(i);
            (r && m(i) || !r) && (yield o.client.callServerFunction("SetSuspensionSkinInfo", i))
        })
    }

    function T(e) {
        return n(this, void 0, void 0, function* () {
            u.information("userId", e, "isVip", f);
            try {
                if (f) {
                    let t = {}, i = yield o.client.callServerFunction("GetSuspensionSkinInfo"), n = "{}";
                    if ("" !== e) {
                        let o = yield l.FileSystemAWNS.existsAW(g);
                        u.information("isHaveSkinFile", o), o && (n = (yield l.FileSystemAWNS.readFileAW(g)).toString() || "{}"), (t = JSON.parse(n))[e] = {
                            id: i.id,
                            type: i.type
                        }, u.information("handleSkinSave", e, i), yield l.FileSystemAWNS.writeFileAW(g, JSON.stringify(t))
                    }
                }
            } catch (e) {
                u.warning(e)
            }
        })
    }

    o.client.attachServerEvent("OnChangeSuspensionSkin", (e, ...t) => {
        (function (e, t = !1, i = !1) {
            return n(this, void 0, void 0, function* () {
                if (u.information("changeSkin", "isPreview", t, "temp", i), i || m(e)) ; else try {
                    yield o.client.callServerFunction("SetSuspensionSkinInfo", d.SuspensionSkinHelperNS.defaultSkinInfo), u.information("set defaultSkinInfo")
                } catch (e) {
                    u.warning(e)
                }
                i && !t || (yield T(p))
            })
        })(t[0], t[1], t[2]).catch()
    }), a.NativeCallModule.nativeCall.AttachNativeEvent("OnUserLogin", e => n(this, void 0, void 0, function* () {
        yield y(e)
    })), a.NativeCallModule.nativeCall.AttachNativeEvent("onUserInfoChange", (e, t) => n(this, void 0, void 0, function* () {
        if ("vipinfo" === e) {
            u.information("data", t);
            try {
                let e = JSON.parse(yield o.client.callServerFunction("GetUserInfo", 2));
                if (u.information("userInfo", e), c(e) && "1" === e.isVip) {
                    let e = yield o.client.callServerFunction("GetUserID");
                    f = !0, p = e, yield o.client.callServerFunction("SetSuspensionSkinInfo", d.SuspensionSkinHelperNS.vipSkinInfo)
                }
            } catch (e) {
                u.warning(e)
            }
        }
    })), a.NativeCallModule.nativeCall.AttachNativeEvent("OnUserLogout", e => n(this, void 0, void 0, function* () {
        try {
            yield y("")
        } catch (e) {
            u.warning(e)
        }
    }))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(525), a = i(27), r = i(23), s = i(5), l = i(17), d = i(9), u = i(2), c = i(7), h = i(10), f = i(12),
        p = i(29), g = i(28), m = i(393), v = i(0).default.getLogger("EmbeddedNativeFunction"),
        y = c.default(u.join(__rootDir, "../bin/ThunderHelper.node"));
    t.defaultNavite = new class {
        constructor() {
        }

        registerDefaultNativeFunction() {
            let e = [{functionName: "GetUserID", nativeFunc: this.getUserID}, {
                functionName: "GetSessionID",
                nativeFunc: this.getSessionID
            }, {functionName: "LoadLoginData", nativeFunc: this.loadLoginData}, {
                functionName: "FireLoginEvent",
                nativeFunc: this.fireLoginEvent
            }, {functionName: "GetUserInfo", nativeFunc: this.getUserInfo}, {
                functionName: "IsLogined",
                nativeFunc: this.isLogined
            }, {functionName: "OpenNewTab", nativeFunc: this.openNewTab}, {
                functionName: "TrackEvent",
                nativeFunc: this.trackEvent
            }, {functionName: "GetThunderVersion", nativeFunc: this.getThunderVersion}, {
                functionName: "ShowLoginDlg",
                nativeFunc: this.showLoginDlg
            }, {functionName: "GetPeerID", nativeFunc: this.getPeerID}, {
                functionName: "GetConfigValue",
                nativeFunc: this.getConfigValue
            }, {functionName: "SetConfigValue", nativeFunc: this.setConfigValue}, {
                functionName: "GetDeviceID",
                nativeFunc: this.getDeviceID
            }, {functionName: "BringMainWndToTop", nativeFunc: this.bringMainWndToTop}, {
                functionName: "ShowWebWnd",
                nativeFunc: this.showWebWnd
            }, {functionName: "SaveLoginData", nativeFunc: this.saveLoginData}];
            o.BrowserCtrl.registerDefaultNativeFunction(e)
        }

        saveLoginData(e, t, i, n) {
            do {
                if (v.information("saveLoginData", e, t, i), s.isNullOrUndefined(n) || s.isNullOrUndefined(n[0]) || s.isNullOrUndefined(n[1]) || s.isNullOrUndefined(n[2])) {
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                    break
                }
                let o = n[0], l = n[1], d = n[2];
                r.LoginHelperNS.loginSDKHelper.saveData(o, l, d).then(n => {
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
                }).catch(() => {
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.CallFailed)
                })
            } while (0)
        }

        getUserID(e, t, i, n) {
            r.LoginHelperNS.loginHelper.getUserInfo("userid", function (n) {
                null !== n && void 0 !== n && "" !== n || (n = "0"), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
            })
        }

        getSessionID(e, t, i, n) {
            r.LoginHelperNS.loginHelper.getUserInfo("sessionid", function (n) {
                e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
            })
        }

        loadLoginData(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                let n = null;
                do {
                    if (s.isNullOrUndefined(o) || s.isNullOrUndefined(o[0]) || s.isNullOrUndefined(o[1])) {
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let l = o[0], d = o[1];
                    n = "memory" === l && "initconfig" === d ? yield r.LoginHelperNS.loginSDKHelper.getInitData() : r.LoginHelperNS.loginSDKHelper.loadData(l, d), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
                } while (0)
            })
        }

        fireLoginEvent(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (s.isNullOrUndefined(o) || !Array.isArray(o)) {
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    if ("string" != typeof o[0]) {
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let n = o[0], l = o[1], d = yield r.LoginHelperNS.loginSDKHelper.fireEvent(n, l);
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, JSON.stringify(d))
                } while (0)
            })
        }

        getUserInfo(e, t, i, n) {
            (s.isNullOrUndefined(e) || s.isNullOrUndefined(t) || s.isNullOrUndefined(i)) && e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
            let o = 0;
            if (s.isNullOrUndefined(n) || s.isNullOrUndefined(n[0])) o = 0; else {
                let e = n[0];
                o = null === e || void 0 === e || "" === e ? 0 : Number(e)
            }
            r.LoginHelperNS.loginHelper.getUserInfoEx(o, function (n) {
                e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
            })
        }

        isLogined(e, t, i, n) {
            (s.isNullOrUndefined(e) || s.isNullOrUndefined(t) || s.isNullOrUndefined(i)) && e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError), r.LoginHelperNS.loginHelper.isLogined(function (n) {
                e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
            })
        }

        openNewTab(e, t, i, n) {
            do {
                if (s.isNullOrUndefined(n)) break;
                if (s.isNullOrUndefined(n[0])) break;
                let o = n[0], r = n[1];
                l.NativeCallModule.nativeCall.CallNativeFunction("OpenNewTab", o, r), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success)
            } while (0)
        }

        trackEvent(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (s.isNullOrUndefined(e) || s.isNullOrUndefined(t) || s.isNullOrUndefined(i)) break;
                    if (!o || !o[0]) {
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let n = o[0], r = void 0 === o[1] ? "" : o[1], l = void 0 === o[2] ? "" : o[2],
                        u = void 0 === o[3] ? 0 : o[3], c = void 0 === o[4] ? 0 : o[4], h = void 0 === o[5] ? 0 : o[5],
                        f = void 0 === o[6] ? 0 : o[6], p = void 0 === o[7] ? "" : o[7], g = void 0 === o[8] ? 0 : o[8],
                        m = yield d.XLStatNS.asyncTrackEvent(n, r, l, u, c, h, f, p, g);
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, m)
                } while (0)
            })
        }

        getThunderVersion(e, t, i, n) {
            let o = u.join(__rootDir, "../../Thunder.exe"), r = y.getFileVersion(o);
            e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, r)
        }

        showLoginDlg(e, t, i, n) {
            let o = "other", l = !0;
            s.isNullOrUndefined(n) || s.isNullOrUndefined(n[0]) || (o = n[0]), s.isNullOrUndefined(n) || s.isNullOrUndefined(n[1]) || (l = n[1]), r.LoginHelperNS.loginHelper.showLoginDlg(o, l), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success)
        }

        getPeerID(e, t, i, n) {
            let o = y.getPeerID();
            e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, o)
        }

        getConfigValue(e, t, i, n) {
            do {
                if (!e || s.isNullOrUndefined(t) || !i) break;
                if (!n || !n[0] || !n[1]) {
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                    break
                }
                let o = n[0], r = n[1], l = n[2], d = h.ConfigNS.getValue(o, r, l);
                e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, d)
            } while (0)
        }

        setConfigValue(e, t, i, n) {
            do {
                if (!e || s.isNullOrUndefined(t) || !i) break;
                if (!n || !n[0] || !n[1]) {
                    e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                    break
                }
                let o = n[0], r = n[1], l = n[2];
                h.ConfigNS.setValue(o, r, l), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success)
            } while (0)
        }

        getDeviceID(e, t, i, n) {
            let o = y.getPeerID();
            e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, o)
        }

        bringMainWndToTop(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (s.isNullOrUndefined(e) || s.isNullOrUndefined(t) || s.isNullOrUndefined(i)) break;
                    let n = !1, o = yield f.asyncRemoteCall.getCurrentWindow();
                    o && (yield o.show(), yield p.ToolsUtilitiesAWNS.setForegroundWindow(y, o), n = !0), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success, n)
                } while (0)
            })
        }

        showWebWnd(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                do {
                    if (s.isNullOrUndefined(e) || s.isNullOrUndefined(t) || s.isNullOrUndefined(i)) break;
                    if (s.isNullOrUndefined(o) || s.isNullOrUndefined(o[0])) {
                        e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.ParamError);
                        break
                    }
                    let r = o[0];
                    if (o.splice(0, 1), null !== o[10] && void 0 !== o[10]) {
                        let e = o[10];
                        o[10] = (() => n(this, void 0, void 0, function* () {
                            return new Promise(i => {
                                g.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e, (e, t) => {
                                    v.information(e, t), i(t)
                                })
                            })
                        }))
                    }
                    if (null !== o[11] && void 0 !== o[11]) {
                        let e = o[11];
                        o[11] = (() => n(this, void 0, void 0, function* () {
                            g.NativeCallHostModule.nativeCallHost.callJsFunctionById(t, e)
                        }))
                    }
                    yield m.EmbeddedBrowserManagerNs.showWebWnd(r, ...o), e.callNativeFunctionCallback(t, i, a.NativeFunctionErrorCode.Success)
                } while (0)
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(12), r = i(7).default(o.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        let t = null;

        function i() {
            r.asyncFindProcess("xlbrowsershell.exe", function (e) {
                let t = o.join(__rootDir, "../../").toLocaleLowerCase();
                e.forEach(e => {
                    let i = e.path;
                    i && -1 !== i.toLocaleLowerCase().indexOf(t) && r.emptyWorkingSet(e.id)
                })
            }), r.asyncFindProcess("Thunder.exe", function (e) {
                let t = o.join(__rootDir, "../../").toLocaleLowerCase();
                e.forEach(e => {
                    let i = e.path;
                    i && -1 !== i.toLocaleLowerCase().indexOf(t) && r.emptyWorkingSet(e.id)
                })
            }), t && clearInterval(t), t = setInterval(() => {
                i()
            }, 6e4)
        }

        function s() {
            t && (clearInterval(t), t = null)
        }

        e.init = function () {
            return n(this, void 0, void 0, function* () {
                let e = yield a.asyncRemoteCall.getCurrentWindow();
                e.on("hide", i), e.on("minimize", i), e.on("restore", s), e.on("show", s)
            })
        }, e.emptyBrowserWorkingSet = function () {
            r.asyncFindProcess("xlbrowsershell.exe", function (e) {
                let t = o.join(__rootDir, "../../").toLocaleLowerCase();
                e.forEach(e => {
                    let i = e.path;
                    i && -1 !== i.toLocaleLowerCase().indexOf(t) && r.emptyWorkingSet(e.id)
                })
            })
        }
    }(t.EmptyWorkingSetNS || (t.EmptyWorkingSetNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(9), a = i(0), r = i(7), s = a.default.getLogger("360"),
        l = r.default(n.join(__rootDir, "../bin/ThunderHelper.node")), d = "360HealthElf.exe",
        u = "360DesktopLite64.exe";
    var c, h;
    !function (e) {
        e[e.GWL_EXSTYLE = -20] = "GWL_EXSTYLE"
    }(c || (c = {})), function (e) {
        e[e.WS_EX_TOPMOST = 8] = "WS_EX_TOPMOST"
    }(h || (h = {}));
    let f = 5e3, p = void 0, g = void 0, m = !1, v = !1;

    function y() {
        do {
            if (m) break;
            m = !0, o.XLStatNS.trackEvent("core_event", "360healthelf_run")
        } while (0)
    }

    function T() {
        do {
            if (v) break;
            v = !0, o.XLStatNS.trackEvent("core_event", "360desktoplite_run")
        } while (0)
    }

    function w() {
        do {
            let e = l.getCursorPos(), t = l.getWndHandleFromPoint(e.x, e.y);
            if (!t) break;
            if (!l.isFullScreen(t)) break;
            if (!(l.getWindowLong(t, c.GWL_EXSTYLE) & h.WS_EX_TOPMOST)) {
                s.information("WS_EX_TOPMOST", !1);
                break
            }
            s.information("WS_EX_TOPMOST", !0);
            let i = l.getWindowThreadProcessId(t);
            if (!i) break;
            let n = l.getProcessImageName(i);
            s.information("getProcessImageName", n);
            let a = n.toLowerCase() === d.toLowerCase(), r = n.toLowerCase() === u.toLowerCase();
            (a || r) && (p && (clearInterval(p), p = void 0), o.XLStatNS.trackEvent("core_event", "fullscreen_top_popup"))
        } while (0)
    }

    t.fullScreenCheckBegin = function () {
        do {
            if (g) break;
            g = setTimeout(() => {
                clearTimeout(g), g = void 0, l.asyncFindProcess(d, function (e) {
                    let t = e && e.length > 0;
                    s.information("check process", d, t, e), t && y()
                }), l.asyncFindProcess(u, function (e) {
                    let t = e && e.length > 0;
                    s.information("check process", u, t, e), t && T()
                }), p = setInterval(() => {
                    w()
                }, f)
            }, 1e4)
        } while (0)
    }, t.fullScreenCheckEnd = function () {
        return new Promise(e => {
            p && (clearInterval(p), p = void 0), g && (clearTimeout(g), g = void 0), e(!0)
        })
    }
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(965), a = i(2), r = i(7), s = i(15), l = i(25), d = i(10), u = i(64), c = i(9),
        h = r.default(a.join(__rootDir, "../bin/ThunderHelper.node"));
    !function (e) {
        let t = -1;

        function i(e, i, ...n) {
            return t
        }

        e.init = function () {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    let i = a.join(__rootDir, "../../Thunder.exe"), n = {
                        appKey: "eGx4X2Rvd25sb2FkX2RpYWdub3NpcwBSAAE=",
                        appName: "xlx_download_diagnosis",
                        appVer: h.getFileVersion(i),
                        peerId: h.getPeerID(),
                        installChannel: h.getInstallChannel(),
                        configFile: a.join(i, "../detect_stat.xml"),
                        storageFile: a.join(i, "../detect_stat.dat"),
                        useServerXml: 0
                    };
                    if ((t = yield c.XLStatNS.initParam(n)) < 0) break;
                    e = !0
                } while (0);
                let r = {GetDetectStatCookie: i};
                return s.server.registerFunctions(r), setTimeout(() => n(this, void 0, void 0, function* () {
                    if (yield l.default.isInitedAw(), l.default.getConfigInfo("downloadDetectTools", "autoDetect")) {
                        let e = new Date, t = u.TimeHelperNS.formatDate(e, "yyyy-MM-dd");
                        t !== d.ConfigNS.getValue("downloadDetectTools", "autoDetectDate", "") && (d.ConfigNS.setValue("downloadDetectTools", "autoDetectDate", t), o.DownloadDetectToolsNS.start("auto"))
                    }
                }), 3e4), e
            })
        }, e.uninit = function () {
            return n(this, void 0, void 0, function* () {
                let e = !1;
                do {
                    if (t < 0) break;
                    yield c.XLStatNS.asyncUninit(t), e = !0
                } while (0);
                return e
            })
        }
    }(t.DownloadDetectHelperNS || (t.DownloadDetectHelperNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(0), r = i(7), s = i(95), l = i(966), d = i(967), u = i(5).promisify, c = i(47), h = i(3),
        f = i(9), p = i(8), g = r.default(o.join(__rootDir, "../bin/ThunderHelper.node")),
        m = a.default.getLogger("download-detect-tools");
    !function (e) {
        let t, a, r, v, y, T;
        !function (e) {
            e[e.AF_INET = 2] = "AF_INET", e[e.AF_INET6 = 23] = "AF_INET6"
        }(t = e.AfType || (e.AfType = {})), function (e) {
            e[e.IF_TYPE_SOFTWARE_LOOPBACK = 24] = "IF_TYPE_SOFTWARE_LOOPBACK"
        }(a = e.IfType || (e.IfType = {})), function (e) {
            e[e.IfOperStatusUp = 1] = "IfOperStatusUp", e[e.IfOperStatusDown = 2] = "IfOperStatusDown", e[e.IfOperStatusTesting = 3] = "IfOperStatusTesting", e[e.IfOperStatusUnknown = 4] = "IfOperStatusUnknown", e[e.IfOperStatusDormant = 5] = "IfOperStatusDormant", e[e.IfOperStatusNotPresent = 6] = "IfOperStatusNotPresent", e[e.IfOperStatusLowerLayerDown = 7] = "IfOperStatusLowerLayerDown"
        }(r = e.IfOperStatus || (e.IfOperStatus = {})), function (e) {
            e[e.None = 0] = "None", e[e.Started = 1] = "Started", e[e.Success = 2] = "Success", e[e.Failed = 3] = "Failed"
        }(v = e.DetectState || (e.DetectState = {})), function (e) {
            e[e.IndexServer = 0] = "IndexServer", e[e.BTIndexServer = 1] = "BTIndexServer", e[e.EMuleIndexServer = 2] = "EMuleIndexServer", e[e.MirrorSource = 3] = "MirrorSource", e[e.TorrentServer = 4] = "TorrentServer", e[e.P2PServer = 5] = "P2PServer", e[e.PingServer = 6] = "PingServer", e[e.NATServer = 7] = "NATServer", e[e.AccountLogin = 8] = "AccountLogin", e[e.VipDownload = 9] = "VipDownload", e[e.UPNPState = 10] = "UPNPState", e[e.DHTState = 11] = "DHTState", e[e.IPv6Support = 12] = "IPv6Support", e[e.HostsTamper = 13] = "HostsTamper"
        }(y = e.DetectItemType || (e.DetectItemType = {})), function (e) {
            e.Start = "Start", e.StartItem = "StartItem", e.StatusChange = "StatusChange", e.FinishItem = "FinishItem", e.Finish = "Finish"
        }(T = e.DetectEvent || (e.DetectEvent = {}));
        const w = new class extends c.default {
            constructor() {
                super(), this.detectingItems = null, this.localIPInfo = null, this.currentDetectingIndex = void 0, this.adapterInfos = null, this.statCookie = -1, this.detectingItems = [{
                    type: y.IndexServer,
                    name: "普通任务信息",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷下载“HTTP、FTP”协议的下载链接时，需要查询下载链接对应的文件信息。\n          如果此项失败，您将无法加速下载“HTTP、FTP”协议的下载链接。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectIndexServer.bind(this)
                }, {
                    type: y.BTIndexServer,
                    name: "BT任务信息",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷下载BT任务时，需要查询BT任务对应的文件信息。\n          如果此项失败，您将无法加速下载BT任务。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectBTIndexServer.bind(this)
                }, {
                    type: y.TorrentServer,
                    name: "磁力任务信息",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷下载磁力链接时，需要查询磁力链接对应的BT种子信息。\n          如果此项失败，您将无法下载磁力链接。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectTorrentServer.bind(this)
                }, {
                    type: y.EMuleIndexServer,
                    name: "eMule任务信息",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷下载“ed2k”协议的下载链接时，需要查询下载链接对应的文件信息。\n          如果此项失败，您将无法加速下载eMule任务。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectEMuleIndexServer.bind(this)
                }, {
                    type: y.MirrorSource,
                    name: "主机镜像资源服务",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷下载任意任务时，需要通过该服务查询主机镜像资源。\n          如果此项失败，您下载任意任务时，都无法获得主机镜像资源加速。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectMirrorSource.bind(this)
                }, {
                    type: y.P2PServer,
                    name: "节点镜像资源服务",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷下载任意任务时，需要通过该服务查询节点镜像资源。\n          如果此项失败，您下载任意任务时，都无法获得节点镜像资源加速。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectP2PServer.bind(this)
                }, {
                    type: y.PingServer,
                    name: "连通检测服务",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷下载任意任务时，需要通过该服务检测各个镜像资源的连通性，从而提升镜像资源连通率，理论上可以更快获得加速效果。\n          如果此项失败，您下载任意任务时，下载加速效果提升较为缓慢。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectPingServer.bind(this)
                }, {
                    type: y.NATServer,
                    name: "网络感知服务",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷下载任意任务时，需要通过该服务感知您与节点镜像资源之间的网络连接结构，从而提升节点镜像资源连通率，理论上可以获得更快的下载速度。\n          如果此项失败，您下载任意任务时，下载加速效果较差。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectNATServer.bind(this)
                }, {
                    type: y.AccountLogin,
                    name: "帐号登录服务",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷登录帐号时，需要通过该服务获取您的帐号信息。\n          如果此项失败，您将无法登录迅雷帐号。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectAccountLogin.bind(this)
                }, {
                    type: y.VipDownload,
                    name: "会员加速服务",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷会员加速下载任意任务时，需要通过该服务查询会员加速资源，从而获得会员加速效果。\n          如果此项失败，您下载任意任务时，都无法获得会员加速效果。\n          通常该问题与您的网络环境有关，您可以联系客服协助您解决问题。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectVipDownload.bind(this)
                }, {
                    type: y.UPNPState,
                    name: "UPnP状态",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "迅雷能够利用路由器的UPnP功能进行端口映射，从而提升镜像资源的连通率，理论上可以获得更快的下载速度。\n          如果您没有使用路由器，这项失败可以忽略。\n          如果您使用路由器，并且此项失败，请您登录路由器的管理页面，开启“UPnP”功能。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectUPNPState.bind(this)
                }, {
                    type: y.DHTState,
                    name: "DHT状态",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "使用迅雷下载BT任务时，需要通过DHT网络获取更多镜像资源，理论上可以获得更快的下载速度。\n          如果此项失败，您下载BT任务时，下载加速效果可能略受影响。\n          但是如果“BT任务信息、节点镜像资源服务”正常，则该失败可以忽略。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectDHTState.bind(this)
                }, {
                    type: y.IPv6Support,
                    name: "IPv6支持",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "迅雷现已支持IPv6互联网协议，通过该协议迅雷可以更快速可靠的连接镜像资源，从而提升镜像资源连通率，理论上可以获得更快的下载速度。\n          如果此项失败，可能是由于您的路由器或网络运营商暂未支持IPv6互联网协议，不过该项失败并不会影响您的正常下载。",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectIPv6Support.bind(this)
                }, {
                    type: y.HostsTamper,
                    name: "Hosts文件",
                    state: v.None,
                    detectDesc: "正在扫描...",
                    detail: "被篡改的Hosts文件可能会将迅雷相关域名指向错误的IP地址，从而造成“下载失败、下载缓慢、无法加速、登录失败”等严重问题。如果此项失败，您可以联系客服协助您解决问题",
                    expand: !1,
                    showExpand: !1,
                    detect: this.detectHostsTamper.bind(this)
                }]
            }

            dnsLookupAW(e) {
                return n(this, void 0, void 0, function* () {
                    let t = null;
                    const i = u(l.lookup);
                    try {
                        t = yield i(e, 4)
                    } catch (t) {
                        m.warning("dnsLookup IPv4 failed! hostName", e, "e", t)
                    }
                    return t
                })
            }

            tcpConnectAW(e, t, i = 4) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(o => n(this, void 0, void 0, function* () {
                        let n = new s.Socket;
                        try {
                            n.on("connect", () => {
                                o(!0), n.end()
                            }), n.on("error", i => {
                                m.warning("tcpConnectAW error! host", e, "port", t, i), o(!1), n.end()
                            }), n.on("timeout", () => {
                                m.warning("tcpConnectAW timeout! host", e, "port", t), o(!1), n.end()
                            }), n.connect({port: t, host: e, family: i})
                        } catch (i) {
                            m.warning("tcpConnect failed! host", e, "port", t, i), o(!1)
                        }
                    }))
                })
            }

            detectTcpConnect(e, t, i = 80) {
                return n(this, void 0, void 0, function* () {
                    let n = !1;
                    do {
                        this.setDetectDesc((-1 !== e.name.indexOf("服务") ? "开始连接" : "开始查询") + e.name);
                        let o = yield this.dnsLookupAW(t);
                        if (!o) {
                            this.setDetectDesc("域名解析失败", "域名解析失败");
                            break
                        }
                        this.setDetectDesc("域名解析成功");
                        let a = (new Date).getTime();
                        if (yield this.tcpConnectAW(o.address, i)) {
                            let t = (new Date).getTime() - a;
                            this.setDetectDesc(e.name + (-1 !== e.name.indexOf("服务") ? "连接" : "查询") + "成功（耗时：" + t + "毫秒）"), n = !0
                        } else this.setDetectDesc(e.name + (-1 !== e.name.indexOf("服务") ? "连接" : "查询") + "失败", "tcp连接失败（" + o.address + ":" + i + "）")
                    } while (0);
                    return n
                })
            }

            setDetectDesc(e, t) {
                if (void 0 !== this.currentDetectingIndex) {
                    let i = this.detectingItems[this.currentDetectingIndex];
                    i.detectDesc = e, i.statResult = t, this.fireEvent(T.StatusChange, i, e)
                }
            }

            detectIndexServer(e) {
                return n(this, void 0, void 0, function* () {
                    return this.detectTcpConnect(e, "hub5idx.v6.shub.sandai.net")
                })
            }

            detectBTIndexServer(e) {
                return n(this, void 0, void 0, function* () {
                    return this.detectTcpConnect(e, "hub5btmain.v6.shub.sandai.net")
                })
            }

            detectEMuleIndexServer(e) {
                return n(this, void 0, void 0, function* () {
                    return this.detectTcpConnect(e, "hub5emu.v6.shub.sandai.net")
                })
            }

            detectTorrentServer(e) {
                return n(this, void 0, void 0, function* () {
                    return this.detectTcpConnect(e, "pool.v6.bt.n0808.com")
                })
            }

            detectP2PServer(e) {
                return n(this, void 0, void 0, function* () {
                    return this.detectTcpConnect(e, "hub5pr.sandai.net")
                })
            }

            detectPingServer(e) {
                return n(this, void 0, void 0, function* () {
                    let t = !1, i = "hub5u.sandai.net";
                    this.setDetectDesc("开始连接" + e.name);
                    let n = (new Date).getTime(), o = yield d.promise.probe(i);
                    if (o && o.alive) {
                        let i = (new Date).getTime() - n;
                        this.setDetectDesc(e.name + "连接成功（耗时：" + i + "毫秒）"), t = !0
                    } else m.information("ping failed! host:", i, ", result:", o), this.setDetectDesc(e.name + "连接失败", "ping失败（" + i + "）");
                    return t
                })
            }

            detectDCDNServer(e) {
                return n(this, void 0, void 0, function* () {
                    let e = !1;
                    do {
                        this.setDetectDesc("开始连接会员加速服务");
                        let t = yield this.dnsLookupAW("dcdnhub.xfs.xcloud.sandai.net");
                        if (!t) {
                            this.setDetectDesc("域名解析失败", "dcdnhub.xfs.xcloud.sandai.net域名解析失败");
                            break
                        }
                        this.setDetectDesc("域名解析成功");
                        let i = (new Date).getTime();
                        if (yield this.tcpConnectAW(t.address, 80)) {
                            let t = (new Date).getTime() - i;
                            this.setDetectDesc("会员加速服务连接成功（耗时：" + t + "毫秒）"), e = !0
                        } else this.setDetectDesc("会员加速服务连接失败", "tcp连接失败（" + t.address + ":80）")
                    } while (0);
                    return e
                })
            }

            detectVipAuthServer(e) {
                return n(this, void 0, void 0, function* () {
                    let e = !1;
                    do {
                        this.setDetectDesc("开始连接会员加速验证服务");
                        let t = yield this.dnsLookupAW("ali.pc-x.speed.auth.vip.xunlei.com");
                        if (!t) {
                            this.setDetectDesc("域名解析失败", "ali.pc-x.speed.auth.vip.xunlei.com域名解析失败");
                            break
                        }
                        this.setDetectDesc("域名解析成功");
                        let i = (new Date).getTime();
                        if (yield this.tcpConnectAW(t.address, 80)) {
                            let t = (new Date).getTime() - i;
                            this.setDetectDesc("会员加速验证服务连接成功（耗时：" + t + "毫秒）"), e = !0
                        } else this.setDetectDesc("会员加速验证服务连接失败", "tcp连接失败（" + t.address + ":80）")
                    } while (0);
                    return e
                })
            }

            detectMirrorSource(e) {
                return n(this, void 0, void 0, function* () {
                    return this.detectTcpConnect(e, "hub5sr.v6.shub.sandai.net")
                })
            }

            detectNATServer(e) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(t => n(this, void 0, void 0, function* () {
                        let i = !1;
                        {
                            const t = ["hub5pn.sandai.net", "g1.hub5pn.sandai.net", "g2.hub5pn.sandai.net", "g3.hub5pn.sandai.net"];
                            let n = "";
                            for (let o = 0; o < t.length; ++o) {
                                let a = t[o];
                                this.setDetectDesc("开始连接" + e.name + "【" + (o + 1) + "】");
                                let r = (new Date).getTime(), s = yield d.promise.probe(a);
                                if (s && s.alive) {
                                    let t = (new Date).getTime() - r;
                                    this.setDetectDesc(e.name + "连接成功（耗时：" + t + "毫秒）"), i = !0;
                                    break
                                }
                                m.warning("detectNATServer ping failed! host:", a, ", result", s), n.length > 0 && (n += ","), n += "ping失败（" + a + "）", this.setDetectDesc(e.name + "连接失败", n)
                            }
                        }
                        t(i)
                    }))
                })
            }

            detectAccountLogin(e) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(t => n(this, void 0, void 0, function* () {
                        this.setDetectDesc("开始帐号登录服务");
                        let n = (new Date).getTime();
                        const o = yield i(18);
                        o.defaults.adapter = i(21);
                        let a = e.statResult || "";
                        try {
                            let e = yield o.request({
                                method: "options",
                                url: "https://xluser-ssl.xunlei.com/xluser.core.login",
                                params: {}
                            });
                            if (204 === e.status) {
                                let e = (new Date).getTime() - n;
                                this.setDetectDesc("连接帐号登录服务成功（耗时：" + e + "毫秒）"), t(!0)
                            } else a.length > 0 && (a += ","), a += "options请求失败（" + e.status + "）", this.setDetectDesc("连接帐号登录服务失败（" + e.status + "）", a), t(!1)
                        } catch (e) {
                            m.information("detectAccountLogin exception! e", e), a.length > 0 && (a += ","), a += "options请求失败，" + (e || ""), this.setDetectDesc("连接帐号登录服务失败", a), t(!1)
                        }
                    }))
                })
            }

            detectVipDownload(e) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(t => n(this, void 0, void 0, function* () {
                        let i = !1;
                        do {
                            if (!(yield this.detectVipAuthServer(e))) break;
                            if (!(yield this.detectDCDNServer(e))) break;
                            i = !0
                        } while (0);
                        t(i)
                    }))
                })
            }

            detectUPNPState(e) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => n(this, void 0, void 0, function* () {
                        this.setDetectDesc("开始检测UPnP状态");
                        let t = yield h.client.callServerFunction("QueryGlobalInfo"), i = t && t.isUPnPReady > 0;
                        this.setDetectDesc("UPnP状态" + (i ? "可用" : "不可用")), e(i)
                    }))
                })
            }

            detectDHTState(e) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => n(this, void 0, void 0, function* () {
                        this.setDetectDesc("开始检测DHT状态");
                        let t = yield h.client.callServerFunction("QueryGlobalInfo"), i = t && t.dhtNodeCount > 0;
                        this.setDetectDesc("DHT状态" + (i ? "可用" : "不可用")), e(i)
                    }))
                })
            }

            detectIPv6Support(e) {
                return n(this, void 0, void 0, function* () {
                    return new Promise(e => {
                        this.setDetectDesc("开始检测IPv6支持"), g.getNetAdapterInfo(i => n(this, void 0, void 0, function* () {
                            m.information("adapterInfos", i), this.adapterInfos = i;
                            let n = !1;
                            for (let e = 0; e < i.length; ++e) {
                                let o = i[e];
                                if (o.type !== a.IF_TYPE_SOFTWARE_LOOPBACK && o.operStatus === r.IfOperStatusUp) {
                                    for (let e = 0; e < o.ipAddresses.length; ++e) if (o.ipAddresses[e].family === t.AF_INET6) {
                                        n = !0;
                                        break
                                    }
                                    if (n) break
                                }
                            }
                            if (n) {
                                let e = null;
                                const t = u(l.lookup);
                                let i = "hub5idx.v6.shub.sandai.net";
                                try {
                                    e = yield t(i, 6)
                                } catch (e) {
                                    m.warning("dnsLookup IPv6 failed! hostName", i, "e", e)
                                }
                                n = !!e && (yield this.tcpConnectAW(e.address, 80, 6))
                            }
                            this.setDetectDesc(n ? "机器和网络环境已支持IPv6" : "机器或网络环境不支持IPv6"), e(n)
                        }))
                    })
                })
            }

            detectHostsTamper(e) {
                return n(this, void 0, void 0, function* () {
                    let e = !0;
                    do {
                        this.setDetectDesc("开始检测Hosts文件");
                        let t = g.getSystemDirectory(), i = o.join(t, "drivers\\etc\\hosts"),
                            n = yield p.FileSystemAWNS.readLineAw(i);
                        if (!n || 0 === n.length) break;
                        for (let t of n) {
                            if (0 === (t = t.trim()).indexOf("#")) continue;
                            let i = t.split(" ");
                            if (1 === i.length) continue;
                            let n = 0;
                            try {
                                n = s.isIP(i[0])
                            } catch (e) {
                                n = 0
                            }
                            if (0 !== n) {
                                for (let t = 1; t < i.length; t++) {
                                    let n = i[t];
                                    if (n && (n.endsWith(".xunlei.com") || n.endsWith(".sandai.net"))) {
                                        e = !1;
                                        break
                                    }
                                }
                                if (!e) break
                            }
                        }
                    } while (0);
                    return this.setDetectDesc(e ? "查询Hosts文件正常" : "检测到Hosts文件被篡改"), e
                })
            }

            sendFinishStat(e, t) {
                return n(this, void 0, void 0, function* () {
                    let n = "result=" + encodeURIComponent(e);
                    n += ",wrong_cnt=" + t, n += ",ip=" + (this.localIPInfo && this.localIPInfo.localIP ? this.localIPInfo.localIP : ""), n += ",windows_version=" + (yield Promise.resolve().then(() => i(55))).release();
                    let a = o.join(__rootDir, "../bin/SDK/DownloadSDK.dll");
                    n += ",download_engine_version=" + g.getFileVersion(a), n += ",dns=" + this.getDNSList().join("|"), f.XLStatNS.trackEvent("xlx_download_diagnosis", "download_diagnosis_result", "", 0, 0, 0, 0, n, this.statCookie)
                })
            }

            getLocalIPInfoAW() {
                return n(this, void 0, void 0, function* () {
                    if (this.localIPInfo) return this.localIPInfo;
                    const e = yield i(18);
                    e.defaults.adapter = i(21);
                    try {
                        let t = yield e.request({
                            method: "post",
                            url: "https://tool.lu/ip/ajax.html",
                            params: {},
                            headers: {}
                        });
                        200 === t.status && t.data && t.data.text && (this.localIPInfo = {
                            teleCommunications: t.data.text.ip2region_location,
                            localIP: t.data.text.ip
                        })
                    } catch (e) {
                        m.warning("request https://tool.lu/ip/ajax.html failed! e", e)
                    }
                    return this.localIPInfo
                })
            }

            start(e) {
                return n(this, void 0, void 0, function* () {
                    let t = "", i = 0;
                    this.statCookie = yield h.client.callServerFunction("GetDetectStatCookie"), h.client.broadcastEvent("DownloadDetectStart", e), this.fireEvent(T.Start);
                    let n = v.Success;
                    for (let e = 0; e < this.detectingItems.length; ++e) {
                        let o = this.detectingItems[e];
                        this.currentDetectingIndex = e, o.state = v.Started, this.fireEvent(T.StartItem, o, e), (yield o.detect(o)) ? o.state = v.Success : (o.state = v.Failed, n = v.Failed, t += o.name + "," + (o.statResult || "") + "|", i++), this.fireEvent(T.FinishItem, o, e, o.state)
                    }
                    yield this.getLocalIPInfoAW(), this.fireEvent(T.Finish, n), this.sendFinishStat(t, i).catch()
                })
            }

            getAllDectectItems() {
                return this.detectingItems
            }

            getDNSList() {
                let e = [];
                if (this.adapterInfos) {
                    let t = {};
                    for (let e = 0; e < this.adapterInfos.length; ++e) {
                        let i = this.adapterInfos[e];
                        i.type !== a.IF_TYPE_SOFTWARE_LOOPBACK && i.operStatus === r.IfOperStatusUp && i.dnsAddresses.forEach(e => {
                            t[e] = !0
                        })
                    }
                    e = Object.keys(t)
                }
                return e
            }

            restart(e) {
                return n(this, void 0, void 0, function* () {
                    for (let e = 0; e < this.detectingItems.length; ++e) {
                        let t = this.detectingItems[e];
                        t.state = v.None, t.detectDesc = "正在扫描…"
                    }
                    return this.currentDetectingIndex = 0, this.start(e)
                })
            }
        };
        e.getLocalIPInfo = function () {
            return n(this, void 0, void 0, function* () {
                return w.getLocalIPInfoAW()
            })
        }, e.start = function (e) {
            w.start(e).catch()
        }, e.restart = function (e) {
            w.restart(e).catch()
        }, e.getAllDectectItems = function () {
            return w.getAllDectectItems()
        }, e.getDNSList = function () {
            return w.getDNSList()
        }, e.attachListener = function (e, t) {
            w.attachListener(e, t)
        }, e.detachListener = function (e, t) {
            w.detachListener(e, t)
        }
    }(t.DownloadDetectToolsNS || (t.DownloadDetectToolsNS = {}))
}, function (e, t) {
    e.exports = require("dns")
}, function (e, t, i) {
    var n = {};
    n.sys = i(968), n.promise = i(578), e.exports = n
}, function (e, t, i) {
    "use strict";
    var n = i(578);
    t.probe = function (e, t, i) {
        var o = i || {};
        return n.probe(e, o).then(function (e) {
            t(e.alive, null)
        }).catch(function (e) {
            t(null, e)
        }).done()
    }
}, function (e, t, i) {
    /*!
 *
 * Copyright 2009-2017 Kris Kowal under the terms of the MIT
 * license found at https://github.com/kriskowal/q/blob/v1/LICENSE
 *
 * With parts by Tyler Close
 * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found
 * at http://www.opensource.org/licenses/mit-license.html
 * Forked at ref_send.js version: 2009-05-11
 *
 * With parts by Mark Miller
 * Copyright (C) 2011 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
    !function (t) {
        "use strict";
        "function" == typeof bootstrap ? bootstrap("promise", t) : e.exports = t()
    }(function () {
        "use strict";
        var e = !1;
        try {
            throw new Error
        } catch (t) {
            e = !!t.stack
        }
        var t, i = k(), n = function () {
        }, o = function () {
            var e = {task: void 0, next: null}, t = e, i = !1, n = void 0, a = !1, r = [];

            function s() {
                for (var t, n; e.next;) t = (e = e.next).task, e.task = void 0, (n = e.domain) && (e.domain = void 0, n.enter()), l(t, n);
                for (; r.length;) l(t = r.pop());
                i = !1
            }

            function l(e, t) {
                try {
                    e()
                } catch (e) {
                    if (a) throw t && t.exit(), setTimeout(s, 0), t && t.enter(), e;
                    setTimeout(function () {
                        throw e
                    }, 0)
                }
                t && t.exit()
            }

            if (o = function (e) {
                t = t.next = {task: e, domain: a && process.domain, next: null}, i || (i = !0, n())
            }, "object" == typeof process && "[object process]" === process.toString() && process.nextTick) a = !0, n = function () {
                process.nextTick(s)
            }; else if ("function" == typeof setImmediate) n = "undefined" != typeof window ? setImmediate.bind(window, s) : function () {
                setImmediate(s)
            }; else if ("undefined" != typeof MessageChannel) {
                var d = new MessageChannel;
                d.port1.onmessage = function () {
                    n = u, d.port1.onmessage = s, s()
                };
                var u = function () {
                    d.port2.postMessage(0)
                };
                n = function () {
                    setTimeout(s, 0), u()
                }
            } else n = function () {
                setTimeout(s, 0)
            };
            return o.runAfter = function (e) {
                r.push(e), i || (i = !0, n())
            }, o
        }(), a = Function.call;

        function r(e) {
            return function () {
                return a.apply(e, arguments)
            }
        }

        var s, l = r(Array.prototype.slice), d = r(Array.prototype.reduce || function (e, t) {
            var i = 0, n = this.length;
            if (1 === arguments.length) for (; ;) {
                if (i in this) {
                    t = this[i++];
                    break
                }
                if (++i >= n) throw new TypeError
            }
            for (; i < n; i++) i in this && (t = e(t, this[i], i));
            return t
        }), u = r(Array.prototype.indexOf || function (e) {
            for (var t = 0; t < this.length; t++) if (this[t] === e) return t;
            return -1
        }), c = r(Array.prototype.map || function (e, t) {
            var i = this, n = [];
            return d(i, function (o, a, r) {
                n.push(e.call(t, a, r, i))
            }, void 0), n
        }), h = Object.create || function (e) {
            function t() {
            }

            return t.prototype = e, new t
        }, f = Object.defineProperty || function (e, t, i) {
            return e[t] = i.value, e
        }, p = r(Object.prototype.hasOwnProperty), g = Object.keys || function (e) {
            var t = [];
            for (var i in e) p(e, i) && t.push(i);
            return t
        }, m = r(Object.prototype.toString);
        s = "undefined" != typeof ReturnValue ? ReturnValue : function (e) {
            this.value = e
        };
        var v = "From previous event:";

        function y(t, i) {
            if (e && i.stack && "object" == typeof t && null !== t && t.stack) {
                for (var n = [], o = i; o; o = o.source) o.stack && (!t.__minimumStackCounter__ || t.__minimumStackCounter__ > o.stackCounter) && (f(t, "__minimumStackCounter__", {
                    value: o.stackCounter,
                    configurable: !0
                }), n.unshift(o.stack));
                n.unshift(t.stack);
                var a = function (e) {
                    for (var t = e.split("\n"), i = [], n = 0; n < t.length; ++n) {
                        var o = t[n];
                        !w(o) && (-1 === (a = o).indexOf("(module.js:") && -1 === a.indexOf("(node.js:")) && o && i.push(o)
                    }
                    var a;
                    return i.join("\n")
                }(n.join("\n" + v + "\n"));
                f(t, "stack", {value: a, configurable: !0})
            }
        }

        function T(e) {
            var t = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(e);
            if (t) return [t[1], Number(t[2])];
            var i = /at ([^ ]+):(\d+):(?:\d+)$/.exec(e);
            if (i) return [i[1], Number(i[2])];
            var n = /.*@(.+):(\d+)$/.exec(e);
            return n ? [n[1], Number(n[2])] : void 0
        }

        function w(e) {
            var n = T(e);
            if (!n) return !1;
            var o = n[0], a = n[1];
            return o === t && a >= i && a <= X
        }

        function k() {
            if (e) try {
                throw new Error
            } catch (e) {
                var i = e.stack.split("\n"), n = T(i[0].indexOf("@") > 0 ? i[1] : i[2]);
                if (!n) return;
                return t = n[0], n[1]
            }
        }

        function C(e) {
            return e instanceof D ? e : E(e) ? (t = e, i = I(), C.nextTick(function () {
                try {
                    t.then(i.resolve, i.reject, i.notify)
                } catch (e) {
                    i.reject(e)
                }
            }), i.promise) : K(e);
            var t, i
        }

        C.resolve = C, C.nextTick = o, C.longStackSupport = !1;
        var b = 1;

        function I() {
            var t, i = [], n = [], o = h(I.prototype), a = h(D.prototype);
            if (a.promiseDispatch = function (e, o, a) {
                var r = l(arguments);
                i ? (i.push(r), "when" === o && a[1] && n.push(a[1])) : C.nextTick(function () {
                    t.promiseDispatch.apply(t, r)
                })
            }, a.valueOf = function () {
                if (i) return a;
                var e = N(t);
                return x(e) && (t = e), e
            }, a.inspect = function () {
                return t ? t.inspect() : {state: "pending"}
            }, C.longStackSupport && e) try {
                throw new Error
            } catch (e) {
                a.stack = e.stack.substring(e.stack.indexOf("\n") + 1), a.stackCounter = b++
            }

            function r(o) {
                t = o, C.longStackSupport && e && (a.source = o), d(i, function (e, t) {
                    C.nextTick(function () {
                        o.promiseDispatch.apply(o, t)
                    })
                }, void 0), i = void 0, n = void 0
            }

            return o.promise = a, o.resolve = function (e) {
                t || r(C(e))
            }, o.fulfill = function (e) {
                t || r(K(e))
            }, o.reject = function (e) {
                t || r(V(e))
            }, o.notify = function (e) {
                t || d(n, function (t, i) {
                    C.nextTick(function () {
                        i(e)
                    })
                }, void 0)
            }, o
        }

        function S(e) {
            if ("function" != typeof e) throw new TypeError("resolver must be a function.");
            var t = I();
            try {
                e(t.resolve, t.reject, t.notify)
            } catch (e) {
                t.reject(e)
            }
            return t.promise
        }

        function _(e) {
            return S(function (t, i) {
                for (var n = 0, o = e.length; n < o; n++) C(e[n]).then(t, i)
            })
        }

        function D(e, t, i) {
            void 0 === t && (t = function (e) {
                return V(new Error("Promise does not support operation: " + e))
            }), void 0 === i && (i = function () {
                return {state: "unknown"}
            });
            var n = h(D.prototype);
            if (n.promiseDispatch = function (i, o, a) {
                var r;
                try {
                    r = e[o] ? e[o].apply(n, a) : t.call(n, o, a)
                } catch (e) {
                    r = V(e)
                }
                i && i(r)
            }, n.inspect = i, i) {
                var o = i();
                "rejected" === o.state && (n.exception = o.reason), n.valueOf = function () {
                    var e = i();
                    return "pending" === e.state || "rejected" === e.state ? n : e.value
                }
            }
            return n
        }

        function A(e, t, i, n) {
            return C(e).then(t, i, n)
        }

        function N(e) {
            if (x(e)) {
                var t = e.inspect();
                if ("fulfilled" === t.state) return t.value
            }
            return e
        }

        function x(e) {
            return e instanceof D
        }

        function E(e) {
            return (t = e) === Object(t) && "function" == typeof e.then;
            var t
        }

        "object" == typeof process && process && process.env && process.env.Q_DEBUG && (C.longStackSupport = !0), C.defer = I, I.prototype.makeNodeResolver = function () {
            var e = this;
            return function (t, i) {
                t ? e.reject(t) : arguments.length > 2 ? e.resolve(l(arguments, 1)) : e.resolve(i)
            }
        }, C.Promise = S, C.promise = S, S.race = _, S.all = j, S.reject = V, S.resolve = C, C.passByCopy = function (e) {
            return e
        }, D.prototype.passByCopy = function () {
            return this
        }, C.join = function (e, t) {
            return C(e).join(t)
        }, D.prototype.join = function (e) {
            return C([this, e]).spread(function (e, t) {
                if (e === t) return e;
                throw new Error("Q can't join: not the same: " + e + " " + t)
            })
        }, C.race = _, D.prototype.race = function () {
            return this.then(C.race)
        }, C.makePromise = D, D.prototype.toString = function () {
            return "[object Promise]"
        }, D.prototype.then = function (e, t, i) {
            var n = this, o = I(), a = !1;
            return C.nextTick(function () {
                n.promiseDispatch(function (t) {
                    a || (a = !0, o.resolve(function (t) {
                        try {
                            return "function" == typeof e ? e(t) : t
                        } catch (e) {
                            return V(e)
                        }
                    }(t)))
                }, "when", [function (e) {
                    a || (a = !0, o.resolve(function (e) {
                        if ("function" == typeof t) {
                            y(e, n);
                            try {
                                return t(e)
                            } catch (e) {
                                return V(e)
                            }
                        }
                        return V(e)
                    }(e)))
                }])
            }), n.promiseDispatch(void 0, "when", [void 0, function (e) {
                var t, n = !1;
                try {
                    t = function (e) {
                        return "function" == typeof i ? i(e) : e
                    }(e)
                } catch (e) {
                    if (n = !0, !C.onerror) throw e;
                    C.onerror(e)
                }
                n || o.notify(t)
            }]), o.promise
        }, C.tap = function (e, t) {
            return C(e).tap(t)
        }, D.prototype.tap = function (e) {
            return e = C(e), this.then(function (t) {
                return e.fcall(t).thenResolve(t)
            })
        }, C.when = A, D.prototype.thenResolve = function (e) {
            return this.then(function () {
                return e
            })
        }, C.thenResolve = function (e, t) {
            return C(e).thenResolve(t)
        }, D.prototype.thenReject = function (e) {
            return this.then(function () {
                throw e
            })
        }, C.thenReject = function (e, t) {
            return C(e).thenReject(t)
        }, C.nearer = N, C.isPromise = x, C.isPromiseAlike = E, C.isPending = function (e) {
            return x(e) && "pending" === e.inspect().state
        }, D.prototype.isPending = function () {
            return "pending" === this.inspect().state
        }, C.isFulfilled = function (e) {
            return !x(e) || "fulfilled" === e.inspect().state
        }, D.prototype.isFulfilled = function () {
            return "fulfilled" === this.inspect().state
        }, C.isRejected = function (e) {
            return x(e) && "rejected" === e.inspect().state
        }, D.prototype.isRejected = function () {
            return "rejected" === this.inspect().state
        };
        var O, P, M, F = [], L = [], R = [], B = !0;

        function U() {
            F.length = 0, L.length = 0, B || (B = !0)
        }

        function V(e) {
            var t = D({
                when: function (t) {
                    return t && function (e) {
                        if (B) {
                            var t = u(L, e);
                            -1 !== t && ("object" == typeof process && "function" == typeof process.emit && C.nextTick.runAfter(function () {
                                var i = u(R, e);
                                -1 !== i && (process.emit("rejectionHandled", F[t], e), R.splice(i, 1))
                            }), L.splice(t, 1), F.splice(t, 1))
                        }
                    }(this), t ? t(e) : this
                }
            }, function () {
                return this
            }, function () {
                return {state: "rejected", reason: e}
            });
            return function (e, t) {
                B && ("object" == typeof process && "function" == typeof process.emit && C.nextTick.runAfter(function () {
                    -1 !== u(L, e) && (process.emit("unhandledRejection", t, e), R.push(e))
                }), L.push(e), t && void 0 !== t.stack ? F.push(t.stack) : F.push("(no stack) " + t))
            }(t, e), t
        }

        function K(e) {
            return D({
                when: function () {
                    return e
                }, get: function (t) {
                    return e[t]
                }, set: function (t, i) {
                    e[t] = i
                }, delete: function (t) {
                    delete e[t]
                }, post: function (t, i) {
                    return null === t || void 0 === t ? e.apply(void 0, i) : e[t].apply(e, i)
                }, apply: function (t, i) {
                    return e.apply(t, i)
                }, keys: function () {
                    return g(e)
                }
            }, void 0, function () {
                return {state: "fulfilled", value: e}
            })
        }

        function G(e, t, i) {
            return C(e).spread(t, i)
        }

        function W(e, t, i) {
            return C(e).dispatch(t, i)
        }

        function j(e) {
            return A(e, function (e) {
                var t = 0, i = I();
                return d(e, function (n, o, a) {
                    var r;
                    x(o) && "fulfilled" === (r = o.inspect()).state ? e[a] = r.value : (++t, A(o, function (n) {
                        e[a] = n, 0 == --t && i.resolve(e)
                    }, i.reject, function (e) {
                        i.notify({index: a, value: e})
                    }))
                }, void 0), 0 === t && i.resolve(e), i.promise
            })
        }

        function H(e) {
            if (0 === e.length) return C.resolve();
            var t = C.defer(), i = 0;
            return d(e, function (n, o, a) {
                var r = e[a];
                i++, A(r, function (e) {
                    t.resolve(e)
                }, function (e) {
                    if (0 == --i) {
                        var n = e || new Error("" + e);
                        n.message = "Q can't get fulfillment value from any promise, all promises were rejected. Last error message: " + n.message, t.reject(n)
                    }
                }, function (e) {
                    t.notify({index: a, value: e})
                })
            }, void 0), t.promise
        }

        function z(e) {
            return A(e, function (e) {
                return e = c(e, C), A(j(c(e, function (e) {
                    return A(e, n, n)
                })), function () {
                    return e
                })
            })
        }

        C.resetUnhandledRejections = U, C.getUnhandledReasons = function () {
            return F.slice()
        }, C.stopUnhandledRejectionTracking = function () {
            U(), B = !1
        }, U(), C.reject = V, C.fulfill = K, C.master = function (e) {
            return D({
                isDef: function () {
                }
            }, function (t, i) {
                return W(e, t, i)
            }, function () {
                return C(e).inspect()
            })
        }, C.spread = G, D.prototype.spread = function (e, t) {
            return this.all().then(function (t) {
                return e.apply(void 0, t)
            }, t)
        }, C.async = function (e) {
            return function () {
                function t(e, t) {
                    var a;
                    if ("undefined" == typeof StopIteration) {
                        try {
                            a = i[e](t)
                        } catch (e) {
                            return V(e)
                        }
                        return a.done ? C(a.value) : A(a.value, n, o)
                    }
                    try {
                        a = i[e](t)
                    } catch (e) {
                        return function (e) {
                            return "[object StopIteration]" === m(e) || e instanceof s
                        }(e) ? C(e.value) : V(e)
                    }
                    return A(a, n, o)
                }

                var i = e.apply(this, arguments), n = t.bind(t, "next"), o = t.bind(t, "throw");
                return n()
            }
        }, C.spawn = function (e) {
            C.done(C.async(e)())
        }, C.return = function (e) {
            throw new s(e)
        }, C.promised = function (e) {
            return function () {
                return G([this, j(arguments)], function (t, i) {
                    return e.apply(t, i)
                })
            }
        }, C.dispatch = W, D.prototype.dispatch = function (e, t) {
            var i = this, n = I();
            return C.nextTick(function () {
                i.promiseDispatch(n.resolve, e, t)
            }), n.promise
        }, C.get = function (e, t) {
            return C(e).dispatch("get", [t])
        }, D.prototype.get = function (e) {
            return this.dispatch("get", [e])
        }, C.set = function (e, t, i) {
            return C(e).dispatch("set", [t, i])
        }, D.prototype.set = function (e, t) {
            return this.dispatch("set", [e, t])
        }, C.del = C.delete = function (e, t) {
            return C(e).dispatch("delete", [t])
        }, D.prototype.del = D.prototype.delete = function (e) {
            return this.dispatch("delete", [e])
        }, C.mapply = C.post = function (e, t, i) {
            return C(e).dispatch("post", [t, i])
        }, D.prototype.mapply = D.prototype.post = function (e, t) {
            return this.dispatch("post", [e, t])
        }, C.send = C.mcall = C.invoke = function (e, t) {
            return C(e).dispatch("post", [t, l(arguments, 2)])
        }, D.prototype.send = D.prototype.mcall = D.prototype.invoke = function (e) {
            return this.dispatch("post", [e, l(arguments, 1)])
        }, C.fapply = function (e, t) {
            return C(e).dispatch("apply", [void 0, t])
        }, D.prototype.fapply = function (e) {
            return this.dispatch("apply", [void 0, e])
        }, C.try = C.fcall = function (e) {
            return C(e).dispatch("apply", [void 0, l(arguments, 1)])
        }, D.prototype.fcall = function () {
            return this.dispatch("apply", [void 0, l(arguments)])
        }, C.fbind = function (e) {
            var t = C(e), i = l(arguments, 1);
            return function () {
                return t.dispatch("apply", [this, i.concat(l(arguments))])
            }
        }, D.prototype.fbind = function () {
            var e = this, t = l(arguments);
            return function () {
                return e.dispatch("apply", [this, t.concat(l(arguments))])
            }
        }, C.keys = function (e) {
            return C(e).dispatch("keys", [])
        }, D.prototype.keys = function () {
            return this.dispatch("keys", [])
        }, C.all = j, D.prototype.all = function () {
            return j(this)
        }, C.any = H, D.prototype.any = function () {
            return H(this)
        }, C.allResolved = (O = z, P = "allResolved", M = "allSettled", function () {
            return "undefined" != typeof console && "function" == typeof console.warn && console.warn(P + " is deprecated, use " + M + " instead.", new Error("").stack), O.apply(O, arguments)
        }), D.prototype.allResolved = function () {
            return z(this)
        }, C.allSettled = function (e) {
            return C(e).allSettled()
        }, D.prototype.allSettled = function () {
            return this.then(function (e) {
                return j(c(e, function (e) {
                    function t() {
                        return e.inspect()
                    }

                    return (e = C(e)).then(t, t)
                }))
            })
        }, C.fail = C.catch = function (e, t) {
            return C(e).then(void 0, t)
        }, D.prototype.fail = D.prototype.catch = function (e) {
            return this.then(void 0, e)
        }, C.progress = function (e, t) {
            return C(e).then(void 0, void 0, t)
        }, D.prototype.progress = function (e) {
            return this.then(void 0, void 0, e)
        }, C.fin = C.finally = function (e, t) {
            return C(e).finally(t)
        }, D.prototype.fin = D.prototype.finally = function (e) {
            if (!e || "function" != typeof e.apply) throw new Error("Q can't apply finally callback");
            return e = C(e), this.then(function (t) {
                return e.fcall().then(function () {
                    return t
                })
            }, function (t) {
                return e.fcall().then(function () {
                    throw t
                })
            })
        }, C.done = function (e, t, i, n) {
            return C(e).done(t, i, n)
        }, D.prototype.done = function (e, t, i) {
            var n = function (e) {
                C.nextTick(function () {
                    if (y(e, o), !C.onerror) throw e;
                    C.onerror(e)
                })
            }, o = e || t || i ? this.then(e, t, i) : this;
            "object" == typeof process && process && process.domain && (n = process.domain.bind(n)), o.then(void 0, n)
        }, C.timeout = function (e, t, i) {
            return C(e).timeout(t, i)
        }, D.prototype.timeout = function (e, t) {
            var i = I(), n = setTimeout(function () {
                t && "string" != typeof t || ((t = new Error(t || "Timed out after " + e + " ms")).code = "ETIMEDOUT"), i.reject(t)
            }, e);
            return this.then(function (e) {
                clearTimeout(n), i.resolve(e)
            }, function (e) {
                clearTimeout(n), i.reject(e)
            }, i.notify), i.promise
        }, C.delay = function (e, t) {
            return void 0 === t && (t = e, e = void 0), C(e).delay(t)
        }, D.prototype.delay = function (e) {
            return this.then(function (t) {
                var i = I();
                return setTimeout(function () {
                    i.resolve(t)
                }, e), i.promise
            })
        }, C.nfapply = function (e, t) {
            return C(e).nfapply(t)
        }, D.prototype.nfapply = function (e) {
            var t = I(), i = l(e);
            return i.push(t.makeNodeResolver()), this.fapply(i).fail(t.reject), t.promise
        }, C.nfcall = function (e) {
            var t = l(arguments, 1);
            return C(e).nfapply(t)
        }, D.prototype.nfcall = function () {
            var e = l(arguments), t = I();
            return e.push(t.makeNodeResolver()), this.fapply(e).fail(t.reject), t.promise
        }, C.nfbind = C.denodeify = function (e) {
            if (void 0 === e) throw new Error("Q can't wrap an undefined function");
            var t = l(arguments, 1);
            return function () {
                var i = t.concat(l(arguments)), n = I();
                return i.push(n.makeNodeResolver()), C(e).fapply(i).fail(n.reject), n.promise
            }
        }, D.prototype.nfbind = D.prototype.denodeify = function () {
            var e = l(arguments);
            return e.unshift(this), C.denodeify.apply(void 0, e)
        }, C.nbind = function (e, t) {
            var i = l(arguments, 2);
            return function () {
                var n = i.concat(l(arguments)), o = I();
                return n.push(o.makeNodeResolver()), C(function () {
                    return e.apply(t, arguments)
                }).fapply(n).fail(o.reject), o.promise
            }
        }, D.prototype.nbind = function () {
            var e = l(arguments, 0);
            return e.unshift(this), C.nbind.apply(void 0, e)
        }, C.nmapply = C.npost = function (e, t, i) {
            return C(e).npost(t, i)
        }, D.prototype.nmapply = D.prototype.npost = function (e, t) {
            var i = l(t || []), n = I();
            return i.push(n.makeNodeResolver()), this.dispatch("post", [e, i]).fail(n.reject), n.promise
        }, C.nsend = C.nmcall = C.ninvoke = function (e, t) {
            var i = l(arguments, 2), n = I();
            return i.push(n.makeNodeResolver()), C(e).dispatch("post", [t, i]).fail(n.reject), n.promise
        }, D.prototype.nsend = D.prototype.nmcall = D.prototype.ninvoke = function (e) {
            var t = l(arguments, 1), i = I();
            return t.push(i.makeNodeResolver()), this.dispatch("post", [e, t]).fail(i.reject), i.promise
        }, C.nodeify = function (e, t) {
            return C(e).nodeify(t)
        }, D.prototype.nodeify = function (e) {
            if (!e) return this;
            this.then(function (t) {
                C.nextTick(function () {
                    e(null, t)
                })
            }, function (t) {
                C.nextTick(function () {
                    e(t)
                })
            })
        }, C.noConflict = function () {
            throw new Error("Q.noConflict only works when Q is used as a global")
        };
        var X = k();
        return C
    })
}, function (e, t) {
    e.exports = function (e) {
        return e.webpackPolyfill || (e.deprecate = function () {
        }, e.paths = [], e.children || (e.children = []), Object.defineProperty(e, "loaded", {
            enumerable: !0,
            get: function () {
                return e.l
            }
        }), Object.defineProperty(e, "id", {
            enumerable: !0, get: function () {
                return e.i
            }
        }), e.webpackPolyfill = 1), e
    }
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = {}, a = {numeric: !0, timeout: 2, min_reply: 1, extra: []};
    o.getResult = function (e, t) {
        var i = t || {}, o = [];
        return ["numeric", "timeout", "min_reply", "extra"].forEach(function (e) {
            "boolean" != typeof i[e] && (i[e] = i[e] || a[e])
        }), i.numeric && o.push("-n"), i.timeout && (o = o.concat(["-w", n.format("%d", i.timeout)])), i.min_reply && (o = o.concat(["-c", n.format("%d", i.min_reply)])), i.extra && (o = o.concat(i.extra)), o.push(e), o
    }, e.exports = o
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = {}, a = {numeric: !0, timeout: 2, min_reply: 1, extra: []};
    o.getResult = function (e, t) {
        var i = t || {}, o = [];
        return ["numeric", "timeout", "min_reply", "extra"].forEach(function (e) {
            "boolean" != typeof i[e] && (i[e] = i[e] || a[e])
        }), i.numeric && o.push("-n"), i.timeout && (o = o.concat(["-t", n.format("%d", i.timeout)])), i.min_reply && (o = o.concat(["-c", n.format("%d", i.min_reply)])), i.extra && (o = o.concat(i.extra)), o.push(e), o
    }, e.exports = o
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = {}, a = {numeric: !0, timeout: 5, min_reply: 1, extra: []};
    o.getResult = function (e, t) {
        var i = t || {}, o = [];
        return ["numeric", "timeout", "min_reply", "extra"].forEach(function (e) {
            "boolean" != typeof i[e] && (i[e] = i[e] || a[e])
        }), i.numeric || o.push("-a"), i.timeout && (o = o.concat(["-w", n.format("%d", 1e3 * i.timeout)])), i.min_reply && (o = o.concat(["-n", n.format("%d", i.min_reply)])), i.extra && (o = o.concat(i.extra)), o.push(e), o
    }, e.exports = o
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(579), a = i(975), r = i(580), s = i(976);

    function l() {
    }

    l.createParser = function (e) {
        if (!o.isPlatformSupport(e)) throw new Error(n.format("Platform |%s| is not support", e));
        var t = null;
        return o.isWindow(e) ? t = new a : o.isMacOS(e) ? t = new r : o.isLinux(e) && (t = new s), t
    }, e.exports = l
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(120), a = i(417);

    function r() {
        a.call(this), this._ipv4Regex = /^([0-9]{1,3}\.){3}[0-9]{1,3}$/
    }

    n.inherits(r, a), r.prototype._processHeader = function (e) {
        var t = e.split(" ");
        this._response.host = t[1], this._ipv4Regex.test(this._response.host) ? this._response.numeric_host = t[1] : this._response.numeric_host = t[2].slice(1, -1), this._changeState(this.STATES.BODY)
    }, r.prototype._processBody = function (e) {
        var t = e.split(" "), i = o.filter(t, function (e) {
            return e.indexOf("=") >= 0 || e.indexOf("<") >= 0
        });
        if (i.length >= 3) {
            var n = o.find(i, function (e) {
                return e.indexOf("ms") >= 0
            }), a = /([0-9\.]+)/.exec(n);
            this._times.push(parseFloat(a[1], 10))
        }
        ":" === e.slice(-1) && this._changeState(this.STATES.FOOTER)
    }, r.prototype._processFooter = function (e) {
        if (e.indexOf("ms") >= 0) {
            var t = /([0-9\.]+)/g, i = t.exec(e), n = t.exec(e), a = t.exec(e);
            o.all([i, n, a]) && (this._response.min = parseFloat(i[1], 10), this._response.max = parseFloat(n[1], 10), this._response.avg = parseFloat(a[1], 10), this._changeState(this.STATES.END))
        }
    }, e.exports = r
}, function (e, t, i) {
    "use strict";
    var n = i(5), o = i(417), a = i(580);

    function r() {
        o.call(this)
    }

    n.inherits(r, o), r.prototype._processHeader = function (e) {
        var t = e.split(" ");
        this._response.host = t[1], this._response.numeric_host = t[2].slice(1, -1), this._changeState(this.STATES.BODY)
    }, r.prototype._processBody = function (e) {
        a.prototype._processBody.call(this, e)
    }, r.prototype._processFooter = function (e) {
        a.prototype._processFooter.call(this, e)
    }, e.exports = r
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(2), o = i(0), a = i(4), r = i(16), s = i(7).default(n.join(__rootDir, "../bin/ThunderHelper.node")),
        l = o.default.getLogger("Thunder.TaskP2spAutoRename"), d = r.DownloadKernelEventManager.getEventManager();
    !function (e) {
        let t = void 0, i = void 0;

        function o(e, t) {
            do {
                if (!e) break;
                if (e.getType() !== a.DownloadKernel.TaskType.P2sp) break;
                if (0 == (t & (a.DownloadKernel.TaskDetailChangedFlags.OriginName | a.DownloadKernel.TaskDetailChangedFlags.HTTPContentType))) break;
                let i = "";
                0 != (t & a.DownloadKernel.TaskDetailChangedFlags.HTTPContentType) && (i = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.HTTPContentType), l.information("httpContentType:", i));
                let o = "", r = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.TaskName), d = !1;
                if (1 !== e.getExtraObject().getNameFixed()) {
                    if (0 != (t & a.DownloadKernel.TaskDetailChangedFlags.OriginName)) {
                        let t = e.getTaskAttribute(a.DownloadKernel.TaskAttribute.OriginName);
                        l.information("originName:", t), t && "" !== t && (o = t, n.extname(o) || (d = !0))
                    }
                } else if (l.information("p2spTask name fixed!", e.getId()), i && "" !== i) {
                    let e = n.extname(r);
                    (!e || "" === e || e.length > 5) && (o = r, d = !0)
                }
                if (d && i && "" !== i && "" !== o) {
                    let e = n.parse(o).name;
                    if (e && "" !== e) {
                        let t = "HKEY_CLASSES_ROOT", n = "MIME\\Database\\Content Type\\" + i, a = "Extension",
                            r = s.readRegString(t, n, a);
                        r && "" !== r && (o = e + r)
                    }
                }
                "" !== o && o !== r && (l.information("task rename:", o, ", old name:", r), e.reName(o).catch())
            } while (0)
        }

        function r(e, t) {
            e.forEach(e => {
                o(e, t)
            })
        }

        e.init = function () {
            do {
                if (void 0 !== t && void 0 !== i) break;
                t = d.attachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, (...e) => {
                    e && e[0] === a.DownloadKernel.TaskEventType.DetailChanged && r(e[1], e[2])
                }), i = d.attachTaskEvent(a.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, (...e) => {
                    e && e[0] === a.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged && e[1].forEach((e, t) => {
                        e.forEach(e => {
                            o(e, e.getDetailChangedFlags())
                        })
                    })
                })
            } while (0)
        }, e.uninit = function () {
            do {
                if (void 0 !== t && void 0 !== i) break;
                d.detachTaskEvent(a.DownloadKernel.TaskEventType.DetailChanged, t), t = void 0, d.detachTaskEvent(a.DownloadKernel.TaskEventType.GroupTaskSubFileDetailChanged, i), i = void 0
            } while (0)
        }
    }(t.TaskP2spAutoRenameNS || (t.TaskP2spAutoRenameNS = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(0), o = i(5), a = i(15), r = i(408), s = n.default.getLogger("ScheduleTaskPluginFunction");
    !function (e) {
        const t = new class {
            constructor() {
                this.isRegister = !1
            }

            registerPluginFunction() {
                if (!this.isRegister) {
                    this.isRegister = !0;
                    let e = {
                        GetDownloadCompleteTaskType: this.getDownloadCompleteTaskType,
                        SetDownloadCompleteTaskType: this.setDownloadCompleteTaskType,
                        CancelDownloadCompleteTask: this.cancelDownloadCompleteTask
                    };
                    a.server.registerFunctions(e)
                }
            }

            getDownloadCompleteTaskType(e, t, ...i) {
                let n = r.ScheduleCompleteTaskType.UnKnown;
                do {
                    if (!e) break;
                    n = r.ScheduleTaskNS.getDownloadCompleteTaskType()
                } while (0);
                return n
            }

            setDownloadCompleteTaskType(e, t, ...i) {
                let n = !1;
                do {
                    if (!e) break;
                    if (!i || !o.isNumber(i[0])) break;
                    s.information("setDownloadCompleteTaskType:", i[0]), r.ScheduleTaskNS.setDownloadCompleteTaskType(i[0]), n = !0
                } while (0);
                return n
            }

            cancelDownloadCompleteTask(e, t, ...i) {
                let n = !1;
                do {
                    if (!e) break;
                    s.information("cancelDownloadCompleteTask"), r.ScheduleTaskNS.cancelDownloadCompleteTask(), n = !0
                } while (0);
                return n
            }
        };
        e.registerPluginFunction = function () {
            t.registerPluginFunction()
        }
    }(t.ScheduleTaskPluginFunctionNS || (t.ScheduleTaskPluginFunctionNS = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0});
    const o = i(2), a = i(15), r = i(0), s = i(11), l = i(4), d = i(70), u = i(3), c = i(61), h = i(8), f = i(14),
        p = i(10), g = i(25), m = i(34), v = i(16), y = i(69), T = i(39), w = i(980), k = i(32), C = i(83), b = i(981),
        I = C.TabEventManagerNS.getEventEmitter(), S = v.DownloadKernelEventManager.getEventManager(),
        _ = s.DownloadKernelTaskManager.getTaskManager(), D = r.default.getLogger("ThunderMain-client-process");
    t.clientProduct = new class {
        constructor() {
            this.panRationInfo = {
                fileId: "",
                infos: []
            }, this.onOpenSuccCookie = 0, this.taskStateChangeCookid = 0, this.isRegister = !1, this.playingId = "", this.playSoure = d.XmpPlaySoure.PLAY_UNKNOWN, this.panTasks = new Map, this.selectTaskId = "", this.selectTab = ""
        }

        init() {
            return n(this, void 0, void 0, function* () {
                this.isRegister || (this.isRegister = !0, a.server.registerFunctions({
                    GetRationInfos: this.getRationInfos.bind(this),
                    YunPlay: this.yunPlay.bind(this),
                    SelectTaskChange: this.selectTaskChange.bind(this),
                    SetPlayingTaskId: this.setPlayingTaskId.bind(this),
                    UpdatePanEmbedRect: this.updatePanEmbedRect.bind(this),
                    UpdateDownloadEmbedRect: this.updateDownloadEmbedRect.bind(this),
                    SetXmpCurrentMode: this.setXmpCurrentMode.bind(this),
                    ClosePlay: this.closePlay.bind(this),
                    ThunderResize: this.thunderResize.bind(this),
                    SetSelectPanFileId: this.setSelectPanFileId.bind(this),
                    BackUpEmbedAndSelectPlayingTask: this.backUpEmbedAndSelectPlayingTask.bind(this),
                    GetPlayingTaskId: this.getPlayingTaskId.bind(this),
                    GetPlayingSoure: this.getPlayingSoure.bind(this),
                    CreateYunPlayTask: this.createYunPlayTask.bind(this),
                    GetThunderSelectTaskId: this.getThunderSelectTaskId.bind(this),
                    GetThunderSelectTab: this.getThunderSelectTab.bind(this),
                    SetShowStateByScroll: this.setShowStateByScroll.bind(this),
                    SetTaskVideoByteRatio: this.setTaskVideoByteRatio.bind(this)
                }), u.client.attachServerEvent("OnCurNavChange", (e, t, i) => n(this, void 0, void 0, function* () {
                    D.information("cqm OnCurNavChange currentPanel", t), yield this.callXmpMainRenderer("SetSelectPanel", t)
                })), u.client.attachServerEvent("OnLogout", () => n(this, void 0, void 0, function* () {
                    yield this.callXmpMainRenderer("OnUserLogout")
                })), u.client.attachServerEvent("OnSelectTabChange", (e, t, i) => n(this, void 0, void 0, function* () {
                    this.selectTab = t, yield this.callXmpMainRenderer("SetSelectTab", t)
                })), u.client.attachServerEvent("OnXmpClose", e => n(this, void 0, void 0, function* () {
                    this.playSoure = d.XmpPlaySoure.PLAY_UNKNOWN, this.playingId = ""
                })), u.client.attachServerEvent("OnStop", (e, t, i, o, a) => n(this, void 0, void 0, function* () {
                    if (this.panTasks && a) {
                        let e = this.panTasks.get(a);
                        D.information("value", e, "panFileId", "panTasks", this.panTasks), _.stopTask(e, l.DownloadKernel.TaskStopReason.Unknown), this.panTasks.delete(a)
                    }
                })), I.on(C.TabEventManagerNS.EventType.CreateNewTab, () => n(this, void 0, void 0, function* () {
                    (yield this.callXmpMainRenderer("GetXmpCurrentMode")) === y.XmpMode.EMBED_MODE && (yield this.callXmpMainRenderer("GetIsFullScreen")) && this.callXmpMainRenderer("LeaveFullScreen").catch()
                })))
            })
        }

        yunPlay(e, t, i) {
            return n(this, void 0, void 0, function* () {
                let e = {ret: !1, errcode: 0};
                do {
                    if (!i || !i.playUrl || !i.fileName) break;
                    let t = "";
                    if (D.information("yunPlay xmpInfo.medias", i.medias), i.taskUrl = i.taskUrl ? i.taskUrl : "", i.cid = i.cid ? i.cid : "", i.gcid = i.gcid ? i.gcid : "", i.taskId = i.taskId ? i.taskId : -1, i.fileSize = i.fileSize ? i.fileSize : 0, i.fileDir = i.fileDir ? i.fileDir : "", i.fileIndex = i.fileIndex ? i.fileIndex : 0, i.dlnaPlay = void 0 !== i.dlnaPlay && i.dlnaPlay, i.playPosPercent = i.playPosPercent ? i.playPosPercent : 0, i.startPos = i.startPos ? i.startPos : 0, i.taskType = i.taskType ? i.taskType : 0, i.fromweb = void 0 === i.fromweb || i.fromweb, i.openFrom = i.openFrom ? i.openFrom : "xunlei11", i.panFileId = i.panFileId ? i.panFileId : null, i.isEmbed = void 0 === i.isEmbed || i.isEmbed, i.playSoure = d.XmpPlaySoure.PLAY_BY_PAN, i.medias && i.medias.length > 0) {
                        let e = [];
                        for (let n of i.medias) {
                            let o = {};
                            o.ratioId = n.media_id, o.rationName = n.media_name, o.iconLink = n.icon_link, o.isOrigin = n.is_origin, o.isDefault = n.is_default, o.isVisible = n.is_visible, o.priority = n.priority, o.name = n.resolution_name, o.need_more_quota = n.need_more_quota, o.redirect_link = n.redirect_link, n.link && (o.url = n.link.url, o.expire = n.link.expire, o.token = n.link.token), n.is_default && (i.playUrl = n.link.url, t = n.link.token), e.push(o)
                        }
                        this.panRationInfo.fileId = i.panFileId, this.panRationInfo.infos = e
                    }
                    e = yield m.TaskOperatorNs.playVideoByXmp(i), u.client.detachServerEvent("OnOpenSucceededCreateTask", this.onOpenSuccCookie), this.onOpenSuccCookie = u.client.attachServerEvent("OnOpenSucceededCreateTask", (e, o, a, r) => n(this, void 0, void 0, function* () {
                        i.panFileId && a === i.panFileId && (yield this.createTask(i.playUrl, i.fileName, i.panFileId, t, r), u.client.detachServerEvent("OnOpenSucceededCreateTask", this.onOpenSuccCookie), this.onOpenSuccCookie = 0)
                    }))
                } while (0);
                return e
            })
        }

        createTask(e, t, i, r, s) {
            return n(this, void 0, void 0, function* () {
                let s = g.default.getConfigInfo("xmpDoubleUrl", "close");
                if (D.information("createTask close", s), s) return D.information("xmpDoubleUrl close"), !1;
                this.taskStateChangeCookid && (S.detachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, this.taskStateChangeCookid), this.taskStateChangeCookid = 0);
                let d = yield f.ThunderUtil.getThunderTempPath(!0), u = "",
                    c = p.ConfigNS.getValue("ThunderPanPlugin", "useDefault", !1);
                if (D.information("userDefault", c), c) u = p.ConfigNS.getValue("ThunderPanPlugin", "defaultDownloadPath", "C:\\迅雷下载"); else {
                    let e = p.ConfigNS.getValue("ThunderPanPlugin", "downloadPaths", []);
                    e && e.length > 0 && (u = e[0])
                }
                let m = "";
                m = u && "" !== u ? o.join(u, "云盘缓存") : o.join(d, "云盘下载", "云盘缓存"), (yield h.FileSystemAWNS.existsAW(m)) || (yield h.FileSystemAWNS.mkdirAW(m)), D.information("dirPath", m);
                let v = {taskBaseInfo: {taskName: t, savePath: m, productInfo: "", origin: ""}, isBackground: !0},
                    y = {url: e, nameFixed: 1};
                v.p2spTaskInfo = y;
                let T = _.findTask(e);
                yield _.deleteTask(T, !0);
                let k = yield _.createTask(l.DownloadKernel.TaskType.P2sp, v);
                if (!k) return !1;
                if (T = k.getId(), D.information("createTask taskId", T), r) k.enableDcdnWithVipCert(r); else {
                    let e = yield a.server.callClientFunctionByName("ThunderPanPluginWebview", "IpcGetFiles", [i]);
                    if (e && e[0] && e[0].files && e[0].files[0] && e[0].files[0].links && e[0].files[0].links && e[0].files[0].links["application/octet-stream"]) {
                        let t = e[0].files[0].links["application/octet-stream"].token;
                        k.enableDcdnWithVipCert(t)
                    }
                }
                D.information("token", r);
                let C = !1;
                k.setDownloadStrategy(l.DownloadKernel.XLDownloadStrategy.XL_TASKDOWNLOAD_STRATEGY_ONLINEPLAYING), C = yield _.startTask(T), this.setPanTask(i, T);
                let b = "";
                return this.taskStateChangeCookid = S.attachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, (...e) => n(this, void 0, void 0, function* () {
                    do {
                        if (!e) break;
                        if (e[0] !== l.DownloadKernel.TaskEventType.StatusChanged) break;
                        let t = e[1];
                        if (!t || t.length < 1) break;
                        for (let e = 0; e < t.length; ++e) if (t[e].getTaskAttribute(l.DownloadKernel.TaskAttribute.TaskId) === T && t[e].getTaskStatus() === l.DownloadKernel.TaskStatus.Started) {
                            S.detachTaskEvent(l.DownloadKernel.TaskEventType.StatusChanged, this.taskStateChangeCookid), this.taskStateChangeCookid = 0, b = yield k.getPlayUrl(-1), yield this.callXmpMainRenderer("XmpPlayerSetConfig", w.APlayerConfigId.CONFIGID_NETWORK__STUFFURL, b), yield this.callXmpMainRenderer("XmpPlayerRecordStat", "setYunDownloadId", T), D.information("OnSetAplayerConfig taskId", T, "ret", C, "playUrl", b);
                            break
                        }
                    } while (0)
                })), C
            })
        }

        selectTaskChange(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                this.selectTaskId = i, yield this.callXmpMainRenderer("SetSelectTaskId", i, o)
            })
        }

        setPlayingTaskId(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                D.information("setPlayingTaskId", i, o), this.playingId = i, this.playSoure = o, o === d.XmpPlaySoure.PLAY_BY_DOWNLOAD ? yield this.callXmpMainRenderer("SetPlayingTaskId", i, o) : yield this.callXmpMainRenderer("SetPlayingPanFileId", i, o)
            })
        }

        updateDownloadEmbedRect(e, t, i) {
            return n(this, void 0, void 0, function* () {
                i.width = Math.max(i.width, 532 / b.FixTextScale.getTextScale() / b.FixTextScale.getTextScale()), i.height = Math.max(i.height, 296), i.x = Math.floor(i.x * b.FixTextScale.getTextScale()), i.y = Math.floor(i.y * b.FixTextScale.getTextScale()), i.width = Math.floor(i.width * b.FixTextScale.getTextScale()), i.height = Math.floor(i.height * b.FixTextScale.getTextScale()), yield this.callXmpMainRenderer("UpdateDownloadEmbedRect", i), yield this.callXmpMainProcess("UpdateDownloadEmbedRect", i)
            })
        }

        updatePanEmbedRect(e, t, i) {
            return n(this, void 0, void 0, function* () {
                i.x = Math.floor(i.x * b.FixTextScale.getTextScale()), i.y = Math.floor(i.y * b.FixTextScale.getTextScale()), i.width = Math.floor(i.width * b.FixTextScale.getTextScale()), i.height = Math.floor(i.height * b.FixTextScale.getTextScale()), yield this.callXmpMainRenderer("UpdatePanEmbedRect", i), yield this.callXmpMainProcess("UpdatePanEmbedRect", i)
            })
        }

        setXmpCurrentMode(e, t, i) {
            return n(this, void 0, void 0, function* () {
                yield this.callXmpMainRenderer("SetXmpCurrentMode", i)
            })
        }

        closePlay(e, t, i) {
            return n(this, void 0, void 0, function* () {
                yield this.callXmpMainRenderer("XmpPlayerClose", i)
            })
        }

        callXmpMainProcess(e, ...t) {
            return n(this, void 0, void 0, function* () {
                let i = yield u.client.callRemoteClientFunction(c.mainProcessContext, e, ...t).catch();
                return i && i.length > 0 ? i[0] : {}
            })
        }

        callXmpMainRenderer(e, ...t) {
            return n(this, void 0, void 0, function* () {
                let i = yield u.client.callRemoteClientFunction(c.mainRendererContext, e, ...t).catch();
                return i && i.length > 0 ? i[0] : {}
            })
        }

        quitDeletePanTmpXmpDownloadFile() {
            return n(this, void 0, void 0, function* () {
                for (let e of this.panTasks.values()) yield _.deleteTask(e, !0);
                return !0
            })
        }

        thunderResize(e, t) {
            return n(this, void 0, void 0, function* () {
                yield a.server.callClientFunctionByName(c.mainProcessContext, "ThunderResize")
            })
        }

        setSelectPanFileId(e, t, i, o) {
            return n(this, void 0, void 0, function* () {
                this.selectTaskId = i, yield this.callXmpMainRenderer("SetSelectPanFileId", i, o)
            })
        }

        setPanTask(e, t) {
            this.panTasks.set(e, t)
        }

        backUpEmbedAndSelectPlayingTask(e, t, i, o, r) {
            return n(this, void 0, void 0, function* () {
                r === d.XmpPlaySoure.PLAY_BY_PAN ? a.server.callClientFunctionByName("ThunderPanPluginWebview", "ShowFileDetail", {
                    fileId: o,
                    redirect: !0
                }).catch() : yield T.ThunderNewTask.selectTask(Number(i))
            })
        }

        getPlayingTaskId(e, t, ...i) {
            return this.playingId
        }

        getPlayingSoure(e, t, ...i) {
            return this.playSoure
        }

        createYunPlayTask(e, t, ...i) {
            return n(this, void 0, void 0, function* () {
                let e = i[0], t = i[1], n = i[2], o = i[3], a = i[4], r = i[5];
                if (a) {
                    let t = _.findTask(e);
                    D.information("createYunPlayTask deleteTask taskId", t, "preUrl", a), yield _.deleteTask(t, !0)
                }
                yield this.createTask(e, t, n, o, r)
            })
        }

        getRationInfos(e, t, ...i) {
            return n(this, void 0, void 0, function* () {
                return i && i[0] === this.panRationInfo.fileId ? this.panRationInfo.infos : []
            })
        }

        getThunderSelectTaskId(e, t, ...i) {
            return this.selectTaskId
        }

        getThunderSelectTab(e, t, ...i) {
            return this.selectTab
        }

        setShowStateByScroll(e, t, i) {
            return n(this, void 0, void 0, function* () {
                yield this.callXmpMainRenderer("SetCanShowStateByScroll", i)
            })
        }

        setTaskVideoByteRatio(e, t, i, o, a, r) {
            return n(this, void 0, void 0, function* () {
                i || (i = this.panTasks.get(r));
                let e = _.getTaskFromTaskId(i);
                if (!e) return;
                let t = e.getVirtualTaskId();
                o = o || -1, D.information("taskId", i, "bytesPerSecond", a, "virtualTaskId", t), k.ThunderKernel.updateTaskVideoByteRatio(t, -1, a)
            })
        }
    }
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e[e.CONFIGID_APLAYERINFO = 1] = "CONFIGID_APLAYERINFO", e[e.CONFIGID_CODECSPATH = 2] = "CONFIGID_CODECSPATH", e[e.CONFIGID_CODECSDISABLELIST = 3] = "CONFIGID_CODECSDISABLELIST", e[e.CONFIGID_CURRENTURL = 4] = "CONFIGID_CURRENTURL", e[e.CONFIGID_FILESIZE = 5] = "CONFIGID_FILESIZE", e[e.CONFIGID_PLAYMODE = 6] = "CONFIGID_PLAYMODE", e[e.CONFIGID_PLAYRESULT = 7] = "CONFIGID_PLAYRESULT", e[e.CONFIGID_AUTOPLAY = 8] = "CONFIGID_AUTOPLAY", e[e.CONFIGID_USEOPENCHAIN = 9] = "CONFIGID_USEOPENCHAIN", e[e.CONFIGID_SOUNDDEVICELIST = 10] = "CONFIGID_SOUNDDEVICELIST", e[e.CONFIGID_SOUNDDEVICECURRENT = 11] = "CONFIGID_SOUNDDEVICECURRENT", e[e.CONFIGID_SOUNDSILENT = 12] = "CONFIGID_SOUNDSILENT", e[e.CONFIGID_SOUNDBALANCE = 13] = "CONFIGID_SOUNDBALANCE", e[e.CONFIGID_DISABLEVIDEO = 14] = "CONFIGID_DISABLEVIDEO", e[e.CONFIGID_DISABLEAUDIO = 15] = "CONFIGID_DISABLEAUDIO", e[e.CONFIGID_ENABLEVSFILTER = 16] = "CONFIGID_ENABLEVSFILTER", e[e.CONFIGID_ENABLEAUDIOSWITCHER = 17] = "CONFIGID_ENABLEAUDIOSWITCHER", e[e.CONFIGID_DOWNLOADCODECSYNC = 18] = "CONFIGID_DOWNLOADCODECSYNC", e[e.CONFIGID_DOWNLOADCODECCOMPLETED = 19] = "CONFIGID_DOWNLOADCODECCOMPLETED", e[e.CONFIGID_WINDOWHANDLE = 20] = "CONFIGID_WINDOWHANDLE", e[e.CONFIGID_WINDOWMOVED = 21] = "CONFIGID_WINDOWMOVED", e[e.CONFIGID_SETTINGEXPLAIN = 22] = "CONFIGID_SETTINGEXPLAIN", e[e.CONFIGID_SETTINGVALUES = 23] = "CONFIGID_SETTINGVALUES", e[e.CONFIGID_LOADPLUGIN = 24] = "CONFIGID_LOADPLUGIN", e[e.CONFIGID_FREEPLUGIN = 25] = "CONFIGID_FREEPLUGIN", e[e.CONFIGID_FLASHINTERACTION = 26] = "CONFIGID_FLASHINTERACTION", e[e.CONFIGID_INTELMEDIASDKDECODER = 27] = "CONFIGID_INTELMEDIASDKDECODER", e[e.CONFIGID_INTELMEDIASDKENCODER = 28] = "CONFIGID_INTELMEDIASDKENCODER", e[e.CONFIGID_READSIZE = 29] = "CONFIGID_READSIZE", e[e.CONFIGID_READOFFSET = 30] = "CONFIGID_READOFFSET", e[e.CONFIGID_READPOSITION = 31] = "CONFIGID_READPOSITION", e[e.CONFIGID_WRITEOFFSET = 32] = "CONFIGID_WRITEOFFSET", e[e.CONFIGID_ALLOWLOG = 33] = "CONFIGID_ALLOWLOG", e[e.CONFIGID_MEDIAINFO = 34] = "CONFIGID_MEDIAINFO", e[e.CONFIGID_PLUGINSTDCALL = 35] = "CONFIGID_PLUGINSTDCALL", e[e.CONFIGID_LOGOSETTINGS = 36] = "CONFIGID_LOGOSETTINGS", e[e.CONFIGID_LOGOFILE = 37] = "CONFIGID_LOGOFILE", e[e.CONFIGID_CUSTOMCURSOR = 38] = "CONFIGID_CUSTOMCURSOR", e[e.CONFIGID_APLAYERDNN = 43] = "CONFIGID_APLAYERDNN", e[e.CONFIGID_AUTOPLAY_AFTERBUFFER = 48] = "CONFIGID_AUTOPLAY_AFTERBUFFER", e[e.CONFIGID_TIMEISFRAME = 101] = "CONFIGID_TIMEISFRAME", e[e.CONFIGID_STARTPOSITION = 102] = "CONFIGID_STARTPOSITION", e[e.CONFIGID_STOPPOSITION = 103] = "CONFIGID_STOPPOSITION", e[e.CONFIGID_PLAYSPEED = 104] = "CONFIGID_PLAYSPEED", e[e.CONFIGID_KEYFRAMESEEK = 105] = "CONFIGID_KEYFRAMESEEK", e[e.CONFIGID_KEYFRAMECOUNT = 106] = "CONFIGID_KEYFRAMECOUNT", e[e.CONFIGID_KEYFRAMELIST = 107] = "CONFIGID_KEYFRAMELIST", e[e.CONFIGID_KEYFRAMECURRENT = 108] = "CONFIGID_KEYFRAMECURRENT", e[e.CONFIGID_CANFRAMESTEPFORWARDONE = 109] = "CONFIGID_CANFRAMESTEPFORWARDONE", e[e.CONFIGID_CANFRAMESTEPFORWARDMULTI = 110] = "CONFIGID_CANFRAMESTEPFORWARDMULTI", e[e.CONFIGID_CANFRAMESTEPBACKWORDKONE = 111] = "CONFIGID_CANFRAMESTEPBACKWORDKONE", e[e.CONFIGID_CANFRAMESTEPBACKWORDMULTI = 112] = "CONFIGID_CANFRAMESTEPBACKWORDMULTI", e[e.CONFIGID_FRAMESTEP = 113] = "CONFIGID_FRAMESTEP", e[e.CONFIGID_ISFRAMESTEPPING = 114] = "CONFIGID_ISFRAMESTEPPING", e[e.CONFIGID_READINDEXWHENOPEN = 115] = "CONFIGID_READINDEXWHENOPEN", e[e.CONFIGID_TIMEPOSITIONLIST = 116] = "CONFIGID_TIMEPOSITIONLIST", e[e.CONFIGID_FRAMEINTERVAL = 117] = "CONFIGID_FRAMEINTERVAL", e[e.CONFIGID_FRAMESDRAWN = 118] = "CONFIGID_FRAMESDRAWN", e[e.CONFIGID_LOOPPLAY = 119] = "CONFIGID_LOOPPLAY", e[e.CONFIGID_NOCLOSEWHENCOMPLETE = 120] = "CONFIGID_NOCLOSEWHENCOMPLETE", e[e.CONFIGID_MOUSEFRAMESEEK = 122] = "CONFIGID_MOUSEFRAMESEEK", e[e.CONFIGID_RENDERMODECONFIG = 201] = "CONFIGID_RENDERMODECONFIG", e[e.CONFIGID_RENDERMODECURRENT = 202] = "CONFIGID_RENDERMODECURRENT", e[e.CONFIGID_ASPECTRATIONATIVE = 203] = "CONFIGID_ASPECTRATIONATIVE", e[e.CONFIGID_ASPECTRATIOCUSTOM = 204] = "CONFIGID_ASPECTRATIOCUSTOM", e[e.CONFIGID_VIDEOSOURCEPOSITION = 205] = "CONFIGID_VIDEOSOURCEPOSITION", e[e.CONFIGID_VIDEOTARGETPOSITION = 206] = "CONFIGID_VIDEOTARGETPOSITION", e[e.CONFIGID_CLIPBLACKBANDENABLE = 207] = "CONFIGID_CLIPBLACKBANDENABLE", e[e.CONFIGID_CLIPBLACKBANDSTILL = 208] = "CONFIGID_CLIPBLACKBANDSTILL", e[e.CONFIGID_SPEEDUPENABLE = 209] = "CONFIGID_SPEEDUPENABLE", e[e.CONFIGID_SPEEDUPCUDAFIRST = 210] = "CONFIGID_SPEEDUPCUDAFIRST", e[e.CONFIGID_SPEEDUPSTATUS = 211] = "CONFIGID_SPEEDUPSTATUS", e[e.CONFIGID_SPEEDUPQUERY = 212] = "CONFIGID_SPEEDUPQUERY", e[e.CONFIGID_VIDEOADJUSTUSABLE = 213] = "CONFIGID_VIDEOADJUSTUSABLE", e[e.CONFIGID_BRIGHTNESS = 214] = "CONFIGID_BRIGHTNESS", e[e.CONFIGID_CONTRAST = 215] = "CONFIGID_CONTRAST", e[e.CONFIGID_SATURATION = 216] = "CONFIGID_SATURATION", e[e.CONFIGID_HUE = 217] = "CONFIGID_HUE", e[e.CONFIGID_COREAVCOUTPUTLEVEL = 218] = "CONFIGID_COREAVCOUTPUTLEVEL", e[e.CONFIGID_UNUSED = 219] = "CONFIGID_UNUSED", e[e.CONFIGID_VIDEOCODEC = 220] = "CONFIGID_VIDEOCODEC", e[e.CONFIGID_VIDEOOUTPUTFORMAT = 221] = "CONFIGID_VIDEOOUTPUTFORMAT", e[e.CONFIGID_CURRENTBLACKBANDINFO = 222] = "CONFIGID_CURRENTBLACKBANDINFO", e[e.CONFIGID_IMAGEPROCESSUSABLE = 301] = "CONFIGID_IMAGEPROCESSUSABLE", e[e.CONFIGID_IMAGEFLIPH = 302] = "CONFIGID_IMAGEFLIPH", e[e.CONFIGID_IMAGEFLIPV = 303] = "CONFIGID_IMAGEFLIPV", e[e.CONFIGID_IMAGEROTATE = 304] = "CONFIGID_IMAGEROTATE", e[e.CONFIGID_IMAGENORMALIZEENABLE = 305] = "CONFIGID_IMAGENORMALIZEENABLE", e[e.CONFIGID_IMAGENORMALIZECOMPARE = 306] = "CONFIGID_IMAGENORMALIZECOMPARE", e[e.CONFIGID_IMAGESHARPEN = 307] = "CONFIGID_IMAGESHARPEN", e[e.CONFIGID_IMAGECOLOR3DENABLE = 308] = "CONFIGID_IMAGECOLOR3DENABLE", e[e.CONFIGID_IMAGECOLOR3DOKAY = 309] = "CONFIGID_IMAGECOLOR3DOKAY", e[e.CONFIGID_IMAGECOLOR3DSHOW = 310] = "CONFIGID_IMAGECOLOR3DSHOW", e[e.CONFIGID_IMAGECOLOR3DMODE = 311] = "CONFIGID_IMAGECOLOR3DMODE", e[e.CONFIGID_IMAGECOLOR3DCOLOR = 312] = "CONFIGID_IMAGECOLOR3DCOLOR", e[e.CONFIGID_IMAGEUSEOPENCL = 313] = "CONFIGID_IMAGEUSEOPENCL", e[e.CONFIGID_IMAGEUSEAVX2 = 314] = "CONFIGID_IMAGEUSEAVX2", e[e.CONFIGID_IMAGEUSESSE2 = 315] = "CONFIGID_IMAGEUSESSE2", e[e.CONFIGID_AUIDOPROCESSUSABLE = 401] = "CONFIGID_AUIDOPROCESSUSABLE", e[e.CONFIGID_AUDIOTRACKLIST = 402] = "CONFIGID_AUDIOTRACKLIST", e[e.CONFIGID_AUDIOTRACKCURRENT = 403] = "CONFIGID_AUDIOTRACKCURRENT",e[e.CONFIGID_AUDIOCHANNEL = 404] = "CONFIGID_AUDIOCHANNEL",e[e.CONFIGID_AUDIOTIMESHIFT = 405] = "CONFIGID_AUDIOTIMESHIFT",e[e.CONFIGID_AUDIONORMALIZE = 406] = "CONFIGID_AUDIONORMALIZE",e[e.CONFIGID_AUDIOVSSENABLE = 407] = "CONFIGID_AUDIOVSSENABLE",e[e.CONFIGID_AUDIOVSSDEEP = 408] = "CONFIGID_AUDIOVSSDEEP",e[e.CONFIGID_AUDIOLOADTRACK = 409] = "CONFIGID_AUDIOLOADTRACK",e[e.CONFIGID_AUDIOCODEC = 410] = "CONFIGID_AUDIOCODEC",e[e.CONFIGID_AUDIOINPUTCHANNELS = 411] = "CONFIGID_AUDIOINPUTCHANNELS",e[e.CONFIGID_AUDIOINPUTSAMPLERATE = 412] = "CONFIGID_AUDIOINPUTSAMPLERATE",e[e.CONFIGID_AUDIOINPUTSAMPLEBIT = 413] = "CONFIGID_AUDIOINPUTSAMPLEBIT",e[e.CONFIGID_AUDIOOUTPUTFORMAT = 414] = "CONFIGID_AUDIOOUTPUTFORMAT",e[e.CONFIGID_AUDIOOUTPUTCHANNELS = 415] = "CONFIGID_AUDIOOUTPUTCHANNELS",e[e.CONFIGID_AUDIOOUTPUTSAMPLERATE = 416] = "CONFIGID_AUDIOOUTPUTSAMPLERATE",e[e.CONFIGID_AUDIOOUTPUTSAMPLEBIT = 417] = "CONFIGID_AUDIOOUTPUTSAMPLEBIT",e[e.CONFIGID_SUBTITLEUSABLE = 501] = "CONFIGID_SUBTITLEUSABLE",e[e.CONFIGID_SUBTITLEEXTNAMELIST = 502] = "CONFIGID_SUBTITLEEXTNAMELIST",e[e.CONFIGID_SUBTITLEFILENAME = 503] = "CONFIGID_SUBTITLEFILENAME",e[e.CONFIGID_SUBTITLESHOW = 504] = "CONFIGID_SUBTITLESHOW",e[e.CONFIGID_SUBTITLELANGUAGELIST = 505] = "CONFIGID_SUBTITLELANGUAGELIST",e[e.CONFIGID_SUBTITLELANGUAGECURRENT = 506] = "CONFIGID_SUBTITLELANGUAGECURRENT",e[e.CONFIGID_SUBTITLEPLACEMENT = 507] = "CONFIGID_SUBTITLEPLACEMENT",e[e.CONFIGID_SUBTITLEFONT = 508] = "CONFIGID_SUBTITLEFONT",e[e.CONFIGID_SUBTITLETIMING = 509] = "CONFIGID_SUBTITLETIMING",e[e.CONFIGID_SUBTITLE3D = 510] = "CONFIGID_SUBTITLE3D",e[e.CONFIGID_SUBTITLECONTENT = 511] = "CONFIGID_SUBTITLECONTENT",e[e.CONFIGID_PICTUREUSABLE = 601] = "CONFIGID_PICTUREUSABLE",e[e.CONFIGID_PICTUREENABLE = 602] = "CONFIGID_PICTUREENABLE",e[e.CONFIGID_PICTUREBOUND = 603] = "CONFIGID_PICTUREBOUND",e[e.CONFIGID_PICTUREWIDTH = 604] = "CONFIGID_PICTUREWIDTH",e[e.CONFIGID_PICTUREHEIGHT = 605] = "CONFIGID_PICTUREHEIGHT",e[e.CONFIGID_PICTURELEFT = 606] = "CONFIGID_PICTURELEFT",e[e.CONFIGID_PICTURETOP = 607] = "CONFIGID_PICTURETOP",e[e.CONFIGID_PICTUREALPHA = 608] = "CONFIGID_PICTUREALPHA",e[e.CONFIGID_PICTURECOLORKEY = 609] = "CONFIGID_PICTURECOLORKEY",e[e.CONFIGID_PICTUREHITTEST = 610] = "CONFIGID_PICTUREHITTEST",e[e.CONFIGID_PICTUREHITALPHA = 611] = "CONFIGID_PICTUREHITALPHA",e[e.CONFIGID_PICTURETEXT = 612] = "CONFIGID_PICTURETEXT",e[e.CONFIGID_PICTUREFONT = 613] = "CONFIGID_PICTUREFONT",e[e.CONFIGID_PICTURERGBABUFFER = 614] = "CONFIGID_PICTURERGBABUFFER",e[e.CONFIGID_PICTUREBMPHANDLE = 615] = "CONFIGID_PICTUREBMPHANDLE",e[e.CONFIGID_PICTUREBMPFILENAME = 616] = "CONFIGID_PICTUREBMPFILENAME",e[e.CONFIGID_PICTUREPNGFILENAME = 617] = "CONFIGID_PICTUREPNGFILENAME",e[e.CONFIGID_PICTURESWFFILENAME = 618] = "CONFIGID_PICTURESWFFILENAME",e[e.CONFIGID_PICTURESWFSIZE = 619] = "CONFIGID_PICTURESWFSIZE",e[e.CONFIGID_PICTURESWFCONTROL = 620] = "CONFIGID_PICTURESWFCONTROL",e[e.CONFIGID_PICTUREEVRCPLINEAR = 621] = "CONFIGID_PICTUREEVRCPLINEAR",e[e.CONFIGID_PICTUREATTACHTOVR = 622] = "CONFIGID_PICTUREATTACHTOVR",e[e.CONFIGID_SNAPSHOTUSABLE = 701] = "CONFIGID_SNAPSHOTUSABLE",e[e.CONFIGID_SNAPSHOTIMAGE = 702] = "CONFIGID_SNAPSHOTIMAGE",e[e.CONFIGID_SNAPSHOTWIDTH = 703] = "CONFIGID_SNAPSHOTWIDTH",e[e.CONFIGID_SNAPSHOTHEIGHT = 704] = "CONFIGID_SNAPSHOTHEIGHT",e[e.CONFIGID_SNAPSHOTSOURCEPOSITION = 705] = "CONFIGID_SNAPSHOTSOURCEPOSITION",e[e.CONFIGID_SNAPSHOTKEEPASPECTRATIO = 706] = "CONFIGID_SNAPSHOTKEEPASPECTRATIO",e[e.CONFIGID_SNAPSHOTFORMAT = 707] = "CONFIGID_SNAPSHOTFORMAT",e[e.CONFIGID_SNAPSHOTJPEGQUALITY = 708] = "CONFIGID_SNAPSHOTJPEGQUALITY",e[e.CONFIGID_SNAPSHOTGIFPARAM = 709] = "CONFIGID_SNAPSHOTGIFPARAM",e[e.CONFIGID_SNAPSHOTABORT = 710] = "CONFIGID_SNAPSHOTABORT",e[e.CONFIGID_SNAPSHOTGIFWORKING = 711] = "CONFIGID_SNAPSHOTGIFWORKING",e[e.CONFIGID_SNAPSHOTGIFPROGRESS = 712] = "CONFIGID_SNAPSHOTGIFPROGRESS",e[e.CONFIGID_SNAPSHOTSUBTITLE = 713] = "CONFIGID_SNAPSHOTSUBTITLE",e[e.CONFIGID_CUTUSABLE = 801] = "CONFIGID_CUTUSABLE",e[e.CONFIGID_CUTFORMATLIST = 802] = "CONFIGID_CUTFORMATLIST",e[e.CONFIGID_CUTFORMATCURRENT = 803] = "CONFIGID_CUTFORMATCURRENT",e[e.CONFIGID_CUTFILENAME = 804] = "CONFIGID_CUTFILENAME",e[e.CONFIGID_TRANSCODEVIDEOWIDTH = 901] = "CONFIGID_TRANSCODEVIDEOWIDTH",e[e.CONFIGID_TRANSCODEVIDEOHEIGHT = 902] = "CONFIGID_TRANSCODEVIDEOHEIGHT",e[e.CONFIGID_TRANSCODEKEEPASPECTRATIO = 903] = "CONFIGID_TRANSCODEKEEPASPECTRATIO",e[e.CONFIGID_TRANSCODEROUNDSIZE = 904] = "CONFIGID_TRANSCODEROUNDSIZE",e[e.CONFIGID_TRANSCODEAUDIOTRACK = 905] = "CONFIGID_TRANSCODEAUDIOTRACK",e[e.CONFIGID_TRANSCODESUBTLTELANGUAGE = 906] = "CONFIGID_TRANSCODESUBTLTELANGUAGE",e[e.CONFIGID_TRANSCODECROPBORDER = 907] = "CONFIGID_TRANSCODECROPBORDER",e[e.CONFIGID_TRANSCODEVSFILTER = 908] = "CONFIGID_TRANSCODEVSFILTER",e[e.CONFIGID_NETWORK_BUFFERENTER = 1001] = "CONFIGID_NETWORK_BUFFERENTER",e[e.CONFIGID_NETWORK_BUFFERLEAVE = 1002] = "CONFIGID_NETWORK_BUFFERLEAVE",e[e.CONFIGID_NETWORK_NOBUFFERDRY = 1003] = "CONFIGID_NETWORK_NOBUFFERDRY",e[e.CONFIGID_NETWORK_SEEKBUFFERTIMEOUT = 1004] = "CONFIGID_NETWORK_SEEKBUFFERTIMEOUT",e[e.CONFIGID_NETWORK__ISSEEKBUFFER = 1012] = "CONFIGID_NETWORK__ISSEEKBUFFER",e[e.CONFIGID_NETWORK__FASTSEEK = 1013] = "CONFIGID_NETWORK__FASTSEEK",e[e.CONFIGID_NETWORK__STUFFURL = 1014] = "CONFIGID_NETWORK__STUFFURL",e[e.CONFIGID_HTTPENABLEVOD = 1101] = "CONFIGID_HTTPENABLEVOD",e[e.CONFIGID_HTTPFAILEDRECONNECTCOUNT = 1102] = "CONFIGID_HTTPFAILEDRECONNECTCOUNT",e[e.CONFIGID_HTTPFAILEDRECONNECTINTERVAL = 1103] = "CONFIGID_HTTPFAILEDRECONNECTINTERVAL",e[e.CONFIGID_HTTPLIVE = 1104] = "CONFIGID_HTTPLIVE",e[e.CONFIGID_HTTPCOOKIE = 1105] = "CONFIGID_HTTPCOOKIE",e[e.CONFIGID_HTTPREFERER = 1106] = "CONFIGID_HTTPREFERER",e[e.CONFIGID_HTTPCUSTOMHEADERS = 1107] = "CONFIGID_HTTPCUSTOMHEADERS",e[e.CONFIGID_HTTPUSERAGENT = 1108] = "CONFIGID_HTTPUSERAGENT",e[e.CONFIGID_MULTISOURCEUSABLE = 1201] = "CONFIGID_MULTISOURCEUSABLE",e[e.CONFIGID_MULTISOURCECHANGE = 1202] = "CONFIGID_MULTISOURCECHANGE",e[e.CONFIGID_MULTISOURCESEEK = 1203] = "CONFIGID_MULTISOURCESEEK",e[e.CONFIGID_MULTISOURCECURRENT = 1204] = "CONFIGID_MULTISOURCECURRENT",e[e.CONFIGID_LYRICUSABLE = 1301] = "CONFIGID_LYRICUSABLE",e[e.CONFIGID_LYRICSHOW = 1302] = "CONFIGID_LYRICSHOW",e[e.CONFIGID_LYRICUPDATETIME = 1303] = "CONFIGID_LYRICUPDATETIME",e[e.CONFIGID_LYRICFORMAT = 1304] = "CONFIGID_LYRICFORMAT",e[e.CONFIGID_LYRICFILE = 1305] = "CONFIGID_LYRICFILE",e[e.CONFIGID_LYRICCONTENT = 1306] = "CONFIGID_LYRICCONTENT",e[e.CONFIGID_LYRICBACKCOLOR = 1307] = "CONFIGID_LYRICBACKCOLOR",e[e.CONFIGID_LYRICPICTUREFILENAME = 1308] = "CONFIGID_LYRICPICTUREFILENAME",e[e.CONFIGID_LYRICPICTUREHANDLE = 1309] = "CONFIGID_LYRICPICTUREHANDLE",e[e.CONFIGID_LYRICPICTUREMODE = 1310] = "CONFIGID_LYRICPICTUREMODE",e[e.CONFIGID_LYRICFONT = 1311] = "CONFIGID_LYRICFONT",e[e.CONFIGID_LYRICFONTNORMALCOLOR = 1312] = "CONFIGID_LYRICFONTNORMALCOLOR",e[e.CONFIGID_LYRICFONTHIGHLIGHTCOLOR = 1313] = "CONFIGID_LYRICFONTHIGHLIGHTCOLOR",e[e.CONFIGID_LYRICFRAMEENABLE = 1314] = "CONFIGID_LYRICFRAMEENABLE",e[e.CONFIGID_LYRICFRAMECOLOR = 1315] = "CONFIGID_LYRICFRAMECOLOR",e[e.CONFIGID_LYRICSMOOTHMULITPLE = 1316] = "CONFIGID_LYRICSMOOTHMULITPLE",e[e.CONFIGID_LYRICSMOOTHONLYLYRIC = 1317] = "CONFIGID_LYRICSMOOTHONLYLYRIC",e[e.CONFIGID_LYRICALPHA = 1318] = "CONFIGID_LYRICALPHA",e[e.CONFIGID_LYRICANIMATION = 1319] = "CONFIGID_LYRICANIMATION",e[e.CONFIGID_LYRICTIMEOFFSET = 1320] = "CONFIGID_LYRICTIMEOFFSET",e[e.CONFIGID_LYRICDRAGENABLE = 1321] = "CONFIGID_LYRICDRAGENABLE",e[e.CONFIGID_LYRICDRAGLINECOLOR = 1322] = "CONFIGID_LYRICDRAGLINECOLOR",e[e.CONFIGID_LYRICDRAGTEXTCOLOR = 1323] = "CONFIGID_LYRICDRAGTEXTCOLOR",e[e.CONFIGID_LYRICDRAGTEXTLEFT = 1324] = "CONFIGID_LYRICDRAGTEXTLEFT",e[e.CONFIGID_LYRICDRAGTEXTRIGHTFRONT = 1325] = "CONFIGID_LYRICDRAGTEXTRIGHTFRONT",e[e.CONFIGID_LYRICDRAGTEXTRIGHTBACK = 1326] = "CONFIGID_LYRICDRAGTEXTRIGHTBACK",e[e.CONFIGID_LYRICDRAGTEXTRIGHTDIV = 1327] = "CONFIGID_LYRICDRAGTEXTRIGHTDIV",e[e.CONFIGID_LYRICALIGN = 1328] = "CONFIGID_LYRICALIGN",e[e.CONFIGID_DVDCHAPTERS = 1401] = "CONFIGID_DVDCHAPTERS",e[e.CONFIGID_DVDANGLECOUNT = 1402] = "CONFIGID_DVDANGLECOUNT",e[e.CONFIGID_DVDAUDIOS = 1403] = "CONFIGID_DVDAUDIOS",e[e.CONFIGID_DVDSUBPICTURES = 1404] = "CONFIGID_DVDSUBPICTURES",e[e.CONFIGID_DVDCURRENTCHAPTER = 1405] = "CONFIGID_DVDCURRENTCHAPTER",e[e.CONFIGID_DVDCURRENTANGLE = 1406] = "CONFIGID_DVDCURRENTANGLE",e[e.CONFIGID_DVDCURRENTAUDIO = 1407] = "CONFIGID_DVDCURRENTAUDIO",e[e.CONFIGID_DVDCURRENTSUBPICTURE = 1408] = "CONFIGID_DVDCURRENTSUBPICTURE",e[e.CONFIGID_DVDPARENTALLEVEL = 1409] = "CONFIGID_DVDPARENTALLEVEL",e[e.CONFIGID_DVDSHOWMENU = 1410] = "CONFIGID_DVDSHOWMENU",e[e.CONFIGID_DVDPRESSBUTTON = 1411] = "CONFIGID_DVDPRESSBUTTON",e[e.CONFIGID_DVDSKIPCHAPTER = 1412] = "CONFIGID_DVDSKIPCHAPTER",e[e.CONFIGID_DVDPLAYFORWARD = 1413] = "CONFIGID_DVDPLAYFORWARD",e[e.CONFIGID_DVDPLAYBACKWARD = 1414] = "CONFIGID_DVDPLAYBACKWARD",e[e.CONFIGID_DVDNEEDINTERACTION = 1415] = "CONFIGID_DVDNEEDINTERACTION",e[e.CONFIGID_AC3DTSUSABLE = 1501] = "CONFIGID_AC3DTSUSABLE",e[e.CONFIGID_AC3DTSOUTPUTMODE = 1502] = "CONFIGID_AC3DTSOUTPUTMODE",e[e.CONFIGID_AC3DTSVOICEVOLUME = 1503] = "CONFIGID_AC3DTSVOICEVOLUME",e[e.CONFIGID_SVCCURRENTLEVEL = 1601] = "CONFIGID_SVCCURRENTLEVEL",e[e.CONFIGID_SVCSTATISTICINTERVAL = 1602] = "CONFIGID_SVCSTATISTICINTERVAL",e[e.CONFIGID_SVCLEVELMIN = 1603] = "CONFIGID_SVCLEVELMIN",e[e.CONFIGID_SVCLEVELMAX = 1604] = "CONFIGID_SVCLEVELMAX",e[e.CONFIGID_SVCDOWNLOADSPEED = 1605] = "CONFIGID_SVCDOWNLOADSPEED",e[e.CONFIGID_SVCCONNECTTIMEOUT = 1606] = "CONFIGID_SVCCONNECTTIMEOUT",e[e.CONFIGID_DETECTSUBTITLEUSABLE = 1701] = "CONFIGID_DETECTSUBTITLEUSABLE",e[e.CONFIGID_DETECTSUBTITLEENABLE = 1702] = "CONFIGID_DETECTSUBTITLEENABLE",e[e.CONFIGID_DETECTSUBTITLEAREA = 1703] = "CONFIGID_DETECTSUBTITLEAREA",e[e.CONFIGID_DETECTSUBTITLESHOW = 1704] = "CONFIGID_DETECTSUBTITLESHOW",e[e.CONFIGID_DLNAENABLE = 1801] = "CONFIGID_DLNAENABLE",e[e.CONFIGID_DLNADEVICELIST = 1802] = "CONFIGID_DLNADEVICELIST",e[e.CONFIGID_DLNACURRENTDEVICE = 1803] = "CONFIGID_DLNACURRENTDEVICE",e[e.CONFIGID_DLNASEARCHDEVICE = 1804] = "CONFIGID_DLNASEARCHDEVICE",e[e.CONFIGID_VIDEO3DUSABLE = 1901] = "CONFIGID_VIDEO3DUSABLE",e[e.CONFIGID_VIDEO3DSHOW = 1902] = "CONFIGID_VIDEO3DSHOW",e[e.CONFIGID_VIDEO3DOBJECTLIST = 1903] = "CONFIGID_VIDEO3DOBJECTLIST",e[e.CONFIGID_VIDEO3DCURRENTOBJECT = 1904] = "CONFIGID_VIDEO3DCURRENTOBJECT",e[e.CONFIGID_VIDEO3DOBJECTINFO = 1905] = "CONFIGID_VIDEO3DOBJECTINFO",e[e.CONFIGID_VIDEO3DADDOBJECT = 1906] = "CONFIGID_VIDEO3DADDOBJECT",e[e.CONFIGID_VIDEO3DDELETEOBJECT = 1907] = "CONFIGID_VIDEO3DDELETEOBJECT",e[e.CONFIGID_VIDEO3DPOINTCOUNT = 1908] = "CONFIGID_VIDEO3DPOINTCOUNT",e[e.CONFIGID_VIDEO3DCURRENTPOINT = 1909] = "CONFIGID_VIDEO3DCURRENTPOINT",e[e.CONFIGID_VIDEO3DPOINTINFO = 1910] = "CONFIGID_VIDEO3DPOINTINFO",e[e.CONFIGID_VIDEO3DADDPOINT = 1911] = "CONFIGID_VIDEO3DADDPOINT",e[e.CONFIGID_VIDEO3DDELETEPOINT = 1912] = "CONFIGID_VIDEO3DDELETEPOINT",e[e.CONFIGID_VIDEO3DFRAMECOUNT = 1913] = "CONFIGID_VIDEO3DFRAMECOUNT",e[e.CONFIGID_VIDEO3DFRAMEINFO = 1914] = "CONFIGID_VIDEO3DFRAMEINFO",e[e.CONFIGID_VIDEO3DADDFRAME = 1915] = "CONFIGID_VIDEO3DADDFRAME",e[e.CONFIGID_VIDEO3DDELETEFRAME = 1916] = "CONFIGID_VIDEO3DDELETEFRAME",e[e.CONFIGID_VIDEO3DCLEARFRAMES = 1917] = "CONFIGID_VIDEO3DCLEARFRAMES",e[e.CONFIGID_VIDEO3DCOPYFRAME = 1918] = "CONFIGID_VIDEO3DCOPYFRAME",e[e.CONFIGID_VIDEO3DSAMEFRAMES = 1919] = "CONFIGID_VIDEO3DSAMEFRAMES",e[e.CONFIGID_VIDEO3DLINEARFRAMES = 1920] = "CONFIGID_VIDEO3DLINEARFRAMES",e[e.CONFIGID_VIDEO3DEDITMODE = 1921] = "CONFIGID_VIDEO3DEDITMODE",e[e.CONFIGID_VIDEO3DSELECTTOOL = 1922] = "CONFIGID_VIDEO3DSELECTTOOL",e[e.CONFIGID_VIDEO3DMAGICADMIT = 1923] = "CONFIGID_VIDEO3DMAGICADMIT",e[e.CONFIGID_VIDEO3DLOADFROMFILE = 1924] = "CONFIGID_VIDEO3DLOADFROMFILE",e[e.CONFIGID_VIDEO3DSAVETOFILE = 1925] = "CONFIGID_VIDEO3DSAVETOFILE",e[e.CONFIGID_WIDIENABLE = 2001] = "CONFIGID_WIDIENABLE",e[e.CONFIGID_WIDIADAPTERLIST = 2002] = "CONFIGID_WIDIADAPTERLIST",e[e.CONFIGID_WIDICONNECT = 2003] = "CONFIGID_WIDICONNECT",e[e.CONFIGID_WIDIDISCONNECT = 2004] = "CONFIGID_WIDIDISCONNECT",e[e.CONFIGID_WIDISETMODE = 2005] = "CONFIGID_WIDISETMODE",e[e.CONFIGID_WIDISEARCHDEVICE = 2006] = "CONFIGID_WIDISEARCHDEVICE",e[e.CONFIGID_SUBTITLE2USABLE = 2101] = "CONFIGID_SUBTITLE2USABLE",e[e.CONFIGID_SUBTITLE2EXTNAMELIST = 2102] = "CONFIGID_SUBTITLE2EXTNAMELIST",e[e.CONFIGID_SUBTITLE2FILENAME = 2103] = "CONFIGID_SUBTITLE2FILENAME",e[e.CONFIGID_SUBTITLE2SHOW = 2104] = "CONFIGID_SUBTITLE2SHOW",e[e.CONFIGID_SUBTITLE2LANGUAGELIST = 2105] = "CONFIGID_SUBTITLE2LANGUAGELIST",e[e.CONFIGID_SUBTITLE2LANGUAGECURRENT = 2106] = "CONFIGID_SUBTITLE2LANGUAGECURRENT",e[e.CONFIGID_SUBTITLE2PLACEMENT = 2107] = "CONFIGID_SUBTITLE2PLACEMENT",e[e.CONFIGID_SUBTITLE2FONT = 2108] = "CONFIGID_SUBTITLE2FONT",e[e.CONFIGID_SUBTITLE2TIMING = 2109] = "CONFIGID_SUBTITLE2TIMING",e[e.CONFIGID_SUBTITLE23D = 2110] = "CONFIGID_SUBTITLE23D",e[e.CONFIGID_SUBTITLE2CONTENT = 2111] = "CONFIGID_SUBTITLE2CONTENT",e[e.CONFIGID_CACHEFILENAME = 2201] = "CONFIGID_CACHEFILENAME",e[e.CONFIGID_CACHECLEAR = 2202] = "CONFIGID_CACHECLEAR",e[e.CONFIGID_CACHEDOWNLOADLIST = 2203] = "CONFIGID_CACHEDOWNLOADLIST",e[e.CONFIGID_CACHECOMPLETED = 2204] = "CONFIGID_CACHECOMPLETED",e[e.CONFIGID_CACHECONVERT = 2205] = "CONFIGID_CACHECONVERT",e[e.CONFIGID_CACHEIGNORECOMPAREURL = 2206] = "CONFIGID_CACHEIGNORECOMPAREURL",e[e.CONFIGID_CACHEGREED = 2207] = "CONFIGID_CACHEGREED",e[e.CONFIGID_SPRITEUSABLE = 2301] = "CONFIGID_SPRITEUSABLE",e[e.CONFIGID_SPRITELIST = 2302] = "CONFIGID_SPRITELIST",e[e.CONFIGID_SPRITEADD = 2303] = "CONFIGID_SPRITEADD",e[e.CONFIGID_SPRITEDELETE = 2304] = "CONFIGID_SPRITEDELETE",e[e.CONFIGID_SPRITECURRENT = 2305] = "CONFIGID_SPRITECURRENT",e[e.CONFIGID_SPRITEBOUND = 2306] = "CONFIGID_SPRITEBOUND",e[e.CONFIGID_SPRITEPOSITION = 2307] = "CONFIGID_SPRITEPOSITION",e[e.CONFIGID_SPRITEMOVETO = 2308] = "CONFIGID_SPRITEMOVETO",e[e.CONFIGID_SPRITESELECTVIDEO = 2309] = "CONFIGID_SPRITESELECTVIDEO",e[e.CONFIGID_SPRITESELECTRECT = 2310] = "CONFIGID_SPRITESELECTRECT",e[e.CONFIGID_SPRITESHOWSELECT = 2311] = "CONFIGID_SPRITESHOWSELECT",e[e.CONFIGID_SPRITEATTACHVIDEO = 2312] = "CONFIGID_SPRITEATTACHVIDEO",e[e.CONFIGID_SPRITEATTACHTOVR = 2313] = "CONFIGID_SPRITEATTACHTOVR",e[e.CONFIGID_VRENABLE = 2401] = "CONFIGID_VRENABLE",e[e.CONFIGID_VRMODE = 2402] = "CONFIGID_VRMODE",e[e.CONFIGID_VRPOSITION = 2403] = "CONFIGID_VRPOSITION",e[e.CONFIGID_VRDEVICE = 2404] = "CONFIGID_VRDEVICE",e[e.CONFIGID_VRDELAY = 2405] = "CONFIGID_VRDELAY",e[e.CONFIGID_VRCIRCULARPARAMETER = 2406] = "CONFIGID_VRCIRCULARPARAMETER",e[e.CONFIGID_VRMONITORPARAMETER = 2407] = "CONFIGID_VRMONITORPARAMETER",e[e.CONFIGID_VRFILLBAND = 2408] = "CONFIGID_VRFILLBAND",e[e.CONFIGID_VRFOCUSPOSITION = 2409] = "CONFIGID_VRFOCUSPOSITION",e[e.CONFIGID_VRQUALITY = 2410] = "CONFIGID_VRQUALITY",e[e.CONFIGID_DNNVSRMODEL = 2802] = "CONFIGID_DNNVSRMODEL",e[e.CONFIGID_DNNENABLEVSR = 2803] = "CONFIGID_DNNENABLEVSR",e[e.CONFIGID_DNNIMAGESR = 2804] = "CONFIGID_DNNIMAGESR"
    }(t.APlayerConfigId || (t.APlayerConfigId = {})), function (e) {
        e[e.EVENTCODE_BASE = 1e4] = "EVENTCODE_BASE", e[e.EVENTCODE_MULTISOURCE = 10001] = "EVENTCODE_MULTISOURCE", e[e.EVENTCODE_DVD = 10002] = "EVENTCODE_DVD", e[e.EVENTCODE_STEPCOMPLETED = 10003] = "EVENTCODE_STEPCOMPLETED", e[e.EVENTCODE_DLNA = 10004] = "EVENTCODE_DLNA", e[e.EVENTCODE_GIFCOMPLETED = 10005] = "EVENTCODE_GIFCOMPLETED", e[e.EVENTCODE_WIDI = 10006] = "EVENTCODE_WIDI", e[e.EVENTCODE_VIDEO3D = 10007] = "EVENTCODE_VIDEO3D", e[e.EVENTCODE_SPRITE = 10008] = "EVENTCODE_SPRITE", e[e.EVENTCODE_PLAYLIST = 10009] = "EVENTCODE_PLAYLIST", e[e.EVENTCODE_PLAYCOMPLETE = 10010] = "EVENTCODE_PLAYCOMPLETE", e[e.EVENTCODE_DNNIMAGESR = 10013] = "EVENTCODE_DNNIMAGESR"
    }(t.APlayerEventCode || (t.APlayerEventCode = {}))
}, function (e, t, i) {
    "use strict";
    var n = this && this.__awaiter || function (e, t, i, n) {
        return new (i || (i = Promise))(function (o, a) {
            function r(e) {
                try {
                    l(n.next(e))
                } catch (e) {
                    a(e)
                }
            }

            function s(e) {
                try {
                    l(n.throw(e))
                } catch (e) {
                    a(e)
                }
            }

            function l(e) {
                e.done ? o(e.value) : new i(function (t) {
                    t(e.value)
                }).then(r, s)
            }

            l((n = n.apply(e, t || [])).next())
        })
    };
    Object.defineProperty(t, "__esModule", {value: !0}), function (e) {
        e.getTextScale = function () {
            return 1
        }, e.fixWindowSize = function (e, t) {
            return n(this, void 0, void 0, function* () {
                window.resizeTo(e, t)
            })
        }, e.autoFixWindowSize = function () {
        }, e.fixZoomFactory = function () {
        }
    }(t.FixTextScale || (t.FixTextScale = {}))
}, function (e, t, i) {
    "use strict";
    Object.defineProperty(t, "__esModule", {value: !0});
    const n = i(3), o = i(0).default.getLogger("common/skin"), a = !0;
    let r = null;

    function s(e) {
        if (!a || null === e || void 0 === e) return;
        let t = localStorage.getItem("skin_body_classes");
        r && r.classes === e.classes || (localStorage.removeItem("skin_body_classes"), e && e.classes && (document.body.classList.add(e.classes), localStorage.setItem("skin_body_classes", e.classes)), r && r.classes ? document.body.classList.remove(r.classes) : t !== e.classes && document.body.classList.remove(t), r = Object.freeze(Object.assign({}, e)))
    }

    n.client.callServerFunction("GetSkinInfo").then(s).catch(e => {
        o.warning(e)
    }), n.client.attachServerEvent("OnChangeSkin", (e, ...t) => {
        s(t[0])
    })
}, function (e, t) {
}, , , , , , , , , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , , , , , , function (e, t) {
}, , , function (e, t) {
}, , , , , , , , , , function (e, t) {
}, , , function (e, t) {
}, , , function (e, t) {
}, , function (e, t) {
}, , , function (e, t) {
}, , , function (e, t) {
}, , , , , , , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , , function (e, t) {
}, , function (e, t) {
}, , , , function (e, t) {
}, , , , , function (e, t) {
}, , , function (e, t) {
}, , , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , , , , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}, , function (e, t) {
}]);
//# sourceMappingURL=renderer.js.map